/* Fitness Buddy: hand-written CSS ported from the Stitch "Energetic Dark"
   direction (default) with a light theme derived from the "Fresh Health"
   direction (system preference or the manual theme switch). No framework, no build step. */

/* ------------------------------------------------------------------ fonts */
/* Inter and Space Grotesk, SIL Open Font License 1.1 (see fonts/OFL-*.txt). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/static/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/static/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------------- tokens */
/* Theme selection. Dark (direction B) is the default; light (direction A) when
   the user picks it (data-theme="light", set by js/theme.js) or when the system
   prefers light and no manual choice was made (no data-theme attribute).
   The selectors below only switch `color-scheme`; every color token is defined
   once with light-dark(LIGHT, DARK), so the light palette is not duplicated. */
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { color-scheme: light; }
}

:root {
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei";
  --font-head: "Space Grotesk", "Inter", var(--font-cjk), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", var(--font-cjk), ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 0.5rem;
  --r: 1rem;
  --r-lg: 1.5rem;
  --r-xl: 1.75rem;
  --r-full: 9999px;
  --tabbar-h: 72px;
  --rail-w: 88px;
  --coach-w: 400px;
  --shadow: 0 12px 32px var(--shadow-color);
  --shadow-sm: 0 2px 10px var(--shadow-sm-color);

  /* Fallback for browsers without light-dark(): the dark palette. */
  --bg: #0A0D10;
  --surface: #0F1215;
  --card: #181C22;
  --elevated: #212730;
  --inset: #12161B;
  --line: #262D37;
  --line-soft: rgba(148, 163, 184, 0.12);
  --text: #F1F4F8;
  --text-strong: #FFFFFF;
  --muted: #94A3B8;
  --primary: #C6F432;
  --primary-hover: #D4FA5C;
  --on-primary: #0A1201;
  --primary-text: #C6F432;
  --primary-soft: rgba(198, 244, 50, 0.12);
  --on-primary-soft: #C6F432;
  --primary-border: rgba(198, 244, 50, 0.32);
  --primary-glow: rgba(198, 244, 50, 0.10);
  --secondary: #22D3EE;
  --fat: #FBBF24;
  --streak: #FBBF24;
  --warn: #FF6B4A;
  --warn-text: #FF8A70;
  --warn-soft: rgba(255, 107, 74, 0.14);
  --ok: #4ADE80;
  --bar: rgba(198, 244, 50, 0.6);
  --bar-empty: #2A313B;
  /* Progress tracks, chart gridlines/spinner rings, and form-field outlines.
     Dark values equal what those rules used before (--elevated / --line). */
  --track: #212730;
  --grid: #262D37;
  --field-line: #262D37;
  --danger: #FF6B4A;
  --on-danger: #0A0D10;
  --danger-text: #FF8A70;
  --danger-soft: rgba(255, 107, 74, 0.14);
  --overlay: rgba(10, 13, 16, 0.86);
  --shadow-color: rgba(0, 0, 0, 0.35);
  --shadow-sm-color: rgba(0, 0, 0, 0.25);
}

