/* REDTRAX styles. Ported from the original prototype; colours now come from
   theme tokens set as CSS custom properties by js/theme.js. Status colours and
   the anatomy/cue pin colour are NOT themeable. */

@font-face { font-family: "Oswald"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/oswald-400.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/oswald-600.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/oswald-700.woff2") format("woff2"); }
/* Brand headings: Barlow Condensed bold italic (Paul's brand board, 20 Nov 2026).
   Only the italic cuts are bundled, declared as the family's normal style so
   every heading is italic without extra rules. */
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/barlowc-700i.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../vendor/fonts/barlowc-800i.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/spacemono-400.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/spacemono-700.woff2") format("woff2"); }

:root {
  /* Theme tokens (defaults = RedTrax brand board: Rep Red on black, graphite,
     steel and chalk; black text on red) */
  --bg: #0b0b0c; --surface: #1a1a1c; --surface2: #2b2b2f; --line: #3a3a3e;
  --text: #f4f4f2; --text-dim: #b4b4ba; --accent: #ff2d37; --accent-text: #0b0b0c;
  --radius: 2px; --font-head: "Barlow Condensed", "Oswald", system-ui, sans-serif; --font-body: "Inter", system-ui, sans-serif;
  --hero-overlay: 0.7;
  /* Fixed, non-brand colours */
  --danger: #ff8a80; --warn: #ffd166; --good: #8fd18a;
  --pin: #d6342b; --pin-text: #ffffff;
  --font-mono: "Space Mono", ui-monospace, monospace;
  /* Aliases used by the original coach-sketch SVGs */
  --brass: var(--accent); --rust: var(--pin); --chalk: var(--text); --panel-2: var(--surface2);
  color-scheme: dark;
}
:root[data-mode="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body);
  min-height: 100vh; padding-bottom: calc(40px + env(safe-area-inset-bottom)); line-height: 1.4;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 680px; margin: 0 auto; padding: 14px 16px 8px; }
.wrap.wide { max-width: 1080px; }

/* Header */
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; position: relative; flex-wrap: wrap; }
.app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(135deg, var(--accent) 0 10px, transparent 10px 20px); opacity: .9; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--radius); background: var(--surface); }
.plate { width: 26px; height: 26px; border-radius: 50%; border: 4px solid var(--accent); background: var(--surface); flex-shrink: 0; }
.brand .mark { width: 54px; height: auto; flex-shrink: 0; }
.brand h1 { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: .6px; text-transform: uppercase; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagline { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-tools select { width: auto; max-width: 210px; padding: 8px; font-size: 14px; }

.sync-chip { font-family: var(--font-mono); font-size: 11px; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-dim); cursor: pointer; min-height: 32px; }
.sync-chip[data-state="synced"] { color: var(--good); border-color: var(--good); }
.sync-chip[data-state="pending"], .sync-chip[data-state="syncing"] { color: var(--warn); border-color: var(--warn); }
.sync-chip[data-state="error"], .sync-chip[data-state="conflict"], .sync-chip[data-state="signin"] { color: var(--danger); border-color: var(--danger); }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; }
.tab { flex: 1 1 0; min-width: 0; text-align: center; padding: 10px 4px; min-height: 44px; background: var(--surface); border: 1px solid var(--line); color: var(--text-dim); font-family: var(--font-head); letter-spacing: .5px; text-transform: uppercase; font-size: 13px; cursor: pointer; border-radius: var(--radius); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { font-family: var(--font-head); text-transform: uppercase; font-size: 15px; letter-spacing: .8px; margin: 0 0 12px; color: var(--text); border-left: 4px solid var(--accent); padding-left: 8px; }
.card h3 { font-family: var(--font-head); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 8px; }
select, input, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 10px; border-radius: var(--radius); font-family: var(--font-body); font-size: 16px; min-height: 44px; }
textarea { min-height: 80px; resize: vertical; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); }
input[type="color"] { padding: 2px; width: 52px; height: 40px; min-height: 40px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--accent); }
label, .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); margin-bottom: 5px; font-family: var(--font-mono); }
.check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 14px; color: var(--text); }
.field { margin-bottom: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.err { color: var(--danger); font-size: 13px; margin: 6px 0; }
.err:empty { display: none; }
.hint, .muted { color: var(--text-dim); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; min-height: 44px; background: var(--accent); color: var(--accent-text); border: none; border-radius: var(--radius); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 8px 12px; font-size: 12px; min-height: 36px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.linkbtn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 6px; font: inherit; text-decoration: underline; min-height: 32px; }

/* Lists */
.entry { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.entry:last-child { border-bottom: none; }
.entry .date, .mono { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }
.badge-pr { color: var(--accent); font-weight: 700; font-size: 11px; margin-left: 6px; text-transform: uppercase; }
.state { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); white-space: nowrap; }
.state.synced { color: var(--good); border-color: var(--good); }
.state.pending { color: var(--warn); border-color: var(--warn); }
.state.conflict, .state.rejected { color: var(--danger); border-color: var(--danger); }
.empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 18px 0; font-style: italic; }
.note { font-size: 12px; color: var(--text-dim); line-height: 1.5; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 14px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: var(--surface2); border: 1px solid var(--accent); border-radius: var(--radius); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 7px 11px; font-size: 14px; border-radius: var(--radius); color: var(--text); }
button.chip { cursor: pointer; min-height: 36px; font-style: normal; }
.chip.say { font-style: italic; }

