:root {
  --ink: oklch(17% 0.018 118);
  --ink-deep: oklch(12% 0.014 118);
  --surface: oklch(22% 0.022 118);
  --surface-high: oklch(28% 0.027 118);
  --line: oklch(34% 0.028 118);
  --paper: oklch(94% 0.025 95);
  --muted: oklch(69% 0.034 112);
  --cyan: oklch(90% 0.21 125);
  --cyan-deep: oklch(27% 0.07 125);
  --warm: oklch(74% 0.18 48);
  --warm-surface: oklch(24% 0.05 48);
  --go: oklch(86% 0.22 132);
  --no: oklch(67% 0.22 28);
  --display: "DIN Condensed", "Avenir Next Condensed", "Pretendard Variable", sans-serif;
  --body: "Avenir Next", "Pretendard Variable", "SUIT Variable", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", monospace;
  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 24px;
  --space-lg: clamp(38px, 5vw, 64px);
  --space-xl: clamp(64px, 8vw, 104px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { background: var(--ink-deep); }
body { margin: 0; color: var(--paper); font-family: var(--body); background: var(--ink-deep); min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }
.qz-languages { display: flex; gap: 2px; width: max-content; margin-bottom: 12px; }
.rail-foot > .qz-languages { grid-column: 1 / -1; }
.qz-languages button { min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--line); color: var(--muted); background: var(--ink-deep); font: 800 11px/1 var(--mono); cursor: pointer; }
.qz-languages button[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: var(--ink-deep); }
.qz-languages button:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.qz-languages-mobile { display: none; }
html[lang="en"] .game-card > strong { font-size: clamp(18px, 1.65vw, 23px); line-height: 1.12; }
html[lang="en"] .game-standing-row > b { font-size: 12px; }
html[lang="en"] .game-standing-row > .game-standing-tier { font-size: 11px; }
html[lang="en"] .game-filter button { white-space: nowrap; }
html[lang="en"] .option-buttons button { min-width: 0; overflow-wrap: anywhere; }
html[lang="en"] .page-head h1 { font-size: clamp(38px, 5.4vw, 76px); }
@media (max-width: 720px) {
  .qz-languages-mobile { display: flex; position: relative; z-index: 30; margin: 8px 20px -16px auto; }
  .qz-languages-mobile button { min-height: 44px; min-width: 44px; }
  html[lang="en"] .mobile-item { font-size: 10px; }
  html[lang="en"] .training-page .page-head h1 { font-size: 38px; }
  html[lang="en"] .game-card > strong { font-size: 19px; }
  html[lang="en"] .result-actions, html[lang="en"] .onboarding-actions { min-width: 0; }
}
button:disabled { cursor: not-allowed; opacity: .48; }

.app-frame { display: grid; grid-template-columns: 190px minmax(500px, 1fr) 260px; min-height: 100dvh; max-width: 1720px; margin: 0 auto; background-color: var(--ink); background-image: repeating-linear-gradient(135deg, transparent 0 46px, color-mix(in oklch, var(--line) 13%, transparent) 46px 47px); }
.rail { position: sticky; top: 0; height: 100dvh; padding: 30px 18px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--ink-deep); }
.brand { display: flex; gap: 10px; align-items: center; color: var(--paper); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .12em; white-space: nowrap; }
.brand i { color: var(--cyan); font-style: normal; }
.brand-mark { width: 22px; height: 15px; background: var(--cyan); clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%); transform: skewX(-8deg); }
.rail-nav { display: grid; gap: 5px; margin-top: clamp(70px, 12vh, 130px); }
.nav-item { appearance: none; border: 0; background: transparent; padding: 15px 12px; color: var(--muted); display: grid; grid-template-columns: 30px 1fr; text-align: left; cursor: pointer; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav-item:hover { color: var(--paper); transform: translateX(3px); }
.nav-item.is-active { color: var(--ink-deep); background: var(--cyan); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.nav-item b { color: var(--cyan); font: 10px var(--mono); }
.nav-item.is-active b { color: var(--ink-deep); }
.nav-item span { font-size: 14px; font-weight: 650; }
/* A pending incoming duel marks its nav entry; the dot sits on the label so it
   survives both the rail and the mobile bar. */
.nav-item, .mobile-item { position: relative; }
.nav-item.has-alert span::after, .mobile-item.has-alert::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 7px; border-radius: 50%; background: var(--warm); animation: alert-pulse 2s ease-in-out infinite; }
.mobile-item.has-alert::after { position: absolute; top: 10px; right: calc(50% - 22px); margin: 0; }
@keyframes alert-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.rail-foot { margin-top: auto; display: grid; grid-template-columns: 8px 1fr; gap: 6px 8px; align-items: center; color: var(--muted); font: 10px var(--mono); letter-spacing: .08em; }
.rail-foot small { grid-column: 2; opacity: .65; }
.platform-return { grid-column: 1 / -1; margin-top: 14px; color: var(--cyan); font: 800 10px var(--mono); text-decoration: none; letter-spacing: .08em; }
.rail-policies { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px 12px; }
.rail-policies a { color: var(--muted); font-size: 9px; text-underline-offset: 3px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }

main { min-width: 0; min-height: 100dvh; }
.page { max-width: 1040px; margin: 0 auto; padding: clamp(42px, 6vw, 82px) clamp(28px, 5vw, 68px) 100px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; }
.page-head.compact { align-items: center; }
.eyebrow { color: var(--cyan); font: 700 11px var(--mono); letter-spacing: .13em; }
h1, h2, p { margin-top: 0; }
/* keep-all stops Korean display headings from breaking mid-word
   ("리그화합니/다."); break-word still saves unbreakable long tokens. */
h1, h2, h3 { word-break: keep-all; overflow-wrap: break-word; }
h1 { margin: 16px 0 0; font-family: var(--display); font-size: clamp(46px, 6vw, 80px); font-stretch: condensed; line-height: .94; letter-spacing: -.055em; }
h2 { font-size: clamp(21px, 2.3vw, 29px); letter-spacing: -.025em; }
.lead { max-width: 58ch; color: var(--muted); font-size: 17px; line-height: 1.75; }
.streak { display: grid; grid-template-columns: 1fr auto; align-items: end; min-width: 125px; border-top: 1px solid var(--line); padding-top: 10px; }
.streak span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.streak strong { font: 700 48px/1 var(--mono); }
.streak small { color: var(--warm); font: 10px var(--mono); margin: 0 0 6px 6px; }

.daily-panel { position: relative; width: 100%; min-height: 190px; margin: clamp(46px, 7vw, 78px) 0; padding: 28px; border: 1px solid oklch(36% .04 76); border-radius: 2px; color: var(--paper); text-align: left; background: var(--warm-surface); cursor: pointer; display: grid; grid-template-columns: 55px 1fr auto; gap: 22px; align-items: center; overflow: hidden; }
.daily-panel:hover .daily-action b { transform: translateX(5px); }
.daily-index { align-self: start; color: var(--warm); font: 12px var(--mono); }
.daily-copy { display: grid; gap: 9px; z-index: 1; }
.daily-copy small { color: var(--warm); font: 10px var(--mono); letter-spacing: .12em; }
.daily-copy strong { font: 700 clamp(23px, 3vw, 34px)/1.16 var(--display); }
.daily-copy em { color: oklch(77% .035 76); font-size: 13px; font-style: normal; }
.daily-action { align-self: end; color: var(--warm); font-size: 13px; font-weight: 700; }
.daily-action b { display: inline-block; transition: transform .2s ease-out; }
.daily-rule { position: absolute; right: -12px; top: -40px; width: 210px; height: 260px; border: 1px solid oklch(36% .04 76); transform: rotate(18deg); }
.daily-challenge { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin: -42px 0 clamp(55px, 8vw, 86px); padding: 18px 2px; border-bottom: 1px solid var(--line); }
.daily-challenge > div { display: grid; gap: 5px; }
.daily-challenge strong { font: 700 17px var(--display); }
.daily-challenge small { color: var(--muted); font-size: 11px; }
.daily-challenge button { flex: 0 0 auto; min-height: 44px; border: 0; padding: 0 4px; color: var(--warm); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }

.section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-title h2 { margin: 8px 0 0; }
.section-title > span { color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.mode-list { border-top: 1px solid var(--line); }
.mode-group-label { padding: 24px 4px 9px; color: var(--muted); border-bottom: 1px solid var(--line); font: 10px var(--mono); letter-spacing: .12em; }
.mode-group-label:first-child { padding-top: 12px; }
.mode-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 21px 4px; background: transparent; text-align: left; cursor: pointer; transition: background .18s ease, padding .18s ease; }
.mode-row:not(:disabled):hover { background: var(--surface); padding-left: 15px; padding-right: 15px; }
.mode-row:disabled { cursor: default; opacity: .47; }
.mode-number { color: var(--cyan); font: 11px var(--mono); }
.mode-copy { display: grid; gap: 5px; }
.mode-copy strong { font: 700 20px var(--display); }
.mode-copy small { color: var(--muted); font-size: 12px; }
.mode-status { color: var(--muted); font: 10px var(--mono); }
.mode-row:not(:disabled) .mode-status { color: var(--cyan); }

.telemetry { position: sticky; top: 0; height: 100dvh; border-left: 1px solid var(--line); background: var(--ink-deep); padding: 30px 22px; overflow: hidden; }
.telemetry-head { display: flex; justify-content: space-between; color: var(--muted); font: 10px var(--mono); letter-spacing: .09em; }
.ready-number { position: relative; height: 220px; margin: 35px -22px 20px; overflow: hidden; border-block: 1px solid var(--line); background: var(--cyan); color: var(--ink-deep); }
.ready-number span { position: absolute; top: 18px; left: 22px; font: 800 14px var(--mono); }
.ready-number strong { position: absolute; right: -14px; bottom: -36px; font: 900 190px/.8 var(--display); letter-spacing: -.08em; transform: skewX(-7deg); }
.grid-line { stroke: var(--surface-high); stroke-width: 1; fill: none; }
.wave { stroke: var(--cyan); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.telemetry-data { margin: 0; }
.telemetry-data div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.telemetry-data dt { color: var(--muted); font-size: 11px; }
.telemetry-data dd { margin: 0; color: var(--paper); font: 10px var(--mono); text-align: right; }
.accuracy-note { position: absolute; bottom: 28px; left: 22px; right: 22px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.accuracy-note b { display: block; margin-bottom: 8px; color: var(--warm); font: 10px var(--mono); letter-spacing: .12em; }
.mobile-nav { display: none; }

.arena-kickoff { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); }
.arena-kickoff h1 { max-width: 740px; font-size: clamp(54px, 7.4vw, 102px); }
.arena-kickoff h1 span, .arena-kickoff h1 em { display: block; }
.arena-kickoff h1 em { color: var(--cyan); font-style: normal; white-space: nowrap; }
.arena-kickoff p { max-width: 45ch; margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.arena-kickoff .streak { flex: 0 0 120px; }
.quick-start-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(230px, .75fr); gap: 12px; margin-top: var(--space-lg); }
.warmup-main { position: relative; min-height: 360px; border: 0; padding: 30px; color: var(--ink-deep); background: var(--cyan); text-align: left; cursor: pointer; overflow: hidden; clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%); transition: transform .24s cubic-bezier(.16,1,.3,1), filter .2s ease; }
.warmup-main:hover { transform: translateY(-4px); filter: saturate(1.12); }
.warmup-main:active { transform: translateY(1px) scale(.995); }
.play-number { position: absolute; top: 29px; right: 30px; font: 800 12px var(--mono); }
.play-copy { position: relative; z-index: 1; display: grid; align-content: end; height: 100%; max-width: 440px; }
.play-copy small { font: 800 10px var(--mono); letter-spacing: .12em; }
.play-copy strong { margin-top: 10px; font: 900 clamp(45px, 6vw, 76px)/.9 var(--display); letter-spacing: -.055em; }
.play-copy em { margin-top: 15px; font-size: 13px; font-style: normal; font-weight: 650; }
.warmup-main > b { position: absolute; z-index: 1; right: 30px; bottom: 28px; font: 850 12px var(--mono); }
.warmup-main > b i { font-size: 18px; font-style: normal; }
.ghost-time { position: absolute; top: 25px; left: -8px; color: color-mix(in oklch, var(--ink-deep) 9%, transparent); font: 900 230px/.8 var(--display); letter-spacing: -.1em; transform: skewX(-7deg); }
.quick-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.quick-side button { position: relative; display: grid; align-content: end; min-height: 174px; border: 1px solid var(--line); padding: 24px; color: var(--paper); background: var(--surface); text-align: left; cursor: pointer; overflow: hidden; transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .2s ease; }
.quick-side button:last-child { color: var(--ink-deep); border-color: var(--warm); background: var(--warm); }
.quick-side button:hover { border-color: var(--cyan); transform: translateX(4px); }
.quick-side span { position: absolute; top: 20px; left: 24px; color: var(--muted); font: 800 10px var(--mono); letter-spacing: .1em; }
.quick-side button:last-child span { color: color-mix(in oklch, var(--ink-deep) 70%, transparent); }
.quick-side strong { font: 850 27px var(--display); }
.quick-side small { margin-top: 5px; color: var(--muted); }
.quick-side button:last-child small { color: color-mix(in oklch, var(--ink-deep) 70%, transparent); }
.quick-side b { position: absolute; top: 20px; right: 22px; font: 800 10px var(--mono); }
/* ================= Result coaching ================= */
.coach-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-top: 34px; border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 3px; padding: 20px 22px; background: var(--surface); }
.coach-panel[data-tone="good"] { border-left-color: var(--go); }
.coach-panel[data-tone="warn"] { border-left-color: var(--warm); }
.coach-copy { display: grid; gap: 7px; }
.coach-copy strong { font: 750 16px/1.55 var(--display); }
.coach-copy small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.coach-next { display: grid; gap: 4px; justify-items: end; min-height: 48px; border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; background: transparent; color: var(--paper); text-align: right; cursor: pointer; }
.coach-next small { color: var(--muted); font: 700 10px var(--mono); }
.coach-next b { color: var(--cyan); font: 800 13px var(--display); }
.coach-next:hover { border-color: var(--cyan); }