@supports (color: light-dark(#000, #fff)) {
  :root {
    --bg: light-dark(#F6F8F7, #0A0D10);
    --surface: light-dark(#F8FAFC, #0F1215);
    --card: light-dark(#FFFFFF, #181C22);
    --elevated: light-dark(#F1F5F9, #212730);
    --inset: light-dark(#F8FAFC, #12161B);
    --line: light-dark(#E2E8F0, #262D37);
    --line-soft: light-dark(#E2E8F0, rgba(148, 163, 184, 0.12));
    --text: light-dark(#0F172A, #F1F4F8);
    --text-strong: light-dark(#0F172A, #FFFFFF);
    --muted: light-dark(#526075, #94A3B8);
    --primary: light-dark(#0F766E, #C6F432);
    --primary-hover: light-dark(#115E59, #D4FA5C);
    --on-primary: light-dark(#FFFFFF, #0A1201);
    --primary-text: light-dark(#0F766E, #C6F432);
    --primary-soft: light-dark(#CCFBF1, rgba(198, 244, 50, 0.12));
    --on-primary-soft: light-dark(#115E59, #C6F432);
    --primary-border: light-dark(rgba(15, 118, 110, 0.35), rgba(198, 244, 50, 0.32));
    --primary-glow: light-dark(rgba(20, 184, 166, 0.10), rgba(198, 244, 50, 0.10));
    --secondary: light-dark(#F59E0B, #22D3EE);
    --fat: light-dark(#EC4899, #FBBF24);
    --streak: light-dark(#EA580C, #FBBF24);
    --warn: light-dark(#F97316, #FF6B4A);
    --warn-text: light-dark(#C2410C, #FF8A70);
    --warn-soft: light-dark(#FFEDD5, rgba(255, 107, 74, 0.14));
    --ok: light-dark(#16A34A, #4ADE80);
    --bar: light-dark(rgba(15, 118, 110, 0.55), rgba(198, 244, 50, 0.6));
    --bar-empty: light-dark(#CBD5E1, #2A313B);
    --track: light-dark(#E2E8F0, #212730);
    --grid: light-dark(#CBD5E1, #262D37);
    --field-line: light-dark(#8492A6, #262D37);
    --danger: light-dark(#B91C1C, #FF6B4A);
    --on-danger: light-dark(#FFFFFF, #0A0D10);
    --danger-text: light-dark(#B91C1C, #FF8A70);
    --danger-soft: light-dark(#FEE2E2, rgba(255, 107, 74, 0.14));
    --overlay: light-dark(rgba(248, 250, 252, 0.9), rgba(10, 13, 16, 0.86));
    --shadow-color: light-dark(rgba(15, 23, 42, 0.08), rgba(0, 0, 0, 0.35));
    --shadow-sm-color: light-dark(rgba(15, 23, 42, 0.06), rgba(0, 0, 0, 0.25));
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text-strong); margin: 0; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: var(--primary-text); }
img { max-width: 100%; }
[hidden] { display: none !important; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 8px; }

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; vertical-align: middle; }
.accent { color: var(--primary-text); }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.strong { font-weight: 600; color: var(--text-strong); }
.strong.accent { color: var(--primary-text); }
.desktop-only { display: none; }
.noscript { padding: 24px; text-align: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-full); border: 1px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 20px var(--primary-glow); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--elevated); color: var(--text); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary-border); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--primary-border); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 0.875rem; }
.btn-xl { min-height: 56px; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; }
.btn-block { width: 100%; }
.btn-center { margin: 0 auto; display: flex; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--r-full); border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--primary-text); background: var(--elevated); }
.icon-btn .icon { width: 24px; height: 24px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--primary-text); font-weight: 700; font-size: 0.875rem;
}
.link-btn:hover { text-decoration: underline; }
.link-btn .icon { width: 18px; height: 18px; transition: transform 0.15s ease; }
.link-btn:hover .icon { transform: translateX(2px); }
.text-btn { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted); font-weight: 600; }
.text-btn:hover { color: var(--text); }

/* ---------------------------------------------------------- pills & chips */
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; border-radius: var(--r-full);
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
}
.pill .icon { width: 16px; height: 16px; }
.pill-primary { background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); }
.pill-warn { background: var(--warn-soft); color: var(--warn-text); border: 1px solid transparent; }
.pill-outline { border: 1px solid var(--primary-border); color: var(--primary-text); background: var(--primary-soft); }
.tag-muted { font-size: 0.75rem; font-weight: 500; padding: 3px 9px; border-radius: var(--r-sm); background: var(--elevated); color: var(--muted); }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: var(--r-full); background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); margin-left: 6px; vertical-align: 1px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-full);
  background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; font-weight: 500;
}
.chip strong { color: var(--text-strong); font-weight: 600; }
.chip .icon { width: 16px; height: 16px; }
.chip .streak { color: var(--streak); }
.eyebrow { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--primary-text); }

/* ------------------------------------------------------------------ cards */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-heading { display: flex; align-items: center; gap: 8px; }
.card-heading h2 { font-size: 1.05rem; font-weight: 700; }
.card-heading .icon { width: 22px; height: 22px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 0.875rem; }
.card .sub { margin: -10px 0 12px; }
.round-icon { display: inline-flex; width: 36px; height: 36px; border-radius: var(--r-full); background: var(--elevated); color: var(--muted); align-items: center; justify-content: center; }
.round-icon .icon { width: 20px; height: 20px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 12px 4px; }
.empty h3 { font-size: 1.05rem; }
.empty p { max-width: 34ch; font-size: 0.9rem; }
.empty .btn { margin-top: 4px; }
.empty-icon { display: inline-flex; width: 52px; height: 52px; border-radius: var(--r-full); align-items: center; justify-content: center; background: var(--primary-soft); color: var(--on-primary-soft); }
.empty-icon .icon { width: 28px; height: 28px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ app shell */
.shell {
  height: 100vh; height: 100dvh; display: grid;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  background: var(--surface);
}
.main { grid-row: 1; grid-column: 1; overflow-y: auto; overscroll-behavior: contain; }
.coach { grid-row: 1; grid-column: 1; display: none; min-height: 0; flex-direction: column; background: var(--surface); }
.shell[data-route="coach"] .main { display: none; }
.shell[data-route="coach"] .coach { display: flex; }
.rail { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--overlay); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.wordmark { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--primary-text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.menu-wrap { position: relative; }
.avatar-btn { width: 44px; height: 44px; padding: 3px; border-radius: var(--r-full); border: 0; background: none; }
.avatar {
  display: inline-flex; width: 38px; height: 38px; border-radius: var(--r-full); overflow: hidden; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--on-primary-soft); font-family: var(--font-head); font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 0 0 2px var(--primary-border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 30; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.menu-email { padding: 8px 10px; font-size: 0.8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu-email:empty { display: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-weight: 600; }
.menu-item:hover { background: var(--elevated); }
.menu-label { padding: 10px 10px 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.menu-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; margin: 0 4px 6px; border-radius: var(--r-full); background: var(--elevated); border: 1px solid var(--line); }
.menu-seg button { min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--muted); font-weight: 600; font-size: 0.8125rem; white-space: nowrap; }
.menu-seg button:hover { color: var(--text); }
.menu-seg button.active { background: var(--primary); color: var(--on-primary); }
.menu-group { display: grid; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.menu-group:empty { display: none; }
a.menu-item { color: var(--text); text-decoration: none; }
.menu-item > .icon { width: 20px; height: 20px; color: var(--muted); }
.menu-item .menu-ext { width: 16px; height: 16px; margin-left: auto; }
.menu-item.danger, .menu-item.danger > .icon { color: var(--danger-text); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu { min-width: 260px; }
.lang-seg.standalone, #landing-lang .menu-seg, .ob-footer .menu-seg { display: inline-grid; margin: 8px auto 0; min-width: 160px; background: var(--card); }

.view { max-width: 640px; margin: 0 auto; padding: 4px 16px 28px; }

/* Tab bar */
.tabbar {
  grid-row: 2; grid-column: 1; display: flex; justify-content: space-around; align-items: center; gap: 4px;
  padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); z-index: 25;
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 64px; min-height: 52px; padding: 4px 14px; border-radius: var(--r-full);
  color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600; transition: background-color 0.15s ease, color 0.15s ease;
}
.tab .icon { width: 22px; height: 22px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 700; }
.unread { position: absolute; top: 6px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px var(--card); }

/* ------------------------------------------------------------------ TODAY */
.greeting { padding: 4px 0 18px; }
.greeting-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.greeting h1 { font-size: 1.6rem; font-weight: 700; }
.greeting .date { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.page-head { padding: 8px 0 16px; }
.page-head h1 { font-size: 1.75rem; font-weight: 700; }
.page-head p { margin-top: 4px; }
.dot-sep { color: var(--muted); padding: 0 2px; }

.dash-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.today-grid { grid-template-areas: "hero" "quick" "tip" "workout" "meals"; }
.area-tip { grid-area: tip; } .area-hero { grid-area: hero; } .area-quick { grid-area: quick; }
.area-weight { grid-area: weight; display: none; } .area-workout { grid-area: workout; } .area-meals { grid-area: meals; }

.hero { overflow: hidden; }
.glow { position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: var(--primary-glow); filter: blur(30px); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.ring-col { display: grid; justify-items: center; gap: 10px; }
.ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ring-wrap.small .ring { width: 96px; height: 96px; }
.ring-track { stroke: var(--track); }
.ring-value { stroke: var(--primary); transition: stroke-dasharray 0.6s ease; }
.ring-value.over { stroke: var(--warn); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-value-text { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--text-strong); letter-spacing: -0.02em; }
.ring-value-text.sm { font-size: 1.25rem; }
.ring-sub { font-size: 0.68rem; color: var(--muted); margin-top: 3px; font-weight: 500; }
.macros { display: grid; gap: 14px; }
.macro-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.8125rem; margin-bottom: 6px; }
.macro-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-strong); }
.macro-val { color: var(--muted); font-weight: 500; white-space: nowrap; }
.macro-val b, .macro-row b { color: var(--text-strong); font-weight: 700; }
.swatch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.macro.protein .swatch, .macro.protein .bar-track span { color: var(--primary); background: var(--primary); }
.macro.carbs .swatch, .macro.carbs .bar-track span { color: var(--secondary); background: var(--secondary); }
.macro.fat .swatch, .macro.fat .bar-track span { color: var(--fat); background: var(--fat); }
.bar-track { height: 8px; border-radius: var(--r-full); background: var(--track); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: inherit; transition: width 0.6s ease; }
.bar-track.over span { background: var(--warn) !important; }

.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 12px 6px;
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); color: var(--text);
  font-size: 0.8125rem; font-weight: 600; transition: border-color 0.15s ease, transform 0.12s ease;
}
.quick .icon { width: 26px; height: 26px; }
.quick:hover { border-color: var(--primary-border); }
.quick:active { transform: scale(0.97); }

.tip { display: flex; gap: 12px; align-items: flex-start; border-color: var(--primary-border); background: linear-gradient(100deg, var(--card) 55%, var(--primary-glow)); }
.tip-icon { flex: none; display: inline-flex; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); }
.tip-icon .icon { width: 22px; height: 22px; }
.tip-body { display: grid; gap: 4px; min-width: 0; }
.tip-text { font-size: 0.9rem; line-height: 1.55; color: var(--text); }
.tip-text strong { color: var(--text-strong); }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.workout-title { font-size: 1.2rem; font-weight: 700; margin-top: 2px; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.8125rem; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.meta-row span { display: inline-flex; align-items: center; gap: 4px; }
.meta-row .icon { width: 16px; height: 16px; }
.ex-preview { display: grid; gap: 8px; margin-bottom: 14px; }
.ex-preview li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--inset); font-size: 0.875rem; }
.num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--elevated); color: var(--primary-text); font-family: var(--font-head); font-weight: 700; font-size: 0.75rem; flex: none; }
.ex-name { font-weight: 600; color: var(--text-strong); }
.ex-spec { font-family: var(--font-head); font-weight: 700; color: var(--muted); white-space: nowrap; }
.workout .link-btn { margin: -6px 0 6px; }
.workout.rest p { margin-bottom: 12px; }
.next-up { font-size: 0.9rem; }

.meals { display: grid; gap: 10px; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 2px 2px; }
.section-header h2 { font-size: 1.05rem; font-weight: 700; }
.meal-list { display: grid; gap: 10px; }
.meal-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.meal-icon { display: inline-flex; width: 48px; height: 48px; border-radius: 14px; align-items: center; justify-content: center; background: var(--elevated); color: var(--primary-text); }
.meal-icon .icon { width: 24px; height: 24px; }
.meal-text { min-width: 0; }
.meal-name { font-weight: 600; color: var(--text-strong); font-size: 0.925rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.meal-kcal { display: grid; justify-items: end; line-height: 1.15; }
.meal-kcal b { font-family: var(--font-head); font-size: 1rem; color: var(--text-strong); }
.meal-kcal span { font-size: 0.7rem; color: var(--muted); }
.add-row {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: var(--r-lg);
  border: 2px dashed var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 0.875rem;
}
.add-row:hover { border-color: var(--primary-border); color: var(--primary-text); }
.add-row .icon { width: 20px; height: 20px; }

.big-number { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.big-number .num { all: unset; font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: var(--text-strong); letter-spacing: -0.03em; line-height: 1.05; }
.big-number .unit { color: var(--muted); font-size: 1rem; font-weight: 600; }
.big-number .delta { color: var(--primary-text); font-weight: 700; font-size: 0.875rem; margin-left: 6px; }
.weight-mini .big-number .num { font-size: 2rem; }

/* --------------------------------------------------------------- PROGRESS */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--card); border: 1px solid var(--line); margin-bottom: 16px; }
.segmented > button, .segmented .radio-face {
  min-height: 44px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--muted);
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center;
}
.segmented > button.active, .segmented input:checked + .radio-face { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px var(--primary-glow); }
.segmented > button:hover:not(.active) { color: var(--text); }
.progress-grid .span-2 { grid-column: 1 / -1; }
.weight-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.weight-delta { display: grid; justify-items: end; gap: 6px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-dasharray: 4 5; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: var(--font-body); }
.weight-chart .line { stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.weight-chart .dot { fill: var(--muted); opacity: 0.75; }
.weight-chart .end-dot { fill: var(--primary); stroke: var(--card); stroke-width: 2; }
.area-stop-top { stop-color: var(--primary); stop-opacity: 0.22; }
.area-stop-bottom { stop-color: var(--primary); stop-opacity: 0; }
.x-labels { display: flex; justify-content: space-between; padding: 8px 0 0 30px; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line-soft); margin-top: 6px; }
.legend { display: flex; justify-content: center; gap: 22px; margin-top: 12px; font-size: 0.8125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.lg-line { width: 20px; height: 3px; border-radius: 2px; background: var(--primary); display: inline-block; }
.kcal-chart .bar { fill: var(--bar); }
.kcal-chart .bar.today { fill: var(--primary); }
.kcal-chart .bar.over { fill: var(--warn); }
.kcal-chart .bar.empty { fill: var(--bar-empty); }
.kcal-chart .target-line { stroke: var(--primary); stroke-opacity: 0.7; stroke-dasharray: 5 4; stroke-width: 1.2; }
.kcal-chart .target-label { fill: var(--primary-text); font-weight: 600; }
.chart-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 0.75rem; }
.chart-foot .strong { font-size: 0.78rem; text-align: center; }
.hit-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px 6px; justify-items: center; padding: 4px 0; }
.hit { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.hit .icon { width: 18px; height: 18px; }
.hit.is-hit { background: var(--primary); color: var(--on-primary); }
.hit.is-miss { border: 2px solid var(--warn); color: var(--warn-text); }
.hit.is-none { border: 1.5px dashed var(--grid); color: var(--muted); }
.workouts-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.history { display: grid; gap: 8px; }
.history-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line-soft); }
.history-bars li { display: grid; justify-items: center; gap: 6px; }
.hbar-track { display: flex; align-items: flex-end; width: 100%; height: 44px; }
.hbar { width: 100%; border-radius: 6px; background: var(--bar); }
.history-bars li.now .hbar { background: var(--primary); }
.hlabel { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.history-bars li.now .hlabel { color: var(--primary-text); }

/* ------------------------------------------------------------------- PLAN */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-strip.big { margin-bottom: 18px; }
.week-strip.big .day-pill {
  display: grid; justify-items: center; align-content: start; gap: 2px; width: 100%; min-height: 92px; padding: 10px 2px;
  border-radius: var(--r-full); border: 1px solid var(--line-soft); background: var(--card); color: var(--muted); font: inherit;
}
.week-strip.big button.day-pill:hover { border-color: var(--primary-border); }
.week-strip.big .dow { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.week-strip.big .date { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--text-strong); }
.week-strip.big .rest .date { color: var(--muted); }
.week-strip.big .rest-label { font-size: 0.7rem; }
.week-strip.big .train-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 6px; }
.week-strip.big .done-icon { width: 22px; height: 22px; color: var(--ok); }
.week-strip.big .day-pill.today { background: var(--primary); color: var(--on-primary); border-color: var(--primary); box-shadow: 0 6px 18px var(--primary-glow); }
.week-strip.big .day-pill.today .date { color: var(--on-primary); }
.today-tag { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--on-primary); color: var(--primary); border-radius: var(--r-full); padding: 1px 6px; margin-top: 4px; }

.session-list { display: grid; gap: 14px; }
.session-card { padding: 0; overflow: hidden; }
.session-card.is-today { border-color: var(--primary-border); }
.session-card summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; min-height: 64px; }
.session-card summary::-webkit-details-marker { display: none; }
.status-icon { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; background: var(--elevated); color: var(--primary-text); flex: none; }
.status-icon.done { color: var(--ok); }
.status-icon .icon { width: 22px; height: 22px; }
.session-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.session-meta-top { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.session-meta-top span { display: inline-flex; align-items: center; gap: 3px; }
.session-meta-top .icon { width: 14px; height: 14px; }
.session-card.is-today .session-meta-top > span:first-child { color: var(--primary-text); font-weight: 700; }
.session-title { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--text-strong); }
.chev { width: 24px; height: 24px; color: var(--muted); transition: transform 0.2s ease; flex: none; }
details[open] > summary .chev { transform: rotate(180deg); }
.plan-exercises { display: grid; gap: 8px; padding: 0 16px; }
.plan-exercises li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line-soft); }
.plan-exercises .num { margin-top: 2px; }
.ex-body { min-width: 0; }
.ex-body .ex-name { font-size: 0.95rem; }
.ex-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.ex-sub .tag { margin-left: 0; }
.plan-exercises .ex-spec { color: var(--primary-text); font-size: 0.9rem; }
.session-actions { display: grid; gap: 10px; padding: 16px; }
.plan-side { display: grid; gap: 16px; align-content: start; }

/* ------------------------------------------------------------------ COACH */
.coach-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line-soft); background: var(--surface);
}
.coach-titles { flex: 1; min-width: 0; }
.coach-titles h2 { font-size: 1.3rem; font-weight: 700; }
.coach-titles p { font-size: 0.8125rem; color: var(--muted); }
.bot-avatar { position: relative; flex: none; display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); }
.bot-avatar .icon { width: 20px; height: 20px; }
.bot-avatar.lg { width: 48px; height: 48px; }
.bot-avatar.lg .icon { width: 26px; height: 26px; }
.bot-avatar.solid { background: var(--primary); color: var(--on-primary); }
.bot-avatar.spacer { display: none; }
.online { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }

.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.day-divider { align-self: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 5px 14px; border-radius: var(--r-full); background: var(--card); }
.row { display: flex; gap: 10px; align-items: flex-start; }
.row.from-user { justify-content: flex-end; }
.row.system { justify-content: center; }
.row.indent { padding-left: 46px; }
.row-body { min-width: 0; flex: 1; display: grid; gap: 6px; justify-items: start; }
.row.from-coach .bubble, .row.from-coach .chat-card { max-width: min(560px, 100%); }
.author { font-size: 0.72rem; font-weight: 700; color: var(--primary-text); text-transform: uppercase; letter-spacing: 0.06em; }
.bubble { padding: 12px 16px; border-radius: 20px; font-size: 0.95rem; line-height: 1.55; overflow-wrap: anywhere; }
.bubble-coach { background: var(--card); border: 1px solid var(--line-soft); border-top-left-radius: 6px; color: var(--text); }
.bubble-user { max-width: min(82%, 520px); background: var(--elevated); border: 1px solid var(--line); border-top-right-radius: 6px; color: var(--text-strong); }
.bubble-user p { white-space: pre-wrap; }
.bubble .attached { display: block; max-height: 260px; width: 100%; object-fit: cover; border-radius: 14px; margin-bottom: 8px; }
.photo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.md p + p, .md p + ul, .md p + ol, .md ul + p, .md ol + p, .md h4 + p { margin-top: 8px; }
.md ul, .md ol { padding-left: 1.2em; margin: 6px 0; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li + li { margin-top: 3px; }
.md h4 { font-size: 1rem; margin: 10px 0 4px; }
.md strong { color: var(--text-strong); }
.md code { font-size: 0.85em; background: var(--elevated); padding: 1px 5px; border-radius: 5px; }
.table-wrap { overflow-x: auto; margin: 8px 0; }
.md table { border-collapse: collapse; font-size: 0.85rem; min-width: 100%; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: nowrap; }
.md th { color: var(--muted); font-weight: 600; }
.msg-error { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn-text); font-size: 0.875rem; font-weight: 500; }
.boot-error { margin: 24px; }
.decision { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); padding: 4px 12px; border-radius: var(--r-full); background: var(--card); }
.decision.yes .icon { color: var(--primary-text); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.activity-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 0.8125rem; }
.activity-chip .icon { width: 16px; height: 16px; color: var(--primary-text); }
.activity { display: flex; align-items: center; gap: 10px; padding: 6px 18px; font-size: 0.8125rem; color: var(--muted); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 4px; scrollbar-width: none; flex: none; }
.suggestions::-webkit-scrollbar { display: none; }
.suggestion { flex: none; min-height: 44px; padding: 0 16px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 500; font-size: 0.875rem; white-space: nowrap; }
.suggestion:hover:not(:disabled) { border-color: var(--primary-border); color: var(--primary-text); }

.composer { flex: none; padding: 8px 12px 12px; }
.composer-row { display: flex; align-items: flex-end; gap: 4px; padding: 6px; border-radius: 28px; background: var(--card); border: 1px solid var(--grid); }
.composer-row:focus-within { border-color: var(--primary-border); }
.composer-row .icon-btn { cursor: pointer; }
.composer-row label.icon-btn:focus-within { outline: 2px solid var(--primary); }
#message-input {
  flex: 1; min-width: 0; min-height: 44px; max-height: 140px; resize: none; border: 0; background: transparent; padding: 11px 6px;
  font-size: 1rem; line-height: 1.4; color: var(--text);
}
#message-input::placeholder { color: var(--muted); }
#message-input:focus-visible { outline: none; }
.send-btn { flex: none; display: inline-flex; width: 44px; height: 44px; border-radius: 50%; border: 0; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); }
.send-btn .icon { width: 24px; height: 24px; }
.send-btn:hover:not(:disabled) { background: var(--primary-hover); }
.photo-preview { position: relative; display: inline-block; margin: 0 0 8px 6px; }
.photo-preview img { display: block; height: 76px; width: auto; border-radius: 12px; border: 1px solid var(--line); }
.photo-remove { position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); background: var(--elevated); color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.photo-remove::before { content: ""; position: absolute; inset: -6px; }
.photo-remove .icon { width: 18px; height: 18px; }

/* ------------------------------------------------------------ chat cards */
.chat-card { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 14px; }
.confirm-card { border-color: var(--primary-border); border-width: 1.5px; padding: 0; gap: 0; overflow: hidden; }
.confirm-card > * { padding-left: 18px; padding-right: 18px; }
.confirm-card > :first-child { padding-top: 18px; }
.confirm-card > .card-head { padding-bottom: 14px; }
.card-head { display: grid; gap: 8px; justify-items: start; }
.card-title { font-size: 1.1rem; font-weight: 700; }
.card-summary { font-size: 0.875rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-full); font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.badge .icon { width: 14px; height: 14px; }
.badge-ok { background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); }
.badge-warn { background: var(--primary); color: var(--on-primary); }
.item-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 0.9rem; }
.item-rows li:last-child { border-bottom: 1px solid var(--line-soft); }
.item-name { color: var(--text); }
.item-kcal { font-weight: 700; color: var(--text-strong); white-space: nowrap; }
.totals-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 12px 14px; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line-soft); font-size: 0.875rem; }
.totals-row .icon { color: var(--primary-text); width: 20px; height: 20px; }
.totals strong { color: var(--primary-text); }
.estimate { grid-column: 2; justify-self: start; font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-full); padding: 1px 8px; }
.day-progress { font-size: 0.85rem; color: var(--text-strong); font-weight: 600; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card-actions .btn { flex: 1 1 auto; padding: 0 16px; font-size: 0.9rem; }
.confirm-card .card-actions { padding-top: 16px; padding-bottom: 18px; }
.decided { display: flex; align-items: center; gap: 8px; padding-top: 14px; padding-bottom: 16px; font-weight: 700; font-size: 0.9rem; }
.decided.yes { color: var(--primary-text); }
.decided.no { color: var(--muted); }
.confirm-card[data-state] { border-color: var(--line); }
.card-band { background: var(--inset); padding-top: 14px; padding-bottom: 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.card-band .eyebrow { margin-bottom: 10px; }
.week-strip.compact { gap: 4px; }
.week-strip.compact .day-pill { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: var(--r); font-size: 0.72rem; color: var(--muted); }
.week-strip.compact .dow { font-weight: 500; }
.week-strip.compact .focus { font-weight: 600; }
.week-strip.compact .train { background: var(--elevated); border: 1px solid var(--primary-border); color: var(--text-strong); }
.week-strip.compact .train .focus { color: var(--primary-text); font-weight: 700; }
.session-rows { display: grid; gap: 10px; padding-top: 14px; padding-bottom: 4px; }
.session-row { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.session-row[open] { border-color: var(--primary-border); }
.session-row summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 56px; }
.session-row summary::-webkit-details-marker { display: none; }
.session-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; }
.session-row .session-title { font-size: 0.95rem; }
.session-row[open] .session-title { color: var(--primary-text); }
.session-meta { font-size: 0.78rem; color: var(--muted); }
.exercise-list { display: grid; gap: 6px; padding: 0 12px 12px; }
.exercise-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--inset); font-size: 0.875rem; }
.exercise-list .ex-name { font-weight: 500; }
.exercise-list .ex-spec { color: var(--text-strong); }
.note-row { display: flex; align-items: flex-start; gap: 10px; padding-top: 12px; padding-bottom: 12px; font-size: 0.875rem; border-top: 1px solid var(--line-soft); margin-top: 10px; }
.note-row .icon { color: var(--primary-text); width: 20px; height: 20px; margin-top: 1px; }
.note-row + .note-row { margin-top: 0; }
.note-row strong { color: var(--text-strong); }
.kcal-change { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--font-head); }
.kcal-change .old { font-size: 1.5rem; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.kcal-change .icon { width: 24px; height: 24px; color: var(--muted); align-self: center; }
.kcal-change .new { font-size: 2.2rem; font-weight: 700; color: var(--primary-text); letter-spacing: -0.02em; }
.kcal-change .unit { color: var(--muted); font-family: var(--font-body); font-size: 0.85rem; }
.macro-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.macro-chip { padding: 5px 12px; border-radius: var(--r-full); background: var(--inset); border: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.macro-chip b { color: var(--text-strong); }
.reasons { display: grid; gap: 6px; padding-top: 12px; font-size: 0.8125rem; color: var(--muted); }
.reasons li { display: flex; gap: 8px; align-items: flex-start; }
.reasons .icon { width: 16px; height: 16px; color: var(--primary-text); margin-top: 2px; }
.generic-details { padding-bottom: 6px; }
.generic-details summary { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--primary-text); list-style: none; }
.generic-details summary::-webkit-details-marker { display: none; }
.kv { display: grid; gap: 4px; font-size: 0.85rem; padding-left: 10px; border-left: 2px solid var(--line); }
.kv .k { color: var(--muted); }

/* --------------------------------------------------------------- LANDING */
.brand-mark { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-name { white-space: nowrap; font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--text-strong); }
.hl { color: var(--primary-text); }
/* Chinese headings: break at spaces/punctuation instead of mid-word. */
:lang(zh) .lp-title, :lang(zh) .lp h2, :lang(zh) .ob-title { word-break: keep-all; overflow-wrap: anywhere; }
.signin-error { font-size: 0.875rem; color: var(--warn-text); min-height: 1.2em; }
.signin-error.signin-waitlist { display: flex; flex-direction: column; gap: 4px; max-width: 460px; margin-top: 8px; padding: 12px 16px; border-radius: var(--radius); background: var(--primary-soft); border: 1px solid var(--primary-border); color: var(--text); line-height: 1.5; }
.signin-waitlist .waitlist-title { color: var(--primary-text); font-weight: 600; font-size: 0.9375rem; }
.signin-waitlist .waitlist-body { color: var(--text-muted); font-size: 0.84375rem; }

.lp { --lp-nav-h: 64px; position: relative; min-height: 100vh; background: var(--surface); overflow-x: clip; }
.lp-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.lp section[id] { scroll-margin-top: calc(var(--lp-nav-h) + 12px); }
.lp :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.lp h2[tabindex="-1"]:focus { outline: none; }

/* Nav */
.lp-nav { position: sticky; top: 0; z-index: 30; background: var(--overlay); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; padding-top: env(safe-area-inset-top); }
.lp-nav.scrolled { border-bottom-color: var(--line-soft); box-shadow: 0 6px 24px var(--shadow-sm-color); }
.lp-nav-inner { display: flex; align-items: center; gap: 16px; min-height: var(--lp-nav-h); }
.lp-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; flex: none; }
.lp-logo .brand-mark { width: 36px; height: 36px; }
.lp-logo .brand-mark .icon { width: 20px; height: 20px; }
.lp-logo .brand-name { font-size: 1.15rem; }
.lp-links { display: none; gap: 4px; margin-left: 16px; }
.lp-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-full); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.lp-links a:hover { color: var(--text-strong); background: var(--card); }
.lp-nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
#landing-lang .menu-seg { display: inline-grid; margin: 0; min-width: 0; background: var(--card); }
#landing-lang .menu-seg button { min-width: 44px; padding: 0 10px; font-size: 0.8rem; }
.lp-signin { min-height: 44px; }

