/* ════════════════════════════════════════════════════════════════════════
   LEOAMF · Client (athlete) mobile app · design system
   "Mono Green & Ink" · ink #0A0A0A, ONE green accent #0FA24C, Poppins.
   Dark-first (SSOT §1.6); light is a faithful inversion. Green identical in both.
   Tokens copied from the live Client OS :root block (SSOT-compliant superset).
   ════════════════════════════════════════════════════════════════════════ */

/* ── tokens: DARK is the default (athlete canonical screen) ───────────── */
:root {
  --bg: #0A0A0A; --fg: #FFFFFF; --muted-fg: #9A9A9A; --faint-fg: #6E6E6E;
  --surface-1: #121212; --surface-2: #1A1A1A; --surface-3: #202020;
  --hairline: #262626; --hairline-strong: #333333; --border-control: #3D3D3D;
  --primary: #0FA24C; --primary-600: #0C8A3F; --primary-fg: #FFFFFF;
  --accent: #0FA24C; --ring: #0FA24C; --primary-tint: rgba(15, 162, 76, .14);
  --deep: #0A0A0A; --on-deep: #FFFFFF;

  /* functional (red is the ONE permitted exception hue) */
  --danger: #E5484D; --danger-tint: rgba(229, 72, 77, .14);
  --warn: #E6A700; --warn-tint: rgba(230, 167, 0, .15);
  --info: #C9C9C9; /* neutral tone */
  --pend: #F2D24B; /* pending = YELLOW (2026-07-06) · mirrors the console: open items read yellow, done reads green */
  --risk-green: #0FA24C; --risk-yellow: #E6A700; --risk-red: #E5484D;
  --risk-green-bg: rgba(15, 162, 76, .14); --risk-yellow-bg: rgba(230, 167, 0, .15); --risk-red-bg: rgba(229, 72, 77, .14);

  --radius: 16px; --radius-sm: 12px; --radius-lg: 20px; --pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.16, 1, .3, 1); /* expo-out: fast snap, smooth settle (press feedback) */
  --focus-glow: 0 0 0 3px rgba(15, 162, 76, .25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .3), 0 14px 32px -22px rgba(0, 0, 0, .6);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .32), 0 26px 60px -26px rgba(0, 0, 0, .65);
  --tabbar-h: 64px; --topbar-h: 56px;
  --maxw: 560px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}
[data-theme="light"] {
  --bg: #FFFFFF; --fg: #0A0A0A; --muted-fg: #6B6B6B; --faint-fg: #8A8A8A;
  --surface-1: #FFFFFF; --surface-2: #F4F4F4; --surface-3: #EDEDED;
  --hairline: #E6E6E6; --hairline-strong: #D8D8D8; --border-control: #CFCFCF;
  --primary-tint: rgba(15, 162, 76, .10);
  --on-deep: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, .05);
  --shadow-md: 0 1px 3px rgba(10, 10, 10, .06), 0 12px 28px -20px rgba(10, 10, 10, .16);
  --shadow-lg: 0 2px 8px rgba(10, 10, 10, .07), 0 24px 56px -24px rgba(10, 10, 10, .2);
}

/* ── reset / base ────────────────────────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 15px; line-height: 1.5; font-weight: 400;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none; touch-action: manipulation;
}
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: var(--primary-tint); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 999px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-fg); }
.faint { color: var(--faint-fg); }
.grn { color: var(--primary); }
.hide { display: none !important; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-fg); }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── app shell ───────────────────────────────────────────────────────── */
#app { min-height: 100dvh; }
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .04em; }
.topbar .brand .eye { width: 26px; height: 26px; flex: 0 0 auto; }
.topbar .brand b { font-size: 16px; }
.topbar .brand b .amf { color: var(--primary); }
.topbar .tb-btn {
  width: 40px; height: 40px; border-radius: var(--pill); display: grid; place-items: center;
  color: var(--fg); position: relative; transition: background .15s var(--ease);
}
.topbar .tb-btn:active { background: var(--surface-2); }
.tb-badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.view { flex: 1 1 auto; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 16px 16px 28px; }
.view.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 22px); }

/* ── bottom tab bar ──────────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-top: 1px solid var(--hairline);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted-fg); font-size: 10.5px; font-weight: 600; position: relative;
  transition: color .15s var(--ease);
}
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--primary); }
.tab .tab-dot { position: absolute; top: 7px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 999px; background: var(--danger); border: 2px solid var(--bg); }
/* #399: numeric unread pill on the bottom-nav chat tab (iOS-style, caps at 9+) */
.tab .tab-num { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0; display: grid; place-items: center; border: 2px solid var(--bg); line-height: 1; }

/* ── cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 16px;
}
.card + .card { margin-top: 12px; }
.card.tap { transition: transform .12s var(--ease), border-color .15s; }
.card.tap:active { transform: scale(.985); border-color: var(--hairline-strong); }
.section { margin-top: 22px; }
.section > .eyebrow { margin-bottom: 10px; padding: 0 2px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  background: var(--surface-2); color: var(--fg); transition: transform .1s var(--ease), background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; }
.btn.full { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { height: 54px; font-size: 16px; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:active { background: var(--primary-600); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-soft { background: var(--primary-tint); color: var(--primary); }
.btn-danger { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--pill); display: grid; place-items: center; color: var(--fg); background: var(--surface-2); }
.iconbtn.sm { width: 30px; height: 30px; background: transparent; }
.iconbtn.sm svg { width: 14px; height: 14px; }

/* ── pills / badges / chips ──────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted-fg); }
.pill.grn { background: var(--primary); color: #fff; }
.pill.soft { background: var(--primary-tint); color: var(--primary); }
.pill.amber { background: var(--warn-tint); color: var(--warn); }
.pill.red { background: var(--danger-tint); color: var(--danger); }
.pill.outline { background: transparent; border: 1px solid var(--hairline-strong); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pill);
  background: var(--surface-2); color: var(--muted-fg); font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; transition: all .12s var(--ease);
}
.chip.on { background: var(--primary-tint); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chiprow::-webkit-scrollbar { display: none; }

/* ── list rows ───────────────────────────────────────────────────────── */
.lrow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--radius-sm); background: var(--surface-1); border: 1px solid var(--hairline); }
.lrow + .lrow { margin-top: 8px; }
.lrow .ic { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.lrow .ic svg { width: 21px; height: 21px; }
.lrow .tt { font-weight: 600; }
.lrow .sub { color: var(--muted-fg); font-size: 12.5px; margin-top: 1px; }
.lrow .chev { color: var(--faint-fg); }
.lrow .chev svg { width: 18px; height: 18px; }

/* ── stat / metric ───────────────────────────────────────────────────── */
.metric { font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.metric .u { font-size: .5em; font-weight: 600; color: var(--muted-fg); margin-left: 3px; }
.delta { font-size: 12.5px; font-weight: 600; }
.delta.up { color: var(--primary); } .delta.down { color: var(--danger); }

/* ── greeting / hero ─────────────────────────────────────────────────── */
.hero h1 { font-size: 26px; line-height: 1.15; }
.hero h1 .nm { color: var(--primary); }
.hero .tag { color: var(--muted-fg); margin-top: 4px; font-size: 13.5px; }

/* ── tiles grid (today) ──────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px; min-height: 104px; display: flex; flex-direction: column; gap: 8px; position: relative; transition: transform .12s var(--ease), border-color .15s; }
.tile:active { transform: scale(.98); }
.tile .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.tile .ic svg { width: 20px; height: 20px; }
.tile .tl { font-weight: 600; font-size: 14px; }
.tile .ts { color: var(--muted-fg); font-size: 12px; }
.tile .done { position: absolute; top: 12px; right: 12px; color: var(--primary); }
.tile .done svg { width: 20px; height: 20px; }
.tile.is-done { border-color: color-mix(in srgb, var(--primary) 35%, var(--hairline)); }

/* big CTA card */
.cta {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: var(--radius); background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: #fff; box-shadow: var(--shadow-md);
}
.cta .ic { width: 46px; height: 46px; border-radius: 13px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: 0 0 auto; }
.cta .ic svg { width: 24px; height: 24px; }
.cta .lbl { font-size: 12px; opacity: .85; font-weight: 600; }
.cta .ttl { font-weight: 700; font-size: 17px; }
.cta .go { margin-left: auto; opacity: .9; }

/* ── progress ring ───────────────────────────────────────────────────── */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring .lbl { position: absolute; text-align: center; }
.ring .lbl b { font-size: 22px; font-weight: 700; }
.ring .lbl .u { font-size: 11px; color: var(--muted-fg); display: block; }

/* ── inputs ──────────────────────────────────────────────────────────── */
.field { margin-top: 12px; }
.field > label { display: block; font-size: 12.5px; color: var(--muted-fg); margin-bottom: 6px; font-weight: 500; }
.inp {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  /* 16px minimum: iOS Safari auto-zooms the page on focus of any input under 16px
     (the "too zoomed in on first login" bug). Never go below 16 on an input. */
  background: var(--surface-1); border: 1px solid var(--hairline); color: var(--fg); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.inp { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.inp::placeholder { color: var(--faint-fg); }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-glow); }
.inp.num { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
select.inp { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239A9A9A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--pill); padding: 4px; gap: 2px; }
.seg button { padding: 7px 16px; border-radius: var(--pill); font-size: 13px; font-weight: 600; color: var(--muted-fg); }
.seg button.on { background: var(--surface-1); color: var(--fg); box-shadow: var(--shadow-sm); }
[data-theme="light"] .seg button.on { background: #fff; }

/* toggle switch */
.sw { width: 46px; height: 28px; border-radius: 999px; background: var(--border-control); position: relative; transition: background .18s var(--ease); flex: 0 0 auto; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; transition: transform .18s var(--ease); box-shadow: var(--shadow-sm); }
.sw.on { background: var(--primary); }
.sw.on::after { transform: translateX(18px); }

/* slider (range) */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--surface-3); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 999px; background: var(--sl-ac, var(--primary)); border: 3px solid var(--bg); box-shadow: var(--shadow-sm); transition: background .14s var(--ease); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 3px solid var(--bg); border-radius: 999px; background: var(--sl-ac, var(--primary)); }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--surface-2); border-radius: var(--pill); }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--fg); font-size: 20px; font-weight: 600; }
.stepper .val { min-width: 44px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
/* grams/unit variant: the number is a real input the client types into */
.stepper.qgr button { width: 34px; }
.stepper .qin { width: 52px; min-width: 0; text-align: center; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent; border: 0; color: var(--fg); padding: 0; outline: none; }
.stepper .qunit { font-size: 11.5px; color: var(--muted-fg); margin-right: 2px; }

/* ── progress bar ────────────────────────────────────────────────────── */
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; border-radius: 999px; background: var(--primary); transform-origin: left center; transform: scaleX(0); transition: transform .4s var(--ease); }
.bar.amber > i { background: var(--warn); } .bar.red > i { background: var(--danger); }

/* ── meal cards (nutrition) ──────────────────────────────────────────── */
.meal { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--surface-1); }
.meal + .meal { margin-top: 12px; }
.meal .cover { position: relative; aspect-ratio: 16/9; background: var(--surface-2); display: grid; place-items: center; }
.meal .cover img { width: 100%; height: 100%; object-fit: cover; }
.meal .cover .emoji { font-size: 44px; }
.meal .cover .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, .72) 100%); }
.meal .cover .ov { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.meal .cover .ov .nm { color: #fff; font-weight: 700; font-size: 16px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.meal .body { padding: 12px 14px; }
.foodrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 13.5px; }
.foodrow:first-child { border-top: 0; }
.foodrow .q { color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.macrobars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.macrobars .mb { text-align: center; }
.macrobars .mb b { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.macrobars .mb .k { font-size: 10.5px; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .04em; }

/* ── workout tracker ─────────────────────────────────────────────────── */
.wtk-set { display: grid; grid-template-columns: 26px 1fr 1fr 44px; gap: 8px; align-items: center; padding: 8px 0; }
.wtk-set .n { color: var(--muted-fg); font-weight: 600; text-align: center; }
.wtk-set .check { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted-fg); }
.wtk-set .check.on { background: var(--primary); color: #fff; }
.exblock { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px; }
.exblock + .exblock { margin-top: 12px; }
.exhead { display: flex; align-items: center; gap: 10px; }
.exhead .nm { font-weight: 600; }
/* exercise-level quick check (2026-07-06): one tap marks every set of the exercise done */
.trx-exchk { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--hairline); display: grid; place-items: center; background: var(--surface-2); color: var(--muted-fg); flex: none; padding: 0; cursor: pointer; transition: background .18s var(--ease), color .18s, transform .16s var(--ease), border-color .18s; }
.trx-exchk.on { background: var(--primary); color: #fff; border-color: transparent; }
.trx-exchk:active { transform: scale(.92); }
.trx-exchk svg { width: 16px; height: 16px; }
.exhead .meta { color: var(--muted-fg); font-size: 12px; }
.restbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  width: min(520px, calc(100vw - 28px)); display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-lg);
}
.restbar .t { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--primary); min-width: 56px; }

/* ── habit cards ─────────────────────────────────────────────────────── */
.habit { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface-1); }
.em, .habit .em { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint); flex: 0 0 auto; }
.em svg, .habit .em svg { width: 22px; height: 22px; color: var(--primary); }
.streak svg { width: 14px; height: 14px; vertical-align: -2px; }
.hi svg { width: 17px; height: 17px; vertical-align: -3px; }
.habit .nm { font-weight: 600; }
.habit .streak { color: var(--primary); font-size: 12px; font-weight: 600; }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 999px; background: var(--surface-3); }
.dots i.on { background: var(--primary); }
.dots i.miss { background: var(--danger-tint); }
.hcheck { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted-fg); flex: 0 0 auto; }
.hcheck.on { background: var(--primary); color: #fff; }
.hcheck svg { width: 24px; height: 24px; }

/* ── check-in form ───────────────────────────────────────────────────── */
.photogrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photoslot { aspect-ratio: 3/4; border-radius: var(--radius-sm); border: 1.5px dashed var(--hairline-strong); display: grid; place-items: center; color: var(--faint-fg); position: relative; overflow: hidden; background: var(--surface-1); }
.photoslot img { width: 100%; height: 100%; object-fit: cover; }
.photoslot .del { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.measgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sliderrow { margin-top: 14px; }
.sliderrow .lab { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.sliderrow .lab b { color: var(--sl-ac, var(--primary)); font-variant-numeric: tabular-nums; transition: color .14s var(--ease); }

/* ── chat ────────────────────────────────────────────────────────────── */
.chatwrap { position: fixed; left: 0; right: 0; top: calc(var(--topbar-h) + env(safe-area-inset-top)); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; max-width: var(--maxw); margin: 0 auto; }
.chat-coach { display: flex; align-items: center; gap: 11px; padding: 11px 16px; border-bottom: 1px solid var(--hairline); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.chat-coach .av { position: relative; width: 42px; height: 42px; border-radius: 999px; background: var(--primary-tint); display: grid; place-items: center; flex: 0 0 auto; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 32%, transparent); }
.chat-coach .av img.mark, .chat-coach .av .eye { width: 27px; height: 27px; }
.chat-coach .av .on-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 999px; background: var(--primary); border: 2.5px solid var(--bg); }
.chat-coach b { font-size: 15px; font-weight: 700; }
.chat-coach .st { font-size: 12px; color: var(--muted-fg); margin-top: 1px; }
.chat-coach .av.online ~ .grow .st { color: var(--primary); font-weight: 500; }
.chat-msgs { flex: 1 1 auto; overflow-y: auto; padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 3px; }
.chat-msgs > .comm-msg { margin-top: 7px; }
.dm-row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.dm-row.me { justify-content: flex-end; }
.dm-row.them { justify-content: flex-start; }
.dm-av { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 999px; background: var(--primary-tint); display: grid; place-items: center; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 26%, transparent); }
.dm-av img.mark { width: 18px; height: 18px; }
.dm-av.spacer { background: transparent; box-shadow: none; }
/* #257: sender identity on the bubbles */
.dm-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 78%; }
.dm-col.me { align-items: flex-end; }
.dm-col .bubble { max-width: 100%; }
.dm-who { font-size: 11px; font-weight: 600; color: var(--muted-fg); margin: 6px 0 2px 8px; }
.dm-who.me { margin: 6px 8px 2px 0; }
.dm-ini { font-size: 11px; font-weight: 700; color: var(--fg); letter-spacing: .3px; }
.chat-read.chx-read-av { margin-right: 36px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 20px; font-size: 14.5px; line-height: 1.42; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: var(--shadow-sm); }
.dm-row.them .bubble { background: var(--surface-2); border: 1px solid var(--hairline); border-bottom-left-radius: 6px; }
.dm-row.me .bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.bubble.failed { background: var(--danger-tint) !important; color: var(--fg); cursor: pointer; opacity: .95; border: 1px solid var(--danger) !important; }
.bubble.failed .meta { color: var(--danger); opacity: 1; }
.bubble img { border-radius: 13px; margin: 1px 0; max-height: 320px; }
.bubble .meta { font-size: 10px; margin-top: 3px; opacity: .65; text-align: right; }
.dm-row.me .bubble .meta { color: #fff; opacity: .85; }
.chat-day { align-self: center; font-size: 11px; font-weight: 600; color: var(--muted-fg); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; margin: 12px 0 6px; }
.chat-read { align-self: flex-end; font-size: 10.5px; color: var(--muted-fg); margin: 1px 6px 4px; }
.chat-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--hairline); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.chat-input .iconbtn { flex: 0 0 auto; background: var(--surface-2); }
.chat-input textarea { flex: 1; max-height: 120px; min-height: 44px; border-radius: 22px; background: var(--surface-2); border-color: var(--hairline); padding: 11px 16px; }
.chat-input #chatSend { box-shadow: 0 4px 14px -4px rgba(15, 162, 76, .7); }

/* ── charts ──────────────────────────────────────────────────────────── */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ── sheet / modal ───────────────────────────────────────────────────── */
.scrim-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .2s var(--ease); }
.scrim-bg.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 88dvh;
  background: var(--surface-1); border-radius: 22px 22px 0 0; border-top: 1px solid var(--hairline);
  transform: translateY(102%); transition: transform .26s var(--ease);
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column;
  max-width: var(--maxw); margin: 0 auto;
}
.sheet.show { transform: translateY(0); }
.sheet .grip { width: 40px; height: 4px; border-radius: 999px; background: var(--hairline-strong); margin: 8px auto 12px; flex: 0 0 auto; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet .sheet-head h3 { font-size: 17px; }
.sheet .sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* full-screen modal (workout tracker) */
.fs {
  position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .28s var(--ease);
}
.fs.show { transform: translateY(0); }
.fs-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); border-bottom: 1px solid var(--hairline); }
.fs-body { flex: 1; overflow-y: auto; padding: 16px; padding-bottom: 120px; max-width: var(--maxw); width: 100%; margin: 0 auto; }
.fs-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); max-width: var(--maxw); width: 100%; margin: 0 auto; }

/* ── toast ───────────────────────────────────────────────────────────── */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); transform: translateX(-50%) translateY(20px); z-index: 120; background: var(--surface-2); color: var(--fg); border: 1px solid var(--hairline-strong); padding: 11px 18px; border-radius: var(--pill); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.grn { border-color: var(--primary); }

/* ── empty / skeleton / loader ───────────────────────────────────────── */
.empty { text-align: center; color: var(--muted-fg); padding: 40px 20px; }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 14px; color: var(--faint-fg); }
.empty .ic svg { width: 28px; height: 28px; }
.spin { width: 26px; height: 26px; border: 3px solid var(--hairline-strong); border-top-color: var(--primary); border-radius: 999px; animation: spin .7s linear infinite; }
.loadwrap { display: grid; place-items: center; min-height: 60dvh; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 37%, var(--surface-1) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── auth / login ────────────────────────────────────────────────────── */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; }
.auth .logo { display: grid; place-items: center; margin-bottom: 22px; }
.auth .logo .eye { width: 64px; height: 64px; filter: drop-shadow(0 6px 24px rgba(15, 162, 76, .3)); }
.auth h1 { text-align: center; font-size: 24px; }
.auth .sub { text-align: center; color: var(--muted-fg); margin-top: 6px; margin-bottom: 24px; font-size: 14px; }
.auth .err { background: var(--danger-tint); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-size: 13.5px; margin-top: 14px; text-align: center; }
.auth .alt { text-align: center; margin-top: 18px; }
.auth .alt button { color: var(--muted-fg); font-size: 13.5px; }
.bg-glow { position: fixed; inset: 0; z-index: -1; background: radial-gradient(60% 40% at 50% 0%, rgba(15, 162, 76, .14), transparent 70%); pointer-events: none; }

/* install bar */
.installbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); z-index: 50; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: var(--maxw); margin: 0 auto; }

/* ════════════════════════════════════════════════════════════════════════
   REDESIGN v2 · premium ambient + motion + depth
   ════════════════════════════════════════════════════════════════════════ */

/* ── ambient backdrop (Higgsfield green aura, dark only) ──────────────── */
.ambient { position: fixed; inset: 0; z-index: -2; background: url("./bg-app.webp") no-repeat center top / cover; opacity: .68; pointer-events: none; animation: ambientIn 1.1s var(--ease) both; }
[data-theme="light"] .ambient { display: none; }
.bg-glow { background: radial-gradient(64% 38% at 50% -4%, rgba(15, 162, 76, .10), transparent 70%); }
@keyframes ambientIn { from { opacity: 0; transform: translateY(-12px) scale(1.04); } to { opacity: .5; transform: none; } }

/* ── logo lockup (real croc-eye asset) ───────────────────────────────── */
.topbar .brand { gap: 9px; }
.topbar .brand img.mark { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(15, 162, 76, .35)); flex: 0 0 auto; }
.topbar .brand b { font-size: 17px; letter-spacing: .03em; }
.auth .logo img.mark { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 8px 28px rgba(15, 162, 76, .4)); animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.chat-coach .av img.mark, .av img.mark { width: 24px; height: 24px; object-fit: contain; }

/* ── view entrance + staggered children ──────────────────────────────── */
/* NOTE: never put a transform on the view host (#screen > div) · chat uses
   position:fixed and a transformed ancestor would re-anchor it. Animate the
   stagger CHILDREN only. */
@keyframes riseIn { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.stagger > * { animation: riseIn .5s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; } .stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; } .stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; } .stagger > *:nth-child(6) { animation-delay: .27s; }
.stagger > *:nth-child(7) { animation-delay: .32s; } .stagger > *:nth-child(8) { animation-delay: .37s; }

