:root {
  --bg: #060a12;
  --bg2: #0a111d;
  --panel: #0f1828;
  --panel2: #142034;
  --line: #1c2a40;
  --text: #f1f5fb;
  --muted: #8796ad;
  --accent: #46e1ff;
  --accent2: #b6ff3d;
  --good: #2fd27a;
  --warn: #ffc93d;
  --bad: #ff4d5e;
  --radius: 18px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabbar-h: 68px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body);
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(1200px 600px at 80% -10%, rgba(70,225,255,.10), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(182,255,61,.06), transparent 60%), var(--bg); background-attachment: fixed; }
button { font: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 800; letter-spacing: .01em; line-height: .98; text-transform: uppercase; margin: 0; }
h1.display { font-size: clamp(38px, 9vw, 64px); }
h2.display { font-size: clamp(28px, 6vw, 38px); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-weight: 700; font-size: 12px; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.5; margin: 12px 0 24px; }
.lead.sm { font-size: 15px; margin: 8px 0 14px; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .center { text-align: center; }
.msg { color: var(--text); font-size: 15px; line-height: 1.45; }
.section-h { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 18px; color: var(--muted); margin: 26px 0 12px; font-weight: 600; }
.beta { font-family: var(--body); font-size: 10px; background: var(--warn); color: #1a1400; padding: 3px 8px; border-radius: 99px; vertical-align: middle; font-weight: 800; letter-spacing: .08em; }

/* ---------- buttons & fields ---------- */
.btn { border: 0; border-radius: 14px; padding: 13px 20px; font-weight: 700; font-size: 15px; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #7af0ff); color: #02131c; box-shadow: 0 8px 24px rgba(70,225,255,.25); }
.btn.ghost { background: var(--panel); border: 1px solid var(--line); }
.btn.big { padding: 16px 28px; font-size: 17px; width: 100%; }
.btn.sm { padding: 9px 14px; font-size: 14px; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; margin-top: 14px; font-size: 14px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; font-size: 18px; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.ghosted { visibility: hidden; }
.field { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 16px; }
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field.sm { padding: 9px 12px; font-size: 15px; width: auto; }
.field.code { text-transform: uppercase; letter-spacing: .25em; max-width: 170px; }
.lbl { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .08em; }
.lbl .field { margin-top: 8px; }
.lbl.inline { display: flex; align-items: center; gap: 8px; margin: 0; text-transform: none; letter-spacing: 0; font-size: 14px; }
.lbl.inline .field { margin: 0; }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row .field:not(.sm) { flex: 1; min-width: 180px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 10px 16px; font-weight: 600; white-space: nowrap; }
.chip.on { background: rgba(70,225,255,.14); border-color: var(--accent); color: var(--accent); }
.seg-sm { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg-sm button { background: none; border: 0; padding: 8px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg-sm button.on { background: var(--panel2); color: var(--text); }

/* ---------- layout ---------- */
.app { max-width: 760px; margin: 0 auto; min-height: 100%; }
.screen { padding: max(14px, env(safe-area-inset-top)) 18px 24px; animation: fade .25s ease; }
.screen.tabbed { padding-bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
.screen.full { min-height: 100dvh; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-height: 44px; }
.appbar-right { display: flex; align-items: center; gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h3 { margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8,13,22,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--accent); }
@media (min-width: 760px) { .tabbar { max-width: 760px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; } }

/* ---------- home ---------- */
.player-chip { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px 5px 5px; font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #02131c;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); font-family: var(--display); font-size: 18px; }
.streak { display: flex; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 8px 12px; }
.streak b { font-family: var(--display); font-size: 20px; line-height: 1; }
.streak.zero .flame { filter: grayscale(1); opacity: .5; }
.hello { margin: 6px 0 16px; }
.hello h1 { margin-bottom: 10px; }
.mode-pill { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.mode-pill.cam { color: var(--good); border-color: rgba(47,210,122,.4); }
.mode-pill::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.today div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.today b { display: block; font-family: var(--display); font-size: 32px; line-height: 1; }
.today span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }

.modes { display: grid; gap: 12px; }
@media (min-width: 640px) { .modes { grid-template-columns: 1fr 1fr; } }
.game-card { --c1: #46e1ff; --c2: #1b6cff; position: relative; overflow: hidden; display: flex; align-items: stretch; gap: 14px; text-align: left; width: 100%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 22%, var(--panel)), var(--panel) 60%); border: 1px solid color-mix(in srgb, var(--c1) 30%, var(--line));
  border-radius: 20px; padding: 16px; transition: transform .12s, border-color .12s; }
.game-card:active { transform: scale(.98); }
.game-card:hover { border-color: var(--c1); }
.game-card.gm-grid { --c1: #46e1ff; } .game-card.gm-wide { --c1: #b6ff3d; } .game-card.gm-call { --c1: #ff7a59; } .game-card.gm-recall { --c1: #b28cff; } .game-card.shoot { --c1: #ffc93d; }
.gc-art { flex: 0 0 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: var(--c1);
  background: color-mix(in srgb, var(--c1) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 35%, transparent); }
.gc-art svg { width: 44px; height: 44px; }
.gc-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gc-body .tag { font-size: 11px; color: var(--c1); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.gc-body strong { font-family: var(--display); font-size: 26px; text-transform: uppercase; line-height: 1; letter-spacing: .01em; }
.gc-body .desc { color: var(--muted); font-size: 14px; line-height: 1.35; }
.gc-body .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.gc-go { align-self: center; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c1); color: #04121a; font-size: 14px; flex: 0 0 40px; }
.ladder { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-top: 8px; }
.ladder i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); }
.ladder i.done { background: var(--c1); }
.ladder i.cur { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }

.plan { background: linear-gradient(135deg, rgba(70,225,255,.14), rgba(182,255,61,.06)); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-top: 16px; }
.plan h3 { margin: 0 0 4px; font-family: var(--display); text-transform: uppercase; font-size: 20px; }
.plan .note { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.plan-items { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; text-align: left; }
.plan-item.done { border-color: var(--good); }
.plan-item b { display: block; font-size: 14px; }
.plan-item span { color: var(--muted); font-size: 12px; }

/* ---------- welcome / wizard ---------- */
.wz { max-width: 480px; margin: 0 auto; padding-top: 6vh; }
.wz-step { animation: fade .3s ease; }
.hero-art svg { width: 100%; max-width: 280px; display: block; margin: 0 auto 24px; }
.wz-nav { display: flex; gap: 10px; margin-top: 24px; }
.wz-nav .btn { flex: 1; }
.wz-err { color: var(--bad); font-size: 14px; min-height: 1em; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 12px; }
.opt.on, .opt:hover { border-color: var(--accent); }
.opt.on { box-shadow: 0 0 0 1px var(--accent) inset; background: rgba(70,225,255,.07); }
.opt-ico { font-size: 28px; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--bg2); flex: 0 0 52px; }
.opt b { display: block; font-size: 16px; }
.opt small { color: var(--muted); font-size: 13px; }

/* ---------- setup ---------- */
.steps-dots { display: flex; gap: 6px; }
.steps-dots i { width: 28px; height: 5px; border-radius: 3px; background: var(--line); }
.steps-dots i.on { background: var(--accent); }
.su-layout { display: grid; gap: 18px; }
@media (min-width: 700px) and (orientation: landscape) { .su-layout { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.cam { position: relative; background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--line); }
.cam video, .cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.cam canvas { cursor: crosshair; touch-action: none; }
.cam.mirror video { transform: scaleX(-1); }
.cam-badge { position: absolute; left: 10px; top: 10px; padding: 6px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.cam-badge:empty { display: none; }
.cam-badge.good { color: var(--good); } .cam-badge.warn { color: var(--warn); } .cam-badge.bad { color: var(--bad); }
.checks { list-style: none; padding: 0; margin: 12px 0; }
.checks li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--line); color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent2); font-weight: 800; }
.checks b { color: var(--text); }
.corner-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 120px; margin: 6px 0 14px; }
.corner-guide i { font-style: normal; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--panel2); color: var(--muted); font-weight: 800; }
.corner-guide i:nth-child(3) { order: 4; } .corner-guide i:nth-child(4) { order: 3; }
.corner-guide i.done { background: var(--accent2); color: #142000; }
.corner-guide i.next { outline: 2px solid var(--accent); color: var(--text); }
.mini-board { width: 100%; max-width: 300px; aspect-ratio: 3/2; background: var(--bg2); border-radius: 12px; border: 1px solid var(--line); display: block; }
.adv { color: var(--muted); margin: 10px 0 0; font-size: 14px; }
.adv summary { cursor: pointer; }

/* ---------- play ---------- */
.play { padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  height: 100dvh; display: flex; flex-direction: column; max-width: none; }
.app:has(#play:not([hidden])) { max-width: none; }
.hud { display: flex; align-items: center; gap: 12px; padding: 0 4px 8px; }
.hud-title { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; text-transform: uppercase; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-nums { display: flex; gap: 16px; }
.hud-num { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hud-num small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.hud-num b { font-family: var(--display); font-size: 30px; font-variant-numeric: tabular-nums; }
.hud-num.big b { font-size: 40px; color: var(--accent); }
#hud-score.hit { color: var(--good); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.timebar { height: 5px; background: var(--panel); border-radius: 3px; overflow: hidden; margin: 0 4px 10px; }
.timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transform-origin: left; }
.timebar.low i { background: var(--bad); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { opacity: .4; } }
#board { flex: 1; width: 100%; min-height: 0; border-radius: 20px; background: radial-gradient(ellipse at center, #10203a, #060a12 75%); touch-action: none; border: 1px solid var(--line); }

/* ---------- results ---------- */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.results { max-width: 520px; margin: 4vh auto 0; text-align: center; position: relative; z-index: 6; }
.big-score { font-family: var(--display); font-weight: 800; font-size: clamp(110px, 30vw, 170px); line-height: .9; background: linear-gradient(180deg, #fff, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars { display: flex; justify-content: center; gap: 10px; margin: 10px 0 4px; }
.stars i { font-style: normal; font-size: 46px; color: #263349; transform: scale(.6); transition: transform .35s cubic-bezier(.3,1.8,.5,1), color .2s; }
.stars i.on { color: var(--warn); transform: scale(1); text-shadow: 0 0 18px rgba(255,201,61,.6); }
.level-msg { font-weight: 700; font-size: 18px; margin: 8px 0 0; }
.best { color: var(--muted); margin: 6px 0 0; }
.rank-note { color: var(--accent); font-weight: 600; min-height: 1em; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; text-align: left; }
@media (min-width: 560px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metrics.two { grid-template-columns: 1fr 1fr; margin-top: 0; }
.metrics.three { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.metrics div { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.metrics span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.metrics b { font-family: var(--display); font-size: 24px; }
.metrics b span { display: inline; font-size: inherit; color: inherit; margin: 0; letter-spacing: 0; text-transform: none; font-weight: inherit; }
.res-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.res-actions .btn.ghost { width: 100%; }

/* ---------- progress ---------- */
.chart { width: 100%; height: 140px; display: block; margin-top: 14px; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { aspect-ratio: 1; border-radius: 8px; background: #111b2b; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.day.l1 { background: #12475a; color: #fff; } .day.l2 { background: #1f86a3; color: #fff; } .day.l3 { background: var(--accent); color: #031018; font-weight: 700; }
.day.today { outline: 2px solid var(--accent2); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.empty { color: var(--muted); text-align: center; padding: 24px; white-space: normal; }

/* ---------- ranks ---------- */
.board { list-style: none; padding: 0; margin: 8px 0 16px; }
.board li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.board li.me { border-color: var(--accent); background: rgba(70,225,255,.08); }
.board .pos { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--muted); text-align: center; }
.board li:nth-child(1) .pos { color: #ffd23d; } .board li:nth-child(2) .pos { color: #d7e1ee; } .board li:nth-child(3) .pos { color: #e09b5a; }
.board .who b { display: block; } .board .who small { color: var(--muted); font-size: 12px; }
.board .sc { font-family: var(--display); font-size: 28px; font-weight: 800; }
.board .placeholder { display: block; text-align: center; color: var(--muted); background: none; border: 1px dashed var(--line); }

/* ---------- me ---------- */
.players { display: flex; gap: 10px; flex-wrap: wrap; }
.pl { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; width: 72px; font-size: 13px; color: var(--muted); }
.pl .avatar { width: 54px; height: 54px; font-size: 26px; opacity: .55; }
.pl.on { color: var(--text); font-weight: 700; } .pl.on .avatar { opacity: 1; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.pl.add .avatar { background: var(--panel2); color: var(--muted); border: 1px dashed var(--line); opacity: 1; }
.teamlist { padding-left: 18px; margin: 0; }

/* ---------- shooting ---------- */
.call { font-family: var(--display); font-size: clamp(40px, 10vw, 64px); font-weight: 800; text-transform: uppercase; color: var(--warn); margin: 0 0 14px; line-height: 1; }
.cam.net { cursor: crosshair; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  background: var(--panel2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: fade .2s; width: max-content; max-width: 90vw; text-align: center; }

/* ---------- shooting hub ---------- */
.s-head { flex: 1; min-width: 0; text-align: center; }
.s-head h2 { font-size: 26px; }
.s-head p { margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-layout { display: grid; gap: 14px; }
@media (min-width: 700px) and (orientation: landscape) { .s-layout { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.app:has(#shoot:not([hidden])) { max-width: 1100px; }
.shot-flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 800; font-size: clamp(34px, 8vw, 60px);
  text-transform: uppercase; padding: 6px 18px; border-radius: 14px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); animation: pop .25s cubic-bezier(.3,1.6,.5,1); pointer-events: none; }
.shot-flash.good { color: var(--good); } .shot-flash.bad { color: var(--bad); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.cam-warn { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; background: rgba(0,0,0,.7); padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--warn); }
.call { font-family: var(--display); font-size: clamp(48px, 12vw, 84px); font-weight: 800; text-transform: uppercase; color: var(--warn); margin: 0 0 10px; line-height: .95; text-align: center; }
.s-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.s-stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.s-stats span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.s-stats b { font-family: var(--display); font-size: 36px; line-height: 1.05; }
.net-diagram { width: 100%; aspect-ratio: 6 / 4; display: block; margin-top: 12px; background: linear-gradient(180deg, #0c1626, #08101c); border-radius: 14px; border: 1px solid var(--line); }
.s-actions { display: flex; gap: 8px; margin-top: 12px; }
.s-actions .btn { flex: 1; }
.msg.accent { color: var(--accent); }
.sr-top { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.big-score.sm { font-size: clamp(80px, 22vw, 120px); }
#s-results { text-align: center; }
.zone-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.zone-grid div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; }
.zone-grid span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.zone-grid b { font-family: var(--display); font-size: 22px; }
.shoot-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .shoot-grid { grid-template-columns: 1fr 1fr; } }

.today-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border-radius: 20px; border: 1px solid rgba(255,201,61,.35);
  background: linear-gradient(135deg, rgba(255,201,61,.16), rgba(255,122,89,.06) 60%, var(--panel)); }
.goal-ring { position: relative; width: 64px; height: 64px; flex: 0 0 64px; }
.goal-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 7; }
.goal-ring .track { stroke: rgba(255,255,255,.08); }
.goal-ring .fill { stroke: var(--warn); stroke-linecap: round; stroke-dasharray: 169.6; stroke-dashoffset: 169.6; transition: stroke-dashoffset .6s ease; }
.goal-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 20px; }
.tc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-body .tag { font-size: 11px; color: var(--warn); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.tc-body strong { font-family: var(--display); font-size: 24px; text-transform: uppercase; line-height: 1; }
.tc-body .desc { color: var(--muted); font-size: 13px; }
.game-card.shoot-free { --c1: #46e1ff; } .game-card.shoot-call { --c1: #ffc93d; } .game-card.shoot-world { --c1: #b28cff; } .game-card.shoot-quick { --c1: #ff7a59; } .game-card.shoot-daily { --c1: #b6ff3d; }
.game-card.compact .desc { font-size: 13px; }
.heat-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; }
.s-layout.done .cam { display: none; }
@media (orientation: portrait) { .s-layout.live .cam { max-height: 32vh; aspect-ratio: auto; height: 32vh; } }

.hero-icon { display: block; margin: 0 auto 28px; border-radius: 30px; box-shadow: 0 20px 60px rgba(70,225,255,.25); }
.help details { border-top: 1px solid var(--line); padding: 12px 0; }
.help details:first-of-type { border-top: 0; }
.help summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.help details[open] summary::after { content: "–"; }
.help p { color: var(--muted); margin: 8px 0 0; line-height: 1.5; font-size: 14px; }
.chart.empty { height: 44px; }
.net-diagram { max-width: 440px; margin-left: auto; margin-right: auto; }
.net-diagram.big { max-width: 520px; }

.tips { list-style: none; padding: 0; margin: 12px 0 4px; }
.tips li { position: relative; padding: 6px 0 6px 24px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.tips li::before { content: "•"; position: absolute; left: 8px; color: var(--accent2); font-weight: 800; }
#s-setup .lbl { margin-top: 14px; }
.scan-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6,10,18,.55); backdrop-filter: blur(2px);
  font-family: var(--display); font-size: clamp(22px, 5vw, 34px); text-transform: uppercase; font-weight: 800; text-align: center; padding: 16px; }
.scan-overlay small { display: block; font-family: var(--body); font-size: 14px; text-transform: none; font-weight: 500; color: var(--muted); margin-top: 6px; }

.surface-tip { background: rgba(182,255,61,.08); border: 1px solid rgba(182,255,61,.3); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0 0; }
.surface-tip:empty { display: none; }

/* ---------- your data / deletion ---------- */
.consent { align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 12px; }
.consent input { margin-top: 2px; flex: 0 0 18px; }
.consent a, .danger-zone a { color: var(--accent); }
.dz-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dz-row b { display: block; font-size: 15px; }
.dz-row small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.btn.danger { color: var(--bad); border-color: rgba(255,77,94,.4); white-space: nowrap; }
dialog.confirm { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 20px; padding: 22px; max-width: 420px; width: calc(100% - 32px); }
dialog.confirm::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
dialog.confirm h3 { margin: 0 0 8px; font-family: var(--display); text-transform: uppercase; font-size: 26px; }
dialog.confirm p { color: var(--muted); line-height: 1.5; margin: 0; }
.btn.danger-fill { background: var(--bad); color: #fff; box-shadow: none; }
.btn.danger-fill:disabled { opacity: .4; }

/* camera thumbnail during a game */
.board-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.board-wrap #board { flex: 1; }
.play-cam { position: absolute; right: 10px; bottom: 10px; width: 22%; max-width: 170px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.25); background: #000; box-shadow: 0 6px 20px rgba(0,0,0,.5); opacity: .85; pointer-events: none; }
.play-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-cam video.mirror { transform: scaleX(-1); }
.play-cam span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.play-cam span:empty { display: none; }

/* ---------- form check ---------- */
.game-card.form-card { --c1: #ff7a59; margin-bottom: 4px; }
.fc-layout { display: grid; gap: 14px; }
@media (min-width: 700px) and (orientation: landscape) { .fc-layout { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.app:has(#form:not([hidden])) { max-width: 1100px; }
.fc-stage { aspect-ratio: 16 / 9; }
.fc-stage.mirror video { transform: scaleX(-1); }
.fc-layout.done .fc-stage { display: none; }
.fc-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: clamp(80px, 22vw, 160px); color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.fc-top { display: flex; align-items: center; gap: 16px; }
.fc-ring { position: relative; width: 110px; height: 110px; flex: 0 0 110px; }
.fc-ring svg { width: 110px; height: 110px; transform: rotate(-90deg); }
.fc-ring circle { fill: none; stroke-width: 9; }
.fc-ring .track { stroke: rgba(255,255,255,.08); }
.fc-ring .fill { stroke: var(--good); stroke-linecap: round; stroke-dasharray: 276.5; stroke-dashoffset: 276.5; transition: stroke-dashoffset .9s ease; }
.fc-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 44px; }
.fc-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fc-tips li { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; line-height: 1.4; }
.fc-tips b { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--hot, #ff7a59); color: #1a0700; display: grid; place-items: center; font-weight: 800; }
.fc-replay-wrap { position: relative; margin-top: 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 9; }
.fc-replay-wrap canvas { width: 100%; height: 100%; display: block; }
.fc-frame { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.fc-frame.rel { color: #b6ff3d; }
.fc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fc-metric { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.fc-metric span { font-size: 12px; color: var(--muted); }
.fc-metric b { font-family: var(--display); font-size: 22px; }
.fc-metric em { font-style: normal; font-size: 12px; font-weight: 700; }
.fc-metric.good em { color: var(--good); } .fc-metric.ok em { color: var(--warn); } .fc-metric.work em { color: var(--bad); } .fc-metric.na em { color: var(--muted); }
.pf-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- Sign-in box (shared by app, coach, admin) ---------- */
.auth { display: grid; gap: 4px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 6px 0 8px; }
.auth-tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; padding: 10px; border-radius: 9px; cursor: pointer; }
.auth-tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 4px 14px rgba(0,0,0,.25); }
.auth-intro { margin: 2px 0 4px; }
.auth-h { margin: 4px 0 2px; font-size: 16px; }
.auth-form { display: grid; gap: 12px; margin-top: 6px; }
.auth-form .lbl { display: block; margin: 0; }
.auth-form .btn.big { margin-top: 4px; }
.auth-form .btn.sm { justify-self: start; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .field { padding-right: 64px; }
.lbl .pw-wrap { margin-top: 8px; }
.lbl .pw-wrap .field { margin-top: 0; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 8px; cursor: pointer; }
.auth-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.auth-links .linkish { margin-top: 8px; padding: 0; cursor: pointer; }
.auth-msg:empty { display: none; }
.auth-msg { margin-top: 8px; }
.auth-change { margin-top: 14px; }
.auth-change summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 14px; }
.auth-change[open] summary { margin-bottom: 4px; }

/* ---------- Shot Session ---------- */
.game-card.session-card { --c1: #b6ff3d; margin-bottom: 12px; }
.ss-stage.mirror video { transform: scaleX(-1); }
.ss-live { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ss-live > div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.ss-live .eyebrow { margin: 0; }
.ss-live b { display: block; font-family: var(--display, "Barlow Condensed"), sans-serif; font-weight: 800; font-size: 56px; line-height: 1; margin-top: 4px; }
#ss-shots { color: var(--accent2); }
.ss-bar { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.ss-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transform-origin: left; transition: transform .2s linear; }

/* ---------- Inbox + reports ---------- */
.inbox-btn { position: relative; }
.inbox-btn .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent2); color: #08130a; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.ib-wrap { padding: 0 16px 40px; max-width: 760px; margin: 0 auto; }
.inbox-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.inbox-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--text); font: inherit; cursor: pointer; }
.inbox-item .ib-body { flex: 1; display: grid; gap: 3px; }
.inbox-item .dot { width: 9px; height: 9px; border-radius: 99px; background: transparent; flex: none; }
.inbox-item.unread .dot { background: var(--accent2); box-shadow: 0 0 10px rgba(182,255,61,.6); }
.inbox-item.unread b { color: #fff; }
.empty-state { text-align: center; padding: 40px 10px; display: grid; gap: 8px; justify-items: center; }
.report { display: grid; gap: 14px; }
.rp-title { font-size: 30px; margin: 0 0 4px; }
.rp-head .eyebrow { margin-bottom: 4px; }
.rp-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .rp-tiles { grid-template-columns: 1fr 1fr; } }
.rp-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; }
.rp-tile span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rp-tile b { font-family: var(--display, "Barlow Condensed"), sans-serif; font-size: 34px; font-weight: 800; line-height: 1.05; }
.rp-tile em { font-style: normal; color: var(--muted); font-size: 12px; }
.rp-focus { background: linear-gradient(135deg, rgba(255,122,89,.14), rgba(255,122,89,.04)); border: 1px solid rgba(255,122,89,.4); border-radius: 18px; padding: 16px 18px; }
.rp-focus.good { background: linear-gradient(135deg, rgba(47,210,122,.14), rgba(47,210,122,.04)); border-color: rgba(47,210,122,.4); }
.rp-focus .eyebrow { color: #ff9a7f; margin: 0 0 4px; }
.rp-focus.good .eyebrow { color: var(--good); }
.rp-focus h3 { margin: 0 0 2px; font-size: 22px; }
.rp-drill { margin: 10px 0 0; line-height: 1.5; }
.rp-trend { margin: 0; color: var(--text); }
.rp-shots { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rp-shots li { display: grid; grid-template-columns: 26px 46px 44px 58px 1fr; gap: 8px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.rp-shots .n { color: var(--muted); font-weight: 700; }
.rp-shots .t, .rp-shots .rl { color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-shots .sc { font-weight: 800; font-size: 16px; }
.rp-shots .sc.good { color: var(--good); } .rp-shots .sc.ok { color: var(--warn); } .rp-shots .sc.work { color: var(--bad); }
.rp-shots .tp { color: var(--text); font-size: 13px; line-height: 1.35; }
@media (max-width: 560px) { .rp-shots li { grid-template-columns: 22px 40px 40px 1fr; } .rp-shots .rl { display: none; } }
.app:has(#session:not([hidden])) { max-width: 1100px; }

/* ---------- Weekly Challenge card ---------- */
.weekly-card { margin: 12px 0; padding: 16px 18px; border-radius: 20px; display: grid; gap: 6px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,201,61,.18), transparent 55%), linear-gradient(135deg, #1a1608, #0f1828 70%);
  border: 1px solid rgba(255,201,61,.45); }
.weekly-card .tag { color: var(--warn); }
.wk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wk-ends { font-size: 12px; font-weight: 700; color: var(--warn); }
.weekly-card strong { font-family: var(--display); font-size: 26px; text-transform: uppercase; line-height: 1.05; }
.weekly-card .desc { color: var(--muted); font-size: 14px; }
.wk-prize { background: rgba(255,201,61,.12); border: 1px dashed rgba(255,201,61,.5); color: #ffe39a; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.wk-me { font-size: 13px; color: var(--text); }
.wk-actions { margin-top: 4px; }
.wk-actions .linkish { margin: 0 0 0 auto; }

/* ---------- Leaderboard age groups ---------- */
.rk-ages { margin-top: 2px; }
.rk-ages .chip.mine:not(.on) { border-color: rgba(70,225,255,.45); }
.rk-ages .chip.mine::after { content: " ·  you"; font-weight: 600; opacity: .6; font-size: 12px; }
.rk-setage { margin: 10px 0; }
.rk-setage .msg { margin: 0 0 8px; }

/* ---------- Home: compact game tiles on phones ---------- */
.section-h small { font-family: Inter, system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; margin-left: 6px; opacity: .8; }
.ai-grid .game-card { margin-bottom: 0; }
@media (max-width: 639px) {
  .shoot-grid, .modes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shoot-grid .game-card, .modes .game-card { flex-direction: column; gap: 8px; padding: 14px; min-height: 150px; }
  .shoot-grid .gc-art, .modes .gc-art { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; }
  .shoot-grid .gc-art svg, .modes .gc-art svg { width: 30px; height: 30px; }
  .shoot-grid .gc-body strong, .modes .gc-body strong { font-size: 20px; }
  .shoot-grid .gc-body .tag, .modes .gc-body .tag { font-size: 10px; letter-spacing: .08em; }
  .shoot-grid .gc-body .desc, .modes .gc-body .desc, .shoot-grid .gc-go, .modes .gc-go { display: none; }
  .shoot-grid .gc-body .meta, .modes .gc-body .meta { margin-top: auto; font-size: 11px; }
  .modes .ladder { margin-top: 2px; }
}

/* ---------- Me: shortcuts ---------- */
.me-who { margin: 4px 0 0; }
.me-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px; }
.me-links > * { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 6px; min-height: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; color: var(--text); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.me-links svg { width: 24px; height: 24px; color: var(--accent); }
.me-links b { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent2); color: #08130a; font-size: 11px; display: grid; place-items: center; }

/* ---------- accessibility basics ---------- */
.icon-btn { width: 44px; height: 44px; }
button:focus-visible, a:focus-visible, summary:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