/* Hero */
.lp-hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 7vw, 96px); }
.lp-glow { position: absolute; inset: -10% -10% auto auto; width: min(720px, 90vw); height: 560px; background: radial-gradient(closest-side, var(--primary-glow), transparent 70%); pointer-events: none; }
.lp-hero-grid { position: relative; display: grid; gap: clamp(32px, 6vw, 56px); align-items: center; }
.lp-hero-copy { display: grid; gap: 20px; justify-items: start; text-align: left; }
.lp-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-full); border: 1px solid var(--primary-border); background: var(--primary-soft); color: var(--on-primary-soft); font-size: 0.8rem; font-weight: 600; }
.lp-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.lp-title { font-size: clamp(2.25rem, 6.4vw, 4.25rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; max-width: 14ch; }
:lang(zh) .lp-title { max-width: 12em; letter-spacing: -0.01em; line-height: 1.15; }
.lp-title .hl { background: linear-gradient(transparent 72%, var(--primary-soft) 72%); }
.lp-sub { font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.6; color: var(--muted); max-width: 34em; }
.lp-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.lp-how-link .icon { width: 18px; height: 18px; }
/* Google sign-in: the standard white "outline" button in both themes. The
   placeholder has the same size/shape so nothing jumps while GIS loads. */
.lp { --gis-h: 40px; --gis-w: 280px; }
.gis-slot { position: relative; display: inline-grid; place-items: center start; width: var(--gis-w); max-width: 100%; height: var(--gis-h); border-radius: var(--r-full); background: transparent; border: 0; outline-offset: 4px; }
.gis-slot .gis-host { grid-area: 1 / 1; width: 100%; height: var(--gis-h); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--r-full); background: transparent; }
.gis-slot .gis-host iframe { display: block; margin: 0 !important; color-scheme: light; }
.gis-placeholder { grid-area: 1 / 1; position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: var(--gis-h); padding: 0 12px 0 44px; border-radius: var(--r-full); background: #FFFFFF; border: 1px solid #DADCE0; color: #3C4043; font-family: "Inter", Roboto, Arial, sans-serif; font-weight: 500; font-size: 14px; letter-spacing: 0.01em; white-space: nowrap; }
.gis-placeholder .g-logo { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); }
.gis-slot.gis-ready .gis-placeholder { visibility: hidden; }
.gis-slot.pulse { animation: lp-pulse 1.2s ease-out 2; }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 var(--primary-border); } 100% { box-shadow: 0 0 0 14px transparent; } }
.lp-how-link { min-height: var(--gis-h); height: var(--gis-h); padding: 0 20px; border-radius: var(--r-full); font-size: 0.9rem; }
.lp-final-card .gis-slot { place-items: center; }

