:root {
  --canvas: #f5f6f7;
  --surface: #ffffff;
  --surface-2: #f0f2f4;
  --surface-3: #e8ebee;
  --ink: #15171a;
  --ink-soft: #58606a;
  --ink-faint: #8a929c;
  --border: #e0e4e8;
  --border-strong: #cdd3d9;
  --accent: #f15a29;
  --accent-strong: #d94416;
  --accent-soft: #fff0e9;
  --success: #24835a;
  --success-soft: #e7f5ee;
  --water: #2b8298;
  --water-soft: #e9f5f7;
  --warning: #b77813;
  --warning-soft: #fff5df;
  --danger: #c84139;
  --danger-soft: #fcebea;
  --shadow: 0 16px 44px rgba(15, 22, 30, .07);
  --shadow-soft: 0 8px 24px rgba(15, 22, 30, .045);
  --sidebar-width: 232px;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

html[data-theme="dark"] {
  --canvas: #101214;
  --surface: #171a1d;
  --surface-2: #202428;
  --surface-3: #292e33;
  --ink: #f7f8f9;
  --ink-soft: #b0b7bf;
  --ink-faint: #78818b;
  --border: #2c3237;
  --border-strong: #3a4249;
  --accent: #ff6a36;
  --accent-strong: #ff8058;
  --accent-soft: #332019;
  --success: #65c597;
  --success-soft: #173126;
  --water: #5bb3c8;
  --water-soft: #193038;
  --warning: #f0b451;
  --warning-soft: #382b15;
  --danger: #ff756e;
  --danger-soft: #3c1d1b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 26px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
svg { display: block; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.accent-text { color: var(--accent-strong); }
.success-text { color: var(--success); }
.water-text { color: var(--water); }
.danger-text { color: var(--danger); }

/* Buttons */
.button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.98); }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--ink); color: var(--surface); box-shadow: var(--shadow-soft); }
.button-primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--accent)); }
.button-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent); }
.button-accent:hover { background: var(--accent-strong); }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.button-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }
.button-soft { background: var(--surface-2); color: var(--ink); }
.button-soft:hover { background: var(--surface-3); }
.button-ghost { background: transparent; color: var(--ink-soft); border-color: transparent; }
.button-ghost:hover { background: var(--surface-2); color: var(--ink); }
.button-danger { background: var(--danger); color: #fff; }
.button-full { width: 100%; }
.button-sm { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 12px; }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.icon-button:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); }
.icon-button .icon { width: 18px; height: 18px; }
.icon-button.small { width: 36px; height: 36px; border-radius: 11px; }