/* ── topbar polish ───────────────────────────────────────────────────── */
.topbar { border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.topbar.scrolled { border-bottom-color: var(--hairline); background: color-mix(in srgb, var(--bg) 94%, transparent); }

/* ── bottom tab bar: sliding indicator + active pop ──────────────────── */
.tabbar { position: fixed; }
.tab svg { transition: transform .25s var(--ease); }
.tab.on svg { transform: translateY(-1px) scale(1.12); }
.tab span { transition: opacity .2s; }
.tab::before { content: ""; position: absolute; top: 0; left: 50%; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--primary); transform: translateX(-50%) scaleX(0); transform-origin: center; transition: transform .28s var(--ease); box-shadow: 0 0 12px var(--primary); }
.tab.on::before { transform: translateX(-50%) scaleX(1); }

/* ── card / tile depth + press ───────────────────────────────────────── */
.card, .tile, .meal, .exblock, .habit, .lrow, .tk { box-shadow: var(--shadow-sm); }
.tile, .lrow.tap, .card.tap { transition: transform .14s var(--ease), border-color .2s, box-shadow .2s; }
.tile:active { box-shadow: none; }
.tile .ic, .lrow .ic, .cta .ic { transition: transform .2s var(--ease); }
.tile:active .ic { transform: scale(.9); }
.tile.is-done .ic { background: var(--primary); color: #fff; }
.tile.is-done .done { animation: pop .3s var(--ease) both; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ── CTA: sheen + glow ───────────────────────────────────────────────── */
.cta { position: relative; overflow: hidden; box-shadow: 0 10px 30px -8px rgba(15, 162, 76, .5); }
.cta::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-18deg); animation: sheen 4.5s ease-in-out 1.2s infinite; }
@keyframes sheen { 0% { left: -60%; } 22%, 100% { left: 130%; } }
.cta .ic svg { animation: none; }
.cta:active { transform: scale(.985); }

/* button micro-interaction */
.btn-primary { box-shadow: 0 6px 18px -8px rgba(15, 162, 76, .6); }

/* ── hero greeting glow on the name ──────────────────────────────────── */
.hero h1 .nm { position: relative; }
.hero h1 .nm::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 9px; background: var(--primary); opacity: .18; border-radius: 4px; z-index: -1; }

/* ── membership / subscription card ──────────────────────────────────── */
.member { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--surface-1), var(--surface-2)); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px; }
.member::before { content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 999px; background: radial-gradient(circle, var(--primary-tint), transparent 70%); }
.member .lab { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-fg); }
.member .big { font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.member .big .u { font-size: .42em; font-weight: 600; color: var(--muted-fg); }
.member .since { color: var(--muted-fg); font-size: 12.5px; margin-top: 2px; }
.member .renew { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.member .ring-wrap { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }

/* ── chat sub-tabs (Coach / Community) ───────────────────────────────── */
.chat-tabs { display: flex; gap: 4px; margin: 10px 14px 6px; padding: 4px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--pill); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.chat-tabs button { flex: 1; padding: 9px 0; border-radius: var(--pill); font-weight: 600; font-size: 13.5px; color: var(--muted-fg); background: transparent; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: color .18s var(--ease), background .18s var(--ease); }
.chat-tabs button.on { color: var(--fg); background: var(--surface-1); box-shadow: var(--shadow-sm); }
[data-theme="light"] .chat-tabs button.on { background: #fff; }
.chat-tabs button .cdot { width: 7px; height: 7px; border-radius: 999px; background: var(--danger); }
/* #406: per-channel unread count on the in-chat toggles: a mini .tab-num pill
   on the coach/community tabs and on each community picker chip. */
.chx-tabn { min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0; display: inline-grid; place-items: center; line-height: 1; flex: 0 0 auto; }
.chx-comm .chx-tabn { min-width: 15px; height: 15px; margin-right: -4px; }
.comm-msg { display: flex; gap: 9px; align-items: flex-start; }
.comm-msg .av { width: 34px; height: 34px; border-radius: 999px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.comm-msg.me { flex-direction: row-reverse; }
.comm-bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.comm-msg.me .comm-bubble { background: var(--primary); color: #fff; }
.comm-bubble .who { font-size: 11px; font-weight: 700; margin-bottom: 2px; color: var(--primary); }
.comm-bubble.coachmsg { border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.comm-bubble .who .badge-coach { font-size: 9px; background: var(--primary); color: #fff; padding: 1px 5px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.comm-bubble img { border-radius: 10px; margin-top: 4px; max-height: 280px; }
.comm-bubble .meta { font-size: 10px; opacity: .6; margin-top: 3px; }

/* ── count-up nums use tabular ───────────────────────────────────────── */
.metric, .member .big { font-variant-numeric: tabular-nums; }

/* ── ring label centering helper ─────────────────────────────────────── */
.ring .lbl { display: grid; place-items: center; line-height: 1; }

/* ── pull subtle shimmer on skeletons already defined; add fade for imgs ─ */
.meal .cover img, .photoslot img, .bubble img, .comm-bubble img { animation: imgFade .5s ease both; }
@keyframes imgFade { from { opacity: 0; } to { opacity: 1; } }
/* chat photos show at full strength straight away: the fade replayed on
   every photo of the thread and made the conversation look faded */
.chat-msgs .bubble img, .chat-msgs .comm-bubble img { animation: none; }

/* ── Higgsfield FX: celebration overlay (workout finish / check-in) ──── */
.celebrate { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(0, 0, 0, .72); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.celebrate.show { opacity: 1; pointer-events: auto; }
.cel-burst { position: absolute; width: 130vw; max-width: 700px; aspect-ratio: 1; background: url("./fx-burst.webp") center / contain no-repeat; mix-blend-mode: screen; opacity: 0; transform: scale(.3); }
.celebrate.show .cel-burst { animation: burstIn .8s var(--ease) both, celSpin 18s linear .8s infinite; }
@keyframes burstIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: .95; } }
@keyframes celSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.cel-core { position: relative; z-index: 1; display: grid; place-items: center; }
.cel-badge { width: 124px; height: 124px; object-fit: contain; mix-blend-mode: screen; transform: scale(0); }
.celebrate.show .cel-badge { animation: pop .55s var(--ease) .15s both; }
.cel-txt { position: absolute; left: 0; right: 0; bottom: 27%; text-align: center; z-index: 1; padding: 0 24px; }
/* text-only celebrations (2026-07-17): the message IS the core, centered in
   the rings, no badge imagery (the webp badges drew a black rectangle) */
.cel-txt.center { position: static; padding: 0 28px; max-width: 340px; }
.cel-txt.center .cel-sub { color: var(--fg); opacity: .75; }
.cel-title { font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.cel-sub { color: var(--muted-fg); margin-top: 4px; font-size: 14px; }
.celebrate.show .cel-txt { animation: riseIn .5s var(--ease) .3s both; }
.celebrate.show .cel-txt.center { animation: riseIn .5s var(--ease) .12s both; }

/* ── login hero (Higgsfield arc, dark only) ──────────────────────────── */
.auth-hero { position: fixed; left: 0; right: 0; top: 0; height: 52vh; z-index: -1; background: url("./auth-hero.webp") no-repeat top center / cover; opacity: .6; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent); mask-image: linear-gradient(to bottom, #000 30%, transparent); animation: ambientIn 1.1s var(--ease) both; }
[data-theme="light"] .auth-hero { display: none; }

/* ── branded empty state (emblem) ────────────────────────────────────── */
.empty .ic.brand { background: var(--deep); }
.empty .ic.brand .fx { width: 42px; height: 42px; object-fit: contain; mix-blend-mode: screen; }

/* ════════════════════════════════════════════════════════════════════════
   REDESIGN v3 · DEPTH + density components (competitor-informed)
   ════════════════════════════════════════════════════════════════════════ */

/* ── give every card subtle dimension (top bevel + real shadow), not flat ─ */
.card, .meal, .exblock, .habit, .lrow, .tk, .member {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 42%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .05);
}
[data-theme="light"] .card, [data-theme="light"] .meal, [data-theme="light"] .lrow, [data-theme="light"] .member { background-image: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 50%); box-shadow: var(--shadow-md); }
.tile { background-image: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 50%); box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .05); }

/* ── icon sizing for containers without an explicit rule (icon() defaults 1em) ── */
.tb-btn svg, .iconbtn svg { width: 21px; height: 21px; }
.stepper button svg, .chev svg, .hero .go svg, .cta .go svg { width: 19px; height: 19px; }
.plan-card .ph .ic svg { width: 21px; height: 21px; }
.btn svg { width: 19px; height: 19px; }

/* ── icons inside chips / covers / category tiles ────────────────────── */
.chip svg { width: 16px; height: 16px; }
.meal .cover .emoji svg { width: 46px; height: 46px; color: var(--muted-fg); opacity: .85; }
.segbar { display: flex; gap: 4px; }
.segbar i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); transition: background .3s var(--ease); }
.segbar i.on { background: var(--primary); }

/* ── HOME: greeting + phase meta ─────────────────────────────────────── */
.greet { margin-bottom: 4px; }
.greet h1 { font-size: 25px; line-height: 1.12; }
.greet h1 .nm { color: var(--primary); }
.greet .meta { color: var(--muted-fg); font-size: 13px; margin-top: 3px; font-weight: 500; }

/* ── HERO stat card (compliance ring + satellites) ───────────────────── */
.herostat {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--hairline); padding: 18px;
  background:
    radial-gradient(120% 90% at 0% -10%, rgba(15, 162, 76, .16), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--surface-1));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06);
  display: flex; align-items: center; gap: 18px;
}
.herostat .ringwrap { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.herostat .ringwrap .lbl { position: absolute; display: grid; place-items: center; line-height: 1; }
.herostat .ringwrap .lbl b { font-size: 30px; font-weight: 800; }
.herostat .ringwrap .lbl span { font-size: 10.5px; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.herostat .sats { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.sat { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px; }
.sat .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); display: flex; align-items: center; gap: 6px; }
.sat .k svg { width: 14px; height: 14px; color: var(--primary); }
.sat .v { font-weight: 700; font-size: 18px; margin-top: 2px; }
.sat .v .u { font-size: .62em; color: var(--muted-fg); font-weight: 600; }

/* ── weekly 7-day strip ──────────────────────────────────────────────── */
.wkstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0; border-radius: 13px; border: 1px solid transparent; background: var(--surface-1); box-shadow: var(--shadow-sm); }
.wk .d { font-size: 10.5px; color: var(--muted-fg); font-weight: 600; }
.wk .o { width: 9px; height: 9px; border-radius: 999px; background: var(--surface-3); }
.wk .o.done { background: var(--primary); }
.wk .o.miss { background: transparent; border: 1.5px solid var(--danger); }
.wk.today { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-tint); }
.wk.today .d { color: var(--primary); }

/* ── streak card ─────────────────────────────────────────────────────── */
.streak-card { display: flex; align-items: center; gap: 14px; }
.streak-card .flame { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, rgba(230, 167, 0, .25), var(--surface-2)); color: var(--warn); flex: 0 0 auto; }
.streak-card .flame svg { width: 26px; height: 26px; }
.streak-card .n { font-size: 22px; font-weight: 800; }

/* ── today plan rows (stat-bearing) ──────────────────────────────────── */
.planrow { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: var(--radius); background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 45%); background-color: var(--surface-1); border: 1px solid var(--hairline); box-shadow: var(--shadow-md); }
.planrow + .planrow { margin-top: 10px; }
.planrow .ic { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.planrow .ic svg { width: 21px; height: 21px; }
.planrow.done .ic { background: var(--primary); color: #fff; }
.planrow .tt { font-weight: 600; }
.planrow .sub { color: var(--muted-fg); font-size: 12.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.planrow .macros { display: flex; gap: 6px; margin-top: 6px; }
.planrow .macros .mm { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.planrow .macros .mm i { display: block; height: 100%; background: var(--primary); transform-origin: left; }
.planrow .rt { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.planrow .chev { color: var(--faint-fg); }

/* ── coach strip ─────────────────────────────────────────────────────── */
.coachstrip { display: flex; align-items: center; gap: 12px; }
.coachstrip .av { width: 46px; height: 46px; border-radius: 999px; flex: 0 0 auto; display: grid; place-items: center; background: var(--primary-tint); position: relative; }
.coachstrip .av img.mark { width: 30px; height: 30px; }
.coachstrip .av .on { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 999px; background: var(--primary); border: 2px solid var(--surface-1); }
.coachstrip .nm { font-weight: 600; }
.coachstrip .pv { color: var(--muted-fg); font-size: 12.5px; margin-top: 1px; }

/* ── membership home strip ───────────────────────────────────────────── */
.mstrip { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--hairline); padding: 15px 16px;
  background: radial-gradient(130% 100% at 100% 0%, rgba(15, 162, 76, .14), transparent 50%), linear-gradient(160deg, var(--surface-2), var(--surface-1));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .05); }
.mstrip .top { display: flex; align-items: center; gap: 10px; }
.mstrip .crest { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.mstrip .crest svg { width: 20px; height: 20px; }
.mstrip .nm { font-weight: 700; }
.mstrip .wk { background: transparent; box-shadow: none; border: 0; padding: 0; }
.mstrip .barwrap { margin-top: 12px; }
.mstrip .bar { height: 7px; }

/* ── next session / book-a-call card ─────────────────────────────────── */
.nextcall { display: flex; align-items: center; gap: 13px; }
.nextcall .ic { width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.nextcall .ic svg { width: 22px; height: 22px; }

/* ── MEMBERSHIP screen ───────────────────────────────────────────────── */
.plan-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 20px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--hairline));
  background: radial-gradient(110% 90% at 100% -10%, rgba(15, 162, 76, .22), transparent 55%), linear-gradient(160deg, var(--surface-2), var(--surface-1));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .07); }
.plan-hero .crest { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 8px 20px -6px rgba(15, 162, 76, .6); }
.plan-hero .crest svg { width: 27px; height: 27px; }
.plan-hero .tier { font-size: 24px; font-weight: 800; }
.plan-hero .price { font-size: 14px; color: var(--muted-fg); }
.plan-hero .price b { color: var(--fg); font-size: 17px; }
.plan-hero .meta { color: var(--muted-fg); font-size: 13px; }
.plan-card { position: relative; border-radius: var(--radius); border: 1px solid var(--hairline); padding: 16px; background-color: var(--surface-1); background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 45%); box-shadow: var(--shadow-md); }
.plan-card + .plan-card { margin-top: 12px; }
.plan-card.cur { border-color: color-mix(in srgb, var(--primary) 50%, transparent); background-image: radial-gradient(120% 80% at 100% 0%, var(--primary-tint), transparent 55%); }
.plan-card.pop { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.plan-card .pop-tag { position: absolute; top: -10px; left: 16px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .03em; }
.plan-card .ph { display: flex; align-items: center; gap: 12px; }
.plan-card .ph .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.plan-card .ph .tn { font-weight: 800; font-size: 18px; }
.plan-card .ph .pr { margin-left: auto; text-align: right; }
.plan-card .ph .pr b { font-size: 20px; font-weight: 800; }
.plan-card .ph .pr span { display: block; font-size: 11px; color: var(--muted-fg); }
.plan-card .feats { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.plan-card .feats div { display: flex; gap: 9px; font-size: 13.5px; align-items: flex-start; }
.plan-card .feats div svg { width: 16px; height: 16px; color: var(--primary); flex: 0 0 auto; margin-top: 2px; }

/* book-a-call sheet */
.bcdates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.bcdates::-webkit-scrollbar { display: none; }
.bcdate { flex: 0 0 auto; min-width: 58px; text-align: center; padding: 9px 6px; border-radius: 13px; background: var(--surface-2); border: 1.5px solid transparent; }
.bcdate.on { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.bcdate .dw { font-size: 11px; color: var(--muted-fg); } .bcdate.on .dw { color: var(--primary); }
.bcdate .dn { font-size: 17px; font-weight: 700; }
.bcslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bcslot { padding: 11px 0; text-align: center; border-radius: 11px; background: var(--surface-2); font-weight: 600; font-size: 14px; border: 1.5px solid transparent; }
.bcslot.on { background: var(--primary); color: #fff; }
.bcslot[disabled] { opacity: .35; pointer-events: none; }
.bc-daypart { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); margin: 12px 0 8px; }

/* ── aurora depth overlay on focal cards (Higgsfield fx-aurora) ──────── */
.herostat, .plan-hero, .mstrip { position: relative; }
.herostat::before, .plan-hero::before, .mstrip::before { content: ""; position: absolute; inset: 0; background: url("./fx-aurora.webp") center / cover no-repeat; pointer-events: none; border-radius: inherit; z-index: 0; }
.herostat::before { opacity: .22; }
.mstrip::before { opacity: .26; }
.plan-hero::before { opacity: .4; -webkit-mask-image: linear-gradient(160deg, #000, transparent 75%); mask-image: linear-gradient(160deg, #000, transparent 75%); }
.herostat > *, .plan-hero > *, .mstrip > * { position: relative; z-index: 1; }
[data-theme="light"] .herostat::before, [data-theme="light"] .plan-hero::before, [data-theme="light"] .mstrip::before { opacity: .12; }

/* ── floating tab bar + active pill ──────────────────────────────────── */
.tabbar { left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 9px); height: 62px; padding-bottom: 0; border-radius: 22px; border: 1px solid var(--hairline-strong); box-shadow: var(--shadow-lg); }
.tab svg { width: 24px; height: 24px; }
.tab .ti { display: grid; place-items: center; padding: 5px 16px; border-radius: 999px; transition: background .22s var(--ease); }
.tab.on .ti { background: var(--primary-tint); }
.tab::before { display: none; }
.view.has-tabbar { padding-bottom: calc(62px + env(safe-area-inset-bottom) + 26px); }
.chatwrap { bottom: calc(62px + env(safe-area-inset-bottom) + 18px); }
.restbar { bottom: calc(62px + env(safe-area-inset-bottom) + 22px); }
#toast { bottom: calc(62px + env(safe-area-inset-bottom) + 24px); }
.installbar { bottom: calc(62px + env(safe-area-inset-bottom) + 20px); }

/* ════════════════════════════════════════════════════════════════════════
   REDESIGN v4 · profile avatar · chat avatar gutter · log-meal sheet · hero type
   ════════════════════════════════════════════════════════════════════════ */

/* ── topbar profile avatar (replaces the settings gear) ──────────────── */
.tb-avatar {
  width: 38px; height: 38px; border-radius: var(--pill); flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: 13.5px; letter-spacing: .02em;
  color: var(--primary); background: var(--primary-tint);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 38%, transparent);
  transition: transform .12s var(--ease), box-shadow .18s, background .18s, color .18s;
}
.tb-avatar:active { transform: scale(.92); }
.tb-avatar.on { background: var(--primary); color: #fff; box-shadow: 0 5px 16px -5px rgba(15, 162, 76, .75); }

/* ── HOME: greeting + hero-ring typography polish ────────────────────── */
.greet h1 { font-size: 27px; line-height: 1.08; letter-spacing: -.022em; }
.greet .meta { font-size: 12.5px; letter-spacing: .004em; }
.herostat { gap: 16px; }
.herostat .ringwrap .lbl b { font-size: 31px; font-weight: 800; letter-spacing: -.03em; }
.herostat .ringwrap .lbl .pc { font-size: .46em; font-weight: 700; opacity: .55; margin-left: 1px; vertical-align: .07em; }
.herostat .ringwrap .lbl span { font-size: 10px; letter-spacing: .08em; margin-top: 3px; }
.sat .v { font-size: 19px; letter-spacing: -.01em; }

/* ── LOG-A-MEAL sheet (nutrition) ────────────────────────────────────── */
.lg-items { display: flex; flex-direction: column; gap: 8px; }
.lg-items:empty { display: none; }
.lg-items .lrow + .lrow { margin-top: 0; }
.lg-total {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--primary-tint); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}
.lg-total .lbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); }
.lg-macros { display: flex; align-items: baseline; gap: 13px; flex-wrap: wrap; }
.lg-macros > span { font-size: 12px; color: var(--muted-fg); font-weight: 600; white-space: nowrap; }
.lg-macros > span b { font-size: 15px; color: var(--fg); margin-right: 1px; font-weight: 700; }
.lg-macros .kc b { color: var(--primary); }
.lg-results { max-height: 38vh; overflow-y: auto; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.lg-results .lrow + .lrow { margin-top: 6px; }
.sheet .chiprow { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }

/* ── changelog "what's new" sheet ────────────────────────────────────── */
.cl-entry + .cl-entry { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.cl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cl-head .cl-ver { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.cl-head .cl-date { margin-left: auto; font-size: 12px; color: var(--faint-fg); }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cl-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.42; }
.cl-list li svg { width: 17px; height: 17px; color: var(--primary); flex: 0 0 auto; margin-top: 2px; }

/* ── GDPR consent gate ───────────────────────────────────────────────── */
.consent-gate { min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: calc(28px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); }
.consent-gate .cg-mark { display: grid; place-items: center; margin-bottom: 16px; }
.consent-gate .cg-mark img.mark { width: 58px; height: 58px; filter: drop-shadow(0 8px 24px rgba(15, 162, 76, .4)); }
.consent-gate h1 { font-size: 24px; text-align: center; letter-spacing: -.02em; }
.consent-gate .sub { text-align: center; color: var(--muted-fg); margin-top: 8px; font-size: 14px; line-height: 1.5; }
.cg-items { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 14px; }
.cg-item { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--radius); background: var(--surface-1); border: 1px solid var(--hairline); transition: border-color .15s, background .15s; }
.cg-item .cg-box { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 7px; border: 2px solid var(--border-control); display: grid; place-items: center; color: transparent; transition: all .15s var(--ease); }
.cg-item .cg-box svg { width: 16px; height: 16px; }
.cg-item.on { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-tint); }
.cg-item.on .cg-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.cg-item .cg-lbl { font-size: 13.5px; line-height: 1.45; }
.cg-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 18px; }
.cg-links button { color: var(--primary); font-size: 13px; font-weight: 600; }
.cg-links .dot { color: var(--faint-fg); }
.cg-foot { text-align: center; color: var(--muted-fg); font-size: 12px; margin-top: 12px; line-height: 1.5; }
.cg-cookie { text-align: center; color: var(--faint-fg); font-size: 11.5px; margin-top: 8px; line-height: 1.5; }
/* gdx- · GDPR consent additions: obvious document links + app-update re-consent note */
.gdx-doclinks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.gdx-doclinks button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-1); border: 1px solid var(--hairline); font-size: 13.5px; font-weight: 600; color: var(--fg); transition: border-color .15s, background .15s; }
.gdx-doclinks button:active { background: var(--surface-2); }
.gdx-doclinks button > svg:first-child { width: 17px; height: 17px; color: var(--primary); flex: 0 0 auto; }
.gdx-doclinks button span { flex: 1 1 auto; min-width: 0; }
.gdx-doclinks button .gdx-chev { width: 15px; height: 15px; color: var(--faint-fg); flex: 0 0 auto; }
.gdx-upnote { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--primary-tint); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); font-size: 12.5px; line-height: 1.45; color: var(--fg); text-align: left; }
.gdx-upnote svg { width: 15px; height: 15px; color: var(--primary); flex: 0 0 auto; margin-top: 2px; }