/* Stats & charts */
.statgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: center; }
.stat .v { font-family: var(--font-mono); font-size: 20px; color: var(--text); font-weight: 700; }
.stat .l { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.chartWrap { position: relative; height: 220px; margin-top: 8px; }

/* Cues (from prototype) */
.cues { list-style: none; margin: 0; padding: 0; }
.cues li { padding: 8px 0 8px 34px; position: relative; font-size: 14px; border-bottom: 1px dashed var(--line); }
.cues li:last-child { border-bottom: none; }
.cues li button { all: unset; cursor: pointer; display: block; width: 100%; }
.cues li button:focus-visible { outline: 3px solid var(--accent); }
.cues li .badge { position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--pin); color: var(--pin-text); font-family: var(--font-mono); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--text); }
.cues li.active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.diagramWrap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; position: relative; }
.diagramWrap svg { width: 100%; max-width: 300px; display: block; margin: 0 auto; height: auto; }
.diagramWrap .tag { position: absolute; top: 8px; left: 10px; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-transform: uppercase; }
.pin { cursor: pointer; }
.pin .halo { opacity: 0; pointer-events: none; transition: opacity .15s; }
.pin.active .halo { opacity: .4; }
.pin.active .dot { fill: var(--accent) !important; }
.sayTitle { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--text-dim); margin: 16px 0 8px; }

/* Plans (from prototype) */
.goalGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goalBtn { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 12px 10px; text-align: left; cursor: pointer; border-radius: var(--radius); display: flex; flex-direction: column; gap: 2px; font-family: var(--font-body); min-height: 44px; }
.goalBtn .gname { font-family: var(--font-head); text-transform: uppercase; font-size: 16px; font-weight: 600; }
.goalBtn .gsub { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.goalBtn[aria-pressed="true"] { border-color: var(--accent); background: var(--surface2); box-shadow: inset 4px 0 0 var(--accent); }
.dayPick { display: flex; gap: 6px; }
.dayBtn { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 10px 0; min-height: 44px; cursor: pointer; border-radius: var(--radius); font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.dayBtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.planMeta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin: -4px 0 12px; }
.planBlurb { font-size: 14px; margin: 0 0 12px; }
.ruleGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rule { background: var(--bg); border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--radius); }
.rule .rl { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: var(--text-dim); }
.rule .rv { font-size: 13px; margin-top: 3px; }
.rule.wide { grid-column: 1 / -1; }
.dayTitle { font-family: var(--font-head); text-transform: uppercase; font-size: 15px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dayTitle small { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.planItem { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; color: var(--text); font-family: inherit; text-align: left; }
.planItem:last-child { border-bottom: none; }
.planItem .sr { font-family: var(--font-mono); color: var(--text-dim); font-size: 13px; white-space: nowrap; }
button.planItem { cursor: pointer; min-height: 44px; }
button.planItem .nm::after { content: " \203A"; color: var(--accent); font-weight: 700; }

/* Photos */
.photoRow { display: flex; align-items: center; gap: 10px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); cursor: pointer; padding: 0; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
dialog.lightbox { border: none; background: rgba(0,0,0,.9); max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; padding: 20px; }
dialog.lightbox img { max-width: 100%; max-height: 80vh; display: block; margin: 0 auto; border: 2px solid var(--accent); }
dialog.lightbox .btn { max-width: 240px; margin: 12px auto 0; display: flex; }

/* Gym hero / welcome */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; background: var(--surface2); min-height: 150px; display: flex; align-items: flex-end; border: 1px solid var(--line); }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: 0; background: var(--bg); opacity: var(--hero-overlay); }
.hero .content { position: relative; padding: 16px; }
.hero h2 { font-family: var(--font-head); text-transform: uppercase; margin: 0 0 4px; font-size: 22px; color: var(--text); }
.hero p { margin: 0; color: var(--text); }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(92vw, 460px); }
.toast { background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 12px; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.35); display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; }
.toast.error { border-left-color: var(--danger); }