/* ================= Routine report ================= */
.report-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.report-head h1 { margin-top: 10px; font-size: clamp(32px, 4.4vw, 52px); }
.report-score { display: grid; justify-items: end; gap: 6px; border: 1px solid var(--line); border-radius: 3px; padding: 14px 18px; }
.report-score small { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.report-score strong { font: 900 34px var(--display); }
.report-score[data-tone="good"] strong { color: var(--go); }
.report-score[data-tone="warn"] strong { color: var(--warm); }
.report-lead { max-width: 60ch; margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.report-steps { margin: 30px 0 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.report-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 16px 4px; }
.report-step:last-child { border-bottom: 0; }
.report-step > i { color: var(--muted); font: 800 11px var(--mono); font-style: normal; }
.report-step strong { display: block; font: 750 16px var(--display); }
.report-step small { color: var(--muted); font: 700 11px var(--mono); }
.report-step[data-tone="good"] small { color: var(--go); }
.report-step[data-tone="warn"] small { color: var(--warm); }
.report-step > b { font: 800 22px var(--display); }
.report-step > b em { margin-left: 4px; color: var(--muted); font: 700 11px var(--mono); font-style: normal; }
.report-reward { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border-block: 1px solid var(--line); }
.report-reward > div { display: grid; gap: 8px; border-right: 1px solid var(--line); padding: 16px 14px; }
.report-reward > div:last-child { border-right: 0; }
.report-reward small { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.report-reward strong { font: 800 20px var(--display); }
.game-presets { margin-top: var(--space-xl); }
.game-presets .section-title > button { min-height: 44px; border: 0; color: var(--cyan); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.preset-list { display: flex; border-block: 1px solid var(--line); }
.preset-list button { flex: 1; display: grid; gap: 6px; min-height: 132px; border: 0; border-right: 1px solid var(--line); padding: 23px 20px; color: var(--paper); background: transparent; text-align: left; cursor: pointer; transition: color .18s ease, background .18s ease; }
.preset-list button:last-child { border: 0; }
.preset-list button:hover { color: var(--ink-deep); background: var(--cyan); }
.preset-list span { color: var(--warm); font: 800 10px var(--mono); letter-spacing: .12em; }
.preset-list button:hover span, .preset-list button:hover small { color: var(--ink-deep); }
.preset-list strong { margin-top: auto; font: 800 20px var(--display); }
.preset-list small { color: var(--muted); font-size: 10px; }
.training-page .page-head { align-items: end; }
.training-count { display: grid; justify-items: end; color: var(--cyan); }
.training-count strong { font: 900 78px/.8 var(--display); }
.training-count span { margin-top: 10px; font: 800 10px var(--mono); letter-spacing: .14em; }
.training-page > .lead { margin: 28px 0 var(--space-lg); }
.profile-settings { width: 100%; min-height: 58px; margin-top: var(--space-lg); border: 1px solid var(--line); color: var(--paper); background: var(--surface); cursor: pointer; font-weight: 750; }
.profile-settings:hover { color: var(--ink-deep); border-color: var(--cyan); background: var(--cyan); }

.filter-bar { display: flex; gap: 12px; align-items: center; margin: 48px 0 22px; }
#history-filters { display: grid; grid-template-columns: auto minmax(150px, 180px) minmax(160px, 1fr) auto; }
.filter-bar label { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.filter-bar select { min-width: 160px; min-height: 42px; border: 1px solid var(--line); border-radius: 0; padding: 0 36px 0 12px; color: var(--paper); background: var(--surface); }
.filter-bar > span { color: var(--muted); font-size: 11px; }
.filter-bar button { border: 1px solid var(--line); border-radius: 2px; padding: 9px 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.filter-bar button.is-active { border-color: var(--cyan); color: var(--ink); background: var(--cyan); }
.big-stat { display: grid; justify-items: end; }
.big-stat small { color: var(--muted); font: 10px var(--mono); }
.big-stat strong { margin-top: 8px; font: 700 30px var(--mono); }
.history-chart { background: var(--surface); padding: 18px; min-height: 300px; }
.chart-label { display: flex; justify-content: space-between; color: var(--muted); font: 10px var(--mono); }
.history-chart svg { width: 100%; height: 260px; overflow: visible; }
.empty-chart { display: grid; place-content: center; justify-items: center; gap: 7px; height: 240px; color: var(--muted); text-align: center; font-size: 12px; }
.empty-chart strong { color: var(--paper); font-size: 15px; }
.empty-chart button { min-height: 44px; margin-top: 12px; border: 0; border-bottom: 1px solid var(--cyan); color: var(--cyan); background: transparent; cursor: pointer; }
.history-list { margin-top: 20px; }
.weekly-web { margin: 0 0 18px; padding: 20px; border: 1px solid oklch(36% .04 76); background: var(--warm-surface); }
.weekly-web small { color: var(--warm); font: 10px var(--mono); letter-spacing: .1em; }
.weekly-web strong { display: block; margin-top: 10px; font: 700 22px var(--display); }
.weekly-web p { margin: 7px 0 0; color: oklch(77% .035 76); font-size: 12px; }
.badge-web { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 22px; }
.badge-web span { flex: 0 0 auto; padding: 10px 12px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.badge-web b { display: block; margin-bottom: 4px; color: var(--cyan); font: 10px var(--mono); }
.history-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.history-item span { color: var(--muted); font: 11px var(--mono); }
.history-item > small { padding: 5px 7px; border: 1px solid var(--line); color: var(--muted); font: 700 9px var(--mono); white-space: nowrap; }
.history-item strong { font: 700 14px var(--mono); }
.history-empty { padding: 26px 4px; border-block: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.dashboard-page { max-width: 1120px; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); }
.dashboard-head h1 { max-width: 760px; font-size: clamp(48px, 5.8vw, 78px); }
.dashboard-head time { flex: 0 0 auto; padding-bottom: 7px; color: var(--warm); font: 800 10px var(--mono); letter-spacing: .1em; }
.dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); margin-top: var(--space-lg); border: 1px solid var(--line); }
.readiness-panel { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 30px; min-height: 260px; padding: 34px; color: var(--ink-deep); background: var(--cyan); }
.readiness-ring { --score: 0; position: relative; display: grid; place-items: center; width: 160px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--ink-deep) calc(var(--score) * 1%), color-mix(in oklch, var(--ink-deep) 16%, transparent) 0); transform: rotate(-36deg); }
.readiness-ring::before { position: absolute; inset: 14px; border-radius: 50%; content: ''; background: var(--cyan); }
.readiness-ring > div { position: relative; z-index: 1; display: grid; justify-items: center; transform: rotate(36deg); }
.readiness-ring strong { font: 900 54px/.9 var(--display); }
.readiness-ring small { margin-top: 8px; font: 800 10px var(--mono); letter-spacing: .12em; }
.readiness-panel .eyebrow { color: color-mix(in oklch, var(--ink-deep) 72%, transparent); }
.readiness-panel h2 { max-width: 12em; margin: 14px 0 8px; font: 900 32px/.98 var(--display); }
.readiness-panel p { max-width: 42ch; margin: 0; color: color-mix(in oklch, var(--ink-deep) 75%, transparent); font-size: 11px; line-height: 1.6; }
.readiness-start { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 44px; margin-top: 20px; padding: 0 16px; border: 1px solid var(--ink-deep); color: var(--ink-deep); background: transparent; font: 850 11px var(--body); cursor: pointer; transition: color .18s ease, background .18s ease, transform .18s ease; }
.readiness-start:hover { color: var(--cyan); background: var(--ink-deep); transform: translateY(-2px); }
.readiness-start:active { transform: translateY(0); }
.readiness-start[hidden] { display: none; }
.dashboard-stats { display: grid; grid-template-rows: repeat(3, 1fr); background: var(--ink-deep); }
.dashboard-stats > div { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.dashboard-stats > div:last-child { border: 0; }
.dashboard-stats small { grid-column: 1 / -1; color: var(--muted); font: 800 10px var(--mono); letter-spacing: .11em; }
.dashboard-stats strong { font: 900 28px/.9 var(--display); }
.dashboard-stats span { color: var(--warm); font-size: 10px; }
.dashboard-chart-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(250px, .65fr); gap: 12px; margin-top: 12px; }
.trend-panel, .weekly-load-panel, .skill-panel, .activity-panel { min-width: 0; border: 1px solid var(--line); background: var(--ink-deep); }
.trend-panel { padding: 28px 28px 18px; }
.weekly-load-panel { display: grid; grid-template-rows: auto 1fr auto; min-height: 390px; padding: 28px 24px 22px; color: var(--ink-deep); border-color: var(--warm); background: var(--warm); }
.chart-head { display: flex; align-items: start; justify-content: space-between; gap: 22px; }
.chart-head h2 { margin: 8px 0 0; font: 850 25px var(--display); }
.chart-head > strong { font: 900 42px/.8 var(--display); }
.chart-head > small { color: var(--muted); font: 800 10px var(--mono); letter-spacing: .1em; }
.dashboard-page #history-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin: 0; }
.dashboard-page #history-filters select { width: auto; min-width: 112px; min-height: 38px; border-color: var(--line); background-color: var(--surface); font-size: 10px; }
.dashboard-page .history-chart { min-height: 280px; margin-top: 24px; padding: 0; background: transparent; }
.dashboard-page .history-chart svg { height: 260px; }
.trend-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.trend-area { fill: color-mix(in oklch, var(--cyan) 10%, transparent); }
.trend-line { fill: none; stroke: var(--cyan); stroke-width: 4; stroke-linecap: square; stroke-linejoin: bevel; stroke-dasharray: 1000; animation: chart-draw .8s cubic-bezier(.16,1,.3,1) both; }
.trend-dot { fill: var(--cyan); stroke: var(--ink-deep); stroke-width: 3; opacity: 0; animation: chart-point .35s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(.45s + var(--delay)); }
.trend-value { fill: var(--paper); font: 800 10px var(--mono); text-anchor: middle; }
.trend-hint { fill: var(--muted); font: 700 10px var(--mono); text-anchor: middle; }
.weekly-load-panel .eyebrow { color: color-mix(in oklch, var(--ink-deep) 70%, transparent); }
.weekly-bars { display: flex; align-items: end; justify-content: space-between; gap: 7px; min-height: 210px; margin-top: 22px; }
.weekly-bars > div { flex: 1; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 6px; height: 100%; }
.weekly-bars span { display: flex; align-items: end; width: 100%; height: 100%; border-bottom: 1px solid color-mix(in oklch, var(--ink-deep) 35%, transparent); }
.weekly-bars i { display: block; width: 100%; min-height: 3px; height: 100%; background: var(--ink-deep); transform: scaleY(var(--bar-scale)); transform-origin: bottom; animation: bar-rise .65s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--delay); }
.weekly-bars b { font: 800 10px var(--mono); }
.weekly-bars small { font-size: 10px; }
.weekly-load-panel > p { margin: 18px 0 0; color: color-mix(in oklch, var(--ink-deep) 70%, transparent); font-size: 10px; }
.skill-activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.skill-panel, .activity-panel { min-height: 390px; padding: 28px; }
.skill-panel svg { display: block; width: min(100%, 410px); margin: 10px auto 0; overflow: visible; }
.radar-ring, .radar-spoke { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-data { fill: color-mix(in oklch, var(--cyan) 24%, transparent); stroke: var(--cyan); stroke-width: 3; transform-origin: 180px 145px; animation: radar-open .65s cubic-bezier(.16,1,.3,1) both; }
.radar-dot { fill: var(--cyan); }
.radar-label { fill: var(--paper); font: 750 10px var(--body); text-anchor: middle; }
.radar-score { fill: var(--warm); font: 800 10px var(--mono); text-anchor: middle; }
.activity-heatmap { display: grid; grid-template-columns: repeat(14, 1fr); gap: 7px; margin-top: 55px; }
.activity-heatmap i { aspect-ratio: 1; border: 1px solid var(--line); background: var(--surface); opacity: 0; animation: heat-in .3s cubic-bezier(.16,1,.3,1) forwards; animation-delay: var(--delay); }
.activity-heatmap i[data-level="1"] { background: color-mix(in oklch, var(--cyan) 28%, var(--surface)); }
.activity-heatmap i[data-level="2"] { background: color-mix(in oklch, var(--cyan) 48%, var(--surface)); }
.activity-heatmap i[data-level="3"] { background: color-mix(in oklch, var(--cyan) 72%, var(--surface)); }
.activity-heatmap i[data-level="4"] { border-color: var(--cyan); background: var(--cyan); }
.heatmap-legend { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 12px; color: var(--muted); font: 10px var(--mono); }
.heatmap-legend i { width: 9px; aspect-ratio: 1; background: var(--surface); }
.heatmap-legend i:nth-of-type(2) { background: color-mix(in oklch, var(--cyan) 38%, var(--surface)); }
.heatmap-legend i:nth-of-type(3) { background: color-mix(in oklch, var(--cyan) 68%, var(--surface)); }
.heatmap-legend i:nth-of-type(4) { background: var(--cyan); }
.activity-panel > p { max-width: 42ch; margin: 38px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.dashboard-page .weekly-web { margin: 12px 0 0; }
.career-panel { margin-top: 64px; }
.career-body { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; gap: 22px; margin-top: 22px; }
.career-preview { margin: 0; padding: 14px; border: 1px solid var(--line); background: var(--ink-deep); }
.career-preview img { display: block; width: 100%; height: auto; }
.career-side { display: grid; align-content: start; gap: 16px; }
.career-side p { margin: 0; max-width: 22ch; font: 750 26px/1.15 var(--display); }
.career-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.career-actions .primary-button { min-width: 230px; }
.career-actions button[disabled] { opacity: .45; cursor: not-allowed; }
.career-side small { max-width: 44ch; color: var(--muted); font-size: 11px; line-height: 1.65; }
#career-status { color: var(--cyan); font: 11px var(--mono); }
#career-status:empty, #career-grade-note:empty { display: none; }
#career-grade-note { color: var(--warm); }
.career-panel.is-empty .career-preview { display: none; }
.dashboard-more { margin-top: 48px; border-top: 1px solid var(--line); }
.dashboard-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 92px; padding: 18px 2px; cursor: pointer; list-style: none; }
.dashboard-more > summary::-webkit-details-marker { display: none; }
.dashboard-more > summary > span { display: grid; gap: 6px; }
.dashboard-more > summary small { color: var(--cyan); font: 800 9px var(--mono); letter-spacing: .12em; }
.dashboard-more > summary strong { font: 850 24px var(--display); }
.dashboard-more > summary em { color: var(--muted); font-size: 10px; font-style: normal; }
.dashboard-more-action { flex: 0 0 auto; min-width: 74px; color: var(--cyan); font: 800 10px var(--mono); text-align: right; }
.dashboard-more-action i { font-style: normal; }
.dashboard-more-action i:last-child { display: none; }
.dashboard-more[open] .dashboard-more-action i:first-child { display: none; }
.dashboard-more[open] .dashboard-more-action i:last-child { display: inline; }
.dashboard-more-body { padding-top: 12px; border-top: 1px solid var(--line); }
.dashboard-more .season-panel { margin: 0; }
.dashboard-more .badge-web { margin: 20px 0 0; }
.dashboard-more .career-panel { margin-top: 48px; }
.keep-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin: 22px 0 0; padding: 22px 24px; border: 1px solid oklch(36% .04 76); background: var(--warm-surface); }
.keep-panel .eyebrow { color: var(--warm); }
.keep-panel strong { display: block; margin-top: 10px; font: 700 22px var(--display); }
.keep-panel p { max-width: 62ch; margin: 8px 0 0; color: oklch(77% .035 76); font-size: 12px; line-height: 1.7; }
.keep-panel .primary-button { min-width: 190px; }
.result-page .keep-panel { margin-top: 26px; }
@media (max-width: 720px) {
  .keep-panel { grid-template-columns: minmax(0, 1fr); }
  .keep-panel .primary-button { min-width: 0; width: 100%; }
}

.shared-page { max-width: 1120px; }
.shared-body { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: start; gap: 26px; margin-top: var(--space-lg); }
.shared-body .career-side p { font-size: 30px; }
/* A friend code is nine fixed-width characters, so it cannot shrink to share a
   row with the callsign on a phone. */
.shared-page .streak strong { font-size: clamp(22px, 6vw, 40px); }
@media (max-width: 720px) {
  .career-body, .shared-body { grid-template-columns: minmax(0, 1fr); }
  .career-actions .primary-button { min-width: 0; flex: 1 1 100%; }
  .shared-body .career-side p { font-size: 24px; }
  .shared-page .page-head { flex-wrap: wrap; gap: 18px; }
  .shared-page .streak { flex: 1 0 100%; min-width: 0; }
}

.open-challenge-page { max-width: 1120px; }
.challenge-callout { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-lg); margin-top: clamp(42px, 7vw, 88px); }
.challenge-callout h1 { max-width: 760px; font-size: clamp(52px, 7vw, 92px); }
.challenge-callout p { max-width: 52ch; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.challenge-count { display: grid; justify-items: end; gap: 8px; min-width: 112px; padding-top: 14px; border-top: 1px solid var(--line); }
.challenge-count small { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .12em; }
.challenge-count strong { font: 850 42px/1 var(--display); }
.challenge-target { position: relative; margin-top: var(--space-lg); border-block: 1px solid var(--line); padding: clamp(22px, 4vw, 42px) 0; overflow: hidden; }
.challenge-target::after { position: absolute; right: -120px; bottom: -185px; width: 420px; aspect-ratio: 1; border: 52px solid color-mix(in oklch, var(--cyan) 8%, transparent); border-radius: 50%; content: ''; pointer-events: none; }
.challenge-target-head, .challenge-target-foot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.challenge-target-head span, .challenge-target-head time { color: var(--muted); font: 750 10px var(--mono); letter-spacing: .12em; }
.challenge-scoreboard { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 88px minmax(0, .68fr); align-items: center; gap: 24px; min-height: 260px; }
.challenge-scoreboard > b { color: var(--warm); font: 900 38px var(--display); text-align: center; transform: skewX(-8deg); }
.challenge-score-owner, .challenge-score-you { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; }
.challenge-score-owner small, .challenge-score-you small { grid-column: 1 / -1; margin-bottom: 7px; color: var(--cyan); font: 750 12px var(--mono); letter-spacing: .08em; overflow-wrap: anywhere; }
.challenge-score-owner strong, .challenge-score-you strong { font: 900 clamp(92px, 15vw, 180px)/.8 var(--display); letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.challenge-score-owner span { color: var(--cyan); font: 850 28px var(--display); }
.challenge-score-you { opacity: .48; }
.challenge-score-you small { color: var(--muted); }
.challenge-score-you span { color: var(--muted); font: 700 10px var(--mono); }
.challenge-target-foot span { color: var(--warm); font: 800 14px var(--display); }
.challenge-target-foot strong { color: var(--cyan); font: 850 16px var(--mono); letter-spacing: .12em; }
.challenge-launch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, auto); align-items: center; gap: 32px; margin-top: 28px; }
.challenge-launch strong { font: 750 22px var(--display); }
.challenge-launch p { max-width: 58ch; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.challenge-launch .primary-button { min-width: 240px; }
.challenge-feedback { min-height: 1.5em; margin: 16px 0 0; color: var(--warm); font-size: 12px; line-height: 1.6; }
.challenge-feedback.is-error { color: var(--no); }

@media (max-width: 720px) {
  .challenge-callout { grid-template-columns: 1fr; gap: 22px; }
  .challenge-count { justify-items: start; }
  .challenge-scoreboard { grid-template-columns: minmax(0, 1fr) 44px minmax(0, .62fr); gap: 8px; min-height: 200px; }
  .challenge-score-owner strong, .challenge-score-you strong { font-size: clamp(72px, 25vw, 112px); }
  .challenge-score-owner span { font-size: 20px; }
  .challenge-scoreboard > b { font-size: 26px; }
  .challenge-target-foot { align-items: flex-end; }
  .challenge-target-foot strong { max-width: 12ch; text-align: right; }
  .challenge-launch { grid-template-columns: 1fr; gap: 18px; }
  .challenge-launch .primary-button { min-width: 0; width: 100%; min-height: 52px; }
}

.recent-records { margin-top: 42px; }
@keyframes chart-draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes chart-point { from { opacity: 0; transform: scale(.5); transform-origin: center; } to { opacity: 1; transform: scale(1); } }
@keyframes bar-rise { from { transform: scaleY(0); } }
@keyframes radar-open { from { opacity: 0; transform: scale(.35) rotate(-8deg); } to { opacity: 1; transform: scale(1); } }
@keyframes heat-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }

.duel-page .page-head { max-width: 600px; }
.duel-setup { border: 1px solid var(--line); padding: 20px; margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duel-setup legend { padding-inline: 8px; color: var(--cyan); font: 700 11px var(--mono); }
.duel-setup label { display: grid; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; }
.duel-setup input, .duel-setup select { width: 100%; min-height: 44px; padding: 10px; color: var(--paper); background: var(--ink-deep); border: 1px solid var(--line); border-radius: 0; font: inherit; }
.duel-setup:disabled { opacity: .58; }
.duel-summary { margin: 20px 0 12px; color: var(--paper); line-height: 1.6; overflow-wrap: anywhere; }
.duel-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.duel-board { position: relative; margin-top: 50px; border: 1px solid var(--line); height: min(58vh, 540px); display: grid; grid-template-rows: 1fr 1fr; }
.duel-board { touch-action: none; user-select: none; }
.duel-board:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.duel-board.is-go .player { color: var(--ink); background: var(--go); }
.duel-board.is-fake .player { background: var(--surface-high); }
.duel-board.is-win-one .player.one, .duel-board.is-win-two .player.two { color: var(--ink); background: var(--warm); animation: winner-flash .7s cubic-bezier(.16,1,.3,1) both; }
.player { display: grid; place-items: center; align-content: center; gap: 15px; }
.player span { color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; }
.player b { font: 700 38px var(--display); }
.player.two { transform: rotate(180deg); background: var(--surface); }
.player.one { color: var(--cyan); background: var(--cyan-deep); }
.versus { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: auto; min-width: 72px; min-height: 50px; max-width: 90%; padding: 10px 16px; border: 1px solid var(--line); background: var(--ink); font: 700 11px var(--mono); text-align: center; }
.duel-rounds { margin-top: 32px; }
.duel-rounds h3 { font-size: 24px; }
.duel-rounds p { color: var(--muted); line-height: 1.7; }
.duel-rounds ol { padding: 0; list-style: none; }
.duel-rounds li { border-top: 1px solid var(--line); padding: 16px 0; line-height: 1.7; overflow-wrap: anywhere; }
.duel-board .player span { max-width: 95%; overflow-wrap: anywhere; color: inherit; }
@media (max-width: 600px) { .duel-setup { grid-template-columns: 1fr; } }

.setting-list { margin-top: 48px; border-top: 1px solid var(--line); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-row span { display: grid; gap: 5px; }
.setting-row strong { font-size: 16px; }
.setting-row small { color: var(--muted); }
.setting-row input { position: absolute; opacity: 0; }
.setting-row i { width: 44px; height: 24px; padding: 3px; background: var(--surface-high); border-radius: 20px; transition: background .2s ease; }
.setting-row i::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s ease-out, background .2s ease; }
.setting-row input:checked + i { background: var(--cyan); }
.setting-row input:checked + i::after { transform: translateX(20px); background: var(--ink); }
.principle { margin-top: 70px; max-width: 620px; }
.principle h2 { margin: 14px 0; font-size: 28px; }
.principle p { color: var(--muted); line-height: 1.75; }
.principle code { color: var(--paper); font-family: var(--mono); }
.danger-link { margin-top: 36px; border: 0; border-bottom: 1px solid var(--no); padding: 8px 0; color: var(--no); background: transparent; cursor: pointer; font-size: 12px; }

.sync-status { min-width: 142px; display: grid; grid-template-columns: 9px 1fr; gap: 4px 9px; align-items: center; padding: 12px 0; border-block: 1px solid var(--line); }
.league-page { max-width: 1120px; }
.league-page .page-head h1 { max-width: 8.5em; font-size: clamp(44px, 5vw, 60px); }
.league-page .page-head p { margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.sync-status span { grid-row: 1 / 3; width: 8px; aspect-ratio: 1; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 4px color-mix(in oklch, var(--go) 13%, transparent); }
.sync-status small { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.sync-status strong { font: 11px var(--mono); }
.identity-strip { display: grid; grid-template-columns: 1.2fr 1fr 1fr; margin: 58px 0 30px; border-block: 1px solid var(--line); }
.identity-strip > div { min-height: 96px; padding: 18px 20px 18px 0; display: grid; align-content: space-between; border-right: 1px solid var(--line); }
.identity-strip > div + div { padding-left: 20px; }
.identity-strip > div:last-child { border: 0; }
.identity-strip small { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.identity-strip strong, .identity-strip button { font: 750 17px var(--display); letter-spacing: .02em; }
.identity-strip button { width: max-content; border: 0; padding: 10px 10px 10px 0; margin: -10px -10px -10px 0; color: var(--paper); background: transparent; cursor: pointer; }
.identity-strip button span { margin-left: 8px; color: var(--cyan); font: 10px var(--mono); }
/* Inline callsign editor: replaces the whole strip while editing. The generic
   .identity-strip button rules above are display-state styling, so every
   button in here restates its own look at higher specificity. */
.identity-strip .callsign-editor { grid-column: 1 / -1; display: grid; gap: 14px; padding: 18px 0; }
.callsign-row { display: flex; gap: 10px; }
.callsign-row input { flex: 1; max-width: 340px; border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; color: var(--paper); background: var(--ink-deep); font: 750 16px var(--display); letter-spacing: .02em; }
.callsign-row input:focus { outline: 2px solid var(--cyan); outline-offset: 0; }
.identity-strip .callsign-editor button { margin: 0; font: 700 12px var(--body); }
.identity-strip .callsign-editor #callsign-roll { padding: 0 14px; border: 1px solid var(--line); color: var(--paper); }
.identity-strip .callsign-editor #callsign-roll:hover { border-color: var(--cyan); color: var(--cyan); }
.identity-strip .callsign-editor .primary-button { padding: 12px 20px; color: var(--ink-deep); background: var(--cyan); font-weight: 800; }
.identity-strip .callsign-editor .secondary-button { padding: 12px 16px; border: 1px solid var(--line); color: var(--paper); }
.callsign-actions { display: flex; align-items: center; gap: 12px; }
.callsign-actions em { color: var(--muted); font-size: 11px; font-style: normal; }
.callsign-actions em.is-error { color: var(--no); }
/* 종목 탭 레일: 무엇으로 겨룰 수 있는지가 첫눈에 보이고, 탭 한 번으로 갈아탄다. */
.mode-rail { display: flex; gap: 8px; margin: 34px 0 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.mode-rail::-webkit-scrollbar { display: none; }
.mode-tab { flex: 0 0 auto; scroll-snap-align: center; display: grid; gap: 3px; justify-items: start; min-height: 58px; border: 1px solid var(--line); border-radius: 4px; padding: 10px 16px 12px; color: var(--muted); background: var(--ink-deep); cursor: pointer; text-align: left; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.mode-tab i { font: 800 9px var(--mono); font-style: normal; letter-spacing: .12em; opacity: .7; }
.mode-tab b { font: 750 15px var(--display); letter-spacing: .02em; }
.mode-tab:hover { border-color: var(--cyan); color: var(--paper); }
.mode-tab.is-active { border-color: var(--cyan); color: var(--paper); background: var(--cyan-deep); }
.mode-tab.is-active i { color: var(--cyan); opacity: 1; }

/* 내 순위 카드: 한 계단 위의 이름과 격차를 보여줘 순위표를 목표로 만든다. */
.my-rank { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: clamp(16px, 3vw, 34px); margin: 16px 0 18px; border: 1px solid var(--cyan); border-radius: 4px; padding: 18px 22px; background: linear-gradient(105deg, var(--cyan-deep), var(--ink-deep) 62%); }
.my-rank-main span { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.my-rank-main strong { display: flex; align-items: baseline; gap: 14px; margin-top: 6px; font: 850 38px/1 var(--display); }
.my-rank.is-king { border-color: var(--warm); background: linear-gradient(105deg, var(--warm-surface), var(--ink-deep) 62%); }
.my-rank.is-king .my-rank-main strong { font-size: 28px; color: var(--warm); }
.my-rank-jump { border: 0; padding: 0; color: var(--cyan); background: transparent; cursor: pointer; font: 700 10px var(--mono); text-decoration: underline; text-underline-offset: 3px; }
.my-rank-gap { display: grid; gap: 4px; justify-items: end; text-align: right; }
.my-rank-gap span { color: var(--muted); font: 10px var(--mono); }
.my-rank-gap b { font: 850 24px var(--mono); color: var(--cyan); }
.my-rank.is-king .my-rank-gap b { color: var(--warm); }
.my-rank-gap b small { color: var(--muted); font-size: 10px; }
.my-rank-gap em { color: var(--muted); font-size: 10px; font-style: normal; }
.my-rank-cta { min-height: 48px; border: 0; border-radius: 3px; padding: 0 20px; color: var(--ink-deep); background: var(--cyan); cursor: pointer; font: 800 13px var(--display); letter-spacing: .02em; transition: filter .15s ease, transform .15s ease; }
.my-rank-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }
.my-rank.is-king .my-rank-cta { background: var(--warm); }

.league-controls { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; margin: 20px 0 18px; }
.ranking-control-group, .ranking-select { display: grid; gap: 8px; }
.ranking-control-group > small, .ranking-select > span { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.segmented { display: flex; border-bottom: 1px solid var(--line); }
.segmented button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 18px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.segmented button.is-active { border-bottom-color: var(--cyan); color: var(--paper); }
.league-controls select { appearance: none; min-width: 140px; min-height: 42px; border: 1px solid var(--line); border-radius: 3px; padding: 10px 38px 10px 13px; color: var(--paper); background: var(--surface) linear-gradient(45deg, transparent 50%, var(--cyan) 50%) calc(100% - 15px) 50% / 6px 6px no-repeat; font-size: 12px; }
.rank-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; min-height: 180px; margin-bottom: 10px; }
.podium-place { position: relative; display: grid; align-content: end; min-height: 150px; border: 1px solid var(--line); border-radius: 4px; padding: 20px; background: var(--ink-deep); overflow: hidden; }
.podium-place::before { position: absolute; top: -28px; right: -8px; color: var(--surface-high); font: 900 110px/.8 var(--display); }
.podium-place.rank-1::before { content: '1'; }
.podium-place.rank-2::before { content: '2'; }
.podium-place.rank-3::before { content: '3'; }
.podium-place.rank-1 { min-height: 180px; color: var(--ink-deep); border-color: var(--cyan); background: var(--cyan); }
.podium-place.rank-1:first-child:last-child { grid-column: 2; }
.podium-place.rank-1::before { color: color-mix(in oklch, var(--ink-deep) 9%, transparent); }
.podium-place > span { position: absolute; top: 17px; left: 19px; color: var(--warm); font: 800 10px var(--mono); }
.podium-place.rank-1 > span { color: var(--ink-deep); }
.podium-place > strong { position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 850 20px var(--display); }
.podium-place > small { position: relative; z-index: 1; margin-top: 4px; color: var(--muted); font: 10px var(--mono); }
.podium-place.rank-1 > small { color: color-mix(in oklch, var(--ink-deep) 68%, transparent); }
.podium-place > b { position: relative; z-index: 1; margin-top: 16px; font: 850 22px var(--mono); }
.podium-place > b em { font-size: 10px; font-style: normal; }
.empty-podium { grid-column: 1 / -1; display: grid; place-items: center; min-height: 130px; color: var(--muted); border-block: 1px solid var(--line); font-size: 12px; }
.rank-stage { display: grid; grid-template-columns: minmax(190px, .42fr) 1fr; border: 1px solid var(--line); }
.rank-summary { padding: 26px; background: var(--surface); display: grid; align-content: start; gap: 30px; }
.rank-summary > div { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.rank-summary span { grid-column: 1 / -1; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.rank-summary strong { font: 750 36px/1 var(--display); }
.rank-summary small { color: var(--cyan); font: 10px var(--mono); }
.rank-summary p { align-self: end; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.leaderboard-wrap { min-width: 0; background: var(--ink-deep); }
.leaderboard-head { display: grid; grid-template-columns: 53px 1fr auto; gap: 13px; padding: 13px 20px; color: var(--muted); border-bottom: 1px solid var(--line); font: 10px var(--mono); letter-spacing: .08em; }
.leaderboard-head span:last-child { text-align: right; }
.leaderboard { background: var(--ink-deep); }
.rank-row { min-height: 63px; display: grid; grid-template-columns: 40px 1fr auto; gap: 13px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border: 0; }
.rank-row > b { color: var(--muted); font: 10px var(--mono); }
.rank-row > span { display: grid; gap: 4px; }
.rank-row > span strong { font: 700 13px var(--display); letter-spacing: .02em; }
.rank-row > span small { color: var(--muted); font: 10px var(--mono); letter-spacing: .05em; }
.rank-row > em { color: var(--paper); font: 700 14px var(--mono); font-style: normal; }
.rank-row > em small { color: var(--muted); font-size: 10px; }
.rank-row.is-medal-1 > b { color: var(--warm); font-weight: 800; }
.rank-row.is-medal-2 > b { color: var(--paper); font-weight: 800; }
.rank-row.is-medal-3 > b { color: var(--cyan); font-weight: 800; }
.rank-row.is-you { color: var(--ink); background: var(--cyan); }
.rank-row.is-you > b, .rank-row.is-you > span small, .rank-row.is-you > em, .rank-row.is-you > em small { color: var(--ink); }
.rank-row.is-flash { animation: rank-flash 1.2s ease; }
@keyframes rank-flash { 0%, 45% { box-shadow: inset 0 0 0 2px var(--warm); } }
.ranking-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 58px; border-top: 1px solid var(--line); }
.ranking-pagination button { min-height: 58px; border: 0; padding: 0 20px; color: var(--cyan); background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.ranking-pagination button:last-child { text-align: right; }
.ranking-pagination button:first-child { text-align: left; }
.ranking-pagination span { color: var(--muted); font: 10px var(--mono); }
.friend-lab { display: grid; grid-template-columns: 1fr minmax(280px, .8fr); gap: clamp(35px, 7vw, 80px); margin: 80px 0 72px; padding: 42px 0; border-block: 1px solid var(--line); }
.friend-copy h2 { margin: 12px 0; font: 750 clamp(25px, 3vw, 36px)/1.12 var(--display); }
.friend-copy p { max-width: 50ch; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.friend-form { align-self: center; }
.friend-form label { display: block; margin-bottom: 10px; color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; }
.friend-form > div { display: flex; border-bottom: 2px solid var(--paper); }
.friend-form input { min-width: 0; width: 100%; border: 0; padding: 13px 3px; outline: 0; color: var(--paper); background: transparent; font: 750 20px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.friend-form input::placeholder { color: var(--surface-high); }
.friend-form button { flex: 0 0 auto; border: 0; padding: 0 3px 0 14px; color: var(--cyan); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.friend-form > small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; }
.friend-form > small.is-error { color: var(--no); }
.match-log .section-title { margin-bottom: 10px; }
.match-row { display: grid; grid-template-columns: 55px 1fr auto 52px; gap: 16px; align-items: center; min-height: 72px; border-bottom: 1px solid var(--line); }
.match-outcome { font: 750 10px var(--mono); }
.match-outcome.is-win { color: var(--go); }
.match-outcome.is-loss { color: var(--no); }
.match-outcome.is-draw { color: var(--warm); }
.match-row > div { display: grid; gap: 4px; }
.match-row > div strong { font-size: 13px; }
.match-row > div small, .match-row time { color: var(--muted); font: 10px var(--mono); }
.match-row > b { font: 700 13px var(--mono); }
.match-row time { text-align: right; }
.empty-match { min-height: 120px; display: grid; place-content: center; gap: 6px; text-align: center; color: var(--muted); }
.empty-match strong { color: var(--paper); font-size: 13px; }
.empty-match span { font-size: 11px; }

.challenge-versus { display: grid; grid-template-columns: 1fr 120px 1fr; align-items: stretch; margin: 55px 0 80px; border-block: 1px solid var(--line); }
.challenger { min-height: 230px; display: grid; align-content: center; gap: 12px; padding: 25px; }
.challenger small { color: var(--muted); font: 10px var(--mono); }
.challenger strong { font: 750 clamp(26px, 4vw, 43px)/1 var(--display); }
.challenger span { color: var(--cyan); font: 10px var(--mono); }
.challenger.rival { text-align: right; background: var(--surface); }
.challenger.rival span { color: var(--warm); }
.challenge-mark { display: grid; place-items: center; align-content: center; gap: 13px; border-inline: 1px solid var(--line); background: var(--ink-deep); }
.challenge-mark span, .challenge-mark small { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.challenge-mark b { color: var(--cyan); font: 800 28px var(--display); }
.challenge-setup { display: grid; grid-template-columns: .8fr 1.2fr; gap: 55px; }
.challenge-setup h1 { font-size: clamp(36px, 5vw, 60px); }
.challenge-modes { border-top: 1px solid var(--line); }
.challenge-modes button { width: 100%; min-height: 90px; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--line); padding: 14px 3px; color: var(--paper); background: transparent; text-align: left; cursor: pointer; }
.challenge-modes button:hover { background: var(--surface); }
.challenge-modes span { grid-row: 1 / 3; color: var(--cyan); font: 10px var(--mono); }
.challenge-modes strong { align-self: end; font: 700 18px var(--display); }
.challenge-modes small { align-self: start; color: var(--muted); font-size: 10px; }
.challenge-modes b { grid-column: 3; grid-row: 1 / 3; color: var(--cyan); font-size: 10px; }

.back-button { border: 0; padding: 10px 0; color: var(--muted); background: none; cursor: pointer; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 60px; margin-top: 60px; }
.intro-title p { max-width: 46ch; margin-top: 22px; color: var(--muted); line-height: 1.65; }
.instruction-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.instruction-list li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; border-bottom: 1px solid var(--line); padding: 20px 2px; line-height: 1.45; }
.instruction-list b { color: var(--cyan); font: 10px var(--mono); }
.mode-options { grid-column: 1 / -1; padding: 22px 0; border-block: 1px solid var(--line); }
.option-buttons { display: flex; gap: 8px; margin-top: 14px; }
.option-buttons button { min-width: 130px; min-height: 62px; display: grid; gap: 4px; align-content: center; border: 1px solid var(--line); padding: 8px 13px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.option-buttons button small { font-size: 10px; }
.option-buttons button.is-active { border-color: var(--cyan); color: var(--paper); background: var(--cyan-deep); }
.preflight { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 14px; }
.preflight > div { display: grid; gap: 5px; }
.preflight strong { font-size: 14px; }
.preflight small { color: var(--muted); font-size: 11px; }
.preflight button { min-height: 44px; border: 1px solid var(--cyan); padding: 0 16px; color: var(--cyan); background: transparent; cursor: pointer; }
.preflight.is-error strong { color: var(--no); }
.start-zone { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 50px; }
.start-zone > div { display: grid; gap: 8px; }
.start-zone small { color: var(--muted); font: 10px var(--mono); }
.start-zone strong { font: 700 25px var(--mono); }
.primary-button, .secondary-button { min-height: 56px; border-radius: 0; padding: 0 24px; font-weight: 750; cursor: pointer; }
.primary-button { min-width: 260px; border: 1px solid var(--cyan); color: var(--ink); background: var(--cyan); display: flex; justify-content: space-between; align-items: center; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.primary-button span { font-size: 20px; transition: transform .2s ease; }
.primary-button:hover span { transform: translateX(5px); }
.secondary-button { border: 1px solid var(--line); color: var(--paper); background: var(--surface); }

.test-stage { position: fixed; inset: 0; z-index: 20; color: var(--paper); background: var(--ink); cursor: crosshair; user-select: none; overflow: hidden; }
.test-stage.is-go { color: var(--ink); background: var(--go); }
.test-stage.is-no { color: var(--ink); background: var(--no); }
.test-stage.is-fake { background: var(--surface-high); }
.test-top, .test-bottom { position: absolute; left: 34px; right: 34px; display: flex; justify-content: space-between; font: 10px var(--mono); letter-spacing: .1em; }
.test-top { top: 30px; }
.test-exit { position: absolute; z-index: 4; top: 70px; right: 30px; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: color-mix(in oklch, var(--ink) 88%, transparent); cursor: pointer; font-size: 22px; }
.is-go .test-exit, .is-no .test-exit { border-color: currentColor; color: currentColor; background: transparent; }
.test-bottom { bottom: 30px; color: var(--muted); }
.is-go .test-bottom, .is-no .test-bottom { color: var(--ink); }
.test-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; }
.test-kicker { color: var(--cyan); font: 11px var(--mono); letter-spacing: .16em; }
.is-go .test-kicker, .is-no .test-kicker { color: currentColor; }
.test-center h1 { margin: 13px 0; font-size: clamp(50px, 10vw, 130px); }
.test-center p { color: var(--muted); }
.is-go .test-center p, .is-no .test-center p { color: currentColor; }
.arcade-target { position: absolute; z-index: 2; width: var(--size, 64px); height: var(--size, 64px); border: 0; border-radius: 50%; color: var(--ink); background: var(--cyan); cursor: crosshair; transform: translate(-50%, -50%); }
.sequence-node { position: absolute; z-index: 2; width: 58px; height: 58px; transform: translate(-50%, -50%); border: 0; border-radius: 50%; color: var(--paper); background: var(--surface-high); font: 750 16px var(--mono); cursor: pointer; }

.result-head { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 3px solid var(--cyan); }
.result-head h1 { font-size: clamp(34px, 5vw, 58px); }
.result-head h1 { max-width: 13ch; word-break: keep-all; }
.result-stamp { display: grid; place-items: center; width: 74px; aspect-ratio: 1; color: var(--ink-deep); background: var(--cyan); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); font: 900 34px var(--display); }
.result-hero { display: flex; align-items: end; margin: 52px 0 34px; }
.result-hero strong { font: 900 clamp(100px, 16vw, 190px)/.78 var(--display); letter-spacing: -.075em; transform: skewX(-4deg); }
.result-hero span { margin: 0 0 4px 20px; color: var(--cyan); font: 700 27px var(--mono); }
.result-device { width: fit-content; margin: -17px 0 28px; padding: 7px 10px; border: 1px solid color-mix(in oklch, var(--cyan) 48%, var(--line)); color: var(--cyan); background: color-mix(in oklch, var(--cyan) 8%, transparent); font: 700 10px var(--mono); }
.result-rank { --tier: #c9a227; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr); align-items: center; min-height: 124px; margin-bottom: 14px; padding: 20px 24px; border: 1px solid color-mix(in oklch, var(--tier) 48%, var(--line)); background: var(--surface); overflow: hidden; }
.result-rank::before { position: absolute; inset: 0 auto 0 0; width: 5px; content: ''; background: var(--tier); }
.result-rank[data-tier="iron"] { --tier: #777b78; }
.result-rank[data-tier="bronze"] { --tier: #b6754f; }
.result-rank[data-tier="silver"] { --tier: #a9bbc2; }
.result-rank[data-tier="gold"] { --tier: #d4a72c; }
.result-rank[data-tier="platinum"] { --tier: #5cc3ae; }
.result-rank[data-tier="emerald"] { --tier: #38b878; }
.result-rank[data-tier="diamond"] { --tier: #67a8ef; }
.result-rank[data-tier="master"] { --tier: #b67ae8; }
.result-rank[data-tier="grandmaster"] { --tier: #e95f68; }
.result-rank[data-tier="challenger"] { --tier: #64d7df; }
.result-rank > div:not(.rank-sigil) { display: grid; gap: 7px; }
.result-rank small { color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; }
.result-rank strong { color: var(--paper); font: 750 clamp(22px, 3vw, 31px) var(--display); }
.rank-tier { text-align: right; }
.rank-tier span { color: var(--tier); font: 700 10px var(--mono); letter-spacing: .08em; }
.rank-sigil { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 7px; color: var(--tier); }
.rank-sigil i { height: 1px; background: currentColor; opacity: .5; }
.rank-sigil b { position: relative; display: grid; place-items: center; width: 44px; aspect-ratio: 1; font: 800 12px var(--mono); }
.rank-sigil b::before { position: absolute; inset: 6px; border: 1px solid currentColor; content: ''; transform: rotate(45deg); }
.result-rank > p { grid-column: 1 / -1; margin: 15px 0 0; text-align: center; color: var(--muted); font-size: 10px; }
.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.metric-strip > div { min-height: 95px; padding: 18px; display: grid; align-content: space-between; border-right: 1px solid var(--line); }
.metric-strip > div:last-child { border: 0; }
.metric-strip small { color: var(--muted); font: 10px var(--mono); }
.metric-strip strong { font: 700 18px var(--display); }
.round-trace { margin-top: 46px; }
.round-trace > div { display: flex; align-items: end; gap: 10px; height: 160px; margin-top: 15px; }
.round-bar { flex: 1; min-width: 20px; display: grid; align-content: end; justify-items: center; gap: 7px; height: 100%; }
.round-bar i { width: 100%; min-height: 12px; background: var(--surface-high); }
.round-bar.is-best i { background: var(--cyan); }
.round-bar span { font: 10px var(--mono); }
.round-bar small { color: var(--muted); font: 10px var(--mono); }
.daily-tag-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; margin-top: 46px; padding: 26px 0; border-block: 1px solid var(--line); }
.daily-tag-panel > div:first-child { display: grid; gap: 6px; }
.daily-tag-panel strong { font-size: 15px; }
.daily-tag-panel small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.tag-options { display: flex; flex-wrap: wrap; gap: 7px; align-content: center; justify-content: flex-end; }
.tag-options button { min-height: 42px; border: 1px solid var(--line); padding: 0 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.tag-options button.is-active { border-color: var(--warm); color: var(--ink); background: var(--warm); opacity: 1; }
.unlock-panel { margin-top: 32px; padding: 24px; color: var(--ink); background: var(--warm); }
.unlock-panel .eyebrow { color: var(--ink); }
.unlock-panel > div { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in oklch, var(--ink) 25%, transparent); }
.unlock-panel b { font: 10px var(--mono); }
.unlock-panel strong { font: 750 18px var(--display); }
.result-burst { position: fixed; z-index: 0; inset: 0; pointer-events: none; opacity: 0; background: repeating-conic-gradient(from 8deg at 50% 20%, transparent 0 8deg, color-mix(in oklch, var(--cyan) 13%, transparent) 8deg 9deg); }
.result-page > *:not(.result-burst) { position: relative; z-index: 1; }
.result-burst.is-active { animation: result-burst .85s cubic-bezier(.16,1,.3,1) both; }
.result-note { max-width: 68ch; margin: 34px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.result-challenge-pitch { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(22px, 4vw, 48px); margin: 28px 0 12px; padding: clamp(22px, 3vw, 30px); border: 1px solid color-mix(in oklch, var(--cyan) 68%, var(--line)); background: color-mix(in oklch, var(--cyan) 8%, var(--surface)); overflow: hidden; }
.result-challenge-pitch[hidden] { display: none; }
.result-challenge-pitch::after { position: absolute; right: 14px; bottom: -26px; color: color-mix(in oklch, var(--cyan) 10%, transparent); content: 'VS'; font: 900 112px/.8 var(--display); pointer-events: none; }
.result-challenge-pitch > div { position: relative; z-index: 1; display: grid; gap: 8px; }
.result-challenge-pitch .eyebrow { color: var(--cyan); }
.result-challenge-pitch strong { max-width: 27ch; color: var(--paper); font: 800 clamp(20px, 3vw, 28px)/1.25 var(--display); word-break: keep-all; overflow-wrap: anywhere; }
.result-challenge-pitch p { max-width: 56ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.result-challenge-pitch .primary-button { position: relative; z-index: 1; min-width: 230px; }
.result-actions { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; }
.result-actions .primary-button, .result-actions .secondary-button { min-width: 0; width: 100%; }
.result-next-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; margin-top: 34px; padding: 24px 0; border-block: 1px solid var(--line); }
.result-next-step[hidden] { display: none; }
.result-next-step-copy { display: grid; gap: 7px; }
.result-next-step-copy .eyebrow { color: var(--warm); }
.result-next-step-copy strong { font: 750 clamp(19px, 2.5vw, 26px)/1.25 var(--display); }
.result-next-step-copy p { max-width: 58ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.result-next-step-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.result-next-step-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 17px; border: 1px solid var(--line); color: var(--paper); text-decoration: none; font-size: 12px; font-weight: 750; }
.result-next-step-actions a:first-child { border-color: var(--warm); color: var(--ink-deep); background: var(--warm); }
.result-next-step-actions a:hover { border-color: var(--cyan); }
.result-lobby-share { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 12px; padding: 18px 20px; border: 1px solid color-mix(in oklch, var(--cyan) 58%, var(--line)); color: var(--paper); background: color-mix(in oklch, var(--cyan) 9%, var(--surface)); text-decoration: none; transition: border-color .18s ease, background-color .18s ease, transform .18s cubic-bezier(.16, 1, .3, 1); }
.result-lobby-share[hidden] { display: none; }
.result-lobby-share:hover { border-color: var(--cyan); background: color-mix(in oklch, var(--cyan) 14%, var(--surface)); transform: translateY(-2px); }
.result-lobby-share:active { transform: translateY(0); }
.result-lobby-share span { display: grid; gap: 4px; min-width: 0; }
.result-lobby-share small { color: var(--cyan); font: 750 9px var(--mono); letter-spacing: .12em; }
.result-lobby-share strong { font: 750 15px var(--display); }
.result-lobby-share em { color: var(--muted); font-size: 11px; font-style: normal; }
.result-lobby-share > b { flex: 0 0 auto; color: var(--cyan); font: 900 26px var(--display); }
.result-social { margin-top: 58px; padding: 25px 0; border-block: 1px solid var(--line); }
.result-social > div:not(.social-verdict) { margin: 14px 0 18px; }
.result-social > div strong { font: 750 24px var(--display); }
.result-social p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.result-social > button { border: 0; padding: 14px 14px 14px 0; margin: -14px -14px -14px 0; color: var(--cyan); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
/* The one button that keeps the duel loop alive gets the solid treatment —
   the quiet text style beside it is for checking, this one is for telling. */
#share-challenge { margin: 0 20px 0 0; padding: 13px 18px; color: var(--ink-deep); background: var(--cyan); font-weight: 800; }
.social-verdict { display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center; margin: 20px 0; }
.social-verdict > div { display: grid; gap: 5px; }
.social-verdict > div:last-child { text-align: right; }
.social-verdict small { color: var(--muted); font: 10px var(--mono); }
.social-verdict strong { font: 750 22px var(--display); }
.social-verdict > b { text-align: center; color: var(--cyan); font: 800 26px var(--display); }
.result-social.is-win .social-verdict > b { color: var(--go); }
.result-social.is-loss .social-verdict > b { color: var(--no); }

.reveal { animation: reveal .55s cubic-bezier(.16, 1, .3, 1) both; }
.reveal:nth-child(2) { animation-delay: .06s; }
.reveal:nth-child(3) { animation-delay: .12s; }
.reveal:nth-child(4) { animation-delay: .18s; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes result-burst { 0% { opacity: 0; transform: scale(.86) rotate(-2deg); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes winner-flash { from { transform: scale(.985); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.app-frame[data-route="home"], .app-frame[data-route="training"] { grid-template-columns: 190px minmax(0, 1fr); max-width: 1480px; }
.app-frame[data-route="home"] .telemetry, .app-frame[data-route="training"] .telemetry { display: none; }
.game-lobby, .training-page { max-width: 1180px; }
.lobby-head { display: flex; align-items: end; justify-content: space-between; gap: 42px; }
.lobby-head h1 { max-width: 760px; font-size: clamp(50px, 6vw, 80px); }
.lobby-stats { flex: 0 0 230px; display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.lobby-stats > div { display: grid; gap: 9px; min-height: 78px; padding: 16px 14px; border-right: 1px solid var(--line); }
.lobby-stats > div:last-child { border: 0; }
.lobby-stats small { color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.lobby-stats strong { align-self: end; font: 750 15px var(--mono); }
.lobby-stats strong span { color: var(--cyan); }
/* One hero, three supporting cards. The lobby used to open with a recommended
   game, a form check, a bounty and a duel all sized like the main event. */
.routine-hero { display: grid; gap: 10px; margin-top: 34px; }
.routine-main { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-height: 240px; border: 0; border-radius: 4px; padding: 28px; color: var(--ink-deep); background: var(--cyan); text-align: left; cursor: pointer; overflow: hidden; }
.routine-main::after { position: absolute; right: -55px; bottom: -125px; width: 280px; aspect-ratio: 1; border: 42px solid color-mix(in oklch, var(--ink-deep) 9%, transparent); border-radius: 50%; content: ''; }
.routine-main > * { position: relative; z-index: 1; }
.routine-main:hover { filter: saturate(1.12); }
.routine-hero[data-state="complete"] .routine-main { background: var(--warm); }
.routine-tag { font: 800 11px var(--mono); letter-spacing: .08em; }
.routine-main > strong { font: 900 clamp(30px, 4.2vw, 46px)/1.02 var(--display); }
.routine-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.routine-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid color-mix(in oklch, var(--ink-deep) 26%, transparent); border-radius: 999px; font: 700 12px var(--display); }
.routine-chip i { font: 800 10px var(--mono); font-style: normal; opacity: .55; }
.routine-chip.is-done { border-color: transparent; background: color-mix(in oklch, var(--ink-deep) 90%, transparent); color: var(--cyan); }
.routine-hero[data-state="complete"] .routine-chip.is-done { color: var(--warm); }
.routine-cta { align-self: flex-end; margin-top: auto; font-size: 13px; font-weight: 850; }
.routine-cta b { margin-left: 6px; font-size: 17px; }
.routine-streak { color: var(--muted); font: 700 11px var(--mono); }
.routine-main:active, .game-card:active, .routine-grid button:active, .mini-card:active { transform: translateY(1px); }

.lobby-secondary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.mini-card { display: grid; align-content: start; gap: 6px; min-height: 136px; border: 1px solid var(--line); border-radius: 4px; padding: 18px; background: var(--surface); color: var(--paper); text-align: left; }
button.mini-card { cursor: pointer; }
button.mini-card:hover { border-color: var(--cyan); }
.mini-card > small { color: var(--muted); font: 800 10px var(--mono); letter-spacing: .1em; }
.mini-card > strong { font: 800 19px var(--display); }
.mini-card > span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.mini-card > button { justify-self: start; min-height: 44px; margin-top: auto; border: 0; border-bottom: 1px solid currentColor; padding: 7px 0 3px; color: var(--cyan); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.mini-card.is-challenge > button { color: var(--warm); }
.mini-card > button:disabled { color: var(--muted); cursor: default; }
.lobby-games, .routine-section { margin-top: 72px; }
.lobby-games .section-title > button { min-height: 40px; border: 0; color: var(--cyan); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.game-filter { display: flex; gap: 7px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.game-filter::-webkit-scrollbar { display: none; }
.game-filter button { flex: 0 0 auto; min-width: 70px; min-height: 38px; border: 1px solid var(--line); border-radius: 4px; padding: 0 14px; color: var(--muted); background: var(--ink-deep); cursor: pointer; font-size: 11px; font-weight: 750; }
.game-filter button.is-active { color: var(--ink-deep); border-color: var(--cyan); background: var(--cyan); }
.game-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.game-card { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; min-width: 0; min-height: 190px; border: 1px solid var(--line); border-radius: 4px; padding: 18px; color: var(--paper); background: var(--ink-deep); text-align: left; overflow: hidden; }
button.game-card { cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
button.game-card:hover { border-color: var(--cyan); background: var(--surface); transform: translateY(-2px); }
.game-card::before { position: absolute; inset: 0 0 auto; height: 3px; content: ''; background: var(--cyan); }
.game-card.mode-aim::before, .game-card.mode-cps::before, .game-card.mode-sequence::before { background: var(--warm); }
.game-card.mode-audio::before, .game-card.mode-vibration::before { background: #73a9ff; }
.game-number { color: var(--muted); font: 800 10px var(--mono); }
.game-type, .game-badge { position: absolute; top: 17px; right: 17px; color: var(--cyan); font: 800 10px var(--mono); letter-spacing: .08em; }
.mode-aim .game-type, .mode-cps .game-type, .mode-sequence .game-type { color: var(--warm); }
.mode-audio .game-type { color: #8bb8ff; }
.game-card > strong { align-self: end; margin-top: 21px; font: 850 24px/1 var(--display); }
.game-card > small { min-height: 32px; color: var(--muted); font-size: 10px; line-height: 1.55; word-break: keep-all; }
.game-card-foot { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.game-card-foot b, .game-card-foot em { font: 750 8px var(--mono); }
.game-card-foot b { color: var(--muted); }
.game-card-foot em { color: var(--cyan); font-style: normal; text-align: right; }
.game-card.is-app-only { border-style: dashed; background: repeating-linear-gradient(135deg, var(--ink-deep) 0 12px, var(--surface) 12px 13px); opacity: .72; }
.game-card.is-app-only::before { background: #73a9ff; }
.game-card.is-app-only .game-badge, .game-card.is-app-only .game-card-foot em { color: #8bb8ff; }
.routine-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.routine-grid button { display: grid; gap: 7px; min-height: 150px; border: 0; border-right: 1px solid var(--line); padding: 22px 20px; color: var(--paper); background: transparent; text-align: left; cursor: pointer; transition: color .18s ease, background .18s ease; }
.routine-grid button:last-child { border: 0; }
.routine-grid button:hover { color: var(--ink-deep); background: var(--warm); }
.routine-grid button > span { color: var(--warm); font: 800 10px var(--mono); letter-spacing: .08em; }
.routine-grid button:hover > span, .routine-grid button:hover > small { color: var(--ink-deep); }
.routine-grid button > strong { align-self: end; margin-top: 17px; font: 800 21px var(--display); }
.routine-grid button > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.routine-grid button > b { margin-top: 9px; color: var(--cyan); font: 800 10px var(--mono); }
.routine-grid button:hover > b { color: var(--ink-deep); }
.training-page .game-filter { margin: 44px 0 18px; }
.training-game-grid { margin-top: 0; }
.training-game-grid .game-card { grid-template-rows: auto auto 1fr auto auto; }
.game-standings-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 20px; }
.game-standings-note p { margin: 0; color: var(--paper); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.game-standings-note p span { color: var(--muted); }
.game-standings-note button { flex-shrink: 0; min-height: 44px; }
.game-card-standing { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.game-standing-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.game-standing-row > span { color: var(--muted); font-size: 11px; }
.game-standing-row > b { color: var(--paper); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.game-standing-row > .game-standing-tier { color: var(--tier-color, var(--muted)); font-size: 12px; }
.game-standing-meta { color: var(--muted); font-size: 10px; line-height: 1.5; word-break: keep-all; }
.game-card-standing + .game-card-foot { margin-top: 2px; }
.result-progress { margin: -18px 0 28px; color: var(--cyan); font: 750 12px var(--mono); }

@media (max-width: 1120px) {
  .app-frame { grid-template-columns: 190px minmax(0, 1fr); }
  .telemetry { display: none; }
}

@media (max-width: 720px) {
  .app-frame { display: block; }
  .rail { display: none; }
  main { padding-bottom: 72px; }
  .page { padding: 38px 20px 45px; }
  .mobile-nav { position: fixed; z-index: 10; display: grid; grid-template-columns: repeat(6, 1fr); left: 0; right: 0; bottom: 0; min-height: 68px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--ink-deep); }
  .mobile-item { border: 0; color: var(--muted); background: transparent; display: grid; place-items: center; align-content: center; gap: 4px; font-size: 10px; }
  .mobile-item span { font: 800 10px/1 var(--mono); }
  .mobile-item.is-active { color: var(--ink-deep); background: var(--cyan); }
  .arena-kickoff { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 22px; }
  .arena-kickoff h1 { grid-column: 1 / -1; font-size: clamp(46px, 13vw, 58px); }
  .arena-kickoff h1 em { white-space: normal; }
  .arena-kickoff p { grid-column: 1; margin: 0; font-size: 13px; }
  .arena-kickoff .streak { grid-column: 2; grid-row: 2; min-width: 76px; }
  .quick-start-grid { display: block; margin-top: 42px; }
  .warmup-main { min-height: 300px; padding: 24px; }
  .play-number { top: 23px; right: 24px; }
  .play-copy strong { font-size: clamp(47px, 15vw, 62px); }
  .warmup-main > b { right: 24px; bottom: 23px; }
  .ghost-time { top: 40px; font-size: 190px; }
  .quick-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 8px; margin-top: 8px; }
  .quick-side button { min-height: 168px; padding: 18px; }
  .quick-side span { top: 17px; left: 18px; }
  .quick-side b { display: none; }
  .quick-side strong { font-size: 21px; }
  .game-presets { margin-top: 64px; }
  .game-presets .section-title { align-items: start; }
  .game-presets .section-title h2 { max-width: 10em; }
  .preset-list { overflow-x: auto; }
  .preset-list button { flex: 0 0 185px; }
  .training-count strong { font-size: 55px; }
  .page-head { align-items: start; }
  .streak { min-width: 82px; }
  .streak strong { font-size: 35px; }
  .daily-panel { grid-template-columns: 35px 1fr; min-height: 220px; padding: 22px 18px; }
  .daily-action { grid-column: 2; justify-self: start; }
  .daily-challenge { margin-top: -24px; align-items: end; }
  .daily-challenge strong { font-size: 15px; }
  .section-title > span { display: none; }
  .mode-row { grid-template-columns: 35px 1fr auto; gap: 10px; padding: 18px 2px; }
  .mode-copy strong { font-size: 18px; }
  .mode-copy small { max-width: 26ch; }
  .big-stat { display: none; }
  .filter-bar { overflow-x: auto; }
  #history-filters { display: grid; grid-template-columns: auto 1fr; overflow: visible; }
  #history-filters select { width: 100%; min-width: 0; }
  #history-filters > span { grid-column: 1 / -1; }
  .intro-grid { display: block; margin-top: 35px; }
  .instruction-list { margin-top: 42px; }
  .start-zone { display: grid; margin-top: 42px; }
  .start-zone { grid-template-columns: 1fr; }
  .primary-button { width: 100%; min-width: 0; }
  .mode-options { margin-top: 36px; }
  .option-buttons { display: grid; grid-template-columns: repeat(3, 1fr); }
  .option-buttons button { min-width: 0; }
  .preflight { display: grid; }
  .preflight button { width: 100%; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip > div:nth-child(2) { border-right: 0; }
  .metric-strip > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .result-challenge-pitch, .result-next-step { grid-template-columns: 1fr; }
  .result-challenge-pitch .primary-button { min-width: 0; width: 100%; }
  .result-actions { display: grid; }
  .result-next-step-actions { display: grid; justify-content: stretch; }
  .result-next-step-actions a { width: 100%; }
  .result-lobby-share { align-items: flex-start; padding: 16px; }
  .result-lobby-share em { line-height: 1.5; }
  .result-hero strong { font-size: clamp(85px, 28vw, 125px); }
  .result-rank { grid-template-columns: 1fr 54px 1fr; min-height: 106px; padding: 17px 15px; }
  .rank-sigil { grid-template-columns: 1fr 34px 1fr; gap: 4px; }
  .rank-sigil b { width: 34px; font-size: 10px; }
  .result-rank strong { font-size: clamp(18px, 5vw, 24px); }
  .league-page .page-head { display: grid; }
  .league-page .page-head h1 { font-size: 48px; }
  .sync-status { width: 100%; }
  .identity-strip { grid-template-columns: 1fr 1fr; }
  .identity-strip > div { padding: 15px 12px 15px 0; }
  .identity-strip > div:nth-child(2) { border-right: 0; padding-left: 12px; }
  .identity-strip > div:last-child { grid-column: 1 / -1; min-height: 74px; padding-left: 0; border-top: 1px solid var(--line); }
  .rank-stage { display: block; }
  .league-controls { grid-template-columns: 1fr 1fr; align-items: end; }
  .ranking-control-group { grid-column: 1 / -1; }
  .ranking-select select { width: 100%; min-width: 0; }
  .rank-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 144px; }
  .podium-place { min-height: 124px; padding: 14px 10px; }
  .podium-place.rank-1 { min-height: 144px; }
  .podium-place::before { top: -15px; right: -3px; font-size: 72px; }
  .podium-place > span { top: 12px; left: 10px; }
  .podium-place > strong { font-size: 15px; }
  .podium-place > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 6px; }
  .podium-place > b { margin-top: 12px; font-size: 15px; }
  .leaderboard-head { grid-template-columns: 40px 1fr auto; padding-inline: 14px; }
  .mode-rail { margin-top: 26px; }
  .mode-tab { min-height: 52px; padding: 8px 13px 10px; }
  .mode-tab b { font-size: 14px; }
  .my-rank { grid-template-columns: 1fr auto; padding: 16px; }
  .my-rank-main strong { font-size: 32px; }
  .my-rank-cta { grid-column: 1 / -1; width: 100%; }
  .rank-summary { grid-template-columns: 1fr 1fr; gap: 18px; }
  .rank-summary p { grid-column: 1 / -1; }
  .rank-row { padding-inline: 14px; }
  .friend-lab { display: block; margin-block: 55px; }
  .friend-form { margin-top: 38px; }
  .match-row { grid-template-columns: 48px 1fr auto; }
  .match-row time { display: none; }
  .challenge-versus { grid-template-columns: 1fr 64px 1fr; margin-bottom: 55px; }
  .challenger { min-height: 170px; padding: 12px; }
  .challenge-mark { gap: 8px; }
  .challenge-mark span { writing-mode: vertical-rl; }
  .challenge-setup { display: block; }
  .challenge-modes { margin-top: 40px; }
  .social-verdict { grid-template-columns: 1fr 70px 1fr; }
  .daily-tag-panel { display: block; }
  .tag-options { justify-content: flex-start; margin-top: 20px; }
  .test-exit { top: 58px; right: 18px; }
  .desktop-only { display: none; }
  .dashboard-page { padding-top: 24px; }
  .dashboard-page .reveal { animation-delay: 0s; }
  .dashboard-head { display: flex; align-items: end; }
  .dashboard-head h1 { font-size: clamp(32px, 9.5vw, 42px); line-height: .92; }
  .dashboard-head h1 br { display: none; }
  .dashboard-head time { display: block; margin: 0 0 3px; padding: 0; white-space: nowrap; font-size: 8px; }
  .dashboard-overview { display: block; margin-top: 22px; }
  .readiness-panel { grid-template-columns: 84px 1fr; gap: 16px; min-height: 0; padding: 18px 16px; }
  .readiness-ring { width: 80px; }
  .readiness-ring::before { inset: 8px; }
  .readiness-ring strong { font-size: 31px; }
  .readiness-ring small { margin-top: 5px; font-size: 7px; }
  .readiness-panel h2 { margin-top: 9px; font-size: 20px; }
  .readiness-panel p { font-size: 10px; line-height: 1.48; }
  .readiness-start { width: 100%; min-height: 44px; margin-top: 13px; padding-inline: 12px; }
  .dashboard-stats { grid-template-columns: repeat(3, 1fr); grid-template-rows: none; }
  .dashboard-stats > div { display: grid; grid-template-columns: 1fr; min-width: 0; padding: 17px 12px; border-right: 1px solid var(--line); border-bottom: 0; }
  .dashboard-stats > div:last-child { border-right: 0; }
  .dashboard-stats small { grid-column: auto; font-size: 8px; }
  .dashboard-stats strong { overflow-wrap: anywhere; font-size: 21px; }
  .dashboard-stats span { font-size: 9px; }
  .dashboard-stats > div:not(:last-child) span { display: none; }
  .dashboard-page.is-first-run .dashboard-more,
  .dashboard-page.is-first-run .weekly-load-panel,
  .dashboard-page.is-first-run .weekly-web,
  .dashboard-page.is-first-run .recent-records { display: none; }
  .dashboard-page.is-first-run .dashboard-chart-grid { grid-template-columns: 1fr; }
  .dashboard-chart-grid, .skill-activity-grid { display: block; }
  .trend-panel { padding: 22px 16px 10px; }
  .trend-panel .chart-head { display: block; }
  .dashboard-page #history-filters { justify-content: flex-start; margin-top: 20px; }
  .dashboard-page #history-filters select { flex: 1; min-width: 0; }
  .dashboard-page .history-chart { min-height: 230px; overflow: hidden; }
  .dashboard-page .history-chart svg { width: 100%; min-width: 0; height: 230px; }
  .weekly-load-panel, .skill-panel, .activity-panel { min-height: 360px; margin-top: 8px; padding: 22px 18px; }
  .weekly-bars { min-height: 190px; }
  .skill-panel svg { margin-top: 18px; }
  .activity-heatmap { gap: 4px; margin-top: 48px; }
  .activity-panel > p { margin-top: 30px; }
  .dashboard-more { margin-top: 34px; }
  .dashboard-more > summary { min-height: 84px; }
  .dashboard-more > summary em { max-width: 25ch; line-height: 1.5; }
}

@media (max-width: 940px) and (min-width: 721px) {
  .game-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lobby-secondary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .game-lobby, .training-page { padding-top: 32px; }
  /* The title and the counters used to eat the first screenful before the
     play button appeared. On a phone they collapse to one compact line. */
  .lobby-head { display: flex; align-items: center; gap: 16px; }
  .lobby-head h1 { margin: 0; font-size: 30px; line-height: 1.05; }
  .lobby-stats { flex: 0 0 auto; width: auto; margin: 0; border: 0; gap: 16px; }
  .lobby-stats > div { min-height: 0; gap: 3px; border: 0; padding: 0; text-align: right; }
  .lobby-stats strong { font-size: 13px; }
  .routine-hero { margin-top: 20px; }
  .routine-main { min-height: 0; gap: 12px; padding: 22px; }
  .lobby-secondary { grid-template-columns: 1fr 1fr; }
  .mini-card { min-height: 0; padding: 16px; }
  .mini-card.is-challenge { grid-column: 1 / -1; }
  .mini-card > strong { font-size: 17px; }
  .coach-panel { grid-template-columns: 1fr; }
  .coach-next { justify-items: start; text-align: left; }
  .report-head { display: block; }
  .report-score { justify-items: start; width: max-content; margin-top: 16px; }
  .routine-stamp { top: -30px; right: 4px; padding: 8px 12px; }
  .routine-stamp b { font-size: 17px; }
  .report-reward { grid-template-columns: 1fr; }
  .report-reward > div { display: flex; align-items: baseline; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 4px; }
  .report-reward > div:last-child { border-bottom: 0; }
  .lobby-games, .routine-section { margin-top: 52px; }
  .lobby-games .section-title { align-items: end; }
  .lobby-games .section-title > button { max-width: 110px; text-align: right; }
  .game-filter { margin-right: -20px; padding-right: 20px; }
  .game-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .game-card { min-height: 174px; padding: 15px; }
  .game-type, .game-badge { top: 15px; right: 14px; font-size: 10px; }
  .game-card > strong { margin-top: 16px; font-size: 21px; }
  .game-card > small { min-height: 46px; font-size: 10px; }
  .game-card-foot { display: grid; gap: 5px; }
  .game-card-foot em { text-align: left; overflow-wrap: anywhere; }
  .routine-grid { display: grid; grid-template-columns: 1fr; }
  .routine-grid button { min-height: 128px; border-right: 0; border-bottom: 1px solid var(--line); padding: 19px 4px; }
  .routine-grid button:last-child { border-bottom: 0; }
  .routine-grid button > strong { margin-top: 9px; }
  .training-page .page-head { display: grid; grid-template-columns: 1fr auto; }
  .training-page .page-head h1 { font-size: 44px; }
  .training-page .training-count strong { font-size: 45px; }
  .training-page .game-filter { margin-top: 34px; }
  .result-progress { margin-top: -12px; line-height: 1.55; }
}

/* ================= NEW: Onboarding ================= */
.onboarding-page { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) clamp(20px, 5vw, 60px) 100px; }
.onboarding-shell { display: grid; gap: 30px; padding: clamp(26px, 4vw, 44px); border: 1px solid var(--line); background: var(--ink-deep); border-radius: 4px; }
.onboarding-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.onboarding-head .eyebrow { letter-spacing: .18em; }
.onboarding-skip { appearance: none; min-width: 54px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font: 700 12px var(--mono); cursor: pointer; letter-spacing: .08em; padding: 0 0 0 14px; }
.onboarding-skip:hover { color: var(--paper); }
.onboarding-slide { display: grid; gap: 18px; }
.onboarding-slide h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1; }
.onboarding-slide p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 52ch; }
.onboarding-route { display: grid; grid-template-columns: repeat(3, 1fr); margin: 4px 0 0; padding: 0; border: 1px solid var(--line); list-style: none; }
.onboarding-route li { display: grid; gap: 9px; min-height: 92px; align-content: center; padding: 16px 18px; }
.onboarding-route li + li { border-left: 1px solid var(--line); }
.onboarding-route i { color: var(--cyan); font: 800 10px var(--mono); font-style: normal; }
.onboarding-route span { color: var(--paper); font: 750 13px var(--display); }
.onboarding-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.onboarding-actions .primary-button { min-width: 230px; }
.onboarding-actions button:focus-visible, .onboarding-skip:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
@media (max-width: 480px) {
  .onboarding-head .eyebrow { letter-spacing: .08em; white-space: nowrap; }
  .onboarding-slide p { font-size: 14px; }
  .onboarding-route { grid-template-columns: 1fr; }
  .onboarding-route li { grid-template-columns: auto 1fr; align-items: center; min-height: 58px; padding: 12px 14px; }
  .onboarding-route li + li { border-top: 1px solid var(--line); border-left: 0; }
  .onboarding-actions { display: grid; }
  .onboarding-actions .primary-button, .onboarding-actions .secondary-button { width: 100%; min-width: 0; min-height: 52px; }
}

/* ================= NEW: Daily progress strip ================= */
.daily-progress-strip { display: grid; grid-template-columns: 1fr auto; gap: clamp(20px, 3vw, 40px); align-items: center; margin: -32px 0 clamp(48px, 7vw, 84px); padding: 20px 4px; border-bottom: 1px solid var(--line); }
.daily-progress-copy { display: grid; gap: 6px; }
.daily-progress-copy strong { font: 700 17px var(--display); }
.daily-progress-copy small { color: var(--muted); font-size: 11px; }
.daily-progress-dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.daily-progress-dot { display: grid; gap: 6px; justify-items: center; }
.daily-progress-dot span { color: var(--muted); font: 700 10px var(--mono); }
.daily-progress-dot::after { content: ''; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: transparent; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.daily-progress-dot.is-attempted::after { border-color: var(--warm); }
.daily-progress-dot.is-done::after { background: var(--cyan); border-color: var(--cyan); }
.daily-progress-dot.is-today::after { transform: scale(1.14); box-shadow: 0 0 0 2px color-mix(in oklch, var(--cyan) 40%, transparent); }

/* ================= NEW: Settings extras ================= */
.setting-select { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; }
.setting-select select { padding: 8px 12px; background: var(--surface); color: var(--paper); border: 1px solid var(--line); border-radius: 2px; font: 600 13px var(--mono); }

/* ================= NEW: Leaderboard sync + match tabs ================= */
.leaderboard.is-syncing { position: relative; }
.leaderboard.is-syncing::before { content: 'SYNCING…'; position: absolute; top: -22px; right: 0; color: var(--cyan); font: 700 10px var(--mono); letter-spacing: .18em; animation: qz-pulse 1s ease-in-out infinite alternate; }
@keyframes qz-pulse { from { opacity: .35; } to { opacity: 1; } }
.match-tabs { display: flex; gap: 10px; margin: 16px 0 18px; }
.match-tabs button { appearance: none; border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 12px 14px; font: 700 12px var(--mono); letter-spacing: .1em; cursor: pointer; border-radius: 2px; display: inline-flex; gap: 8px; align-items: center; }
.match-tabs button.is-active { color: var(--ink-deep); background: var(--cyan); border-color: var(--cyan); }
.match-tabs button span { background: color-mix(in oklch, var(--ink-deep) 55%, transparent); color: var(--paper); padding: 1px 8px; border-radius: 999px; font-size: 10px; }
.match-tabs button.is-active span { background: var(--ink-deep); color: var(--cyan); }
.match-row.is-pending { border-left: 3px solid var(--warm); }
.match-outcome.is-pending { color: var(--warm); background: var(--warm-surface); }
.match-respond { appearance: none; border: 1px solid var(--cyan); background: transparent; color: var(--cyan); font: 700 12px var(--mono); padding: 8px 14px; cursor: pointer; border-radius: 2px; letter-spacing: .1em; }
.match-respond:hover { background: var(--cyan); color: var(--ink-deep); }
#match-list.is-syncing { opacity: .5; transition: opacity .2s ease; }
.social-verdict.is-pending b { color: var(--warm); }
.result-social.is-error { border-color: var(--no); color: var(--no); }
.incoming-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 16px 0 24px; }
.incoming-meta div { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 2px; display: grid; gap: 4px; }
.incoming-meta small { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .1em; }
.incoming-meta strong { font: 700 20px var(--display); }

/* ================= NEW: 404 page ================= */
.not-found { min-height: 100dvh; display: grid; place-items: center; padding: 40px; background: var(--ink-deep); }
.not-found-inner { max-width: 480px; text-align: left; display: grid; gap: 20px; }
.not-found-inner h1 { font-size: clamp(80px, 12vw, 140px); line-height: .95; }
.not-found-inner h1 small { display: block; font-size: clamp(22px, 3vw, 32px); color: var(--muted); font-family: var(--body); margin-top: 12px; }
.not-found-actions { display: flex; gap: 12px; margin-top: 12px; }

/* ================= NEW: Colorblind modes ================= */
.is-cb-shapes .test-stage.is-go::after,
.is-cb-shapes .test-stage.is-no::after,
.is-cb-shapes .test-stage.is-fake::after {
  content: '●'; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(80px, 18vw, 200px); color: color-mix(in oklch, var(--ink-deep) 70%, white); mix-blend-mode: difference; pointer-events: none;
}
.is-cb-shapes .test-stage.is-no::after { content: '■'; }
.is-cb-shapes .test-stage.is-fake::after { content: '◇'; opacity: .6; }
.is-cb-by { --go: oklch(80% 0.18 240); --no: oklch(82% 0.16 92); }
.is-cb-by .test-stage.is-go { background: var(--go); }
.is-cb-by .test-stage.is-no { background: var(--no); }

/* ================= NEW: Motion reduce ================= */
.is-motion-reduce *,
.is-motion-reduce *::before,
.is-motion-reduce *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }

/* ================= NEW: PB glow ================= */
.result-page.is-new-best .result-hero { text-shadow: 0 0 24px color-mix(in oklch, var(--cyan) 45%, transparent); }
.result-page.is-new-best .result-stamp { animation: qz-pb-pop 1.2s ease-out; }
@keyframes qz-pb-pop { 0% { transform: scale(.6) rotate(-12deg); opacity: 0; } 40% { transform: scale(1.24) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
#result-burst[data-label]::after { content: attr(data-label); position: absolute; top: 20px; right: 20px; padding: 6px 12px; background: var(--cyan); color: var(--ink-deep); font: 800 11px var(--mono); letter-spacing: .16em; border-radius: 999px; box-shadow: 0 0 24px color-mix(in oklch, var(--cyan) 55%, transparent); }
.result-page.is-new-best::after { content: ''; position: fixed; inset: 0; z-index: 2; pointer-events: none; animation: qz-edge-flash 1.1s cubic-bezier(.16,1,.3,1) both; }
@keyframes qz-edge-flash { 0% { box-shadow: inset 0 0 150px color-mix(in oklch, var(--cyan) 65%, transparent); } 100% { box-shadow: inset 0 0 0 transparent; } }
.record-confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

/* ================= NEW: Routine complete stamp ================= */
.report-head { position: relative; }
.routine-stamp { position: absolute; top: -18px; right: 150px; z-index: 2; display: grid; justify-items: center; gap: 2px; padding: 10px 16px; border: 3px solid var(--warm); border-radius: 4px; color: var(--warm); transform: rotate(-9deg); pointer-events: none; animation: stamp-slam .5s cubic-bezier(.16, 1, .3, 1) .4s both; }
.routine-stamp span { font: 700 9px var(--mono); letter-spacing: .22em; }
.routine-stamp b { font: 900 22px var(--display); letter-spacing: .02em; }
@keyframes stamp-slam { 0% { opacity: 0; transform: rotate(-24deg) scale(2.1); } 62% { opacity: 1; transform: rotate(-7deg) scale(.96); } 100% { opacity: 1; transform: rotate(-9deg) scale(1); } }

/* ================= NEW: Home-screen install nudge ================= */
.install-nudge { margin-top: 26px; padding: 22px 24px; border: 1px solid var(--line); border-left: 4px solid var(--cyan); background: var(--surface); display: grid; gap: 16px; }
.install-nudge strong { display: block; margin-top: 8px; font: 750 19px var(--display); }
.install-nudge p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.install-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.install-actions .primary-button { min-width: 0; min-height: 48px; gap: 12px; }
.install-actions .secondary-button { min-height: 48px; }

/* ================= NEW: Season tier-up flip card ================= */
/* The card lands face-down (승급!) and flips over to reveal the new title.
   The back face is the in-flow element so it defines the card's height. */
.tierup-panel { margin-top: 32px; }
.tier-flip { width: min(360px, 100%); perspective: 900px; }
.tier-flip-inner { position: relative; transform-style: preserve-3d; animation: tier-flip .7s cubic-bezier(.45, 0, .2, 1) 1.1s both; }
.tier-face { display: grid; gap: 7px; padding: 24px 26px; border-radius: 3px; backface-visibility: hidden; }
.tier-front { position: absolute; inset: 0; place-content: center; justify-items: center; color: var(--ink-deep); background: var(--cyan); }
.tier-front span { font: 700 10px var(--mono); letter-spacing: .2em; }
.tier-front b { font: 900 34px var(--display); }
.tier-back { border: 1px solid var(--cyan); background: var(--surface); transform: rotateY(180deg); }
.tier-back small { color: var(--cyan); font: 700 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.tier-back strong { font: 900 26px var(--display); }
.tier-back span { color: var(--muted); font-size: 12px; }
@keyframes tier-flip { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }

/* ================= NEW: Test focus vignette ================= */
/* Fades in while ARMED (the earliest stimulus is 2s away) and then holds
   perfectly static so nothing repaints at the signal frame. The center stays
   untouched — only the edges dim to pull the eye inward. */
.test-stage.is-focus::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 74% 64% at 50% 46%, transparent 56%, rgb(0 0 0 / .34) 100%); opacity: 0; animation: qz-focus-in .45s ease-out .05s forwards; }
@keyframes qz-focus-in { to { opacity: 1; } }

/* ================= NEW: Primary / secondary buttons for onboarding + 404 ================= */
.not-found-inner .primary-button, .not-found-inner .secondary-button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 2px; text-decoration: none; font: 700 13px var(--mono); letter-spacing: .1em; }
.not-found-inner .primary-button { background: var(--cyan); color: var(--ink-deep); border: 1px solid var(--cyan); }
.not-found-inner .secondary-button { border: 1px solid var(--line); color: var(--paper); }

/* ================= NEW: Account (signup / login) + recovery dialog ================= */
/* ================= Season ================= */
.season-panel { margin: 40px 0; border: 1px solid var(--line); border-radius: 4px; padding: 24px; background: var(--surface); }
.season-panel .section-title { margin-bottom: 20px; }
.season-panel .section-title small { color: var(--warm); font: 800 11px var(--mono); }
.season-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px 28px; }
.season-rank { display: grid; align-content: start; gap: 9px; }
.season-rank small, .season-level small, .season-titles small { color: var(--muted); font: 800 10px var(--mono); letter-spacing: .1em; }
.season-rank strong { font: 900 32px var(--display); }
.season-rank span { color: var(--muted); font: 700 11px var(--mono); }
.season-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.season-bar i { display: block; height: 100%; background: var(--cyan); }
.season-level { display: grid; align-content: start; gap: 8px; border-left: 1px solid var(--line); padding-left: 24px; }
.season-level strong { font: 900 32px var(--display); color: var(--cyan); }
.season-level span { color: var(--muted); font: 700 11px var(--mono); }
.season-breakdown { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.season-breakdown li { display: grid; gap: 7px; border-right: 1px solid var(--line); padding: 14px 12px 14px 0; }
.season-breakdown li:last-child { border-right: 0; }
.season-breakdown span { color: var(--muted); font-size: 11px; }
.season-breakdown span i { display: block; margin-top: 3px; color: var(--paper); font: 700 13px var(--mono); font-style: normal; }
.season-breakdown b { color: var(--cyan); font: 800 15px var(--mono); }
.season-missions { grid-column: 1 / -1; display: grid; gap: 10px; }
.season-missions > small { color: var(--muted); font: 800 10px var(--mono); letter-spacing: .1em; }
.season-missions ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.season-missions li { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 12px; align-items: center; }
.season-missions li span { font: 650 13px var(--body); }
.season-missions li.is-done span { color: var(--cyan); }
.mission-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mission-bar i { display: block; height: 100%; background: var(--warm); }
.season-missions li.is-done .mission-bar i { background: var(--cyan); }
.season-missions li b { color: var(--muted); font: 800 11px var(--mono); }
.season-missions li.is-done b { color: var(--cyan); }
.season-titles { grid-column: 1 / -1; display: grid; gap: 10px; }
.title-options { display: flex; flex-wrap: wrap; gap: 8px; }
.title-options button { min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; background: transparent; color: var(--paper); font: 700 12px var(--display); cursor: pointer; }
.title-options button.is-active { border-color: var(--cyan); background: var(--cyan); color: var(--ink-deep); }
.title-options button:disabled { color: var(--muted); cursor: default; }
.title-options button i { color: var(--muted); font: 700 10px var(--mono); font-style: normal; }
.season-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* ================= Duel hub ================= */
.duel-invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; margin-top: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 22px; background: var(--surface); }
.invite-copy { display: grid; gap: 6px; }
.invite-copy small { color: var(--muted); font: 800 10px var(--mono); letter-spacing: .1em; }
.invite-copy strong { font: 800 26px var(--mono); letter-spacing: .04em; }
.invite-copy span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.invite-actions button { min-height: 44px; }
.invite-status { grid-column: 1 / -1; color: var(--cyan); font: 700 11px var(--mono); overflow-wrap: anywhere; }
.duel-page .match-log, .duel-page .friend-lab, .duel-page .local-duel { margin-top: 56px; }
.local-duel .lead { margin-top: 14px; }
.local-duel .filter-bar { margin-top: 18px; }

/* ================= Account ================= */
.recovery-toggle { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--warm-surface); }
.recovery-toggle > summary { display: grid; gap: 5px; min-height: 52px; align-content: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.recovery-toggle > summary::-webkit-details-marker { display: none; }
.recovery-toggle > summary b { font: 750 14px var(--display); }
.recovery-toggle > summary b::after { content: ' ▾'; color: var(--muted); }
.recovery-toggle[open] > summary b::after { content: ' ▴'; }
.recovery-toggle > summary span { color: var(--muted); font-size: 11px; line-height: 1.5; }
/* Scoped to [open]: setting display on a closed <details>' child overrides the
   browser's own display:none and leaves the fields on screen. */
.recovery-toggle[open] .recovery-toggle-body { display: grid; gap: 14px; border-top: 1px solid var(--line); padding: 16px; }
.account-bar button { min-height: 44px; padding: 0 18px; border: 1px solid var(--cyan); color: var(--ink-deep); background: var(--cyan); cursor: pointer; font-weight: 750; white-space: nowrap; }
.account-bar button:hover { filter: brightness(1.08); }

.account-page > .lead { margin: 26px 0 var(--space-lg); }
.account-panel { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); background: var(--ink-deep); }
.account-tabs { display: flex; gap: 6px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.account-tabs button { appearance: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 18px; margin-bottom: -1px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.account-tabs button.is-active { border-bottom-color: var(--cyan); color: var(--paper); }

.account-form { display: grid; gap: 22px; max-width: 460px; }
.account-field { display: grid; gap: 8px; }
.account-field > span { color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.account-field > span i { margin-left: 6px; color: var(--warm); font-style: normal; }
.account-field input { width: 100%; min-width: 0; border: 0; border-bottom: 2px solid var(--line); padding: 11px 2px; outline: 0; color: var(--paper); background: transparent; font: 600 17px var(--body); }
.account-field input:focus { border-bottom-color: var(--cyan); }
.account-field input::placeholder { color: var(--surface-high); }
.account-field > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
/* The recovery-email consequence has to read as a consequence, not fine print:
   there is no automated password reset behind it yet. */
.account-field > small.field-warn { color: var(--warm); }
.account-consent { display: grid; gap: 11px; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.account-consent label { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; cursor: pointer; }
.account-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--cyan); }
.account-consent a { color: var(--paper); text-underline-offset: 3px; }
.settings-policies { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.settings-policies a { color: var(--muted); font-size: 12px; text-underline-offset: 4px; }

.account-feedback { margin: 0; min-height: 1.2em; color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-feedback.is-error { color: var(--no); }
.account-feedback.is-success { color: var(--cyan); }

.account-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.account-summary small { display: block; margin-bottom: 8px; color: var(--muted); font: 10px var(--mono); letter-spacing: .1em; }
.account-summary strong { font: 750 20px var(--display); letter-spacing: .02em; }
.account-recovery-state { margin: 0 0 26px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.account-recovery-state.is-warning { padding: 14px 16px; border-left: 3px solid var(--warm); color: var(--warm); background: var(--warm-surface); }
.account-recovery-link { display: block; margin-top: 26px; border: 0; padding: 8px 0; color: var(--cyan); background: transparent; cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

.recovery-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); color: var(--paper); background: var(--ink-deep); }
.recovery-dialog::backdrop { background: color-mix(in oklch, var(--ink-deep) 78%, transparent); }
.recovery-inner { display: grid; gap: 18px; padding: clamp(24px, 4vw, 34px); }
.recovery-inner h2 { margin: 0; font-family: var(--display); font-size: 30px; letter-spacing: -.02em; }
.recovery-lead { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
#recovery-form { display: grid; gap: 18px; }
.recovery-note a { color: var(--warm); }
.recovery-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--warm); background: var(--warm-surface); color: var(--warm); font-size: 12px; line-height: 1.65; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.recovery-actions .primary-button { flex: 1 1 200px; min-width: 0; text-decoration: none; }
.recovery-actions .secondary-button { flex: 0 0 auto; }

@media (max-width: 900px) {
  .account-bar { grid-template-columns: 1fr; }
  .account-bar button { width: 100%; }
}

/* ================= NEW: static first paint before app.js takes over ================= */
.boot-intro { display: grid; gap: 22px; align-content: start; }
.boot-intro h1 { margin: 10px 0 0; }
.boot-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.boot-list li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
/* The landing-page links keep the plain-list look: the anchor lays out exactly
   as the bare li content does, so linked and app-only rows read identically. */
.boot-list a { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; width: 100%; color: inherit; text-decoration: none; }
.boot-list a:hover b { color: var(--cyan); }
.boot-list b { min-width: 92px; font-size: 15px; font-weight: 750; }
.boot-list span { color: var(--muted); font-size: 13px; }
.boot-note { max-width: 52ch; padding: 14px 16px; border-left: 3px solid var(--cyan); color: var(--paper); background: var(--surface); font-size: 14px; line-height: 1.7; }

/* Declared last on purpose: the components above are defined after the main
   720px block, so their phone overrides have to come after them to win. */
@media (max-width: 720px) {
  .season-panel { padding: 18px; }
  .season-grid { grid-template-columns: 1fr; gap: 18px; }
  .season-level { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
  .season-breakdown { grid-template-columns: 1fr 1fr; }
  .season-breakdown li { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .season-breakdown li:last-child { border-bottom: 0; }
  .season-missions li { grid-template-columns: 1fr; gap: 6px; }
  .season-missions li b { justify-self: start; }
  .duel-invite { grid-template-columns: 1fr; }
  .invite-copy strong { font-size: 22px; }
  .invite-actions { display: grid; grid-template-columns: 1fr; }
  .duel-page .match-log, .duel-page .friend-lab, .duel-page .local-duel { margin-top: 44px; }
}

/* ITLAND 계정 안내 — 계정이 큐제로가 아니라 사이트의 것이라는 사실을 화면에서도
   말한다. 여기서 가입해도 같은 계정이 만들어진다. */
.account-itland { margin: 0 0 16px; padding: 12px 14px; border: 1px solid rgb(186 255 41 / .35); background: rgb(186 255 41 / .06); color: #d7dae2; font-size: 12px; line-height: 1.7; }
.account-itland b { color: #baff29; }
.account-itland a { display: inline-block; margin-top: 4px; color: #baff29; font-weight: 700; }