/* ── #496 agreement wall («Επιβεβαίωση των όρων συνεργασίας μας») ─────── */
.agrw { min-height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
.agrw-head { text-align: center; margin-bottom: 14px; }
.agrw-mark { display: grid; place-items: center; margin-bottom: 12px; }
.agrw-mark img.mark { width: 52px; height: 52px; filter: drop-shadow(0 8px 24px rgba(15, 162, 76, .4)); }
.agrw-head h1 { font-size: 21px; letter-spacing: -.02em; }
.agrw-sub { color: var(--muted-fg); margin-top: 7px; font-size: 13.5px; line-height: 1.5; }
.agrw-doc { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 15px; max-height: 46dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; margin-bottom: 14px; }
.agrw-doc .agr-title { font-size: 18px; margin-bottom: 2px; }
.agrw-doc .agr-sub { color: var(--faint-fg); font-size: 11.5px; margin-bottom: 10px; }
.agrw-doc h3 { font-size: 13.5px; margin: 14px 0 5px; color: var(--primary); }
.agrw-doc p, .agrw-doc .agr-party { font-size: 12.8px; line-height: 1.6; color: var(--muted-fg); margin: 0 0 7px; }
.agrw-doc .agr-fill { color: var(--faint-fg); font-style: italic; }
.agrw-doc .agr-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.agrw-doc .agr-table th, .agrw-doc .agr-table td { border: 1px solid var(--hairline); padding: 6px 9px; text-align: left; font-size: 12.5px; }
.agrw-doc .agr-table th { background: var(--surface-2); font-weight: 600; }
.agrw-doc .agr-signs { display: flex; gap: 10px; flex-wrap: wrap; }
.agrw-doc .agr-signbox { flex: 1; min-width: 180px; border: 1px solid var(--hairline); border-radius: 10px; padding: 10px; }
.agrw-doc .agr-signlbl { font-size: 10.5px; color: var(--faint-fg); margin-bottom: 6px; letter-spacing: .06em; text-transform: uppercase; }
.agrw-doc .agr-signimg { max-width: 180px; max-height: 66px; background: #fff; border-radius: 7px; padding: 4px; display: block; margin-bottom: 6px; }
.agrw-doc .agr-signmeta { font-size: 11.5px; color: var(--muted-fg); line-height: 1.5; }
.agrw-card { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 15px; }
.agrw-tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--pill); margin: 4px 0 12px; }
.agrw-tabs button { flex: 1; padding: 8px 10px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; color: var(--muted-fg); transition: color .15s, background .15s; }
.agrw-tabs button.on { background: var(--primary); color: #04130A; }
.agrw-canvasbox { position: relative; background: #F4F7F5; border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent); border-radius: var(--radius-sm); height: 150px; margin-bottom: 8px; overflow: hidden; }
.agrw-canvasbox canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.agrw-canvashint { position: absolute; inset: 0; display: grid; place-items: center; color: #9AA8A0; font-size: 13px; pointer-events: none; }
.agrw-typedprev { background: #F4F7F5; border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent); border-radius: var(--radius-sm); min-height: 84px; display: grid; place-items: center; color: #10221A; font-size: 30px; padding: 8px 14px; overflow: hidden; text-align: center; word-break: break-word; }
.agrw-typedprev.empty { color: #9AA8A0; font-size: 18px; }
.agrw-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 12.8px; line-height: 1.5; color: var(--fg); margin: 14px 0 4px; }
.agrw-agree input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--primary); }
.agrw-err { color: var(--danger, #E5484D); font-size: 12.5px; min-height: 16px; margin: 6px 0; }
.agrw-foot { text-align: center; color: var(--faint-fg); font-size: 11.5px; margin-top: 10px; line-height: 1.5; }

/* ── legal document viewer (privacy / terms) ─────────────────────────── */
.legal-lang { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--pill); margin-bottom: 10px; }
.legal-lang button { padding: 5px 15px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; color: var(--muted-fg); transition: color .15s, background .15s; }
.legal-lang button.on { background: var(--surface-1); color: var(--fg); box-shadow: var(--shadow-sm); }
[data-theme="light"] .legal-lang button.on { background: #fff; }
.legal h4 { font-size: 15px; margin: 18px 0 6px; }
.legal h4:first-child { margin-top: 4px; }
.legal p { font-size: 13.5px; line-height: 1.6; color: var(--muted-fg); margin: 0 0 8px; }
.legal .legal-ul { margin: 0 0 10px; padding-left: 18px; }
.legal .legal-ul li { font-size: 13.5px; line-height: 1.55; color: var(--muted-fg); margin-bottom: 4px; }

/* ════════════════════════════════════════════════════════════════════════
   REDESIGN v5 · uniform plan rows · left-aligned card buttons · richer CTA ·
   tappable week strip · interactivity (hover lift / press) everywhere
   ════════════════════════════════════════════════════════════════════════ */

/* button-based cards default to text-align:center; force left so titles line up */
.planrow, .coachstrip, .cta, .nextcall, .mstrip, .plan-card, .cg-item { text-align: left; }

/* today plan rows: uniform full width + uniform icon treatment (done = pill, not a recoloured icon) */
.planrow { width: 100%; }
.planrow.done .ic { background: var(--primary-tint); color: var(--primary); }
.planrow .rt { flex: 0 0 auto; }

/* coach strip: left aligned, full width */
.coachstrip { width: 100%; }
.coachstrip .nm, .coachstrip .pv { text-align: left; }

/* CTA: deeper, richer emerald (less neon), keep the sheen + lift */
.cta { width: 100%; background: linear-gradient(135deg, #1aa54b 0%, #0e6e34 55%, #0a5026 100%); box-shadow: 0 16px 36px -14px rgba(10, 80, 38, .85), inset 0 1px 0 rgba(255, 255, 255, .09); }
.cta:active { box-shadow: 0 8px 22px -12px rgba(10, 80, 38, .85); }

/* tappable weekly strip days */
.wkstrip .wk { cursor: pointer; background: var(--surface-1); transition: transform .15s var(--ease), border-color .18s, background .18s, box-shadow .18s; }
.wkstrip .wk:active { transform: scale(.94); }

/* ── interactivity: hover lift + press feedback on tappable surfaces ──── */
.planrow, .coachstrip, .mstrip, .nextcall, .plan-card, .tile, .meal, .habit, .lrow, .cg-item, .chip, .card.tap, .bcdate, .bcslot {
  transition: transform .15s var(--ease), border-color .18s, box-shadow .2s, background .18s;
}
.planrow:active, .coachstrip:active, .mstrip:active, .nextcall:active, .plan-card:active, .lrow:active, .cg-item:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) {
  .planrow:hover, .coachstrip:hover, .mstrip:hover, .nextcall:hover, .plan-card:hover, .tile:hover {
    transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 34%, var(--hairline)); box-shadow: var(--shadow-lg);
  }
  .cta:hover { transform: translateY(-2px); box-shadow: 0 20px 42px -12px rgba(10, 80, 38, .9), inset 0 1px 0 rgba(255, 255, 255, .12); }
  .wkstrip .wk:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 50%, transparent); background: var(--surface-2); }
  .lrow:hover, .habit:hover, .meal:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--hairline)); }
  .cg-item:hover { border-color: color-mix(in srgb, var(--primary) 38%, var(--hairline)); }
  .iconbtn:hover, .tb-btn:hover, .tb-avatar:hover, .chip:hover { background: var(--surface-3); }
  .chev:hover { color: var(--primary); }
  a:hover, .btn-ghost:hover { opacity: .85; }
}

/* ── profile photo (header avatar + settings avatar) ─────────────────── */
.tb-avatar { overflow: hidden; position: relative; }
/* absolute fill: percentage sizing of the img inside the grid button let the
   photo keep its intrinsic aspect (26x36 inside the 38px circle, overflow on
   stale CSS). inset:0 pins it to the circle; cover crops; radius clips. */
.tb-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: inherit; }
.tb-avatar.has-img { background: var(--surface-2); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 60%, transparent); }
.pfp { position: relative; width: 56px; height: 56px; flex: 0 0 auto; border-radius: 999px; display: grid; place-items: center; background: var(--primary-tint); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 30%, transparent); transition: transform .14s var(--ease); }
/* no overflow:hidden on .pfp (the camera badge hangs outside) · the img clips itself */
.pfp img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 999px; object-fit: cover; }
.pfp .pfp-init { font-weight: 700; font-size: 20px; color: var(--primary); }
.pfp .pfp-cam { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 999px; background: var(--primary); color: #fff; display: grid; place-items: center; border: 2px solid var(--surface-1); }
.pfp .pfp-cam svg { width: 12px; height: 12px; }
.pfp:active { transform: scale(.94); }

/* ── update-available banner (interactive: glow, sheen, pulsing chip) ── */
@keyframes ubIn { 0% { opacity: 0; transform: translateY(-14px) scale(.96); } 60% { opacity: 1; transform: translateY(2px) scale(1.005); } 100% { opacity: 1; transform: none; } }
@keyframes ubGlow { 0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(29,185,84,0); } 50% { box-shadow: var(--shadow-lg), 0 0 24px -4px rgba(29,185,84,.45); } }
@keyframes ubSheen { 0% { left: -55%; } 26%, 100% { left: 125%; } }
@keyframes ubChip { 0%,100% { box-shadow: 0 0 0 0 rgba(29,185,84,.5); } 55% { box-shadow: 0 0 0 5px rgba(29,185,84,0); } }
@keyframes ubNudge { 0%, 88%, 100% { transform: none; } 92% { transform: scale(1.04); } 96% { transform: scale(.99); } }
.updatebar { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px); z-index: 70; display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, var(--surface-2)), var(--surface-2) 70%); border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--hairline-strong)); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 520px; margin: 0; overflow: hidden; animation: ubIn .55s var(--ease) both, ubGlow 3.2s ease-in-out 1s infinite; }
.updatebar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); box-shadow: 0 0 10px rgba(29,185,84,.8); }
.updatebar::after { content: ""; position: absolute; top: 0; left: -55%; width: 38%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.09), transparent); transform: skewX(-18deg); animation: ubSheen 4.5s ease-in-out 1.4s infinite; pointer-events: none; }
.updatebar .grow { flex: 1; min-width: 0; position: relative; }
.updatebar .t1 { font-size: 13.5px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.updatebar .t1 .ver { font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-tint); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); border-radius: var(--pill); padding: 1px 8px; animation: ubChip 2.4s ease-in-out infinite; }
.updatebar .t2 { font-size: 12px; margin-top: 1px; }
.updatebar .t2 a { color: var(--primary); font-weight: 500; text-decoration: none; border-bottom: 1px solid transparent; }
.updatebar .t2 a:hover { border-bottom-color: var(--primary); }
.updatebar .btn-primary { position: relative; animation: ubNudge 5s ease-in-out 2s infinite; box-shadow: 0 2px 10px -2px rgba(29,185,84,.55); }
@media (prefers-reduced-motion: reduce) { .updatebar, .updatebar::after, .updatebar .t1 .ver, .updatebar .btn-primary { animation: none !important; } }

/* ════════════════════════════════════════════════════════════════════════
   REDESIGN v6 · premium surface language · calm focal glows · springier
   motion · full light-theme parity. Consolidates v2..v5: muddy bevels
   lightened, webp aurora replaced by restrained CSS radials, depth now
   driven by the refined shadow tokens. Mono Green & Ink · ONE accent.
   ════════════════════════════════════════════════════════════════════════ */

/* ── contract: universal press feedback ──────────────────────────────── */
.pressable { transition: transform .18s var(--spring), border-color .18s, box-shadow .22s, background .18s; }
.pressable:active { transform: scale(.97); }

/* ── surface language: crisp hairline + one whisper of bevel ─────────── */
.card, .meal, .exblock, .habit, .lrow, .tk, .member, .planrow, .plan-card, .tile {
  background-color: var(--surface-1);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, 0) 34%);
  border-color: var(--hairline);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .04);
}
[data-theme="light"] .card, [data-theme="light"] .meal, [data-theme="light"] .exblock, [data-theme="light"] .habit,
[data-theme="light"] .lrow, [data-theme="light"] .tk, [data-theme="light"] .member, [data-theme="light"] .planrow,
[data-theme="light"] .plan-card, [data-theme="light"] .tile { background-image: none; box-shadow: var(--shadow-md); }
.section { margin-top: 24px; }

/* ── contract: focal card (a calmer plan-hero) ───────────────────────── */
.card.focal {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--hairline));
  background-image:
    radial-gradient(120% 90% at 100% -12%, rgba(15, 162, 76, .12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, 0) 34%);
}
[data-theme="light"] .card.focal {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--hairline));
  background-image: radial-gradient(120% 90% at 100% -12%, rgba(15, 162, 76, .08), transparent 55%);
}

/* ── hero + focal cards: one calm radial spotlight (webp aurora is out) ─ */
.herostat, .mstrip, .plan-hero { background: linear-gradient(165deg, var(--surface-2), var(--surface-1) 72%); }
.herostat { border-color: color-mix(in srgb, var(--primary) 16%, var(--hairline)); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06); }
.mstrip { box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .05); }
.plan-hero { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .07); }
.herostat::before, .plan-hero::before, .mstrip::before {
  background:
    radial-gradient(110% 100% at 88% -24%, rgba(15, 162, 76, .2), transparent 58%),
    radial-gradient(80% 120% at -12% 118%, rgba(15, 162, 76, .06), transparent 55%);
  -webkit-mask-image: none; mask-image: none;
  opacity: 1;
}
.plan-hero::before {
  background:
    radial-gradient(110% 100% at 88% -24%, rgba(15, 162, 76, .28), transparent 60%),
    radial-gradient(80% 120% at -12% 118%, rgba(15, 162, 76, .07), transparent 55%);
}
[data-theme="light"] .herostat::before, [data-theme="light"] .mstrip::before { opacity: .5; }
[data-theme="light"] .plan-hero::before { opacity: .6; }
[data-theme="light"] .herostat, [data-theme="light"] .plan-hero { box-shadow: var(--shadow-lg); }
[data-theme="light"] .mstrip { box-shadow: var(--shadow-md); }

/* hero type hierarchy: big tabular numbers, tight tracking, quiet eyebrows */
.herostat .ringwrap .lbl b { font-size: 34px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.herostat .ringwrap .lbl span { font-size: 9.5px; font-weight: 600; letter-spacing: .1em; }
.sat { box-shadow: var(--shadow-sm); }
.sat .v { font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.metric { letter-spacing: -.025em; }
.member .big { letter-spacing: -.02em; }
.plan-hero .tier { letter-spacing: -.02em; }
.plan-hero .price b { font-variant-numeric: tabular-nums; }
.auth h1 { letter-spacing: -.02em; }

/* hero ring: soft green breath behind the dial (one focal pulse per view) */
.herostat .ringwrap::after {
  content: ""; position: absolute; inset: -10px; border-radius: 999px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(15, 162, 76, .16), transparent 72%);
  animation: breathe 4s ease-in-out infinite;
}
[data-theme="light"] .herostat .ringwrap::after { background: radial-gradient(closest-side, rgba(15, 162, 76, .1), transparent 72%); }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }

/* ── topbar: brand lockup + scroll depth ─────────────────────────────── */
.topbar { transition: border-color .25s, background .25s, box-shadow .25s; }
.topbar.scrolled { box-shadow: 0 12px 32px -24px rgba(0, 0, 0, .9); }
[data-theme="light"] .topbar.scrolled { box-shadow: 0 12px 32px -26px rgba(10, 10, 10, .4); }
.topbar .brand b { letter-spacing: -.005em; }
.topbar .tb-btn { transition: background .18s var(--ease), transform .16s var(--spring); }
.topbar .tb-btn:active { transform: scale(.9); }

/* ── floating tab bar: iOS pill morph + icon pop + green under-glow ──── */
.tabbar {
  max-width: calc(var(--maxw) - 24px); margin: 0 auto;
  border-radius: 24px; border-color: var(--hairline);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05);
}
[data-theme="light"] .tabbar { box-shadow: var(--shadow-lg); }
.tab { transition: color .2s var(--ease); }
.tab .ti { position: relative; padding: 5px 17px; transition: background .24s var(--ease), box-shadow .24s, transform .16s var(--spring); }
.tab:active .ti { transform: scale(.86); }
.tab svg { transition: transform .32s var(--spring); }
.tab.on svg { transform: translateY(-1px) scale(1.08); }
.tab.on .ti {
  background: var(--primary-tint);
  box-shadow: 0 10px 22px -10px rgba(15, 162, 76, .55), inset 0 0 0 1px color-mix(in srgb, var(--primary) 16%, transparent);
  animation: tabPill .32s var(--spring);
}
[data-theme="light"] .tab.on .ti { box-shadow: 0 10px 20px -12px rgba(15, 162, 76, .5), inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent); }
@keyframes tabPill { from { transform: scaleX(.6); } }
.tab > span:not(.ti):not(.tab-dot) { letter-spacing: .01em; }
.tab.on > span:not(.ti):not(.tab-dot) { font-weight: 700; }

/* ── animated fills: bars, macro minis, segment bars ─────────────────── */
.bar > i { transition: transform .6s var(--ease-out); }
@keyframes fillIn { from { transform: scaleX(0); } }
.stagger .bar > i { animation: fillIn .9s var(--ease-out) .25s backwards; }
.planrow .macros .mm i { transition: transform .5s var(--ease-out); }
.stagger .planrow .macros .mm i { animation: fillIn .8s var(--ease-out) .3s backwards; }
.segbar i { transform-origin: left center; }
@keyframes segIn { from { transform: scaleX(0); opacity: .35; } }
.stagger .segbar i.on { animation: segIn .55s var(--ease-out) .25s backwards; }

/* ── buttons: springier press + focus glow (BRANDING §7) ─────────────── */
.btn { transition: transform .16s var(--spring), background .18s, opacity .15s, box-shadow .2s; }
.btn:active { transform: scale(.96); }
.btn-primary { box-shadow: 0 8px 20px -10px rgba(15, 162, 76, .6), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:active { box-shadow: 0 4px 12px -8px rgba(15, 162, 76, .55); }
[data-theme="light"] .btn-primary { box-shadow: 0 8px 20px -10px rgba(15, 162, 76, .45); }
.btn:focus-visible, .inp:focus-visible, .tab:focus-visible, .iconbtn:focus-visible,
.tb-btn:focus-visible, .tb-avatar:focus-visible, .chip:focus-visible, .hcheck:focus-visible { outline: none; box-shadow: var(--focus-glow); }

/* ── checks, toggles, chips: satisfying state changes ────────────────── */
.hcheck, .wtk-set .check { transition: background .18s var(--ease), color .18s, transform .16s var(--spring), box-shadow .2s; }
.hcheck:active, .wtk-set .check:active { transform: scale(.88); }
.hcheck.on, .wtk-set .check.on { box-shadow: 0 8px 18px -8px rgba(15, 162, 76, .55); }
.hcheck.on svg, .wtk-set .check.on svg, .cg-item.on .cg-box svg { animation: pop .32s var(--spring) both; }
.sw { transition: background .2s var(--ease), box-shadow .2s; }
.sw::after { transition: transform .24s var(--spring); }
.sw.on { box-shadow: 0 4px 14px -6px rgba(15, 162, 76, .55); }
.chip:active { transform: scale(.95); }
.chip.on { box-shadow: 0 4px 12px -8px rgba(15, 162, 76, .4); }
.lrow .ic, .planrow .ic { transition: transform .2s var(--spring); }
.lrow:active .ic, .planrow:active .ic { transform: scale(.92); }

/* ── sheets, scrim, full-screen, toast ───────────────────────────────── */
.scrim-bg { background: rgba(0, 0, 0, .6); }
[data-theme="light"] .scrim-bg { background: rgba(10, 10, 10, .45); }
.sheet { border-radius: 24px 24px 0 0; transition: transform .34s cubic-bezier(.32, .72, 0, 1); box-shadow: 0 -18px 60px -12px rgba(0, 0, 0, .55); }
[data-theme="light"] .sheet { box-shadow: 0 -18px 60px -18px rgba(10, 10, 10, .28); }
.sheet .grip { width: 44px; }
.fs { transition: transform .36s cubic-bezier(.32, .72, 0, 1); }
#toast { transform: translateX(-50%) translateY(16px) scale(.96); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05); }
#toast.show { transform: translateX(-50%) translateY(0) scale(1); }
#toast.grn { border-color: color-mix(in srgb, var(--primary) 55%, var(--hairline-strong)); box-shadow: var(--shadow-lg), 0 0 24px -8px rgba(15, 162, 76, .35); }
[data-theme="light"] #toast { background: #fff; box-shadow: var(--shadow-lg); }
[data-theme="light"] .chat-input #chatSend { box-shadow: 0 4px 14px -4px rgba(15, 162, 76, .5); }

/* ── hover states (pointer devices only) ─────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .pressable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 30%, var(--hairline)); }
  .btn-primary:hover { background: var(--primary-600); }
  .card.tap:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 30%, var(--hairline)); box-shadow: var(--shadow-lg); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } .ambient, .auth-hero { animation: none; } }

/* ════════════════════════════════════════════════════════════════════════
   REDESIGN v6 · per-view additions (merged from view agents)
   ════════════════════════════════════════════════════════════════════════ */

/* ── TDX · today ─────────────────────────────────────────────────────── */
.tdx-sat { display: block; width: 100%; text-align: left; }
.wk .tdx-dn { font-size: 13px; font-weight: 700; letter-spacing: -.01em; margin: -3px 0 -1px; }
.wk.today .tdx-dn { color: var(--primary); }
.tdx-flame-live svg { animation: tdxFlame 2.6s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes tdxFlame { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12) rotate(-2deg); opacity: .88; } }
.tdx-drow { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; text-align: left; }
.tdx-drow .ic { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.tdx-drow .ic svg { width: 22px; height: 22px; }
.tdx-drow .tt { font-weight: 600; }
.tdx-drow .sub { color: var(--muted-fg); font-size: 12.5px; margin-top: 1px; }
.tdx-dstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tdx-dstat { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 8px; text-align: center; }
.tdx-dstat b { font-size: 17px; font-weight: 700; display: block; }
.tdx-dstat span { font-size: 10.5px; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .04em; }

/* ── PGX · progress hub ──────────────────────────────────────────────── */
.pgx-seg { margin: 2px 0 10px; }
.pgx-seg button[disabled] { opacity: .38; pointer-events: none; }
.pgx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pgx-stat { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 12px; padding: 9px 10px; }
.pgx-stat span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); }
.pgx-stat b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pgx-stat b i { font-style: normal; font-size: .62em; color: var(--muted-fg); font-weight: 600; margin-left: 2px; }
.pgx-stat b.good { color: var(--primary); }
.pgx-chartwrap { position: relative; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.pgx-svg { display: block; width: 100%; height: 190px; }
.pgx-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pgxDash 1s var(--ease) .15s forwards; }
@keyframes pgxDash { to { stroke-dashoffset: 0; } }
.pgx-ylab { position: absolute; right: 4px; font-size: 10px; color: var(--faint-fg); }
.pgx-ymax { top: 2px; } .pgx-ymin { bottom: 2px; }
.pgx-badge { position: absolute; transform: translate(-50%, -145%); background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px -4px rgba(15, 162, 76, .7); pointer-events: none; transition: opacity .15s; }
.pgx-chartwrap.scrubbing .pgx-badge { opacity: 0; }
.pgx-scrub { position: absolute; inset: 0; pointer-events: none; }
.pgx-vline { position: absolute; top: 6px; bottom: 6px; width: 1px; background: color-mix(in srgb, var(--primary) 55%, transparent); }
.pgx-sdot { position: absolute; width: 12px; height: 12px; border-radius: 999px; background: var(--primary); border: 2.5px solid var(--bg); transform: translate(-50%, -50%); box-shadow: 0 0 0 4px rgba(15, 162, 76, .22); }
.pgx-bubble { position: absolute; top: -8px; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 5px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-md); text-align: center; }
.pgx-bubble span { display: block; font-size: 10.5px; color: var(--muted-fg); font-weight: 500; }
.pgx-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--muted-fg); }
.pgx-legend i { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid var(--primary); border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.pgx-legend .dash i { border-top: 2px dashed var(--faint-fg); }
.pgx-bars { position: relative; display: flex; align-items: flex-end; gap: 7px; height: 92px; }
.pgx-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0; border-radius: 8px; }
.pgx-bar i { display: block; width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: color-mix(in srgb, var(--primary) 34%, var(--surface-3)); transform-origin: bottom; animation: pgxGrow .55s var(--ease) both; transition: background .18s var(--ease); }
.pgx-bar.cur i, .pgx-bar.on i { background: var(--primary); box-shadow: 0 4px 14px -4px rgba(15, 162, 76, .55); }
@keyframes pgxGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pgx-target { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--fg) 26%, transparent); pointer-events: none; }
.pgx-barlabels { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; margin-top: 6px; }
.pgx-barlabels span { text-align: center; font-size: 9.5px; color: var(--faint-fg); }
.pgx-barcap { margin-top: 10px; font-size: 12.5px; color: var(--muted-fg); min-height: 18px; }
.pgx-meas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pgx-mtile { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.pgx-mtile span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); }
.pgx-mtile b { font-size: 18px; font-weight: 700; }
.pgx-mtile b i { font-style: normal; font-size: .6em; color: var(--muted-fg); font-weight: 600; margin-left: 2px; }
.pgx-mtile em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted-fg); margin-top: 1px; }
.pgx-mtile em.good { color: var(--primary); }
.pgx-cirow { width: 100%; text-align: left; }