/* Admin portal */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line); }
.cand { border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; background: var(--bg); color: var(--text); text-align: left; width: 100%; font: inherit; margin-bottom: 8px; }
.cand[aria-pressed="true"] { border-color: var(--accent); }
.checks { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.checks li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.pass { color: var(--good); font-weight: 700; }
.fail { color: var(--danger); font-weight: 700; }
.color-row { display: grid; grid-template-columns: 1fr auto 110px; gap: 8px; align-items: center; margin-bottom: 6px; }
.color-row input[type="text"] { font-family: var(--font-mono); font-size: 14px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.asset { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; background: var(--bg); }
.asset img { width: 100%; height: 80px; object-fit: contain; display: block; }
.qr svg { width: 180px; height: 180px; background: #fff; padding: 6px; }
table.report { width: 100%; border-collapse: collapse; font-size: 14px; }
table.report th, table.report td { text-align: left; padding: 6px; border-bottom: 1px solid var(--line); }

/* Preview frame: tokens are applied to this element only */
.preview-frame { border: 3px dashed var(--warn); border-radius: 8px; padding: 10px; background: var(--bg); color: var(--text); font-family: var(--font-body); }
.preview-label { font-family: var(--font-mono); font-size: 11px; color: var(--warn); text-transform: uppercase; margin-bottom: 8px; }
.preview-frame .card h2 { color: var(--text); }
.sample-tag { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (max-width: 420px) { .tab { font-size: 11px; letter-spacing: 0; } .row3 { grid-template-columns: 1fr 1fr; } .stat .v { font-size: 16px; } .stat { padding: 8px 4px; } }

/* ===== Increment 2: app-like experience ===== */
:root { --body-base: color-mix(in srgb, var(--text) 10%, var(--surface)); --body-idle: color-mix(in srgb, var(--text) 22%, var(--surface)); --nav-h: 64px; }
.card { box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 8px 24px -16px rgba(0,0,0,.45); }
button, .btn, .chip, .tab { -webkit-tap-highlight-color: transparent; }
.btn { transition: transform .08s ease, filter .15s ease; }
.btn:active:not(:disabled) { transform: scale(.98); filter: brightness(.95); }

/* Bottom navigation */
body.has-nav { padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; gap: 0; padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); justify-content: center; overflow: visible; }
.bottom-nav .tab { flex: 1 1 0; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; border-radius: 12px; padding: 6px 2px; min-height: 52px; font-size: 10.5px; letter-spacing: .3px; color: var(--text-dim); font-weight: 600; }
.bottom-nav .tab[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border: none; }
.bottom-nav .tab svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .bottom-nav { left: 50%; right: auto; transform: translateX(-50%); bottom: 14px; width: 640px; border: 1px solid var(--line); border-radius: 18px; } }

/* Rest timer */
.rest-timer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 35; width: min(94vw, 480px); background: var(--surface2); border: 1px solid var(--accent); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.rest-timer[hidden] { display: none; }
.rt-bar { height: 4px; background: var(--line); }
.rt-fill { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.rt-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.rt-label { flex: 1; font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-time { font-family: var(--font-mono); font-size: 26px; font-weight: 700; min-width: 76px; text-align: center; color: var(--text); }
.rt-btn { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; min-height: 40px; min-width: 46px; font-weight: 700; cursor: pointer; }
.rt-skip { color: var(--accent); }
.rest-timer.done { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent); } }

/* Dashboard */
.dash-row { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.ring { position: relative; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text strong { font-family: var(--font-mono); font-size: 20px; }
.ring-text span { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.dash-stats { flex: 1; min-width: 0; }
.dash-big { font-family: var(--font-head); font-size: 34px; font-weight: 700; line-height: 1; }
.dash-big span { font-size: 15px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.level { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; font-size: 13px; }
.level-n { background: var(--accent); color: var(--accent-text); font-weight: 700; border-radius: 999px; padding: 2px 9px; font-family: var(--font-mono); }
.xpbar { flex: 1 1 90px; height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; display: inline-block; min-width: 80px; }
.xpbar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.xpbar.wide { flex-basis: 100%; margin-top: 6px; }

/* Calendar */
.cal { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.cal-d { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface2); }
.cal-d.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface2)); }
.cal-d.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface2)); }
.cal-d.l3 { background: color-mix(in srgb, var(--accent) 80%, var(--surface2)); }
.cal-d.l4 { background: var(--accent); }
.cal-d.future { opacity: .3; }
.cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.cal-legend .cal-d { width: 12px; }