/* Phone frame */
.phone { position: relative; width: min(300px, 74vw); aspect-ratio: 390 / 844; border-radius: 46px; padding: 9px; background: linear-gradient(150deg, #3a414b, #11151a 40%, #0b0d10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 30px 70px var(--shadow-color), 0 0 90px var(--primary-glow); margin-inline: auto; }
.phone::after { content: ""; position: absolute; top: 18px; left: 50%; width: 30%; height: 18px; transform: translateX(-50%); border-radius: 12px; background: #050607; opacity: 0.0; }
.phone img { display: block; width: 100%; height: 100%; border-radius: 38px; object-fit: cover; background: #0F1215; }
.lp-hero-visual { position: relative; display: grid; place-items: center; padding: 44px 0 24px; }
.phone-hero { width: min(320px, 72vw); }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; max-width: min(250px, 62vw); padding: 10px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--primary-border); box-shadow: 0 16px 40px var(--shadow-color); font-size: 0.8rem; line-height: 1.3; }
.fc-icon { flex: none; display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); }
.fc-icon .icon { width: 20px; height: 20px; }
.fc-text { display: grid; gap: 2px; min-width: 0; }
.fc-text b { color: var(--text-strong); font-weight: 700; }
.fc-text small { color: var(--muted); font-size: 0.72rem; }
.fc-meal { top: 0; left: 0; }
.fc-plan { bottom: 8%; right: 0; }

/* Built with */
.lp-built { border-block: 1px solid var(--line-soft); padding: 28px 0; background: var(--bg); }
.lp-built-label { text-align: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.lp-built-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; }
.lp-built-list li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--card); color: var(--text-strong); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.lp-built-list .icon { width: 18px; height: 18px; color: var(--primary-text); }

