/* Look: flat borderless cards on a cool grey page, filled inputs, big tabular numbers,
   day-type colours used boldly (tiles, date chips, accents). Light and dark are both chosen. */
:root {
  color-scheme: light;
  --bg: #f2f3f6;
  --surface: #ffffff;
  --surface-2: #eff1f5;
  --text: #0f1218;
  --text-2: #677080;
  --line: #e4e7ec;
  --c0: #8a8f98;
  --c1: #257de0;
  --c2: #f47230;
  --c3: #00b894;
  --c4: #f2a600;
  --c5: #ee7fac;
  --c6: #008a17;
  --c7: #6a4ce2;
  --c8: #ec4647;
  --good: #008a17;
  --bad: #d43b3c;
  --accent: #257de0;
  --card-line: transparent;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --float: 0 10px 34px rgba(16, 24, 40, .16);
  --r-card: 20px;
  --r-ctl: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a0b0d;
    --surface: #16181c;
    --surface-2: #22252b;
    --text: #f3f4f6;
    --text-2: #9aa1ac;
    --line: #2a2e35;
    --c0: #8a8f98;
    --c1: #338ced;
    --c2: #e76624;
    --c3: #00a888;
    --c4: #d28e05;
    --c5: #e24d8b;
    --c6: #0aac23;
    --c7: #9887ef;
    --c8: #eb6263;
    --good: #0aac23;
    --bad: #eb6263;
    --accent: #338ced;
    --card-line: var(--line);
    --shadow: none;
    --float: 0 10px 34px rgba(0, 0, 0, .6);
  }
}
/* A day type's colour reaches an element as --tone, set inline from the user's own list.
   Several of those colours are too light to carry white text or to read as text, so fills
   and coloured text use a deepened version. */
