/* Quest for Fitness: neutral, professional UI with light and dark themes.
   Windows and text stay white / black / gray; color is reserved for
   highlights: status chips, skill colors, coins, progress, actions. */

:root {
  --bg: #f5f5f6;
  --bg2: #f0f0f2;          /* insets, wells */
  --panel: #ffffff;        /* cards / windows */
  --panel2: #fafafa;
  --line: #e4e4e7;         /* borders */
  --line-strong: #d4d4d8;
  --ink: #18181b;          /* primary text */
  --muted: #71717a;        /* secondary text */
  --faint: #a1a1aa;
  --hover: #f4f4f5;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

  /* Highlight colors */
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --gold: #b7791f;
  --gold-bg: #fdf6e3;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --amber: #ca8a04;
  --amber-bg: #fefce8;
  --coin: #f2b632;

  --radius: 10px;
  --radius-sm: 6px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10; --bg2: #18181b; --panel: #151517; --panel2: #1c1c1f; --line: #27272a; --line-strong: #3f3f46;
    --ink: #f4f4f5; --muted: #a1a1aa; --faint: #71717a; --hover: #1f1f23;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 30px rgba(0,0,0,.6);
    --accent: #3b82f6; --gold: #e3b341; --gold-bg: #2a2310; --red: #f87171; --red-bg: #2a1414; --orange: #fb923c; --orange-bg: #2a1a0e;
    --green: #4ade80; --green-bg: #0f2418; --blue: #60a5fa; --blue-bg: #111c30; --amber: #facc15; --amber-bg: #2a250c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10; --bg2: #18181b; --panel: #151517; --panel2: #1c1c1f; --line: #27272a; --line-strong: #3f3f46;
  --ink: #f4f4f5; --muted: #a1a1aa; --faint: #71717a; --hover: #1f1f23;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 30px rgba(0,0,0,.6);
  --accent: #3b82f6; --gold: #e3b341; --gold-bg: #2a2310; --red: #f87171; --red-bg: #2a1414; --orange: #fb923c; --orange-bg: #2a1a0e;
  --green: #4ade80; --green-bg: #0f2418; --blue: #60a5fa; --blue-bg: #111c30; --amber: #facc15; --amber-bg: #2a250c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
h3 { font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.pixel { font-family: var(--sans); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
code { font-size: 12px; background: var(--bg2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 16px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo::before { content: ''; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { font-size: 13px; font-weight: 550; color: var(--muted); padding: 7px 11px; border-radius: var(--radius-sm); }
.nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--bg2); color: var(--ink); }
.whoami { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.whoami select { width: auto; padding: 6px 8px; }
.mode-pill { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.mode-live { color: var(--green); background: var(--green-bg); }
.mode-demo { color: var(--orange); background: var(--orange-bg); }
.theme-btn { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-sm); padding: 5px 8px; cursor: pointer; font-size: 13px; }
.theme-btn:hover { background: var(--hover); }

main { max-width: 1280px; margin: 0 auto; padding: 22px 16px 80px; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; position: relative; }
.panel.inset { background: var(--bg2); box-shadow: none; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.side-main { grid-template-columns: 340px minmax(0, 1fr); }
@media (max-width: 960px) { .cols-2, .cols-3, .side-main { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Buttons & inputs ---------- */
.btn { font-size: 13px; font-weight: 550; background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink); padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.gold:hover { filter: brightness(1.08); }
.btn.red { background: var(--red-bg); border-color: transparent; color: var(--red); }
.btn.green { background: var(--green-bg); border-color: transparent; color: var(--green); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.sm { font-size: 12px; padding: 5px 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=search], input[type=date], input[type=number], select, textarea {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
label { display: block; font-size: 12px; font-weight: 550; color: var(--muted); margin-bottom: 5px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.row > .shrink, .row.tight > * { flex: 0 0 auto; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; padding: 3px 9px; border-radius: 999px; background: var(--bg2); color: var(--muted); margin: 2px 4px 2px 0; white-space: nowrap; }
.chip.sev-Mild { background: var(--amber-bg); color: var(--amber); }
.chip.sev-Moderate { background: var(--orange-bg); color: var(--orange); }
.chip.sev-Severe { background: var(--red-bg); color: var(--red); }
.chip.ok { background: var(--green-bg); color: var(--green); }
.chip.warn { background: var(--red-bg); color: var(--red); font-weight: 650; }
.chip.info { background: var(--blue-bg); color: var(--blue); }

/* ---------- Coach dashboard ---------- */
.cover-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--amber-bg); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-weight: 600; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: border-color .12s, box-shadow .12s; }
.client-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.client-card.flag { box-shadow: inset 3px 0 0 var(--red), var(--shadow); }
.cc-head { display: flex; gap: 12px; align-items: center; }
.cc-head canvas { width: 52px; height: auto; image-rendering: pixelated; background: var(--bg2); border-radius: 8px; }
.cc-name { font-weight: 650; font-size: 15px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stat { background: var(--bg2); padding: 8px 4px; border-radius: 8px; }
.stat b { display: block; font-size: 17px; font-weight: 700; margin-bottom: 1px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); }
.stat.bad b { color: var(--red); }
.lift-line { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.lift-line:last-child { border-bottom: 0; }

/* ---------- Client detail ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-head canvas { width: 96px; height: auto; image-rendering: pixelated; background: var(--bg2); border-radius: var(--radius); }
.profile-head h1 { font-size: 18px !important; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 6px; }
.bars .bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars .bar.zero { background: var(--line); }
.bars-labels { display: flex; gap: 4px; font-size: 10px; color: var(--muted); }
.bars-labels span { flex: 1; text-align: center; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 7px 4px; border-bottom: 1px solid var(--line); }
td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.injury { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel2); padding: 12px; margin-bottom: 10px; }
.injury.status-Active { box-shadow: inset 3px 0 0 var(--red); }
.injury.status-Recovering { box-shadow: inset 3px 0 0 var(--orange); }
.injury.status-Resolved { box-shadow: inset 3px 0 0 var(--green); opacity: .75; }
.injury-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.injury-head select { width: auto; padding: 4px 6px; }
.injury-title { font-weight: 650; font-size: 14px; }
.checkin { font-size: 13px; border-top: 1px solid var(--line); padding: 7px 0 0; margin-top: 7px; }

.wod-block { margin-bottom: 16px; }
.wod-block h3 { color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.wod-note { font-size: 13px; color: var(--muted); margin: 6px 2px; }
details.wod-block summary { cursor: pointer; padding: 4px 0; color: var(--muted); }
details.wod-block summary h3 { color: var(--muted); }
.wod-line { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; margin: 4px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; align-items: center; }
.wod-line:hover { border-color: var(--accent); background: var(--blue-bg); }
.wod-line .swap { font-size: 11px; font-weight: 600; color: var(--faint); white-space: nowrap; }
.wod-line:hover .swap { color: var(--accent); }
.wod-line.subbed { border-color: color-mix(in srgb, var(--orange) 45%, transparent); background: var(--orange-bg); }
.wod-line.subbed .swap { color: var(--orange); }
.wod-line.subbed .orig { text-decoration: line-through; color: var(--muted); }
.wod-line.subbed .new { color: var(--ink); font-weight: 650; display: block; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 22px; }
.modal h2 { font-size: 17px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.choice { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: left; }
.choice:hover, .choice.sel { border-color: var(--accent); background: var(--blue-bg); }
.choice b { display: block; font-size: 14px; margin-bottom: 4px; }
.choice span { font-size: 13px; color: var(--muted); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.suggest button { background: var(--bg2); border: 1px solid transparent; border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 13px; }
.suggest button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Character page (game flavor, neutral frame) ---------- */
.rpg .panel { background: var(--panel); }
.hero { text-align: center; }
.pedestal { background: radial-gradient(ellipse at 50% 92%, color-mix(in srgb, var(--ink) 10%, transparent) 0 20%, transparent 21%), var(--bg2); border-radius: var(--radius); padding: 18px 0 12px; }
.pedestal canvas { width: 200px; height: auto; image-rendering: pixelated; }
.hero-name { font-size: 18px; font-weight: 700; margin: 12px 0 2px; }
.hero-title { color: var(--muted); font-weight: 550; }
.level-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; background: var(--ink); color: var(--panel); padding: 4px 10px; border-radius: 999px; margin: 8px 0 4px; }
.meter { height: 10px; background: var(--bg2); border-radius: 999px; position: relative; margin: 5px 0 12px; overflow: hidden; }
.meter > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; }
.meter.xp > i { background: linear-gradient(90deg, #f2b632, #e08e0b); }
.meter > span { display: none; }
.meter-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter-label b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.coins { font-size: 15px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; }
.coin { display: inline-block; width: 16px; height: 16px; background: radial-gradient(circle at 35% 35%, #ffe08a, var(--coin) 55%, #c98a0b); border-radius: 50%; margin-right: 6px; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.12); }
.stat-list { display: grid; gap: 8px; }
.stat-item { display: grid; grid-template-columns: 40px 1fr 32px; gap: 10px; align-items: center; }
.stat-item .abbr { font-size: 12px; font-weight: 700; }
.stat-item .val { font-size: 13px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.stat-item .meter { margin: 0; height: 8px; }

.tree { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .tree { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tree { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.branch { text-align: center; }
.branch-head { font-size: 12px; font-weight: 650; line-height: 1.3; margin-bottom: 10px; min-height: 48px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.branch-lvl { font-size: 20px; font-weight: 800; color: var(--ink); }
.node { position: relative; margin: 0 auto 16px; width: 100%; max-width: 140px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--faint); font-size: 12px; font-weight: 550; line-height: 1.2; }
.node::after { content: ''; position: absolute; left: 50%; bottom: -17px; width: 2px; height: 16px; background: var(--line); transform: translateX(-50%); }
.node:last-child::after { display: none; }
.node.on { border-color: var(--c); color: var(--ink); background: color-mix(in srgb, var(--c) 10%, var(--panel)); }
.node.on::after { background: var(--c); }
.node small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.ach { border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 550; color: var(--faint); }
.ach .ico { font-size: 24px; filter: grayscale(1) opacity(.35); margin-bottom: 2px; }
.ach.on { color: var(--ink); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); background: var(--gold-bg); }
.ach.on .ico { filter: none; }
.ach .meter { height: 4px; }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 8px; text-align: center; min-height: 58px; font-size: 13px; }
.slot.filled { border-style: solid; border-color: var(--line-strong); background: var(--panel2); font-weight: 600; }
.slot .slot-name { font-size: 11px; color: var(--muted); display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

.tabs { display: flex; gap: 2px; margin-bottom: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab { font-size: 13px; font-weight: 550; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; color: var(--muted); margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.item canvas { width: 72px; height: auto; image-rendering: pixelated; background: var(--bg2); border-radius: 8px; }
.item .iname { font-size: 13px; font-weight: 600; }
.item .price { font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; }
.item .price .coin { width: 12px; height: 12px; margin-right: 4px; }
.rarity { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.r-common .rarity { color: var(--faint); } .r-uncommon .rarity { color: #12a594; } .r-rare .rarity { color: #0b84e6; }
.r-epic .rarity { color: #8e4ec6; } .r-legendary .rarity { color: #ef6c1a; } .r-event .rarity { color: #e5484d; }
.item.r-event { border-color: color-mix(in srgb, #e5484d 40%, var(--line)); }
.log { font-size: 13px; max-height: 260px; overflow: auto; }
.log div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.log div:last-child { border-bottom: 0; }
.log .plus { color: var(--green); font-weight: 600; white-space: nowrap; } .log .minus { color: var(--red); font-weight: 600; white-space: nowrap; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); cursor: pointer; }
.swatch.sel { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Staff HQ ---------- */
.staff-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.staff-hero { display: grid; grid-template-columns: 160px 1fr; gap: 6px 18px; text-align: left; align-items: center; }
.staff-hero .pedestal { grid-row: span 8; }
.staff-hero .pedestal canvas { width: 130px; height: auto; }
.staff-hero .hero-name { margin-top: 0; }
.staff-hero .level-badge { justify-self: start; }
@media (max-width: 960px) { .staff-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .staff-hero { grid-template-columns: minmax(0, 1fr); text-align: center; } .staff-hero .level-badge { justify-self: center; } }
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .week { grid-template-columns: minmax(0, 1fr); } }
.day { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day h3 { display: flex; justify-content: space-between; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 10px; margin: 6px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.task:hover { border-color: var(--line-strong); }
.task.done { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.task.done .ttl { text-decoration: line-through; color: var(--muted); }
.task.future { cursor: default; opacity: .6; }
.box { flex: 0 0 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--panel); position: relative; margin-top: 1px; }
.task.done .box { background: var(--green); border-color: var(--green); }
.task.done .box::after { content: '✓'; position: absolute; inset: -2px 0 0 3px; font-size: 13px; font-weight: 900; color: var(--panel); }
.ttl { font-weight: 600; font-size: 13px; }
.reward { font-size: 11px; font-weight: 600; color: var(--gold); margin-top: 4px; white-space: nowrap; }
.day-progress { height: 4px; background: var(--line); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.day-progress i { display: block; height: 100%; background: var(--green); }
.callout { border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--ink); margin-bottom: 14px; background: var(--amber-bg); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 99; max-width: 90vw; }
.toast.err { background: var(--red); color: #fff; }
.loading { font-size: 13px; color: var(--muted); padding: 40px; text-align: center; }
.empty { text-align: center; padding: 24px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- Golden Hour ---------- */
.gh-main { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1000px) { .gh-main { grid-template-columns: minmax(0, 1fr); } }
.gh-step { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.gh-step:first-of-type { border-top: 0; }
.gh-letter { flex: 0 0 34px; height: 34px; border-radius: 9px; background: var(--bg2); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.gh-step.done .gh-letter { background: linear-gradient(135deg, #f2b632, #e08e0b); color: #2a1d00; }
.gh-body { flex: 1; min-width: 0; }
.gh-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gh-guide { margin-top: 2px; }
.gh-check { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: none; padding: 0; font-size: 12px; font-weight: 800; color: transparent; }
.gh-check.on { background: var(--green); border-color: var(--green); color: var(--panel); cursor: pointer; }
.gh-rep, .gh-project { margin-top: 10px; padding: 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.gh-rep.locked { opacity: .8; border-style: dashed; }
.gh-logs { margin-top: 8px; font-size: 13px; display: grid; gap: 3px; }
.todo { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.todo input { width: 16px; height: 16px; accent-color: var(--green); }
.todo span { flex: 1; }
.todo.done span { text-decoration: line-through; color: var(--muted); }
.gh-streak { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.gh-flame { font-size: 30px; }
.gh-streak-num { font-size: 20px; font-weight: 800; }
.gh-ramp { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ramp-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0; }
.ramp-bar i { height: 8px; border-radius: 999px; background: var(--line); }
.ramp-bar i.on { background: var(--accent); }
.gh-principle { margin-top: 12px; font-size: 14px; font-style: italic; color: var(--ink); }
.gh-timer-panel #gh-clock { font-size: 26px; font-variant-numeric: tabular-nums; font-weight: 800; }
.gh-timeline { position: relative; height: 26px; background: var(--bg2); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.gh-timeline i { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); border-right: 2px solid var(--accent); }
.gh-timeline span { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line-strong); }
.gh-timeline span:first-of-type { border-left: 0; }
.gh-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gh-day { text-align: center; padding: 6px 2px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); min-height: 64px; }
.gh-day-name { font-size: 11px; font-weight: 700; color: var(--muted); }
.gh-day-dot { height: 22px; font-weight: 800; font-size: 14px; }
.gh-day-rep { font-size: 10px; line-height: 1.2; color: var(--muted); word-break: break-word; }
.gh-day-count { font-size: 10px; font-weight: 700; color: var(--ink); margin-top: 3px; }
.gh-day.s-done { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.gh-day.s-done .gh-day-dot { color: var(--green); }
.gh-day.s-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gh-day.s-today .gh-day-dot { color: var(--accent); }
.gh-day.s-missed .gh-day-dot { color: var(--red); }
.gh-day.s-off, .gh-day.s-before { opacity: .55; }
.gh-rep-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.gh-rep-row:first-of-type { border-top: 0; }
.gh-rep-day { flex: 0 0 34px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }

/* ---------- Golden Hour: personal tasks ---------- */
.gh-first { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--blue-bg); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.gh-first-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 8px; }
.gh-anytime { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.ct { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 8px; }
.gh-first .ct:first-of-type { margin-top: 0; }
.ct.done { border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.ct-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ct-count { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ct-count .btn { width: 34px; font-size: 16px; padding: 4px 0; }
.ct-count input { width: 64px; text-align: center; font-weight: 700; }
.ct-meter { position: relative; height: 8px; margin: 8px 0 6px; overflow: visible; }
.ct.done .ct-meter > i { background: var(--green); }
.ct-min { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .35; }
.ct-note { margin: 6px 0 4px; font-size: 13px; padding: 6px 9px !important; }
.day-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.day-pick label { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--ink); cursor: pointer; }

.ct-client { display: inline-block; margin-top: 4px; font-weight: 600; }
.suggest-row { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 7px 4px; cursor: pointer; font-size: 13px; }
.suggest-row:hover { background: var(--hover); }

/* ---------- New-member journey ---------- */
.j-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.j-item:first-of-type { border-top: 0; }
.j-item.overdue { box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
.j-late { color: var(--red); font-weight: 600; }
.j-timeline { display: grid; }
.j-step { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; }
.j-step[data-jstep] { cursor: pointer; }
.j-step[data-jstep]:hover { background: var(--hover); }
.j-day { flex: 0 0 52px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.j-dot { flex: 0 0 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); }
.j-step.s-done .j-dot { background: var(--green); border-color: var(--green); }
.j-step.s-skipped .j-dot, .j-step.s-prelaunch .j-dot { background: var(--line); border-color: var(--line); }
.j-step.s-due .j-dot { border-color: var(--accent); background: var(--blue-bg); }
.j-step.s-overdue .j-dot { border-color: var(--red); background: var(--red-bg); }
.j-step.s-skipped .ttl, .j-step.s-prelaunch .ttl { color: var(--muted); }

/* ---------- Scripts, client types ---------- */
.script { white-space: pre-line; background: var(--bg2); border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
mark.ph { background: var(--amber-bg); color: var(--amber); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.suggest button.on { border-color: var(--accent); color: var(--accent); background: var(--blue-bg); }
table.ctype th { width: 120px; text-transform: none; letter-spacing: 0; font-size: 12px; vertical-align: top; }

/* ---------- Events, collection, titles ---------- */
.title-pick { width: auto; max-width: 100%; margin: 6px auto 0; display: block; font-size: 12px; padding: 4px 8px; }
.faint { color: var(--faint); }
.earn-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; font-size: 12px; margin: 4px 0; }
.earn-row .meter { margin: 0; height: 8px; }
.earn-row b { text-align: right; font-variant-numeric: tabular-nums; }
.earn-rules { margin-top: 10px; font-size: 12px; }
.earn-rules td { padding: 4px 2px; }
.earn-rules td:last-child { text-align: right; color: var(--muted); }
.event-banner { background: var(--blue-bg); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; display: grid; gap: 6px; }
.event-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: var(--panel2); }
.event-card.s-active { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.event-card.s-ended { opacity: .75; }
.event-row { display: flex; gap: 12px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); color: var(--ink); border-radius: 8px; }
.event-row:hover { background: var(--hover); text-decoration: none; }
.ev-icon { font-size: 22px; }
.ach-cat { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ach-pts { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ach.feat { border-color: color-mix(in srgb, #8e4ec6 45%, var(--line)); background: color-mix(in srgb, #8e4ec6 8%, var(--panel)); }
.item.locked canvas { filter: grayscale(1) opacity(.45); }
.item.locked .iname { color: var(--muted); }
.pedestal canvas.wide { width: 308px; }
.cc-head canvas.wide { width: 80px; }
.profile-head canvas.wide { width: 148px; }
.item canvas.wide { width: 111px; }
.staff-hero .pedestal canvas.wide { width: 200px; }

/* Tap-to-pick grids (Add Injury and other phone-first pickers) */
.tap-region { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 6px; }
.tap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 8px; }
.tap-grid.two { grid-template-columns: 1fr 1fr; }
.tap-grid.three { grid-template-columns: repeat(3, 1fr); }
.tap { min-height: 48px; padding: 10px 8px; font: inherit; font-size: 15px; font-weight: 550; color: var(--ink); background: var(--panel2); border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.tap:hover { background: var(--hover); }
.tap:active { transform: translateY(1px); }
.tap.big { min-height: 72px; font-size: 18px; }
.tap.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.tap.sev-Mild.on { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); box-shadow: none; }
.tap.sev-Moderate.on { background: var(--orange-bg); color: var(--orange); border-color: var(--orange); box-shadow: none; }
.tap.sev-Severe.on { background: var(--red-bg); color: var(--red); border-color: var(--red); box-shadow: none; }
.row.end { justify-content: flex-end; }

/* ---------- Phone-first layer ---------- */
.nav svg { display: none; width: 22px; height: 22px; }
.nav-short { display: none; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; color: var(--ink); }
img, canvas, video { max-width: 100%; }
.table-wrap, .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 720px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); -webkit-text-size-adjust: 100%; }
  /* backdrop-filter would trap the fixed tab bar inside the header */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--panel); }
  .topbar-inner { gap: 8px; padding: 8px 12px; flex-wrap: nowrap; }
  .logo { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .whoami { gap: 6px; flex-shrink: 0; }
  .whoami .signed-label, .whoami .mode-pill { display: none; }
  .whoami select { max-width: 140px; font-size: 14px; }
  /* Bottom tab bar: thumb reach on phones. */
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    background: var(--panel); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; padding: 6px 2px; min-height: 52px; border-radius: 10px; }
  .nav a.active { background: transparent; color: var(--accent); }
  .nav svg { display: block; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  main#app { padding-left: 12px; padding-right: 12px; }
  .panel { padding: 14px; margin-bottom: 12px; border-radius: 12px; }
  .grid { gap: 12px; }
  /* Bigger tap targets. */
  .btn { min-height: 40px; padding: 9px 14px; font-size: 14px; }
  .btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; }
  input, select, textarea { font-size: 16px; } /* stops iOS zoom on focus */
  .row { flex-wrap: wrap; }
  .row > .field { min-width: 0; flex: 1 1 140px; }
  table { font-size: 13px; }
  /* Client profile: injuries, subs and the workout come first on a phone. */
  .phone-stack { display: flex; flex-direction: column; }
  .phone-stack > div { display: contents; }
  .phone-stack .panel[data-m="1"] { order: 1; } .phone-stack .panel[data-m="2"] { order: 2; } .phone-stack .panel[data-m="3"] { order: 3; }
  .phone-stack .panel[data-m="4"] { order: 4; } .phone-stack .panel[data-m="5"] { order: 5; } .phone-stack .panel[data-m="6"] { order: 6; }
  .phone-stack .panel[data-m="7"] { order: 7; } .phone-stack .panel[data-m="8"] { order: 8; } .phone-stack .panel[data-m="9"] { order: 9; }
  .phone-stack .panel[data-m="10"] { order: 10; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
}

@media (max-width: 720px) {
  /* Tables that read better as cards on a phone. */
  .stack-table thead { display: none; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .stack-table td { border: 0; padding: 2px 0; text-align: left; }
}
@media (max-width: 720px) { .journey-steps td:first-child { font-weight: 650; } .journey-steps td:first-child::before { content: 'Day '; } }

/* ---------- Sign-in ---------- */
body.signed-out .nav, body.signed-out .whoami { display: none; }
body.signed-out { padding-bottom: 0; }
.login { min-height: calc(100vh - 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 0; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 24px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin: 8px 0 6px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-brand { text-align: center; margin-bottom: 18px; }
.login-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.login-tag { font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--gold, #c89028); margin-top: 4px; }
.login-foot { margin-top: 14px; text-align: center; }
.btn.block { width: 100%; min-height: 46px; font-size: 15px; }
.code-input { font-size: 26px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px 12px 4px 4px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px; }
.user-btn:hover { background: var(--hover); }
.avatar-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.nav a[hidden] { display: none !important; }
@media (max-width: 720px) { .nav { grid-template-columns: repeat(var(--tabs, 5), 1fr); } }

/* ---------- Notes and contact history ---------- */
.phone-stack .panel[data-m="11"] { order: 11; }
@media (max-width: 720px) { .phone-stack .panel[data-m="11"] { order: 11; } }
.pinned-box { margin-top: 12px; display: grid; gap: 6px; }
.pinned-note { background: var(--gold-bg, #fdf6e3); border: 1px solid color-mix(in srgb, var(--gold, #c89028) 40%, transparent); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.wodify-note { background: var(--bg2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; white-space: pre-wrap; }
.tl-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.chip-btn { flex: 0 0 auto; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; min-height: 34px; }
.chip-btn.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { border-left: 2px solid var(--line-strong); padding: 4px 0 12px 14px; margin-left: 4px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-strong); }
.tl-item.tl-note::before { border-color: var(--accent); }
.tl-item.tl-injury::before { border-color: var(--orange); }
.tl-item.tl-milestone::before, .tl-item.tl-review::before { border-color: var(--green); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-when { font-size: 12px; color: var(--muted); }
.tl-title { font-size: 14px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-detail { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-edited { font-size: 12px; color: var(--faint, var(--muted)); font-style: italic; margin-top: 3px; }
.note-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.timeline.archived .tl-item { opacity: .75; }
.queue-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
label.check input { width: auto; margin-top: 3px; }

/* ---------- My Classes Today ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg2); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.seg a { text-align: center; padding: 9px 8px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); text-decoration: none; }
.prep-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.prep-day .btn { font-size: 20px; min-width: 44px; }
.prep-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.prep-strip::-webkit-scrollbar { display: none; }
.prep-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 70px; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.prep-chip b { font-size: 15px; } .prep-chip span { font-size: 11px; color: var(--muted); max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prep-chip.is-mine { border-color: var(--accent); }
.prep-chip.is-mine::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 2px; }
.prep-chip.on { background: var(--ink); color: var(--panel); border-color: var(--ink); } .prep-chip.on span { color: var(--panel); opacity: .8; }
.prep-chip.is-past:not(.on) { opacity: .5; }
.prep-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.prep-cards::-webkit-scrollbar { display: none; }
.prep-card { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; box-sizing: border-box; padding: 0 2px; }
.prep-card > * { background: var(--panel); }
.prep-head { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 14px 14px 0 0; padding: 14px; }
.prep-time { font-size: 22px; font-weight: 750; letter-spacing: -.01em; } .prep-time .muted { font-size: 14px; font-weight: 500; }
.prep-name { font-weight: 600; margin: 2px 0; }
.prep-count { text-align: right; } .prep-count b { font-size: 26px; } .prep-count > span { color: var(--muted); }
.prep-wod { border: 1px solid var(--line); border-top: 0; padding: 10px 14px; }
.prep-wod summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.prep-line { font-size: 14px; padding: 3px 0; } .prep-hit { font-size: 13px; color: var(--accent); padding-left: 8px; }
.prep-people { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; }
.prep-people li { padding: 11px 14px; border-top: 1px solid var(--line); }
.prep-people li:first-child { border-top: 0; }
.prep-person { font-weight: 600; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.prep-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; } .prep-flags .chip { margin: 0; white-space: normal; }
.prep-empty { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 16px 14px; margin: 0; }
.prep-card.is-past .prep-head { opacity: .7; }
.chip.gold { background: var(--gold-bg, #fdf6e3); color: var(--gold, #a8770f); }

/* ---------- Open class board ---------- */
.open-board { padding: 12px 14px; }
.open-board summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 36px; list-style: none; }
.open-board summary::-webkit-details-marker { display: none; }
.open-board summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.open-board[open] summary::after { content: '▴'; }
.open-list { list-style: none; margin: 8px 0 0; padding: 0; }
.open-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.open-list li.is-soon b { color: var(--red); }
.prep-action { border: 1px solid var(--line); border-top: 0; padding: 10px 14px; background: var(--panel); }
.prep-action .btn.gold { width: 100%; min-height: 44px; }

/* ---------- Goal Reviews ---------- */
.phone-stack .panel[data-m="12"] { order: 12; }
@media (max-width: 720px) { .phone-stack .panel[data-m="11"] { order: 11; } .phone-stack .panel[data-m="12"] { order: 12; } }
.goal-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.goal-list li { padding: 5px 0; font-size: 14px; border-top: 1px solid var(--line); }
.goal-list li:first-child { border-top: 0; }
.gr-history summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 34px; display: flex; align-items: center; }
.gr-item { border-top: 1px solid var(--line); padding: 8px 0; display: grid; gap: 4px; }
.gr-goal { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.gr-goal-text { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.gr-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.gr-seg button { font: inherit; font-size: 12px; font-weight: 600; padding: 8px 2px; min-height: 38px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); cursor: pointer; }
.gr-seg button.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.gr-seg button[data-oc="hit"].on { background: var(--green); border-color: var(--green); color: #fff; }
.gr-since { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; }
.gr-mrow { display: grid; grid-template-columns: 1.6fr 1fr .8fr; gap: 6px; margin-bottom: 8px; }
.gr-mrow .gr-mlast { grid-column: 1 / -1; margin-top: -2px; }
.report-card .rc-up { color: var(--green); font-weight: 700; } .report-card .rc-down { color: var(--blue, #2563eb); font-weight: 700; }
.gr-mrow { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .7fr); }
.gr-mrow input, .gr-new, #gr-label { width: 100%; min-width: 0; box-sizing: border-box; }

/* ---------- Private body weight ---------- */
.body-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 6px 0; }
.body-stats div { background: var(--bg2); border-radius: 10px; padding: 10px 12px; }
.body-stats b { display: block; font-size: 20px; } .body-stats span { font-size: 12px; color: var(--muted); }

/* Chalk: a little chalk bag instead of a coin (the currency is "chalk", not money). */
.coin { width: 15px !important; height: 16px !important; border-radius: 4px 4px 7px 7px !important; vertical-align: -2px;
  background: linear-gradient(180deg, #8a8f98 0 22%, #f4f4f5 22% 100%) !important; box-shadow: inset 0 0 0 1.5px #52525b, 0 1px 0 rgba(0,0,0,.08) !important; position: relative; }
.coin::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 3px; border-radius: 2px; background: #e4e4e7; box-shadow: 0 -4px 0 -1px #fafafa; }
.item .price .coin { width: 11px !important; height: 12px !important; }
.chalk-note { margin: -4px 0 10px; }

/* ---------- Hero creator ---------- */
canvas.hero-px { image-rendering: pixelated; }
.hero-editor h3 { margin: 6px 0 4px; }
.hero-editor label { display: block; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 6px; }
.hero-editor label.check { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.he-top { position: sticky; top: -18px; z-index: 2; background: var(--panel); padding-top: 4px; }
.he-prev { display: flex; justify-content: center; background: radial-gradient(circle at 50% 70%, #4a3b2e, #2a211a); border-radius: 12px; padding: 8px; margin: 4px 0 8px; }
.he-prev canvas { max-height: 34vh; width: auto; }
.he-step { text-align: center; }
.he-body .tap-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.he-body .tap { min-height: 42px; font-size: 14px; }
.swatches.big { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-strong); cursor: pointer; font-size: 16px; color: var(--muted); }
.swatch-btn.on { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--accent); }
.he-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; position: sticky; bottom: -18px; background: var(--panel); padding: 10px 0; }
.he-bonus { background: var(--gold-bg, #fdf6e3); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 15px; }
.hero-plate { text-align: center; margin-bottom: 4px; }
.hero-plate .pn { font-weight: 800; font-size: 18px; }
.hero-plate .pt { color: var(--gold, #a8770f); font-size: 13px; font-weight: 650; }

/* ---------- Title screen (sign-in) ---------- */
@font-face { font-family: QfSwash; src: url(/assets/fonts/swash.woff2); font-display: block; }
@font-face { font-family: QfPixel; src: url(/assets/fonts/pixelify.woff2); }
@font-face { font-family: QfSilk; src: url(/assets/fonts/silkscreen.woff2); }
body.signed-out { background: #0f0a14; }
body.signed-out .topbar { display: none; }
body.signed-out main#app { max-width: 720px; }
.login { min-height: 100vh; justify-content: flex-start; padding: 16px 0 28px; }
.ts-mount { width: 100%; max-width: 680px; }
.ts { text-align: center; }
.ts canvas { image-rendering: pixelated; display: block; width: 100%; height: auto; }
.ts-title { position: relative; margin: 4px auto 0; }
.ts-glint { position: absolute; inset: 0; pointer-events: none; }
.ts-tag { font-family: QfSilk, monospace; color: #e8c06a; letter-spacing: .18em; font-size: clamp(10px, 2.6vw, 15px); margin: 2px 0 10px; text-shadow: 0 2px 0 #3a1a08; }
.ts-frame { position: relative; padding: 8px; border-radius: 6px;
  background: linear-gradient(180deg, #6f6253, #463b31); box-shadow: inset 0 0 0 2px #2a221b, inset 0 0 0 4px #8d7b64, 0 10px 30px rgba(0,0,0,.6); }
.ts-frame::after { content: ''; position: absolute; inset: 6px; border: 2px solid #c79a3d; border-radius: 3px; pointer-events: none; opacity: .8; }
body.signed-out .login-card { background: linear-gradient(180deg, #3b2c20, #2a1f17); border: 3px solid #1a120c; box-shadow: inset 0 0 0 2px #7a5a3a, 0 10px 30px rgba(0,0,0,.5); color: #f3e7cf; margin-top: 16px; }
body.signed-out .login-card label { color: #e8c06a; font-family: QfPixel, monospace; letter-spacing: .02em; }
body.signed-out .login-card input { background: #f5ecd8; color: #1b1410; border: 2px solid #1a120c; border-radius: 4px; }
body.signed-out .login-card .muted, body.signed-out .login-foot { color: #bfae90; }
body.signed-out .login-card .btn.gold { font-family: QfPixel, monospace; font-size: 18px; letter-spacing: .04em; background: linear-gradient(180deg, #e4a0a0, #b55b5b); color: #2a0e0e; border: 3px solid #4a1414; box-shadow: inset 0 0 0 2px #f6c9c9, 0 3px 0 #2a0e0e; border-radius: 4px; text-transform: uppercase; }
body.signed-out .login-card .btn.ghost { color: #e8c06a; font-family: QfPixel, monospace; }

/* ---------- Raiding parties ---------- */
.party-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); }
.party-row:hover { text-decoration: none; background: var(--hover); }
.leaderboard { list-style: none; margin: 10px 0 0; padding: 0; }
.leaderboard li { display: grid; grid-template-columns: 24px 26px 1fr auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; background: color-mix(in srgb, var(--tc) 12%, var(--panel)); border-left: 5px solid var(--tc); }
.lb-rank { font-weight: 800; color: var(--muted); } .lb-em { font-size: 18px; } .lb-n { font-size: 12px; color: var(--muted); } .lb-score { font-weight: 800; font-size: 18px; }
.party-me { margin-top: 10px; display: grid; gap: 6px; }
.invite { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.draft-board { border: 2px solid var(--tc, var(--accent)); background: color-mix(in srgb, var(--tc, var(--accent)) 10%, var(--panel)); text-align: center; }
.db-clock { font-size: 22px; margin: 6px 0; } .db-theme { display: inline-block; font-weight: 700; background: var(--panel); border-radius: 999px; padding: 6px 14px; border: 1px solid var(--line-strong); }
.party-card { padding: 0; overflow: hidden; border-top: 6px solid var(--tc); }
.party-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 30%, var(--panel)), var(--panel)); }
.pb-em { font-size: 30px; } .pb-name { font-weight: 800; font-size: 18px; } .pb-sub { font-size: 12px; color: var(--muted); }
.pb-score { font-weight: 800; font-size: 26px; text-align: right; } .pb-score span { font-size: 12px; color: var(--muted); margin-left: 3px; }
.party-heroes { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 12px 8px 4px;
  background: radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.18), transparent 60%), linear-gradient(180deg, #3a2f42 0%, #5a4636 100%); border-radius: 0; }
.party-card > .btn { margin: 10px 14px 12px; }
.party-hero { text-align: center; width: 92px; }
.party-hero.compact { width: 78px; }
.party-hero canvas { display: block; margin: 0 auto; image-rendering: pixelated; }
.ph-name { color: #fff; font-weight: 700; font-size: 12px; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-title { color: #f2c14e; font-size: 10px; min-height: 12px; text-shadow: 1px 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-score { color: #ffe9a8; font-size: 11px; font-weight: 700; text-shadow: 1px 1px 0 #000; }
.ph-theme { color: #d7c8b0; font-size: 9px; line-height: 1.2; text-shadow: 1px 1px 0 #000; }
.party-heroes.pool { border-radius: 10px; }
.party-hero.pickable { cursor: pointer; border-radius: 8px; } .party-hero.pickable:hover { background: rgba(255,255,255,.12); }
.party-hero.invited { opacity: .55; } .party-hero.invited::after { content: 'Invited'; display: block; color: #9be29b; font-size: 10px; font-weight: 700; }

/* ---------- Quest Giver ---------- */
.q-board { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; justify-content: center; padding: 14px 8px 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.q-board .empty { width: 100%; }
.q-npc { background: none; border: 0; padding: 4px 6px 6px; display: flex; flex-direction: column; align-items: center; cursor: pointer; border-radius: 10px; color: inherit; font: inherit; width: 132px; }
.q-npc:hover, .q-npc:focus-visible { background: var(--gold-bg); outline: none; }
.q-npc.q-done { opacity: .55; }
.q-npc .hero-px { image-rendering: pixelated; }
.q-npc-name { font-weight: 700; font-size: 12px; margin-top: 2px; color: var(--gold); text-align: center; }
.q-npc-title { font-size: 11px; opacity: .8; text-align: center; line-height: 1.2; }
.q-mark { image-rendering: pixelated; height: 36px; width: auto; margin-bottom: 2px; }
.q-mark.q-check { height: 36px; line-height: 36px; font-size: 20px; color: var(--green); font-weight: 800; }
.q-mark.bob { animation: q-bob 1.6s ease-in-out infinite; }
@keyframes q-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .q-mark.bob { animation: none; } }
.q-bang { color: #ffd21f; text-shadow: 0 0 1px #000, 0 1px 0 #000; }
.q-mini { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.q-mini .q-npc { width: 96px; }
.q-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px; color: inherit; font: inherit; cursor: pointer; }
.q-dialog { display: flex; gap: 14px; align-items: flex-start; }
.q-giver { flex: 0 0 auto; padding: 6px; background: radial-gradient(circle at 50% 70%, rgba(255, 210, 31, .12), transparent 70%); border-radius: 10px; }
.q-giver .hero-px { image-rendering: pixelated; width: 130px; height: auto; }
.q-talk { flex: 1; min-width: 0; border: 2px solid var(--gold); border-radius: 8px; padding: 10px 12px; background: var(--gold-bg); color: var(--ink); }
.q-name { color: var(--gold); font-weight: 700; font-size: 13px; }
.q-title { margin: 2px 0 6px; }
.q-body { margin: 0 0 8px; line-height: 1.45; }
.q-goal { margin-bottom: 6px; }
.q-reward { margin-bottom: 4px; }
.q-form { display: flex; gap: 14px; }
.q-form-giver { flex: 0 0 170px; text-align: center; }
.q-form-main { flex: 1; min-width: 0; }
.q-form label { display: block; font-size: 12px; margin-bottom: 8px; }
.q-form input, .q-form textarea, .q-form select { width: 100%; }
.q-preview { min-height: 170px; display: flex; justify-content: center; align-items: flex-end; margin: 6px 0; }
.q-preview .hero-px { width: 120px; height: auto; image-rendering: pixelated; }
.q-table { width: 100%; margin-top: 10px; }
.q-table td { vertical-align: top; padding: 6px 4px; }
@media (max-width: 640px) {
  .q-dialog { flex-direction: column; align-items: center; }
  .q-giver .hero-px { width: 110px; }
  .q-form { flex-direction: column; }
  .q-form-giver { flex: none; }
  .q-npc { width: 104px; }
}

/* Privacy notice */
.privacy p { margin: 0 0 10px; line-height: 1.5; }
.modal-bg.locked { backdrop-filter: blur(2px); }

/* Bugs and suggestions */
.app-foot { text-align: center; padding: 18px 16px 28px; }
.linklike { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
.linklike:hover { color: var(--ink); }
@media (max-width: 760px) { .app-foot { padding-bottom: 96px; } }  /* clear the bottom tab bar */
.fb-item { border-top: 1px solid var(--line); padding: 10px 0; }
.fb-item.fb-done { opacity: .55; }

/* Member since / OG under the name plate */
.hero-plate .since { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: .02em; }
.hero-plate .since.og { color: var(--gold); font-weight: 800; letter-spacing: .12em; }
.og-chip { color: var(--gold); letter-spacing: .1em; }
.q-progress { margin-top: 8px; }
.q-total { font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1.1; margin-bottom: 4px; }
.q-total span { font-size: 13px; font-weight: 600; color: var(--muted); }
.q-log { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0 4px; }
.q-log label { font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.q-log input { width: 130px; }
.q-mode-box { margin: 8px 0 4px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.q-entries { margin-top: 8px; }
.q-entry { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.q-entry span { flex: 1; }
.rp-img { margin: 10px 0; text-align: center; }
.rp-preview { width: 100%; max-width: 360px; height: auto; border-radius: 8px; }

/* ---------- Today's Battle ---------- */
.battle-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.battle-head h1 { margin: 4px 0 6px; font-size: 20px; }
.battle-num { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 8px 0; padding: 10px 12px; border-left: 4px solid var(--gold); background: var(--gold-bg); border-radius: 6px; }
.battle-num b { font-size: 44px; line-height: 1; font-weight: 800; }
.battle-num span { font-weight: 700; color: var(--muted); }
.battle-num .small { flex-basis: 100%; }
.loader { margin: 10px 0 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); }
.loader-top { margin-bottom: 4px; } .loader-w { font-size: 22px; }
.bar-px { width: 100%; max-width: 360px; height: auto; image-rendering: pixelated; display: block; margin: 4px auto; }
.battle-levels { margin-top: 6px; }
.battle-lines { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.6; }
.battle-tip { padding: 6px 8px; border-radius: 6px; margin: 4px 0; font-size: 14px; background: var(--bg2); }
.battle-tip.up { border-left: 3px solid var(--green); } .battle-tip.down { border-left: 3px solid var(--orange); } .battle-tip.swap { border-left: 3px solid var(--blue); }
.battle-targets { display: flex; gap: 10px; margin: 10px 0 4px; }
.battle-targets div { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.battle-targets b { display: block; font-size: 18px; } .battle-targets span { font-size: 12px; color: var(--muted); }
.battle-coach { display: flex; gap: 12px; align-items: center; }
.battle-coach-hero .hero-px { width: 72px; height: auto; image-rendering: pixelated; }
.battle-coach p { margin: 4px 0; }
.battle-card { border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); }
.prep-cnote { margin: 6px 0; }
.battle details summary { cursor: pointer; }
.battle-levels { display: flex; flex-wrap: nowrap; }
.battle-levels a { flex: 1 1 0; text-align: center; white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.battle-card .btn { display: inline-block; margin-top: 12px; }
/* Strength controls */
.str-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.str-label { font-size: 14px; font-weight: 600; }
.str-feel, .str-bar { display: flex; flex-wrap: nowrap; flex: 1; min-width: 200px; }
.str-feel a, .str-bar a { flex: 1 1 0; text-align: center; white-space: nowrap; }
.str-weights { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.str-w { min-width: 64px; padding: 8px 10px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.str-w span { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.str-w.build { background: var(--bg2); color: var(--ink); border-color: var(--line); }
.str-w.work { background: var(--gold-bg); color: var(--ink); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.str-w.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.rp-together { font-size: 20px; margin: 6px 0 4px; padding: 8px 12px; background: var(--gold-bg); border-left: 4px solid var(--gold); border-radius: 6px; }
/* Strength: different weight, last time, fallback */
.str-other { display: inline-flex; gap: 6px; align-items: center; }
.str-w.mine { background: var(--bg2); color: var(--ink); border-style: dashed; border-color: var(--accent); }
.str-input { width: 84px; padding: 8px; font: inherit; font-weight: 700; }
.str-fallback { margin: 4px 0 2px; padding: 6px 8px; border-left: 3px solid var(--orange); background: var(--bg2); border-radius: 6px; }
.battle-compare { margin: -2px 0 8px; padding: 6px 8px; border-radius: 6px; background: var(--bg2); }
/* Movement videos */
.watch { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--accent); text-decoration: none; white-space: nowrap; margin-left: 4px; }
.vid-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.vid-list .watch { margin-left: 0; }
/* Levels: loads, pace plan, path to the next level */
.battle-loads { margin: 8px 0 4px; display: grid; gap: 4px; }
.battle-loads > div:not(.small) { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; background: var(--gold-bg); }
.pace { margin: 10px 0 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.pace-head { display: flex; gap: 8px; }
.pace-head div { flex: 1; text-align: center; }
.pace-head b { display: block; font-size: 17px; white-space: nowrap; }
.pace-head div:first-child { flex: 1.4; }
.pace-splits { display: flex; gap: 4px; margin: 8px 0 6px; }
.pace-splits div { flex: 1; text-align: center; padding: 6px 2px; border-radius: 6px; background: var(--bg2); font-size: 13px; }
.pace-splits span { display: block; font-size: 11px; color: var(--muted); }
.level-path { margin: 8px 0; }
.path-move { margin: 8px 0; }
.path-chain { display: flex; align-items: stretch; gap: 4px; margin-top: 4px; }
.path-chain i { align-self: center; font-style: normal; color: var(--muted); }
.path-step { flex: 1; padding: 6px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; line-height: 1.3; }
.path-step span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.path-step.done { opacity: .6; }
.path-step.today { border-color: var(--gold); background: var(--gold-bg); }
.path-step.next { border: 2px dashed var(--accent); }
/* This week */
.battle-week .week-day { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.battle-week .week-day:last-child { border-bottom: 0; }
.battle-week .week-day span { width: 34px; font-size: 12px; font-weight: 700; color: var(--muted); }
.battle-week .week-day b { flex: 1; font-weight: 600; }
.battle-week .week-day i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--gold); text-transform: uppercase; }
.battle-week .week-day.today b { color: var(--gold); }
.battle-week .week-day.past { opacity: .55; }
/* Character page: progress */
.gym-photo { padding: 0; overflow: hidden; position: relative; }
.gym-photo img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.gym-photo-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px; color: #fff; font-weight: 800; font-size: 18px; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.gphoto-prev { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; margin-bottom: 8px; }
.win { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.win:last-child { border-bottom: 0; }
.win > div { flex: 1; }
.win-ic { font-size: 20px; }
.club-weeks { display: flex; gap: 6px; margin: 10px 0 8px; }
.club-wk { flex: 1; text-align: center; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.club-wk.met { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--ink); }
.club-wk.current { border: 2px solid var(--gold); }
.club-wk.missed { opacity: .6; }
.club-dots { display: flex; justify-content: center; gap: 3px; margin-bottom: 3px; }
.club-dots i { width: 9px; height: 9px; border-radius: 2px; background: var(--line); }
.club-dots i.on { background: var(--green); }
.show-up { display: flex; gap: 8px; margin: 6px 0 4px; }
.show-up div { flex: 1; text-align: center; padding: 8px 4px; border-radius: 8px; background: var(--bg2); }
.show-up b { display: block; font-size: 22px; }
.show-up span { font-size: 11px; color: var(--muted); }
.milestone { margin: 8px 0; }
/* Prep sheet: each athlete's plan */
.prep-plan { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chip.plan { background: var(--bg2); font-weight: 600; }
/* Quest givers sway side to side too (heroes and pets animate in the canvas itself). */
@keyframes npc-sway { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.q-npc .hero-px { animation: npc-sway 3.4s steps(1, end) infinite; }
.q-npc:nth-child(2n) .hero-px { animation-duration: 2.9s; animation-delay: -1.1s; }
.q-npc:nth-child(3n) .hero-px { animation-duration: 3.8s; animation-delay: -2s; }
@media (prefers-reduced-motion: reduce) { .q-npc .hero-px { animation: none; } }
/* The Friday Question */
.vq-question { font-size: 18px; font-weight: 700; line-height: 1.35; margin: 6px 0 8px; padding: 10px 12px; border-left: 4px solid var(--gold); background: var(--gold-bg); border-radius: 6px; }
.vq-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vq-row:last-of-type { border-bottom: 0; }
.vq-row > span { white-space: nowrap; }
.vq-q { display: flex; gap: 6px; } .vq-q input { flex: 1; min-width: 0; }
.vq-set { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .vq-set input { width: 100%; box-sizing: border-box; }