/* Sections */
.lp-section { padding: clamp(56px, 8vw, 112px) 0; }
.lp-section-head { display: grid; gap: 10px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 40em; }
.lp-section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.lp-section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; }
.lp h2, .lp h3 { text-wrap: balance; }
.lp-section-head p { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.1rem); }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary-text); }
.lp-eyebrow .icon { width: 18px; height: 18px; }

/* Features */
.lp-features { background: var(--surface); }
.lp-feature { display: grid; gap: 28px; align-items: center; padding: clamp(24px, 4vw, 48px) 0; }
.lp-feature + .lp-feature { border-top: 1px solid var(--line-soft); }
.lp-feature-copy { display: grid; gap: 14px; max-width: 34em; }
.lp-feature-copy h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.02em; }
.lp-feature-copy > p { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.lp-checks { display: grid; gap: 10px; margin-top: 4px; }
.lp-checks li { position: relative; padding-left: 30px; color: var(--text); font-size: 0.95rem; }
.lp-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); border: 1px solid var(--primary-border); }
.lp-checks li::after { content: ""; position: absolute; left: 3px; top: 5px; width: 14px; height: 14px; background: #87A91F; background: light-dark(#115E59, #87A91F); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 12-12-1.4-1.4z' fill='%23000'/%3E%3C/svg%3E") center / 14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 12-12-1.4-1.4z' fill='%23000'/%3E%3C/svg%3E") center / 14px no-repeat; }
.lp-feature-visual { display: grid; place-items: center; }
.lp-feature-visual .phone { width: min(280px, 70vw); }

/* How it works */
.lp-how { background: var(--bg); border-block: 1px solid var(--line-soft); }
.lp-steps { display: grid; gap: 16px; counter-reset: none; }
.lp-step { display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); }
.lp-step-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--primary-text); }
.lp-step h3 { font-size: 1.15rem; }
.lp-step p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

