/* Caballero — dark "grid" theme: black, white type, cyan/electric blue */
:root {
  --bg: #05080d;
  --card: #0b1118;
  --line: #16222e;          /* hairline borders */
  --ink: #eef7fb;
  --muted: #7e94a7;
  --brand: #00d9ff;          /* cyan */
  --brand2: #3b82f6;         /* electric blue */
  --orange: #ff8a3c;         /* contrast accent — warm counterpart to the cyan */
  --orange-bg: rgba(255, 138, 60, .13);
  --grad-warm: linear-gradient(135deg, #ffb25e 0%, #ff6a2b 100%);
  --grad: linear-gradient(135deg, #00d9ff 0%, #3b82f6 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,217,255,.10) 0%, rgba(59,130,246,.10) 100%);
  --soft: rgba(0, 217, 255, .09);
  --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .13);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .12);
  --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .13);
  --info: #7dd3fc; --info-bg: rgba(125, 211, 252, .13);
  --radius: 18px;
  --shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 4px 18px rgba(0, 0, 0, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.ic { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -.16em; flex-shrink: 0; }
html { font-size: 16px; }
body {
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overscroll-behavior-y: none;
}
/* brand typography: one family, clean hierarchy — weight for emphasis, italics for asides, underline for links */
b, strong { font-weight: 600; }
h1, h2 { font-weight: 600; letter-spacing: .01em; }
.tagline, .ex-note { font-style: italic; }
a, .linklike { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.btn, .pill, .chip, #drawer nav button { text-decoration: none; }

#app { max-width: 520px; margin: 0 auto; padding: 18px 16px 48px; }
.page > h1 { font-size: 1.5rem; margin-bottom: 4px; letter-spacing: -.3px; }
.page > .muted { margin-bottom: 14px; }
h2 { font-size: 1.12rem; margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: .84rem; line-height: 1.45; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: 10px; margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.eyebrow.light { color: rgba(238,247,251,.8); }

/* ---- brand / logo: Coach Caballero — thin wordmark in a skewed parallelogram frame ---- */
.brand {
  display: inline-flex; align-items: center; gap: .55em;
  color: var(--ink); line-height: 1;
}
.brand-frame { display: inline-block; }
.brand-inner { display: flex; flex-direction: column; align-items: center; gap: .45em; }
.wordmark {
  font-weight: 300; font-size: .92em;
  letter-spacing: .3em; margin-right: -.3em;
  white-space: nowrap; color: var(--ink);
}
.brand-sub {
  display: none;
  font-size: .34em; font-weight: 400; letter-spacing: .42em; margin-right: -.42em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.logo-xl { font-size: 1.55rem; display: inline-block; animation: logo-in .7s ease both; }
/* frame behind the wordmark, text overflowing its edges — reference-logo layout */
.logo-xl .brand-frame { position: relative; padding: 1.3em 0; }
.logo-xl .brand-frame::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 7%; right: 7%;
  border: 1.5px solid var(--ink); transform: skew(-14deg, -1deg);
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, .12));
}
.logo-xl .brand-inner { position: relative; }
/* text band knocks out the frame lines behind it, like the reference logo */
.logo-xl .wordmark, .logo-xl .brand-sub { background: var(--bg); padding: .12em .3em; }
.logo-xl .wordmark { font-weight: 200; letter-spacing: .34em; margin-right: -.34em; }
.logo-xl .brand-sub { display: block; }
@keyframes logo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.logo-sm { font-size: .95rem; }
.logo-sm .wordmark { font-weight: 400; letter-spacing: .22em; margin-right: -.22em; }
@media (prefers-reduced-motion: reduce) { .logo-xl { animation: none !important; } }

.home-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cond-tag { font-size: .68rem; font-weight: 700; background: var(--info-bg); color: var(--info); padding: 5px 11px; border-radius: 999px; }
.greet { font-size: 1.4rem; letter-spacing: -.3px; }

/* ---- avatar / profile picture ---- */
.greet-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; cursor: pointer; }
.ava-sm-wrap { flex-shrink: 0; }
.ava-sm { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; border: 1.5px solid var(--brand); background: #101a26; }
.ava-ph { display: flex; align-items: center; justify-content: center; background: var(--grad); color: #03121b; font-weight: 800; }
.avatar-card { display: flex; align-items: center; gap: 14px; }
.avatar-wrap { flex-shrink: 0; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--brand); background: #101a26; box-shadow: 0 0 16px rgba(0,217,255,.3); }
.avatar-ph { font-size: 1.6rem; box-shadow: 0 0 16px rgba(0,217,255,.3); }
.avatar-info { flex: 1; min-width: 0; }
.avatar-btns { margin-top: 8px; }
.tagline { color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* ---- cards ---- */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card.mini { text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.mini-emoji { font-size: 1.6rem; }
.tip-card { background: var(--grad); color: #03121b; border: none; }
.tip-card .eyebrow.light { color: rgba(3,18,27,.7); }
.tip-text { font-size: 1rem; line-height: 1.55; font-weight: 600; }
.next-card { cursor: pointer; border: 1px solid rgba(0,217,255,.25); }
.next-card .btn { margin-top: 10px; }
.warn-banner { background: var(--warn-bg); border: 1px solid rgba(251,191,36,.3); font-size: .9rem; line-height: 1.5; }
.warn-banner a { color: var(--warn); font-weight: 700; }
.bad-banner { background: var(--bad-bg); border: 1px solid rgba(248,113,113,.35); font-size: .9rem; line-height: 1.5; }
.bad-banner a { color: var(--bad); font-weight: 700; }
.premium-card { background: #070d14; border: 1px solid rgba(0,217,255,.35); box-shadow: 0 0 24px rgba(0,217,255,.08); color: var(--ink); }
.prem-list { list-style: none; margin-top: 8px; }
.prem-list li { padding: 5px 0; font-size: .9rem; }

/* ---- recovery score ring ---- */
.score-card { display: flex; align-items: center; gap: 16px; }
.ring {
  --p: 70;
  width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#00d9ff calc(var(--p) * 1%), #14202c 0);
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 8px rgba(0,217,255,.25));
}
.ring::before { content: ''; position: absolute; width: 58px; height: 58px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; font-weight: 800; font-size: 1.25rem; color: var(--brand); }
.score-info { display: flex; flex-direction: column; gap: 3px; }

/* ---- just for today checklist ---- */
.goal-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #101a26; cursor: pointer; }
.goal-row:last-of-type { border-bottom: none; }
.goal-row.done .goal-main b { text-decoration: line-through; opacity: .55; }
.goal-check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #24384c; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; color: #03121b; flex-shrink: 0; }
.goal-check.on { background: var(--grad); border-color: transparent; }
.goal-ico { font-size: 1.3rem; flex-shrink: 0; }
.goal-main { flex: 1; min-width: 0; }
.daily-win { margin-top: 10px; color: var(--brand); font-weight: 700; text-align: center; }

/* ---- pain widget ---- */
.pain-row { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; }
.range { flex: 1; accent-color: var(--brand); height: 6px; }
.pain-out { font-weight: 800; font-size: 1.3rem; color: var(--brand); min-width: 34px; text-align: center; }

/* ---- coach ---- */
.coach-card { border: 1px solid rgba(59,130,246,.35); background: linear-gradient(180deg, #0b1118, #0a1322); }
.coach-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--brand); }
.linklike { border: none; background: none; color: var(--brand); font-weight: 700; font-size: .85rem; cursor: pointer; margin-top: 8px; font-family: inherit; padding: 0; }

/* ---- inputs ---- */
.lbl { display: block; font-size: .84rem; font-weight: 600; margin: 13px 0 6px; }
.inp {
  width: 100%; padding: 12px 14px; border: 1px solid #1d2b3a; border-radius: 12px;
  font-size: 1rem; background: #080e15; color: var(--ink); font-family: inherit;
  color-scheme: dark;
}
.inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,217,255,.12); }
.chipgrid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #1d2b3a; border-radius: 999px; padding: 8px 14px;
  font-size: .87rem; background: #080e15; color: var(--ink); cursor: pointer; user-select: none;
  font-family: inherit;
}
.chip.wide { width: 100%; border-radius: 14px; margin-top: 12px; }
.chip:has(input:checked), .chip.chip-on { background: var(--soft); border-color: var(--brand); font-weight: 600; }
.chip input { accent-color: var(--brand); }

/* ---- buttons ---- */
.btn { border: none; border-radius: 13px; padding: 12px 18px; font-size: .95rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--grad); color: #03121b; box-shadow: 0 0 16px rgba(0,217,255,.25); }
.btn.primary:active { transform: scale(.97); }
.btn.ghost { background: transparent; border: 1px solid #24384c; color: var(--ink); }
.btn.danger { background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(248,113,113,.3); }
.btn.big { width: 100%; padding: 15px; font-size: 1.05rem; margin-top: 18px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.sm { padding: 8px 14px; font-size: .84rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 1px solid var(--line); background: #101a26; border-radius: 10px; width: 33px; height: 33px; font-size: .95rem; cursor: pointer; flex-shrink: 0; color: var(--ink); }
.pill { border: 1px solid #24384c; background: #080e15; border-radius: 999px; padding: 8px 15px; font-size: .87rem; cursor: pointer; font-family: inherit; color: var(--ink); }
.pill.active { background: var(--grad); border-color: transparent; color: #03121b; font-weight: 700; box-shadow: 0 0 12px rgba(0,217,255,.3); }
/* segmented control (workouts / community / progress tabs) */
.subpills {
  display: flex; gap: 4px; margin-bottom: 16px; padding: 4px;
  background: #080e15; border: 1px solid var(--line); border-radius: 14px;
}
.subpills .pill {
  flex: 1; border: none; background: transparent; box-shadow: none;
  border-radius: 10px; padding: 9px 6px; text-align: center;
  color: var(--muted); font-weight: 600; transition: color .18s, background .18s;
}
.subpills .pill.active { background: var(--grad); color: #03121b; box-shadow: 0 2px 10px rgba(0,217,255,.28); }
.subpills .pill:not(.active):active { background: var(--soft); }
/* horizontally scrollable filter chips (library) */
.filter-row {
  display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto;
  padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .pill { flex: 0 0 auto; }

/* ---- badges ---- */
.badge { font-size: .66rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }

/* ---- onboarding wizard ---- */
.hero { text-align: center; padding: 26px 8px 14px; }
.obbar { display: flex; gap: 6px; margin: 8px 2px 14px; }
.obbar span { flex: 1; height: 5px; border-radius: 99px; background: #14202c; }
.obbar span.on { background: var(--grad); box-shadow: 0 0 8px rgba(0,217,255,.4); }
.cond-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.cond {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  border: 1px solid #1d2b3a; border-radius: 14px; cursor: pointer; background: #080e15;
}
.cond input { display: none; }
.cond.sel { border-color: var(--brand); background: var(--soft); box-shadow: 0 0 12px rgba(0,217,255,.12); }
/* region-grouped condition picker */
.cond-groups { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.cond-region-d { border: 1px solid var(--line); border-radius: 14px; background: #080e15; overflow: hidden; }
.cond-region-d[open] { border-color: rgba(0,217,255,.28); }
.cond-region { display: flex; align-items: center; gap: 9px; padding: 13px 14px; cursor: pointer; font-weight: 700; list-style: none; user-select: none; }
.cond-region::-webkit-details-marker { display: none; }
.cond-region .rg-name { flex: 1; }
.cond-region .rg-count { font-size: .7rem; font-weight: 800; color: #03121b; background: var(--grad); padding: 2px 9px; border-radius: 999px; }
.cond-region .chev { color: var(--muted); font-size: .8rem; transition: transform .22s ease; }
.cond-region-d[open] .chev { transform: rotate(90deg); color: var(--brand); }
.cond-region-d .cond-list { padding: 0 12px 12px; }

/* ---- workouts ---- */
.card.day { transition: border-color .2s, box-shadow .2s; }
.card.day.open { border-color: rgba(0,217,255,.35); box-shadow: 0 0 0 1px rgba(0,217,255,.12), 0 6px 22px rgba(0,0,0,.5); }
.day-head { display: flex; align-items: center; cursor: pointer; gap: 12px; }
.day-idx {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem; color: var(--brand);
  background: var(--grad-soft); border: 1px solid rgba(0,217,255,.28);
}
.day-idx.ico { font-size: 1.05rem; }
.card.day.open .day-idx { background: var(--grad); color: #03121b; border-color: transparent; }
.day-title { flex: 1; min-width: 0; }
.day-title b { display: block; letter-spacing: -.2px; }
.day-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.day-count { font-size: .8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.chev { color: var(--muted); font-size: .8rem; transition: transform .22s ease; display: inline-block; }
.card.day.open .chev { transform: rotate(90deg); color: var(--brand); }
.day-prog { height: 4px; border-radius: 99px; background: #101a26; margin-top: 12px; overflow: hidden; }
.day-prog > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .35s ease; box-shadow: 0 0 8px rgba(0,217,255,.4); }
.day-body { margin-top: 6px; padding-top: 4px; }
.ex-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid #101a26; }
.ex-row:last-of-type { border-bottom: none; }
.ex-row.done .ex-main { opacity: .4; text-decoration: line-through; }
.ex-row.flagged { background: rgba(251,191,36,.05); border-radius: 12px; padding: 12px 8px; border-bottom-color: transparent; }
.ex-main { flex: 1; cursor: pointer; min-width: 0; }
.ex-main b { margin-right: 6px; }
.ex-spec {
  display: inline-block; margin-top: 6px; font-size: .8rem; color: var(--muted);
  background: #0a141e; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}
.ex-actions { display: flex; gap: 5px; }
.ex-actions .icon-btn { width: 31px; height: 31px; }
.checkwrap input {
  appearance: none; -webkit-appearance: none; width: 23px; height: 23px; margin-top: 2px;
  border-radius: 50%; border: 1.5px solid #24384c; background: #080e15; cursor: pointer;
  position: relative; flex-shrink: 0; transition: background .15s, border-color .15s;
}
.checkwrap input:checked { background: var(--grad); border-color: transparent; }
.checkwrap input:checked::after {
  content: '✓'; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #03121b; font-size: .72rem; font-weight: 900;
}
.day-actions { display: flex; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.day-actions .btn { flex: 1; }
.warn-note { color: var(--warn); font-size: .8rem; margin-top: 4px; font-weight: 600; }
.bad-note { color: var(--bad); font-size: .85rem; margin-top: 8px; font-weight: 600; }
.prog-hint { color: var(--ok); font-size: .8rem; margin-top: 4px; font-weight: 700; }
.plate-hint { color: var(--info); font-size: .78rem; margin-top: 4px; }
.sug-hint { color: var(--brand); font-size: .8rem; margin-top: 4px; font-weight: 700; }
.strength-card { border: 1px solid rgba(0,217,255,.22); }
.mn-card { border: 1px solid rgba(0,217,255,.3); background: #070d14; }
.mn-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid #101a26; }
.mn-block > b { display: flex; align-items: center; gap: 7px; }
.mn-block .checklist { margin-top: 8px; }
.st-row { padding: 10px 0; border-bottom: 1px solid #101a26; }
.st-row:last-of-type { border-bottom: none; }
.st-name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.st-inputs { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.st-inputs .inp { text-align: center; }
.st-w { max-width: 110px; }
.st-r { max-width: 90px; }
.st-x { color: var(--muted); font-weight: 700; }
.unit-toggle { display: flex; gap: 6px; flex-shrink: 0; }
.unit-toggle .pill { padding: 7px 16px; }
.style-tag { color: var(--brand); font-weight: 700; }
.ex-main s { opacity: .55; }

/* session log */
.sl-row { padding: 11px 0; border-bottom: 1px solid #101a26; }
.sl-row:last-of-type { border-bottom: none; }
.sl-name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sl-inputs { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sl-inputs .inp { text-align: center; }
.sl-w { max-width: 100px; }
.sl-r { max-width: 80px; }
.effort { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ex-card { cursor: pointer; transition: border-color .18s, transform .12s, box-shadow .18s; }
.ex-card:hover { border-color: rgba(0,217,255,.35); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.ex-card:active { transform: translateY(0); }
.ex-card .muted.small { margin-top: 3px; }
.avoid-card { border: 1px solid rgba(248,113,113,.3); }
.avoid-row { padding: 11px 0; border-bottom: 1px solid #101a26; }
.avoid-row:last-child { border-bottom: none; }
.avoid-row > b { text-decoration: line-through; text-decoration-color: rgba(248,113,113,.5); }
.swap-in { color: var(--ok); font-weight: 600; margin-top: 4px; }
.pick-row { display: flex; align-items: center; gap: 8px; }
.pick-row::before { content: '✓'; color: var(--ok); font-weight: 900; font-size: .85rem; }
.cat-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; color: var(--brand); margin: 14px 0 6px; }
.pick-row { padding: 12px 10px; border-radius: 12px; cursor: pointer; border-bottom: 1px solid #101a26; }
.pick-row:active, .pick-row:hover { background: var(--soft); }

/* ---- recovery ---- */
.step-row { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; }
.step-n {
  width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #03121b;
  display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; flex-shrink: 0; margin-top: 2px;
}
.checklist { list-style: none; }
.checklist li { padding: 6px 0 6px 24px; position: relative; font-size: .88rem; line-height: 1.45; }
.checklist li::before { content: '✓'; position: absolute; left: 2px; color: var(--brand); font-weight: 800; }
.breath-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; }
.breath-circle {
  width: 110px; height: 110px; border-radius: 50%; background: var(--grad);
  box-shadow: 0 0 34px rgba(0,217,255,.35);
  transition: transform var(--dur, 4s) ease-in-out;
}
.breath-circle.grow { transform: scale(1.25); }
.breath-circle.hold { transform: scale(1.25); }
.breath-circle.shrink { transform: scale(.75); }
.breath-label { display: flex; gap: 10px; align-items: baseline; }
.breath-label b { font-size: 1.2rem; }

/* ---- community ---- */
.story-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.story-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.story-id b { letter-spacing: -.2px; }
.story .result-line { margin-top: 8px; font-weight: 700; color: var(--brand); font-size: .9rem; }
.article-card { display: flex; align-items: center; gap: 12px; }
.art-main { flex: 1; min-width: 0; }
.art-main b { display: block; letter-spacing: -.2px; }
.article-p { margin: 10px 0; line-height: 1.6; font-size: .93rem; }

/* consistency summary (progress) */
.consistency-card { border: 1px solid rgba(0,217,255,.22); }

/* ---- nutrition ---- */
.macro-card { display: flex; justify-content: space-around; text-align: center; margin-top: 8px; padding: 10px 0 2px; }
.macro b { font-size: 1.12rem; display: block; color: var(--brand); }
.macro span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.slot-tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--brand); background: var(--soft); padding: 4px 10px; border-radius: 999px; }
.meal-card b { display: block; margin: 8px 0 2px; }
.meal-meta { display: flex; gap: 14px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.portion { color: var(--brand); font-weight: 700; }
.water-row { display: flex; gap: 6px; margin: 12px 0; justify-content: space-between; }
.wglass { font-size: 1.5rem; opacity: .22; cursor: pointer; transition: .15s; filter: grayscale(1); }
.wglass.full { opacity: 1; transform: scale(1.1); filter: none; }

/* ---- progress ---- */
.entry-row { display: flex; align-items: center; gap: 12px; }
.entry-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; flex-shrink: 0; background: #101a26; cursor: pointer; }
.entry-thumb.noimg { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.entry-main { flex: 1; min-width: 0; }
.bf-line { color: var(--brand); margin-top: 2px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; text-align: center; }
.compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; background: #101a26; }
.trend { width: 100%; height: auto; margin-top: 8px; }
.ai-box { background: var(--grad-soft); border: 1px solid rgba(0,217,255,.2); border-radius: 14px; padding: 14px; margin-top: 12px; font-size: .92rem; line-height: 1.55; }
.ai-box p { margin: 6px 0; }
.ai-box ul { margin: 4px 0 0 18px; }
.ai-box li { margin: 3px 0; }
.ai-head { font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--brand); }

/* ---- anatomy teaching figure (animated) ---- */
.anatomy { width: 138px; height: auto; display: block; margin: 8px auto 4px; }
.anat-off { fill: #16222e; stroke: #26384a; stroke-width: 1; }
.anat-on { fill: url(#anatgrad); stroke: #00d9ff; stroke-width: 1; filter: url(#anatglow); animation: anatpulse 2.4s ease-in-out infinite; }
.anat-bone { fill: #2c4055; }
.anat-bone-on { fill: #7dd3fc; filter: url(#anatglow); animation: anatpulse 2.4s ease-in-out infinite; }
@keyframes anatpulse { 0%, 100% { opacity: .68; } 50% { opacity: 1; } }
.anat-cap { text-align: center; }
.cue { margin-top: 14px; font-size: 1rem; line-height: 1.5; }
.miss { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.grow { flex: 1; }
@media (prefers-reduced-motion: reduce) { .anat-on, .anat-bone-on { animation: none !important; } }

/* ---- hypopressives ---- */
.hypo-card { border: 1px solid rgba(0,217,255,.22); }
.breath-circle.vacuum { transform: scale(.58); box-shadow: 0 0 30px rgba(0,217,255,.5); }
.breath-circle.rest { transform: scale(1); }
.hypo-steps { margin-top: 10px; }
.hypo-steps summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--brand); padding: 6px 0; list-style: none; }
.hypo-steps summary::-webkit-details-marker { display: none; }
.hypo-steps summary::before { content: '▸ '; }
.hypo-steps[open] summary::before { content: '▾ '; }

/* ---- detailed pain log ---- */
.pain-type { padding: 12px 0; border-bottom: 1px solid #101a26; }
.pain-type:last-of-type { border-bottom: none; }
.pt-head { font-weight: 600; margin-bottom: 2px; }
.dots { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.dot {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid #24384c;
  background: #080e15; color: var(--muted); font-weight: 700; cursor: pointer; font-family: inherit; font-size: .95rem;
}
.dot.fill { border-color: var(--brand); color: var(--ink); }
.dot.sel { background: var(--grad); color: #03121b; border-color: transparent; box-shadow: 0 0 10px rgba(0,217,255,.3); }
.dot.clear { width: auto; padding: 0 12px; }
.pain-lvl-label { margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--brand); }
.red-flag { background: var(--bad-bg); border: 1px solid rgba(248,113,113,.3); border-radius: 10px; padding: 10px 12px; font-size: .8rem; color: var(--bad); margin-top: 14px; line-height: 1.45; }
.pain-sum { margin-top: 12px; }
.pain-chip { display: inline-flex; gap: 4px; align-items: center; background: var(--soft); border: 1px solid rgba(0,217,255,.25); border-radius: 999px; padding: 3px 10px; margin: 3px 5px 0 0; font-size: .78rem; font-weight: 600; }
.pbreak-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.pbreak-name { width: 82px; font-size: .82rem; flex-shrink: 0; }
.pbreak-bar { flex: 1; height: 9px; border-radius: 5px; background: #101a26; overflow: hidden; }
.pbreak-bar > span { display: block; height: 100%; background: var(--grad); border-radius: 5px; }
.plog { padding: 9px 0; border-bottom: 1px solid #101a26; }
.plog:last-child { border-bottom: none; }

/* ---- smartwatch ---- */
.hr-panel { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 8px; }
#hr-live { display: flex; align-items: baseline; gap: 8px; min-height: 56px; }
.hr-bpm { font-size: 3rem; font-weight: 800; letter-spacing: -1px; line-height: 1; color: var(--brand); text-shadow: 0 0 18px rgba(0,217,255,.45); }
.hr-unit { color: var(--muted); font-weight: 600; }
.rec-info { color: var(--bad); font-weight: 700; font-size: .82rem; min-height: 1em; }
.hr-session { padding: 10px 0; border-bottom: 1px solid #101a26; }
.hr-session:last-child { border-bottom: none; }

/* ---- misc ---- */
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.knob { position: absolute; inset: 0; background: #1d2b3a; border-radius: 999px; transition: .2s; cursor: pointer; }
.knob::after { content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #dfeef5; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.switch input:checked + .knob { background: var(--brand); box-shadow: 0 0 10px rgba(0,217,255,.4); }
.switch input:checked + .knob::after { transform: translateX(22px); background: #03121b; }
.switch.sw-sm { width: 42px; height: 24px; }
.switch.sw-sm .knob::after { width: 18px; height: 18px; }
.switch.sw-sm input:checked + .knob::after { transform: translateX(18px); }

/* reminders */
.rem-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #101a26; }
.rem-row:last-of-type { border-bottom: none; }
.rem-row.off { opacity: .5; }
.rem-ico { font-size: 1.3rem; flex-shrink: 0; }
.rem-main { flex: 1; min-width: 0; }
.hist { margin-top: 8px; }
.hist-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #101a26; font-size: .9rem; }
.hist-row:last-child { border-bottom: none; }

/* ---- top bar + sidebar menu (logo-styled) ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px;
  background: rgba(5, 8, 13, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; z-index: 80;
}
.menu-btn { border: none; background: none; color: var(--ink); cursor: pointer; width: 34px; height: 34px; padding: 4px; flex-shrink: 0; }
.menu-btn svg { width: 100%; height: 100%; }
.topbar-brand { font-weight: 300; font-size: .88rem; letter-spacing: .28em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.has-topbar #app { padding-top: 76px; }

#drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 4, 8, .72); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 90; }
#drawer-backdrop.open { opacity: 1; pointer-events: auto; }
#drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: 284px; max-width: 82vw;
  background: #070d14; border-right: 1px solid var(--line); z-index: 100;
  transform: translateX(-102%); transition: transform .24s ease;
  display: flex; flex-direction: column;
  padding: calc(20px + env(safe-area-inset-top)) 0 calc(16px + env(safe-area-inset-bottom));
}
#drawer.open { transform: none; box-shadow: 24px 0 60px rgba(0, 0, 0, .55); }
.drawer-head { padding: 8px 24px 22px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.drawer-mark { font-weight: 200; font-size: 1.02rem; letter-spacing: .3em; color: var(--ink); white-space: nowrap; }
.drawer-sub { font-size: .56rem; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
#drawer nav { flex: 1; padding: 14px 0; overflow-y: auto; }
#drawer nav button {
  display: flex; align-items: center; gap: 16px; width: 100%;
  border: none; background: none; color: var(--muted); font-family: inherit;
  font-weight: 300; font-size: .86rem; letter-spacing: .3em; text-transform: uppercase;
  padding: 15px 24px; cursor: pointer; text-align: left; border-left: 2px solid transparent;
}
#drawer nav button .ico { display: inline-flex; font-size: 1.15rem; }
#drawer nav button.active { color: var(--brand); border-left-color: var(--brand); background: var(--soft); }
#drawer nav button:not(.active):hover { color: var(--ink); }
.drawer-foot { padding: 14px 24px 0; border-top: 1px solid var(--line); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.lang-toggle { display: flex; gap: 5px; flex-shrink: 0; }
.lang-toggle .pill { padding: 7px 12px; font-size: .8rem; }
.drawer-lang {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 24px; margin-top: 8px; border-top: 1px solid var(--line);
}
.drawer-lang-label {
  color: var(--muted); font-weight: 300; font-size: .86rem;
  letter-spacing: .3em; text-transform: uppercase;
}
/* language toggle on the sign-up screens (no menu there yet) */
.ob-lang { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.ob-lang .pill { padding: 6px 13px; font-size: .8rem; }

/* ---- modal ---- */
#modal { position: fixed; inset: 0; background: rgba(0, 4, 8, .72); display: none; align-items: flex-end; justify-content: center; z-index: 100; }
#modal.open { display: flex; }
#modal-content {
  position: relative;
  background: #080e15; width: 100%; max-width: 520px; max-height: 84vh; overflow-y: auto;
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  animation: slideup .22s ease;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 34px; height: 34px; padding: 6px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10, 16, 24, .9); color: var(--muted, #8aa0b6);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--ink); border-color: var(--cyan, #00d9ff); }
.modal-close svg { width: 100%; height: 100%; }
.btn.link { background: none; border: none; color: var(--cyan, #00d9ff); font-family: inherit; font-size: .82rem; cursor: pointer; padding: 8px 6px; text-decoration: underline; }
.btn.link:hover { color: var(--ink); }
.btn.link.wide { display: block; width: 100%; text-align: center; margin-top: 4px; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.auth-card { margin-top: 14px; }
/* athlete report */
.rep-head { display: flex; align-items: center; gap: 12px; }
.rep-ava { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem; color: #04222b; background: linear-gradient(135deg, var(--cyan, #00d9ff), var(--orange, #ff7a1a)); }
.rep-line { font-size: .9rem; margin: 9px 0; line-height: 1.4; }
.rep-tag { display: inline-block; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan, #00d9ff);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; margin-right: 7px; vertical-align: middle; }
.rep-line.warn .rep-tag { color: var(--orange, #ff7a1a); }
.tc-session { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin: 7px 0; background: #0b1220; }
.rep-ex { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 3px 0; border-top: 1px solid #0e1620; font-size: .82rem; }
.tc-session .rep-ex:first-of-type { border-top: none; }
.rep-load { color: var(--orange, #ff7a1a); font-weight: 600; white-space: nowrap; }
/* session metrics (RPE / RIR / velocity / HR / duration) */
.sl-metrics { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sl-m { display: flex; flex-direction: column; gap: 3px; flex: 1 1 84px; min-width: 84px; }
.sl-m .inp { padding: 7px 9px; width: 100%; }
.rec-scale { margin: 12px 0; }
.rec-scale .range { width: 100%; margin: 5px 0 2px; }
.recov-prompt { border-color: rgba(255,122,26,.35); }
.badge.b-tag { background: rgba(0,217,255,.12); color: var(--cyan); border: 1px solid rgba(0,217,255,.3); }

/* ---- athlete ID cards (tap to flip to report highlights) ---- */
.view-switch { display: inline-flex; gap: 6px; margin-left: auto; }
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; margin: 12px 0; }
.id-card { perspective: 1000px; height: 236px; cursor: pointer; }
.id-card.off { opacity: .5; }
.id-inner { position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.id-card.flipped .id-inner { transform: rotateY(180deg); }
.id-face, .id-back {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: #0b1220; overflow: hidden;
  display: flex; flex-direction: column; padding: 12px 11px;
}
.id-card:hover .id-face { border-color: rgba(0,217,255,.4); }
.id-strip { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad-warm, linear-gradient(90deg,#00d9ff,#ff7a1a)); }
.id-top { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.id-ava { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .8rem; color: #04222b; background: linear-gradient(135deg, var(--cyan,#00d9ff), var(--orange,#ff7a1a)); }
.id-id { min-width: 0; }
.id-name { font-size: .8rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.id-sub { font-size: .64rem; color: var(--orange); font-weight: 600; margin-top: 2px; }
.id-lbl { font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.id-week { margin-top: 10px; }
.id-week-n { font-size: .68rem; font-weight: 700; color: var(--cyan); }
.id-bar { height: 5px; border-radius: 99px; background: #16202c; overflow: hidden; margin-top: 3px; }
.id-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan,#00d9ff), var(--orange,#ff7a1a)); }
.id-total { margin-top: 9px; display: flex; align-items: baseline; gap: 5px; }
.id-total b { font-size: 1.15rem; color: var(--ink); line-height: 1; }
.id-total span { font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.id-comp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 9px; }
.id-comp-cell { border: 1px solid var(--line); border-radius: 7px; padding: 4px 2px; text-align: center; background: #0e1620; }
.id-comp-cell b { display: block; font-size: .74rem; line-height: 1.1; }
.id-comp-cell span { font-size: .53rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.id-comp-cell.c-good b { color: #4ade80; } .id-comp-cell.c-good { border-color: rgba(74,222,128,.3); }
.id-comp-cell.c-mid  b { color: var(--orange); } .id-comp-cell.c-mid { border-color: rgba(255,122,26,.3); }
.id-comp-cell.c-low  b { color: var(--bad,#f87171); } .id-comp-cell.c-low { border-color: rgba(248,113,113,.3); }
.id-comp-cell.c-none b { color: var(--muted); }
.id-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; padding-top: 6px; }
.id-badges .badge { font-size: .55rem; padding: 1px 5px; }
.id-back { transform: rotateY(180deg); text-align: left; }
.id-back-name { font-size: .76rem; color: var(--cyan); margin-bottom: 5px; display: block; }
.id-bullets { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.id-bullets li { font-size: .68rem; line-height: 1.35; color: #c9d6e2; padding: 2px 0 2px 11px; position: relative; }
.id-bullets li::before { content: '·'; position: absolute; left: 2px; color: var(--cyan); font-weight: 700; }
.hl-warn { color: var(--orange); } .hl-bad { color: var(--bad, #f87171); } .hl-ok { color: #4ade80; }
/* Cadence action rows */
.cd-action { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 11px; margin: 7px 0; background: #0b1220; }
.cd-btns { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; max-width: 160px; }
.cd-btns .btn { padding: 5px 9px; font-size: .7rem; }
.cd-stage { font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.code-block { background: #060b12; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .72rem; line-height: 1.55; color: #c9d6e2;
  white-space: pre; overflow-x: auto; margin: 8px 0; }
.id-actions { display: flex; gap: 5px; margin-top: 6px; }
.id-actions .btn { flex: 1; padding: 6px 4px; font-size: .68rem; }
@media (min-width: 900px) {
  body.coach-wide .id-grid { grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 14px; }
  body.coach-wide .id-card { height: 248px; }
}
.pick-row.picked { border-color: var(--cyan); background: rgba(0,217,255,.07); }
/* ---- training planner ---- */
.pl-brief { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #0b1220; margin: 10px 0; }
.pl-brief-t { display: block; font-size: .74rem; color: var(--cyan); margin-bottom: 5px; }
.pl-goal { color: var(--ink); margin-top: 4px; }
.pl-limit { color: var(--orange); margin-top: 4px; }
.pl-daytabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.pl-n { display: inline-block; margin-left: 5px; font-size: .62rem; opacity: .75; }
.pl-day { border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: #0a1119; }
.pl-item { border: 1px solid var(--line); border-radius: 10px; padding: 9px; margin: 8px 0; background: #0b1220; }
.pl-item-head { display: flex; align-items: center; gap: 5px; }
.pl-item-head b { font-size: .84rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pl-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; margin: 7px 0; }
.pl-fields label { display: flex; flex-direction: column; gap: 2px; }
.pl-fields span { font-size: .56rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pl-fields .inp { padding: 6px 7px; font-size: .8rem; }
.pl-sug { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: #0b1220; }
.pl-sug b { font-size: .82rem; }
.pl-avoid { opacity: .55; border-color: rgba(248,113,113,.3); }
.pl-picklist { max-height: 46vh; overflow-y: auto; margin: 8px 0; }
/* progress-report preview (what the athlete will receive) */
.rep-preview { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; background: #0b1220; max-height: 42vh; overflow-y: auto; }
.rep-title { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rep-intro { font-size: .88rem; line-height: 1.55; margin: 8px 0 12px; color: var(--ink); }
.rep-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; margin-bottom: 6px; }
.rep-stat { border: 1px solid var(--line); border-radius: 9px; padding: 7px 4px; text-align: center; background: #0e1620; }
.rep-stat b { display: block; color: var(--cyan); font-size: 1rem; line-height: 1.1; }
.rep-stat span { font-size: .55rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rep-sec { margin-top: 14px; }
.rep-sec-t { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.rep-list { list-style: none; margin: 5px 0 0; padding: 0; }
.rep-list li { font-size: .82rem; line-height: 1.45; color: #c9d6e2; padding: 2px 0 2px 12px; position: relative; }
.rep-list li::before { content: '·'; position: absolute; left: 3px; color: var(--cyan); font-weight: 700; }
.rep-close { font-size: .85rem; line-height: 1.55; margin-top: 14px; color: var(--ink); }
/* supersets / trisets: A1, A2 tags + a bracket down the linked block */
.set-tag { display: inline-block; min-width: 22px; font-size: .7rem; font-weight: 700; color: var(--cyan);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; margin-right: 6px; text-align: center; }
.ex-row.grouped { border-left: 2px solid var(--cyan); padding-left: 8px; margin-left: 2px; }
.ex-row.grouped.grp-first { border-top-left-radius: 8px; }
.ex-row.grouped.grp-last { border-bottom-left-radius: 8px; margin-bottom: 8px; }
.grp-label { font-size: .72rem; color: var(--cyan); font-weight: 600; margin: 2px 0 4px; }
.wc-block { border: 1px dashed var(--line); border-radius: 10px; padding: 9px 11px; margin: 8px 0; background: #0a1119; }
.wc-block b { display: block; font-size: .8rem; color: var(--orange); margin-bottom: 3px; }
.lib-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; background: #0b1220; }
.lib-row .inp { margin-top: 6px; }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: #0b1118; color: var(--ink); border: 1px solid rgba(0,217,255,.4);
  box-shadow: 0 0 18px rgba(0,217,255,.18);
  padding: 12px 20px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; opacity: 0; transition: .25s; z-index: 200;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

.disclaimer { font-size: .74rem; color: var(--muted); line-height: 1.5; margin-top: 16px; text-align: center; }

@media (min-width: 700px) {
  body { background: #010304; }
  #app { background: var(--bg); min-height: 100vh; box-shadow: 0 0 60px rgba(0, 217, 255, .05); }
}

/* ================= TrueCoach-inspired additions: calendar, habits, metrics, badges, timer ================= */

/* ---- floating timer button ---- */
.fab {
  position: fixed; right: 18px; bottom: 26px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad); color: #041018; border: none;
  font-size: 1.25rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 217, 255, .35); cursor: pointer;
}
.fab .ic { width: 1.35em; height: 1.35em; }
.fab:active { transform: scale(.94); }

/* ---- training calendar ---- */
.cal-nav { margin-bottom: 8px; }
.cal-nav .icon-btn { font-size: 1.2rem; width: 34px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dowrow { margin-bottom: 2px; }
.cal-dow { text-align: center; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink); font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cal-cell.out { opacity: .28; }
.cal-cell.sched { border-color: rgba(0, 217, 255, .45); }
.cal-cell.done { background: var(--ok-bg); color: var(--ok); border-color: rgba(74, 222, 128, .4); }
.cal-cell.missed { background: var(--bad-bg); color: var(--bad); }
.cal-cell.today { box-shadow: 0 0 0 2px var(--brand); }
.cal-legend { display: flex; gap: 14px; margin-top: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-done { background: var(--ok); }
.dot-sched { background: transparent; border: 1.5px solid var(--brand); }
.dot-missed { background: var(--bad); }

/* ---- custom metrics ---- */
.metric-block { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.metric-block .badge { margin-left: 6px; }

/* ---- milestone badges ---- */
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.badge-tile {
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
}
.badge-tile b { font-size: .74rem; }
.badge-tile .muted { font-size: .62rem; }
.badge-tile .badge-ico { font-size: 1.3rem; color: var(--brand); }
.badge-tile .badge-ico .ic { width: 1.25em; height: 1.25em; }
.badge-tile:not(.locked) { border-color: rgba(0, 217, 255, .4); background: var(--grad-soft); box-shadow: 0 0 12px rgba(0, 217, 255, .08); }
.badge-tile.locked { opacity: .38; filter: grayscale(.7); }

/* ---- timer ---- */
.tm-display {
  font-size: 3.2rem; font-weight: 800; text-align: center; letter-spacing: 1px;
  margin: 10px 0 2px; font-variant-numeric: tabular-nums; color: var(--brand);
}
.tm-display.tm-work { color: var(--ok); }
.tm-display.tm-rest { color: var(--brand); }
.tm-int { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.tm-custom { width: 74px; display: inline-block; padding: 8px 10px; }

/* ---- per-set session logging ---- */
.set-n {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: var(--soft); color: var(--brand); font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.sl-inputs { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sl-note { margin-top: 8px; font-size: .84rem; }

/* ---- exercise notes & past results ---- */
.ex-note { font-size: .78rem; color: var(--info); font-style: italic; margin-top: 3px; }
.past-res { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; display: grid; gap: 3px; }

/* ================= orange contrast accent ================= */
.tip-card { background: var(--grad-warm); color: #2b1000; }
.fab { background: var(--grad-warm); color: #2b1000; box-shadow: 0 6px 20px rgba(255, 122, 40, .35); }
.streak { color: var(--orange); font-weight: 700; }
.badge-tile:not(.locked) { border-color: rgba(255, 138, 60, .45); background: var(--orange-bg); box-shadow: 0 0 12px rgba(255, 138, 60, .1); }
.badge-tile:not(.locked) .badge-ico { color: var(--orange); }
.tm-display.tm-work { color: var(--orange); }
.eyebrow.warm { color: var(--orange); }
.b-orange { background: var(--orange-bg); color: var(--orange); }
.day-idx { color: var(--orange); background: var(--orange-bg); border-color: rgba(255, 138, 60, .35); }
.card.day.open .day-idx { background: var(--grad-warm); color: #2b1000; }

/* ================= coach area (Coach Caballero) ================= */
.coach-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--orange-bg); border: 1px solid rgba(255, 138, 60, .4);
  border-radius: 14px; padding: 10px 14px; margin-bottom: 14px;
  font-size: .88rem; line-height: 1.45; color: var(--ink);
}
.coach-banner .ic { color: var(--orange); }
.coach-btn { margin-left: auto; background: var(--grad-warm); color: #2b1000; }
.coach-btn + .coach-btn { margin-left: 0; background: transparent; border: 1px solid rgba(255, 138, 60, .5); color: var(--orange); }
.coach-owner-card { border: 1px solid rgba(255, 138, 60, .3); }
.coach-owner-card > .row .ic { color: var(--orange); }
.coach-head-lg { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.coach-head-lg .ic { width: 2em; height: 2em; color: var(--orange); }
.athlete-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #101a26; align-items: flex-start; }
.athlete-row:last-of-type { border-bottom: none; }
.ath-ava {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-warm); color: #2b1000; font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
}
.ath-main { flex: 1; min-width: 0; }
.stage-line { color: var(--orange); font-weight: 600; margin-top: 2px; }
.ath-alerts { margin-top: 5px; display: flex; gap: 5px; flex-wrap: wrap; }
.ath-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex-shrink: 0; }
.athlete-row.off { opacity: .45; }

/* laptop/desktop: wider dashboard, actions inline instead of stacked */
@media (min-width: 900px) {
  body.coach-wide #app { max-width: 1180px; margin: 0 auto; }
  body.coach-wide .athlete-row { align-items: center; gap: 16px; padding: 14px 0; }
  body.coach-wide .ath-actions { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 460px; }
  body.coach-wide .ath-actions .btn { white-space: nowrap; }
  body.coach-wide .ath-ava { width: 48px; height: 48px; }
}

/* ---- messaging ---- */
.msg-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding-right: 4px; }
.msg { max-width: 86%; align-self: flex-start; background: #101a26; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 9px 13px; }
.msg-mine { align-self: flex-end; background: var(--soft); border-color: rgba(0, 217, 255, .3); border-radius: 14px 14px 4px 14px; }
.msg-body { font-size: .92rem; line-height: 1.45; white-space: pre-wrap; }
.msg-ts { font-size: .66rem; color: var(--muted); margin-top: 3px; text-align: right; }

/* ================= brand logo asset + sign-up tutorial ================= */
.hero-logo { width: min(320px, 84%); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 0 16px rgba(255, 255, 255, .1)); }
.ob-stepline { text-align: center; margin: -4px 0 10px; }
.ob-hint {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--soft); border: 1px solid rgba(0, 217, 255, .25);
  border-radius: 12px; padding: 10px 12px; margin: 10px 0 2px;
  font-size: .82rem; line-height: 1.5; color: var(--ink);
}
.ob-hint .ic { color: var(--brand); margin-top: 2px; }
.ob-how { display: flex; flex-direction: column; gap: 13px; margin: 14px 0 6px; }
.ob-how-row { display: flex; gap: 12px; align-items: center; }
.ob-how-demo { flex: 0 0 96px; display: flex; justify-content: center; }
.ob-how-demo .chip { pointer-events: none; font-size: .72rem; padding: 6px 9px; }
.ob-how-ic { width: 1.7em; height: 1.7em; color: var(--orange); }
.healthy-chip { border-color: rgba(74, 222, 128, .45); background: var(--ok-bg); }
.healthy-chip .ic { color: var(--ok); }
.healthy-chip:has(input:checked) { border-color: var(--ok); }
.fullgym-chip { border-color: rgba(0, 217, 255, .4); background: var(--grad-soft); }
.fullgym-chip .ic { color: var(--brand); }
.equip-grp { display: flex; align-items: center; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--muted); margin: 13px 0 2px; }
.grp-all { border: none; background: none; color: var(--brand); font-family: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---- nutrition goals ---- */
.goalgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 12px; }
.goal-tile {
  border: 1px solid #1d2b3a; border-radius: 14px; background: #080e15; color: var(--ink);
  padding: 11px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: inherit; font-size: .8rem; cursor: pointer;
}
.goal-tile b { font-size: .78rem; }
.goal-tile-ico { font-size: 1.15rem; color: var(--muted); }
.goal-tile.on { border-color: var(--brand); background: var(--soft); box-shadow: 0 0 12px rgba(0, 217, 255, .15); }
.goal-tile.on .goal-tile-ico { color: var(--brand); }

/* ---- week programming view ---- */
.wk-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 6px; border-bottom: 1px solid #101a26; cursor: pointer; border-radius: 10px; }
.wk-row:last-of-type { border-bottom: none; }
.wk-row.today { background: var(--soft); box-shadow: inset 2px 0 0 var(--brand); }
.wk-date { width: 40px; flex-shrink: 0; text-align: center; display: flex; flex-direction: column; line-height: 1.25; }
.wk-main { flex: 1; min-width: 0; }
.wk-done { color: var(--ok); }
.wk-missed { color: var(--bad); }
.wk-acts { margin-top: 5px; }
.act-chip { cursor: pointer; user-select: none; }
.act-chip.act-done { opacity: .55; text-decoration: line-through; }

/* ---- in-workout set/rest timing ---- */
.set-timer-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.set-timer-row .chip { padding: 6px 12px; font-size: .8rem; }
.set-count { font-size: .78rem; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }

/* ---- 24-h recall rows ---- */
.recall-row { display: grid; grid-template-columns: 88px 1fr 76px auto; gap: 6px; margin-bottom: 7px; align-items: center; }
.recall-row .inp { padding: 9px 10px; font-size: .88rem; }

/* ---- coach suggestions ---- */
.suggest-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 12px; margin-bottom: 7px; border: 1px solid var(--line); }
.suggest-row.s-ok { border-color: rgba(74, 222, 128, .3); background: var(--ok-bg); }
.suggest-row.s-warn { border-color: rgba(251, 191, 36, .3); background: var(--warn-bg); }
.suggest-row.s-bad { border-color: rgba(248, 113, 113, .35); background: var(--bad-bg); }
.suggest-row .rem-ico { margin-top: 1px; }
.suggest-row.s-ok .rem-ico { color: var(--ok); }
.suggest-row.s-warn .rem-ico { color: var(--warn); }
.suggest-row.s-bad .rem-ico { color: var(--bad); }
