:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --paper-deep: #ebe8df;
  --card: #fffefa;
  --ink: #18251f;
  --muted: #63716a;
  --line: #d9ddd4;
  --green: #285d48;
  --green-deep: #174332;
  --green-soft: #e2eee6;
  --rust: #bb4e35;
  --rust-soft: #f4e5dd;
  --amber: #e6b753;
  --amber-soft: #f7edcf;
  --quiet: #dedfd8;
  --shadow: 0 14px 34px rgba(24, 37, 31, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; }

body { margin: 0; min-width: 320px; min-height: 100vh; }

button, input, select, textarea { font: inherit; }

button, select, input { min-height: 44px; }

button { color: inherit; }

.app-shell { min-height: 100vh; }

.site-header {
  padding: max(14px, env(safe-area-inset-top)) 18px 0;
  background: rgba(245, 243, 237, .94);
  border-bottom: 1px solid rgba(217, 221, 212, .75);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.header-inner, .main-content, .site-footer { width: min(100%, 1160px); margin-inline: auto; }

.brand-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px; }

.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 12px 12px 12px 4px; background: var(--green); color: #fffefa;
  font-size: 19px; font-weight: 800; letter-spacing: -.08em;
}

.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
.brand-subtitle { margin-top: 1px; color: var(--muted); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }

.local-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.local-status::before { content: ""; width: 7px; height: 7px; border-radius: 100%; background: #65a17e; box-shadow: 0 0 0 3px #e1eee5; }
.runtime-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.offline-status { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 99px; background: var(--amber-soft); color: #77591a; font-size: 10px; font-weight: 740; white-space: nowrap; }
.offline-status[data-ready="true"] { background: var(--green-soft); color: var(--green-deep); }
.onboarding-status { justify-content: flex-start; }

.primary-nav { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; margin-inline: -3px; padding-bottom: 10px; }
.primary-nav::-webkit-scrollbar { display: none; }
.nav-button { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); border-radius: 100px; font-weight: 650; font-size: 13px; cursor: pointer; }
.nav-button:hover { background: #eeece5; color: var(--ink); }
.nav-button[aria-current="page"] { background: var(--ink); color: #fffefa; }

.main-content { padding: 26px 16px 42px; }
.view-stack { display: grid; gap: 20px; }
.view-stack > *, .grid-main > *, .grid-2 > * { min-width: 0; }
.view-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.title-block { min-width: 0; }
.title-block h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 7vw, 48px); font-weight: 600; letter-spacing: -.055em; line-height: 1.02; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.lede { max-width: 660px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.view-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.grid-2 { display: grid; gap: 16px; }
.card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin: 0 0 15px; font-size: 15px; font-weight: 760; letter-spacing: -.02em; }
.card-heading small { color: var(--muted); font-size: 11px; font-weight: 550; text-align: right; }
.card-subtitle { margin: -8px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.soft-card { background: #f8f7f2; box-shadow: none; }
.plain-card { box-shadow: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.button:hover { background: #f2f4ef; border-color: #bbc8bd; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .46; cursor: not-allowed; }
.button-primary { background: var(--green); border-color: var(--green); color: #fffefa; }
.button-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.button-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button-danger { color: #9b3d2a; background: #fff9f6; border-color: #e7c9bd; }
.button-small { min-height: 44px; padding: 0 11px; border-radius: 10px; font-size: 12px; }
.icon-button { width: 44px; min-width: 44px; padding: 0; font-size: 20px; }

.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 99px; background: var(--green-soft); color: var(--green-deep); font-size: 11px; font-weight: 740; line-height: 1.25; }
.badge-muted { background: #eceee8; color: #5b665f; }
.badge-warn { background: var(--amber-soft); color: #77591a; }
.badge-alert { background: var(--rust-soft); color: #8f3a27; }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.inline-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.notice { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border: 1px solid #e8d8ae; border-radius: 14px; background: #fbf5e5; color: #5c4a23; font-size: 13px; line-height: 1.5; }
.notice::before { content: "i"; flex: 0 0 20px; display: grid; place-items: center; height: 20px; border-radius: 50%; background: var(--amber); color: #493713; font-weight: 900; font-family: Georgia, serif; }
.notice-error { background: #fbefeb; border-color: #e9c8bb; color: #7d3323; }
.notice-error::before { content: "!"; background: var(--rust); color: white; }
.notice-success { background: #e8f1ea; border-color: #c8ddcd; color: #28553c; }
.notice-success::before { content: "✓"; background: #5d9a72; color: white; }
.update-notice { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.storage-status { padding: 3px 1px; line-height: 1.45; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--paper-deep); }
.segment-button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 720; cursor: pointer; }
.segment-button[aria-pressed="true"] { background: var(--card); box-shadow: 0 2px 7px rgba(24, 37, 31, .08); color: var(--ink); }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.date-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.date-controls input { width: 150px; }

.field { display: grid; gap: 6px; min-width: 0; }
.field-label { color: #4f5e56; font-size: 11px; font-weight: 750; letter-spacing: .035em; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.45; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cdd4cc; border-radius: 11px; background: #fff; color: var(--ink); font-size: 16px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(87, 143, 105, .27); outline-offset: 2px; border-color: #679079; }
textarea { min-height: 95px; resize: vertical; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.field-row > .field { flex: 1 1 130px; }
.stepper-field { display: grid; gap: 6px; }
.stepper { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 4px; min-width: 0; }
.stepper input { text-align: center; padding-inline: 4px; font-variant-numeric: tabular-nums; }
.stepper .button { width: 36px; min-width: 36px; padding: 0; font-size: 19px; }
.effort-list { display: flex; flex-wrap: wrap; gap: 7px; }
.effort-button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: white; color: #526159; font-size: 12px; font-weight: 700; cursor: pointer; }
.effort-button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: white; }
.inline-form { display: grid; gap: 13px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.labeled-value { display: grid; gap: 4px; min-width: 0; }
.labeled-value strong { font-size: 14px; font-weight: 740; line-height: 1.35; overflow-wrap: anywhere; }
.metrics-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.eyebrow + strong { letter-spacing: -.01em; }
.divider { height: 1px; margin: 14px 0; background: var(--line); }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.5; }
.tiny { font-size: 10px; line-height: 1.4; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.number { font-variant-numeric: tabular-nums; }

.body-map-wrap { display: grid; gap: 14px; }
.body-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.body-figure { display: grid; justify-items: center; gap: 4px; min-width: 0; margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.body-svg { display: block; width: min(100%, 205px); height: auto; overflow: visible; }
.body-base { fill: #e8e8df; stroke: #cdd1c9; stroke-width: 1.3; stroke-linejoin: round; }
.body-base-head { fill: #e8e8df; stroke: #cdd1c9; stroke-width: 1.3; }
.body-base-neck { fill: #daddd4; }
.body-region { cursor: pointer; outline: none; }
.body-region-shape { stroke: #fffefa; stroke-width: 2.2; stroke-linejoin: round; transition: filter .15s, stroke-width .15s; }
.body-region:hover .body-region-shape, .body-region:focus .body-region-shape { filter: brightness(.9); stroke: var(--ink); stroke-width: 3.2; }
.body-region-fill.quiet .body-region-shape, .legend-dot.quiet { fill: #d9ddd4; background: #d9ddd4; }
.body-region-fill.secondary .body-region-shape, .legend-dot.secondary { fill: #edc86d; background: #edc86d; }
.body-region-fill.direct .body-region-shape, .legend-dot.direct { fill: #e48b55; background: #e48b55; }
.body-region-fill.max-direct .body-region-shape, .legend-dot.max-direct { fill: #be5137; background: #be5137; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 13px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.muscle-detail { display: grid; gap: 14px; }
.muscle-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.muscle-count { padding: 12px; border-radius: 13px; background: #f4f4ee; }
.muscle-count strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.muscle-count span { color: var(--muted); font-size: 11px; }
.muscle-session-list { display: grid; gap: 8px; }
.muscle-session-item { padding: 10px 0; border-top: 1px solid var(--line); }
.muscle-session-item:first-child { border-top: 0; }
.muscle-session-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; font-size: 12px; font-weight: 750; }
.muscle-set-list { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.muscle-list { display: grid; gap: 5px; }
.muscle-list-row { display: grid; grid-template-columns: minmax(80px, 1fr) auto auto; align-items: center; gap: 8px; min-height: 39px; padding: 4px 0; border-top: 1px solid #eceee8; }
.muscle-list-row:first-child { border-top: 0; }
.muscle-select { border: 0; min-height: 38px; padding: 0; background: transparent; color: var(--ink); text-align: left; font-size: 12px; font-weight: 700; cursor: pointer; }
.muscle-list-count { color: var(--muted); font-size: 10px; white-space: nowrap; }

.session-list { display: grid; gap: 9px; }
.session-row, .history-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; }
.session-row-main, .history-row-main { min-width: 0; display: grid; gap: 4px; }
.session-row-title, .history-row-title { font-size: 13px; font-weight: 760; overflow-wrap: anywhere; }
.session-row-meta, .history-row-meta { color: var(--muted); font-size: 11px; }
.session-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty-state { display: grid; justify-items: start; gap: 7px; padding: 24px 4px; color: var(--muted); }
.empty-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--green-soft); color: var(--green); font-size: 18px; font-weight: 800; }
.empty-state h3 { margin: 3px 0 0; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 0; max-width: 480px; font-size: 12px; line-height: 1.55; }

.workout-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.day-options, .scheme-options { display: grid; gap: 8px; }
.choice-card { display: grid; gap: 4px; width: 100%; min-height: 66px; padding: 11px 13px; text-align: left; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; cursor: pointer; }
.choice-card:hover { border-color: #96b3a0; }
.choice-card[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #f1f7f2; }
.choice-card strong { font-size: 13px; }
.choice-card span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.exercise-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; min-width: 0; }
.exercise-card { width: 100%; max-width: 100%; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 8px 25px rgba(24, 37, 31, .045); }
.exercise-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; align-items: flex-start; min-width: 0; max-width: 100%; }
.exercise-heading-main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.exercise-heading .view-actions { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.exercise-heading .view-actions > * { max-width: 100%; }
.exercise-name { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.13; letter-spacing: -.035em; overflow-wrap: anywhere; }
.exercise-target { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; margin: 11px 0; }
.exercise-target > * { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.target-chip { max-width: 100%; padding: 5px 9px; border-radius: 8px; background: #eff1eb; color: #435249; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.target-chip-rir { background: #f5eedb; color: #73571f; }
.exercise-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 11px 0; border-top: 1px solid #e7eae3; border-bottom: 1px solid #e7eae3; }
.exercise-info-grid > * { min-width: 0; }
.scheme-options { min-width: 0; max-width: 100%; }
.scheme-options > * { min-width: 0; max-width: 100%; }
.choice-card strong, .choice-card span { overflow-wrap: anywhere; }
.set-list { display: grid; gap: 7px; margin-top: 12px; }
.set-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; max-width: 100%; padding: 9px 10px; border-radius: 11px; background: #f2f4ef; }
.set-index { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: white; color: var(--muted); font-size: 10px; font-weight: 800; }
.set-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: 12px; font-weight: 730; overflow-wrap: anywhere; }
.set-meta { color: var(--muted); font-size: 10px; font-weight: 550; }
.set-actions { display: flex; align-items: center; gap: 4px; }
.set-actions .button { min-height: 44px; padding: 0 8px; }
.set-entry { display: grid; gap: 12px; margin-top: 13px; padding: 13px; border: 1px dashed #bdc9be; border-radius: 13px; background: #fafbf7; }
.set-entry-title { margin: 0; font-size: 12px; font-weight: 800; }
.exercise-history { display: grid; gap: 8px; }
.exercise-history summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--green); font-size: 11px; font-weight: 750; }
.exercise-history summary::-webkit-details-marker { display: none; }
.exercise-history summary::after { content: "+"; margin-left: auto; color: var(--green); font-size: 17px; }
.exercise-history[open] summary::after { content: "−"; }
.exercise-note { display: grid; gap: 6px; margin-top: 12px; }
.availability-box { margin-top: 10px; padding: 12px; border: 1px solid #e8d8ae; border-radius: 12px; background: #fbf5e5; color: #5f4b22; font-size: 12px; line-height: 1.5; }
.availability-box strong { display: block; margin-bottom: 3px; }
.session-note-area { display: grid; gap: 7px; margin-top: 13px; }
.timer-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 15px; border-radius: 14px; background: var(--ink); color: #fffefa; }
.timer-readout { display: flex; align-items: baseline; gap: 8px; }
.timer-readout strong { font-family: Georgia, serif; font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.timer-readout span { color: #bac9bd; font-size: 11px; }
.timer-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.timer-panel .button { min-height: 44px; background: transparent; border-color: #5f7267; color: #fffefa; }
.timer-panel .button:hover { background: #30453a; }
.timer-panel .button-primary { background: #76a987; border-color: #76a987; color: #14251b; }
.history-detail { display: grid; gap: 13px; }
.history-exercise { padding: 12px 0; border-top: 1px solid var(--line); }
.history-exercise:first-child { border-top: 0; }
.history-exercise-title { margin: 0 0 8px; font-size: 13px; font-weight: 800; }
.history-set-lines { display: grid; gap: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.export-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.coach-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--green); color: #f8fbf8; }
.coach-banner strong { display: block; font-size: 13px; }
.coach-banner span { display: block; margin-top: 3px; color: #d4e4d9; font-size: 11px; }
.context-preview { max-height: 340px; overflow: auto; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f3f4ef; color: #435249; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-thread { display: grid; gap: 10px; }
.chat-message { max-width: 90%; padding: 12px 14px; border-radius: 15px; background: #f0f2ec; color: var(--ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.chat-message.user { justify-self: end; border-bottom-right-radius: 5px; background: var(--green); color: white; }
.chat-message.demo { justify-self: start; border-bottom-left-radius: 5px; }
.chat-message-label { display: block; margin-bottom: 4px; color: inherit; opacity: .7; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.suggestion-row { display: flex; flex-wrap: wrap; gap: 7px; }
.proposal-card { display: grid; gap: 12px; padding: 14px; border: 1px solid #cad9cd; border-radius: 14px; background: #f2f7f2; }
.proposal-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.proposal-side { min-width: 0; padding: 10px; border-radius: 10px; background: white; }
.proposal-side.after { border: 1px solid #b7d0bc; }
.proposal-side strong { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.proposal-side p { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.demo-note { color: var(--muted); font-size: 11px; line-height: 1.5; }

.plan-list { display: grid; gap: 8px; }
.plan-day { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.plan-day summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; cursor: pointer; list-style: none; font-weight: 740; font-size: 13px; }
.plan-day summary::-webkit-details-marker { display: none; }
.plan-day summary::after { content: "+"; color: var(--green); font-size: 18px; }
.plan-day[open] summary::after { content: "−"; }
.plan-day-content { padding: 0 13px 13px; }
.plan-slot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 10px 0; border-top: 1px solid #eceee8; }
.plan-slot-name { font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.plan-slot-target { color: var(--muted); font-size: 11px; text-align: right; }
.plan-slot-meta { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.45; }
.schedule-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.schedule-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 99px; background: #eff2ed; color: #49584f; font-size: 10px; font-weight: 740; }
.schedule-pill.rest { background: var(--amber-soft); color: #77591a; }
.import-panel { display: grid; gap: 11px; }
.import-preview { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f4f5f0; }
.import-preview h3 { margin: 0 0 8px; font-size: 13px; }
.warning-list { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 18px; color: #76591e; font-size: 11px; line-height: 1.45; }
.error-list { color: #8f3927; }

.site-footer { padding: 0 16px max(18px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 10px; line-height: 1.55; }
.footer-inner { border-top: 1px solid var(--line); padding-top: 13px; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.loading-card { width: min(100%, 420px); padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.loading-card h1 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 25px; }
.loading-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.onboarding-content { display: grid; gap: 16px; max-width: 760px; }
.onboarding-content .lede { margin-top: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 720px) {
  .site-header { padding-inline: 26px; }
  .brand-row { padding-top: 2px; }
  .main-content { padding: 36px 26px 56px; }
  .grid-main { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: start; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-main { grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); }
  .workout-grid { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); align-items: start; }
  .exercise-list { grid-column: 1; }
  .workout-side { grid-column: 2; grid-row: 1; position: sticky; top: 128px; }
  .body-figures { gap: 18px; }
  .body-svg { width: min(100%, 235px); }
  .site-footer { padding-inline: 26px; }
}

@media (min-width: 1000px) {
  .site-header { padding-inline: max(26px, calc((100vw - 1160px) / 2)); }
  .main-content { padding-top: 42px; }
  .card { padding: 22px; }
  .exercise-card { padding: 19px; }
  .overview-main { grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); }
}

@media (max-width: 420px) {
  .site-header { padding-inline: 12px; }
  .main-content { padding: 22px 12px 34px; }
  .brand-name { font-size: 17px; }
  .brand-subtitle { font-size: 9px; }
  .local-status { font-size: 10px; }
  .card { padding: 15px; border-radius: 16px; }
  .view-header { align-items: flex-start; flex-direction: column; }
  .view-actions { justify-content: flex-start; }
  .toolbar-row { align-items: flex-start; flex-direction: column; }
  .date-controls { width: 100%; }
  .date-controls input { flex: 1; width: auto; min-width: 120px; }
  .field-grid-3 { grid-template-columns: 1fr 1fr; }
  .proposal-diff { grid-template-columns: 1fr; }
  .session-row-actions { width: 100%; }
  .session-row-actions .button { flex: 1; }
  .exercise-name { font-size: 19px; }
  .exercise-card { padding: 13px; }
  .exercise-heading { column-gap: 8px; }
  .exercise-heading .view-actions { flex-basis: 100%; justify-content: flex-start; }
  .exercise-target { column-gap: 5px; }
  .target-chip { flex: 0 1 auto; }
  .set-row { grid-template-columns: auto minmax(0, 1fr); }
  .set-actions { grid-column: 2; justify-self: start; }
  .timer-panel { align-items: flex-start; }
  .timer-controls { width: 100%; }
  .timer-controls .button { flex: 1; }
  .body-svg { width: min(100%, 170px); }
  .legend { gap: 7px 9px; }
  .legend-item { font-size: 9px; }
  .runtime-status { justify-content: flex-start; }
}