/* ── AUX · auth ──────────────────────────────────────────────────────── */
.aux-card { background: color-mix(in srgb, var(--surface-1) 88%, transparent); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 22px 18px; box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: riseIn .5s var(--ease) both; }
.aux-inwrap { position: relative; }
.aux-lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint-fg); pointer-events: none; display: grid; place-items: center; }
.aux-lead svg { width: 18px; height: 18px; }
.aux-inp { padding-left: 42px; }
.aux-haseye { padding-right: 50px; }
.aux-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--faint-fg); border-radius: 999px; transition: color .15s; }
.aux-eye:active { color: var(--primary); }
.aux-eye svg { width: 20px; height: 20px; }
.aux-code { letter-spacing: .28em; font-size: 19px; }
.aux-shake { animation: auxShake .4s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes auxShake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.aux-lang { display: inline-flex; align-items: center; gap: 6px; }
.aux-lang svg { width: 15px; height: 15px; }
/* ── NUTRITION (ntx-) ────────────────────────────────────────────────── */
.ntx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ntx-head .pill { flex: 0 0 auto; }
/* 2026-10-13: the coach built more day plans than training and rest. The row
   of days scrolls sideways under the finger and the «Σήμερα» chip sits under
   it, so a long day name never squeezes the others. */
.ntx-head.many { flex-wrap: wrap; justify-content: flex-start; }
.ntx-head.many .seg { position: relative; display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ntx-head.many .seg::-webkit-scrollbar { display: none; }
.ntx-head.many .seg button { flex: 0 0 auto; white-space: nowrap; }
.ntx-head.many .pill { max-width: 100%; }
.ntx-chipk { display: inline-block; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* #358 calorie-counter dashboard (ntx2-): day nav, emerald hero ring, macro
   bars, steps + water tiles, journal · the client's daily food diary. */
.ntx2-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ntx2-narr { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface-1); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.ntx2-narr svg { width: 17px; height: 17px; }
.ntx2-narr[disabled] { opacity: .35; cursor: default; }
.ntx2-date { text-align: center; min-width: 0; }
.ntx2-date b { display: block; font-size: 16px; letter-spacing: -.01em; }
.ntx2-date span { display: block; font-size: 12px; color: var(--muted-fg); margin-top: 1px; }
.ntx2-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 16px 14px; color: #fff; background: linear-gradient(150deg, #17b45c 0%, #0e7d3d 52%, #0a5026 100%); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 40px -18px rgba(10, 80, 38, .55), var(--shadow-md); }
.ntx2-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 85% -10%, rgba(255,255,255,.18), transparent 55%); pointer-events: none; }
.ntx2-hero.over { background: linear-gradient(150deg, #b7791f 0%, #8f5a14 52%, #5f3a0a 100%); box-shadow: 0 18px 40px -18px rgba(95, 58, 10, .55), var(--shadow-md); }
.ntx2-hrow { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ntx2-hside { flex: 1; text-align: center; min-width: 0; }
.ntx2-hside b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.ntx2-hside span { display: block; font-size: 11.5px; opacity: .85; margin-top: 1px; }
.ntx2-hring { position: relative; flex: none; display: grid; place-items: center; }
.ntx2-hring svg { display: block; }
.ntx2-hmid { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 0; text-align: center; }
.ntx2-hmid b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.ntx2-hmid span { font-size: 11px; opacity: .85; }
.ntx2-mac { position: relative; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(4, 22, 10, .28); backdrop-filter: blur(4px); display: grid; gap: 10px; }
.ntx2-hero.over .ntx2-mac { background: rgba(34, 20, 2, .28); }
.ntx2-mrow { min-width: 0; }
.ntx2-mtop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; }
.ntx2-mtop .tnum { opacity: .92; }
.ntx2-mtop .tnum.over { color: #FFD98A; font-weight: 700; }
.ntx2-mk { font-weight: 700; letter-spacing: .02em; }
.ntx2-mbar { height: 6px; border-radius: 4px; margin-top: 5px; background: rgba(255,255,255,.18); overflow: hidden; }
.ntx2-mbar i { display: block; height: 100%; border-radius: 4px; transform-origin: left center; transition: transform .7s var(--ease-out); }
.ntx2-mbar.c i { background: #FFD36E; }
.ntx2-mbar.p i { background: #9BF0BC; }
.ntx2-mbar.f i { background: #8FD8FF; }
.ntx2-notg { position: relative; margin-top: 12px; font-size: 13px; opacity: .9; }
.ntx2-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ntx2-tile { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border-radius: 16px; border: 1px solid var(--hairline); background: var(--surface-1); color: var(--fg); text-align: left; font: inherit; box-shadow: var(--shadow-sm); }
button.ntx2-tile { cursor: pointer; }
button.ntx2-tile[disabled] { cursor: default; opacity: .8; }
.ntx2-tic { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.ntx2-tic.blu { background: rgba(79, 195, 247, .16); color: #4FC3F7; }
.ntx2-tic svg { width: 17px; height: 17px; }
.ntx2-tk { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-fg); }
.ntx2-tile b { display: block; font-size: 14.5px; font-weight: 800; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntx2-tile b i { display: block; font-style: normal; font-weight: 600; font-size: 11px; color: var(--muted-fg); margin-top: 1px; }
.ntx2-tring { flex: none; display: grid; place-items: center; }
.ntx2-wadd { width: 34px; height: 34px; flex: none; border-radius: 999px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--primary) 80%, transparent); }
.ntx2-wadd svg { width: 16px; height: 16px; }
/* Compact hydration access; daily habit cards stay on their own screens. */
.n2-water-log { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.n2-water-summary { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; min-height: 44px; padding: 4px; border: 0; border-radius: 8px; background: transparent; color: var(--fg); font: inherit; text-align: left; }
button.n2-water-summary { cursor: pointer; }
.n2-water-summary > svg { width: 18px; height: 18px; flex: none; color: var(--muted-fg); }
.n2-water-summary > span { min-width: 0; }
.n2-water-summary b { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.n2-water-target { display: block; font-size: 11px; line-height: 1.5; color: var(--muted-fg); }
.n2-water-log .n2-water-add { flex: none; min-height: 44px; padding: 8px 10px; white-space: nowrap; }
.n2-water-summary:focus-visible, .n2-water-add:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Shared support attachments in the coach conversation and request history. */
.support-files { display: grid; gap: 8px; margin-top: 8px; min-width: 0; }
.support-file { display: flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 7px 9px; border: 1px solid var(--hairline-strong); border-radius: 9px; color: inherit; overflow-wrap: anywhere; }
.support-file > svg { flex: none; }
.support-file:has(img) { display: block; }
.support-file img { max-width: 100%; max-height: 260px; border-radius: 6px; object-fit: contain; margin-bottom: 5px; }
.support-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
#chxSupportHistory:empty { display: none; }
#chxSupportHistory > [role="status"] { font-size: 11px; white-space: nowrap; }
.ntx2-journal { display: grid; gap: 8px; }
.ntx2-jrow { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--surface-1); }
.ntx2-jrow.skip { opacity: .72; }
.ntx2-jrow.skip b { text-decoration: line-through; }
.ntx2-jimg { width: 46px; height: 46px; flex: none; border-radius: 12px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.ntx2-jic { display: grid; place-items: center; color: var(--primary); }
.ntx2-jic svg { width: 19px; height: 19px; opacity: .7; }
.ntx2-jrow .grow { min-width: 0; }
.ntx2-jrow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntx2-jrow .sub { font-size: 11.5px; color: var(--muted-fg); margin-top: 1px; }
.ntx2-jtag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--primary-tint); color: var(--primary); font-size: 10px; font-weight: 700; }
.ntx2-jtag.mod { background: var(--warn-tint); color: var(--warn); }
.ntx2-jskip { display: block; font-size: 11px; font-weight: 700; color: var(--danger); }
.ntx2-jr { flex: none; text-align: right; }
.ntx2-jkcal { display: block; font-size: 13.5px; font-weight: 800; }
.ntx2-jr .sub { font-size: 11px; color: var(--faint-fg); }
.ntx2-jdel { flex: none; }
/* #501: a logged journal entry is tappable (opens what was actually eaten) */
.ntx2-jrow[data-jlog] { cursor: pointer; }
.ntx-dev { font-size: 12.5px; color: var(--warn); margin-top: 8px; }
.ntx-dev.same { color: var(--muted-fg); }
.ntx-ate { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.ntx-ate .eyebrow { display: block; margin-bottom: 4px; }
.ntx2-jempty { padding: 18px 14px; border-radius: 14px; border: 1px dashed var(--hairline-strong); color: var(--muted-fg); font-size: 13px; text-align: center; }
.ntx2-wbig { font-size: 30px; font-weight: 800; }
.ntx2-wbig b { color: var(--primary); }
.ntx-sum .ntx-kcal { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.ntx-bars { display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.ntx-mrow { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.ntx-mk { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-fg); }
.ntx-mrow .bar { height: 7px; }
.ntx-mv { font-size: 12px; color: var(--muted-fg); white-space: nowrap; min-width: 76px; text-align: right; }
.ntx-mv b { color: var(--fg); font-size: 13.5px; }
.ntx-mchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ntx-mchip { display: inline-flex; align-items: baseline; gap: 3px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 11px; font-weight: 600; color: var(--muted-fg); }
.ntx-mchip b { font-size: 12.5px; color: var(--fg); font-variant-numeric: tabular-nums; }
.ntx-meal .cover { aspect-ratio: 2.2 / 1; }
/* #338 step-by-step prep instructions under the meal foods
   app 2.47: collapsed <details> - a tap on the summary drops the steps down */
.ntx-instr { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ntx-instr > .eyebrow { display: block; margin-bottom: 6px; }
.ntx-instr-s { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; min-height: 24px; }
.ntx-instr-s::-webkit-details-marker { display: none; }
.ntx-instr-s > svg { width: 15px; height: 15px; margin-left: auto; color: var(--muted-fg); transition: transform .18s ease-out; }
details[open] > .ntx-instr-s > svg { transform: rotate(90deg); }
details[open] > .ntx-instr-s { margin-bottom: 8px; }
.ntx-steps { margin: 0; padding-left: 20px; display: grid; gap: 5px; }
.ntx-steps li { font-size: 13px; line-height: 1.55; color: var(--fg); }
.ntx-frow { width: 100%; min-height: 44px; text-align: left; }
.ntx-frow .chev { display: grid; color: var(--faint-fg); }
.ntx-frow .chev svg { width: 15px; height: 15px; }
.ntx-pop { animation: ntxRowIn .5s var(--ease); }
@keyframes ntxRowIn { 0% { transform: scale(.965); background-color: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, transparent); } 100% { transform: scale(1); } }
.ntx-bump { display: inline-block; animation: ntxBump .32s var(--ease); }
@keyframes ntxBump { 0% { transform: scale(1); } 40% { transform: scale(1.28); color: var(--primary); } 100% { transform: scale(1); } }
.ntx-pulse { animation: ntxPulse .45s var(--ease); }
@keyframes ntxPulse { 0% { transform: scale(1); } 35% { transform: scale(1.02); border-color: color-mix(in srgb, var(--primary) 60%, transparent); } 100% { transform: scale(1); } }
/* per-meal confirmation: answer buttons + answered state (sent-plan loop) */
.ntx-cfrow { display: flex; gap: 8px; margin-top: 12px; }
.ntx-cfrow .btn { flex: 1; min-width: 0; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.ntx-cfskip { color: var(--danger); }
.ntx-cfst { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); }
.ntx-cfst .cfic { width: 28px; height: 28px; flex: none; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); color: var(--cf, var(--primary)); }
.ntx-cfst .cfic svg { width: 15px; height: 15px; }
.ntx-cfst b { font-size: 14px; display: block; }
.ntx-cfst .sub { font-size: 12px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; }
.ntx-cfst .btn { flex: none; }
/* whole-card answer states (mirrors the coach console): an unanswered SENT meal
   is a YELLOW open item (steady wash + soft yellow breath · 2026-07-06, no grey
   flashing); answered cards settle into their tint (eaten = green). */
.ntx-meal.pending { border-color: color-mix(in srgb, var(--pend) 55%, var(--hairline)); background: color-mix(in srgb, var(--pend) 5%, var(--surface-1)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pend) 22%, transparent); } /* v1.106: static · the pulsing glow pulled focus away from the meal itself */
@keyframes ntxCardPend { 0%, 100% { box-shadow: 0 0 0 0 transparent, var(--shadow-sm); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pend) 16%, transparent), 0 0 20px color-mix(in srgb, var(--pend) 20%, transparent); } }
.ntx-meal.done { border-color: color-mix(in srgb, var(--primary) 50%, var(--hairline)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 16%, transparent), var(--shadow-sm); }
.ntx-meal.mod { border-color: color-mix(in srgb, var(--warn) 50%, var(--hairline)); }
.ntx-meal.skip { border-color: color-mix(in srgb, var(--danger) 55%, var(--hairline)); }
@media (prefers-reduced-motion: reduce) { .ntx-meal.pending { animation: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--pend) 25%, transparent); } }

/* ── HABITS (hbx-) ───────────────────────────────────────────────────── */
.hbx-in .dots i { animation: hbxDotIn .34s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms + 100ms); }
@keyframes hbxDotIn { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hbx-in .segbar i { transform-origin: left center; }
.hbx-in .segbar i.on { animation: hbxSegIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 140ms); }
@keyframes hbxSegIn { from { transform: scaleX(.2); opacity: .3; } to { transform: none; opacity: 1; } }
.hbx-pop { position: relative; animation: hbxCheckPop .45s var(--ease); }
.hbx-pop::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 0 rgba(15, 162, 76, .5); animation: hbxRing .65s ease-out .05s forwards; }
@keyframes hbxCheckPop { 0% { transform: scale(.72); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes hbxRing { to { box-shadow: 0 0 0 16px rgba(15, 162, 76, 0); } }
.hbx-bump { display: inline-block; animation: hbxValBump .32s var(--ease); }
@keyframes hbxValBump { 0% { transform: scale(1); } 40% { transform: scale(1.28); color: var(--primary); } 100% { transform: scale(1); } }
.hbx-hist { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 10px; }
.hbx-c { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0 10px; border-radius: 12px; background: var(--surface-2); }
.hbx-d { font-size: 10.5px; color: var(--muted-fg); font-weight: 600; }
.hbx-c i { width: 10px; height: 10px; border-radius: 999px; background: var(--surface-3); }
.hbx-c.hbx-on i { background: var(--primary); }
.hbx-c.hbx-miss i { background: var(--danger-tint); }
.hbx-c.hbx-off { opacity: .38; }
.hbx-c.hbx-today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 50%, transparent); }
.hbx-c.hbx-today .hbx-d { color: var(--primary); }
.hbx-ring { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.hbx-ring > span { position: absolute; font-size: 10.5px; font-weight: 700; }
/* ═══ chat (chx-) ═══ */
/* new bubbles slide in at full strength: no fade, so a message never looks
   washed out while it lands (client report 2026-09-24) */
@keyframes chxIn { from { transform: translateY(10px) scale(.97); } to { transform: none; } }
.chx-new { animation: chxIn .34s var(--ease) both; }
.dm-row.me.chx-new { transform-origin: right bottom; }
.chx-daywrap { display: flex; align-items: center; gap: 10px; margin: 14px 2px 8px; }
.chx-daywrap::before, .chx-daywrap::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.chx-daywrap .chat-day { margin: 0; align-self: auto; }
.chx-read { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); }
.chx-read svg { width: 12px; height: 12px; }
.chx-read svg + svg { margin-left: -8px; }
.chx-read span { color: var(--muted-fg); }
.chx-jumpwrap { position: relative; height: 0; overflow: visible; z-index: 5; }
.chx-jump { position: absolute; right: 14px; bottom: 10px; width: 44px; height: 44px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline-strong); color: var(--fg); display: grid; place-items: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(8px) scale(.9); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.chx-jump.show { opacity: 1; transform: none; pointer-events: auto; }
.chx-jump svg { width: 20px; height: 20px; }
.chx-jump-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.chx-attach { display: none; padding: 8px 12px 0; }
.chx-attach.show { display: block; animation: chxIn .25s var(--ease) both; }
.chx-att-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); }
.chx-att-card img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.chx-att-card b { font-size: 13px; }
.chx-att-card .iconbtn { width: 34px; height: 34px; }
.chx-send { transition: transform .16s var(--ease), box-shadow .2s, opacity .2s; opacity: .8; }
.chx-send.chx-live { opacity: 1; transform: scale(1.07); box-shadow: 0 6px 18px -6px rgba(15, 162, 76, .75); }
@keyframes chxPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(15, 162, 76, .45); } 50% { box-shadow: 0 0 0 5px rgba(15, 162, 76, 0); } }
.chx-pulse { animation: chxPulse 2.2s ease-in-out infinite; }

/* ═══ settings (stx-) ═══ */
.stx-hero { display: flex; align-items: center; gap: 14px; }
.stx-hero .pfp { width: 68px; height: 68px; }   /* img absolute-fills the .pfp box */
.stx-hero .pfp .pfp-init { font-size: 24px; }
.stx-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.stx-pills .pill { font-size: 11px; }
.stx-pills .pill svg { width: 12px; height: 12px; }
.stx-seg button { transition: background .2s var(--ease), color .2s var(--ease), transform .16s var(--ease); }
.stx-seg button:active { transform: scale(.93); }

/* ═══ membership (mbx-) ═══ */
.mbx-ring { position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.mbx-lbl { position: absolute; display: grid; place-items: center; line-height: 1; text-align: center; }
.mbx-lbl b { font-size: 17px; font-weight: 800; }
.mbx-lbl span { font-size: 8.5px; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.mbx-live { width: 7px; height: 7px; border-radius: 999px; background: var(--primary); display: inline-block; animation: chxPulse 2.2s ease-in-out infinite; }
@keyframes mbxFeatIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.mbx-feats { display: flex; flex-direction: column; gap: 10px; }
.mbx-feat { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; animation: mbxFeatIn .4s var(--ease) both; }
.mbx-feat svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.mbx-sel { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--primary-tint); color: var(--primary); font-weight: 600; font-size: 13.5px; animation: chxIn .25s var(--ease) both; }
.mbx-sel svg { width: 16px; height: 16px; flex: 0 0 auto; }
@keyframes mbxPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.mbx-booked { text-align: center; padding: 26px 8px 18px; }
.mbx-booked .mbx-bk-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 999px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; animation: mbxPop .5s var(--ease) both; }
.mbx-booked .mbx-bk-ic svg { width: 32px; height: 32px; }
.mbx-booked b { font-size: 17px; }
.mbx-booked p { margin-top: 4px; }
@keyframes mbxNum { from { opacity: 0; transform: translateY(5px) scale(.94); } to { opacity: 1; transform: none; } }
.mbx-price { display: inline-block; animation: mbxNum .28s var(--ease) both; }

/* ── TDX v2 · calm Today IA (hero sub, day-complete, merged week+streak) ─ */
.cta .grow { min-width: 0; }
.tdx-herosub { font-size: 12px; opacity: .82; margin-top: 3px; font-weight: 500; }
.tdx-done { display: flex; align-items: center; gap: 14px; }
.tdx-done .ok { width: 46px; height: 46px; border-radius: 999px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 8px 20px -6px rgba(15, 162, 76, .55); animation: pop .5s var(--ease) both; }
.tdx-done .ok svg { width: 24px; height: 24px; }
.tdx-done .tt { font-weight: 700; font-size: 16px; }
.tdx-done .sub { color: var(--muted-fg); font-size: 12.5px; margin-top: 2px; }
.tdx-wkfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--hairline); }
.tdx-wkfoot .fl { display: inline-flex; align-items: center; gap: 7px; }
.tdx-wkfoot .fl svg { width: 16px; height: 16px; color: var(--primary); }
.tdx-wkfoot .fl b { font-size: 16px; font-weight: 800; }
.tdx-wkfoot .fl span, .tdx-wkfoot .tgt { font-size: 12px; color: var(--muted-fg); font-weight: 500; }
.tdx-link { display: inline-flex; align-items: center; gap: 2px; color: var(--primary); font-size: 12.5px; font-weight: 600; padding: 4px 2px; }
.tdx-link svg { width: 14px; height: 14px; }
.wkstrip .wk { border: 1px solid var(--hairline); }