/* Body map */
.bodymap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 360px; margin: 0 auto; }
.bodyfig { width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; font-size: 12px; color: var(--text-dim); margin: 8px 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.readiness-list { list-style: none; padding: 0; margin: 6px 0; }
.readiness-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }

/* Achievements */
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.trophy { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); opacity: .75; font-size: 13px; }
.trophy.earned { opacity: 1; border-color: var(--accent); }
.medal { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface2); color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.trophy.earned .medal, .medal.big { background: var(--accent); color: var(--accent-text); font-size: 18px; }
.medal.big { width: 52px; height: 52px; font-size: 26px; }

/* Challenges */
.challenge { padding: 12px 0; border-bottom: 1px solid var(--line); }
.challenge:last-child { border-bottom: none; }
.challenge-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.challenge-me { margin: 8px 0; font-weight: 600; }
.board { list-style: none; padding: 0; margin: 8px 0; }
.board li { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.board li:nth-child(odd) { background: var(--bg); }
.board li.me { outline: 2px solid var(--accent); }
details.join summary { display: inline-flex; width: auto; list-style: none; }
details.join summary::-webkit-details-marker { display: none; }

/* Coaching panel */
.coach { margin: 6px 0 12px; }
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); margin-bottom: 8px; }
.suggest-v { display: block; font-family: var(--font-mono); font-size: 20px; margin: 2px 0; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rest-select { width: auto; min-height: 36px; padding: 6px 8px; font-size: 13px; }
.tool-out { margin-top: 8px; }
.plates { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 0; }
.plate { display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff; width: 28px; }
.plate.p25 { height: 64px; background: #c62828; } .plate.p20 { height: 60px; background: #1565c0; } .plate.p15 { height: 54px; background: #c79100; color: #111; }
.plate.p10 { height: 46px; background: #2e7d32; } .plate.p5 { height: 38px; background: #eeeeee; color: #111; } .plate.p2_5 { height: 32px; background: #424242; } .plate.p1_25 { height: 28px; background: #9e9e9e; color: #111; }
.chips.recent { margin-bottom: 12px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.chips.recent .chip { white-space: nowrap; }
button.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* Workout summary */
.summary-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.share-preview canvas { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto 12px; border-radius: 12px; border: 1px solid var(--line); }
.banner.levelup { justify-content: center; text-align: center; }

/* Toasts sit at the top so they never cover the nav or rest timer */
.toasts { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
.hero.noimg { min-height: 120px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 38%, var(--surface)) 0%, var(--surface) 70%); }
.hero.noimg .shade { display: none; }
.cal { max-width: 520px; }
.plate.p1_25, .plate.p2_5 { font-size: 8px; letter-spacing: -.3px; }

/* ---------- Increment 3: activity, cardio, today builder, overview, cues ---------- */
@media (max-width: 400px) { .bottom-nav .tab { font-size: 9px; letter-spacing: 0; padding: 6px 0; } .bottom-nav .tab svg { width: 20px; height: 20px; } }
.seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.seg-btn { flex: 1 1 0; min-height: 42px; background: var(--surface); color: var(--text-dim); border: none; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; font-size: 14px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.big-num { font-family: var(--font-mono); font-size: 44px; font-weight: 700; line-height: 1.05; color: var(--text); }
.big-num.small { font-size: 26px; }
.goalbar { height: 12px; margin: 10px 0 6px; }
.goalbar.hit > span { background: var(--good); }
.goal-badge { display: inline-block; margin: 6px 0 4px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); font-weight: 700; font-size: 13px; }
.statgrid.two { grid-template-columns: 1fr 1fr; margin: 12px 0 6px; }
.statgrid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .statgrid.four { grid-template-columns: 1fr 1fr; } }
.barchart { display: block; margin-top: 8px; }
.barchart .bar { fill: color-mix(in srgb, var(--text-dim) 55%, transparent); }
.barchart .bar.today { fill: var(--accent); }
.barchart .bar.met { fill: var(--good); }
.barchart .bar.future { opacity: .25; }
.barchart .goal-line { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 4 4; }
.barchart .bar-note { font: 10px var(--font-mono); fill: var(--text-dim); }
.barchart .bar-day { font: 11px var(--font-mono); fill: var(--text-dim); }
.barchart .bar-day.today { fill: var(--text); font-weight: 700; }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form input { flex: 1 1 auto; min-width: 0; }
.inline-form .btn { width: auto; margin: 0; white-space: nowrap; }
form[data-keep] + form[data-keep] { margin-top: 12px; }
.sensor-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sensor-row .btn { width: auto; margin: 0; }
.hint.err, .err:not(:empty) { color: var(--danger); }
details.estimate { margin: 6px 0 10px; }
details.estimate summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; text-align: center; cursor: pointer; color: var(--text); font: inherit; }
.strip-item strong { display: block; font-family: var(--font-mono); font-size: 20px; }
.strip-item span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; }
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px dashed var(--line); }
.tag-added { margin-left: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 6px; vertical-align: middle; }
.trim-note { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: 13px; }
.ov-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 6px; background: none; border: none; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
.ov-row.active { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ov-name { display: flex; flex-direction: column; min-width: 0; }
.ov-name .muted { font-size: 12px; }
.ov-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ov-nums { display: flex; flex-direction: column; align-items: flex-end; }
.delta { font-size: 11px; font-family: var(--font-mono); }
.delta.up { color: var(--good); } .delta.down { color: var(--danger); } .delta.same { color: var(--text-dim); }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mglow { fill: var(--accent); opacity: .5; pointer-events: none; animation: mpulse 1.8s ease-in-out infinite; }
@keyframes mpulse { 0%, 100% { opacity: .25; } 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .mglow { animation: none; opacity: .45; } }
.muscleLine { margin-top: 6px; font-size: 13px; text-align: center; color: var(--text); }
.muscleLine span { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); margin-right: 8px; }
.bubble { position: relative; margin-top: 14px; background: var(--text); color: var(--bg); padding: 10px 12px; border-radius: 2px 14px 14px 14px; font-size: 14px; line-height: 1.45; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.bubble::before { content: ""; position: absolute; top: -8px; left: 18px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--text); }
.bubble .who { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; opacity: .75; }
.bubble .txt { font-weight: 600; }
.bubble .nextCue { align-self: flex-end; background: var(--bg); color: var(--text); border: none; padding: 8px 12px; min-height: 36px; border-radius: var(--radius); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .6px; font-size: 12px; cursor: pointer; }