/* Safety */
.lp-safety-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.lp-safe { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); }
.lp-safe-icon { display: inline-flex; width: 44px; height: 44px; border-radius: 14px; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary-border); }
.lp-safe-icon .icon { width: 22px; height: 22px; }
.lp-safe h3 { font-size: 1.02rem; }
.lp-safe p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* Final CTA */
.lp-final { padding-top: 0; }
.lp-final-card { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 16px; text-align: center; padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 56px); border-radius: 32px; border: 1px solid var(--primary-border); background: radial-gradient(120% 120% at 50% 0%, var(--primary-glow), transparent 60%), var(--card); }
.lp-final-card h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
.lp-final-card p { color: var(--muted); max-width: 32em; }
.lp-final-card .gis-slot { margin-top: 8px; }

/* Footer */
.lp-footer { border-top: 1px solid var(--line-soft); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); background: var(--bg); }
.lp-footer-inner { display: grid; gap: 20px; }
.lp-footer-brand { display: grid; gap: 8px; max-width: 34em; }
.lp-footer-brand p { color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.lp-footer-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.lp-footer-links a:hover { color: var(--text-strong); text-decoration: underline; }
.lp-footer-links .icon { width: 18px; height: 18px; }

/* Reveal on scroll (only when motion is OK; see js/landing.js) */
.lp-anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.lp-anim .reveal.in { opacity: 1; transform: none; }

/* Light theme tweaks: the device frame stays dark; soften its glow. */
@supports (color: light-dark(#000, #fff)) {
  .phone { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 30px 70px var(--shadow-color), 0 0 90px light-dark(rgba(15, 118, 110, 0.12), rgba(198, 244, 50, 0.10)); }
}

/* Responsive */
@media (max-width: 399px) {
  .lp-logo .brand-name { display: none; }
  .lp-title { font-size: 2.1rem; }
  .lp { --gis-w: 100%; }
  .gis-slot { width: 100%; max-width: 360px; }
  .lp-cta-row { width: 100%; }
  .lp-cta-row > * { flex: 1 1 100%; justify-content: center; }
}
@media (min-width: 375px) {
  .lp-safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lp-safe { padding: 18px; }
}
@media (min-width: 720px) {
  .lp-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); }
  .lp-feature:nth-of-type(odd) .lp-feature-visual { order: -1; }
  .lp-feature-visual .phone { width: min(280px, 34vw); }
  .lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}
@media (min-width: 880px) {
  .lp-links { display: flex; }
}
@media (min-width: 960px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .lp-hero-visual { padding: 40px 0; }
  .float-card { max-width: 260px; }
  .fc-meal { top: 6%; left: -4%; }
  .fc-plan { right: -4%; }
}
@media (min-width: 1024px) {
  .lp-safety-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .lp-safe { padding: 24px; }
}
@media (min-width: 1440px) {
  .lp-wrap { max-width: 1240px; }
}

/* ------------------------------------------------------------ ONBOARDING */
.onboarding { min-height: 100vh; min-height: 100dvh; background: var(--surface); }
.ob-shell { max-width: 560px; margin: 0 auto; padding: 8px 20px 32px; padding-top: max(8px, env(safe-area-inset-top)); }
.ob-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; }
.ob-top .text-btn { justify-self: end; font-size: 0.875rem; white-space: nowrap; }
.ob-step { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--primary-text); }
.ob-top .icon-btn { color: var(--text); }
.ob-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 26px; }
.ob-progress li { display: grid; gap: 8px; }
.seg { height: 5px; border-radius: var(--r-full); background: var(--track); }
.ob-progress .done .seg, .ob-progress .current .seg { background: var(--primary); }
.seg-label { font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ob-progress .current .seg-label { color: var(--primary-text); }
.ob-progress .done .seg-label { color: var(--text); }
.ob-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.ob-sub { color: var(--muted); font-size: 1rem; margin: 8px 0 22px; }
.ob-form { display: grid; gap: 4px; }
.ob-section { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; display: grid; gap: 12px; }
.ob-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; padding: 0; margin-bottom: 12px; font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-strong); float: left; }
.ob-label + * { clear: both; }
.ob-hint { font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.radio-opt { display: block; cursor: pointer; position: relative; }
.radio-opt input:focus-visible + .radio-face { outline: 2px solid var(--primary); outline-offset: 2px; }
.segmented.radio-group { margin-bottom: 0; }
.segmented.days .radio-face { min-height: 52px; font-size: 1.05rem; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field-label { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .unit { position: absolute; right: 14px; color: var(--muted); font-size: 0.85rem; pointer-events: none; }
.text-input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--field-line);
  background: var(--card); color: var(--text); font-size: 1rem;
}
.input-wrap .text-input { padding-right: 48px; }
textarea.text-input { resize: vertical; min-height: 52px; }
.text-input::placeholder { color: var(--muted); opacity: 0.85; }
.text-input:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.text-input[aria-invalid="true"] { border-color: var(--warn); }
.text-input::-webkit-outer-spin-button, .text-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.text-input[type="number"] { -moz-appearance: textfield; }
.field-error { color: var(--warn-text); font-size: 0.8125rem; font-weight: 500; }
.goal-cards { display: grid; gap: 12px; }
.goal-cards .radio-face { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; min-height: 76px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--card); }
.goal-cards input:checked + .radio-face { border-color: var(--primary); background: var(--primary-soft); }
.goal-icon { display: inline-flex; width: 46px; height: 46px; border-radius: 50%; align-items: center; justify-content: center; background: var(--elevated); color: var(--primary-text); }
.goal-icon .icon { width: 24px; height: 24px; }
.goal-text { display: grid; gap: 2px; }
.goal-text strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--text-strong); }
.goal-text span { font-size: 0.85rem; color: var(--muted); }
.goal-check { width: 24px; height: 24px; color: var(--primary-text); opacity: 0; }
.goal-cards input:checked + .radio-face .goal-check { opacity: 1; }
.slider-card { display: grid; gap: 14px; justify-items: center; padding: 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.slider-value { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: var(--r-full); background: var(--primary-soft); border: 1px solid var(--primary-border); color: var(--on-primary-soft); font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; }
.slider-value .icon { width: 22px; height: 22px; }
.slider { --fill: 30%; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 8px; border-radius: var(--r-full); background: linear-gradient(90deg, var(--primary) var(--fill), var(--track) var(--fill)); }
.slider::-moz-range-track { height: 8px; border-radius: var(--r-full); background: linear-gradient(90deg, var(--primary) var(--fill), var(--track) var(--fill)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: var(--primary); border: 4px solid var(--surface); box-shadow: 0 0 0 4px var(--primary-glow); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); border: 4px solid var(--surface); }
.slider:focus-visible { outline: none; }
.slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--text); }
.slider-scale { display: flex; justify-content: space-between; width: 100%; font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
/* position: relative keeps the visually hidden input inside the chip (and its scroll container). */
.select-chip { position: relative; cursor: pointer; }
.chip-face { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-full); border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-weight: 500; font-size: 0.9rem; }
.chip-face .chk { width: 18px; height: 18px; display: none; }
.select-chip input:checked + .chip-face { border-color: var(--primary); background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 700; }
.select-chip input:checked + .chip-face .chk { display: inline-block; }
.select-chip input:focus-visible + .chip-face { outline: 2px solid var(--primary); outline-offset: 2px; }
.disclaimer { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 0.875rem; margin-bottom: 20px; }
.disclaimer .icon { width: 22px; height: 22px; color: var(--muted); }
.ob-footer { position: sticky; bottom: 0; display: grid; gap: 4px; justify-items: center; padding: 14px 0 max(10px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--surface) 75%, transparent); }

@media (max-width: 599px) {
  .messages { padding-left: 12px; padding-right: 12px; }
}

/* ---------------------------------------------------------------- tablet */
@media (min-width: 600px) {
  .view { padding-left: 24px; padding-right: 24px; }
  .greeting h1 { font-size: 1.85rem; }
}