/* Shared shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 18px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 8px; font-weight: 900; letter-spacing: -.04em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 950; position: relative; overflow: hidden; }
.brand-mark::after { content: ""; width: 16px; height: 3px; border-radius: 999px; background: var(--accent); position: absolute; right: -4px; bottom: 6px; transform: rotate(-45deg); }
.brand-name { font-size: 15px; line-height: 1.08; }
.brand-name span { color: var(--accent); }
.nav-label { margin: 30px 12px 10px; color: var(--ink-faint); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item .icon { width: 19px; height: 19px; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); transform: translateX(2px); }
.nav-item.active { background: var(--ink); color: var(--surface); box-shadow: var(--shadow-soft); }
.nav-item.active::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.sidebar-spacer { flex: 1; }
.side-coach { border: 1px solid var(--border); background: var(--canvas); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; }
.side-coach-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.coach-avatar { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.coach-avatar .icon { width: 17px; height: 17px; }
.side-coach strong { font-size: 13px; }
.side-coach p { margin: 0 0 11px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.side-coach a { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 850; color: var(--accent-strong); }
.profile-mini { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 13px; }
.profile-mini:hover { background: var(--surface-2); }
.avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, #2d3136, #111315); color: #fff; font-size: 12px; font-weight: 850; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 13px; }
.profile-copy span { color: var(--ink-faint); font-size: 11px; margin-top: 2px; }
.profile-mini > .icon { width: 17px; height: 17px; color: var(--ink-faint); }
.workspace { min-width: 0; }
.topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  backdrop-filter: blur(18px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mobile-brand { display: none; }
.page-title { min-width: 0; }
.page-title small { display: block; color: var(--ink-faint); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.page-title strong { display: block; margin-top: 4px; font-size: 17px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.content { max-width: 1500px; margin: 0 auto; padding: 30px 30px 110px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.06; letter-spacing: -.045em; }
.page-head p { margin: 9px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.page-head-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; }
.section-head h2, .section-head h3 { margin: 0; letter-spacing: -.025em; }
.section-head h2 { font-size: 18px; }
.section-head h3 { font-size: 15px; }
.section-head p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.section-link:hover { color: var(--accent-strong); }
.section-link .icon { width: 15px; height: 15px; }

/* Cards and utilities */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-pad { padding: 20px; }
.card-pad-lg { padding: 24px; }
.card-hover { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.pill.accent { background: var(--accent-soft); color: var(--accent-strong); }
.pill.success { background: var(--success-soft); color: var(--success); }
.pill.water { background: var(--water-soft); color: var(--water); }
.pill.warning { background: var(--warning-soft); color: var(--warning); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.divider { height: 1px; background: var(--border); }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress-fill { height: 100%; width: var(--value, 0%); background: var(--accent); border-radius: inherit; }
.progress-fill.success { background: var(--success); }
.progress-fill.water { background: var(--water); }
.progress-fill.warning { background: var(--warning); }
.value-pair strong { display: block; font-size: 24px; letter-spacing: -.04em; }
.value-pair span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 11px; font-weight: 700; }
.empty-state { padding: 30px 22px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state .empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.empty-state h3 { margin: 0; font-size: 17px; }
.empty-state p { max-width: 520px; margin: 8px auto 16px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-strong); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.kicker .icon { width: 15px; height: 15px; }
.metric { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.metric-icon.accent { background: var(--accent-soft); color: var(--accent-strong); }
.metric-icon.success { background: var(--success-soft); color: var(--success); }
.metric-icon.water { background: var(--water-soft); color: var(--water); }
.metric-icon.warning { background: var(--warning-soft); color: var(--warning); }
.metric-label { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.metric-value { margin-top: 13px; font-size: 25px; font-weight: 900; letter-spacing: -.045em; }
.metric-note { margin-top: 4px; color: var(--ink-faint); font-size: 11px; }

/* Dashboard */
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dashboard-head h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.06; letter-spacing: -.045em; }
.dashboard-head p { margin: 9px 0 0; color: var(--ink-soft); font-size: 14px; }
.week-status { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.week-status span { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px var(--success-soft); }
.coach-brief { position: relative; overflow: hidden; min-height: 244px; border-radius: var(--radius-xl); background: var(--ink); color: var(--surface); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); box-shadow: var(--shadow); }
.coach-brief::after { content: ""; position: absolute; width: 360px; height: 360px; right: -155px; bottom: -240px; border: 72px solid color-mix(in srgb, var(--accent) 62%, transparent); border-radius: 50%; opacity: .62; pointer-events: none; }
.brief-copy { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.brief-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: color-mix(in srgb, var(--surface) 65%, transparent); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.brief-kicker span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--surface) 10%, transparent); color: var(--accent); }
.brief-kicker .icon { width: 16px; height: 16px; }
.brief-copy h2 { max-width: 680px; margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.08; letter-spacing: -.04em; }
.brief-copy p { max-width: 680px; margin: 14px 0 22px; color: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 14px; line-height: 1.7; }
.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.brief-actions .button-primary { background: var(--accent); color: #fff; }
.brief-actions .button-secondary { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 24%, transparent); }
.brief-actions .button-secondary:hover { background: color-mix(in srgb, var(--surface) 9%, transparent); }
.brief-session { margin: 18px 18px 18px 0; padding: 20px; border-radius: 17px; align-self: stretch; background: color-mix(in srgb, var(--surface) 8%, transparent); border: 1px solid color-mix(in srgb, var(--surface) 13%, transparent); position: relative; z-index: 1; display: flex; flex-direction: column; }
.session-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.session-head small { color: color-mix(in srgb, var(--surface) 55%, transparent); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.session-head h3 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.02em; }
.session-time { padding: 7px 9px; border-radius: 9px; background: color-mix(in srgb, var(--surface) 10%, transparent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.exercise-mini-list { display: grid; gap: 11px; margin-top: 17px; }
.exercise-mini { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.exercise-number { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 9%, transparent); color: var(--accent); font-size: 11px; font-weight: 900; }
.exercise-mini strong { display: block; font-size: 12px; }
.exercise-mini span { display: block; margin-top: 2px; color: color-mix(in srgb, var(--surface) 52%, transparent); font-size: 10px; }
.exercise-mini > small { color: color-mix(in srgb, var(--surface) 65%, transparent); font-size: 10px; font-weight: 750; }
.session-progress { margin-top: auto; padding-top: 18px; }
.session-progress-copy { display: flex; justify-content: space-between; margin-bottom: 8px; color: color-mix(in srgb, var(--surface) 63%, transparent); font-size: 10px; font-weight: 800; }
.session-progress .progress-track { background: color-mix(in srgb, var(--surface) 13%, transparent); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; margin-top: 16px; }
.dashboard-main { display: grid; gap: 16px; }
.dashboard-side { display: grid; gap: 16px; align-content: start; }
.today-card { padding: 22px; }
.today-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); gap: 18px; }
.workout-focus { padding: 22px; border-radius: 16px; background: var(--surface-2); display: flex; flex-direction: column; justify-content: space-between; min-height: 230px; }
.workout-focus-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.workout-focus h3 { margin: 14px 0 6px; font-size: 22px; letter-spacing: -.04em; }
.workout-focus p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.workout-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 18px 0; }
.workout-meta span { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.workout-meta .icon { width: 15px; height: 15px; }
.today-nutrition { display: grid; gap: 12px; }
.nutrition-summary { padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.nutrition-summary strong { font-size: 28px; letter-spacing: -.04em; }
.nutrition-summary small { display: block; color: var(--ink-faint); margin-top: 4px; font-size: 11px; }
.macro-bars { display: grid; gap: 11px; margin-top: 16px; }
.macro-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 11px; }
.macro-row span { color: var(--ink-soft); font-weight: 750; }
.macro-row strong { font-size: 11px; }
.quick-log-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-log { min-height: 88px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.quick-log:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); }
.quick-log .quick-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.quick-log .quick-icon.accent { background: var(--accent-soft); color: var(--accent-strong); }
.quick-log .quick-icon.water { background: var(--water-soft); color: var(--water); }
.quick-log .quick-icon.success { background: var(--success-soft); color: var(--success); }
.quick-log strong { font-size: 12px; }
.habit-list, .activity-list { display: grid; gap: 11px; }
.habit-item, .activity-item { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 13px; background: var(--surface-2); }
.habit-icon, .activity-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: var(--ink); flex: 0 0 auto; }
.habit-copy, .activity-copy { min-width: 0; flex: 1; }
.habit-copy strong, .activity-copy strong { display: block; font-size: 12px; }
.habit-copy span, .activity-copy span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 10px; }
.habit-action { font-size: 11px; font-weight: 850; color: var(--accent-strong); }
.checkin-card { padding: 20px; background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 22%, var(--border)); }
.checkin-card h3 { margin: 0; font-size: 16px; }
.checkin-card p { margin: 7px 0 15px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.weight-chart { padding: 20px; }
.chart-wrap { position: relative; height: 180px; margin-top: 10px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: var(--border); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaFill); opacity: .22; }
.chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.chart-label { fill: var(--ink-faint); font-size: 9px; font-family: inherit; }
.insight { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.insight .icon { width: 17px; height: 17px; color: var(--accent); margin-top: 1px; }

/* Plan and workout */
.segmented { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--surface-2); gap: 3px; }
.segmented button, .segmented a { min-height: 36px; padding: 0 13px; border-radius: 10px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.segmented button.active, .segmented a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.plan-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 16px; }
.plan-primary { padding: 26px; background: var(--ink); color: var(--surface); border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.plan-primary::after { content: ""; position: absolute; right: -80px; top: -90px; width: 220px; height: 220px; border-radius: 50%; border: 46px solid color-mix(in srgb, var(--accent) 70%, transparent); }
.plan-primary > * { position: relative; z-index: 1; }
.plan-primary h2 { max-width: 620px; margin: 15px 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.plan-primary p { max-width: 640px; margin: 0 0 22px; color: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 13px; line-height: 1.65; }
.plan-summary { padding: 22px; }
.plan-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.plan-summary-item { padding: 14px; border-radius: 13px; background: var(--surface-2); }
.plan-summary-item strong { display: block; font-size: 18px; }
.plan-summary-item span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day-card { padding: 14px 10px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); text-align: center; cursor: pointer; transition: .18s ease; }
.day-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.day-card.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.day-card.done { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, var(--border)); }
.day-card small { display: block; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.day-card strong { display: block; margin-top: 6px; font-size: 14px; }
.day-card span { display: block; margin-top: 5px; font-size: 9px; color: inherit; opacity: .7; }
.exercise-list { display: grid; gap: 10px; }
.exercise-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.exercise-row-number { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-strong); font-size: 12px; font-weight: 900; }
.exercise-row strong { display: block; font-size: 13px; }
.exercise-row p { margin: 4px 0 0; color: var(--ink-faint); font-size: 10px; }
.exercise-row-meta { text-align: right; }
.exercise-row-meta strong { font-size: 12px; }
.exercise-row-meta span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }
.plan-week { display: grid; gap: 12px; }
.plan-day { overflow: hidden; }
.plan-day-head { width: 100%; padding: 17px 18px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; text-align: left; }
.plan-day-head:hover { background: var(--surface-2); }
.plan-day-head strong { font-size: 14px; }
.plan-day-head span { color: var(--ink-faint); font-size: 11px; }
.plan-day-body { display: none; padding: 0 18px 18px; }
.plan-day.open .plan-day-body { display: block; }
.plan-day.open .plan-day-head .chevron { transform: rotate(180deg); }
.chevron { transition: transform .18s ease; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 16px; }
.setup-form { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.input, .select, .textarea { width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0 13px; outline: 0; transition: border-color .18s ease, box-shadow .18s ease; }
.textarea { min-height: 110px; padding: 12px 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 11%, transparent); }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { min-height: 46px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink-soft); font-size: 11px; font-weight: 800; cursor: pointer; }
.choice input:checked + label { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.setup-aside { padding: 22px; display: flex; flex-direction: column; }
.setup-aside h3 { margin: 0; font-size: 17px; }
.setup-aside p { color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.setup-list { display: grid; gap: 11px; margin: 8px 0 20px; }
.setup-list-item { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.setup-list-item .icon { width: 16px; height: 16px; color: var(--success); margin-top: 1px; }

.active-workout-shell { min-height: 100vh; background: var(--canvas); display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.workout-stage { min-width: 0; padding: 26px 30px 100px; }
.workout-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.workout-topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.workout-topbar p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.workout-progress { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.workout-progress strong { font-size: 12px; }
.workout-progress .progress-track { flex: 1; }
.current-exercise { padding: 26px; }
.exercise-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.exercise-title-row h2 { margin: 6px 0 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.04em; }
.exercise-note { margin: 14px 0 22px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.set-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.set-table th { padding: 0 10px 5px; text-align: left; color: var(--ink-faint); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.set-table td { padding: 10px; background: var(--surface-2); }
.set-table td:first-child { border-radius: 12px 0 0 12px; }
.set-table td:last-child { border-radius: 0 12px 12px 0; }
.set-table input { width: 72px; min-height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: center; }
.set-check { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.set-check.done { background: var(--success); border-color: var(--success); color: #fff; }
.exercise-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.workout-rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 18px; background: var(--surface); border-left: 1px solid var(--border); }
.rest-timer { padding: 18px; border-radius: 16px; background: var(--ink); color: var(--surface); }
.rest-timer small { color: color-mix(in srgb, var(--surface) 60%, transparent); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 850; }
.rest-time { margin: 9px 0 12px; font-size: 34px; font-weight: 900; letter-spacing: -.05em; }
.workout-queue { margin-top: 18px; }
.queue-item { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 13px; color: var(--ink-soft); }
.queue-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.queue-item.done { color: var(--success); }
.queue-index { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-size: 10px; font-weight: 900; }
.queue-copy strong { display: block; font-size: 11px; }
.queue-copy span { display: block; margin-top: 3px; font-size: 9px; color: inherit; opacity: .72; }

/* Nutrition */
.nutrition-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 16px; }
.nutrition-main, .nutrition-side { display: grid; gap: 16px; align-content: start; }
.nutrition-overview { padding: 22px; }
.calorie-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.calorie-stat { padding: 15px; border-radius: 14px; background: var(--surface-2); }
.calorie-stat strong { display: block; font-size: 21px; letter-spacing: -.04em; }
.calorie-stat span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.meal-diary { display: grid; gap: 10px; }
.meal-card { overflow: hidden; }
.meal-head { width: 100%; min-height: 64px; padding: 0 17px; background: var(--surface); display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; }
.meal-head:hover { background: var(--surface-2); }
.meal-time { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-strong); }
.meal-time .icon { width: 18px; height: 18px; }
.meal-title { min-width: 0; flex: 1; }
.meal-title strong { display: block; font-size: 13px; }
.meal-title span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 10px; }
.meal-total { text-align: right; }
.meal-total strong { display: block; font-size: 12px; }
.meal-total span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 9px; }
.meal-body { display: none; padding: 0 17px 16px; }
.meal-card.open .meal-body { display: block; }
.meal-card.open .meal-head .chevron { transform: rotate(180deg); }
.food-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.food-row:last-child { border-bottom: 0; }
.food-row strong { display: block; font-size: 12px; }
.food-row span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 9px; }
.food-macros { text-align: right; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.add-food-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.add-food-row p { margin: 0; color: var(--ink-faint); font-size: 10px; }
.date-control { display: flex; align-items: center; gap: 8px; }
.date-control strong { min-width: 120px; text-align: center; font-size: 12px; }
.recent-foods { padding: 20px; }
.recent-list { display: grid; gap: 8px; margin-top: 14px; }
.recent-item { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 12px; background: var(--surface-2); }
.recent-item .recent-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent-strong); }
.recent-copy { min-width: 0; flex: 1; }
.recent-copy strong { display: block; font-size: 11px; }
.recent-copy span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 9px; }
.weight-card { padding: 20px; }
.weight-input-row { display: flex; gap: 9px; margin-top: 13px; }
.weight-input-row .input { min-width: 0; }

/* Log hub */
.log-hero { padding: 26px; background: var(--ink); color: var(--surface); border-radius: var(--radius-xl); }
.log-hero h2 { margin: 10px 0 8px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.log-hero p { margin: 0; color: color-mix(in srgb, var(--surface) 68%, transparent); font-size: 13px; line-height: 1.65; }
.log-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.log-option { min-height: 190px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; cursor: pointer; }
.log-option .log-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.log-option h3 { margin: 22px 0 7px; font-size: 17px; }
.log-option p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.log-option .section-link { margin-top: 18px; }

/* Progress */
.progress-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 16px; }
.progress-score { padding: 26px; background: var(--ink); color: var(--surface); border-radius: var(--radius-xl); }
.progress-score-number { margin-top: 20px; font-size: clamp(54px, 8vw, 88px); font-weight: 950; letter-spacing: -.075em; line-height: .9; }
.progress-score-number span { font-size: 20px; color: color-mix(in srgb, var(--surface) 55%, transparent); }
.progress-score p { max-width: 560px; margin: 18px 0 0; color: color-mix(in srgb, var(--surface) 68%, transparent); font-size: 13px; line-height: 1.65; }
.progress-summary { padding: 22px; }
.progress-breakdown { display: grid; gap: 14px; margin-top: 17px; }
.progress-breakdown-row { display: grid; grid-template-columns: 95px minmax(0, 1fr) auto; align-items: center; gap: 11px; font-size: 11px; }
.progress-breakdown-row span { color: var(--ink-soft); }
.progress-breakdown-row strong { font-size: 11px; }
.stat-table { width: 100%; border-collapse: collapse; }
.stat-table th, .stat-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.stat-table th { color: var(--ink-faint); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.stat-table td { font-size: 11px; }
.stat-table td strong { font-size: 12px; }

/* Coach */
.chat-shell { height: calc(100vh - 76px); min-height: 620px; display: grid; grid-template-columns: 270px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-soft); }
.chat-history { min-width: 0; padding: 16px; border-right: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; }
.chat-history .button { margin-bottom: 14px; }
.history-label { margin: 10px 8px 8px; color: var(--ink-faint); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.thread-list { display: grid; gap: 5px; overflow-y: auto; }
.thread { padding: 11px; border-radius: 11px; color: var(--ink-soft); cursor: pointer; }
.thread:hover { background: var(--surface); color: var(--ink); }
.thread.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.thread strong { display: block; font-size: 11px; }
.thread span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }
.chat-main { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.chat-head { min-height: 72px; padding: 0 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-head-copy strong { display: block; font-size: 14px; }
.chat-head-copy span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }
.chat-messages { overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.chat-welcome { max-width: 680px; margin: auto; text-align: center; padding: 40px 20px; }
.chat-welcome .coach-avatar { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 16px; }
.chat-welcome .coach-avatar .icon { width: 25px; height: 25px; }
.chat-welcome h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.chat-welcome p { margin: 10px auto 20px; max-width: 560px; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prompt-card { min-height: 86px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; }
.prompt-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.prompt-card strong { display: block; font-size: 11px; }
.prompt-card span { display: block; margin-top: 5px; color: var(--ink-faint); font-size: 9px; line-height: 1.45; }
.message { max-width: 720px; display: flex; gap: 11px; }
.message.user { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: 0 0 auto; }
.message-bubble { padding: 13px 15px; border-radius: 15px; background: var(--surface-2); font-size: 12px; line-height: 1.65; }
.message.user .message-bubble { background: var(--ink); color: var(--surface); }
.chat-composer { padding: 14px 18px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.composer-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 8px 8px 8px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.composer-box textarea { min-height: 42px; max-height: 140px; padding: 11px 0; border: 0; background: transparent; resize: none; outline: 0; }
.composer-note { margin: 7px 2px 0; color: var(--ink-faint); font-size: 9px; text-align: center; }

/* Account, subscription */
.account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
.account-menu { padding: 12px; align-self: start; position: sticky; top: 100px; }
.account-menu a { min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border-radius: 11px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.account-menu a:hover { background: var(--surface-2); color: var(--ink); }
.account-menu a.active { background: var(--ink); color: var(--surface); }
.account-content { display: grid; gap: 16px; }
.profile-header { padding: 22px; display: flex; align-items: center; gap: 16px; }
.profile-header .avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 18px; }
.profile-header h2 { margin: 0; font-size: 21px; }
.profile-header p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; font-size: 12px; }
.setting-row span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.switch { width: 46px; height: 26px; padding: 3px; border-radius: 999px; background: var(--surface-3); cursor: pointer; transition: background .18s ease; }
.switch::after { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-soft); transition: transform .18s ease; }
.switch.active { background: var(--accent); }
.switch.active::after { transform: translateX(20px); }
.plan-price { padding: 26px; background: var(--ink); color: var(--surface); border-radius: var(--radius-xl); }
.plan-price h2 { margin: 10px 0 4px; font-size: 24px; }
.plan-price .price { margin-top: 20px; font-size: 44px; font-weight: 950; letter-spacing: -.055em; }
.plan-price .price span { font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--surface) 58%, transparent); }
.feature-list { display: grid; gap: 11px; margin: 20px 0; }
.feature-item { display: flex; gap: 10px; color: color-mix(in srgb, var(--surface) 72%, transparent); font-size: 11px; }
.feature-item .icon { width: 16px; height: 16px; color: var(--success); }

/* Public site */
.public-body { background: var(--surface); }
.public-wrap { max-width: 1220px; margin: 0 auto; padding: 0 24px; }
.public-header { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.public-nav { display: flex; align-items: center; gap: 24px; }
.public-nav a { color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.public-nav a:hover { color: var(--ink); }
.public-actions { display: flex; align-items: center; gap: 8px; }
.public-hero { min-height: calc(100vh - 78px); padding: 70px 0 90px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr); align-items: center; gap: 54px; }
.public-hero-copy h1 { max-width: 720px; margin: 18px 0 18px; font-size: clamp(48px, 6vw, 82px); line-height: .97; letter-spacing: -.065em; }
.public-hero-copy h1 em { color: var(--accent); font-style: normal; }
.public-hero-copy > p { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row .icon { width: 15px; height: 15px; color: var(--success); }
.hero-product { position: relative; min-height: 570px; }
.hero-phone { position: absolute; width: 330px; right: 20px; top: 25px; padding: 18px; border: 10px solid var(--ink); border-radius: 34px; background: var(--canvas); box-shadow: 0 34px 80px rgba(15, 22, 30, .18); transform: rotate(2deg); }
.hero-phone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.hero-phone-top strong { font-size: 12px; }
.hero-phone-top span { color: var(--ink-faint); font-size: 9px; }
.phone-brief { padding: 18px; border-radius: 17px; background: var(--ink); color: var(--surface); }
.phone-brief small { color: var(--accent); font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.phone-brief h3 { margin: 9px 0 8px; font-size: 18px; line-height: 1.15; letter-spacing: -.035em; }
.phone-brief p { margin: 0; color: color-mix(in srgb, var(--surface) 65%, transparent); font-size: 9px; line-height: 1.55; }
.phone-card { padding: 14px; margin-top: 11px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.phone-card strong { display: block; font-size: 11px; }
.phone-card span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 8px; }
.phone-card .progress-track { margin-top: 10px; height: 6px; }
.hero-note { position: absolute; left: 0; bottom: 58px; width: 235px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transform: rotate(-3deg); }
.hero-note strong { display: block; font-size: 13px; }
.hero-note p { margin: 7px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.hero-note::before { content: ""; position: absolute; width: 44px; height: 4px; border-radius: 999px; background: var(--accent); top: -2px; left: 18px; }
.public-section { padding: 96px 0; }
.public-section.alt { background: var(--canvas); }
.public-section-head { max-width: 740px; margin-bottom: 38px; }
.public-section-head h2 { margin: 12px 0 12px; font-size: clamp(34px, 4vw, 56px); line-height: 1.02; letter-spacing: -.055em; }
.public-section-head p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.public-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.public-feature { min-height: 300px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.public-feature .feature-number { color: var(--ink-faint); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.public-feature h3 { margin: 0 0 9px; font-size: 23px; letter-spacing: -.04em; }
.public-feature p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.public-feature .feature-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.day-story { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.day-story-copy { position: sticky; top: 110px; }
.day-story-copy h2 { margin: 12px 0 12px; font-size: clamp(36px, 4vw, 58px); line-height: 1; letter-spacing: -.055em; }
.day-story-copy p { color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.timeline { display: grid; gap: 14px; }
.timeline-item { padding: 22px; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 18px; }
.timeline-time { color: var(--ink-faint); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.timeline-item h3 { margin: 0 0 7px; font-size: 18px; }
.timeline-item p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.public-cta { padding: 68px; border-radius: 28px; background: var(--ink); color: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; position: relative; }
.public-cta::after { content: ""; position: absolute; width: 280px; height: 280px; right: -95px; top: -110px; border-radius: 50%; border: 58px solid color-mix(in srgb, var(--accent) 66%, transparent); }
.public-cta > * { position: relative; z-index: 1; }
.public-cta h2 { max-width: 650px; margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1; letter-spacing: -.055em; }
.public-cta p { max-width: 530px; margin: 14px 0 0; color: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 13px; line-height: 1.65; }
.public-footer { padding: 50px 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { max-width: 340px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.footer-col strong { display: block; margin-bottom: 12px; font-size: 11px; }
.footer-col a { display: block; margin: 9px 0; color: var(--ink-soft); font-size: 11px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--ink-faint); font-size: 10px; }

/* Auth + onboarding */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); background: var(--surface); }
.auth-story { padding: 44px; background: var(--ink); color: var(--surface); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-story::after { content: ""; width: 420px; height: 420px; border-radius: 50%; border: 88px solid color-mix(in srgb, var(--accent) 68%, transparent); position: absolute; right: -190px; bottom: -220px; }
.auth-story .brand { color: var(--surface); padding: 0; }
.auth-story-main { margin: auto 0; max-width: 720px; position: relative; z-index: 1; }
.auth-story h1 { margin: 18px 0 14px; font-size: clamp(42px, 5vw, 72px); line-height: .98; letter-spacing: -.06em; }
.auth-story p { max-width: 620px; color: color-mix(in srgb, var(--surface) 66%, transparent); font-size: 14px; line-height: 1.75; }
.auth-points { display: grid; gap: 12px; margin-top: 26px; }
.auth-point { display: flex; align-items: center; gap: 10px; color: color-mix(in srgb, var(--surface) 78%, transparent); font-size: 11px; }
.auth-point .icon { color: var(--accent); }
.auth-panel { display: grid; place-items: center; padding: 40px; }
.auth-card { width: min(100%, 470px); }
.auth-card h2 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.auth-card > p { margin: 9px 0 24px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 14px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 48px; }
.password-toggle { position: absolute; right: 5px; top: 5px; }
.auth-foot { margin-top: 18px; text-align: center; color: var(--ink-soft); font-size: 11px; }
.auth-foot a { color: var(--accent-strong); font-weight: 850; }
.onboarding-shell { min-height: 100vh; background: var(--canvas); display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.onboarding-rail { position: sticky; top: 0; height: 100vh; padding: 28px 22px; background: var(--ink); color: var(--surface); display: flex; flex-direction: column; }
.onboarding-rail .brand { padding: 0; color: var(--surface); }
.onboarding-progress-copy { margin-top: 54px; }
.onboarding-progress-copy small { color: color-mix(in srgb, var(--surface) 50%, transparent); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 850; }
.onboarding-progress-copy h2 { margin: 10px 0 8px; font-size: 25px; letter-spacing: -.04em; }
.onboarding-progress-copy p { margin: 0; color: color-mix(in srgb, var(--surface) 60%, transparent); font-size: 11px; line-height: 1.6; }
.step-list { display: grid; gap: 8px; margin-top: 26px; }
.step-item { display: flex; align-items: center; gap: 11px; color: color-mix(in srgb, var(--surface) 47%, transparent); }
.step-item .step-dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--surface) 16%, transparent); font-size: 10px; font-weight: 900; }
.step-item strong { font-size: 11px; }
.step-item.active { color: var(--surface); }
.step-item.active .step-dot { background: var(--accent); border-color: var(--accent); }
.step-item.done { color: color-mix(in srgb, var(--surface) 75%, transparent); }
.step-item.done .step-dot { background: var(--success); border-color: var(--success); }
.onboarding-main { display: grid; place-items: center; padding: 38px; }
.onboarding-card { width: min(100%, 820px); }
.onboarding-step { display: none; }
.onboarding-step.active { display: block; }
.onboarding-step h1 { margin: 0; font-size: clamp(32px, 4vw, 50px); letter-spacing: -.05em; }
.onboarding-step > p { max-width: 650px; margin: 12px 0 28px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.onboarding-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.goal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.goal-card { position: relative; }
.goal-card input { position: absolute; opacity: 0; }
.goal-card label { min-height: 160px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.goal-card label:hover { border-color: var(--border-strong); }
.goal-card input:checked + label { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.goal-card .goal-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-strong); }
.goal-card strong { font-size: 15px; }
.goal-card span { color: var(--ink-faint); font-size: 10px; line-height: 1.5; }

/* Modal and sheets */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(10, 13, 16, .55); backdrop-filter: blur(8px); }
.modal-backdrop.open { display: grid; }
.modal { width: min(100%, 640px); max-height: min(860px, calc(100vh - 40px)); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 34px 90px rgba(0,0,0,.28); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.modal.wide { width: min(100%, 860px); }
.modal-head { min-height: 72px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.modal-head strong { display: block; font-size: 16px; }
.modal-head span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { min-height: 72px; padding: 12px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--border); background: var(--surface); }
.food-search-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.food-results { display: grid; gap: 8px; margin-top: 16px; }
.food-result { padding: 13px; border: 1px solid var(--border); border-radius: 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; cursor: pointer; }
.food-result:hover { background: var(--surface-2); border-color: var(--border-strong); }
.food-result.selected { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.food-result strong { display: block; font-size: 12px; }
.food-result span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }
.food-result-macros { text-align: right; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.serving-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.macro-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.macro-preview-item { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.macro-preview-item strong { display: block; font-size: 16px; }
.macro-preview-item span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 9px; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 95; display: none; background: rgba(10, 13, 16, .45); }
.sheet-backdrop.open { display: block; }
.action-sheet { position: fixed; left: 50%; bottom: 24px; z-index: 96; width: min(460px, calc(100% - 32px)); transform: translate(-50%, calc(100% + 60px)); padding: 16px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.28); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.action-sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 14px; border-radius: 999px; background: var(--border-strong); }
.action-sheet h3 { margin: 0; text-align: center; font-size: 16px; }
.action-sheet p { margin: 6px 0 16px; text-align: center; color: var(--ink-faint); font-size: 10px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.sheet-action { min-height: 82px; padding: 13px; border-radius: 14px; background: var(--surface-2); text-align: left; cursor: pointer; }
.sheet-action:hover { background: var(--surface-3); }
.sheet-action .icon { width: 21px; height: 21px; color: var(--accent-strong); }
.sheet-action strong { display: block; margin-top: 12px; font-size: 11px; }
.sheet-action span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 9px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 130; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 14px; border-radius: 13px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow); font-size: 11px; animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* Mobile nav */
.mobile-bottom-nav { display: none; }
.mobile-more-panel { display: none; }

/* Prototype map */
.prototype-map { max-width: 1100px; margin: 0 auto; padding: 46px 24px 80px; }
.prototype-map h1 { margin: 20px 0 10px; font-size: 48px; letter-spacing: -.055em; }
.prototype-map > p { max-width: 720px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.map-card { min-height: 170px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.map-card h2 { margin: 0; font-size: 17px; }
.map-card p { margin: 8px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.map-card .section-link { margin-top: 18px; color: var(--accent-strong); }

@media (max-width: 1180px) {
  .coach-brief { grid-template-columns: 1fr; }
  .brief-session { margin: 0 18px 18px; }
  .dashboard-grid, .nutrition-layout { grid-template-columns: 1fr; }
  .dashboard-side, .nutrition-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-hero { grid-template-columns: 1fr; padding-top: 50px; }
  .public-hero-copy { max-width: 820px; }
  .hero-product { min-height: 520px; max-width: 760px; width: 100%; margin: 0 auto; }
  .public-feature-grid { grid-template-columns: 1fr 1fr; }
  .public-feature:last-child { grid-column: 1 / -1; min-height: 240px; }
  .log-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --sidebar-width: 82px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .brand-name, .nav-item span:not(.icon), .nav-label, .side-coach, .profile-copy, .profile-mini > .icon { display: none; }
  .brand { justify-content: center; padding: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.active::after { display: none; }
  .profile-mini { justify-content: center; }
  .public-nav { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 430px; }
  .auth-panel { padding: 34px 24px; }
  .onboarding-shell { grid-template-columns: 220px minmax(0,1fr); }
  .goal-grid { grid-template-columns: 1fr 1fr; }
  .today-split, .plan-hero, .setup-grid, .progress-hero { grid-template-columns: 1fr; }
  .quick-log-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .active-workout-shell { grid-template-columns: 1fr; }
  .workout-rail { position: static; height: auto; border-left: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; }
  .account-layout { grid-template-columns: 1fr; }
  .account-menu { position: static; display: flex; overflow-x: auto; }
  .account-menu a { flex: 0 0 auto; }
  .day-story { grid-template-columns: 1fr; }
  .day-story-copy { position: static; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 64px; padding: 0 14px; }
  .page-title small { display: none; }
  .page-title strong { font-size: 15px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; }
  .mobile-brand span { font-size: 13px; font-weight: 900; letter-spacing: -.03em; }
  .topbar-left .page-title { display: none; }
  .top-actions .top-log { display: none; }
  .content { padding: 22px 14px 100px; }
  .page-head, .dashboard-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .page-head h1, .dashboard-head h1 { font-size: 30px; }
  .page-head-actions { width: 100%; justify-content: flex-start; }
  .coach-brief { min-height: 0; }
  .brief-copy { padding: 24px 20px; }
  .brief-copy h2 { font-size: 27px; }
  .brief-session { margin: 0 12px 12px; }
  .grid-2, .grid-3, .grid-4, .dashboard-side, .nutrition-side { grid-template-columns: 1fr; }
  .today-card, .card-pad, .card-pad-lg, .nutrition-overview { padding: 17px; }
  .today-split { gap: 12px; }
  .workout-focus { min-height: 0; padding: 18px; }
  .quick-log-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quick-log { min-height: 82px; }
  .week-strip { grid-template-columns: repeat(4, minmax(0,1fr)); overflow-x: auto; padding-bottom: 4px; }
  .day-card { min-width: 72px; }
  .calorie-row { grid-template-columns: 1fr 1fr; }
  .calorie-stat:first-child { grid-column: 1 / -1; }
  .food-row { grid-template-columns: minmax(0,1fr) auto; }
  .food-macros { display: none; }
  .date-control strong { min-width: 94px; }
  .log-options { grid-template-columns: 1fr 1fr; }
  .log-option { min-height: 160px; }
  .chat-shell { height: calc(100vh - 64px - 76px); min-height: 560px; grid-template-columns: 1fr; border-radius: 0; border-left: 0; border-right: 0; }
  .chat-history { position: fixed; inset: 64px 20% 76px 0; z-index: 80; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .chat-history.open { transform: translateX(0); }
  .chat-messages { padding: 18px 14px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .chat-welcome { padding: 26px 8px; }
  .chat-welcome h2 { font-size: 24px; }
  .chat-composer { padding: 10px 12px 12px; }
  .workout-stage { padding: 18px 14px 90px; }
  .workout-topbar { align-items: flex-start; flex-direction: column; }
  .workout-progress { width: 100%; }
  .current-exercise { padding: 18px; }
  .set-table th:nth-child(2), .set-table td:nth-child(2) { display: none; }
  .set-table input { width: 62px; }
  .exercise-actions { align-items: stretch; flex-direction: column; }
  .workout-rail { grid-template-columns: 1fr; padding: 16px 14px 90px; }
  .form-grid, .serving-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .account-menu { margin: -4px -14px 0; padding: 10px 14px; border-radius: 0; border-left: 0; border-right: 0; }
  .profile-header { align-items: flex-start; flex-direction: column; }
  .public-wrap { padding: 0 18px; }
  .public-header { height: 68px; }
  .public-actions .button-secondary { display: none; }
  .public-hero { min-height: 0; padding: 48px 0 76px; gap: 34px; }
  .public-hero-copy h1 { font-size: 52px; }
  .public-hero-copy > p { font-size: 14px; }
  .hero-product { min-height: 470px; }
  .hero-phone { width: 286px; right: 0; }
  .hero-note { width: 190px; bottom: 34px; }
  .public-section { padding: 72px 0; }
  .public-feature-grid { grid-template-columns: 1fr; }
  .public-feature:last-child { grid-column: auto; }
  .public-feature { min-height: 240px; }
  .timeline-item { grid-template-columns: 58px minmax(0,1fr); }
  .public-cta { padding: 36px 24px; align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .auth-story { min-height: 340px; padding: 28px 22px; }
  .auth-story h1 { font-size: 44px; }
  .auth-story p, .auth-points { display: none; }
  .auth-panel { padding: 28px 18px 80px; }
  .onboarding-shell { display: block; }
  .onboarding-rail { position: static; height: auto; padding: 18px 16px; }
  .onboarding-progress-copy { margin-top: 18px; }
  .onboarding-progress-copy h2, .onboarding-progress-copy p, .step-item strong { display: none; }
  .step-list { grid-template-columns: repeat(6, 1fr); margin-top: 16px; gap: 6px; }
  .step-item { justify-content: center; }
  .onboarding-main { padding: 26px 16px 90px; }
  .goal-grid { grid-template-columns: 1fr; }
  .goal-card label { min-height: 126px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: calc(100vh - 32px); border-radius: 22px 22px 0 0; border-bottom: 0; }
  .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .macro-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast-region { left: 14px; right: 14px; bottom: 90px; }
  .toast { min-width: 0; max-width: none; }
  .mobile-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; min-height: 70px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--border); backdrop-filter: blur(18px); display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
  .mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-faint); font-size: 9px; font-weight: 800; }
  .mobile-nav-item .icon { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: var(--ink); }
  .mobile-nav-item.log-button { position: relative; color: var(--surface); }
  .mobile-nav-item.log-button::before { content: ""; position: absolute; width: 50px; height: 50px; border-radius: 17px; background: var(--ink); box-shadow: var(--shadow); z-index: -1; }
  .mobile-nav-item.log-button .icon { width: 22px; height: 22px; }
  .mobile-nav-item.log-button span:last-child { transform: translateY(12px); color: var(--ink); }
  .map-grid { grid-template-columns: 1fr; }
  .prototype-map h1 { font-size: 38px; }
}

@media (max-width: 420px) {
  .public-hero-copy h1 { font-size: 44px; }
  .hero-product { min-height: 430px; }
  .hero-phone { width: 264px; }
  .hero-note { width: 174px; left: -4px; }
  .quick-log-grid, .log-options { grid-template-columns: 1fr 1fr; }
  .quick-log, .log-option { min-width: 0; }
  .log-option { padding: 16px; }
  .week-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .choice-grid { grid-template-columns: 1fr; }
  .calorie-row { grid-template-columns: 1fr; }
  .calorie-stat:first-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* GGSmart production integration */
html, body { min-height: 100%; }
body { overflow-x: hidden; }
.workspace { min-width: 0; }
.content { max-width: 1480px; width: 100%; margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 35; }
.app-shell.is-chat .workspace { height: 100vh; overflow: hidden; }
.app-shell.is-chat .content { height: calc(100vh - 76px); max-width: none; padding: 0; overflow: hidden; }

/* Compact daily brief: useful, never a giant decorative hero */
.daily-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.daily-brief-copy { min-width: 0; }
.daily-brief-kicker { display: flex; align-items: center; gap: 8px; color: var(--accent-strong); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.daily-brief h2 { margin: 7px 0 6px; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.04em; line-height: 1.12; }
.daily-brief p { margin: 0; max-width: 780px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.daily-brief-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 16px; }
.dashboard-stack { display: grid; gap: 16px; align-content: start; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-compact { padding: 18px; min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-compact > span { color: var(--ink-faint); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.metric-compact strong { display: block; margin-top: 12px; font-size: 26px; line-height: 1; letter-spacing: -.045em; }
.metric-compact small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.dashboard-workout-card { padding: 22px; }
.dashboard-workout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr); gap: 18px; }
.dashboard-exercises { display: grid; gap: 8px; margin-top: 16px; }
.dashboard-exercise { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dashboard-exercise:last-child { border-bottom: 0; }
.dashboard-exercise-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--accent-strong); font-size: 11px; font-weight: 900; }
.dashboard-exercise strong { display: block; font-size: 12px; }
.dashboard-exercise span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 9px; }
.dashboard-exercise small { color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.dashboard-progress-panel { padding: 18px; border-radius: 16px; background: var(--surface-2); display: flex; flex-direction: column; justify-content: space-between; }
.dashboard-progress-value { font-size: 38px; font-weight: 950; letter-spacing: -.06em; }
.dashboard-progress-value small { font-size: 13px; font-weight: 750; color: var(--ink-faint); letter-spacing: 0; }

/* Progress score: keep number and denominator in a stable flex row */
.progress-score-number { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.progress-score-number > strong { font: inherit; }
.progress-score-number span { position: static !important; display: inline-block; line-height: 1; transform: none !important; }

/* Subscription price: no overlap */
.plan-price .price { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.plan-price .price strong { font: inherit; }
.plan-price .price span { position: static !important; transform: none !important; }

/* Production chat: viewport stays fixed, only the message list scrolls */
.chat-page-root { height: 100%; min-height: 0; }
.chat-shell { height: 100%; min-height: 0; border-radius: 0; border-top: 0; border-bottom: 0; box-shadow: none; }
.chat-main { min-height: 0; overflow: hidden; }
.chat-messages { min-height: 0; overscroll-behavior: contain; scroll-behavior: smooth; }
.chat-composer textarea { resize: none; max-height: 132px; }
.message.pending .message-bubble { color: var(--ink-faint); }
.message-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 11px; }

/* Two-step food flow */
.food-flow { min-height: 0; height: 100%; display: grid; grid-template-rows: minmax(0,1fr); }
.food-step { min-height: 0; display: none; }
.food-step.is-active { display: grid; grid-template-rows: auto minmax(0,1fr); }
.food-results { overflow-y: auto; padding-right: 3px; }
.food-result { width: 100%; text-align: left; background: var(--surface); }
.food-result-selected { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 15px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.food-result-selected strong { display: block; font-size: 14px; }
.food-result-selected span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.serving-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.serving-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 16px; }
.serving-macro { padding: 15px 10px; text-align: center; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.serving-macro strong { display: block; font-size: 18px; letter-spacing: -.03em; }
.serving-macro span { display: block; margin-top: 5px; color: var(--ink-faint); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.food-flow-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.food-flow-back:hover { color: var(--ink); }
.modal-food { height: min(760px, calc(100vh - 40px)); }
.modal-food .modal-body { min-height: 0; }
.modal-food .modal-foot { position: relative; z-index: 2; }

/* Workout product layout */
.workout-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 13px; background: var(--surface-2); }
.workout-tabs button { min-height: 38px; padding: 0 14px; border-radius: 10px; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 11px; font-weight: 850; }
.workout-tabs button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.workout-panel { display: none; }
.workout-panel.is-active { display: block; }
.workout-today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.exercise-list { display: grid; gap: 9px; }
.exercise-card { padding: 16px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: center; }
.exercise-card.is-complete { opacity: .68; }
.exercise-card.is-complete .exercise-title { text-decoration: line-through; }
.exercise-check { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.exercise-check.is-complete { background: var(--success); border-color: var(--success); color: #fff; }
.exercise-title { font-size: 14px; font-weight: 850; }
.exercise-sub { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.exercise-prescription { text-align: right; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.workout-summary { padding: 20px; position: sticky; top: 92px; }
.workout-plan-days { display: grid; gap: 10px; }
.workout-day { overflow: hidden; }
.workout-day-head { width: 100%; min-height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); cursor: pointer; }
.workout-day-head:hover { background: var(--surface-2); }
.workout-day-copy { flex: 1; min-width: 0; }
.workout-day-copy strong { display: block; font-size: 13px; }
.workout-day-copy span { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.workout-day-body { display: none; padding: 0 16px 16px; }
.workout-day.is-open .workout-day-body { display: block; }
.setup-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.setup-status { margin-top: 14px; min-height: 24px; font-size: 11px; color: var(--ink-soft); }
.setup-status.is-error { color: var(--danger); }
.setup-status.is-success { color: var(--success); }

/* Public product site */
.public-body { background: var(--canvas); }
.public-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(18px); background: color-mix(in srgb, var(--canvas) 86%, transparent); border-bottom: 1px solid var(--border); }
.public-hero { min-height: calc(100vh - 78px); }
.public-hero-copy .eyebrow { color: var(--accent-strong); }
.public-product-board { min-height: 520px; padding: 22px; border: 1px solid var(--border); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); transform: rotate(1deg); }
.public-board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.public-board-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 12px; }
.public-board-card { padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.public-board-card.primary { grid-row: span 2; background: var(--ink); color: var(--surface); }
.public-board-card h3 { margin: 10px 0 7px; font-size: 24px; letter-spacing: -.045em; }
.public-board-card p { margin: 0; font-size: 11px; line-height: 1.55; color: var(--ink-soft); }
.public-board-card.primary p { color: color-mix(in srgb, var(--surface) 68%, transparent); }
.public-trust-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.public-trust-row span { display: inline-flex; align-items: center; gap: 7px; }

/* Auth and profile compatibility */
.auth-page, .onboarding-page { background: var(--canvas); color: var(--ink); }

@media (max-width: 1100px) {
  .dashboard-overview, .workout-today-grid { grid-template-columns: 1fr; }
  .dashboard-workout-grid { grid-template-columns: 1fr; }
  .workout-summary { position: static; }
}
@media (max-width: 800px) {
  .daily-brief { grid-template-columns: 1fr; align-items: start; }
  .daily-brief-actions { justify-content: flex-start; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .serving-macros { grid-template-columns: 1fr 1fr; }
  .setup-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .content { padding-top: 18px; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .metric-compact { min-height: 110px; padding: 15px; }
  .daily-brief { padding: 17px; }
  .daily-brief h2 { font-size: 21px; }
  .exercise-card { grid-template-columns: 40px minmax(0,1fr); }
  .exercise-prescription { grid-column: 2; text-align: left; }
  .modal-food { height: calc(100vh - 18px); }
  .serving-grid { grid-template-columns: 1fr; }
  .chat-shell { height: 100%; min-height: 0; }
}
@media (max-width: 420px) {
  .dashboard-metrics { grid-template-columns: 1fr; }
  .serving-macros { grid-template-columns: 1fr 1fr; }
  .public-board-grid { grid-template-columns: 1fr; }
  .public-board-card.primary { grid-row: auto; }
}

/* Final product integration components */
.status-dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block}
.page-heading-row{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.page-heading-row h1{margin:5px 0 7px;font-size:clamp(34px,4vw,54px);letter-spacing:-.055em;line-height:1}.page-heading-row p{margin:0;color:var(--ink-soft);font-size:13px}.segmented-control{display:inline-flex;padding:4px;border-radius:13px;background:var(--surface-2)}.segmented-control button{min-height:38px;padding:0 14px;border-radius:10px;background:transparent;color:var(--ink-soft);font-size:11px;font-weight:850}.segmented-control button.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-soft)}

.habit-list,.task-list,.stat-list,.driver-list,.detail-list,.payment-list,.activity-list{display:grid;gap:9px}.habit-row,.task-row{width:100%;min-height:58px;padding:10px 12px;border:1px solid var(--border);border-radius:13px;background:var(--surface);display:flex;align-items:center;gap:12px;text-align:left}.habit-row>span:nth-child(2),.task-row>span:nth-child(2){flex:1;min-width:0}.habit-row strong,.task-row strong{display:block;font-size:12px}.habit-row small,.task-row small{display:block;margin-top:3px;color:var(--ink-faint);font-size:9px}.task-row{cursor:pointer}.task-row:hover{background:var(--surface-2)}.task-row.done{opacity:.65}.task-check{width:32px;height:32px;border-radius:10px;background:var(--surface-2);border:1px solid var(--border);display:grid;place-items:center;flex:0 0 auto}.task-row.done .task-check{background:var(--success);border-color:var(--success);color:#fff}.stat-row{min-height:45px;padding:0 4px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px}.stat-row:last-child{border-bottom:0}.stat-row span{color:var(--ink-soft);font-size:11px}.stat-row strong{font-size:12px}.inline-notice{margin:14px 0 0;padding:12px 14px;border-radius:12px;background:var(--surface-2);color:var(--ink-soft);font-size:11px;line-height:1.55}.inline-notice.warning{background:var(--warning-soft);color:var(--warning)}

/* Progress: stable score composition and readable trends */
.progress-score-number{display:flex!important;align-items:baseline!important;gap:8px!important;white-space:nowrap!important}.progress-score-number strong{font:inherit;line-height:1}.progress-score-number span{position:static!important;transform:none!important;line-height:1}.driver-row{display:grid;grid-template-columns:92px minmax(0,1fr) 44px;gap:10px;align-items:center;min-height:36px}.driver-row>span{color:var(--ink-soft);font-size:11px}.driver-row>strong{text-align:right;font-size:11px}.metric-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.progress-metrics{margin:16px 0}.weight-sparkline{height:210px;position:relative;border-bottom:1px solid var(--border);background:linear-gradient(to top,var(--surface-2),transparent);overflow:hidden}.weight-sparkline::before{content:"";position:absolute;inset:25% 0 50%;border-top:1px dashed var(--border);border-bottom:1px dashed var(--border)}.weight-sparkline span{position:absolute;left:var(--x);top:var(--y);width:10px;height:10px;border:3px solid var(--surface);border-radius:50%;background:var(--accent);box-shadow:0 0 0 1px var(--accent);transform:translate(-50%,-50%)}.chart-caption{padding-top:10px;display:flex;justify-content:space-between;gap:12px;color:var(--ink-faint);font-size:9px}.chart-caption strong{color:var(--ink);font-size:10px}.activity-item{display:flex;gap:11px;padding:12px;border:1px solid var(--border);border-radius:13px}.activity-icon{width:34px;height:34px;border-radius:10px;background:var(--success-soft);color:var(--success);display:grid;place-items:center;flex:0 0 auto}.activity-item strong{font-size:11px}.activity-item p{margin:4px 0 0;color:var(--ink-soft);font-size:10px;line-height:1.5}.empty-state.compact{padding:24px 16px}.empty-state.compact strong{font-size:13px}.empty-state.compact p{margin:5px 0 0;color:var(--ink-soft);font-size:10px}

/* Coach: the viewport is fixed; only messages and history scroll */
.page-chat .workspace{height:100vh;min-height:0;overflow:hidden}.page-chat .content{height:calc(100vh - 76px);max-width:none;padding:0;min-height:0;overflow:hidden}.chat-shell{height:100%;min-height:0}.chat-history{min-height:0;overflow:hidden}.chat-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}.chat-history-head strong{display:block;margin-top:5px;font-size:13px}.chat-history-close{display:none}.thread-list{min-height:0;overflow-y:auto}.chat-empty-history{padding:24px 12px;text-align:center;color:var(--ink-soft);border:1px dashed var(--border);border-radius:13px}.chat-empty-history strong{display:block;font-size:11px}.chat-empty-history span{display:block;margin-top:5px;font-size:9px}.chat-welcome.is-hidden{display:none}.chat-welcome h1{margin:0;font-size:clamp(25px,3vw,36px);letter-spacing:-.045em}.chat-message{max-width:760px;display:flex;gap:11px;align-items:flex-start}.chat-message.user{margin-left:auto;flex-direction:row-reverse}.chat-message .message-avatar{font-size:10px;font-weight:900}.chat-message .message-bubble{min-width:0;max-width:680px}.chat-message.user .message-bubble{background:var(--ink);color:var(--surface)}.chat-message p{margin:0;font-size:12px;line-height:1.65}.chat-message time{display:block;margin-top:5px;color:var(--ink-faint);font-size:8px}.chat-message.user time{color:color-mix(in srgb,var(--surface) 55%,transparent)}.chat-message.is-error .message-bubble{background:var(--danger-soft);color:var(--danger)}.typing-dots{display:inline-flex;gap:4px;margin-top:8px}.typing-dots i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.35;animation:gg-dot 1s infinite}.typing-dots i:nth-child(2){animation-delay:.16s}.typing-dots i:nth-child(3){animation-delay:.32s}@keyframes gg-dot{0%,70%,100%{transform:translateY(0);opacity:.3}35%{transform:translateY(-4px);opacity:.8}}

/* Subscription: price and interval can never collide */
.subscription-product-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:16px}.plan-price .price{display:flex!important;align-items:baseline!important;gap:10px!important;flex-wrap:wrap;white-space:normal!important}.plan-price .price strong{font-size:clamp(36px,5vw,58px);line-height:1}.plan-price .price span{font-size:11px;line-height:1.4}.included-list{list-style:none;margin:24px 0;padding:0;display:grid;gap:12px}.included-list li{display:flex;align-items:center;gap:10px;color:color-mix(in srgb,var(--surface) 78%,transparent);font-size:11px}.included-list .icon{color:var(--success);width:16px;height:16px}.billing-details{align-self:stretch}.detail-list>div{padding:13px 0;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.detail-list>div:last-child{border-bottom:0}.detail-list span{color:var(--ink-soft);font-size:10px}.detail-list strong{text-align:right;font-size:11px}.payment-row{min-height:54px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.payment-row strong{display:block;font-size:11px}.payment-row span{color:var(--ink-soft);font-size:9px}.subscription-alert{display:none;margin-bottom:14px;padding:12px 14px;border-radius:12px;font-size:11px}.subscription-alert.is-visible{display:block}.subscription-alert.is-success{background:var(--success-soft);color:var(--success)}.subscription-alert.is-error{background:var(--danger-soft);color:var(--danger)}

/* Public site: editorial fitness product, not a SaaS dashboard */
.public-header-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between;gap:22px}.public-actions{display:flex;align-items:center;gap:8px}.trust-line{margin-top:22px;display:flex;flex-wrap:wrap;gap:14px;color:var(--ink-faint);font-size:10px}.trust-line span{display:inline-flex;align-items:center;gap:7px}.trust-line .icon{width:15px;height:15px;color:var(--success)}.public-product-board{min-height:520px;padding:22px;border:1px solid var(--border);border-radius:28px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:13px;transform:rotate(1deg)}.public-board-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.public-board-top strong{display:block;margin-top:4px;font-size:15px}.board-primary{min-height:155px;padding:22px;border-radius:20px;background:var(--ink);color:var(--surface);display:grid;grid-template-columns:40px minmax(0,1fr) 24px;align-items:center;gap:14px}.board-index{width:38px;height:38px;border-radius:12px;background:color-mix(in srgb,var(--surface) 10%,transparent);display:grid;place-items:center;font-size:10px;font-weight:900}.board-primary small{color:color-mix(in srgb,var(--surface) 58%,transparent);font-size:9px;text-transform:uppercase;letter-spacing:.1em}.board-primary h2{margin:6px 0 5px;font-size:25px;letter-spacing:-.04em}.board-primary p{margin:0;color:color-mix(in srgb,var(--surface) 65%,transparent);font-size:10px}.board-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.board-grid article{padding:17px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}.board-grid small,.board-grid span{display:block;color:var(--ink-faint);font-size:9px}.board-grid strong{display:block;margin:6px 0 12px;font-size:15px}.board-grid span{margin-top:8px}.board-coach{margin-top:auto;padding:16px;border:1px solid var(--border);border-radius:16px;display:flex;gap:12px}.board-coach small{color:var(--accent);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.board-coach strong{display:block;margin:4px 0;font-size:12px}.board-coach p{margin:0;color:var(--ink-soft);font-size:9px;line-height:1.5}.public-story-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(420px,1.15fr);gap:64px;align-items:center}.public-story-grid.reverse{grid-template-columns:minmax(420px,1.15fr) minmax(0,.85fr)}.public-story-grid h2{margin:12px 0 15px;font-size:clamp(36px,4.5vw,62px);line-height:1;letter-spacing:-.06em}.public-story-grid>div>p{color:var(--ink-soft);font-size:14px;line-height:1.75}.story-workout,.story-diary,.story-chat{padding:22px}.story-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:18px;color:var(--ink-faint);font-size:9px;text-transform:uppercase;letter-spacing:.09em}.story-head strong{color:var(--ink);font-size:10px}.story-workout h3{margin:0 0 14px;font-size:23px}.story-row{min-height:55px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:11px;border-bottom:1px solid var(--border)}.story-row:last-of-type{border-bottom:0}.story-row strong{font-size:11px}.story-row>span:last-child{color:var(--ink-soft);font-size:9px}.story-chat{display:grid;gap:12px}.public-footer-row{display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid var(--border);padding-top:30px}.public-footer-row nav{display:flex;flex-wrap:wrap;gap:18px}.public-footer-row nav a,.public-footer-row small{color:var(--ink-faint);font-size:9px}.public-cta .row{align-items:center}

@media(max-width:1100px){.metric-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.subscription-product-grid,.public-story-grid,.public-story-grid.reverse{grid-template-columns:1fr;gap:32px}.public-story-grid.reverse>div:first-child{order:2}.public-story-grid.reverse>div:last-child{order:1}}
@media(max-width:768px){.page-heading-row{align-items:flex-start;flex-direction:column}.segmented-control{width:100%}.segmented-control button{flex:1}.metric-grid.four{grid-template-columns:1fr 1fr}.progress-hero{grid-template-columns:1fr}.progress-score-number{font-size:64px}.driver-row{grid-template-columns:76px minmax(0,1fr) 38px}.subscription-product-grid{grid-template-columns:1fr}.page-chat .content{height:calc(100vh - 64px - 72px);padding:0}.chat-history{position:absolute;inset:0 auto 0 0;width:min(88vw,310px);z-index:20;transform:translateX(-105%);transition:transform .22s ease;box-shadow:var(--shadow)}.chat-history.is-open{transform:translateX(0)}.chat-history-close,.chat-history-open{display:grid}.chat-head{padding:0 14px}.chat-messages{padding:16px 13px}.chat-composer{padding:10px 12px calc(12px + env(safe-area-inset-bottom))}.prompt-grid{grid-template-columns:1fr}.chat-welcome{padding:24px 8px}.chat-welcome h1{font-size:27px}.public-product-board{min-height:0;transform:none}.board-grid{grid-template-columns:1fr}.public-story-grid,.public-story-grid.reverse{gap:24px}.public-story-grid h2{font-size:40px}.public-footer-row{align-items:flex-start;flex-direction:column}.public-header .public-nav{display:none}}
@media(max-width:480px){.metric-grid.four{grid-template-columns:1fr}.serving-grid{grid-template-columns:1fr}.serving-macros{grid-template-columns:1fr 1fr}.detail-list>div{flex-direction:column;gap:4px}.detail-list strong{text-align:left}.public-hero-copy h1{font-size:42px}.public-actions .button-ghost{display:none}.public-product-board{padding:15px}.board-primary{padding:16px;grid-template-columns:34px minmax(0,1fr)}.board-primary>.icon{display:none}}

/* ===== Final product integration: account, profile, auth and onboarding ===== */
.compact-page-head{margin-bottom:20px}.settings-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.72fr);gap:18px;align-items:start}.settings-form{display:grid;gap:20px}.form-section{padding-top:18px;border-top:1px solid var(--border)}.form-section-head{display:flex;flex-direction:column;gap:4px;margin-bottom:15px}.form-section-head strong{font-size:15px}.form-section-head span{color:var(--ink-soft);font-size:12px;line-height:1.55}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field-full{grid-column:1/-1}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding-top:18px;border-top:1px solid var(--border)}.form-status{min-height:20px;margin:0 auto 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.form-status.is-error{color:var(--danger)}.form-status.is-success{color:var(--success)}.password-field{display:flex;align-items:center;border:1px solid var(--border);border-radius:12px;background:var(--surface);overflow:hidden}.password-field:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 15%,transparent)}.password-field input{border:0!important;box-shadow:none!important;border-radius:0!important}.password-field button{width:44px;align-self:stretch;background:transparent;color:var(--ink-soft);display:grid;place-items:center;cursor:pointer}.settings-side{display:grid;gap:14px}.theme-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:15px}.theme-swatch{min-height:86px;padding:12px;border:1px solid var(--border);border-radius:13px;display:grid;grid-template-columns:28px 1fr;grid-template-rows:repeat(3,1fr);gap:6px;background:#fff}.theme-swatch:before{content:"";grid-row:1/-1;border-radius:7px;background:#171a1d}.theme-swatch i{border-radius:5px;background:#e9ecef}.theme-swatch.dark{background:#171a1d;border-color:#2c3237}.theme-swatch.dark:before{background:#f15a29}.theme-swatch.dark i{background:#292e33}.settings-links{overflow:hidden}.settings-links a{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:15px;border-bottom:1px solid var(--border)}.settings-links a:last-child{border-bottom:0}.settings-links a:hover{background:var(--surface-2)}.settings-links a div{display:grid;gap:3px}.settings-links a strong{font-size:13px}.settings-links a div span{color:var(--ink-soft);font-size:10px}.settings-links>a>.icon{color:var(--ink-faint);width:16px;height:16px}

.profile-completion{display:flex;align-items:baseline;gap:6px;padding:10px 13px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.profile-completion strong{font-size:23px;letter-spacing:-.04em}.profile-completion span{font-size:10px;color:var(--ink-soft);font-weight:800;text-transform:uppercase;letter-spacing:.08em}.profile-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:18px;align-items:start}.profile-tabs{position:sticky;top:92px;display:grid;gap:5px;padding:7px;border:1px solid var(--border);border-radius:15px;background:var(--surface)}.profile-tabs button{min-height:42px;padding:0 12px;border-radius:10px;background:transparent;color:var(--ink-soft);text-align:left;font-size:12px;font-weight:800;cursor:pointer}.profile-tabs button:hover{background:var(--surface-2);color:var(--ink)}.profile-tabs button.active{background:var(--ink);color:var(--surface)}.profile-form{min-width:0}.profile-panel{display:none}.profile-panel.active{display:block;animation:profile-enter .2s ease}@keyframes profile-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}

/* Authentication */
.auth-shell{min-height:calc(100vh - 82px);display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,560px);background:var(--canvas)}.auth-shell-single{grid-template-columns:minmax(320px,560px);place-content:center;padding:32px}.auth-story{padding:clamp(48px,8vw,120px);display:flex;flex-direction:column;justify-content:center;background:var(--ink);color:var(--surface);position:relative;overflow:hidden}.auth-story:after{content:"";position:absolute;width:440px;height:440px;border:95px solid color-mix(in srgb,var(--accent) 60%,transparent);border-radius:50%;right:-210px;bottom:-240px;opacity:.58}.auth-story>*{position:relative;z-index:1}.auth-story h1{max-width:700px;margin:12px 0 18px;font-size:clamp(44px,6vw,82px);line-height:.98;letter-spacing:-.065em}.auth-story p{max-width:580px;margin:0;color:color-mix(in srgb,var(--surface) 70%,transparent);font-size:16px;line-height:1.7}.auth-proof{display:flex;flex-wrap:wrap;gap:18px;margin-top:34px}.auth-proof span{display:inline-flex;align-items:center;gap:8px;font-size:11px;font-weight:800}.auth-proof i{width:7px;height:7px;border-radius:50%;background:var(--accent)}.auth-panel{align-self:center;width:min(100% - 40px,460px);margin:auto;padding:34px;border:1px solid var(--border);border-radius:20px;background:var(--surface);box-shadow:var(--shadow)}.auth-brand{margin-bottom:34px;padding:0}.auth-panel-head{margin-bottom:22px}.auth-panel-head h2{margin:0 0 6px;font-size:30px;letter-spacing:-.045em}.auth-panel-head p{margin:0;color:var(--ink-soft);font-size:12px;line-height:1.6}.auth-panel .field{margin-bottom:14px}.auth-form-row{display:flex;justify-content:flex-end;margin:-2px 0 16px}.auth-form-row a,.auth-switch a{color:var(--accent-strong);font-weight:850}.auth-form-row a{font-size:11px}.auth-switch{margin:18px 0 0;text-align:center;color:var(--ink-soft);font-size:11px}.auth-shell-single .auth-panel{width:100%}

/* Onboarding */
.onboarding-shell{min-height:100vh;display:grid;grid-template-columns:minmax(300px,36vw) minmax(0,1fr);background:var(--canvas)}.onboarding-aside{position:sticky;top:0;height:100vh;padding:38px clamp(28px,5vw,72px);background:var(--ink);color:var(--surface);display:flex;flex-direction:column}.onboarding-aside .brand{color:var(--surface);padding:0}.onboarding-aside-copy{margin:auto 0 34px;max-width:420px}.onboarding-aside-copy h1{margin:12px 0 16px;font-size:clamp(38px,4.5vw,64px);line-height:1;letter-spacing:-.06em}.onboarding-aside-copy p{margin:0;color:color-mix(in srgb,var(--surface) 67%,transparent);font-size:13px;line-height:1.7}.onboarding-step-list{list-style:none;margin:0;padding:0;display:grid;gap:7px}.onboarding-step-list li{display:flex;align-items:center;gap:11px;padding:8px;border-radius:11px;color:color-mix(in srgb,var(--surface) 46%,transparent)}.onboarding-step-list li>span{width:28px;height:28px;border:1px solid color-mix(in srgb,var(--surface) 18%,transparent);border-radius:9px;display:grid;place-items:center;font-size:10px;font-weight:900}.onboarding-step-list li div{display:grid;gap:1px}.onboarding-step-list strong{font-size:11px}.onboarding-step-list small{font-size:8px}.onboarding-step-list li.active{background:color-mix(in srgb,var(--surface) 8%,transparent);color:var(--surface)}.onboarding-step-list li.active>span{background:var(--accent);border-color:var(--accent);color:#fff}.onboarding-step-list li.done>span{background:var(--success);border-color:var(--success);color:#fff}.onboarding-privacy{display:flex;gap:8px;margin:22px 0 0;color:color-mix(in srgb,var(--surface) 45%,transparent);font-size:9px;line-height:1.5}.onboarding-privacy .icon{width:14px;height:14px}.onboarding-main{min-width:0;padding:36px clamp(22px,7vw,110px);display:grid;align-items:center}.onboarding-card{width:min(100%,760px);margin:auto}.onboarding-mobile-head{display:none}.onboarding-progress{height:3px;background:var(--surface-3);position:fixed;top:0;right:0;left:36vw;z-index:20}.onboarding-progress i{display:block;height:100%;width:20%;background:var(--accent);transition:width .28s ease}.onboarding-step{display:none}.onboarding-step.active{display:block;animation:onboard-enter .28s ease}@keyframes onboard-enter{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}.step-copy{margin-bottom:26px}.step-copy h2{margin:9px 0 8px;font-size:clamp(34px,4vw,54px);line-height:1.03;letter-spacing:-.055em}.step-copy p{max-width:580px;margin:0;color:var(--ink-soft);font-size:13px;line-height:1.65}.choice-grid{display:grid;gap:12px}.choice-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.choice-card{min-height:142px;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--ink);text-align:left;display:flex;flex-direction:column;align-items:flex-start;cursor:pointer;transition:.18s ease}.choice-card:hover{transform:translateY(-2px);border-color:var(--border-strong);box-shadow:var(--shadow-soft)}.choice-card.selected{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 13%,transparent)}.choice-card strong{margin-top:20px;font-size:15px}.choice-card small{margin-top:4px;color:var(--ink-soft);font-size:10px;line-height:1.5}.choice-icon{width:38px;height:38px;border-radius:12px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}.choice-inline{display:flex;gap:8px}.choice-inline.wrap{flex-wrap:wrap}.choice-inline button{min-height:44px;padding:0 15px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--ink-soft);font-size:12px;font-weight:800;cursor:pointer}.choice-inline button:hover{background:var(--surface-2)}.choice-inline button.selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong)}.choice-list{display:grid;gap:8px}.choice-list button{min-height:58px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--ink);text-align:left;display:grid;gap:2px;cursor:pointer}.choice-list button strong{font-size:12px}.choice-list button small{color:var(--ink-soft);font-size:9px}.choice-list button.selected{border-color:var(--accent);background:var(--accent-soft)}.onboarding-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:26px;padding-top:20px;border-top:1px solid var(--border)}.step-error{display:none;margin:13px 0 0;color:var(--danger);font-size:11px}.step-error.show{display:block}.onboarding-footnote{text-align:right;margin:10px 0 0;color:var(--ink-faint);font-size:9px}.onboarding-server-error{margin-bottom:16px}

/* Results */
.results-shell{min-height:100vh;padding:26px;display:grid;place-items:center;background:var(--canvas);position:relative}.results-brand{position:absolute;top:24px;left:28px}.results-card{width:min(100%,860px);padding:clamp(28px,5vw,58px);border:1px solid var(--border);border-radius:22px;background:var(--surface);box-shadow:var(--shadow)}.results-state{text-align:center}.results-state h1{margin:10px auto 12px;max-width:670px;font-size:clamp(38px,5vw,62px);line-height:1;letter-spacing:-.06em}.results-state>p{max-width:620px;margin:0 auto;color:var(--ink-soft);font-size:13px;line-height:1.7}.plan-loader{height:58px;display:flex;align-items:flex-end;justify-content:center;gap:5px;margin-bottom:22px}.plan-loader i{width:8px;border-radius:999px;background:var(--accent);animation:plan-bars 1s ease-in-out infinite}.plan-loader i:nth-child(1){height:28px}.plan-loader i:nth-child(2){height:48px;animation-delay:.15s}.plan-loader i:nth-child(3){height:36px;animation-delay:.3s}@keyframes plan-bars{50%{transform:scaleY(.55);opacity:.45}}.results-steps{list-style:none;margin:28px auto 0;padding:0;max-width:440px;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.results-steps li{color:var(--ink-faint);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.results-steps li span{display:block;height:4px;margin-bottom:8px;border-radius:999px;background:var(--surface-3)}.results-steps li.active,.results-steps li.done{color:var(--ink)}.results-steps li.active span{background:var(--accent)}.results-steps li.done span{background:var(--success)}.results-targets{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:30px 0}.results-targets article{padding:18px;border:1px solid var(--border);border-radius:14px;background:var(--canvas);display:grid;gap:5px}.results-targets span{color:var(--ink-soft);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.results-targets strong{font-size:30px;letter-spacing:-.045em}.results-targets small{color:var(--ink-faint);font-size:9px}.results-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:26px}.request-reference{margin-top:10px!important;color:var(--ink-faint)!important;font-size:10px!important}

/* Food modal: two deliberate steps and stable action */
.modal-food{width:min(980px,calc(100vw - 32px));height:min(760px,calc(100dvh - 32px));display:grid;grid-template-rows:auto minmax(0,1fr) auto}.modal-food .modal-body{min-height:0;overflow:hidden;padding:0}.modal-food .food-flow{height:100%}.food-step{height:100%;min-height:0;padding:20px;display:none;grid-template-rows:auto minmax(0,1fr);gap:16px;overflow:hidden}.food-step.is-active{display:grid;animation:food-step-in .2s ease}@keyframes food-step-in{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}.food-step[data-food-step="serving"]{grid-template-rows:auto minmax(0,1fr)}.food-step[data-food-step="serving"]>div:last-child{overflow-y:auto;overscroll-behavior:contain}.food-search-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.food-search-box .field{margin:0}.food-results{min-height:0;overflow-y:auto;overscroll-behavior:contain;display:grid;align-content:start;gap:8px;padding-right:4px}.food-result{min-height:68px;padding:12px 14px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:var(--ink);display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left;cursor:pointer}.food-result:hover{border-color:var(--accent);background:var(--accent-soft)}.food-result div:first-child{display:grid;gap:3px}.food-result strong{font-size:12px}.food-result span,.food-result-macros{color:var(--ink-soft);font-size:9px}.food-result-macros{text-align:right;white-space:nowrap}.food-flow-back{display:inline-flex;align-items:center;gap:7px;background:transparent;color:var(--ink-soft);font-size:10px;font-weight:850;cursor:pointer}.food-flow-back .icon{width:15px;height:15px}.food-result-selected{margin-top:10px;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--canvas);display:flex;align-items:center;justify-content:space-between;gap:20px}.food-result-selected>div{display:grid;gap:4px}.food-result-selected strong{font-size:15px}.food-result-selected span{color:var(--ink-soft);font-size:10px}.serving-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.serving-macros{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px}.serving-macro{padding:15px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);text-align:center;display:grid;gap:4px}.serving-macro strong{font-size:20px;letter-spacing:-.035em}.serving-macro span{color:var(--ink-soft);font-size:9px;text-transform:uppercase;font-weight:850;letter-spacing:.07em}.modal-food .modal-foot{position:relative;z-index:2;background:var(--surface)}

@media(max-width:980px){.settings-grid{grid-template-columns:1fr}.profile-layout{grid-template-columns:1fr}.profile-tabs{position:static;grid-template-columns:repeat(5,minmax(110px,1fr));overflow-x:auto}.profile-tabs button{text-align:center}.auth-shell{grid-template-columns:1fr}.auth-story{display:none}.auth-panel{margin:40px auto}.onboarding-shell{grid-template-columns:1fr}.onboarding-aside{display:none}.onboarding-main{padding:28px 22px 50px}.onboarding-mobile-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:38px}.onboarding-mobile-head>span{color:var(--ink-soft);font-size:10px;font-weight:850}.onboarding-progress{left:0}.results-targets{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.form-grid.two,.choice-grid.two,.serving-grid{grid-template-columns:1fr}.field-full{grid-column:auto}.form-actions{align-items:stretch;flex-direction:column-reverse}.form-actions .button{width:100%}.form-status{margin:0}.profile-tabs{margin-inline:-4px}.auth-shell-single{padding:14px}.auth-panel{width:calc(100% - 24px);padding:24px;margin:20px auto}.onboarding-main{padding:20px 16px 38px}.onboarding-mobile-head{margin-bottom:30px}.step-copy h2{font-size:36px}.choice-card{min-height:118px}.choice-card strong{margin-top:13px}.choice-inline{display:grid;grid-template-columns:repeat(2,1fr)}.choice-inline.wrap{display:flex}.choice-inline button{width:100%}.choice-inline.wrap button{width:auto}.onboarding-actions .button{flex:1}.results-shell{padding:76px 12px 18px}.results-brand{top:18px;left:18px}.results-card{padding:26px 18px}.results-targets{grid-template-columns:1fr 1fr}.modal-food{width:100vw;height:100dvh;max-height:none;border-radius:0}.modal-food .modal-head{padding:14px 16px}.food-step{padding:14px}.food-search-box{grid-template-columns:1fr}.food-search-box .button{width:100%}.food-result{align-items:flex-start;flex-direction:column;gap:7px}.food-result-macros{text-align:left;white-space:normal}.serving-macros{grid-template-columns:1fr 1fr}.modal-food .modal-foot{padding:10px 12px calc(10px + env(safe-area-inset-bottom))}.modal-food .modal-foot .button{flex:1}}

/* Public coach and legal/support pages */
.public-coach{padding:clamp(56px,8vw,112px) 0;background:var(--canvas)}
.public-coach-layout{display:grid;grid-template-columns:minmax(0,.8fr) minmax(520px,1.2fr);gap:clamp(32px,6vw,88px);align-items:center}
.public-coach-copy h1{font-size:clamp(42px,5.4vw,76px);max-width:760px;margin:14px 0 20px;letter-spacing:-.055em;line-height:.98}
.public-coach-copy>p{max-width:640px;font-size:18px;line-height:1.72;color:var(--text-secondary)}
.public-coach-points{display:grid;gap:12px;margin-top:30px}.public-coach-points>div{display:grid;grid-template-columns:40px auto;column-gap:12px;padding:15px 0;border-top:1px solid var(--border)}.public-coach-points .icon{grid-row:1/3;width:40px;height:40px;padding:9px;border-radius:12px;background:var(--surface-subtle);color:var(--accent)}.public-coach-points strong{font-size:15px}.public-coach-points span:last-child{font-size:13px;color:var(--text-secondary);margin-top:3px}
.public-coach-panel{height:min(720px,calc(100vh - 150px));min-height:560px;border:1px solid var(--border);background:var(--surface);border-radius:24px;box-shadow:var(--shadow-lg);display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto;overflow:hidden}.public-coach-panel>header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--border)}.public-coach-panel>header>div{display:flex;align-items:center;gap:12px}.public-coach-panel>header div div{display:grid;gap:2px}.public-coach-panel>header span{font-size:12px;color:var(--text-muted)}.coach-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:var(--text-primary);color:var(--surface)!important;font-weight:900;font-size:13px!important}
.public-coach-messages{overflow:auto;padding:22px;overscroll-behavior:contain}.public-coach-starters{display:flex;gap:8px;overflow:auto;padding:0 20px 12px}.public-coach-starters button{white-space:nowrap;border:1px solid var(--border);background:var(--surface-subtle);color:var(--text-primary);border-radius:999px;padding:9px 12px;font-size:12px;font-weight:700}.public-coach-composer{display:grid;grid-template-columns:1fr auto;align-items:end;gap:10px;margin:0 20px;padding:10px 10px 10px 16px;border:1px solid var(--border-strong);border-radius:18px;background:var(--surface-subtle)}.public-coach-composer textarea{border:0;background:transparent;color:var(--text-primary);resize:none;min-height:42px;max-height:120px;padding:10px 0;outline:0}.public-coach-panel>.setup-status{margin:6px 20px 0}.public-coach-panel>small{text-align:center;color:var(--text-muted);font-size:10px;padding:8px 16px 14px}
.public-simple{padding:clamp(70px,10vw,140px) 0;background:var(--canvas);min-height:70vh}.public-simple h1{font-size:clamp(48px,7vw,90px);line-height:.94;letter-spacing:-.06em;max-width:900px;margin:14px 0 24px}.public-simple-lead,.public-simple-grid>div>p{max-width:740px;font-size:18px;line-height:1.75;color:var(--text-secondary);margin-bottom:28px}.public-simple-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:60px;align-items:start}.public-simple-card{padding:28px}.public-simple-card h2{font-size:22px;margin-bottom:12px}.public-simple-card p{color:var(--text-secondary);line-height:1.7}.public-simple-card a{font-weight:800;color:var(--accent)}.public-support-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:34px 0}.public-policy{max-width:900px}.public-policy h2{font-size:24px;margin:38px 0 10px}.public-policy p{color:var(--text-secondary);font-size:16px;line-height:1.8}
@media(max-width:900px){.public-coach-layout,.public-simple-grid{grid-template-columns:1fr}.public-coach-panel{height:680px;min-height:0}.public-support-grid{grid-template-columns:1fr}.public-coach-copy h1{font-size:clamp(40px,10vw,64px)}}
@media(max-width:640px){.public-coach{padding:38px 0}.public-coach-layout{gap:28px}.public-coach-panel{height:calc(100dvh - 30px);border-radius:18px}.public-coach-panel>header{padding:14px}.public-coach-messages{padding:16px}.public-coach-composer{margin:0 12px}.public-coach-starters{padding-inline:12px}.public-simple{padding:52px 0}.public-simple h1{font-size:44px}}

/* Approved prototype alignment — 2026-07-29 */
.mobile-nav { display: none !important; }
.mobile-bottom-nav { display: none; }

.gg-home-hero { padding: clamp(72px, 8vw, 126px) 0 78px; overflow: hidden; }
.gg-home-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(540px, 1.1fr); gap: clamp(44px, 7vw, 104px); align-items: center; }
.gg-home-copy { max-width: 720px; }
.gg-home-copy h1 { margin: 18px 0 20px; font-size: clamp(58px, 6.8vw, 104px); line-height: .91; letter-spacing: -.073em; }
.gg-home-copy h1 em { display: block; color: var(--accent); font-style: normal; }
.gg-home-copy > p { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.65; }
.gg-home-copy .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.gg-home-trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 25px; color: var(--ink-soft); font-size: 12px; font-weight: 720; }
.gg-home-trust span { display: inline-flex; align-items: center; gap: 7px; }
.gg-home-trust .icon { width: 15px; height: 15px; color: var(--success); }

.gg-day-preview { position: relative; padding: 22px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: 0 32px 80px rgba(15,22,30,.12); transform: rotate(1.2deg); }
.gg-day-preview::before { content: ""; position: absolute; inset: auto -34px -34px auto; width: 160px; height: 160px; border-radius: 50%; border: 34px solid color-mix(in srgb, var(--accent) 20%, transparent); pointer-events: none; }
.gg-day-preview-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.gg-day-preview-head div { display: grid; gap: 4px; }
.gg-day-preview-head div span { color: var(--ink-faint); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.gg-day-preview-head div strong { font-size: 18px; letter-spacing: -.03em; }
.gg-day-priority { position: relative; z-index: 1; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 16px; padding: 24px 0; }
.gg-priority-index { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 900; }
.gg-day-priority small { color: var(--accent-strong); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.gg-day-priority h2 { margin: 8px 0 8px; font-size: clamp(25px, 2.3vw, 36px); line-height: 1.08; letter-spacing: -.045em; }
.gg-day-priority p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.gg-day-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.gg-day-grid article { min-height: 156px; padding: 15px; border-radius: 16px; background: var(--canvas); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: flex-start; }
.gg-day-grid article small { margin-top: 16px; color: var(--ink-faint); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.gg-day-grid article strong { margin-top: 5px; font-size: 13px; line-height: 1.35; }
.gg-day-grid article > span:last-child { margin-top: 6px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }

.gg-home-band { border-block: 1px solid var(--border); background: var(--surface); }
.gg-home-band-grid { min-height: 74px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: center; }
.gg-home-band-grid span { padding: 0 18px; text-align: center; color: var(--ink-soft); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; border-right: 1px solid var(--border); }
.gg-home-band-grid span:last-child { border-right: 0; }

.gg-home-intro { max-width: 920px; text-align: center; }
.gg-home-intro h2 { margin: 14px auto 16px; font-size: clamp(44px, 5.5vw, 78px); line-height: .98; letter-spacing: -.06em; }
.gg-home-intro h2 em { color: var(--accent); font-style: normal; }
.gg-home-intro p { max-width: 720px; margin: 0 auto; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }
.gg-home-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin-top: 56px; border: 1px solid var(--border); background: var(--border); }
.gg-home-steps article { min-height: 290px; padding: 34px; background: var(--surface); }
.gg-home-steps article > span { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.gg-home-steps h3 { margin: 86px 0 10px; font-size: 25px; letter-spacing: -.04em; }
.gg-home-steps p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

.gg-training-section { padding: clamp(74px,9vw,132px) 0; background: #151719; color: #fff; }
.gg-training-grid { display: grid; grid-template-columns: minmax(0,.82fr) minmax(500px,1.18fr); gap: clamp(42px,7vw,100px); align-items: center; }
.gg-training-copy .kicker { color: #ff8058; }
.gg-training-copy h2 { margin: 17px 0 20px; font-size: clamp(44px,5vw,74px); line-height: .98; letter-spacing: -.06em; }
.gg-training-copy p { max-width: 620px; margin: 0 0 26px; color: #b5bbc1; font-size: 15px; line-height: 1.75; }
.gg-session-preview { overflow: hidden; border: 1px solid #34383d; border-radius: 22px; background: #1d2023; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.gg-session-preview header { min-height: 90px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #34383d; }
.gg-session-preview header div { display: grid; gap: 5px; }
.gg-session-preview header small { color: #8f979f; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.gg-session-preview header strong { font-size: 20px; }
.gg-session-preview header > span { min-height: 34px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; background: #292d31; color: #dce0e3; font-size: 11px; font-weight: 850; }
.gg-session-row { min-height: 66px; padding: 0 22px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #303439; }
.gg-session-check { width: 26px; height: 26px; border: 1px solid #4b5157; border-radius: 9px; }
.gg-session-row strong { font-size: 13px; }
.gg-session-row > span:last-child { color: #aeb5bc; font-size: 11px; font-weight: 780; }
.gg-session-preview footer { padding: 18px 22px 22px; }
.gg-session-preview footer > span { display: block; margin-bottom: 9px; color: #aeb5bc; font-size: 10px; }
.gg-session-preview .progress-track { background: #303439; }

.gg-nutrition-grid { display: grid; grid-template-columns: minmax(500px,1.1fr) minmax(0,.9fr); gap: clamp(42px,7vw,100px); align-items: center; }
.gg-diary-preview { overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.gg-diary-preview header { min-height: 88px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.gg-diary-preview header div { display: grid; gap: 4px; }
.gg-diary-preview header small { color: var(--ink-faint); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.gg-diary-preview header strong { font-size: 19px; }
.gg-diary-preview header > span { color: var(--warning); font-size: 11px; font-weight: 850; }
.gg-meal-row { min-height: 66px; padding: 0 22px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); }
.gg-meal-row:last-child { border-bottom: 0; }
.gg-meal-row .icon { color: var(--warning); }
.gg-meal-row strong { font-size: 13px; }
.gg-meal-row > span:last-child { color: var(--ink-faint); font-size: 10px; }
.gg-nutrition-copy h2, .gg-coach-copy h2 { margin: 16px 0 18px; font-size: clamp(44px,5vw,72px); line-height: .98; letter-spacing: -.06em; }
.gg-nutrition-copy p, .gg-coach-copy p { margin: 0 0 24px; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }

.gg-coach-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(520px,1.15fr); gap: clamp(42px,7vw,100px); align-items: center; }
.gg-coach-preview { min-height: 420px; padding: 30px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.gg-coach-preview .message { max-width: 88%; }
.gg-coach-preview .message.user { align-self: flex-end; }
.gg-home-final { padding: clamp(34px,5vw,58px); border-radius: 24px; background: var(--ink); color: var(--surface); display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.gg-home-final h2 { max-width: 900px; margin: 13px 0 12px; font-size: clamp(38px,4.7vw,68px); line-height: .98; letter-spacing: -.06em; }
.gg-home-final p { max-width: 680px; margin: 0; color: color-mix(in srgb,var(--surface) 68%,transparent); font-size: 14px; line-height: 1.7; }

@media (max-width: 1080px) {
  .gg-home-hero-grid, .gg-training-grid, .gg-nutrition-grid, .gg-coach-grid { grid-template-columns: 1fr; }
  .gg-home-copy { max-width: 860px; }
  .gg-day-preview, .gg-session-preview, .gg-diary-preview, .gg-coach-preview { width: 100%; max-width: 820px; margin-inline: auto; }
  .gg-home-steps { grid-template-columns: 1fr; }
  .gg-home-steps article { min-height: 220px; }
  .gg-home-steps h3 { margin-top: 55px; }
}
@media (max-width: 720px) {
  .mobile-bottom-nav { display: grid; }
  .gg-home-hero { padding: 48px 0 56px; }
  .gg-home-copy h1 { font-size: clamp(48px,15vw,72px); }
  .gg-home-copy > p { font-size: 15px; }
  .gg-home-trust { display: grid; gap: 10px; }
  .gg-day-preview { padding: 16px; border-radius: 20px; transform: none; }
  .gg-day-grid { grid-template-columns: 1fr; }
  .gg-day-grid article { min-height: 122px; }
  .gg-home-band-grid { grid-template-columns: 1fr 1fr; padding: 10px 0; }
  .gg-home-band-grid span { min-height: 44px; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
  .gg-home-band-grid span:nth-child(even) { border-right: 0; }
  .gg-home-band-grid span:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .gg-home-intro h2, .gg-training-copy h2, .gg-nutrition-copy h2, .gg-coach-copy h2 { font-size: 42px; }
  .gg-home-steps article { min-height: 190px; padding: 26px; }
  .gg-home-steps h3 { margin-top: 42px; }
  .gg-training-section { padding: 72px 0; }
  .gg-session-row { padding-inline: 16px; }
  .gg-home-final { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 460px) {
  .gg-day-priority { grid-template-columns: 1fr; }
  .gg-priority-index { width: 38px; height: 38px; }
  .gg-session-row { grid-template-columns: 30px minmax(0,1fr); }
  .gg-session-row > span:last-child { grid-column: 2; }
  .gg-coach-preview { padding: 18px; }
}

/* =========================================================
   Auth + onboarding rebuild (2026-07)
   Scoped overrides that replace legacy form and viewport rules.
   ========================================================= */
body.page-login,
body.page-signup,
body.page-forgot_password,
body.page-reset_password,
body.page-onboarding { background: var(--canvas); }

.auth-shell-refined {
  min-height: calc(100dvh - 82px);
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  background: var(--canvas);
}
.auth-story {
  min-height: calc(100dvh - 82px);
  padding: clamp(36px, 5vw, 76px);
  background: #14171a;
  color: #fff;
  justify-content: space-between;
}
.auth-story::after {
  content: "";
  position: absolute;
  inset: auto -12% -22% auto;
  width: min(46vw, 620px);
  height: min(46vw, 620px);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 48% 52% 58% 42% / 45% 44% 56% 55%;
  background:
    linear-gradient(135deg, rgba(241,90,41,.26), rgba(241,90,41,0) 62%),
    radial-gradient(circle at 30% 28%, rgba(255,255,255,.10), transparent 34%);
  transform: rotate(-10deg);
}
.auth-story-brand { color: #fff; padding: 0; position: relative; z-index: 2; }
.auth-story-main { margin: auto 0; max-width: 760px; position: relative; z-index: 2; }
.auth-story h1 { max-width: 780px; font-size: clamp(48px, 6vw, 86px); }
.auth-story p { max-width: 610px; font-size: 15px; }
.auth-value-list { display: grid; gap: 10px; max-width: 620px; margin-top: 34px; }
.auth-value-list > div {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: start;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.auth-value-list strong { display: block; font-size: 13px; }
.auth-value-list small { display: block; margin-top: 4px; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.55; }
.auth-value-number { color: #ff7a4d; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.auth-story-note { margin: 0; position: relative; z-index: 2; color: rgba(255,255,255,.44)!important; font-size: 11px!important; }
.auth-panel-wrap { display: grid; place-items: center; min-width: 0; padding: 34px; }
.auth-panel-refined {
  width: min(100%, 520px);
  margin: 0;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(18,25,31,.09);
}
.auth-mobile-brand { display: none; }
.auth-panel-head h2 { font-size: clamp(34px, 4vw, 46px); line-height: 1; }
.auth-panel-refined .field { display: grid; gap: 8px; margin-bottom: 0; }
.auth-panel-refined .field > span:first-child,
.onboarding-card .field > span:first-child { color: var(--ink); font-size: 11px; font-weight: 850; }
.auth-panel-refined .input,
.auth-panel-refined .select,
.onboarding-card .input,
.onboarding-card .select,
.onboarding-card .textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 14px;
  color: var(--ink);
  outline: 0;
  appearance: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-panel-refined .select,
.onboarding-card .select {
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.auth-panel-refined .input:focus,
.auth-panel-refined .select:focus,
.onboarding-card .input:focus,
.onboarding-card .select:focus,
.onboarding-card .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.onboarding-card .textarea { min-height: 116px; padding: 13px 14px; resize: vertical; }
.auth-form { display: grid; gap: 15px; }
.auth-password-grid { gap: 12px; }
.password-wrap { display: block; position: relative; }
.password-wrap .input { padding-right: 54px; }
.password-toggle { position: absolute; top: 4px; right: 4px; width: 42px; height: 42px; border: 0; background: transparent; box-shadow: none; }
.password-toggle:hover { transform: none; background: var(--surface-2); }
.auth-submit { min-height: 52px; margin-top: 18px; font-size: 14px; }
.auth-privacy-copy { margin: 12px 0 0; color: var(--ink-faint); font-size: 9px; line-height: 1.55; text-align: center; }
.auth-recovery-shell { min-height: calc(100dvh - 82px); }
.auth-recovery-shell .auth-panel { margin: 30px auto; }

body.page-onboarding { overflow: hidden; }
.onboarding-shell-v2 { height: 100dvh; min-height: 0; grid-template-columns: minmax(300px, 34vw) minmax(0,1fr); }
.onboarding-shell-v2 .onboarding-aside { height: 100dvh; min-height: 0; overflow: hidden; padding: 28px clamp(24px,4vw,58px); }
.onboarding-shell-v2 .onboarding-aside-copy { margin: clamp(30px,8vh,90px) 0 20px; }
.onboarding-shell-v2 .onboarding-aside-copy h1 { font-size: clamp(38px,4vw,58px); }
.onboarding-shell-v2 .onboarding-step-list { gap: 4px; }
.onboarding-shell-v2 .onboarding-step-list li { min-height: 48px; }
.onboarding-shell-v2 .onboarding-main {
  height: 100dvh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px clamp(24px,6vw,88px) 70px;
  display: block;
}
.onboarding-shell-v2 .onboarding-card { width: min(100%, 860px); min-height: calc(100dvh - 108px); display: grid; align-items: center; margin: 0 auto; }
.onboarding-shell-v2 .onboarding-progress { left: 34vw; }
.onboarding-shell-v2 .onboarding-step { width: 100%; padding: 20px 0; }
.onboarding-shell-v2 .step-copy h2 { max-width: 760px; }
.onboarding-shell-v2 .choice-grid.compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
.onboarding-shell-v2 .choice-card.compact { min-height: 104px; justify-content: center; }
.onboarding-shell-v2 .choice-card.compact strong { margin-top: 0; }
.training-preference-stack { display: grid; gap: 22px; }
.training-select-grid { margin-top: 4px; }
.onboarding-textarea-field { margin-top: 18px; }
.onboarding-actions-end { justify-content: flex-end; }
.onboarding-shell-v2 .step-error { margin-top: 14px; }

.results-shell-v2 { min-height: 100dvh; align-items: center; }
.results-card-v2 { width: min(100%, 920px); text-align: left; }
.results-intro { max-width: 720px; }
.results-intro h1 { margin: 9px 0 10px; font-size: clamp(38px,5vw,60px); line-height: 1; letter-spacing: -.055em; }
.results-intro p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.setup-build-list { display: grid; gap: 10px; margin-top: 28px; }
.setup-build-item {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}
.setup-build-state { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-soft); }
.setup-build-item > div { display: grid; gap: 3px; }
.setup-build-item strong { font-size: 13px; }
.setup-build-item small { color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.setup-build-item em { color: var(--ink-faint); font-size: 9px; font-style: normal; }
.setup-build-item.is-running { border-color: color-mix(in srgb,var(--accent) 42%,var(--border)); background: var(--accent-soft); }
.setup-build-item.is-running .setup-build-state { color: var(--accent); animation: setup-pulse 1.1s ease-in-out infinite; }
.setup-build-item.is-complete { border-color: color-mix(in srgb,var(--success) 32%,var(--border)); }
.setup-build-item.is-complete .setup-build-state { background: var(--success-soft); color: var(--success); }
.setup-build-item.is-error { border-color: color-mix(in srgb,var(--danger) 38%,var(--border)); background: var(--danger-soft); }
.setup-build-item.is-error .setup-build-state { color: var(--danger); }
@keyframes setup-pulse { 50% { transform: scale(.9); opacity: .55; } }
.setup-ready-summary { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.setup-ready-summary h2 { margin: 6px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.setup-ready-summary p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.results-targets.compact { margin: 18px 0 0; }
.setup-results-status { margin-top: 18px; color: var(--ink-soft); font-size: 11px; text-align: center; }
.setup-results-actions { margin-top: 18px; }
.setup-results-footnote { margin: 16px auto 0; max-width: 680px; color: var(--ink-faint); font-size: 9px; line-height: 1.55; text-align: center; }

@media (max-width: 980px) {
  .auth-shell-refined { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-story { display: none; }
  .auth-panel-wrap { min-height: 100dvh; padding: 24px; }
  .auth-mobile-brand { display: block; margin-bottom: 30px; }
  .auth-panel-refined { margin: 0 auto; }
  body.page-onboarding { overflow: auto; }
  .onboarding-shell-v2 { display: block; height: auto; min-height: 100dvh; }
  .onboarding-shell-v2 .onboarding-main { height: auto; min-height: 100dvh; overflow: visible; padding: 22px 20px 60px; }
  .onboarding-shell-v2 .onboarding-card { min-height: 0; display: block; }
  .onboarding-shell-v2 .onboarding-progress { left: 0; }
  .onboarding-shell-v2 .onboarding-mobile-head { display: flex; position: sticky; top: 0; z-index: 15; padding: 12px 0 18px; background: color-mix(in srgb,var(--canvas) 94%,transparent); backdrop-filter: blur(12px); }
}
@media (max-width: 640px) {
  .auth-panel-wrap { padding: 12px; }
  .auth-panel-refined { width: 100%; padding: 24px 18px; border-radius: 18px; }
  .auth-password-grid { grid-template-columns: 1fr; }
  .onboarding-shell-v2 .onboarding-main { padding: 14px 14px 44px; }
  .onboarding-shell-v2 .onboarding-step { padding: 10px 0 20px; }
  .onboarding-shell-v2 .step-copy h2 { font-size: 34px; }
  .onboarding-shell-v2 .choice-grid.two,
  .onboarding-shell-v2 .choice-grid.compact,
  .training-select-grid { grid-template-columns: 1fr; }
  .onboarding-shell-v2 .choice-card { min-height: 112px; }
  .onboarding-shell-v2 .choice-inline { display: flex; flex-wrap: wrap; }
  .onboarding-shell-v2 .choice-inline button { width: auto; flex: 1 1 calc(50% - 8px); }
  .onboarding-shell-v2 .choice-inline.wrap button { flex: 0 1 auto; }
  .onboarding-shell-v2 .onboarding-actions { position: sticky; bottom: 0; margin-inline: -14px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top,var(--canvas) 78%,transparent); z-index: 10; }
  .setup-build-item { grid-template-columns: 40px minmax(0,1fr); }
  .setup-build-item > .button { grid-column: 1 / -1; width: 100%; }
  .results-card-v2 { padding: 26px 16px; }
  .results-targets.compact { grid-template-columns: 1fr 1fr; }
}

/* ===== Global scrollbar system + onboarding viewport correction — 2026-07-29 ===== */
:root {
  --scrollbar-track: transparent;
  --scrollbar-thumb: #b8c0c8;
  --scrollbar-thumb-hover: #8f99a3;
  --scrollbar-thumb-active: #6f7a85;
}

html[data-theme="dark"] {
  --scrollbar-track: transparent;
  --scrollbar-thumb: #4b535c;
  --scrollbar-thumb-hover: #68727d;
  --scrollbar-thumb-active: #818c97;
}

html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--scrollbar-thumb);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Keep long app regions stable when a scrollbar appears. */
.app-sidebar,
.workspace,
.content,
.thread-list,
.chat-messages,
.modal-body,
.food-results,
.workout-rail,
.onboarding-aside,
.onboarding-main {
  scrollbar-gutter: stable;
}

/* Desktop onboarding uses two independent, intentional scroll regions.
   The setup rail remains available while the active form step scrolls. */
@media (min-width: 769px) {
  .onboarding-shell,
  .onboarding-shell-v2 {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .onboarding-aside {
    position: sticky !important;
    top: 0;
    height: 100dvh !important;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  .onboarding-main {
    height: 100dvh !important;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    align-items: start !important;
    padding-top: clamp(30px, 5vh, 58px) !important;
    padding-bottom: clamp(42px, 7vh, 80px) !important;
  }

  .onboarding-card {
    margin: auto !important;
    padding-block: 10px 30px;
  }

  .onboarding-step.active {
    min-height: min-content;
  }
}

/* Phones/tablets should use the document flow instead of nested viewport locks. */
@media (max-width: 768px) {
  .onboarding-shell,
  .onboarding-shell-v2 {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .onboarding-aside,
  .onboarding-main {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    scrollbar-gutter: auto;
  }

  *::-webkit-scrollbar {
    width: 7px;
    height: 7px;
  }

  *::-webkit-scrollbar-thumb {
    border-width: 2px;
  }
}

/* --------------------------------------------------------------------------
   Setup + onboarding results refinement (v8)
   -------------------------------------------------------------------------- */

.workout-panel[data-workout-panel="setup"] {
  max-width: 1180px;
  margin-inline: auto;
}

.workout-panel[data-workout-panel="setup"] > .card {
  padding: clamp(22px, 3vw, 34px);
  border-color: var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.workout-panel[data-workout-panel="setup"] .section-head {
  align-items: flex-start;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.workout-panel[data-workout-panel="setup"] .section-head h2 {
  margin: 5px 0 6px;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: -.035em;
}

.workout-panel[data-workout-panel="setup"] .section-head p {
  max-width: 640px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.setup-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 18px;
}

.setup-form-grid .field {
  min-width: 0;
  gap: 8px;
}

.setup-form-grid .field > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.setup-form-grid .field select,
.setup-form-grid .field textarea,
.workout-panel[data-workout-panel="setup"] select,
.workout-panel[data-workout-panel="setup"] textarea {
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background-color: var(--surface);
  color: var(--ink);
  padding: 0 15px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  outline: none;
  box-shadow: 0 1px 0 rgba(15, 22, 30, .02);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  color-scheme: light;
}

html[data-theme="dark"] .setup-form-grid .field select,
html[data-theme="dark"] .setup-form-grid .field textarea,
html[data-theme="dark"] .workout-panel[data-workout-panel="setup"] select,
html[data-theme="dark"] .workout-panel[data-workout-panel="setup"] textarea {
  color-scheme: dark;
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}

.setup-form-grid .field select:hover,
.setup-form-grid .field textarea:hover {
  border-color: color-mix(in srgb, var(--ink-faint) 55%, var(--border));
}

.setup-form-grid .field select:focus,
.setup-form-grid .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.setup-form-grid .field textarea {
  min-height: 118px;
  padding-block: 13px;
  resize: vertical;
}

.setup-form-grid .field select:invalid {
  color: var(--ink-faint);
}

.setup-form-grid .field option {
  background: var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .setup-form-grid .field option {
  background: var(--surface-2);
  color: var(--ink);
}

.workout-panel[data-workout-panel="setup"] .setup-status {
  display: none;
  min-height: 0;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  line-height: 1.55;
}

.workout-panel[data-workout-panel="setup"] .setup-status:not(:empty) {
  display: block;
}

.workout-panel[data-workout-panel="setup"] .setup-status.is-error {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background: var(--danger-soft);
  color: var(--danger);
}

.workout-panel[data-workout-panel="setup"] .setup-status.is-success {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  background: var(--success-soft);
  color: var(--success);
}

.results-shell-v2 {
  min-height: 100dvh;
  height: auto;
  padding: 74px 20px 28px;
  align-items: start;
  place-items: start center;
  overflow: visible;
}

.results-shell-v2 .results-brand {
  top: 20px;
  left: 24px;
}

.results-card-v2 {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(24px, 3.5vw, 38px);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.results-intro {
  max-width: 680px;
}

.results-intro h1 {
  margin: 6px 0 8px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.results-intro p {
  font-size: 13px;
  line-height: 1.6;
}

.setup-build-list {
  gap: 9px;
  margin-top: 22px;
}

.setup-build-item {
  min-height: 68px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 14px;
}

.setup-build-item [hidden] {
  display: none !important;
}

.setup-build-state {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.setup-build-item strong {
  font-size: 13px;
}

.setup-build-item small {
  font-size: 11px;
  line-height: 1.5;
}

.setup-build-item em {
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 9px;
}

.setup-ready-summary {
  margin-top: 20px;
  padding-top: 20px;
}

.setup-ready-summary h2 {
  margin: 5px 0 6px;
  font-size: clamp(22px, 2.6vw, 30px);
}

.results-targets.compact {
  margin-top: 14px;
}

.setup-results-status {
  margin-top: 16px;
  min-height: 20px;
}

.setup-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.setup-results-actions .button {
  min-width: 170px;
}

.setup-results-footnote {
  margin: 14px 0 0;
  max-width: 680px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .setup-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .workout-panel[data-workout-panel="setup"] > .card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .workout-panel[data-workout-panel="setup"] .section-head {
    padding-bottom: 16px;
    margin-bottom: 18px;
  }

  .results-shell-v2 {
    padding: 70px 12px 20px;
  }

  .results-card-v2 {
    padding: 22px 16px;
    border-radius: 17px;
  }

  .setup-build-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .setup-build-item > .button {
    grid-column: 2;
    justify-self: start;
  }

  .setup-results-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-inline: -16px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .setup-results-actions .button {
    flex: 1 1 150px;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  .results-shell-v2 {
    padding-top: 68px;
  }

  .results-card-v2 {
    padding-block: 24px;
  }

  .results-intro h1 {
    font-size: 36px;
  }

  .setup-build-list {
    margin-top: 18px;
  }
}

/* ==========================================================================
   Unified form system + workout plan builder (v10)
   One control language for authentication, onboarding, app forms and modals.
   ========================================================================== */
:root {
  --control-height: 52px;
  --control-radius: 13px;
  --control-bg: #ffffff;
  --control-bg-hover: #fbfcfd;
  --control-border: #cfd5dc;
  --control-border-hover: #aeb7c1;
  --control-ring: color-mix(in srgb, var(--accent) 24%, transparent);
  --control-placeholder: #8a929c;
}
html[data-theme="dark"] {
  --control-bg: #1b1f23;
  --control-bg-hover: #20252a;
  --control-border: #3a4249;
  --control-border-hover: #525d67;
  --control-placeholder: #78818b;
}

/* Every text-like field receives the same baseline, even when a legacy view
   omitted .input/.select/.textarea classes. Native choice controls are left
   intact unless a purpose-built component styles them below. */
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]),
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) select,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) textarea,
.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  margin: 0;
  padding: 0 15px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background-color: var(--control-bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 22, 30, .025);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease, transform .16s ease;
}
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) textarea,
.textarea {
  min-height: 118px;
  padding-top: 13px;
  padding-bottom: 13px;
  resize: vertical;
}
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) select,
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 15px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) input::placeholder,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) textarea::placeholder,
.input::placeholder,
.textarea::placeholder { color: var(--control-placeholder); opacity: 1; font-weight: 500; }
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) select:hover,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) textarea:hover,
.input:hover,
.select:hover,
.textarea:hover { border-color: var(--control-border-hover); background-color: var(--control-bg-hover); }
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) select:focus,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  background-color: var(--control-bg);
  box-shadow: 0 0 0 4px var(--control-ring);
}
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) input:disabled,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) select:disabled,
:where(.public-body, .app-shell, .modal-shell, .modal-food, .onboarding-shell-v2) textarea:disabled {
  cursor: not-allowed;
  opacity: .68;
  background: var(--surface-2);
  color: var(--ink-faint);
}
:where(.public-body, .app-shell) input:-webkit-autofill,
:where(.public-body, .app-shell) input:-webkit-autofill:hover,
:where(.public-body, .app-shell) input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--control-bg) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}
:where(.public-body, .app-shell) input[type="checkbox"],
:where(.public-body, .app-shell) input[type="radio"] { accent-color: var(--accent); }
:where(.public-body, .app-shell) input[type="date"],
:where(.public-body, .app-shell) input[type="time"],
:where(.public-body, .app-shell) input[type="datetime-local"] { color-scheme: light; }
html[data-theme="dark"] :where(.public-body, .app-shell) input[type="date"],
html[data-theme="dark"] :where(.public-body, .app-shell) input[type="time"],
html[data-theme="dark"] :where(.public-body, .app-shell) input[type="datetime-local"] { color-scheme: dark; }

.field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.field > span:first-child,
.setup-control-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.field > span:first-child em { margin-left: 5px; color: var(--ink-faint); font-size: 10px; font-style: normal; font-weight: 750; }
.field > small { color: var(--ink-faint); font-size: 10px; line-height: 1.5; }
.field:has(:required) > span:first-child::after { content: " *"; color: var(--accent); }
.field:has([aria-invalid="true"]) > span:first-child { color: var(--danger); }
.field [aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 15%, transparent) !important; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section { display: grid; gap: 16px; }
.form-status { min-height: 20px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }
.password-wrap,
.password-field { position: relative; display: block; }
.password-wrap > input,
.password-field > input { padding-right: 52px !important; }
.password-wrap > button,
.password-field > button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.password-wrap > button:hover,
.password-field > button:hover { background: var(--surface-2); color: var(--ink); }

/* Authentication pages: deliberate form card, not raw browser controls. */
.auth-panel { border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-panel-head { margin-bottom: 24px; }
.auth-panel-head h2 { margin: 7px 0 8px; font-size: clamp(30px, 3vw, 42px); letter-spacing: -.045em; }
.auth-panel-head p { max-width: 460px; margin: 0; color: var(--ink-soft); line-height: 1.65; }
.auth-form { gap: 17px; }
.auth-submit { min-height: 54px; margin-top: 20px; }
.auth-password-grid { align-items: start; }
.auth-privacy-copy { color: var(--ink-faint); font-size: 10px; line-height: 1.55; }

/* Purpose-built workout setup. */
.plan-builder { overflow: hidden; box-shadow: var(--shadow-soft); }
.plan-builder-head {
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
  align-items: end;
  gap: 28px;
}
.plan-builder-head h2 { margin: 7px 0 7px; font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.04em; }
.plan-builder-head p { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.plan-builder-note { padding: 14px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.plan-builder-note strong,
.plan-builder-note span { display: block; }
.plan-builder-note strong { font-size: 12px; }
.plan-builder-note span { margin-top: 4px; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.plan-builder-form { display: grid; }
.setup-section { min-width: 0; margin: 0; padding: 24px 28px; border: 0; border-bottom: 1px solid var(--border); }
.setup-section > legend {
  width: 100%;
  margin: 0 0 17px;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.setup-section > legend > span:last-child { min-width: 0; }
.setup-section > legend strong,
.setup-section > legend small { display: block; }
.setup-section > legend strong { font-size: 15px; line-height: 1.35; }
.setup-section > legend small { margin-top: 3px; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.setup-step { width: 27px; height: 27px; flex: 0 0 27px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-size: 10px; font-weight: 900; }
.setup-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.setup-section-grid > .setup-section { border-bottom: 0; }
.setup-section-grid > .setup-section + .setup-section { border-left: 1px solid var(--border); }
.setup-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.setup-option-grid-equipment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setup-option { position: relative; min-width: 0; cursor: pointer; }
.setup-option > input,
.setup-segment input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.setup-option > span {
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--control-border);
  border-radius: 14px;
  background: var(--control-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.setup-option.compact > span { min-height: 98px; }
.setup-option strong,
.setup-option small { display: block; }
.setup-option strong { font-size: 12px; line-height: 1.35; }
.setup-option small { margin-top: 5px; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.setup-option:hover > span { transform: translateY(-2px); border-color: var(--control-border-hover); box-shadow: var(--shadow-soft); }
.setup-option > input:focus-visible + span { outline: 3px solid var(--control-ring); outline-offset: 2px; }
.setup-option > input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--control-ring); }
.setup-option > input:checked + span strong { color: var(--accent-strong); }
.setup-control-block { display: grid; gap: 9px; }
.setup-control-block + .setup-control-block { margin-top: 17px; }
.setup-segment { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.setup-segment-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.setup-segment label { position: relative; cursor: pointer; }
.setup-segment label > span {
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid var(--control-border);
  border-radius: 11px;
  background: var(--control-bg);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px;
  font-weight: 850;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}
.setup-segment label:hover > span { transform: translateY(-1px); border-color: var(--control-border-hover); color: var(--ink); }
.setup-segment input:focus-visible + span { outline: 3px solid var(--control-ring); outline-offset: 2px; }
.setup-segment input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--surface); box-shadow: 0 5px 14px color-mix(in srgb, var(--ink) 16%, transparent); }
.setup-preference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.setup-preference-grid .setup-control-block + .setup-control-block { margin-top: 0; }
.setup-preference-grid .setup-segment { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.setup-section-limitations { border-bottom: 0; }
.setup-section-limitations .field { max-width: 800px; }
.setup-status { min-height: 0; margin: 0 28px; border-radius: 13px; font-size: 11px; line-height: 1.55; }
.setup-status:not(:empty) { margin-top: 20px; padding: 13px 14px; border: 1px solid var(--border); background: var(--surface-2); }
.setup-status.is-running { color: var(--ink-soft); }
.setup-status.is-success { border-color: color-mix(in srgb, var(--success) 32%, var(--border)); background: var(--success-soft); color: var(--success); }
.setup-status.is-error { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.plan-builder-actions {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: var(--surface-2);
}
.plan-builder-actions > div { max-width: 650px; }
.plan-builder-actions strong,
.plan-builder-actions span { display: block; }
.plan-builder-actions strong { font-size: 12px; }
.plan-builder-actions span { margin-top: 3px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.plan-builder-actions .button { min-width: 190px; min-height: 50px; }
.plan-builder-actions .button.is-provider-blocked { opacity: .72; }

/* Onboarding result page must always use document scrolling and compact,
   reachable actions even when one provider is unavailable. */
body.page-onboarding_results { overflow-x: hidden !important; overflow-y: auto !important; }
body.page-onboarding_results #public-main { min-height: 100dvh; }
.results-shell-v2 { min-height: 100dvh; height: auto; overflow: visible; padding: 72px 18px 34px; align-items: flex-start; }
.results-card-v2 { width: min(100%, 1040px); margin: 0 auto; padding: clamp(24px, 4vw, 44px); }
.results-intro h1 { font-size: clamp(34px, 4vw, 54px); }
.setup-build-list { gap: 10px; }
.setup-build-item { min-height: 84px; padding: 16px 18px; }
.setup-ready-summary { margin-top: 20px; }
.setup-results-actions { position: sticky; bottom: 0; z-index: 6; padding: 14px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--surface) 76%, transparent); }

@media (max-width: 1050px) {
  .plan-builder-head { grid-template-columns: 1fr; align-items: start; }
  .plan-builder-note { max-width: 480px; }
  .setup-section-grid { grid-template-columns: 1fr; }
  .setup-section-grid > .setup-section + .setup-section { border-top: 1px solid var(--border); border-left: 0; }
  .setup-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-preference-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { --control-height: 50px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .auth-password-grid { grid-template-columns: 1fr; }
  .plan-builder-head,
  .setup-section,
  .plan-builder-actions { padding-left: 16px; padding-right: 16px; }
  .setup-option-grid,
  .setup-option-grid-equipment { grid-template-columns: 1fr; }
  .setup-option > span,
  .setup-option.compact > span { min-height: 88px; }
  .setup-segment { grid-template-columns: repeat(5, minmax(46px, 1fr)); overflow-x: auto; padding-bottom: 3px; }
  .setup-segment-wide { grid-template-columns: repeat(4, minmax(68px, 1fr)); }
  .plan-builder-actions { align-items: stretch; flex-direction: column; }
  .plan-builder-actions .button { width: 100%; min-width: 0; }
  .setup-status { margin-left: 16px; margin-right: 16px; }
  .results-shell-v2 { padding: 58px 10px 20px; }
  .results-card-v2 { padding: 22px 16px; }
  .setup-build-item { grid-template-columns: auto minmax(0, 1fr); }
  .setup-build-item > .button { grid-column: 1 / -1; width: 100%; }
  .setup-results-actions { display: grid; grid-template-columns: 1fr; }
}

/* ============================================================
   GGSmart onboarding results — compact three-stage flow v11
   ============================================================ */
body.page-onboarding_results {
  margin: 0 !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: var(--canvas) !important;
}
body.page-onboarding_results #public-main {
  min-height: 100dvh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
.setup-flow-page {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 22px clamp(18px, 3vw, 48px) 26px;
  background: var(--canvas);
  color: var(--ink);
  overflow: hidden;
}
.setup-flow-brandbar {
  min-height: 52px;
  display: flex;
  align-items: center;
}
.setup-flow-brandbar .brand { width: fit-content; }
.setup-flow-card {
  width: min(880px, 100%);
  min-height: 0;
  max-height: 100%;
  margin: 8px auto 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 22px 70px rgba(17, 24, 39, .08);
  overflow: hidden;
}
.setup-flow-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 30px 34px 24px;
  border-bottom: 1px solid var(--line);
}
.setup-flow-header h1 {
  margin: 7px 0 7px;
  max-width: 620px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: .98;
  letter-spacing: -.045em;
}
.setup-flow-header p {
  margin: 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.setup-flow-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.setup-flow-steps li {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 58px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: .02em;
}
.setup-flow-steps li span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 800;
}
.setup-flow-steps li strong { font-size: 10px; font-weight: 800; }
.setup-flow-steps li.is-active span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast, #111318);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent);
}
.setup-flow-steps li.is-active,
.setup-flow-steps li.is-complete { color: var(--ink); }
.setup-flow-steps li.is-complete span {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}
.setup-flow-steps li.is-error span {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}
.setup-flow-stage {
  min-height: 0;
  padding: clamp(26px, 5vh, 50px) 34px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-auto-rows: min-content;
  gap: 18px 24px;
  align-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.setup-flow-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--surface-subtle);
  color: var(--ink);
}
.setup-flow-icon .icon { width: 27px; height: 27px; }
.setup-flow-icon.is-success { background: var(--success-soft); color: var(--success); }
.setup-flow-icon.is-error { background: var(--danger-soft); color: var(--danger); }
.setup-flow-icon.is-working { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); }
.setup-flow-copy { align-self: center; }
.setup-flow-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.setup-flow-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.setup-flow-copy p {
  margin: 0;
  max-width: 660px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.setup-flow-reference {
  margin-top: 13px !important;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--ink-faint) !important;
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}
.setup-flow-macros {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.setup-flow-macros[hidden] { display: none !important; }
.setup-flow-macros article {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-subtle);
}
.setup-flow-macros span,
.setup-flow-macros small { display: block; color: var(--ink-faint); font-size: 10px; }
.setup-flow-macros strong { display: block; margin: 5px 0 2px; font-size: 23px; letter-spacing: -.03em; }
.setup-flow-spinner {
  grid-column: 1 / -1;
  width: 38px;
  height: 38px;
  margin: 4px auto 0;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ggsmartSpin .75s linear infinite;
}
.setup-flow-spinner[hidden] { display: none !important; }
@keyframes ggsmartSpin { to { transform: rotate(360deg); } }
.setup-flow-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 34px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.setup-flow-status { color: var(--ink-faint); font-size: 12px; font-weight: 700; }
.setup-flow-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.setup-flow-actions .button { min-height: 46px; white-space: nowrap; }
.setup-flow-actions [hidden] { display: none !important; }
[data-theme="dark"] .setup-flow-card {
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}
@media (max-width: 760px) {
  body.page-onboarding_results,
  body.page-onboarding_results #public-main { overflow: hidden !important; }
  .setup-flow-page { padding: 14px 12px 12px; }
  .setup-flow-brandbar { min-height: 46px; padding-left: 4px; }
  .setup-flow-card { margin-top: 4px; border-radius: 20px; }
  .setup-flow-header {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 20px 18px;
  }
  .setup-flow-header h1 { font-size: clamp(27px, 9vw, 38px); }
  .setup-flow-header p { font-size: 13px; }
  .setup-flow-steps { justify-content: flex-start; }
  .setup-flow-steps li { min-width: 54px; }
  .setup-flow-steps li strong { display: none; }
  .setup-flow-stage {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px 16px;
    align-content: start;
    padding: 24px 20px;
  }
  .setup-flow-icon { width: 52px; height: 52px; border-radius: 16px; }
  .setup-flow-copy h2 { font-size: 26px; }
  .setup-flow-copy p { font-size: 13px; }
  .setup-flow-macros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-flow-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  }
  .setup-flow-status { order: 2; text-align: center; }
  .setup-flow-actions { display: grid; grid-template-columns: 1fr; }
  .setup-flow-actions .button { width: 100%; }
  .setup-flow-actions .button-secondary:not([hidden]) + .button-accent { order: -1; }
}
@media (max-height: 700px) and (min-width: 761px) {
  .setup-flow-page { padding-top: 10px; padding-bottom: 12px; }
  .setup-flow-brandbar { min-height: 40px; }
  .setup-flow-card { margin-top: 2px; }
  .setup-flow-header { padding-top: 20px; padding-bottom: 17px; }
  .setup-flow-header h1 { font-size: 34px; }
  .setup-flow-stage { padding-top: 22px; padding-bottom: 22px; }
  .setup-flow-footer { padding-top: 13px; padding-bottom: 13px; }
}


/* ============================================================
   GGSmart consistency and usability pass — v1
   ============================================================ */
:root {
  --motion-fast: 140ms;
  --motion-standard: 170ms;
  --tap-target: 44px;
}

/* Motion should confirm an interaction, not move the interface around. */
.button,
.icon-button,
.nav-item,
.card-hover,
.quick-log,
.task-row,
.food-result,
.profile-mini,
.section-link {
  transition-duration: var(--motion-standard) !important;
}
.button:hover,
.icon-button:hover,
.card-hover:hover { transform: none; }
.button:active { transform: scale(.985); }
.nav-item:hover { transform: none; }
.card-hover:hover { box-shadow: var(--shadow-soft); }
@media (hover: hover) {
  .button:hover { filter: brightness(.985); }
  .icon-button:hover,
  .quick-log:hover,
  .task-row:not(:disabled):hover,
  .profile-mini:hover { border-color: var(--border-strong); background: var(--surface-2); }
}

/* Reliable touch and click targets. */
.button { min-height: var(--tap-target); }
.button-sm { min-height: 40px; }
.icon-button.small { width: 40px; height: 40px; }
.segmented-control button,
.workout-tabs button,
.profile-tabs button,
.choice-inline button { min-height: 42px; }
.section-link { min-height: 40px; padding: 0 2px; }
.quick-log,
.task-row,
.food-result,
.sheet-actions a,
.profile-tabs button { cursor: pointer; }

/* Stable password reveal button: never leaves the field on hover/focus/press. */
.password-wrap,
.password-field { isolation: isolate; }
.password-wrap > button,
.password-field > button,
.password-wrap > button:hover,
.password-field > button:hover,
.password-wrap > button:focus-visible,
.password-field > button:focus-visible,
.password-wrap > button:active,
.password-field > button:active {
  top: 50% !important;
  right: 6px !important;
  width: 40px !important;
  height: 40px !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}
.password-wrap > button:active,
.password-field > button:active { background: var(--surface-3); }

/* More consistent page rhythm and card interiors. */
.content { padding-top: 28px; }
.page-head,
.dashboard-head,
.page-heading-row { margin-bottom: 20px; }
.card-pad { padding: 20px; }
.section-head { margin-bottom: 15px; }
.dashboard-overview,
.dashboard-grid,
.progress-content-grid { gap: 16px; }
.modal-foot { gap: 9px; }
.modal-foot .button { min-width: 108px; }

/* Dashboard workout rows now communicate done / next / later clearly. */
.dashboard-exercise {
  min-height: 52px;
  margin: 0 -8px;
  padding: 9px 8px;
  border-bottom: 0;
  border-radius: 12px;
  transition: background var(--motion-standard), border-color var(--motion-standard);
}
.dashboard-exercise + .dashboard-exercise { margin-top: 2px; }
.dashboard-exercise:hover { background: var(--surface-2); }
.dashboard-exercise.is-next { background: var(--accent-soft); }
.dashboard-exercise.is-complete { background: var(--success-soft); }
.dashboard-exercise.is-complete .dashboard-exercise-index { background: var(--success); color: #fff; }
.dashboard-exercise.is-complete strong { color: var(--ink-soft); }
.dashboard-exercise.is-complete span,
.dashboard-exercise.is-complete small { color: var(--success); }
.dashboard-exercise.is-next .dashboard-exercise-index { background: var(--accent); color: #fff; }
.dashboard-exercise-index .icon { width: 15px; height: 15px; }

/* Progress page v2 */
.progress-page-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.progress-page-head h1 { margin: 5px 0 0; font-size: clamp(28px,3vw,40px); line-height: 1.05; letter-spacing: -.045em; }
.progress-page-head p { max-width: 680px; margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.progress-overview-v2 { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); gap: 16px; }
.progress-score-v2 { min-height: 260px; padding: 24px; display: grid; grid-template-columns: 160px minmax(0,1fr); align-items: center; gap: 26px; box-shadow: var(--shadow-soft); }
.progress-ring {
  --ring-color: var(--accent);
  width: 148px;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), var(--surface-3) 0);
  display: grid;
  place-items: center;
}
.progress-ring::before { content: ""; grid-area: 1/1; width: 100%; height: 100%; border-radius: 50%; background: var(--surface); }
.progress-ring > div { position: relative; z-index: 1; text-align: center; }
.progress-ring strong, .progress-ring span { display: block; }
.progress-ring strong { font-size: 43px; line-height: .95; letter-spacing: -.065em; }
.progress-ring span { margin-top: 6px; color: var(--ink-faint); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.progress-score-copy h2 { margin: 9px 0 8px; font-size: clamp(24px,2.4vw,33px); line-height: 1.08; letter-spacing: -.04em; }
.progress-score-copy p { max-width: 590px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.progress-focus-card { min-height: 260px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; background: var(--ink); color: var(--surface); border-color: var(--ink); }
.progress-focus-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb,var(--surface) 11%,transparent); color: var(--accent); }
.progress-focus-card h2 { margin: 9px 0 8px; font-size: 23px; line-height: 1.12; letter-spacing: -.035em; }
.progress-focus-card p { margin: 0; color: color-mix(in srgb,var(--surface) 68%,transparent); font-size: 12px; line-height: 1.6; }
.progress-driver-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.progress-driver-card { min-height: 132px; padding: 17px; box-shadow: none; }
.progress-driver-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.progress-driver-top span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.progress-driver-top strong { font-size: 21px; letter-spacing: -.04em; }
.progress-driver-card small { display: block; margin-top: 12px; color: var(--ink-faint); font-size: 9px; line-height: 1.45; }
.progress-content-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr); gap: 16px; }
.progress-chart { height: 250px; margin-top: 10px; overflow: hidden; border-radius: 14px; background: linear-gradient(to bottom,var(--surface-2),transparent); }
.progress-chart svg { width: 100%; height: 100%; overflow: visible; }
.progress-chart line { stroke: var(--border); stroke-width: .45; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.progress-chart polyline { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.progress-chart circle { fill: var(--accent); stroke: var(--surface); stroke-width: 1; vector-effect: non-scaling-stroke; }
.progress-chart-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 11px; color: var(--ink-faint); font-size: 9px; }
.progress-chart-meta strong { color: var(--ink); font-size: 10px; text-align: center; }
.progress-review-list { display: grid; gap: 9px; }
.progress-review { min-height: 70px; padding: 11px; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; align-items: start; border: 1px solid var(--border); border-radius: 13px; }
.progress-review-icon, .progress-empty-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.progress-review strong { display: block; font-size: 11px; }
.progress-review p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.progress-review-card .empty-state.compact,
.progress-chart-card .empty-state.compact { min-height: 220px; display: grid; place-items: center; align-content: center; text-align: center; }
@media (max-width: 1020px) {
  .progress-overview-v2,
  .progress-content-grid { grid-template-columns: 1fr; }
  .progress-focus-card { min-height: 210px; }
  .progress-driver-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .content { padding-top: 20px; }
  .progress-page-head { align-items: flex-start; }
  .progress-page-head > .button { width: 44px; padding: 0; font-size: 0; }
  .progress-score-v2 { min-height: 0; padding: 19px; grid-template-columns: 104px minmax(0,1fr); gap: 16px; }
  .progress-ring { width: 100px; padding: 9px; }
  .progress-ring strong { font-size: 32px; }
  .progress-score-copy h2 { font-size: 21px; }
  .progress-score-copy p { font-size: 11px; }
  .progress-driver-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .progress-driver-card { min-height: 120px; padding: 14px; }
  .progress-chart { height: 210px; }
  .modal-foot { position: sticky; bottom: 0; background: var(--surface); }
}
@media (max-width: 460px) {
  .progress-score-v2 { grid-template-columns: 1fr; text-align: center; }
  .progress-ring { margin: 0 auto; }
  .progress-driver-grid { grid-template-columns: 1fr; }
  .progress-chart-meta strong { max-width: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   GGSmart visual hotfix v2 — progress ring + nutrition controls
   ============================================================ */

/* Keep the score ring layers in one cell. The previous grid auto-placement
   could put the inner disc and score in different tracks. */
.progress-ring {
  position: relative;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}
.progress-ring::before {
  position: absolute;
  inset: 12px;
  width: auto;
  height: auto;
  grid-area: auto;
  z-index: 0;
}
.progress-ring > div {
  grid-area: auto;
  position: relative;
  z-index: 1;
}

/* The Nutrition view already outputs seven date cards, but the class rules
   were missing. Give every day a stable, readable, clickable target. */
.date-strip {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(56px, 1fr)) 44px;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 16px;
  padding: 2px 0 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.date-strip > .icon-button {
  align-self: stretch;
  width: 44px;
  min-width: 44px;
  height: auto;
  min-height: 62px;
}
.date-card {
  min-width: 56px;
  min-height: 62px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  text-align: center;
  text-decoration: none;
  transition: border-color var(--motion-standard), background var(--motion-standard), color var(--motion-standard);
}
.date-card span {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.date-card strong {
  font-size: 15px;
  line-height: 1;
  letter-spacing: -.03em;
}
.date-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.date-card.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.date-card.active span { color: color-mix(in srgb, var(--surface) 70%, transparent); }

/* Remove the accidental nested empty space and give the totals a proper
   hierarchy instead of running all text together. */
.nutrition-overview { padding: 6px 0 2px; }
.calorie-block {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 4px 6px;
}
.calorie-block > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}
.calorie-block > strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.04em;
}
.calorie-block > small {
  color: var(--ink-faint);
  font-size: 11px;
}
.calorie-block > .progress-track {
  grid-column: 1 / -1;
  margin-top: 7px;
}
.nutrition-overview .macro-bars {
  gap: 12px;
  margin-top: 18px;
}
.nutrition-overview .macro-row {
  grid-template-columns: 76px minmax(0, 1fr) minmax(72px, auto);
  gap: 12px;
}
.nutrition-overview .macro-row > strong {
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 700px) {
  .progress-ring::before { inset: 9px; }
  .date-strip {
    grid-template-columns: 44px repeat(7, 54px) 44px;
    gap: 7px;
  }
  .date-card { min-width: 54px; }
  .nutrition-overview .macro-row {
    grid-template-columns: 64px minmax(0, 1fr) minmax(64px, auto);
    gap: 8px;
  }
}

@media (max-width: 430px) {
  .calorie-block { grid-template-columns: auto 1fr; }
  .calorie-block > small { grid-column: 1 / -1; }
  .nutrition-overview .macro-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .nutrition-overview .macro-row > strong {
    grid-column: 2;
    margin-top: -3px;
  }
}