/* ── web version: same IA, wider centered column on big screens ────────── */
@media (min-width: 768px) {
  :root { --maxw: 620px; }
  .view { padding: 22px 24px 40px; }
}

/* ── trx- · training overview ── */
.trx-resume { width: 100%; display: block; text-align: left; }
.trx-resume .bar { height: 6px; }
.trx-daymeta { display: flex; align-items: center; gap: 6px; color: var(--muted-fg); font-size: 12.5px; font-weight: 500; margin: 2px 0 8px; }
.trx-daymeta svg { width: 15px; height: 15px; color: var(--primary); }

/* #383 plan-card exercise rows: text only outside a started session, name and
   sets meta on one aligned baseline. Videos render only inside the tracker. */
.trx-exrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.trx-exrow:last-child { border-bottom: 0; }
.trx-exname { font-weight: 650; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.trx-exnotes { font-size: 12px; font-weight: 400; margin-top: 1px; }
.trx-exmeta { flex: none; max-width: 46%; text-align: right; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── trx- · workout tracker ── */
/* NO negative top margin here: sticky offsets resolve on the margin box, so
   margin-top:-16px left the bar stuck 16px below the header with sets showing
   through the gap. The tracker adds .trx-fsbody on its scroller instead. */
.trx-top { position: sticky; top: 0; z-index: 5; margin: 0 -16px 14px; padding: 14px 16px 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--hairline); }
.fs-body.trx-fsbody { padding-top: 0; }
.trx-top .bar { height: 6px; }
/* collapsed form-video toggle row (2026-07-17: the inline players are opt-in) */
.trx-vidtog { display: flex; align-items: center; gap: 8px; width: 100%; margin: 4px 0 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--muted-fg); font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; }
.trx-vidtog svg { width: 14px; height: 14px; flex: 0 0 auto; }
.trx-vidtog .chev { margin-left: auto; display: inline-flex; }
.trx-vidtog.on { color: var(--fg); border-color: var(--hairline-strong); }
.trx-set { padding: 10px 0; }
.trx-set .inp { height: 50px; font-size: 16px; }
.trx-set .check { width: 46px; height: 46px; border-radius: 12px; transition: transform .15s var(--ease), background .18s, color .18s, box-shadow .18s; }
.trx-set .check svg { width: 21px; height: 21px; }
.trx-set .check.on { box-shadow: 0 5px 14px -5px rgba(15, 162, 76, .65); }
.wtk-set.trx-on .n { color: var(--primary); }
.wtk-set.trx-on .inp { border-color: color-mix(in srgb, var(--primary) 35%, var(--hairline)); background: var(--primary-tint); }
.trx-pop { animation: trxPop .38s var(--ease) both; }
@keyframes trxPop { 0% { transform: scale(.55); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
/* trx-tkx = the TRACKER exercise block (done-border transition). NEVER reuse
   .trx-ex here: redesign.css owns .trx-ex as the flex overview row, and that
   display:flex flattened the tracker blocks into one off-screen line so the
   athletes could not reach the kg/reps inputs (Full Body 2 bug, 2026-07-15). */
.trx-tkx { transition: border-color .25s var(--ease); }
.trx-exdone { border-color: color-mix(in srgb, var(--primary) 45%, var(--hairline)); }
.trx-prpill { animation: trxPop .38s var(--ease) both; }

/* ── trx- · rest bar countdown fill ── */
.trx-rest { overflow: hidden; }
.trx-rest > * { position: relative; z-index: 1; }
.trx-rest > .trx-restfill { position: absolute; inset: 0; z-index: 0; background: var(--primary-tint); border-radius: inherit; transform-origin: left center; transition: transform .25s linear; pointer-events: none; }

/* ── cix- · check-in form ── */
.cix-weight label { display: block; font-size: 12.5px; color: var(--muted-fg); margin-bottom: 6px; font-weight: 500; }
.cix-wrow { position: relative; }
.cix-wrow .inp { height: 64px; font-size: 28px; font-weight: 700; letter-spacing: -.01em; padding-right: 56px; }
.cix-wrow .u { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); font-weight: 600; font-size: 14px; pointer-events: none; }
.cix-measgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cix-measgrid .cix-wrow .inp { height: 46px; font-size: 18px; padding-right: 44px; }
.cix-slot { transition: transform .15s var(--ease), border-color .18s, color .18s, background .18s; }
.cix-add:active { transform: scale(.94); border-color: var(--primary); color: var(--primary); }
.cix-add .cix-plus svg { width: 22px; height: 22px; }
.cix-slot .del { transition: transform .15s var(--ease); }
.cix-slot .del:active { transform: scale(.85); }
/* #515: with all three poses required, a FILLED tile has to keep saying which
   pose it is. The label markup was always there and had no rule at all, so it
   rendered under the photo and was clipped away by the tile's overflow. */
.cix-pose .pose-lbl { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 8px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
/* the optional extra shots sit under the three poses and have to READ as
   secondary, otherwise the check-in looks like it is asking for nine photos:
   smaller square tiles, four to a row. */
.cix-extras .photogrid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cix-extras .photoslot { aspect-ratio: 1; border-radius: 10px; }
.cix-extras .photoslot .del { width: 22px; height: 22px; top: 3px; right: 3px; }
.cix-extras .cix-add .cix-plus svg { width: 18px; height: 18px; }
.cix-sliderwrap { position: relative; padding-top: 28px; }
.cix-bub { position: absolute; top: 0; transform: translateX(-50%); min-width: 26px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--sl-ac, var(--primary)); color: #fff; font-size: 12px; font-weight: 700; transition: left .14s var(--ease), background .14s var(--ease); pointer-events: none; }
.cix-bub::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 7px; height: 7px; background: var(--sl-ac, var(--primary)); transform: translateX(-50%) rotate(45deg); border-radius: 1px; }

/* ── Today · «Η πορεία σου» value band (jrx-) ─────────────────────────── */
.jrx-band { margin-top: 16px; }
.jrx-band > .eyebrow { display: block; margin-bottom: 10px; padding: 0 2px; }
.jrx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jrx-span2 { grid-column: 1 / -1; }
.jrx-tile { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; color: inherit; font: inherit; }
.jrx-eb { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-fg); }
.jrx-eb svg { width: 13px; height: 13px; color: var(--primary); }
.jrx-big { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.jrx-big i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted-fg); margin-left: 4px; letter-spacing: 0; }
.jrx-sub { font-size: 11.5px; color: var(--muted-fg); font-weight: 500; }
.jrx-delta { font-size: 11.5px; color: var(--muted-fg); font-weight: 600; }
.jrx-delta.good { color: var(--primary); }
.jrx-wt { flex-direction: row; align-items: center; gap: 12px; }
.jrx-wt .grow { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.jrx-wt .chev { color: var(--faint-fg); flex: 0 0 auto; }
.jrx-prompt { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin-top: 2px; }
.jrx-spark { width: 128px; height: 54px; flex: 0 0 auto; }
.jrx-spark svg { width: 100%; height: 100%; display: block; }
.jrx-srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.jrx-sbar { width: 100%; height: 6px; margin-top: 3px; }
.jrx-sinp { font-size: 24px; height: 56px; }
/* ── Habits · quick-log affordance + water-bottle slider sheet (hbw-) ── */
.hbx-logbtn { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: var(--primary-tint); color: var(--primary); }
.hbx-logbtn svg { width: 16px; height: 16px; }
.hbw-read { display: flex; align-items: baseline; gap: 8px; }
.hbw-read b { font-size: 30px; letter-spacing: -.02em; }
.hbw-read .faint { font-size: 12.5px; font-weight: 600; }
.hbw-bottle { position: relative; display: flex; align-items: center; height: 64px; margin-top: 12px; }
.hbw-body { position: relative; flex: 1; height: 100%; border: 2px solid color-mix(in srgb, var(--fg, currentColor) 25%, transparent); border-radius: 18px 10px 10px 18px; background: color-mix(in srgb, var(--fg, currentColor) 6%, transparent); overflow: hidden; }
.hbw-cap { flex: 0 0 14px; height: 32px; margin-left: 3px; border-radius: 4px; background: color-mix(in srgb, var(--fg, currentColor) 25%, transparent); }
.hbw-fill { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: linear-gradient(180deg, color-mix(in srgb, #3aa0ff 55%, transparent), color-mix(in srgb, #1f7fe0 85%, transparent)); transition: width .1s linear, background .18s var(--ease); }
.hbw-body.ok .hbw-fill { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 55%, transparent), color-mix(in srgb, var(--primary) 90%, transparent)); }
.hbw-goal { position: absolute; top: 0; bottom: 0; left: var(--g, 0%); border-left: 2px dashed color-mix(in srgb, var(--fg) 45%, transparent); }
.hbw-bottle input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; -webkit-appearance: none; touch-action: none; }
.hbw-scale { position: relative; display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; margin-top: 6px; padding: 0 2px; }
.hbw-goallbl { position: absolute; transform: translateX(-50%); white-space: nowrap; color: var(--muted-fg); }
/* ── chg- · plan change history timeline (progress) ── */
.chg-row { padding: 4px 0; border-bottom: 1px solid var(--hairline); }
.chg-row:last-child { border-bottom: 0; }
.chg-from { color: var(--muted-fg); text-decoration-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.chg-arrow { color: var(--muted-fg); }
/* ── mx- · meal macro 1:1 replacement equivalents (alternatives sheet) ── */
.mx-head { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 10px; }
.mx-btns { display: flex; gap: 8px; }
.mx-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 6px 9px;
  border: 1.5px solid var(--hairline); border-radius: 16px; background: var(--surface-2); color: inherit; font: inherit; cursor: pointer;
  transition: border-color .22s var(--ease), background .22s, transform .16s var(--ease); }
.mx-btn:active { transform: scale(.96); }
.mx-btn img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #000; }
.mx-btn b { font-size: 11.5px; font-weight: 700; letter-spacing: -.01em; }
.mx-btn .g { font-size: 11px; color: var(--muted-fg); font-weight: 600; }
.mx-btn.on { border-color: var(--primary); background: var(--primary-tint); }
.mx-btn.on .g { color: var(--primary); }
.mx-panel { margin-top: 6px; }
.mx-note { font-size: 11.5px; padding: 6px 2px 2px; line-height: 1.4; }
/* a panel row is a BUTTON now: it opens the full resulting meal, so an
   equivalent is something the athlete can act on, not just a number */
.mx-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--hairline); color: inherit;
  font: inherit; text-align: left; cursor: pointer;
  animation: mxIn .34s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.mx-row:last-child { border-bottom: 0; }
.mx-chev { width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted-fg); opacity: .6; }
.mx-bdg { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 6px;
  background: var(--surface-2); color: var(--muted-fg); font-size: 10.5px; font-weight: 650;
  letter-spacing: .01em; }
.mx-bdg.mx-leo { background: var(--primary-tint); color: var(--primary); }
.mx-btn.mx-off { opacity: .4; }
.mx-th { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: #000; }
.mx-th img { width: 100%; height: 100%; object-fit: cover; }
.mx-th.mx-thi { display: grid; place-items: center; background: var(--surface-2); color: var(--muted-fg); }
.mx-th.mx-thi svg { width: 18px; height: 18px; }
.mx-qty { font-weight: 750; font-size: 14.5px; letter-spacing: -.01em; }
@keyframes mxIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
/* the 1:1 swap badge on a generated alternative card (#420): what changed vs
   the plan meal, e.g. «Πλιγούρι αντί για Ρύζι». Wraps for multi-swap combos. */
.alt-swap { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 7px;
  padding: 5px 9px; border-radius: 9px; background: var(--primary-tint);
  color: var(--primary); font-size: 11.5px; font-weight: 650; line-height: 1.35; }
.alt-swap svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }
.alt-swap span { min-width: 0; }
/* ── #452 alternatives sheet · «what will actually be written down» + one
   collapsed row per ingredient. The summary sticks to the top of the sheet
   because the pick has to land somewhere the athlete can SEE it while he is
   scrolling the ingredient rows below (Manou 2026-07-28). ──────────────── */
.alt-sum { position: sticky; top: 0; z-index: 3; margin: 0 -4px 2px; padding: 2px 4px 10px;
  background: var(--surface-1); border-bottom: 1px solid var(--hairline); }
/* the list is capped so the sticky block can never eat the phone: changed
   ingredients sort to the top, so the line he just picked is always in view */
.alt-sum-list { max-height: 18vh; overflow-y: auto; overscroll-behavior: contain; margin-top: 6px; }
.alt-sum-row { display: flex; align-items: baseline; gap: 10px; padding: 4px 0 4px 9px;
  border-left: 2px solid transparent; }
.alt-sum-row.is-chg { border-left-color: var(--primary); }
.alt-sum-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.alt-sum-txt b { font-size: 13.5px; font-weight: 650; }
.alt-sum-was { font-size: 11px; color: var(--muted-fg); line-height: 1.3; }
.alt-sum-row.is-chg .alt-sum-was { color: var(--primary); }
.alt-sum-q { flex: 0 0 auto; font-size: 12.5px; color: var(--muted-fg); font-weight: 650; }
.alt-sum-tot { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--hairline);
  font-size: 12.5px; color: var(--muted-fg); }
.alt-sum-tot b { color: var(--fg); font-size: 14px; }
.alt-sum-q2 { margin-top: 7px; font-size: 12.5px; color: var(--muted-fg); line-height: 1.45; }
/* one ingredient, collapsed. The whole head is the tap target. */
.alt-ing { border: 1px solid var(--hairline); border-radius: 13px; background: var(--surface-2);
  margin-top: 8px; overflow: hidden; }
.alt-ing.is-chg { border-color: var(--primary); }
.alt-ing-hd { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.alt-ing-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.alt-ing-txt b { font-size: 14px; font-weight: 650; }
.alt-ing-m { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint-fg); }
.alt-ing-was { font-size: 11px; color: var(--primary); }
.alt-ing-q { flex: 0 0 auto; font-size: 13px; font-weight: 650; color: var(--muted-fg); }
.alt-ing-ch { flex: 0 0 auto; display: grid; place-items: center; color: var(--muted-fg); opacity: .65; }
.alt-ing-ch svg { width: 15px; height: 15px; }
.alt-ing.is-flat { background: none; }
.alt-ing-no { padding: 0 12px 10px; font-size: 11.5px; color: var(--faint-fg); }
.alt-ing-opts { border-top: 1px solid var(--hairline); padding: 4px 6px 6px; }
.alt-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px;
  background: none; border: 0; border-radius: 10px; color: inherit; font: inherit; text-align: left; }
.alt-opt + .alt-opt { border-top: 1px solid var(--hairline); border-radius: 0; }
.alt-opt.on { background: var(--primary-tint); }
.alt-opt-n { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.alt-opt-q { flex: 0 0 auto; font-size: 12.5px; font-weight: 650; color: var(--muted-fg); }
.alt-opt.on .alt-opt-q { color: var(--primary); }
.alt-opt-ck { flex: 0 0 auto; width: 15px; display: grid; place-items: center; color: var(--primary); }
.alt-opt-ck svg { width: 15px; height: 15px; }
/* ═══ chat rework v2 (chx-) · slim header, calm dividers, grouped runs, composer dock ═══ */
.chat-coach.chx-head { padding: 8px 14px; gap: 10px; }
.chat-coach.chx-head .av { width: 34px; height: 34px; }
.chat-coach.chx-head .av img.mark { width: 21px; height: 21px; }
.chat-coach.chx-head b { font-size: 13.5px; }
.chat-coach.chx-head .st { font-size: 11px; margin-top: 0; }
.chat-coach.chx-head .av .on-dot { width: 10px; height: 10px; border-width: 2px; }
.chx-day3 { align-self: center; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-fg); margin: 16px 0 8px; }
.dm-row.me .bubble.chx-gm, .dm-row.me .bubble.chx-gl { border-top-right-radius: 7px; }
.dm-row.them .bubble.chx-gm, .dm-row.them .bubble.chx-gl { border-top-left-radius: 7px; }
.dm-row.chx-gap { margin-top: 9px; }
.chat-msgs > .comm-msg.chx-cg { margin-top: 2px; }
.chx-avgap { width: 34px; flex: 0 0 auto; }
.bubble.chx-imgb { position: relative; padding: 5px; }
.bubble.chx-imgb img { border-radius: 16px; margin: 0; }
.bubble.chx-imgb .meta { position: absolute; right: 12px; bottom: 12px; margin: 0; background: rgba(10, 10, 10, .55); color: #fff; opacity: 1; padding: 2px 8px; border-radius: var(--pill); }
.chx-read2 { margin-top: 2px; }
.chx-read2 svg { width: 11px; height: 11px; }
.chx-read2 span { color: var(--faint-fg); font-size: 10px; }
.chx-dock { border-top: 1px solid var(--hairline); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.chx-dock .chat-input.chx-bar { border-top: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 6px 12px 10px; }
.chx-actions { display: flex; gap: 8px; padding: 8px 12px 0; }
.chx-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--hairline); font-size: 12.5px; font-weight: 600; color: var(--fg); }
.chx-chip svg { width: 15px; height: 15px; color: var(--primary); }
/* "coming soon" affordance: greyed, muted, clearly not yet usable */
.chx-chip.chx-soon { opacity: .55; }
.chx-chip.chx-soon svg { color: var(--muted-fg); }
.chx-soonlbl { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); border: 1px solid var(--hairline); border-radius: 999px; padding: 1px 5px; }
.btn.chx-soon { opacity: .55; }
/* #396: composer gate · a read-only / react-only community (or a personal
   mute) swaps the input for a short explainer instead of a dead send button */
.chx-gate { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 12px 10px; min-height: 44px; padding: 10px 16px; border-radius: 22px; background: var(--surface-2); border: 1px dashed var(--hairline-strong); color: var(--muted-fg); font-size: 13.5px; font-weight: 600; }
.chx-gate svg { width: 15px; height: 15px; flex: none; color: var(--muted-fg); }
.chat-input textarea.chx-ta { resize: none; max-height: 135px; overflow-y: hidden; background: var(--surface-2); border: 1px solid transparent; }
.chat-input textarea.chx-ta:focus { border-color: var(--hairline-strong); box-shadow: none; }
.chx-send2 { flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--pill); display: grid; place-items: center; background: var(--surface-3); color: var(--faint-fg); transition: background .2s var(--ease), color .2s var(--ease), transform .16s var(--spring), box-shadow .2s; }
.chx-send2 svg { width: 19px; height: 19px; margin-right: 2px; }
.chx-send2.chx-live { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(15, 162, 76, .65); }
[data-theme="light"] .chx-send2.chx-live { box-shadow: 0 4px 14px -4px rgba(15, 162, 76, .45); }