body, #view-session {
  --accent-fill: color-mix(in srgb, var(--accent) 76%, #000);
  --accent-ink: color-mix(in srgb, var(--accent) 70%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  body, #view-session {
    --accent-fill: color-mix(in srgb, var(--accent) 82%, #000);
    --accent-ink: color-mix(in srgb, var(--accent) 78%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--surface));
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-size: 16px; } /* stops iOS zooming on focus */
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn, .type, .hist, .chip, .who button, .info-btn, .tabs a { transition: transform .12s ease, background-color .12s ease; }
.btn:active, .type:active, .hist:active, .who button:active, .info-btn:active { transform: scale(.975); }

/* ---------- top bar + floating tab bar ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 4px;
  min-height: 52px;
  padding: env(safe-area-inset-top) 8px 0 18px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
}
.top h1 .brand { display: inline-flex; align-items: center; gap: 8px; }
.top h1 .brand img { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.top h1 { font-size: 19px; font-weight: 800; margin: 0; flex: 1; min-width: 0; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-state { font-size: 12px; color: var(--text-2); padding-right: 8px; white-space: nowrap; }
.save-state.error { color: var(--bad); font-weight: 600; }
.icon-btn { display: grid; place-items: center; flex: none; border: 0; background: none; width: 44px; height: 44px; border-radius: 50%; color: var(--text-2); font-size: 18px; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.back { margin-left: -12px; color: var(--text); }

main { max-width: 560px; margin: 0 auto; padding: 10px 16px calc(112px + env(safe-area-inset-bottom)); }

.tabs {
  position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5;
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 380px);
  display: flex; gap: 4px; padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: var(--float), 0 0 0 1px var(--line);
}
.tabs a { flex: 1; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; color: var(--text-2); font-size: 11px; font-weight: 600; }
.tabs a span { display: block; }
.tabs a svg { width: 21px; height: 21px; }
.tabs a.on { background: var(--accent-soft); color: var(--accent-ink); }
.tabs a.on svg { stroke-width: 2.4; }

/* ---------- shared pieces ---------- */
.card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 8px; }
.row.end { justify-content: flex-end; }
.grow, .spacer { flex: 1; }
.muted, .hint { color: var(--text-2); font-size: 13px; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; }
.section { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 10px; font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; }
.section a, .section span { font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.section a { color: var(--accent-ink); }
.empty { text-align: center; color: var(--text-2); padding: 48px 0; }
.subhead { font-size: 13px; font-weight: 700; margin: 14px 0 6px; }

.btn { border: 0; background: var(--surface-2); border-radius: var(--r-ctl); min-height: 48px; padding: 0 18px; font-weight: 600; }
.btn:active { background: var(--line); }
.btn.primary, .btn.primary:active { background: var(--accent-fill); color: #fff; }
.btn.primary:active { filter: brightness(.92); }
.btn.block { display: block; width: 100%; }
.btn.dashed { min-height: 54px; background: var(--accent-soft); color: var(--accent-ink); border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.danger { background: none; color: var(--bad); }
.btn.danger:active { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.btn.quiet { margin-top: 12px; min-height: 44px; font-size: 14px; color: var(--text-2); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

.chips { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; flex: none; border: 0; background: var(--surface); border-radius: 999px; height: 38px; padding: 0 15px; font-size: 13px; font-weight: 600; color: var(--text-2); box-shadow: 0 0 0 1px var(--line) inset; }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip.on .dot { box-shadow: 0 0 0 2px var(--text); }

.seg { display: flex; flex: 1; background: var(--surface-2); border-radius: var(--r-ctl); padding: 4px; }
.seg button { flex: 1; border: 0; background: none; height: 40px; border-radius: 11px; font-weight: 700; font-size: 13px; color: var(--text-2); }
.seg button.on, .seg.mode button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .16); }
.seg.mode { margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .seg button.on, .seg.mode button.on { background: #343841; } }

/* session row: home lists and history. The date sits in a chip tinted with the day type. */
.hist { display: grid; grid-template-columns: 50px 1fr auto 16px; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; padding: 10px 12px 10px 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.hist:active { background: var(--surface-2); }
.hist .d { display: grid; place-content: center; justify-items: center; width: 50px; height: 50px; border-radius: 14px; background: color-mix(in srgb, var(--tone) 16%, var(--surface)); line-height: 1.15; }
.hist .d b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hist .d small { font-size: 10px; font-weight: 700; text-transform: uppercase; color: color-mix(in srgb, var(--tone) 60%, var(--text)); }
.hist .m { min-width: 0; }
.hist .m b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .m small { display: block; color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .s { font-weight: 800; font-variant-numeric: tabular-nums; }
.hist .s.cta { padding: 7px 13px; border-radius: 999px; background: color-mix(in srgb, var(--tone) 76%, #000); color: #fff; font-size: 13px; font-weight: 700; }
.hist .chev { width: 16px; height: 16px; color: var(--text-2); opacity: .5; }

/* ---------- home ---------- */
.hero { margin: 8px 4px 18px; }
.hero p { margin: 0; color: var(--text-2); font-size: 14px; font-weight: 500; }
.hero h2 { margin: 2px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  min-height: 128px; padding: 14px 12px 12px; text-align: left; overflow: hidden;
  border: 0; border-radius: var(--r-card); color: #fff;
  background: linear-gradient(155deg, color-mix(in srgb, var(--tone) 82%, #000), color-mix(in srgb, var(--tone) 56%, #000));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--tone) 28%, transparent);
}
.type::after { content: "+"; position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 20px; font-weight: 500; line-height: 1; }
.type b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type small { color: rgba(255, 255, 255, .86); font-size: 12px; font-variant-numeric: tabular-nums; }
.type em { order: 9; margin-top: 8px; font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); white-space: nowrap; }
.type.add { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 12px; color: var(--text-2); background: none; box-shadow: none; border: 1.5px dashed var(--line); border-radius: var(--r-ctl); }
.type.add::after { display: none; }
.type.add b { font-size: 20px; font-weight: 500; margin: 0; }
.type.add small { color: var(--text-2); font-size: 14px; font-weight: 600; }
.nudge { display: block; width: 100%; text-align: left; margin-bottom: 12px; padding: 13px 15px; border: 0; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.week-head strong { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.week-head strong span { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.week-head small { display: block; color: var(--text-2); font-size: 12px; margin-top: 4px; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 16px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.day small { font-size: 11px; font-weight: 600; color: var(--text-2); }
.day b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.day b.done { background: color-mix(in srgb, var(--tone) 80%, #000); color: #fff; }
.day.today b { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.day.future b { color: var(--text-2); background: none; box-shadow: 0 0 0 1.5px var(--line) inset; }
.day span { display: flex; gap: 3px; height: 6px; }
.day .dot { margin: 0; width: 6px; height: 6px; }

/* ---------- session page ---------- */
.sess-head input[type=date], .assign input[type=date] { border: 0; background: var(--surface-2); border-radius: var(--r-ctl); height: 46px; padding: 0 10px; min-width: 0; width: 140px; font-weight: 600; }
.type-select { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: var(--r-ctl); padding: 0 14px; background: var(--accent-fill); color: #fff; font-weight: 700; font-size: 15px; }
.sess-head .label { width: 100%; border: 0; border-bottom: 1.5px solid var(--line); background: none; height: 44px; margin-top: 6px; border-radius: 0; padding: 0 2px; outline: none; font-weight: 600; }
.sess-head .label:focus { border-color: var(--accent); }
.scoreline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-top: 14px; }
.scoreline .muted { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; flex-basis: 100%; }
.scoreline strong { font-size: 44px; font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.delta { font-size: 13px; font-weight: 600; color: var(--text-2); }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.scoreline .delta { flex-basis: 100%; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent-fill); transition: width .25s ease; }
.clock-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.wclock { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.wbtn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.wbtn svg { width: 18px; height: 18px; }
.energy { flex: 1; min-width: 0; display: inline-flex; align-items: center; padding: 9px 13px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: left; }
.wclock.running { flex: 1; display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.wclock.running b { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.wclock.running .wlabel { margin-left: auto; font-size: 13px; font-weight: 700; }
.wdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: wpulse 1.4s ease-in-out infinite; }
@keyframes wpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.rest-launch { flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 700; }

/* rest countdown bar, floating above the tab bar on every screen */
.rest-bar { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; transform: translateX(-50%); width: min(calc(100vw - 32px), 440px); display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; overflow: hidden; border-radius: 16px; background: var(--text); color: var(--bg); box-shadow: var(--float); }
.rest-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--accent) 55%, var(--text)); transition: width .25s linear; }
.rest-bar > :not(.rest-fill) { position: relative; z-index: 1; }
.rest-time { flex: 1; min-width: 0; border: 0; background: none; color: inherit; text-align: left; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rest-adj { flex: none; border: 0; background: color-mix(in srgb, var(--bg) 20%, transparent); color: inherit; border-radius: 10px; height: 36px; padding: 0 10px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rest-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--bg) 20%, transparent); color: inherit; font-size: 15px; }
.rest-bar.done { background: var(--accent-fill); color: #fff; }
.rest-bar.done .rest-fill { display: none; }
.rest-bar.done .rest-time { animation: restflash .6s ease-in-out 3; }
@keyframes restflash { 50% { opacity: .35; } }
.rest-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.rest-presets button { border: 0; background: var(--surface-2); border-radius: 12px; height: 48px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rest-presets button.on { background: var(--accent-fill); color: #fff; }
.rest-stp { width: 100%; }
.rest-quick { flex: none; padding: 0 12px; background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; }
.note-area { display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: var(--surface-2); font: inherit; font-size: 16px; resize: vertical; outline: none; }
.note-area:focus { border-color: var(--accent); background: var(--surface); }
#s-after { margin: 14px 0 0; min-height: 72px; background: var(--surface); box-shadow: var(--shadow); border-color: var(--card-line); }
.coach-note { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--accent-soft); }
.coach-note b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-ink); }
.coach-note p { margin: 3px 0 0; white-space: pre-wrap; }

.ex-head { display: flex; align-items: center; gap: 8px; }
.ex-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px 0; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-score { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--accent-ink); }
.ex-score:not(:empty) { padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); }
.ex-meta { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; }
.ex-meta select { border: 0; background: var(--surface-2); border-radius: 10px; height: 34px; font-size: 13px; font-weight: 600; padding: 0 6px; }
.last { flex: 1; min-width: 0; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cols, .set { display: grid; grid-template-columns: 34px 1.2fr 1fr 1fr; gap: 6px; align-items: center; }
.plan-row { grid-template-columns: 1fr 1fr 1.2fr; }
.cols { font-size: 10px; font-weight: 700; color: var(--text-2); text-align: center; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.set { margin-bottom: 8px; }
.set-idx { justify-self: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); font-weight: 800; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.set-idx.has-note { background: var(--accent-soft); color: var(--accent-ink); }
.stp { display: flex; align-items: stretch; height: 48px; border: 1.5px solid transparent; border-radius: var(--r-ctl); overflow: hidden; background: var(--surface-2); }
.stp button { width: 30px; flex: none; border: 0; background: none; font-size: 20px; font-weight: 500; color: var(--text-2); padding: 0; }
.stp button:active { background: var(--line); }
.stp input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; text-align: center; padding: 0; font-size: 17px; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.01em; outline: none; }
.stp:focus-within { border-color: var(--accent); background: var(--surface); }
.bw-chip { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: var(--r-ctl); background: none; box-shadow: 0 0 0 1.5px var(--line) inset; color: var(--text-2); font-size: 13px; font-weight: 700; }
.set-extra { grid-column: 2 / -1; display: flex; gap: 6px; }
.set-extra input, .cue-input { flex: 1; min-width: 0; height: 42px; border: 1.5px solid transparent; border-radius: 12px; background: var(--surface-2); padding: 0 12px; outline: none; }
.set-extra input:focus, .cue-input:focus { border-color: var(--accent); background: var(--surface); }
.cue-input { display: block; width: 100%; margin: 2px 0 6px; }
.set-extra button { height: 42px; border-radius: 12px; border: 0; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); padding: 0 14px; font-weight: 700; }
.ex-foot { display: flex; gap: 6px; margin-top: 8px; }
.ex-foot .btn { min-height: 46px; }
.ex-foot .grow { flex: 1; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.ex-foot .btn.danger { padding: 0 12px; font-size: 14px; }
.sess-foot { display: flex; gap: 8px; margin-top: 24px; }
.sess-foot .primary { flex: 1; min-height: 54px; font-size: 16px; font-weight: 700; border-radius: 16px; }
.sess-foot .btn.danger { min-height: 54px; }

/* the coach's plan on a card */
.target { margin: 6px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.target b { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-right: 6px; }
.target p { margin: 5px 0 0; color: var(--text-2); font-size: 13px; font-weight: 400; white-space: pre-wrap; }
.target-extra { margin: 2px 0 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.st { float: right; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--text-2); }
.st.ok { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); }
.st.part { color: var(--text); }
.plan-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; font-size: 14px; }
.plan-sum small { flex-basis: 100%; color: var(--text-2); }
.plan-sum .btn { margin: 0 0 0 auto; min-height: 36px; padding: 0 12px; }
.plan-hint { margin: 10px 0 0; }
.assign .btn { margin-top: 10px; }
.assign .hint { margin: 10px 0 0; }

/* ---------- sheets ---------- */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; height: 86dvh; max-height: 86dvh; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--text); box-shadow: var(--float); }
dialog.sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
dialog.sheet.small { height: auto; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); }
dialog.sheet.small::before { margin-bottom: 14px; }
dialog::backdrop { background: rgba(8, 10, 14, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; position: sticky; top: 0; background: var(--surface); }
.sheet-head input { flex: 1; min-width: 0; height: 46px; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 14px; outline: none; }
.sheet-head input:focus { border-color: var(--accent); }
#picker-list { list-style: none; margin: 0; padding: 0 8px 24px; overflow-y: auto; }
#picker-list button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; border: 0; border-radius: 12px; background: none; text-align: left; font-weight: 500; }
#picker-list button:active { background: var(--surface-2); }
#picker-list small { color: var(--text-2); white-space: nowrap; }
#settings label, #energy-sheet label, #types-sheet label { display: block; font-weight: 600; margin-bottom: 10px; }
#settings input, #energy-sheet input, #type-name { display: block; width: 100%; height: 48px; margin-top: 6px; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 14px; outline: none; }
#settings input:focus, #energy-sheet input:focus, #type-name:focus { border-color: var(--accent); }
#settings h2 #set-user { font-weight: 400; font-size: 14px; margin-left: 6px; }
#settings details { margin: 4px 0 14px; }
#settings summary { font-weight: 600; padding: 8px 0; color: var(--accent-ink); }
#settings details label { margin-top: 8px; }
#settings select { display: block; width: 100%; height: 48px; margin-top: 6px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 10px; font-weight: 600; color: var(--text); }
#settings .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.weights { list-style: none; margin: 0; padding: 0; }
.weights li { display: grid; grid-template-columns: 1fr auto 64px; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.weights li span:last-child { text-align: right; font-weight: 600; }
.weights li span:last-child { color: var(--text-2); } /* up or down is not good or bad in itself: no colour */
#types-list { list-style: none; margin: 0 0 12px; padding: 0; }
#types-list li { display: flex; align-items: center; gap: 6px; min-height: 46px; border-bottom: 1px solid var(--line); }
#types-list b { flex: 1; }
#types-list small { color: var(--text-2); }
#types-list button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--text-2); font-size: 16px; }
#type-name { margin: 0 0 10px; }
#types-sheet .seg.mode { margin: 0; }

/* ---------- chart tab ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; padding: 13px 12px; min-width: 0; box-shadow: var(--shadow); }
.tile span { display: block; font-size: 11px; font-weight: 600; color: var(--text-2); }
.tile b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 3px; }
.tile small { font-size: 11px; font-weight: 600; }
.chart-card h2 { margin-bottom: 2px; }
.chart-card .hint { margin: 0 0 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.legend button { display: inline-flex; align-items: center; border: 0; background: var(--surface-2); border-radius: 999px; height: 32px; padding: 0 11px; font-size: 13px; font-weight: 600; }
.legend button.off { opacity: .4; }
.chart-box { position: relative; height: 220px; }
.chart-box.short { height: 170px; }
.chart-card select { width: 100%; height: 48px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 10px; margin-bottom: 8px; font-weight: 600; }

/* ---------- Excel-style grid: one column per session ---------- */
.grid-wrap { overflow: auto; max-height: calc(100dvh - 320px - env(safe-area-inset-bottom)); border: 1px solid var(--card-line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.grid { display: grid; grid-auto-columns: 136px; width: max-content; }
.ghead { grid-row: 1; position: sticky; top: 0; z-index: 1; display: block; padding: 9px 10px; background: color-mix(in srgb, var(--tone) 14%, var(--surface)); border-right: 1px solid var(--line); border-bottom: 3px solid color-mix(in srgb, var(--tone) 80%, #000); scroll-snap-align: start; }
.ghead b { font-size: 14px; font-weight: 800; }
.ghead span { font-size: 12px; color: var(--text-2); }
.ghead small { display: block; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ghead:active { background: color-mix(in srgb, var(--tone) 26%, var(--surface)); }
.gcol { grid-row: 2; border-right: 1px solid var(--line); }
.gcell { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.gcell h4 { margin: 0 0 3px; font-size: 13px; line-height: 1.25; }
.gcell p { margin: 0; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gcell em { font-style: normal; color: var(--text-2); }
.gcell i { font-style: normal; color: var(--text-2); font-size: 12px; }
#grid-sheet[open], #info-sheet[open] { display: flex; flex-direction: column; }
#grid-sheet .sheet-head, #info-sheet .sheet-head { padding-left: 18px; }
#grid-sheet .sheet-head b, #info-sheet .sheet-head b { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#grid-body { flex: 1; min-height: 0; max-height: none; border: 0; border-radius: 0; box-shadow: none; }

/* ---------- login + account ---------- */
body.anon .tabs, body.anon #btn-settings, body.anon #btn-back { display: none; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.who button { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 8px 16px; border: 2px solid transparent; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
.who button span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--surface-2); font-size: 24px; font-weight: 800; }
.who button b { font-size: 16px; }
.who button.on { border-color: var(--accent); }
.who button.on span { background: var(--accent-fill); color: #fff; }
#pin-form { margin-top: 24px; }
#pin-form label { display: block; margin: 0 4px 8px; color: var(--text-2); }
#pin-form label b { color: var(--text); }
#pin { display: block; width: 100%; height: 60px; border: 2px solid transparent; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: center; font-size: 28px; font-weight: 700; letter-spacing: .4em; outline: none; }
#pin:focus { border-color: var(--accent); }
#pin-form .btn { margin-top: 4px; min-height: 54px; font-size: 16px; border-radius: 16px; }
.error { min-height: 20px; margin: 8px 4px; color: var(--bad); font-size: 14px; font-weight: 600; }
.chips.lang { margin: 6px 0 14px; }
#view-login .chips.lang { justify-content: center; margin-top: 28px; }

/* ---------- coach and trainee ---------- */
.act-banner { position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 4; display: flex; align-items: center; gap: 8px; max-width: 528px; margin: 4px auto 0; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: var(--float); }
@media (max-width: 560px) { .act-banner { margin: 4px 16px 0; } }
.act-banner span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-banner button { border: 0; background: color-mix(in srgb, var(--bg) 22%, transparent); color: inherit; border-radius: 999px; height: 34px; padding: 0 14px; font-weight: 700; }
.hist.trainee { --tone: var(--accent); }
.hist.trainee .avatar { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 18px; font-weight: 800; }
.badge { font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c2) 18%, var(--surface)); color: var(--text); white-space: nowrap; }

/* ---------- exercise video + photo ---------- */
.info-btn { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); }
.info-btn svg { width: 19px; height: 19px; }
.info-btn.has { color: var(--accent-ink); background: var(--accent-soft); }
#info-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px calc(20px + env(safe-area-inset-bottom)); }
#info-body .subhead { margin: 16px 0 8px; }
#info-body input[type=url] { flex: 1; min-width: 0; height: 48px; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 14px; outline: none; }
#info-body input[type=url]:focus { border-color: var(--accent); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.link { display: inline-block; margin: 8px 0 10px; color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.photo { display: block; width: 100%; max-height: 50dvh; object-fit: contain; border-radius: 16px; background: var(--surface-2); margin-bottom: 10px; }
.file-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* exercise library: filter chips in the picker, a thumbnail per row, an album per exercise */
#picker .filters { padding: 0 16px 4px; }
.filter-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 2px 0 6px; }
#picker .filters .chips { margin-bottom: 10px; }
#picker-note { margin: 0 16px 4px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip:disabled { opacity: 1; }
.chip:disabled:not(.on) { opacity: .55; }
#picker-list button { justify-content: flex-start; gap: 12px; padding: 6px 8px; min-height: 60px; }
#picker-list button > small { margin-left: auto; }
.pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#picker-list .pick-text small { white-space: normal; font-size: 12px; }
.thumb { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.thumb.none { display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--text-2); }
#picker-list .empty { padding: 24px 12px; text-align: center; }
.info-meta { margin: -4px 0 12px; }
.album-main { position: relative; }
.album-main .photo { margin-bottom: 0; }
.album-by { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.album-del { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.album-del svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.album { display: flex; gap: 8px; overflow-x: auto; padding: 10px 3px 6px; scrollbar-width: none; }
.album::-webkit-scrollbar { display: none; }
.album-thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-thumb.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.album-add { flex: none; width: 64px; height: 64px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.album-add svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* AI: telling the workout by voice, asking which exercise a description is */
#voice-result { margin-top: 8px; }
.voice-ex { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.voice-ex input { width: 22px; height: 22px; flex: none; }
.voice-ex small { color: var(--text-2); font-size: 13px; }
.voice-ex .unsure { color: color-mix(in srgb, var(--c4) 62%, #000); }
.badge { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft, var(--surface-2)); color: var(--accent-ink, var(--text)); }
#voice-apply { margin-top: 14px; }
.ai-ask { color: var(--accent-ink, var(--accent)); font-weight: 700; }
.ai-head { padding: 10px 12px 0; }
.ai-wait { padding: 12px; }
.ai-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.ai-table th, .ai-table td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ai-table th:first-child, .ai-table td:first-child { text-align: left; }
.ai-reply { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 6px; }
.ask-text { font-size: 16px; font-weight: 600; margin: 4px 0 18px; line-height: 1.4; }
.btn.danger-fill { background: var(--bad); color: #fff; }
#ask-sheet { height: auto; min-height: 0; top: auto; }
#ask-sheet .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#ask-sheet .btn { min-height: 52px; width: 100%; }

/* Ghi nhanh: a bar pinned above the tabs on Home and in a session */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quick { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 6; transform: translateX(-50%); width: min(calc(100vw - 24px), 536px); display: flex; flex-direction: column; gap: 8px; }
.quick-bar { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 16px; border-radius: 26px; background: var(--surface); box-shadow: var(--float), 0 0 0 1px var(--line); }
.quick-bar input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; color: var(--text); font-size: 16px; }
.quick-listen { flex: 1; color: var(--bad); font-size: 15px; font-weight: 600; }
.quick-mic, .quick-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.quick-send { background: var(--accent); color: #fff; }
.quick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.quick-mic .i-stop { display: none; fill: currentColor; stroke: none; }
.quick.rec .quick-mic { background: var(--bad); color: #fff; animation: qpulse 1.2s infinite; }
.quick.rec .quick-mic .i-mic { display: none; }
.quick.rec .quick-mic .i-stop { display: block; }
@keyframes qpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.quick-hint { margin: -2px 12px 0; font-size: 13px; color: var(--text-2); text-shadow: 0 0 6px var(--bg); }
.quick-hint:empty { display: none; }
.quick-card { padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--float), 0 0 0 1px var(--line); }
.quick-card p { margin: 0 0 6px; }
.quick-card .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.quick-card .row.two .btn:only-child { grid-column: 1 / -1; }
.quick-list { max-height: 38dvh; overflow-y: auto; }
.quick-heard { font-size: 13px; color: var(--text-2); font-style: italic; }
.quick-wait { color: var(--text-2); font-weight: 600; animation: wpulse 1.4s infinite; }
body.has-quick main { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
body.has-quick .rest-bar { bottom: calc(144px + env(safe-area-inset-bottom)); }

button.day { border: 0; background: none; padding: 4px 0; color: inherit; font: inherit; border-radius: 12px; }
button.day:disabled { opacity: 1; cursor: default; }
button.day:not(:disabled):active { background: var(--surface-2); }
.trainees-hint { margin: 4px 4px 14px; }
.week-nav { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 8px; }
.week-nav b { font-size: 14px; font-weight: 700; color: var(--text-2); }
.week-nav .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.week-nav .icon-btn:disabled { opacity: .25; }
#home-week { touch-action: pan-y; }
/* on Home the quick bar sits in the page under the heading, its answer below it */
.quick.inline { position: static; transform: none; width: auto; margin: -6px 0 18px; }
.quick.inline #quick-out { order: 3; }
.quick.inline .quick-bar { box-shadow: 0 0 0 1px var(--line); }
/* inside a session the tabs give way: the quick bar and the rest timer sit lower */
body.in-session .tabs { display: none; }
body.in-session .quick { bottom: calc(12px + env(safe-area-inset-bottom)); }
body.in-session .rest-bar { bottom: calc(12px + env(safe-area-inset-bottom)); }
body.in-session.has-quick .rest-bar { bottom: calc(80px + env(safe-area-inset-bottom)); }
body.in-session main { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
body.in-session.has-quick main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

/* share sticker: a see-through PNG of the session to lay over a photo */
.share-body { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.share-preview { border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, #6b7a8f, #2d3540 60%, #1b1f26); padding: 14px; }
.share-preview.dark-ink { background: linear-gradient(160deg, #f4efe6, #d9dee6); }
.share-preview img { display: block; width: 100%; height: auto; }
.share-ink { display: flex; gap: 8px; }
.share-body .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* video call */
body.in-call { overflow: hidden; }
.call { --pip-x: calc(100% - 106px); --pip-y: calc(12px + env(safe-area-inset-top)); --glass: rgba(22, 24, 30, .58); --line2: rgba(255, 255, 255, .14); position: fixed; inset: 0; z-index: 50; background: #07080b; color: #fff; font-feature-settings: "tnum"; -webkit-user-select: none; user-select: none; }
.call .glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 0 0 1px var(--line2) inset, 0 10px 30px rgba(0, 0, 0, .35); }
.call .ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.call-remote, .call-stage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #07080b; }
.call-remote.fit { object-fit: contain; }
.call-stage { object-fit: contain; touch-action: none; z-index: 1; bottom: auto; }
.call-local { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #07080b; }
/* the small picture-in-picture video: drag it to any corner, tap it to swap with the big one */
.call video.pip { inset: auto; left: var(--pip-x); top: var(--pip-y); width: 92px; height: auto; aspect-ratio: 3 / 4; z-index: 3; border-radius: 18px; background: #1b1e25; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5), 0 8px 24px rgba(0, 0, 0, .45); touch-action: none; cursor: grab; transition: left .28s cubic-bezier(.2, .8, .2, 1), top .28s cubic-bezier(.2, .8, .2, 1); }
.call video.pip.dragging { transition: none; cursor: grabbing; }
/* tap the video to hide or show the controls */
.call-top, .call-dock { transition: opacity .25s; }
.call.chrome-off .call-top, .call.chrome-off .call-dock, .call.chrome-off .call-tray { opacity: 0; pointer-events: none; }
/* the trainee watching a replay: nothing but the picture */
.call.watching .call-top, .call.watching .call-dock, .call.watching video.pip, .call.watching .call-tray { visibility: hidden; }
/* recording: a red frame round the screen; on the trainee's phone (far away) it is thick, with a big label */
.call.rec-on::after { content: ""; position: absolute; inset: 0; z-index: 6; border: 4px solid #ff3b30; pointer-events: none; }
.call.rec-on.far::after { border-width: 14px; }
.call-rec.far { top: calc(132px + env(safe-area-inset-top)); padding: 12px 26px; font-size: 30px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.call-rec.far::before { width: 16px; height: 16px; }
.call.far .call-banner { padding: 12px 20px; font-size: 19px; font-weight: 700; }
.call-key em.bump { animation: callbump .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes callbump { 40% { transform: scale(1.5); } }
.rv-done { height: 40px; padding: 0 18px; border: 0; border-radius: 20px; background: #fff; color: #0b0d11; font-size: 15px; font-weight: 800; flex: none; margin-left: auto; }
.call-local.mirror { transform: scaleX(-1); }
.call-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; padding: calc(12px + env(safe-area-inset-top)) 120px 40px 14px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); pointer-events: none; }
.call-who { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 6px 14px 6px 6px; border-radius: 999px; pointer-events: auto; }
.call-who .m { min-width: 0; display: flex; flex-direction: column; }
.call-who b { font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-who small { font-size: 12px; color: #c4c9d2; }
.call-av { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #ff6a3d, #ff2d55); font-weight: 800; font-size: 15px; color: #fff; }
.call-av.xl { width: 112px; height: 112px; font-size: 46px; }
.call-rec { position: absolute; z-index: 4; left: 50%; top: calc(72px + env(safe-area-inset-top)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #ff3b30; font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px rgba(255, 59, 48, .45); white-space: nowrap; }
.call-rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: callblink 1s infinite; }
@keyframes callblink { 50% { opacity: .2; } }
.call-banner { position: absolute; z-index: 4; left: 50%; top: calc(72px + env(safe-area-inset-top)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.call-wait, .call-ring { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 24px; }
.call-wait { z-index: 1; background: radial-gradient(circle at 50% 38%, rgba(255, 70, 70, .18), transparent 60%), rgba(7, 8, 11, .72); pointer-events: none; }
.call-ring { background: radial-gradient(circle at 50% 36%, rgba(48, 209, 88, .2), transparent 60%), #07080bf2; }
.call-wait b, .call-ring b { font-size: 28px; font-weight: 800; margin-top: 22px; }
.call-wait small, .call-ring small { font-size: 15px; color: #c4c9d2; }
.call-pulse { position: relative; display: grid; place-items: center; }
.call-pulse::before, .call-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); animation: callring 2s ease-out infinite; }
.call-pulse::after { animation-delay: 1s; }
@keyframes callring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.call-ring-keys { display: flex; gap: 64px; margin-top: 64px; }
.call-dock { position: absolute; z-index: 4; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 8px; border-radius: 30px; width: max-content; max-width: calc(100% - 20px); }
.call-key { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 60px; padding: 0; border: 0; background: none; color: #fff; }
.call-key small { font-size: 11px; font-weight: 600; color: #d8dce3; }
.call-key .k { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .14); transition: background .15s, transform .12s; }
.call-key:active .k, .call-key:active .r { transform: scale(.92); }
.call-key .ic.off { display: none; }
.call-key.muted .k { background: #fff; color: #0b0d11; }
.call-key.muted .ic.on { display: none; }
.call-key.muted .ic.off { display: block; }
.call-key.end .k { background: #ff3b30; }
.call-key.ok .k { background: #30d158; }
.call-ring .call-key .k { width: 70px; height: 70px; }
.call-ring .call-key .ic { width: 30px; height: 30px; }
.call-key em { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; box-shadow: 0 0 0 2px #1b1e25; }
.call-key.rec { margin: 0 6px; }
.call-key .r { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; border: 3.5px solid #fff; transition: transform .12s; }
.call-key .r i { width: 50px; height: 50px; border-radius: 50%; background: #ff3b30; transition: all .18s ease; }
.call-key.rec.on .r i { width: 24px; height: 24px; border-radius: 7px; }
.call-key:disabled { opacity: .4; }
@keyframes callup { from { transform: translateY(12px); opacity: 0; } }
.call-tray { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: calc(118px + env(safe-area-inset-bottom)); padding: 12px 0 12px; border-radius: 24px; animation: callup .2s ease; }
.call-tray-head { display: flex; align-items: baseline; gap: 8px; padding: 0 16px 10px; }
.call-tray-head b { font-size: 15px; }
.call-tray-head small { font-size: 12px; color: #aeb4bf; }
.call-tray-list { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.call-tray-list::-webkit-scrollbar { display: none; }
.call-thumb { position: relative; flex: none; width: 84px; padding: 0; border: 0; background: none; color: #fff; text-align: left; scroll-snap-align: start; }
.call-thumb img, .call-thumb .ph { display: block; width: 84px; height: 112px; object-fit: cover; border-radius: 14px; background: #262a33; box-shadow: 0 0 0 1px var(--line2) inset; }
.call-thumb .d { position: absolute; right: 6px; top: 90px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); font-size: 11px; font-weight: 700; }
.call-thumb small { display: block; margin-top: 5px; font-size: 12px; font-weight: 600; color: #d8dce3; }
.call-review { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.call-review > * { pointer-events: auto; }
.rv-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: #07080b; }
.rv-title { display: flex; flex-direction: column; min-width: 0; }
.rv-title b { font-size: 16px; }
.rv-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #8fe3a5; }
.rv-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #30d158; animation: callblink 1.4s infinite; }
.call-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; flex: none; }
.rv-tools { position: absolute; right: 10px; top: 50%; transform: translateY(-58%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 26px; }
.rv-tool { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: none; color: #fff; }
.rv-tool[aria-pressed="true"] { background: #fff; color: #0b0d11; }
.rv-color { width: 26px; height: 26px; margin: 4px 0; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); }
.rv-color[aria-pressed="true"] { box-shadow: 0 0 0 2px #07080b, 0 0 0 4.5px #fff; }
.rv-sep { width: 22px; height: 1px; margin: 4px 0; background: var(--line2); }
.rv-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 16px calc(14px + env(safe-area-inset-bottom)); background: #07080b; display: flex; flex-direction: column; gap: 8px; }
.rv-hint { margin: 0; font-size: 12px; color: #aeb4bf; text-align: center; min-height: 16px; }
.rv-scrub { display: flex; align-items: center; gap: 10px; }
.rv-scrub input { flex: 1; height: 28px; accent-color: #ff3b30; }
.rv-t { width: 34px; font-size: 12px; color: #c4c9d2; text-align: center; }
.rv-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.rv-seg { justify-self: start; display: flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.rv-seg button { min-width: 36px; height: 32px; padding: 0 6px; border: 0; border-radius: 9px; background: none; color: #d8dce3; font-size: 13px; font-weight: 700; }
.rv-seg button[aria-pressed="true"] { background: #fff; color: #0b0d11; }
.rv-transport { display: flex; align-items: center; gap: 10px; }
.call-play { display: grid; place-items: center; width: 58px; height: 58px; border: 0; border-radius: 50%; background: #fff; color: #0b0d11; }
.call-play .ic { width: 26px; height: 26px; }
.rv-save { justify-self: end; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px 0 12px; border: 0; border-radius: 14px; background: #ff3b30; color: #fff; font-size: 15px; font-weight: 700; }
.rv-save .ic { width: 20px; height: 20px; }
.rv-save:disabled { opacity: .6; }
.trainee-row { display: flex; align-items: center; gap: 8px; }
.trainee-row .hist { flex: 1; min-width: 0; }
.call-btn svg, #btn-call-coach svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-notes { margin-top: 12px; }
.form-notes h3 { font-size: 15px; margin: 0 0 8px; }
.form-notes .fn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.form-notes figure { position: relative; margin: 0; }
.form-notes img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; display: block; background: var(--surface); }
.form-notes figcaption { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.form-notes .del { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #000a; color: #fff; }

/* sign in with Google, invites */
.sso { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 6px; }
.google-btn { width: 100%; max-width: 400px; min-height: 44px; display: flex; justify-content: center; }
.sso .error { margin: 0; text-align: center; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 4px 14px; color: var(--text-2); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.invite-note { margin: -6px 4px 20px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.pin-alt { margin-top: 22px; }
.pin-alt summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 15px; margin: 0 4px 12px; list-style: none; text-align: center; }
.pin-alt summary::-webkit-details-marker { display: none; }
.set-google { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-google .lbl { font-weight: 700; font-size: 14px; }
.set-google .hint { margin: 0; }
.set-google .btn { align-self: flex-start; }
.trainees-top { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.trainee-row .invite-btn { color: var(--accent); }
.btn.small { min-height: 36px; height: 36px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.legal { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 22px; }
.legal a { color: var(--text-2); }
/* PIN sign-in: a remembered account (pick, then PIN) or a typed name */
#pin-form .pin-name-row, #pin-form .pin-who-row { display: none; }
#pin-form:not([data-user]) .pin-name-row { display: block; }
#pin-form[data-user] .pin-who-row { display: inline; }
#pin-form[data-user] .pin-plain { display: none; }
#pin-form input#pin-name { width: 100%; }
.known-title { margin: 0 4px 10px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.linkish { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 15px; }
#pin-name { height: 54px; margin-bottom: 14px; padding: 0 16px; border: 2px solid transparent; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font-size: 17px; font-weight: 600; outline: none; box-sizing: border-box; }
#pin-name:focus, #pin:focus { border-color: var(--accent); }

/* ---------- sign in / sign up: plain white page, one centred column, black pill buttons ---------- */
body.anon { --bg: var(--surface); background: var(--surface); }
.auth { max-width: 380px; margin: 0 auto; padding: 28px 4px 40px; }
.auth h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; text-align: center; }
.auth-kicker { margin: 0 0 6px; text-align: center; color: var(--text-2); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.auth-sub { margin: 10px 0 28px; text-align: center; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.auth-link { border: 0; padding: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth .sso { margin: 0; align-items: stretch; }
.auth .google-btn { display: flex; justify-content: center; min-height: 44px; }
.auth-note { margin: 18px 6px 0; text-align: center; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.auth .or { margin: 24px 0 20px; }
.auth .error { text-align: center; }
.btn-dark { display: block; width: 100%; height: 48px; border: 0; border-radius: 999px; background: var(--text); color: var(--surface); font-size: 16px; font-weight: 600; cursor: pointer; transition: opacity .12s ease, transform .12s ease; }
.btn-dark:active { transform: scale(.985); opacity: .85; }
.auth #pin-form { margin-top: 0; }
.auth #pin-form label { margin: 0 2px 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.auth #pin-name, .auth #pin { display: block; width: 100%; height: 48px; margin: 0 0 16px; padding: 0 16px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: none; font-size: 16px; font-weight: 500; letter-spacing: normal; text-align: left; color: var(--text); outline: none; transition: border-color .12s ease, box-shadow .12s ease; }
.auth #pin-name:focus, .auth #pin:focus { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 10%, transparent); }
.auth #pin-error { margin: -6px 2px 10px; min-height: 0; text-align: left; }
.auth #pin-error:empty { display: none; }
.auth .who { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.auth .who button { flex-direction: row; gap: 12px; padding: 12px 14px; border: 0; border-radius: 0; box-shadow: none; background: var(--surface); text-align: left; }
.auth .who button + button { border-top: 1px solid var(--line); }
.auth .who button span { width: 36px; height: 36px; font-size: 15px; font-weight: 700; }
.auth .who button b { flex: 1; font-size: 16px; font-weight: 600; }
.auth .who button i { font-style: normal; font-size: 22px; color: var(--text-2); }
.auth .who button.on { background: var(--surface-2); }
.auth .who button.on span { background: var(--text); color: var(--surface); }
.auth .linkish { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.auth .pin-alt summary { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.auth-offer { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; text-align: left; }
.auth-offer b { display: block; font-size: 15px; }
.auth-offer p { margin: 6px 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.auth-terms { margin: 28px 10px 0; text-align: center; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.auth-terms a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-lang { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.auth-lang button { border: 0; background: none; padding: 6px 10px; border-radius: 999px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.auth-lang button.on { background: var(--surface-2); color: var(--text); }
#pin-form[data-user] #pin-name { display: none; }

/* ---------- my account, and the admin's list of accounts ---------- */
#set-account { margin-top: 14px; }
#set-account summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.acct-list { display: flex; flex-direction: column; margin: 8px 0 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acct-list > button, .acct-list > label { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; border: 0; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; }
.acct-list > * + * { border-top: 1px solid var(--line) !important; }
.acct-list > button:active { background: var(--surface-2); }
.acct-list > .danger { color: var(--bad); }
.acct-select select { max-width: 55%; height: 34px; border: 0; background: var(--surface-2); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 14px; color: var(--text); }
.acct-title { margin: 0 0 4px; font-size: 19px; }
#text-in { display: block; width: 100%; box-sizing: border-box; height: 48px; margin: 0 0 14px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 16px; outline: none; }
#text-in:focus { border-color: var(--text); }
#admin-sheet[open] { display: flex; flex-direction: column; }
.admin-sum { margin: 0 18px 6px; }
.admin-list { flex: 1; overflow-y: auto; padding: 0 12px calc(20px + env(safe-area-inset-bottom)); }
.admin-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; }
.admin-row.off { opacity: .55; }
.admin-row .avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-weight: 800; }
.admin-row .m { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-row b { font-size: 15px; }
.admin-row small { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { display: inline-block; margin-left: 4px; padding: 2px 7px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700; vertical-align: 2px; background: var(--surface-2); color: var(--text-2); }
.role.admin { background: var(--text); color: var(--surface); }
.role.coach { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.role.off { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.trainees-top { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.drop-btn { flex: none; align-self: center; }
.btn.small.danger { color: var(--bad); }

/* ---------- schedule: a session's time and place, the coach's week board, templates, a repeating week */
.slot-row { margin-top: 8px; }
.slot-row input[type=time], .slot-row select { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 10px; font-weight: 600; color: var(--text); }
.cw-tabs { margin: 0 0 14px; flex: none; }
.cw-nav { margin-bottom: 10px; }
.cw-strip { display: flex; gap: 2px; padding: 4px; }
.cw-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; border: 0; border-radius: 14px; background: none; color: var(--text); }
.cw-day small { font-size: 11px; font-weight: 600; color: var(--text-2); }
.cw-day b { font-size: 16px; font-variant-numeric: tabular-nums; }
.cw-day span { display: flex; gap: 2px; min-height: 5px; }
.cw-day.today { background: var(--text); color: var(--bg); }
.cw-day.today small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.cw-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c0); }
.cw-dot.done { background: var(--good); }
.cw-dot.miss { background: var(--bad); }
.cw-dot.now { background: var(--accent); }
.cw-att { margin: 10px 0 0; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, #f2a600 16%, var(--surface)); font-size: 14px; line-height: 1.5; }
.cw-att b { display: block; }
.cw-att .linkish { font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; }
.cw-sum { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.cw-list { padding: 0; overflow: hidden; }
.cw-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; }
.cw-row:first-child { border-top: 0; }
.cw-row:active { background: var(--surface-2); }
.cw-row .t { flex: none; width: 50px; display: flex; flex-direction: column; }
.cw-row .t b { font-size: 14px; font-variant-numeric: tabular-nums; }
.cw-row .t small { font-size: 11px; color: var(--text-2); }
.cw-row .bar { flex: none; width: 4px; height: 34px; border-radius: 2px; }
.cw-row .avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; }
.cw-row .m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cw-row .m b, .cw-row .m small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-row .m small { font-size: 12.5px; color: var(--text-2); }
.cw-chip { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.cw-chip.done { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: var(--good); }
.cw-chip.miss { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.cw-chip.now { background: var(--accent-soft); color: var(--accent-ink); }
.cw-fab { position: fixed; right: 18px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; background: var(--text); color: var(--bg); font-size: 16px; font-weight: 700; box-shadow: var(--float); }
.cw-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
#view-trainees:has(.cw-fab) { padding-bottom: 80px; }
.tpl-body { padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
.tpl-body .filter-label { margin: 16px 2px 8px; }
.tpl-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; border-radius: 16px; background: var(--surface-2); }
.tpl-row.on { background: var(--text); color: var(--bg); }
.tpl-row.on small { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.tpl-row .icon-btn { color: inherit; }
.tpl-pick { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 0; background: none; color: inherit; text-align: left; }
.tpl-pick small { font-size: 12.5px; color: var(--text-2); }
.tpl-when { flex-wrap: wrap; margin-bottom: 4px; }
.tpl-when input, .tpl-when select { height: 46px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 10px; font-weight: 600; color: var(--text); min-width: 0; }
.tpl-when input[type=date] { flex: 1.4; }
.tpl-when input[type=time], .tpl-when select { flex: 1; }
.tpl-when label { display: flex; flex-direction: column; flex: 1; min-width: 96px; }
.tpl-when label .filter-label { margin: 8px 2px 6px; }
.tpl-body .btn.primary { margin-top: 14px; }
.sched-days { padding: 0; overflow: hidden; }
.sched-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.sched-row:first-child { border-top: 0; }
.sched-row b { flex: none; width: 44px; }
.sched-row select, .sched-row input { height: 42px; border: 0; border-radius: 12px; background: var(--surface-2); padding: 0 8px; font-weight: 600; color: var(--text); min-width: 0; }
.sched-row select { flex: 1; }
.sched-row input { width: 104px; }
.assign .btn:not(.primary) { margin-top: 8px; }
.assess-entry { display: block; width: 100%; text-align: left; }

/* ---------- the intake assessment */
.as-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 0; }
.as-head small { font-size: 13px; color: var(--text-2); }
.as-goal { margin: 12px 2px 12px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.as-kcal { border-radius: var(--r-card); padding: 16px; background: #0f1218; color: #fff; }
.as-kcal small { font-size: 12.5px; color: #aab1bd; }
.as-kcal .big { font-size: 16px; font-weight: 700; color: #aab1bd; }
.as-kcal .big b { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.as-macro { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 12px; }
.as-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.as-macros span { display: flex; flex-direction: column; }
.as-macros b { font-size: 18px; }
.as-kcal p { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid #ffffff1f; font-size: 12.5px; color: #d5dae2; }
.as-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.as-tiles .card { padding: 12px; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.as-tiles small { font-size: 12px; color: var(--text-2); font-weight: 600; }
.as-tiles b { font-size: 22px; font-weight: 800; }
.as-band { font-style: normal; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.as-band.ok { background: color-mix(in srgb, var(--good) 16%, var(--surface)); color: var(--good); }
.as-band.warn { background: color-mix(in srgb, #f2a600 20%, var(--surface)); color: color-mix(in srgb, #f2a600 55%, var(--text)); }
.as-band.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.as-warn { margin: 10px 2px 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #f2a600 14%, var(--surface)); font-size: 13.5px; }
.as-card { margin-top: 10px; }
.as-card-h { display: flex; justify-content: space-between; align-items: baseline; }
.as-card-h small { font-size: 12px; color: var(--text-2); }
.as-road { display: block; width: 100%; height: auto; margin-top: 8px; }
.as-road .ax { stroke: var(--line); }
.as-road .ln { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.as-road .pt { fill: var(--accent); }
.as-road .end { fill: #ff3b30; }
.as-road .v { font-size: 10px; font-weight: 700; fill: var(--text); }
.as-road .w { font-size: 10px; fill: var(--text-2); }
.as-week { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.as-week small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.as-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.as-photos figure { margin: 0; }
.as-photos img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.as-photos figcaption { margin-top: 4px; font-size: 12px; font-weight: 700; text-align: center; }
.as-note { margin: 6px 0 0; white-space: pre-wrap; }
.as-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.as-item .d { --tone: var(--accent); }
.as-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.as-form input, .as-form select, .as-form textarea { width: 100%; min-width: 0; height: 46px; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: var(--surface-2); padding: 0 12px; font-weight: 600; color: var(--text); outline: none; }
.as-form textarea { height: auto; padding: 10px 12px; font-weight: 500; resize: vertical; font-family: inherit; }
.as-form input:focus, .as-form select:focus, .as-form textarea:focus { border-color: var(--accent); }
.as-form .seg { margin-bottom: 12px; }
.as-form .filter-label { margin: 6px 2px 8px; }
.as-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.as-grid.two { grid-template-columns: 1fr 1fr; }
.as-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.as-shot { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; padding: 0; border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); overflow: hidden; }
.as-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-shot svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.as-shot small { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 700; }
.as-save { margin-top: 16px; }

/* ---------- the camera with the body outline */
dialog.cam { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #0b0d10; color: #fff; }
dialog.cam::backdrop { background: #000; }
.cam-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); width: min(100vw, calc(100dvh * .62)); aspect-ratio: 3 / 4; overflow: hidden; background: #15181d; }
.cam-frame video, .cam-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame video.mirror { transform: scaleX(-1); }
.cam-ghost { opacity: .3; pointer-events: none; }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-guide .g { stroke: #30d158; stroke-width: 1.2; opacity: .8; vector-effect: non-scaling-stroke; }
.cam-guide .c { stroke: #fff; stroke-width: 1; stroke-dasharray: 3 6; opacity: .5; vector-effect: non-scaling-stroke; }
.cam-guide .o { fill: none; stroke: #fff; stroke-width: 2.4; stroke-dasharray: 7 6; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; }
.cam-labels span { position: absolute; left: 10px; transform: translateY(-120%); font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #30d158; }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 900; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.cam-count[hidden] { display: none; }
.cam-top { position: absolute; left: 0; right: 0; top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.cam-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #00000080; color: #fff; font-size: 18px; }
.cam-poses { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #00000099; margin: 0 auto; }
.cam-poses button { border: 0; padding: 7px 12px; border-radius: 999px; background: none; color: #c9ced6; font-size: 13px; font-weight: 600; }
.cam-poses button.on { background: #fff; color: #0f1218; font-weight: 700; }
.cam-level { position: absolute; left: 50%; top: calc(62px + env(safe-area-inset-top)); transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: #4a3300; color: #ffcc4d; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cam-level.ok { background: #0f3d1c; color: #30d158; }
.cam-tip { position: absolute; left: 0; right: 0; bottom: calc(176px + env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: 13px; font-weight: 600; text-shadow: 0 1px 6px #000; }
.cam-opts { position: absolute; left: 16px; right: 16px; bottom: calc(126px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.cam-opts button { flex: 1; height: 38px; border: 0; border-radius: 999px; background: #ffffff1f; color: #fff; font-size: 13px; font-weight: 600; }
.cam-opts button.on { background: #fff; color: #0f1218; }
.cam-opts button[hidden] { display: none; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.cam-thumbs { display: flex; gap: 6px; width: 132px; }
.cam-thumbs button { position: relative; width: 40px; height: 54px; padding: 0; border: 1.5px dashed #ffffff66; border-radius: 8px; background: #2b313b; overflow: hidden; color: #c9ced6; }
.cam-thumbs button.on { border: 2px solid #fff; }
.cam-thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-thumbs small { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 9px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.cam-shutter { width: 78px; height: 78px; padding: 0; border: 4px solid #fff; border-radius: 50%; background: none; display: grid; place-items: center; }
.cam-shutter i { width: 62px; height: 62px; border-radius: 50%; background: #fff; }
.cam-shutter:active i { transform: scale(.9); }
.cam-flip { width: 52px; height: 52px; margin-left: 80px; border: 0; border-radius: 50%; background: #ffffff1f; display: grid; place-items: center; color: #fff; }
.cam-flip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.cam-msg { position: absolute; left: 16px; right: 16px; top: 45%; margin: 0; padding: 10px 14px; border-radius: 14px; background: #000000b3; text-align: center; font-weight: 600; }

/* ---------- the PDF choices */
.pdf-list { margin-top: 6px; }
.pdf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pdf-row span { display: flex; flex-direction: column; padding: 8px 0; }
.pdf-row small { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.pdf-photos { padding: 10px 14px; background: var(--surface); }
.pdf-photos .chips { margin: 8px 0; }
.pdf-lang { margin-top: 14px; }
.pdf-lang .seg { flex: none; }
.pdf-msg { min-height: 18px; text-align: center; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 14px; background: var(--line); transition: background .15s ease; }
input.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease; }
input.switch:checked { background: #30a14e; }
input.switch:checked::after { transform: translateX(20px); }
.cw-att .linkish { display: block; text-align: left; margin-top: 2px; }
.as-head .brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.as-head .brand img { width: 26px; height: 26px; }
#tpl-sheet .sheet-head > b, #sched-sheet .sheet-head > b, #pdf-sheet .sheet-head > b { flex: 1; font-size: 18px; padding-left: 4px; }
.tpl-when label:first-child { flex: 1.6; }
.pdf-lang .seg button { white-space: nowrap; padding: 0 12px; }
.as-upload { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; text-align: center; }
.as-upload .linkish { font-size: 13px; font-weight: 600; color: var(--accent-ink); padding: 6px 0; cursor: pointer; }
.cam-opts { flex-wrap: wrap; }
.cam-crop { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cam-cropbar { display: none; position: absolute; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); }
.cam-cropbar p { margin: 0 0 10px; font-size: 13px; font-weight: 600; text-align: center; text-shadow: 0 1px 6px #000; }
.cam-cropbar .cam-zoom { width: 100%; margin: 0 0 12px; accent-color: #fff; }
.cam-cropbar .btn:not(.primary) { background: #ffffff26; color: #fff; }
dialog.cam.cropping .cam-cropbar { display: block; }
dialog.cam.cropping .cam-bottom, dialog.cam.cropping .cam-opts, dialog.cam.cropping .cam-tip, dialog.cam.cropping .cam-level, dialog.cam.cropping video { display: none; }
dialog.cam.cropping .cam-frame { touch-action: none; cursor: grab; }
.as-when { margin: -2px 0 6px; }
.as-when-hint { margin: 0 2px 12px; }
.cam-cropbar .row.two { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
/* client overview */
.cl-hero { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.cl-hero .avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 20px; flex: none; }
.cl-hero .m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-hero .m b { font-size: 20px; font-weight: 800; }
.cl-hero .m small { color: var(--muted); font-size: 12.5px; }
.cl-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cl-actions .btn { text-align: center; text-decoration: none; padding: 10px 4px; font-size: 13.5px; }
.cl-health { background: #fff4e5; border: 1px solid #f5c88a; border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; color: #7a4a00; }
.cl-health p { margin: 4px 0 0; white-space: pre-line; font-size: 14px; }
.cl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.cl-tile { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; margin: 0; }
.cl-tile small { color: var(--muted); font-size: 12px; }
.cl-tile b { font-size: 19px; font-weight: 800; }
.cl-tile.warn b { color: #c0560c; }
.cl-card { padding: 12px 14px; margin-bottom: 10px; }
.cl-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.cl-h small { color: var(--muted); font-size: 12px; text-align: right; }
.cl-big { font-size: 24px; font-weight: 800; }
.cl-big.warn { color: #c0560c; }
.cl-sub { color: var(--muted); font-size: 12.5px; display: block; }
.cl-bar { height: 8px; border-radius: 4px; background: var(--line, #e6e8ee); overflow: hidden; margin: 8px 0 2px; }
.cl-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.cl-spark { width: 100%; height: 64px; margin-top: 6px; display: block; }
.cl-spark .ln { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.cl-spark .pt { fill: var(--accent); }
.cl-spark .goal { stroke: #2e9e5b; stroke-dasharray: 4 4; stroke-width: 1.4; }
.cl-goal { margin: 2px 0 8px; font-weight: 600; }
.cl-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.cl-targets span { display: flex; flex-direction: column; }
.cl-targets b { font-size: 17px; font-weight: 800; }
.cl-targets small { color: var(--muted); font-size: 11.5px; }
.cl-list { padding: 4px 0; margin-bottom: 10px; }
.cl-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: inherit; text-decoration: none; }
.cl-row + .cl-row, .cl-lift + .cl-lift { border-top: 1px solid var(--line, #eef0f4); }
.cl-row .t { display: flex; flex-direction: column; width: 46px; }
.cl-row .t small, .cl-row .m small { color: var(--muted); font-size: 12px; }
.cl-row .bar { width: 4px; align-self: stretch; border-radius: 2px; }
.cl-row .m { display: flex; flex-direction: column; min-width: 0; }
.cl-list.missed .cl-row .t b { color: #c0560c; }
.cl-lift { display: grid; grid-template-columns: 1fr auto 52px; gap: 8px; align-items: baseline; padding: 8px 14px; }
.cl-lift span { color: var(--muted); font-size: 13px; }
.cl-lift span b { color: var(--ink, inherit); }
.cl-lift em { font-style: normal; font-weight: 700; text-align: right; font-size: 13px; color: var(--muted); }
.cl-lift em.up { color: #2e9e5b; } .cl-lift em.down { color: #c0560c; }
.cl-info { padding: 4px 14px; margin-bottom: 10px; }
.cl-info > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 8px 0; }
.cl-info > div + div { border-top: 1px solid var(--line, #eef0f4); }
.cl-info small { color: var(--muted); font-size: 12.5px; }
.cl-info span { white-space: pre-line; font-size: 14px; }
.cl-private { padding: 12px 14px; margin-bottom: 24px; background: #f6f3ff; }
.cl-private p { margin: 6px 0 0; white-space: pre-line; font-size: 14px; }
.cl-none { margin: 0 4px 10px; }
.pf-form textarea { width: 100%; resize: vertical; }
/* exercise picker: suggestions and naming guide */
#picker-list .pick-sub { padding: 10px 4px 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); list-style: none; }
#picker-list .pick-new { flex-direction: column; align-items: flex-start; gap: 2px; }
#picker-list .pick-new small { color: var(--muted); font-weight: 400; }
#picker-list .pick-guide { list-style: none; padding: 4px 4px 10px; font-size: 13.5px; }
#picker-list .pick-guide summary { cursor: pointer; color: var(--accent-ink, var(--accent)); font-weight: 600; padding: 6px 0; }
#picker-list .pick-guide ul { padding-left: 18px; margin: 6px 0; }
#picker-list .pick-guide li { margin: 4px 0; }
#picker-list .pick-guide p { margin: 6px 0; }
/* admin: exercise library */
#lib-sheet .lib-q { flex: 1; }
.lib-body { padding: 0 16px 24px; overflow-y: auto; }
.lib-group { padding: 2px 0; margin-bottom: 10px; }
.lib-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.lib-row + .lib-row { border-top: 1px solid var(--line, #eef0f4); }
.lib-row.from { background: #fff4e5; }
.lib-row .m { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.lib-row .m small { color: var(--muted); font-size: 12px; }
.lib-row .lib-aka { font-style: italic; }
.lib-row .linkish { font-size: 12.5px; padding: 2px 0; text-align: left; }
.lib-act { display: flex; gap: 6px; flex: none; }
.lib-picking { position: sticky; top: 0; z-index: 1; display: flex; gap: 8px; align-items: center; background: var(--accent); color: #fff; border-radius: 12px; padding: 10px 12px; margin: 6px 0 10px; font-weight: 600; font-size: 13.5px; }
.lib-picking span { flex: 1; }
.tabs.five a { font-size: 10.5px; padding: 0 2px; }
.tabs.five a span { white-space: nowrap; }
/* no rubber band inside sheets: a pull down at the top moves the sheet, not its text */
dialog.sheet, dialog.sheet * { overscroll-behavior-y: none; }
/* The page never pans sideways: iPhone's zoom on a focused field is off (viewport maximum-scale),
   and anything a few pixels too wide is clipped rather than making the page scroll. clip, unlike
   hidden, keeps position: sticky working. */
html, body { overflow-x: clip; max-width: 100%; }
/* "?" next to an estimate, and its explanation */
.help-q { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; margin-left: 3px; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; font: 700 11px/1 system-ui, sans-serif; vertical-align: 1px; cursor: pointer; opacity: .85; }
.help-q::after { content: ""; position: absolute; inset: -12px; } /* a finger-sized target */
.help-q { position: relative; }
.as-macros { position: relative; }
.as-macros > .help-q { position: absolute; right: 0; top: -2px; }
.help-body { padding: 4px 2px 6px; }
.help-body h3 { margin: 0 0 10px; font-size: 19px; }
.help-sec { margin-bottom: 12px; }
.help-sec b { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin-bottom: 4px; }
.help-sec p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.45; }
.help-sec.src ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
#help-sheet { max-height: 86dvh; overflow-y: auto; }
/* the measured-on day: quick picks and a chip that opens the calendar */
.as-when-label { font-size: 13px; color: var(--text-2); margin: 2px 2px 6px; }
.as-when-label b { color: var(--text); font-size: 15px; }
.as-when-other { position: relative; overflow: hidden; cursor: pointer; }
.as-when-other input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; }
.as-when-other input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.as-when .chip { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
.as-when-other span { pointer-events: none; }
/* Nothing in a form or a sheet may push it wider than the screen. A grid column of 1fr cannot shrink
   below its content, and iPhone gives date and time fields a width of their own: columns may shrink,
   those fields fill their box, and a sheet never scrolls sideways. */
.as-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.as-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.as-grid > *, .as-form label { min-width: 0; }
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; box-sizing: border-box;
}
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
dialog.sheet, dialog.sheet .tpl-body, dialog.sheet .lib-body { overflow-x: hidden; }
.top h1 .brand { max-width: 100%; }
.top h1 .brand .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* the assistant's answers on Home */
.quick-card.assist .asst-big { font-size: 20px; margin: 4px 0 6px; }
.quick-card.assist .asst-big small { font-size: 14px; color: var(--text-2); }
.quick-card.assist .as-done { font-weight: 700; color: var(--good, #1f9d55); margin: 4px 0; }
.asst-sess { padding: 8px 0; border-top: 1px solid var(--line); }
.asst-sess:first-of-type { border-top: 0; }
.asst-sess small { display: block; color: var(--text-2); }
.asst-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.asst-stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 6px 0 4px; font-size: 14.5px; }
.asst-stats dt { color: var(--text-2); }
.asst-stats dd { margin: 0; font-weight: 600; text-align: right; }
.asst-stats small { font-weight: 500; color: var(--text-2); }
.asst-stats small.up { color: var(--good, #1f9d55); }
.asst-stats small.down { color: var(--bad, #d93025); }
.asst-plan > div { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.asst-plan > div:first-child { border-top: 0; }
.asst-plan span { font-weight: 700; white-space: nowrap; }
.asst-plan small { grid-column: 1 / -1; color: var(--text-2); }
.asst-cands { display: grid; gap: 6px; margin: 6px 0; }
.asst-cand { display: flex; align-items: center; gap: 10px; text-align: left; height: auto; padding: 8px 10px; }
.asst-cand span { display: flex; flex-direction: column; min-width: 0; }
.asst-cand small { color: var(--text-2); font-weight: 500; white-space: normal; }
.asst-cands .btn.asst-cand { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 56px; }
.asst-cand > :first-child { flex: none; }
.asst-cand > span { flex: 1; }
.quick-card.assist .row a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