/* --------------------------------------------------------------- desktop */
@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--coach-w); grid-template-rows: minmax(0, 1fr); }
  .rail {
    grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 20px 0; background: var(--surface); border-right: 1px solid var(--line-soft);
  }
  .rail-brand { display: grid; justify-items: center; gap: 6px; text-align: center; }
  .rail-brand .brand-mark { width: 52px; height: 52px; }
  .rail-brand .brand-mark .icon { width: 28px; height: 28px; }
  .rail-name { font-family: var(--font-head); font-size: 0.72rem; line-height: 1.1; color: var(--text-strong); }
  .rail-name b { color: var(--primary-text); }
  .rail-links { display: grid; gap: 10px; }
  .rail-link {
    display: grid; justify-items: center; gap: 4px; width: 64px; padding: 12px 0; border-radius: var(--r-lg);
    color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600;
  }
  .rail-link .icon { width: 24px; height: 24px; }
  .rail-link:hover { color: var(--text); background: var(--card); }
  .rail-link.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 18px var(--primary-glow); }
  .rail-foot { display: grid; justify-items: center; gap: 12px; }
  .rail-menu { left: calc(100% + 10px); right: auto; top: auto; bottom: 0; }
  .main { grid-column: 2; display: block !important; background: var(--bg); }
  .coach { grid-column: 3; display: flex !important; border-left: 1px solid var(--line-soft); background: var(--surface); }
  .coach-head { padding: 16px 20px; }
  .coach-head .bot-avatar.lg { width: 44px; height: 44px; }
  .coach-titles h2 { font-size: 1.05rem; }
  .tabbar, .topbar { display: none; }
  .view { max-width: 1040px; padding: 32px 36px 40px; }
  .desktop-only { display: block; }
  .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
    grid-template-areas: "tip tip" "hero weight" "workout meals";
  }
  .area-quick { display: none; }
  .area-weight { display: block; }
  .area-weight .card, .area-hero .card, .area-workout .card { height: 100%; }
  .area-meals .meals { height: 100%; align-content: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; }
  .area-meals .meal-row { background: var(--inset); border-color: var(--line-soft); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .hero-grid .macros { width: 100%; }
  .greeting { padding-top: 0; }
  .greeting-row { justify-content: flex-start; align-items: center; }
  .greeting h1 { font-size: 2rem; }
  .greeting .date { padding: 3px 10px; border-radius: var(--r-full); background: var(--card); border: 1px solid var(--line); letter-spacing: 0.02em; text-transform: none; font-size: 0.8125rem; }
  .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .segmented { max-width: 360px; }
  .plan-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .week-strip.big { max-width: 720px; }
  .weight-mini .chart { margin: 8px 0 14px; }
}

@media (min-width: 1440px) {
  :root { --coach-w: 440px; }
}

/* ------------------------------------------------------- turn progress */
.row.progress-row .row-body { justify-items: stretch; }
.progress-card { width: 100%; max-width: 420px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 8px; font-size: 0.85rem; }
.progress-card.live { border-color: var(--primary-border); box-shadow: 0 4px 18px var(--primary-glow); }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-title { flex: 1; font-weight: 600; color: var(--text-strong); }
.pc-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.pc-hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8rem; }
.pc-hint .icon { width: 16px; height: 16px; color: var(--primary-text); }
.pc-steps { display: grid; gap: 6px; margin: 2px 0 0; }
.pc-step { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pc-step.active { color: var(--text); font-weight: 500; }
.pc-step-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; flex: none; }
.pc-step-icon .icon { width: 16px; height: 16px; color: var(--primary-text); }
.pc-spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--grid); border-top-color: var(--primary); animation: spin 0.8s linear infinite; flex: none; }
.progress-card.done { background: transparent; border-color: transparent; padding: 0; box-shadow: none; }
.pc-summary summary, .pc-summary-line { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--r-full); background: var(--card); border: 1px solid var(--line-soft); color: var(--muted); font-size: 0.8rem; cursor: pointer; list-style: none; }
.pc-summary-line { cursor: default; }
.pc-summary summary::-webkit-details-marker { display: none; }
.pc-summary summary .icon, .pc-summary-line .icon { width: 16px; height: 16px; color: var(--primary-text); }
.pc-summary summary .chev { width: 18px; height: 18px; color: var(--muted); }
.pc-summary[open] .pc-steps { padding: 10px 4px 2px 12px; }
.progress-card.error .pc-summary summary .icon:first-child, .progress-card.error .pc-summary-line .icon { color: var(--warn-text); }

/* Optimistic meal card while the photo is analyzed. */
.meal-skeleton .badge .pc-spinner { width: 12px; height: 12px; border-width: 2px; }
.sk { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--elevated) 25%, var(--line) 50%, var(--elevated) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.sk-name { width: 55%; }
.sk-kcal { width: 18%; }
.sk-totals { height: 40px; border-radius: var(--r); }
.meal-skeleton .item-rows li { align-items: center; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Coach tab: spinner while a turn runs in the background. */
.shell[data-route="coach"] .tab-busy { display: none; }
.tab-busy { position: absolute; top: 4px; right: 14px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--grid); border-top-color: var(--primary); animation: spin 0.8s linear infinite; background: var(--card); }

/* Toast */
.toast-region { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 40; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 4px; max-width: 460px; width: 100%; padding: 4px 4px 4px 6px; border-radius: var(--r-lg); background: var(--text-strong); color: var(--bg); box-shadow: var(--shadow); animation: toast-in 0.2s ease-out; }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; }
.toast-main { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 10px; border: 0; background: none; color: inherit; font-weight: 600; text-align: left; }
.toast-main .icon { width: 20px; height: 20px; color: var(--primary); flex: none; }
.toast-action { margin-left: auto; color: var(--primary); font-weight: 700; white-space: nowrap; }
.toast-close { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: var(--r-full); background: none; color: inherit; opacity: 0.7; }
.toast-close .icon { width: 18px; height: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 1024px) { .toast-region { bottom: 24px; } }
@supports (color: light-dark(#000, #fff)) {
  .toast-main .icon, .toast-action { color: light-dark(#C6F432, #0F766E); }
}

/* Smooth color change when the theme is toggled (class set briefly by js/theme.js). */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, fill 0.3s ease, stroke 0.3s ease !important;
}

/* Theme toggle buttons */
.theme-slot { display: inline-flex; }
.theme-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text-strong); }
.theme-toggle:hover { color: var(--primary-text); border-color: var(--primary-border); background: var(--card); }
.theme-toggle .icon { width: 22px; height: 22px; }
.topbar .theme-slot { margin-left: auto; margin-right: 6px; }
.rail-foot .theme-toggle { background: transparent; }

/* ------------------------------------------------------------- feedback */
.fb { display: grid; gap: 8px; justify-items: start; width: 100%; max-width: min(560px, 100%); }
.fb-bar { display: flex; align-items: center; gap: 12px; min-height: 32px; margin-left: 2px; }
.fb-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-full); background: none; color: var(--muted);
}
/* 44 x 44 hit area around the 32 px visual. */
.fb-btn::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; }
.fb-btn .icon { width: 18px; height: 18px; }
.fb-btn:hover { color: var(--text); background: var(--elevated); }
.fb-btn.on { color: var(--primary-text); }
.fb-status { font-size: 0.78rem; color: var(--muted); }
.fb-status:empty { display: none; }
.fb-status.ok { color: var(--primary-text); font-weight: 600; }
.fb-status.err { color: var(--warn-text); font-weight: 500; }
.row-body > .fb { margin-top: -2px; }
@media (hover: hover) and (pointer: fine) {
  /* Desktop: thumbs appear on hover/focus; a given rating stays visible. */
  .row.from-coach .fb:not(.rated):not(.open) .fb-bar { opacity: 0; transition: opacity 0.15s ease; }
  .row.from-coach:hover .fb:not(.rated):not(.open) .fb-bar, .row.from-coach:focus-within .fb:not(.rated):not(.open) .fb-bar { opacity: 1; }
}
.fb-sheet {
  display: grid; gap: 10px; width: 100%; padding: 14px; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); animation: fb-in 0.16s ease-out;
}
.fb-sheet-title { font-weight: 700; font-size: 0.9rem; color: var(--text-strong); }
.fb-chips { gap: 8px; }
.fb-chips .chip-face { padding: 0 14px; font-size: 0.85rem; }
.fb-comment { min-height: 48px; font-size: 0.9rem; }
.fb-sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fb-error { color: var(--warn-text); font-size: 0.8125rem; font-weight: 500; }
@keyframes fb-in { from { opacity: 0; transform: translateY(-4px); } }