/* ── PGR · Progress redesign (range pills + calories + weight + twins + insights) ── */
.pgr-rng { display: flex; width: 100%; }
.pgr-rng button { flex: 1; padding: 8px 0; }
.pgr-card { padding: 16px 14px 14px; }
.pgr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pgr-ttl { font-size: 12.5px; font-weight: 600; color: var(--muted-fg); }
.pgr-delta { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted-fg); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pgr-delta.good { background: var(--primary-tint); color: var(--primary); }
.pgr-delta i { font-style: normal; font-weight: 500; font-size: 10px; color: var(--faint-fg); }
.pgr-delta.good i { color: color-mix(in srgb, var(--primary) 70%, var(--muted-fg)); }
.pgr-big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; line-height: 1.15; }
.pgr-big i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted-fg); letter-spacing: 0; }
.pgr-plotrow { display: flex; gap: 8px; margin-top: 14px; }
.pgr-plot { position: relative; flex: 1; height: 128px; min-width: 0; }
.pgr-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--fg) 32%, transparent); z-index: 1; pointer-events: none; }
.pgr-bars { display: flex; align-items: flex-end; gap: 6px; height: 100%; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.pgr-bars.pgr-n13 { gap: 4px; }
.pgr-bars.pgr-n30 { gap: 2px; }
.pgr-bar { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; padding: 0; border-radius: 6px; }
.pgr-bar i { display: block; width: 100%; max-width: 26px; margin: 0 auto; border-radius: 999px; background: color-mix(in srgb, var(--primary) 42%, var(--surface-3)); transform-origin: bottom; animation: pgrGrow .5s var(--ease) both; transition: background .18s var(--ease); }
.pgr-n30 .pgr-bar i { border-radius: 3px; }
.pgr-bar.nil i { background: var(--surface-3); animation: none; }
.pgr-bar.best i, .pgr-bar.on i { background: var(--primary); box-shadow: 0 4px 16px -4px rgba(15, 162, 76, .55); }
@keyframes pgrGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pgr-ylabs { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; width: 34px; flex: 0 0 auto; font-size: 9.5px; color: var(--faint-fg); padding-bottom: 1px; }
.pgr-xlabs { display: flex; gap: 6px; margin-top: 6px; padding-right: 42px; }
.pgr-xlabs.pgr-n13 { gap: 4px; }
.pgr-xlabs.pgr-n30 { gap: 2px; }
.pgr-xlabs span { flex: 1; min-width: 0; text-align: center; font-size: 9.5px; color: var(--faint-fg); white-space: nowrap; overflow: visible; }
.pgr-cap { margin-top: 10px; font-size: 12.5px; color: var(--muted-fg); min-height: 18px; }
.pgr-wchart { margin-top: 12px; }
.pgr-wchart .pgx-svg { height: 150px; }
/* twins */
.pgr-twins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pgr-twins.one { grid-template-columns: 1fr; }
.pgr-twin { position: relative; padding: 14px; min-height: 132px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 3px; text-align: left; }
.pgr-twin .pgr-ttl { position: absolute; top: 14px; left: 14px; }
.pgr-ring { position: absolute; top: 12px; right: 12px; width: 58px; height: 58px; display: grid; place-items: center; }
.pgr-ring > * { grid-area: 1 / 1; }
.pgr-ringico { display: grid; place-items: center; color: var(--primary); }
.pgr-ringico svg { width: 22px; height: 22px; }
.pgr-ringico.live svg { animation: tdxFlame 2.6s ease-in-out infinite; transform-origin: 50% 85%; }
.pgr-sub { font-size: 11.5px; color: var(--muted-fg); line-height: 1.35; }
.pgr-sub.good { color: var(--primary); font-weight: 600; }
.pgr-sub.over { color: var(--warn); font-weight: 600; }
.pgr-gbar { width: 100%; height: 7px; margin: 7px 0 4px; }
/* insights */
.pgr-insrow { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pgr-insrow::-webkit-scrollbar { display: none; }
.pgr-ins { flex: 0 0 auto; min-width: 132px; max-width: 176px; padding: 12px 14px; scroll-snap-align: start; }
.pgr-ins > span { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .04em; }
.pgr-ins > span svg { width: 11px; height: 11px; color: var(--primary); }
.pgr-ins b { display: block; font-size: 16px; font-weight: 700; margin-top: 4px; }
.pgr-ins b i { font-style: normal; font-size: .68em; color: var(--muted-fg); font-weight: 600; }
.pgr-ins b.grn { color: var(--primary); }
.pgr-ins em { display: block; font-style: normal; font-size: 11px; color: var(--muted-fg); margin-top: 2px; white-space: nowrap; }
.pgr-ins em.good { color: var(--primary); font-weight: 600; }
.pgr-mrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pgr-mleg { display: grid; gap: 3px; font-size: 10.5px; color: var(--muted-fg); white-space: nowrap; }
.pgr-mleg i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; }
.pgr-mleg .mp { background: var(--primary); }
.pgr-mleg .mc { background: color-mix(in srgb, var(--fg) 55%, transparent); }
.pgr-mleg .mf { background: color-mix(in srgb, var(--fg) 18%, transparent); }

/* ── MLX · streak milestone timeline (badge art on pure black, screen blend on ink chip) ── */
.mlx-strip { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 2px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mlx-strip::-webkit-scrollbar { display: none; }
.mlx-node { position: relative; flex: 0 0 108px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; scroll-snap-align: center; }
.mlx-node + .mlx-node::before { content: ""; position: absolute; left: -36px; width: 54px; top: 35px; border-top: 2px solid var(--hairline-strong); border-radius: 2px; }
.mlx-node + .mlx-node.earned::before { border-color: var(--primary); }
.mlx-node + .mlx-node.next::before { border-color: color-mix(in srgb, var(--primary) 45%, var(--hairline-strong)); }
.mlx-chip { position: relative; width: 72px; height: 72px; border-radius: 999px; background: var(--deep); border: 1px solid var(--hairline-strong); display: grid; place-items: center; overflow: visible; }
.mlx-img { width: 60px; height: 60px; object-fit: contain; border-radius: 999px; mix-blend-mode: screen; }
.mlx-chip .mlx-fallico { display: none; color: var(--primary); }
.mlx-chip .mlx-fallico svg { width: 30px; height: 30px; }
.mlx-chip.noimg .mlx-img { display: none; }
.mlx-chip.noimg .mlx-fallico { display: grid; place-items: center; }
.mlx-ring { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 1; }
.mlx-node.earned .mlx-chip { border-color: color-mix(in srgb, var(--primary) 55%, var(--hairline-strong)); box-shadow: 0 6px 22px -8px rgba(15, 162, 76, .5); }
.mlx-node.next .mlx-img { filter: grayscale(.55); opacity: .85; }
.mlx-node.future .mlx-chip { opacity: .55; }
.mlx-node.future .mlx-img { filter: grayscale(1); }
.mlx-name { font-size: 12px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.mlx-node.future .mlx-name { color: var(--muted-fg); font-weight: 600; }
.mlx-sub { font-size: 10.5px; color: var(--muted-fg); }
.mlx-node.earned .mlx-sub { color: var(--primary); font-weight: 600; }
[data-theme="light"] .mlx-chip { border-color: color-mix(in srgb, var(--fg) 20%, transparent); }
/* check-in · ad-hoc (Έκτακτο) additions */
.cix-httl { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.cix-xpill { flex: 0 0 auto; white-space: nowrap; }
.cix-new svg { width: 20px; height: 20px; }
.cix-cancel { color: var(--muted-fg); }
/* check-in history: the client's own photos, date, weight, measurements,
   full-screen viewer and before / after compare (ΑΓΓΕΛΙΚΗ Π. 2026-10-02) */
.cph-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted-fg); }
.cph-facts b { color: var(--fg); font-weight: 700; }
.cph-facts i { font-style: normal; color: var(--faint-fg); }
.cph-facts.cph-center { justify-content: center; }
.cph-strip { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.cph-strip::-webkit-scrollbar { display: none; }
.cph-strip.cph-center { justify-content: center; }
.cph-th { position: relative; flex: 0 0 auto; width: 62px; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--hairline); padding: 0; }
.cph-th img { width: 100%; height: 100%; object-fit: cover; display: block; animation: imgFade .5s ease both; }
.cph-th.cph-broken img { visibility: hidden; }
.cph-skel { animation: cphPulse 1.2s ease-in-out infinite alternate; }
@keyframes cphPulse { from { opacity: .45; } to { opacity: .9; } }
.cph-lbl { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 15px; }
.cph-retry { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-fg); background: none; border: 0; padding: 4px 0; text-align: left; }
.cph-retry svg { width: 15px; height: 15px; flex: 0 0 auto; }
.cph-cmpbtn { cursor: pointer; font-size: 12px; }
/* viewer */
.cph-fs .fs-body { display: flex; flex-direction: column; padding: 0; overflow: hidden; max-width: none; }
.cph-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #000; touch-action: none; }
.cph-big { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transform-origin: center center; transition: transform .18s ease-out; will-change: transform; }
.cph-zoomed .cph-big { transition: none; }
.cph-nav { position: absolute; top: calc(50% - 21px); width: 42px; height: 42px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center; border: 0; }
.cph-nav.prev { left: 10px; }
.cph-nav.next { right: 10px; }
.cph-nav svg { width: 22px; height: 22px; }
.cph-zoomed .cph-nav { display: none; }
.cph-cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px 0; font-size: 14px; }
.cph-capm { padding: 2px 16px 0; font-size: 12.5px; }
.cph-pick { padding: 0 16px; margin-top: 8px; }
.cph-pick .cph-th { width: 48px; opacity: .55; }
.cph-pick .cph-th.on { opacity: 1; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.cph-hint { font-size: 11.5px; text-align: center; padding: 8px 16px calc(12px + env(safe-area-inset-bottom)); margin: 0; }
/* tap the photo: everything but the photo goes away, black edge to edge */
.cph-fs.cph-clean { background: #000; }
.cph-fs.cph-clean .fs-head, .cph-fs.cph-clean .cph-cap, .cph-fs.cph-clean .cph-capm, .cph-fs.cph-clean .cph-pick, .cph-fs.cph-clean .cph-hint, .cph-fs.cph-clean .cph-nav { display: none; }
.cph-fs.cph-clean .cph-stage { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
/* compare */
.cph-cmpfs .fs-body { overflow-y: auto; }
.cph-cmp { padding: 12px 14px calc(20px + env(safe-area-inset-bottom)); max-width: 640px; width: 100%; margin: 0 auto; }
.cph-poses { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.cph-pose { flex: 1; height: 34px; border-radius: 9px; border: 0; background: none; color: var(--muted-fg); font-weight: 700; font-size: 13px; }
.cph-pose.on { background: var(--surface-1); color: var(--fg); box-shadow: 0 0 0 1px var(--hairline-strong); }
.cph-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cph-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cph-sel { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-fg); }
.cph-sel select { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--border-control); background: var(--surface-2); padding: 0 8px; font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fg); }
.cph-cimg { position: relative; width: 100%; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--hairline); padding: 0; display: grid; place-items: center; text-align: center; font-size: 12px; }
.cph-cimg img { width: 100%; height: 100%; object-fit: contain; display: block; animation: imgFade .5s ease both; }
.cph-cimg svg { width: 22px; height: 22px; }
.cph-cdate { font-size: 12px; color: var(--muted-fg); text-align: center; }
.cph-days { font-size: 12px; text-align: center; margin: 10px 0 0; }
.cph-tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.cph-tbl th, .cph-tbl td { padding: 8px 6px; border-bottom: 1px solid var(--hairline); text-align: right; }
.cph-tbl th:first-child { text-align: left; font-weight: 600; color: var(--muted-fg); }
.cph-tbl thead th { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-fg); }
.cph-tbl .cph-d { font-weight: 700; }
.cph-zl { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: #000; }
.cph-zl[hidden] { display: none; }
.cph-zx { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; z-index: 2; }
.cph-zx svg { width: 20px; height: 20px; }
.cph-zcap { color: #fff; font-size: 13px; text-align: center; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
.cph-zl.cph-clean .cph-zx, .cph-zl.cph-clean .cph-zcap { display: none; }
/* chat quick-chip row: horizontal scroll when crowded, no visible scrollbar */
.chx-scroll { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chx-scroll::-webkit-scrollbar { display: none; }
.chx-scroll .chx-chip { flex: 0 0 auto; white-space: nowrap; }
/* membership per-cycle pricing: monthly-equivalent lines */
.mbx-eq { display: block; font-size: 10.5px; color: var(--primary); font-weight: 600; margin-top: 2px; }
.mbx-heroeq { font-size: 11.5px; color: var(--muted-fg); font-weight: 500; margin-left: 4px; }

/* ════════════════════════════════════════════════════════════════════════
   TDV · Today view visual layer (scoped: only classes emitted by today.js)
   Dark-surface richness: lifted tiles, crisper hairlines, ONE green focal
   radial, chart-driven band. Mono Green & Ink · Poppins · #0FA24C only.
   ════════════════════════════════════════════════════════════════════════ */

/* ── lifted surface: slightly lighter than the page, crisp top bevel ──── */
.tdv-tile {
  position: relative; min-width: 0; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 13px 14px; border-radius: var(--radius); text-align: left; color: inherit; font: inherit;
  background-color: color-mix(in srgb, var(--surface-2) 72%, var(--surface-1));
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 42%);
  border: 1px solid color-mix(in srgb, #fff 9%, transparent);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="light"] .tdv-tile { background-color: #fff; background-image: none; border-color: var(--hairline); box-shadow: var(--shadow-md); }
.tdv-card, .planrow.tdv-row {
  background-color: color-mix(in srgb, var(--surface-2) 72%, var(--surface-1));
  border-color: color-mix(in srgb, #fff 9%, transparent);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="light"] .tdv-card, [data-theme="light"] .planrow.tdv-row { background-color: #fff; border-color: var(--hairline); box-shadow: var(--shadow-md); }
.tdv-card .wk { background: color-mix(in srgb, var(--surface-3) 46%, var(--surface-2)); border-color: color-mix(in srgb, #fff 6%, transparent); }
.tdv-card .wk.today { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
[data-theme="light"] .tdv-card .wk { background: var(--surface-2); border-color: transparent; }
[data-theme="light"] .tdv-card .wk.today { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }

/* ── band grid ────────────────────────────────────────────────────────── */
.tdv-band > .eyebrow { display: block; margin-bottom: 10px; padding: 0 2px; }
.tdv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.tdv-span2 { grid-column: 1 / -1; }
.tdv-eb { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-fg); }
.tdv-eb svg { width: 13px; height: 13px; color: var(--primary); }
.tdv-big { font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; white-space: nowrap; }
.tdv-big i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted-fg); margin-left: 4px; letter-spacing: 0; }
.tdv-tsub { font-size: 11.5px; color: var(--muted-fg); font-weight: 500; }
.tdv-tile .chev { color: var(--faint-fg); }
.tdv-tile .chev svg { width: 16px; height: 16px; }
.tdv-hrow { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.tdv-hrow .grow { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tdv-hrow > .tdv-tsub { flex: 0 0 auto; text-align: right; }

/* ── the ONE hero (CTA / done / free) · ring graphic + action ─────────── */
.tdv-hero {
  position: relative; overflow: hidden; width: 100%;
  display: flex; align-items: center; gap: 14px; padding: 16px 16px;
  border-radius: var(--radius-lg); text-align: left; color: inherit; font: inherit;
}
/* 2026-07-06 bento redesign: the CTA hero is a CALM premium card (the loud
   solid-green slab read as noise against the bento) · green lives in the ring,
   the kick line and the round go-chip, so it still owns the page hierarchy. */
.tdv-hero-cta {
  background:
    radial-gradient(130% 120% at 100% -30%, rgba(15, 162, 76, .22), transparent 58%),
    linear-gradient(165deg, color-mix(in srgb, var(--surface-3) 60%, var(--surface-1)), var(--surface-1) 80%);
  color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--hairline));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 1px rgba(15, 162, 76, .06);
}
[data-theme="light"] .tdv-hero-cta {
  background: radial-gradient(130% 120% at 100% -30%, rgba(15, 162, 76, .12), transparent 58%), #fff;
  box-shadow: var(--shadow-lg);
}
.tdv-hero-cta .tdv-hic { color: var(--primary); }
.tdv-hero-cta .tdv-kick { color: var(--primary); opacity: 1; }
.tdv-hero-cta .tdv-hsub { color: var(--muted-fg); opacity: 1; }
.tdv-hero-cta .tdv-hgo {
  width: 40px; height: 40px; border-radius: 999px; background: var(--primary); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(15, 162, 76, .8), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.tdv-hero-cta::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .06), transparent); transform: skewX(-18deg); animation: tdvSheen 6s ease-in-out 1.8s infinite; }
@keyframes tdvSheen { 0% { left: -60%; } 24%, 100% { left: 130%; } }
.tdv-hero-done, .tdv-hero-free {
  background:
    radial-gradient(130% 110% at 0% -20%, rgba(15, 162, 76, .17), transparent 55%),
    linear-gradient(165deg, color-mix(in srgb, var(--surface-3) 55%, var(--surface-1)), var(--surface-1) 78%);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--hairline));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="light"] .tdv-hero-done, [data-theme="light"] .tdv-hero-free {
  background: radial-gradient(130% 110% at 0% -20%, rgba(15, 162, 76, .1), transparent 55%), #fff;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--hairline));
  box-shadow: var(--shadow-lg);
}
.tdv-hring { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.tdv-hring svg { display: block; }
.tdv-hring .tdv-hic { position: absolute; display: grid; place-items: center; color: #fff; }
.tdv-hic svg { width: 21px; height: 21px; }
.tdv-hero-done .tdv-hic, .tdv-hero-free .tdv-hic { color: var(--primary); }
.tdv-hero-done .tdv-hring::before, .tdv-hero-free .tdv-hring::before {
  content: ""; position: absolute; inset: -12px; border-radius: 999px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(15, 162, 76, .2), transparent 72%);
}
[data-theme="light"] .tdv-hero-done .tdv-hring::before, [data-theme="light"] .tdv-hero-free .tdv-hring::before { background: radial-gradient(closest-side, rgba(15, 162, 76, .12), transparent 72%); }
.tdv-kick { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; opacity: .8; }
.tdv-hero-done .tdv-kick, .tdv-hero-free .tdv-kick { color: var(--muted-fg); opacity: 1; }
.tdv-httl { font-weight: 700; font-size: 17px; letter-spacing: -.01em; margin-top: 2px; }
.tdv-hsub { font-size: 12px; margin-top: 3px; font-weight: 500; opacity: .85; }
.tdv-hero-done .tdv-hsub, .tdv-hero-free .tdv-hsub { color: var(--muted-fg); opacity: 1; }
.tdv-hgo { margin-left: auto; flex: 0 0 auto; opacity: .9; color: currentColor; display: grid; place-items: center; }
.tdv-hero-free .tdv-hgo { color: var(--faint-fg); }
.tdv-hgo svg { width: 19px; height: 19px; }

/* ── weight tile: full-width chart, delta pill, prediction caption ────── */
.tdv-whead { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.tdv-delta { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted-fg); white-space: nowrap; }
.tdv-delta.good { background: var(--primary-tint); color: var(--primary); }
[data-theme="light"] .tdv-delta { background: rgba(10, 10, 10, .05); }
[data-theme="light"] .tdv-delta.good { background: var(--primary-tint); }
.tdv-wchart { width: 100%; height: 58px; margin-top: 2px; }
.tdv-wchart svg { width: 100%; height: 100%; display: block; }
.tdv-ghost { color: var(--muted-fg); }
.tdv-predlab { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--faint-fg); font-weight: 500; }
.tdv-predlab i { display: inline-block; width: 14px; border-top: 2px dashed var(--muted-fg); opacity: .6; }
.tdv-prompt { font-size: 13.5px; font-weight: 600; line-height: 1.35; }

/* ── steps tile: dial + count ─────────────────────────────────────────── */
.tdv-srow { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 2px; }
.tdv-sring { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.tdv-sring svg { display: block; }
.tdv-sring b { position: absolute; font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; }
.tdv-scol { display: flex; flex-direction: column; min-width: 0; }
.tdv-scol b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.tdv-scol span { font-size: 11px; color: var(--muted-fg); font-weight: 600; }

/* ── kcal tile: 7-day bars that grow on mount ─────────────────────────── */
.tdv-kbig { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.tdv-kbig i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted-fg); margin-left: 3px; }
.tdv-kbars { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 40px; margin-top: 2px; }
.tdv-kbars span { position: relative; flex: 1; height: 100%; border-radius: 4px; background: rgba(255, 255, 255, .05); overflow: hidden; }
[data-theme="light"] .tdv-kbars span { background: rgba(10, 10, 10, .06); }
.tdv-kbars span i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%); border-radius: 4px; background: color-mix(in srgb, var(--primary) 45%, var(--surface-3)); transform-origin: bottom; animation: tdvGrow .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + .15s); }
.tdv-kbars span.on i { background: var(--primary); box-shadow: 0 0 14px -2px rgba(15, 162, 76, .55); }
@keyframes tdvGrow { from { transform: scaleY(0); } }

/* ── ring sweep contract (today.js animates stroke-dashoffset on mount) ─ */
.tdv-sweep { will-change: stroke-dashoffset; }

/* ════ tdb- · Today bento layer (2026-07-06 redesign) ═══════════════════
   ONE grid, ONE card language: soft 22px slabs, big numerals with quiet
   units, progress rings, a 12-week dot-matrix. Reference: premium workout
   trackers; palette stays Mono Green & Ink. ─────────────────────────── */
.tdb-greet { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; }
.tdb-greet h1 { font-size: 30px; line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
.tdb-greet .meta { margin-top: 6px; }
.tdb-comp { position: relative; flex: 0 0 auto; display: grid; place-items: center; margin-top: 3px; border-radius: 999px; }
.tdb-comp b { position: absolute; font-size: 11px; font-weight: 800; letter-spacing: -.02em; }

.tdb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: stretch; }
.tdb-span2 { grid-column: 1 / -1; }
.tdb-tile {
  position: relative; min-width: 0; width: 100%; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; border-radius: 22px; text-align: left; color: inherit; font: inherit;
  background-color: color-mix(in srgb, var(--surface-2) 78%, var(--surface-1));
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 46%);
  border: 1px solid color-mix(in srgb, #fff 8%, transparent);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .05);
}
[data-theme="light"] .tdb-tile { background-color: #fff; background-image: none; border-color: var(--hairline); box-shadow: var(--shadow-md); }
.tdb-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; margin-top: auto; }
.tdb-sub { font-size: 11.5px; color: var(--muted-fg); font-weight: 500; }
.tdb-big { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tdb-big i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted-fg); margin-left: 5px; letter-spacing: 0; }
.tdb-big .tdb-cta { font-size: 21px; color: var(--primary); }
.tdb-ring { position: relative; display: grid; place-items: center; margin-bottom: 8px; }
.tdb-ring svg { display: block; }
.tdb-ring .tdb-ric { position: absolute; display: grid; place-items: center; color: var(--fg); }
.tdb-ring .tdb-ric svg { width: 20px; height: 20px; }
.tdb-ring b { position: absolute; font-size: 12.5px; font-weight: 800; letter-spacing: -.02em; }
.tdb-ring.done .tdb-ric { color: var(--primary); }