/* ---------- Increment 4: moving coach avatar ---------- */
.avatarWrap { padding-top: 28px; }
.avatar-stage { width: 100%; max-width: 340px; margin: 0 auto; cursor: pointer; }
.avatar-stage svg { width: 100%; height: auto; display: block; }
.avatar-stage .apin { cursor: pointer; }
.aglow { animation: apulse 1.8s ease-in-out infinite; }
.aglow.still { animation: none; }
@keyframes apulse { 0%, 100% { opacity: .25; } 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .aglow { animation: none; } }
.avatar-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.avatar-controls .phase { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.avatar-controls .btn { width: auto; margin: 0; }
.avatar-controls .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.small-seg .seg-btn { min-height: 36px; font-size: 12px; }
.avatar-look { margin-top: 10px; }
.avatar-look summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* ---------- Increment 5: tiers, food, body weight ---------- */
@media (min-width: 900px) { .bottom-nav { width: 700px; } }
@media (max-width: 400px) { .bottom-nav .tab { font-size: 8.5px; } }
.card.locked { border-style: dashed; }
.lock-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; font-size: 12px; color: var(--accent); margin-bottom: 4px; }
.lock-tag svg { width: 16px; height: 16px; }
.locked-line { color: var(--text-dim); }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.day-nav h2 { margin: 0; }
.day-nav .linkbtn { font-size: 26px; line-height: 1; padding: 4px 12px; min-height: 44px; min-width: 44px; }
.day-nav .linkbtn:disabled { opacity: .3; cursor: default; }
.net-sum { font-size: 15px; margin-bottom: 4px; }
.net-sum strong { font-size: 20px; color: var(--accent); }
.macro { margin-bottom: 10px; }
.macro-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.macro-bar { display: block; width: 100%; height: 10px; }
.macro-bar.over > span { background: #f5a524; }
.food-results { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 12px; max-height: 260px; overflow-y: auto; }
.food-opt { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 10px 12px; min-height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.food-opt.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.food-opt .muted { white-space: nowrap; }
details.quick, details.calc, details.entries { margin: 6px 0 12px; }
details.quick summary, details.calc summary, details.entries summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; min-height: 36px; }
.meal-group + .meal-group { margin-top: 10px; }
.meal-head { display: flex; justify-content: space-between; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; font-size: 13px; color: var(--text-dim); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 2px; }
.barchart .bar.eaten { fill: var(--accent); }
.barchart .bar.burnt { fill: #3fb950; }
.legend .key { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-size: 13px; color: var(--text-dim); }
.legend .key::before { content: ""; width: 12px; height: 12px; border-radius: 2px; background: var(--accent); }
.legend .key.burnt::before { background: #3fb950; }
.legend .key.target::before { height: 0; border-top: 2px dashed var(--text-dim); background: none; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.btnrow .btn { flex: 1 1 140px; }
.hint.warn { color: #f5a524; }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.plan-days { margin: 12px 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.plan-days .chip { white-space: nowrap; cursor: pointer; }
.plan-meal .label { display: inline-block; font-family: var(--font-head); text-transform: uppercase; font-size: 11px; letter-spacing: .5px; color: var(--accent); margin-right: 4px; }
.shop-group { margin-top: 12px; }
.shop-item.done > .check > span { text-decoration: line-through; opacity: .6; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; flex: 1; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.tier-now { margin: 0 0 12px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
@media (max-width: 640px) { .tiers { grid-template-columns: 1fr; } }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.tier.current { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.tier-name { font-family: var(--font-head); font-size: 22px; text-transform: uppercase; letter-spacing: .5px; }
.tier-line { color: var(--accent); font-weight: 700; }
.tier p { margin: 0; font-size: 13px; }
.tier-inc { color: var(--text-dim); margin-top: 6px !important; }
.tier ul { margin: 6px 0 8px; padding-left: 18px; font-size: 13px; flex: 1; }
.tier li { margin-bottom: 3px; }
.tier li.soon { color: var(--text-dim); }
.soon-tag { display: inline-block; margin-left: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; }
.tier-badge { font-family: var(--font-head); text-transform: uppercase; font-size: 12px; color: var(--accent); }
.focus-list { margin: 6px 0; padding-left: 18px; }
.focus-list li { margin-bottom: 4px; }
.subcard { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.subcard h3 { margin: 0 0 8px; font-size: 15px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; }
.linechart { margin: 4px 0 10px; }
.linechart .trend { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.linechart .pt { fill: var(--accent); }
.linechart .bar-day { fill: var(--text-dim); font-size: 10px; }
.day-nav .linkbtn { text-decoration: none; }

/* ---------- Increment 6: training styles, programmes, workout timer ---------- */
.styleGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 700px) { .styleGrid { grid-template-columns: repeat(4, 1fr); } }
.card.programme.following { border-color: var(--accent); }
.prog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.prog-head h2 { margin-bottom: 2px; }
.tier-pill { font-family: var(--font-head); text-transform: uppercase; font-size: 12px; letter-spacing: .5px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.prog-session { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.prog-session.next .dayTitle { color: var(--accent); }
.prog-session .btn { margin-top: 8px; }
.eyebrow-sm { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: var(--accent); margin: 0 0 4px; }
.wt { text-align: center; }
.wt .btnrow { justify-content: center; }
.wt-time { font-family: var(--font-mono); font-size: 64px; font-weight: 700; line-height: 1.1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.wt-label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; font-size: 16px; min-height: 22px; }
.wt[data-phase="work"] .wt-time { color: var(--accent); }
.wt[data-phase="rest"] .wt-time { color: #3fb950; }
.wt[data-phase="done"] .wt-time { color: var(--text-dim); }
.wt .xpbar.wide { display: block; width: 100%; height: 8px; margin-bottom: 6px; }
.wt-result { text-align: left; margin-top: 10px; display: flex; gap: 8px; align-items: flex-end; }
.wt-result .field { flex: 1; margin: 0; }
.wt h2, .wt > p { text-align: left; }

/* ---------- Increment 7: RedTrax wordmark (Paul's brand board) ---------- */
.brand .mark-svg { width: 52px; height: 32px; flex: none; }
.brand h1.wordmark { font-family: var(--font-head); font-weight: 800; font-size: 30px; letter-spacing: .5px; line-height: 1; }
.brand h1.wordmark .red { color: #ff2d37; }
.brand h1.wordmark sup { font-family: var(--font-body); font-size: 11px; font-weight: 600; vertical-align: top; margin-left: 1px; }

/* ---------- Increment 7: Paul's features ---------- */
.plan-progress { margin-bottom: 8px; }
.pp-num strong { font-family: var(--font-head); font-size: 34px; }
.plan-progress .xpbar.wide { display: block; width: 100%; height: 8px; margin-top: 4px; }
.chip.done { border-color: #3fb950; color: #8fd18a; }
.rep-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); margin-left: 4px; white-space: nowrap; }
.rep-tag.in { border-color: #3fb950; color: #8fd18a; }
.rep-tag.below { border-color: #f5a524; color: #ffd166; }
.rep-tag.above { border-color: #58a6ff; color: #9ecbff; }
.delta.up { color: #8fd18a; } .delta.down { color: #ff8a80; }
.row2.tight { gap: 8px; align-items: center; }
.inline-form label { display: block; font-size: 12px; color: var(--text-dim); margin: 6px 0 4px; }
.bubble-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.voiceCue { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 6px 10px; min-height: 36px; cursor: pointer; font: inherit; font-size: 13px; }
.voiceCue[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.demo-link { margin: 10px 0 0; }
.demo-link a { color: var(--accent); font-weight: 600; }
.recipe-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.recipe-links a { flex: 0 0 auto; text-align: center; padding: 6px 10px; background: var(--surface2); color: var(--text); text-decoration: none; font-size: 13px; border-radius: var(--radius); min-height: 36px; }
.import-card summary { cursor: pointer; list-style: none; }
.import-card summary::-webkit-details-marker { display: none; }
.import-card textarea { width: 100%; min-height: 110px; background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 8px; font: inherit; border-radius: var(--radius); }
.burn-row { display: flex; gap: 8px; align-items: stretch; }
.burn-row input { flex: 1; min-width: 0; }
.burn-row .btn { flex: 0 0 auto; width: auto; }
.inbody-import { margin-top: 12px; }
.inbody-import label.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.scan-row { margin-bottom: 12px; }
.scan-row label.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; width: 100%; }
.iv-section { margin: 14px 0; padding: 12px; border: 1px solid var(--line, #3a3a3e); border-radius: 8px; }
.iv-section summary { cursor: pointer; font-weight: 600; }
.iv-section[open] summary { margin-bottom: 8px; }
input.derived { opacity: 0.75; border-style: dashed; }
.sync-banner { margin: 8px 12px; padding: 10px 12px; border: 1px solid #ffb020; border-radius: 8px; background: rgba(255, 176, 32, 0.12); color: var(--chalk, #f4f4f2); font-size: 0.95rem; }
.pack-chosen { border: 1px solid var(--line, #3a3a3e); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
#barcodeScanBtn { cursor: pointer; }
/* Increment 10: gym tab, board, trainer pages */
.post { border-top: 1px solid var(--line, #3a3a3e); padding: 10px 0; }
.post.reply { border-top: none; margin-left: 16px; padding: 6px 0 6px 10px; border-left: 2px solid var(--line, #3a3a3e); }
.post-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.post-body { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.badge { font-size: 0.7rem; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line, #3a3a3e); text-transform: uppercase; letter-spacing: 0.04em; }
.badge-staff { border-color: var(--accent, #ff2d37); color: var(--accent, #ff2d37); }
.badge-pt { border-color: #ffb020; color: #ffb020; }
.reply-input { width: 100%; margin-top: 4px; }
#board textarea, #gymSignup textarea, #ptProfile textarea { width: 100%; }
label.check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.ok { color: #3ecf8e; }
.bottom-nav { overflow-x: auto; }