/* Once-a-day "Was this helpful today?" prompt */
.row.fb-daily-row { justify-content: flex-start; padding-left: 46px; }
.fb-daily {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 2px 2px 2px 16px; max-width: 100%;
  border-radius: var(--r-full); background: var(--card); border: 1px solid var(--primary-border); font-size: 0.85rem;
}
.fb-daily:has(.fb.open) { border-radius: var(--r-lg); padding: 8px 8px 12px 16px; }
.fb-daily-text { font-weight: 600; color: var(--text-strong); }
.fb-daily .fb { width: auto; }
.fb-daily .fb.open { flex: 1 0 100%; order: 3; }
.fb-dismiss { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: var(--r-full); background: none; color: var(--muted); margin-left: auto; }
.fb-dismiss:hover { color: var(--text); background: var(--elevated); }
.fb-dismiss .icon { width: 18px; height: 18px; }

/* Rate limits: send stays focusable (tooltip countdown) but inactive */
.send-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.composer-row label.icon-btn.is-disabled { opacity: 0.45; cursor: not-allowed; }

/* ----------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--text); display: flex; align-items: flex-end; justify-content: center; overscroll-behavior: contain;
}
.modal:not([open]) { display: none; }
.modal::backdrop { background: rgba(5, 8, 12, 0.55); }
.modal-card {
  width: 100%; max-height: 92dvh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow); padding: 6px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 0.22s ease-out;
}
.modal-card::before { content: ""; display: block; width: 40px; height: 4px; margin: 4px auto 6px; border-radius: 2px; background: var(--grid); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0 6px; }
.modal-title { font-size: 1.2rem; }
.modal-close { margin-right: -10px; }
.modal-body { display: grid; gap: 12px; }
.modal-q { display: block; margin-top: 6px; font-weight: 700; font-size: 0.9rem; color: var(--text-strong); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.modal-actions.single { grid-template-columns: 1fr; }
.field-hint { margin-top: -6px; font-size: 0.8rem; color: var(--muted); }
.fb-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line-soft); color: var(--muted); font-size: 0.8125rem; }
.fb-note .icon { width: 18px; height: 18px; color: var(--primary-text); }
@keyframes sheet-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal-card { max-width: 520px; max-height: calc(100dvh - 48px); border-bottom: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px 24px 24px; animation-name: modal-in; }
  .modal-card::before { display: none; }
}

/* Feedback dialog: 5-point face scale */
.csat { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.csat-opt { position: relative; cursor: pointer; }
.csat-face {
  display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 72px; padding: 8px 2px;
  border-radius: var(--r); border: 1.5px solid var(--line); background: var(--inset); color: var(--muted); text-align: center;
}
.csat-face .icon { width: 30px; height: 30px; }
.csat-label { font-size: 0.72rem; font-weight: 600; line-height: 1.2; }
.csat-opt:hover .csat-face { border-color: var(--primary-border); color: var(--text); }
.csat-opt input:checked + .csat-face { border-color: var(--primary); background: var(--primary-soft); color: var(--on-primary-soft); }
.csat-opt input:focus-visible + .csat-face { outline: 2px solid var(--primary); outline-offset: 2px; }
.fb-success { justify-items: center; text-align: center; padding: 8px 0 0; }
.fb-success-icon .icon { width: 56px; height: 56px; color: var(--primary-text); }
.fb-success-title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--text-strong); }
.fb-success-text { max-width: 32ch; color: var(--muted); }
.fb-success .modal-actions { width: 100%; }

/* Delete-account dialog */
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.del-list { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--inset); border: 1px solid var(--line-soft); }
.del-list li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.del-list .icon { width: 16px; height: 16px; color: var(--danger-text); }
.del-note { display: flex; align-items: flex-start; gap: 8px; color: var(--danger-text); font-size: 0.85rem; font-weight: 500; }
.del-note .icon { width: 18px; height: 18px; margin-top: 1px; }
.del-export { justify-self: start; }
.del-export:hover .icon { transform: none; }

/* Desktop floating feedback pill (bottom-left of the dashboard) */
.feedback-fab { display: none; }
@media (min-width: 1024px) {
  .feedback-fab {
    position: fixed; left: calc(var(--rail-w) + 20px); bottom: 20px; z-index: 25; display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 16px 0 14px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--card);
    color: var(--text); font-weight: 600; font-size: 0.875rem; box-shadow: var(--shadow-sm);
  }
  .feedback-fab .icon { width: 20px; height: 20px; color: var(--primary-text); }
  .feedback-fab:hover { border-color: var(--primary-border); color: var(--text-strong); }
  .view { padding-bottom: 88px; }
}

/* ---------------------------------------------------------- privacy page */
.priv { min-height: 100vh; background: var(--bg); }
.priv-wrap { width: 100%; max-width: 800px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.priv-nav { position: sticky; top: 0; z-index: 10; background: var(--overlay); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.priv-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-top: env(safe-area-inset-top); }
.priv-actions { display: flex; align-items: center; gap: 8px; }
.priv-actions .menu-seg { margin: 0; min-width: 0; background: var(--card); }
.priv-actions .menu-seg button { padding: 0 12px; }
.priv .lp-logo .brand-name { display: inline; }
@media (max-width: 399px) {
  .priv .lp-logo .brand-name { font-size: 1rem; }
  .priv-actions { gap: 6px; }
}
.priv-main { padding-block: 16px 56px; }
.priv-back { text-decoration: none; }
.priv-back .icon { width: 18px; height: 18px; }
.priv-back:hover .icon { transform: translateX(-2px); }
html[lang="zh-CN"] .priv-doc[data-lang="en"], html:not([lang="zh-CN"]) .priv-doc[data-lang="zh"] { display: none; }
.priv-doc h1 { margin: 10px 0 6px; font-size: clamp(1.9rem, 6vw, 2.6rem); }
.priv-updated { color: var(--muted); font-size: 0.9rem; }
.priv-lead { margin-top: 18px; font-size: 1.05rem; line-height: 1.7; }
.priv-callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--primary-soft); border: 1px solid var(--primary-border); color: var(--on-primary-soft); line-height: 1.6; }
.priv-callout .icon { width: 22px; height: 22px; margin-top: 1px; }
.priv-doc section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.priv-doc h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.25rem; }
.priv-doc h2 .icon { width: 22px; height: 22px; color: var(--primary-text); }
.priv-doc p, .priv-doc li { line-height: 1.7; }
.priv-doc p + p, .priv-doc p + ul, .priv-doc ul + p { margin-top: 10px; }
.priv-doc ul { display: grid; gap: 8px; }
.priv-doc li { position: relative; padding-left: 20px; }
.priv-doc li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.priv-doc strong { color: var(--text-strong); }
.priv-doc a { color: var(--primary-text); font-weight: 600; }

/* -------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pc-spinner, .tab-busy { animation: none !important; border-top-color: var(--primary); border-right-color: var(--primary); }
  .sk { animation: none !important; }
  .gis-slot.pulse { animation: none !important; box-shadow: 0 0 0 3px var(--primary-border); }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Top-nav Google sign-in: real GIS button (medium, 32px); the lime button is only a
   placeholder until GIS loads (or the fallback when it cannot load). */
.gis-slot.gis-nav { --gis-h: 36px; width: auto; min-width: 84px; height: 44px; place-items: center end; }
.gis-slot.gis-nav .gis-host { width: auto; height: 36px; }
.gis-slot.gis-nav .gis-placeholder-nav { grid-area: 1 / 1; }
.gis-slot.gis-nav.gis-ready .gis-placeholder-nav { visibility: hidden; pointer-events: none; }