/* wide rows (steps / check-in): label left, stat + ring right */
.tdb-wide { flex-direction: row; align-items: center; gap: 13px; }
.tdb-wide .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tdb-wide .tdb-name { margin-top: 0; }
.tdb-wide .tdb-ring { margin-bottom: 0; }
.tdb-wide .tdb-big { font-size: 24px; }
.tdb-wstat { flex: 0 0 auto; text-align: right; }
.tdb-sring { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.tdb-sring b { position: absolute; font-size: 10px; font-weight: 800; letter-spacing: -.02em; }

/* dot-matrix journey card (legacy, replaced by Momentum) */
.tdb-mx { gap: 10px; }
.tdb-mxhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.tdb-mxhead .tdb-name { margin-top: 0; }
.tdb-mxlab { display: grid; grid-template-columns: repeat(11, 1fr); width: 100%; margin-bottom: -4px; }
.tdb-mxlab span { font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint-fg); text-align: center; }
.tdb-mxgrid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr);
  grid-template-columns: repeat(11, 1fr); justify-items: center; align-items: center;
  width: 100%; row-gap: 5px;
}
.tdb-dot { width: 5.5px; height: 5.5px; border-radius: 999px; background: color-mix(in srgb, #fff 9%, transparent); opacity: 0; animation: tdbDotIn .5s var(--ease-out) both; animation-delay: calc(var(--c, 0) * 34ms + .1s); }
[data-theme="light"] .tdb-dot { background: rgba(10, 10, 10, .1); }
.tdb-dot.a { background: color-mix(in srgb, #fff 38%, transparent); }
[data-theme="light"] .tdb-dot.a { background: rgba(10, 10, 10, .34); }
.tdb-dot.w { background: var(--primary); box-shadow: 0 0 7px -1px rgba(15, 162, 76, .8); }
@keyframes tdbDotIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.tdb-mxwk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; padding-top: 10px; border-top: 1px solid color-mix(in srgb, #fff 7%, transparent); }
[data-theme="light"] .tdb-mxwk { border-top-color: var(--hairline); }
.tdb-mxwk .wk { background: color-mix(in srgb, var(--surface-3) 46%, var(--surface-2)); border-color: color-mix(in srgb, #fff 6%, transparent); }
.tdb-mxwk .wk.today { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
[data-theme="light"] .tdb-mxwk .wk { background: var(--surface-2); border-color: transparent; }
[data-theme="light"] .tdb-mxwk .wk.today { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.tdb-mxfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.tdb-mxfoot .fl { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px 4px 4px; color: var(--warn); font-weight: 700; }
.tdb-mxfoot .fl svg { width: 17px; height: 17px; }
.tdb-mxfoot .fl b { font-size: 15px; color: var(--fg); }
.tdb-mxfoot .fl span { font-size: 11.5px; color: var(--muted-fg); font-weight: 500; }
.tdb-mxfoot .tgt { font-size: 11.5px; color: var(--muted-fg); font-weight: 500; text-align: right; }

/* ── Design A "Momentum" journey card ─────────────────────────────────── */
.tdb-momentum { gap: 10px; }
.tdb-momentum .tdb-mxhead { margin-bottom: 2px; }
.tdb-mchart { width: 100%; height: 92px; margin-top: 4px; }
.tdb-mchart svg { width: 100%; height: 100%; display: block; }
/* #510: chip-count agnostic. The row was hard-coded to 4 columns while the 4th
   chip (renewal) needs config fields no client record has ever carried, so every
   client saw a quarter of the row as empty card. auto-fit lets whatever renders
   fill the width. */
.tdb-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; width: 100%; }
.tdb-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 10px 10px 9px; border-radius: 14px; text-align: left; color: inherit; font: inherit;
  background: color-mix(in srgb, var(--surface-3) 52%, var(--surface-2));
  border: 1px solid color-mix(in srgb, #fff 6%, transparent);
}
[data-theme="light"] .tdb-chip { background: var(--surface-2); border-color: transparent; }
.tdb-chip .ic { color: var(--primary); display: grid; place-items: center; }
.tdb-chip .ic svg { width: 15px; height: 15px; }
.tdb-chip b { font-size: 14px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.tdb-chip .sub { font-size: 10px; color: var(--muted-fg); font-weight: 500; white-space: nowrap; }
.tdb-chip .mini { width: 100%; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 2px; }
[data-theme="light"] .tdb-chip .mini { background: rgba(10,10,10,.07); }
.tdb-chip .mini i { display: block; height: 100%; border-radius: 3px; background: var(--primary); transition: width .5s var(--ease-out); }

/* energy bars reuse the tdv histogram look inside the bento tile */
.tdb-kbars { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 38px; margin: 4px 0 2px; }
.tdb-kbars span { position: relative; flex: 1; height: 100%; border-radius: 4px; background: rgba(255, 255, 255, .05); overflow: hidden; }
[data-theme="light"] .tdb-kbars span { background: rgba(10, 10, 10, .06); }
.tdb-kbars span i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%); border-radius: 4px; background: color-mix(in srgb, var(--primary) 45%, var(--surface-3)); transform-origin: bottom; animation: tdvGrow .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + .15s); }
.tdb-kbars span.on i { background: var(--primary); box-shadow: 0 0 14px -2px rgba(15, 162, 76, .55); }

/* membership duo strip: quiet paired stats */
.tdb-duo { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 11px; }
.tdb-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
  padding: 12px 14px; border-radius: 18px; text-align: left; color: inherit; font: inherit;
  background-color: color-mix(in srgb, var(--surface-2) 55%, var(--surface-1));
  border: 1px solid color-mix(in srgb, #fff 6%, transparent);
}
[data-theme="light"] .tdb-cell { background-color: var(--surface-2); border-color: transparent; }
.tdb-cell b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.tdb-cell span { font-size: 11px; color: var(--muted-fg); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .tdb-dot, .tdb-kbars span i { animation: none; opacity: 1; }
}


/* ── chat reactions · pills under the bubble + floating quick bar ─────── */
.chx-rx{display:flex;flex-wrap:wrap;gap:5px;margin-top:-8px;margin-bottom:2px;padding:0 7px;position:relative;z-index:3}
.dm-col.me .chx-rx,.comm-msg.me .chx-rx{justify-content:flex-end}
.comm-bcol{display:flex;flex-direction:column;min-width:0;max-width:80%}
.comm-msg.me .comm-bcol{align-items:flex-end}
.comm-bcol .comm-bubble{max-width:100%}
.chx-rxp{display:inline-flex;align-items:center;gap:4px;border:1px solid color-mix(in srgb,var(--fg) 12%,transparent);background:var(--surface-3);border-radius:999px;padding:3px 9px 3px 8px;font:inherit;font-size:13px;line-height:1;cursor:pointer;color:var(--fg);box-shadow:0 6px 16px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.05);transition:transform .12s var(--ease),background .15s}
.chx-rxp .chx-rxn{font-size:11.5px;font-weight:700;opacity:.72;font-variant-numeric:tabular-nums}
.chx-rxp:active{transform:scale(.9)}
.chx-rxp.on{border-color:color-mix(in srgb,var(--primary) 55%,transparent);background:color-mix(in srgb,var(--primary) 22%,var(--surface-3));color:#fff}
.chx-rxp.on .chx-rxn{opacity:.95;color:var(--primary)}
.chx-rxbar{position:fixed;z-index:1200;display:flex;gap:2px;padding:6px 8px;border-radius:22px;background:color-mix(in srgb,var(--surface-1) 88%,transparent);backdrop-filter:blur(24px) saturate(175%);border:1px solid var(--hairline);box-shadow:0 12px 32px rgba(0,0,0,.35)}
.chx-rxq{width:42px;height:38px;border:0;background:none;font-size:21px;cursor:pointer;border-radius:12px;animation:chxRxIn .22s var(--ease) both;transition:transform .12s var(--ease)}
.chx-rxq:hover{transform:scale(1.22)}
.chx-rxq:active{transform:scale(.9)}
@keyframes chxRxIn{from{opacity:0;transform:translateY(8px) scale(.6)}to{opacity:1;transform:none}}

/* #398: community moderation delete menu (press-and-hold a bubble as a
   moderator / community-admin). Same glass idiom as the reaction bar. */
.chx-delmenu{position:fixed;z-index:1300;padding:4px;border-radius:13px;background:color-mix(in srgb,var(--surface-1) 92%,transparent);backdrop-filter:blur(24px) saturate(175%);border:1px solid var(--hairline);box-shadow:0 12px 32px rgba(0,0,0,.35);animation:chxRxIn .18s var(--ease) both}
.chx-delbtn{display:flex;align-items:center;gap:8px;border:0;background:none;color:var(--danger);font:inherit;font-size:14px;font-weight:650;padding:10px 14px;border-radius:10px;cursor:pointer;white-space:nowrap}
.chx-delbtn:active{background:var(--danger-tint)}

/* edited stamp on a message that was changed after sending (WhatsApp-style) */
.chx-edited{display:inline;margin-left:6px;font-size:10.5px;font-style:italic;opacity:.62;white-space:nowrap}

/* touch devices: the iOS long-press selection callout (Copy / Look Up) must
   never open on top of our bubble menu · copying happens from the menu's own
   Copy action instead (Leo's phone report, 2026-07-21) */
@media (pointer:coarse){#chatMsgs,#chatMsgs *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}}

/* ════ 1.7.0 · meal covers, membership ring, pinned reminders, check-in progress, chat stamps ════ */

/* meal cover photos: the cover carries an inline background-image; without an
   explicit size it paints at natural scale (reads as a heavy zoom crop). */
.meal .cover { background-size: cover; background-position: center; }

/* membership renewal ring: visible track + days-left arc + stronger label */
.mbx-ring { width: 78px; height: 78px; border-radius: 50%; background: color-mix(in srgb, var(--surface-2) 72%, transparent); border: 1px solid var(--hairline); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.mbx-ring svg circle:first-of-type { stroke: color-mix(in srgb, var(--fg) 14%, transparent); }
.mbx-lbl b { font-size: 19px; letter-spacing: -.02em; }
.mbx-lbl span { font-size: 9px; color: var(--muted-fg); }

/* ── pinned reminders (coach requests + consultation calls) ───────────── */
.pinbar { max-width: var(--maxw); margin: 0 auto; padding: 0 14px; display: flex; flex-direction: column; gap: 8px; }
.pinbar:not(:empty) { padding-top: 8px; padding-bottom: 2px; }
.pincard { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--hairline-strong)); box-shadow: var(--shadow-md); animation: riseIn .4s var(--ease) both; }
.pincard .pic { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); }
.pincard .pic svg { width: 17px; height: 17px; }
.pincard.call .pic { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.pincard.wait { border-color: var(--hairline-strong); }
.pincard.wait .pic { background: var(--surface-3); color: var(--muted-fg); }
.pincard.declined { border-color: color-mix(in srgb, var(--danger) 45%, var(--hairline-strong)); }
.pincard.declined .pic { background: var(--danger-tint); color: var(--danger); }
.pincard .ptx { flex: 1; min-width: 0; }
.pincard .ptx b { display: block; font-size: 13.5px; line-height: 1.25; }
.pincard .ptx .sub { font-size: 11.5px; color: var(--muted-fg); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pincard .pact { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pincard .pgo { height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--primary); color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.pincard .pok { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--hairline-strong); background: var(--surface-3); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.pincard .pok svg { width: 15px; height: 15px; }
.pinmore { align-self: center; border: 0; background: none; color: var(--muted-fg); font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 2px 8px; }

/* ── check-in completion progress ─────────────────────────────────────── */
.cix-prog { position: sticky; top: 0; z-index: 5; }
.cix-prog .card { padding: 12px 14px; }
.cix-prog .bar { height: 9px; margin-top: 8px; }
.cix-prog .bar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transform-origin: left; transition: transform .5s var(--ease); }
.cix-prog .bar.done i { background: linear-gradient(90deg, var(--primary), #2fe06b); }
.cix-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cix-step { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--muted-fg); background: var(--surface-2); }
.cix-step svg { width: 12px; height: 12px; }
.cix-step.ok { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, var(--hairline)); background: var(--primary-tint); }
.cix-ppct { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── chat: per-message time stamps + profile sheet ────────────────────── */
.bubble .meta, .comm-bubble .meta { display: block; }
.chx-head { cursor: pointer; }
.chx-prof { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 2px; }
.chx-prof .av { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--hairline-strong); display: grid; place-items: center; overflow: hidden; }
.chx-prof .av img.mark { width: 46px; height: 46px; object-fit: contain; }
.chx-prof .av img.pfp { width: 100%; height: 100%; object-fit: cover; }
.chx-prof h3 { font-size: 18px; margin-top: 10px; }
.chx-prof .st { font-size: 12.5px; color: var(--muted-fg); margin-top: 3px; }

/* pinbar stays visible while the view scrolls · the fixed chat layout starts
   below it (pins.js publishes the strip height as --pinbar-h) */
.pinbar { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top)); z-index: 25; }
.chatwrap { top: calc(var(--topbar-h) + env(safe-area-inset-top) + var(--pinbar-h, 0px)); }

/* pinned CALL card pulls the eye: heartbeat + sonar rings on the badge and a
   breathing glow on the card, so an upcoming/awaiting call is never missed */
.pincard.call { border-color: color-mix(in srgb, var(--primary) 55%, var(--hairline-strong)); animation: riseIn .4s var(--ease) both, pinGlow 3s ease-in-out 1s infinite; }
.pincard.call .pic { position: relative; border-radius: 50%; background: var(--primary); color: #fff; animation: pinBeat 3s ease-in-out infinite; }
.pincard.call .pic::before, .pincard.call .pic::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--primary) 60%, transparent); animation: pinSonar 3s ease-out infinite; }
.pincard.call .pic::after { animation-delay: .6s; }
@keyframes pinSonar { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.8); opacity: 0; } }
@keyframes pinBeat { 0%, 28%, 100% { transform: scale(1); } 8% { transform: scale(1.12); } 16% { transform: scale(1.02); } 22% { transform: scale(1.08); } }
@keyframes pinGlow { 0%, 100% { box-shadow: var(--shadow-md); } 50% { box-shadow: 0 0 18px 2px color-mix(in srgb, var(--primary) 30%, transparent), var(--shadow-md); } }
@media (prefers-reduced-motion: reduce) { .pincard.call, .pincard.call .pic, .pincard.call .pic::before, .pincard.call .pic::after { animation: none; } }

/* ── onboarding flow (#202) ──────────────────────────────────────────── */
.ob2-wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; position: relative; }
.ob2-glow { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(60% 40% at 50% 0%, rgba(15,162,76,.16), transparent 70%); animation: ob2breathe 5s ease-in-out infinite; }
.ob2-glow.gold { background: radial-gradient(60% 40% at 50% 0%, rgba(212,175,55,.18), transparent 70%); }
@keyframes ob2breathe { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.ob2-lang { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface-1); border: 1px solid var(--hairline); color: var(--muted-fg); font-size: 12.5px; padding: 7px 12px; border-radius: 999px; z-index: 3; }
.ob2-intro { text-align: center; animation: ob2in .5s cubic-bezier(.2,.9,.3,1) both; }
.ob2-mark { display: grid; place-items: center; margin-bottom: 18px; }
.ob2-mark svg, .ob2-mark img { width: 72px; height: 72px; filter: drop-shadow(0 8px 28px rgba(15,162,76,.35)); animation: ob2pulse 2.6s ease-in-out infinite; }
.ob2-mark.sm svg, .ob2-mark.sm img { width: 52px; height: 52px; animation: none; }
@keyframes ob2pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.ob2-bigic { width: 84px; height: 84px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 26px; background: linear-gradient(160deg, rgba(15,162,76,.18), rgba(15,162,76,.04)); border: 1px solid rgba(15,162,76,.3); color: var(--primary); font-size: 38px; animation: ob2in .5s .05s cubic-bezier(.2,.9,.3,1) both; }
.ob2-bigic.pop { animation: ob2pop .6s cubic-bezier(.2,1.4,.3,1) both; }
@keyframes ob2pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ob2-h { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; animation: ob2in .5s .1s both; }
.ob2-p { color: var(--muted-fg); font-size: 15.5px; line-height: 1.6; margin: 0 0 22px; animation: ob2in .5s .18s both; white-space: pre-line; }
.ob2-dots { display: flex; gap: 7px; justify-content: center; margin: 0 0 20px; }
.ob2-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--surface-2); transition: all .25s; }
.ob2-dots span.on { background: var(--primary); width: 20px; }
@keyframes ob2in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ob2-card { background: var(--surface-0, var(--surface-1)); border: 1px solid var(--hairline); border-radius: 22px; padding: 22px 20px calc(20px); animation: ob2in .45s both; }
.ob2-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ob2-stepic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: rgba(15,162,76,.12); border: 1px solid rgba(15,162,76,.25); color: var(--primary); font-size: 18px; }
.ob2-prog { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ob2-prog-b { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #34e08b); transition: width .35s cubic-bezier(.2,.9,.3,1); }
.ob2-count { font-size: 11.5px; color: var(--faint-fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob2-formname { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin: 0 0 6px; }
.ob2-h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; }
.ob2-sub { color: var(--muted-fg); font-size: 13.5px; line-height: 1.55; margin: 0 0 8px; }
.ob2-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob2-chip { padding: 10px 15px; border-radius: 999px; background: var(--surface-1); border: 1px solid var(--hairline); color: var(--fg); font-size: 14px; transition: all .15s; }
.ob2-chip.on { background: rgba(15,162,76,.14); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.ob2-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; text-align: center; }
/* date-of-birth field + 3-column wheel picker (sheet) */
.ob2-dob { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; cursor: pointer; }
.ob2-dob svg { color: var(--faint-fg); flex: none; }
.ob2-dob.empty #ob2DobVal { color: var(--faint-fg); }
.ob2-dw { position: relative; height: 220px; display: grid; grid-template-columns: 62px 1fr 86px; gap: 4px; margin: 4px 0 10px; }
.ob2-dw-hl { position: absolute; left: 0; right: 0; top: 88px; height: 44px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--hairline); pointer-events: none; }
.ob2-dw-col { position: relative; z-index: 1; height: 220px; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; padding: 88px 0; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent); }
.ob2-dw-col::-webkit-scrollbar { display: none; }
.ob2-dw-it { height: 44px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; font-size: 17px; color: var(--muted-fg); cursor: pointer; font-variant-numeric: tabular-nums; transition: color .15s; }
.ob2-dw-it.on { color: var(--fg); font-weight: 700; }
.ob2-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.ob2-nav .btn { display: inline-flex; align-items: center; gap: 6px; }
.ob2-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob2-photoslot { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--surface-1) center/cover no-repeat; border: 1.5px dashed var(--hairline); }
.ob2-photoslot.filled { border-style: solid; border-color: var(--primary); }
.ob2-ph-hit { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.ob2-ph-inner { display: grid; place-items: center; gap: 6px; color: var(--muted-fg); font-size: 12px; text-align: center; }
.ob2-photoslot.filled .ob2-ph-inner { display: none; }
.ob2-ph-ic { font-size: 22px; color: var(--faint-fg); }
.ob2-ph-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; display: none; place-items: center; font-size: 13px; }
.ob2-photoslot.filled .ob2-ph-x { display: grid; }
.ob2-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--muted-fg); line-height: 1.5; }
.ob2-consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.ob2-checklist { text-align: left; display: grid; gap: 10px; margin: 4px 0 18px; }
.ob2-checklist .row { display: flex; align-items: center; gap: 11px; background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 13px; padding: 12px 14px; font-size: 13.5px; color: var(--muted-fg); }
.ob2-checklist .row .ic { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--surface-2); font-size: 12px; }
.ob2-checklist .row.done { color: var(--fg); }
.ob2-checklist .row.done .ic { background: rgba(15,162,76,.16); color: var(--primary); }
.ob2-spin { width: 13px; height: 13px; border: 2px solid var(--hairline); border-top-color: var(--primary); border-radius: 999px; animation: spin .8s linear infinite; display: block; }
.ob2-tour { position: fixed; inset: 0; z-index: 1200; background: rgba(5,8,6,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 22px; animation: ob2fade .25s both; }
@keyframes ob2fade { from { opacity: 0; } to { opacity: 1; } }
.ob2-tour-card { width: 100%; max-width: 380px; background: var(--surface-0, var(--surface-1)); border: 1px solid var(--hairline); border-radius: 24px; padding: 28px 22px 20px; text-align: center; }
.ob2-tour-card h2 { font-size: 21px; font-weight: 800; margin: 0 0 8px; }
.ob2-tour-card p { color: var(--muted-fg); font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; white-space: pre-line; }

/* ── spotlight app guide (#210) ──────────────────────────────────────── */
.gdx { position: fixed; inset: 0; z-index: 1250; animation: ob2fade .25s both; }
.gdx.out { opacity: 0; transition: opacity .24s ease; }
.gdx-veil { position: absolute; inset: 0; background: rgba(4,7,5,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.gdx-veil.on { opacity: 1; }
.gdx-spot { position: fixed; border-radius: 18px; box-shadow: 0 0 0 200vmax rgba(4,7,5,.78); opacity: 0; pointer-events: none; transition: left .45s cubic-bezier(.4,0,.2,1), top .45s cubic-bezier(.4,0,.2,1), width .45s cubic-bezier(.4,0,.2,1), height .45s cubic-bezier(.4,0,.2,1), opacity .3s ease; }
.gdx-spot.on { opacity: 1; }
.gdx-ring { position: fixed; border-radius: 999px; border: 2.5px solid var(--primary); opacity: 0; pointer-events: none; animation: gdxPulse 1.7s ease-out infinite; transition: left .45s cubic-bezier(.4,0,.2,1), top .45s cubic-bezier(.4,0,.2,1), width .45s cubic-bezier(.4,0,.2,1), height .45s cubic-bezier(.4,0,.2,1); }
.gdx-ring.on { opacity: 1; }
@keyframes gdxPulse { 0% { transform: scale(.86); opacity: .95; } 65% { transform: scale(1.22); opacity: 0; } 100% { transform: scale(1.22); opacity: 0; } }
.gdx-card { position: fixed; left: 16px; right: 16px; margin: 0 auto; max-width: 380px; background: var(--surface-0, var(--surface-1)); border: 1px solid var(--hairline); border-radius: 22px; padding: 22px 20px 16px; text-align: center; box-shadow: 0 18px 60px rgba(0,0,0,.55); transition: top .45s cubic-bezier(.4,0,.2,1), bottom .45s cubic-bezier(.4,0,.2,1); }
.gdx-card.center { top: 50%; transform: translateY(-50%); }
.gdx-card.pop { animation: gdxCard .38s cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes gdxCard { from { opacity: 0; scale: .96; } to { opacity: 1; scale: 1; } }
.gdx-card h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.gdx-card p, .gdx-body { color: var(--muted-fg); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.gdx-ic { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; background: rgba(15,162,76,.14); color: var(--primary); display: grid; place-items: center; }
.gdx-ic svg { width: 26px; height: 26px; }
.gdx-dots { margin-bottom: 4px; }
.gdx-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.gdx-demo { display: grid; place-items: center; margin: 0 auto 14px; }
.gdx-demo-ic { width: 62px; height: 62px; border-radius: 18px; background: rgba(15,162,76,.14); color: var(--primary); display: grid; place-items: center; }
.gdx-demo-ic svg { width: 32px; height: 32px; overflow: visible; }
.gdx-share-arrow { animation: gdxUp 1.5s ease-in-out infinite; }
@keyframes gdxUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
.gdx-demo-ic.and { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.gdx-demo-ic.and span { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); animation: gdxDot 1.4s ease-in-out infinite; }
.gdx-demo-ic.and span:nth-child(2) { animation-delay: .18s; }
.gdx-demo-ic.and span:nth-child(3) { animation-delay: .36s; }
@keyframes gdxDot { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }
.gdx-steps { text-align: left; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: gdx; display: grid; gap: 9px; }
.gdx-steps li { counter-increment: gdx; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--muted-fg); }
.gdx-steps li::before { content: counter(gdx); flex: none; width: 22px; height: 22px; border-radius: 999px; background: rgba(15,162,76,.16); color: var(--primary); font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-top: 1px; }

/* ── coach-is-building placeholders (#210) ───────────────────────────── */
.bld-hero { text-align: center; padding: 26px 18px 20px; }
.bld-hero h2 { font-size: 19px; font-weight: 800; margin: 0 0 7px; }
.bld-hero p { color: var(--muted-fg); font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; }
/* the "you can already log" line: reads as reassurance, not as fine print */
.bld-hero p.bld-log { color: var(--fg); background: rgba(15,162,76,.10); border: 1px solid rgba(15,162,76,.22); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.bld-ic { position: relative; width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px; background: rgba(15,162,76,.14); color: var(--primary); display: grid; place-items: center; }
.bld-ic svg { width: 28px; height: 28px; }
.bld-pulse { position: absolute; inset: -6px; border-radius: 22px; border: 2px solid var(--primary); animation: gdxPulse 1.8s ease-out infinite; }
.bld-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; color: var(--muted-fg); }
.bld-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); animation: gdxDot 1.4s ease-in-out infinite; }
.bld-skel { margin-top: 10px; padding: 14px; }
.bld-row { display: flex; align-items: center; gap: 12px; }
.bld-circle { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-1); position: relative; overflow: hidden; }
.bld-bar { display: block; height: 11px; border-radius: 6px; background: var(--surface-1); position: relative; overflow: hidden; margin: 4px 0; }
.bld-bar.thin { height: 8px; opacity: .7; }
.bld-circle::after, .bld-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); transform: translateX(-100%); animation: bldShimmer 1.6s ease-in-out infinite; }
@keyframes bldShimmer { to { transform: translateX(100%); } }

/* ── in-app technique video player (#202) ────────────────────────────── */
.vid-ov { position: fixed; inset: 0; z-index: 1300; background: rgba(3,5,4,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 18px; animation: ob2fade .2s both; }
.vid-box { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.vid-box iframe { width: 100%; height: 100%; display: block; }
.vid-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 15px; }
.trx-vidlink { background: none; border: 0; padding: 0; font-size: 12.5px; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }

/* ── inline "see more" link button (section heads) ───────────────────── */
.linkbtn { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--primary); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 2px 2px; }
.linkbtn svg { width: 13px; height: 13px; }

/* ── meal answer history sheet ───────────────────────────────────────── */
.mh-list { display: flex; flex-direction: column; gap: 14px; }
.mh-day { border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px; background: var(--surface-2); }
.mh-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.mh-row { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.mh-row:first-of-type { border-top: 0; }
.mh-ic { width: 22px; height: 22px; flex: none; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, var(--cf) 16%, transparent); color: var(--cf); }
.mh-ic svg { width: 12px; height: 12px; }
.mh-st { color: var(--cf); font-weight: 600; font-size: 12px; }
.mh-sub { color: var(--muted-fg); font-size: 12px; margin-top: 2px; }

/* ── check-in: missing-field guidance (tap submit while incomplete) ───── */
.cix-miss { outline: 2px solid color-mix(in srgb, var(--danger) 65%, transparent); outline-offset: 2px; border-radius: var(--r-lg, 18px); animation: cixMissPulse 1.1s var(--ease) 2; }
@keyframes cixMissPulse { 0%,100% { outline-color: color-mix(in srgb, var(--danger) 65%, transparent); } 50% { outline-color: var(--danger); } }
.cix-misshint { display: flex; align-items: center; gap: 7px; color: var(--danger); font-size: 12.5px; font-weight: 600; margin-top: 9px; animation: riseIn .3s var(--ease) both; }
.cix-misshint svg { width: 14px; height: 14px; flex: none; }

/* ── pinned check-in request: unmissable, but still branded ──────────── */
.pincard { min-width: 0; box-sizing: border-box; }
.pincard .ptx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pincard.hot { border: 1px solid color-mix(in srgb, var(--primary) 62%, var(--hairline-strong)); background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 13%, var(--surface-2)), var(--surface-2) 55%); animation: pinIn .5s var(--ease) both, pinGlow 2.6s var(--ease) .5s 3; }
.pincard.hot .pic { background: var(--primary); color: #fff; animation: pinTick 2.6s var(--ease) .5s 3; }
.pincard.hot .pgo { animation: pinNudge 2.6s var(--ease) .9s 3; }
@keyframes pinIn { from { transform: translateY(-14px) scale(.97); opacity: 0; } 60% { transform: translateY(2px) scale(1.005); opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes pinGlow { 0%,100% { box-shadow: var(--shadow-md); } 45% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 22%, transparent), var(--shadow-md); } }
@keyframes pinTick { 0%,70%,100% { transform: none; } 76% { transform: rotate(-9deg) scale(1.08); } 84% { transform: rotate(8deg) scale(1.08); } 92% { transform: rotate(-4deg); } }
@keyframes pinNudge { 0%,80%,100% { transform: none; } 88% { transform: scale(1.07); } }
/* red-alert pin (missed daily weigh-in / steps): same hot animation family,
   destructive red. Filled surfaces use the brand red #C0362C, not the pale
   text-red token. */
.pincard.alert { border: 1px solid color-mix(in srgb, #C0362C 62%, var(--hairline-strong)); background: linear-gradient(120deg, color-mix(in srgb, #C0362C 14%, var(--surface-2)), var(--surface-2) 55%); animation: pinIn .5s var(--ease) both, pinGlowRed 2.6s var(--ease) .5s 3; }
.pincard.alert .pic { background: #C0362C; color: #fff; animation: pinTick 2.6s var(--ease) .5s 3; }
.pincard.alert .pgo { background: #C0362C; }
.pincard.alert .pgo:hover { background: #A62A21; }
@keyframes pinGlowRed { 0%,100% { box-shadow: var(--shadow-md); } 45% { box-shadow: 0 0 0 5px color-mix(in srgb, #C0362C 24%, transparent), var(--shadow-md); } }
@media (prefers-reduced-motion: reduce) { .pincard.alert, .pincard.alert .pic, .pincard.alert .pgo { animation: none; } }
@media (prefers-reduced-motion: reduce) { .pincard.hot, .pincard.hot .pic, .pincard.hot .pgo { animation: none; } }

/* ── celebration v2: no more rotating stock burst: pulse rings + confetti
     around the badge, spring pop, brand greens only ─────────────────── */
.celebrate .cel-burst { display: none; }
.cel-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 30%, transparent), transparent 62%); opacity: 0; }
.celebrate.show .cel-glow { animation: celGlowIn .7s var(--ease) both; }
@keyframes celGlowIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cel-ring { position: absolute; width: 130px; height: 130px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; }
.celebrate.show .cel-ring { animation: celRing 1.1s cubic-bezier(.16,.84,.3,1) both; }
.celebrate.show .cel-ring.r2 { animation-delay: .22s; border-width: 1.5px; }
.celebrate.show .cel-ring.r3 { animation-delay: .44s; border-width: 1px; }
@keyframes celRing { 0% { transform: scale(.55); opacity: 0; } 18% { opacity: .85; } 100% { transform: scale(2.6); opacity: 0; } }
.celebrate.show .cel-badge { animation: celPop .7s cubic-bezier(.2,1.6,.35,1) .12s both; }
@keyframes celPop { 0% { transform: scale(0) ; } 100% { transform: scale(1); } }
.cel-p { position: absolute; left: 50%; top: 50%; width: 7px; height: 11px; border-radius: 2.5px; background: var(--primary); opacity: 0; transform-origin: center; }
.celebrate.show .cel-p { animation: celPart 1s cubic-bezier(.14,.75,.3,1) both; animation-delay: var(--pd, .1s); }
@keyframes celPart {
  0% { transform: translate(-50%,-50%) rotate(var(--pr,0deg)) scale(.4); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--px,0px)), calc(-50% + var(--py,-120px))) rotate(var(--pr2,220deg)) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .cel-ring, .cel-p, .cel-glow { display: none; } }

/* submit-anyway button: looks muted while the form is incomplete, but stays
   tappable so tapping it GUIDES to the first missing field (cix-misshint) */
.btn.notready { opacity: .55; filter: saturate(.6); }

/* #214: the pin card can never exceed its strip, whatever the ancestors do */
.pincard { max-width: 100%; }

/* ── "your nutrition landed today" banner: premium, shows the whole day ── */
.ntx-sent { position: relative; overflow: hidden; display: flex; gap: 12px; align-items: center; padding: 13px 14px; margin-bottom: 12px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--hairline-strong)); background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 15%, var(--surface-1)), var(--surface-1) 62%); animation: riseIn .45s var(--ease) both; }
.ntx-sent::after { content: ""; position: absolute; top: 0; bottom: 0; left: -90px; width: 70px; background: linear-gradient(100deg, transparent, rgba(255,255,255,.13), transparent); transform: skewX(-18deg); animation: nsShine 2.6s var(--ease) .7s 3; pointer-events: none; }
@keyframes nsShine { to { transform: skewX(-18deg) translateX(780px); } }
.ntx-sent .ns-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--primary); color: #fff; animation: nsPop .6s cubic-bezier(.2,1.5,.4,1) .2s both; }
.ntx-sent .ns-ic svg { width: 19px; height: 19px; }
@keyframes nsPop { from { transform: scale(0); } to { transform: scale(1); } }
.ntx-sent b { font-size: 14.5px; }
.ntx-sent .ns-sub { color: var(--muted-fg); font-size: 12.5px; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .ntx-sent::after, .ntx-sent .ns-ic { animation: none; } }

/* ── #228: brand + coach identity + community picker ─────────────────── */
/* the full "COACHED BY LEOAMF" wordmark must sit on ONE line at 375px */
.topbar .brand b { font-size: 12.5px; letter-spacing: .08em; white-space: nowrap; }

/* real coach photo (round, cover) in the chat header, DM avatars and the
   profile sheet · the eye mark stays the fallback for unassigned clients */
/* #401: percentage width/height on a grid item resolve against the auto-sized
   track (a cyclic dependency), so browsers fall back to the image's intrinsic
   ratio and any non-square profile picture rendered as a tall pill next to
   the bubbles. Absolute inset positioning resolves against the avatar circle
   itself: always a fixed square, object-fit cover, whatever the source ratio. */
.dm-av, .chx-prof .av { position: relative; }
.chat-coach .av img.pfp, .dm-av img.pfp, .chx-prof .av img.pfp { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }

/* slim community picker chips (only rendered when the client belongs to 2+) */
.chx-comms { display: flex; gap: 8px; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
.chx-comms::-webkit-scrollbar { display: none; }
.chx-comm { flex: 0 0 auto; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); font-size: 12px; font-weight: 600; color: var(--muted-fg); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
/* #399: mini community avatar inside the picker chip */
.chx-comm img.cav { width: 18px; height: 18px; border-radius: 999px; object-fit: cover; margin-left: -5px; flex: 0 0 auto; }
.chx-comm.on { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 45%, var(--hairline)); color: var(--primary); }

/* ── #300 grocery list (green/dark, native to the nutrition view) ────────
   Entry button under the Training/Rest plan opens a bottom-sheet with a period
   selector, then category-grouped rows: a tap-to-tick circle, a Leo food photo
   (letter tile fallback), the name and the buy-quantity. Ticks persist in
   localStorage. No gold anywhere: it wears the app's --primary green. */
.gl-open-btn { gap: 9px; }
.gl-open-btn svg { width: 18px; height: 18px; }

.gl-days { margin: 4px 0 2px; }
.gl-seg { display: flex; gap: 7px; flex-wrap: wrap; }
.gl-seg-btn { flex: 1 1 0; min-width: 72px; padding: 10px 8px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--muted-fg);
  font-size: 14px; font-weight: 600; font-family: inherit; transition: border-color .14s var(--ease), background .14s var(--ease), color .14s var(--ease); }
.gl-seg-btn.is-active { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 55%, var(--hairline)); color: var(--primary); }
.gl-custom-wrap { display: none; align-items: center; gap: 8px; margin-top: 10px; }
.gl-custom-wrap.is-shown { display: flex; }
.gl-custom-wrap .inp { width: 92px; }
.gl-custom-wrap span { font-size: 13px; color: var(--muted-fg); }

/* ==== iOS keyboard (chat), v3: --kbtop / --vvt / .kb-open come from the
   visualViewport watcher in app.js. While typing, the chat is glued to the
   VISUAL viewport via top + height only (bottom anchoring is unreliable on
   iOS): top follows the iOS pan (--vvt) so the header never slides under the
   status-bar clock, and the wrapper ends exactly at --kbtop, the y where the
   keyboard starts (measured when iOS reports it, ESTIMATED otherwise so the
   composer is lifted before the keyboard even shows), Discord style. The tab
   bar hides (the keyboard covers its spot). The ::after bleed paints app
   background under the composer: if the estimate overshoots or iOS keeps an
   OS-owned strip, it shows app-colored, never a black hole. */
html.kb-open .chatwrap { top: calc(var(--vvt, 0px) + var(--topbar-h) + env(safe-area-inset-top)); bottom: auto; height: calc(var(--kbtop, 100dvh) - var(--vvt, 0px) - var(--topbar-h) - env(safe-area-inset-top)); }
html.kb-open .topbar { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); z-index: 30; }
html.kb-open .tabbar { opacity: 0; pointer-events: none; }
html.kb-open .chx-dock { position: relative; }
html.kb-open .chx-dock::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 420px; background: var(--bg); }

.gl-results { margin-top: 6px; }
.gl-progress { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 4px; }
.gl-progress-count { font-size: 13px; color: var(--muted-fg); }
.gl-progress-count b { color: var(--primary); }
.gl-reset { background: none; border: none; color: var(--muted-fg); font-size: 12.5px; text-decoration: underline; font-family: inherit; padding: 2px; }
.gl-reset:active { color: var(--primary); }

.gl-cat { margin: 16px 0 7px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
/* «Τα πήρες»: ticked items pool at the very bottom of the list */
.gl-cat.gl-done { color: var(--muted-fg); }
/* regenerate keeps the old list on screen, just dimmed, so the sheet never
   collapses (read as close-and-reopen before) */
.gl-results.is-reloading { opacity: .45; pointer-events: none; transition: opacity .18s var(--ease); }
/* water sheet: the day reset is a quiet destructive link now, NOT a big
   green bar that reads as the primary action (clients tapped it to log) */
.wsheet-clear { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px auto 2px; padding: 6px 10px; background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--danger); opacity: .85; }
.wsheet-clear svg { width: 14px; height: 14px; }
.wsheet-clear:active { opacity: 1; }

.gl-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--hairline); transition: opacity .18s var(--ease); }
.gl-item:last-child { border-bottom: none; }
.gl-check { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary) 55%, transparent); background: transparent;
  display: flex; align-items: center; justify-content: center; padding: 0; color: #fff;
  transition: background .15s var(--ease), border-color .15s var(--ease); }
.gl-check svg { width: 14px; height: 14px; opacity: 0; transition: opacity .12s var(--ease); }

.gl-thumb { position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.gl-thumb-img::before { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, rgba(255,255,255,.04) 28%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.04) 72%);
  background-size: 220% 100%; animation: gl-shimmer 1.15s ease-in-out infinite; }
.gl-thumb-img.is-loaded::before { display: none; }
.gl-thumb-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .34s var(--ease); }
.gl-thumb-img.is-loaded img { opacity: 1; }
@keyframes gl-shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
.gl-thumb-fallback { display: flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  background: radial-gradient(80% 80% at 50% 30%, var(--primary-tint), transparent);
  color: var(--primary); font-weight: 700; font-size: 20px; text-transform: uppercase; }

.gl-body { flex: 1 1 auto; min-width: 0; }
.gl-row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gl-name { font-size: 15px; font-weight: 500; color: var(--fg); line-height: 1.25; }
.gl-qty { flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.gl-nudges { margin: 5px 0 0; padding: 0; list-style: none; }
.gl-nudges li { position: relative; padding-left: 13px; font-size: 12px; line-height: 1.5; color: var(--muted-fg); }
.gl-nudges li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 60%, transparent); }

.gl-item.is-got { opacity: .42; }
.gl-item.is-got .gl-name { text-decoration: line-through; }
.gl-item.is-got .gl-check { background: var(--primary); border-color: var(--primary); }
.gl-item.is-got .gl-check svg { opacity: 1; }

/* «πόσο πήρες;» pantry: the qty is a tappable chip that opens the amount
   editor; recorded stock renders as «Έχεις ήδη ...» hints + a stocked pool */
.gl-qty-btn { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 2px 0 2px 8px; font-family: inherit; }
.gl-qty-btn svg { width: 13px; height: 13px; opacity: .55; }
.gl-have { margin-top: 3px; font-size: 12px; color: var(--primary); }
.gl-item.is-stocked { opacity: .6; }
.gl-item.is-stocked .gl-check.is-home { border-color: var(--hairline); color: var(--muted-fg); }
.gl-item.is-stocked .gl-check.is-home svg { opacity: 1; width: 13px; height: 13px; }
.gl-cat.gl-stock { color: var(--muted-fg); }
.gl-adjust { margin: 2px 0 10px 38px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-sm); }
.gl-adjust-t { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.gl-adjust-row { display: flex; align-items: center; gap: 8px; }
.gl-adjust-inp { flex: 1 1 auto; min-width: 0; max-width: 110px; }
.gl-unit-seg { display: flex; gap: 4px; }
.gl-unit-btn { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--hairline); background: none; color: var(--muted-fg); font-family: inherit; font-size: 12.5px; font-weight: 600; }
.gl-unit-btn.is-active { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.gl-adjust-save { flex: 0 0 auto; padding: 8px 14px; font-size: 13px; margin-left: auto; }
.gl-adjust-hint { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted-fg); }
.gl-adjust-out { display: block; margin: 8px 0 0; padding: 2px 0; background: none; border: 0; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--danger); opacity: .85; }

.gl-spinner { display: block; width: 26px; height: 26px; margin: 28px auto; border-radius: 50%;
  border: 2.5px solid var(--primary-tint); border-top-color: var(--primary); animation: gl-spin .8s linear infinite; }
@keyframes gl-spin { to { transform: rotate(360deg); } }

/* ── avatar editor (Discord-style): circular window, drag to pan, slider zoom ── */
.avx-stage { position: relative; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--surface-2); touch-action: none; cursor: grab; }
.avx-stage:active { cursor: grabbing; }
.avx-img { position: absolute; left: 50%; top: 50%; max-width: none; user-select: none; pointer-events: none; }
.avx-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 65%, transparent); pointer-events: none; }
.avx-zoom { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.avx-zoom svg { width: 15px; height: 15px; color: var(--muted-fg); }
.avx-zoom input[type="range"] { flex: 1 1 auto; accent-color: var(--primary); }

/* ── notification centre (bell sheet): live reminders + resolved history ── */
.ntf-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 4px; background: none; border: 0; border-bottom: 1px solid var(--hairline); font: inherit; color: var(--fg); }
.ntf-row:last-child { border-bottom: none; }
.ntf-row:not(.live) { opacity: .62; }
.ntf-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.ntf-dot.on { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }

/* ── #363 inline exercise form video (tracker) ─────────────────────────── */
.trx-demo { display: block; width: 100%; margin: 8px 0 4px; aspect-ratio: 16/9; border-radius: 12px;
  overflow: hidden; position: relative; background: #000; border: 1px solid var(--hairline); padding: 0; cursor: pointer; }
/* hq1.jpg is a real 4:3 video frame with letterbox bars; 16/9 cover crops exactly the bars */
.trx-demo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trx-demo iframe { width: 100%; height: 100%; display: block; border: 0; }
.trx-demo-play { position: absolute; inset: 0; display: grid; place-items: center; }
.trx-demo-play .pc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(8,10,9,.62); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.trx-demo-play .pc svg { width: 22px; height: 22px; }
.trx-demo-tag { position: absolute; left: 10px; bottom: 8px; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.85); text-shadow: 0 1px 8px rgba(0,0,0,.6); }
/* #378: direct video files render natively inline (first frame = poster) */
video.trx-demo-file { object-fit: cover; cursor: default; }

/* ═══ #400: community channel list (client belongs to 2+ communities) ═══ */
.chx-clist { display: flex; flex-direction: column; gap: 10px; padding: 8px 2px; }
.chx-crow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); }
.chx-crow .cav { position: relative; width: 46px; height: 46px; border-radius: 999px; flex: 0 0 auto; display: grid; place-items: center; background: var(--primary-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent); overflow: hidden; }
.chx-crow .cav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.chx-crow .cav svg { width: 22px; height: 22px; }
.chx-crow .ctxt { display: flex; flex-direction: column; min-width: 0; }
.chx-crow .ctxt b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chx-crow .ctxt .st { font-size: 12px; color: var(--muted-fg); margin-top: 1px; }
.chx-crow .chev { margin-left: auto; color: var(--faint-fg); display: grid; place-items: center; flex: 0 0 auto; }
.chx-headmain { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.chx-backlist { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--fg); flex: 0 0 auto; }
.chx-backlist svg { width: 16px; height: 16px; }

/* ═══ #402: video + voice messages ═══ */
.bubble.chx-medb, .comm-bubble.chx-medb { padding: 5px; }
.bubble.chx-medb .meta, .comm-bubble.chx-medb .meta { padding: 0 8px 3px; }
.chx-vid { border-radius: 16px; overflow: hidden; background: #000; margin: 1px 0; }
.chx-vid video { display: block; width: min(60vw, 300px); max-height: 340px; border-radius: 16px; background: #000; }
.chx-voice { display: flex; align-items: center; gap: 10px; min-width: 190px; max-width: 240px; padding: 8px 8px 5px; }
.chx-vbtn { width: 34px; height: 34px; border-radius: 999px; flex: 0 0 auto; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.dm-row.me .chx-vbtn, .comm-msg.me .chx-vbtn { background: rgba(255, 255, 255, .24); color: #fff; }
.chx-vtrack { flex: 1 1 auto; height: 4px; border-radius: 999px; background: color-mix(in srgb, currentColor 24%, transparent); overflow: hidden; }
.chx-vfill { display: block; width: 0%; height: 100%; border-radius: 999px; background: currentColor; transition: width .2s linear; }
.chx-vtime { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .8; flex: 0 0 auto; }
.chx-vspd { flex: 0 0 auto; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; padding: 3px 7px; border-radius: 999px; border: 0; cursor: pointer; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.dm-row.me .chx-vspd, .comm-msg.me .chx-vspd { background: rgba(255, 255, 255, .24); color: #fff; }
/* quoted reply block above the coach bubble body (Manou 2026-07-17) */
.chx-quote { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent); border-radius: 8px; padding: 5px 9px; margin: 0 0 6px; cursor: pointer; color: inherit; opacity: .92; }
.chx-quote b { display: block; font-size: 11px; font-weight: 800; opacity: .85; margin-bottom: 1px; }
.chx-quote span { display: -webkit-box; font-size: 12.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; opacity: .8; }
.bubble[data-mid] { position: relative; }
.chx-replybtn { position: absolute; top: 50%; right: -40px; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface-1); color: var(--muted-fg); box-shadow: var(--shadow-sm); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .14s, color .14s; }
.bubble.me .chx-replybtn { left: -40px; right: auto; }
.bubble[data-mid]:hover .chx-replybtn, .chx-replybtn:focus-visible { opacity: 1; pointer-events: auto; }
.chx-replybtn:hover { color: var(--primary); }
.chx-replybtn svg, .chx-replybar .ri svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chx-replybar { display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-top: 1px solid var(--hairline); border-left: 3px solid var(--primary); background: var(--surface-2); }
.chx-replybar.hide { display: none; }
.chx-replybar .ri { display: grid; place-items: center; color: var(--primary); flex: 0 0 auto; }
.chx-replybar > div { flex: 1 1 auto; min-width: 0; }
.chx-replybar b, .chx-replybar span { display: block; }
.chx-replybar b { color: var(--primary); font-size: 12px; }
.chx-replybar div span { color: var(--muted-fg); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chx-replybar > button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted-fg); }
.chat-msgs { overscroll-behavior-x: contain; }
@media (hover:none), (pointer:coarse) { .chx-replybtn { display: none; } }
.bubble.me .chx-quote { border-left-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .16); }
.chx-qflash { animation: chxQFlash 2.1s ease; }
@keyframes chxQFlash { 0%, 100% { background: transparent; } 20% { background: color-mix(in srgb, var(--pf-accent, #19a449) 18%, transparent); } }
.chx-medpend { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-size: 13.5px; opacity: .85; }
.chx-medpend svg { width: 16px; height: 16px; }
.chx-rec { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; }
.chx-rec .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--danger); animation: chxRecPulse 1s ease-in-out infinite; flex: 0 0 auto; }
@keyframes chxRecPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.chx-rec b { font-variant-numeric: tabular-nums; font-size: 14.5px; }
.chx-rec .hint { font-size: 12px; color: var(--muted-fg); flex: 1 1 auto; min-width: 0; }
/* explicit cancel / send buttons (tap-to-record rework · client v2.10.0) */
.chx-rec .rx, .chx-rec .rs { flex: 0 0 auto; display: grid; place-items: center; border-radius: 999px; border: 0; font: inherit; }
.chx-rec .rx { width: 36px; height: 36px; background: var(--surface-2); color: var(--danger); border: 1.5px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.chx-rec .rx svg { width: 17px; height: 17px; }
.chx-rec .rs { width: 40px; height: 40px; background: var(--primary); color: #fff; }
.chx-rec .rs svg { width: 19px; height: 19px; }
.chx-chip.on-rec { background: var(--danger-tint); border-color: var(--danger); }
.chx-chip.on-rec svg { color: var(--danger); }
