/* 벤치에서 골든글러브까지 — "야간 경기 전광판"
 * Outfield-grass green, chalk-white cards on a tinted ground, a dark green scoreboard with amber pixel digits.
 * Every colour is a token: light on bare :root, dark via prefers-color-scheme (unless data-theme="light") and data-theme="dark". */

:root {
  color-scheme: light;
  --bg: #EDF1EC;
  --bg-stripe: #E6EBE5;
  --surface: #FFFFFF;
  --surface-2: #F4F7F3;
  --ink: #13201A;
  --ink-2: #5C6C63;
  --ink-3: #85938B;
  --line: #DCE3DD;
  --card-line: #E3E9E4;
  --field: #1E6B47;
  --field-ink: #FFFFFF;
  --field-soft: #E0EEE6;
  --field-press: #154D33;
  --board: #0F2A1E;
  --board-2: #15382A;
  --board-line: #24493A;
  --board-off: #1A3B2D;
  --board-ink: #EEF3E6;
  --board-ink-2: #A3BAAD;
  --amber: #FFC94A;
  --amber-glow: rgba(255, 201, 74, 0.45);
  --board-up: #FF8D80;
  --board-down: #92BAFF;
  --up: #D7362B;
  --up-soft: #FBE6E3;
  --down: #2F6FD6;
  --down-soft: #E3ECFB;
  --gold: #B8892B;
  --gold-soft: #F6EBCF;
  --gold-ink: #6F520F;
  --gold-on: #FFFFFF;
  --silver: #7C8A92;
  --bronze: #A3622A;
  --danger: #B92F25;
  --danger-ink: #FFFFFF;
  --scrim: rgba(6, 16, 11, 0.52);
  --shadow-1: 0 1px 2px rgba(19, 32, 26, 0.05), 0 3px 12px rgba(19, 32, 26, 0.05);
  --shadow-2: 0 -6px 28px rgba(19, 32, 26, 0.16);
  --focus: #1E6B47;
  --toast-bg: #13201A;
  --toast-ink: #F4F7F3;
  --gold-glow: rgba(184, 137, 43, 0.32);
  --gold-line: #D9B45E;
  --shine: rgba(255, 255, 255, 0.55);
  --edge-shadow: rgba(19, 32, 26, 0.22);
  --req: #C0342A;
  --req-soft: #FBE6E3;
  --next-soft: #EAF4EE;

  --font-body: 'IBM Plex Sans KR', system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-display: 'Black Han Sans', 'IBM Plex Sans KR', system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-pixel: 'Silkscreen', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --col: 480px;
  --gutter: 16px;
  --tabbar-h: 64px;
  --cta-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B1310;
    --bg-stripe: #0E1814;
    --surface: #131D18;
    --surface-2: #1A2620;
    --ink: #E7EEE8;
    --ink-2: #95A59C;
    --ink-3: #6F7E76;
    --line: #26352D;
    --card-line: #1F2D26;
    --field: #3FA36F;
    --field-ink: #06120C;
    --field-soft: #17301F;
    --field-press: #2E8457;
    --board: #07150F;
    --board-2: #0D2219;
    --board-line: #1F3B2E;
    --board-off: #12291F;
    --board-ink: #EEF3E6;
    --board-ink-2: #93AC9F;
    --amber: #FFC94A;
    --amber-glow: rgba(255, 201, 74, 0.4);
    --board-up: #FF8D80;
    --board-down: #92BAFF;
    --up: #F0594C;
    --up-soft: #3A1916;
    --down: #6EA0F5;
    --down-soft: #142440;
    --gold: #E2B54E;
    --gold-soft: #3A2F14;
    --gold-ink: #F1CF7E;
    --gold-on: #1A1405;
    --silver: #AAB5BB;
    --bronze: #D08A50;
    --danger: #F0594C;
    --danger-ink: #1A0503;
    --scrim: rgba(0, 0, 0, 0.64);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 -8px 30px rgba(0, 0, 0, 0.5);
    --focus: #FFC94A;
    --toast-bg: #E7EEE8;
    --toast-ink: #0B1310;
    --gold-glow: rgba(226, 181, 78, 0.3);
    --gold-line: #8F6F25;
    --shine: rgba(255, 255, 255, 0.4);
    --edge-shadow: rgba(0, 0, 0, 0.55);
    --req: #F0594C;
    --req-soft: #3A1916;
    --next-soft: #15281E;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1310;
  --bg-stripe: #0E1814;
  --surface: #131D18;
  --surface-2: #1A2620;
  --ink: #E7EEE8;
  --ink-2: #95A59C;
  --ink-3: #6F7E76;
  --line: #26352D;
  --card-line: #1F2D26;
  --field: #3FA36F;
  --field-ink: #06120C;
  --field-soft: #17301F;
  --field-press: #2E8457;
  --board: #07150F;
  --board-2: #0D2219;
  --board-line: #1F3B2E;
  --board-off: #12291F;
  --board-ink: #EEF3E6;
  --board-ink-2: #93AC9F;
  --amber: #FFC94A;
  --amber-glow: rgba(255, 201, 74, 0.4);
  --board-up: #FF8D80;
  --board-down: #92BAFF;
  --up: #F0594C;
  --up-soft: #3A1916;
  --down: #6EA0F5;
  --down-soft: #142440;
  --gold: #E2B54E;
  --gold-soft: #3A2F14;
  --gold-ink: #F1CF7E;
  --gold-on: #1A1405;
  --silver: #AAB5BB;
  --bronze: #D08A50;
  --danger: #F0594C;
  --danger-ink: #1A0503;
  --scrim: rgba(0, 0, 0, 0.64);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 -8px 30px rgba(0, 0, 0, 0.5);
  --focus: #FFC94A;
  --toast-bg: #E7EEE8;
  --toast-ink: #0B1310;
  --gold-glow: rgba(226, 181, 78, 0.3);
  --gold-line: #8F6F25;
  --shine: rgba(255, 255, 255, 0.4);
  --edge-shadow: rgba(0, 0, 0, 0.55);
  --req: #F0594C;
  --req-soft: #3A1916;
  --next-soft: #15281E;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
html.has-sheet, html.has-sheet body { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font-family: inherit; }
button { color: inherit; }
svg.px, .scene svg, .avatar-tile svg, .task-ico svg, .tl-ico svg, .cab-ico svg, .shop-ico svg { image-rendering: pixelated; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.board :focus-visible, .ms-panel :focus-visible, .nine :focus-visible { outline-color: var(--amber); }
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pxf { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0.02em; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.num { color: var(--ink-2); font-weight: 600; font-size: 0.8em; }

/* ------------------------------------------------------------------ app column */
#gg-app { min-height: 100vh; min-height: 100dvh; }
.app-col {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
.screen { padding-bottom: 40px; }
.screen-main { padding-bottom: calc(var(--tabbar-h) + 24px + var(--safe-b)); }
.screen-main.has-cta { padding-bottom: calc(var(--tabbar-h) + var(--cta-h) + 16px + var(--safe-b)); }
.screen-create, .screen-season { padding-bottom: calc(var(--cta-h) + 32px + var(--safe-b)); }
.boot { padding: 40vh 16px 0; text-align: center; color: var(--ink-2); }

.topbar, .subbar, .create-head { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 8px; }
.brand { font-family: var(--font-display); font-size: 18px; color: var(--field); letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-gg { color: var(--gold); }
.topbar-actions { display: flex; gap: 2px; margin-right: -10px; }
.subbar-title { flex: 1; font-size: 18px; font-weight: 700; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

/* dock: fixed CTA + tab bar, aligned with the column */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; pointer-events: none; }
.dock-inner { max-width: var(--col); margin: 0 auto; pointer-events: auto; }
.cta-bar { padding: 14px var(--gutter) 12px; background: linear-gradient(to top, var(--bg) 62%, transparent); }
.screen-create .cta-bar, .screen-season .cta-bar { padding-bottom: calc(12px + var(--safe-b)); }
.tabbar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + var(--safe-b));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-height: 56px; padding: 6px 0 4px; border: 0; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 11.5px; font-weight: 600; border-radius: 10px;
}
.tab.is-on { color: var(--field); }
.tab.is-on .tab-label { font-weight: 700; }
.tab-ico { position: relative; display: grid; place-items: center; }
.tab-dot { position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 2px var(--surface); }

/* ------------------------------------------------------------------ cards, rows, chips */
.card {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px;
  padding: 16px; margin: 0 0 12px; box-shadow: var(--shadow-1);
}
.card-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px 0 6px; }
.card-head .card-title { margin: 0; }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 11px; background: var(--field-soft); color: var(--field); font-size: 12px; font-weight: 700;
}
.tab-title { font-size: 22px; font-weight: 700; margin: 4px 0 12px; }
.h-title { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 4px 0 8px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--field); margin: 0 0 4px; }
.center-card { text-align: center; padding: 20px 16px; }
.center-card .scene { margin-bottom: 14px; }
.center-card .muted { margin-bottom: 16px; }
.tip p { font-size: 13.5px; color: var(--ink-2); }

.rows { margin: 0; }
.rows .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rows .row:first-child { border-top: 0; }
.rows dt { color: var(--ink-2); flex: none; }
.rows dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.preview .rows { margin-top: 12px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; }
.chip {
  font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}
.chip.is-up { color: var(--up); background: var(--up-soft); border-color: transparent; }
.chip.is-down { color: var(--down); background: var(--down-soft); border-color: transparent; }
.status-chips { margin: 12px 0 0; }
.status-chips .chip.is-alert { color: var(--up); background: var(--up-soft); border-color: transparent; }

.badge {
  flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.badge.is-gold { background: var(--gold-soft); color: var(--gold-ink); border-color: transparent; }

.empty { text-align: center; padding: 18px 8px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 13.5px; }

.foot-note { padding: 18px 4px 8px; text-align: center; }
.foot-note p { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.footnote { text-align: center; font-size: 12px; color: var(--ink-3); margin: 14px 0 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 14px; border: 0;
  font-size: 16px; font-weight: 700; line-height: 1.3; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--field); color: var(--field-ink); box-shadow: 0 3px 0 var(--field-press); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { box-shadow: 0 1px 0 var(--field-press); transform: translateY(2px); }
.btn[aria-disabled="true"] { background: var(--line); color: var(--ink-3); box-shadow: none; cursor: not-allowed; filter: none; transform: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-text { background: transparent; color: var(--ink-2); min-height: 44px; font-size: 15px; font-weight: 600; }
.btn-text:hover { color: var(--ink); }
.btn-danger { background: var(--danger); color: var(--danger-ink); }
.btn + .btn, .btn + .file-btn, .file-btn + .btn { margin-top: 8px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 2px;
  border: 0; background: none; color: var(--field); font-size: 14px; font-weight: 700; cursor: pointer;
}
.text-btn {
  border: 0; background: none; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 8px 12px;
}
.retire-link { text-align: center; margin-top: 4px; }

/* ------------------------------------------------------------------ pixel art frames */
.scene { position: relative; aspect-ratio: 64 / 40; background: var(--board-2); border-radius: 14px; overflow: hidden; }
.scene > svg { display: block; width: 100%; height: 100%; }
.art-fallback { display: block; width: 100%; height: 100%; background: var(--board-2); }
.art-fallback.is-avatar, .art-fallback.is-icon { width: 100%; height: 100%; border-radius: 4px; background: var(--line); }
.art-fallback.is-scene {
  background:
    linear-gradient(to top, var(--field) 0 34%, transparent 34%),
    linear-gradient(to bottom, var(--board) 0 66%, var(--board-2) 66%);
}

.avatar-tile {
  flex: none; display: grid; place-items: center;
  width: calc(var(--sz) + 16px); height: calc(var(--sz) + 16px); border-radius: 16px;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--tc1) 18%, var(--surface-2));
  box-shadow: inset 0 -4px 0 var(--tc1), inset 0 -7px 0 var(--tc2);
  overflow: hidden;
}
.avatar-tile > svg, .avatar-tile > .art-fallback { width: var(--sz); height: var(--sz); display: block; }
.avatar-tile.is-sm { border-radius: 12px; }
.avatar-tile.is-xs { width: calc(var(--sz) + 4px); height: calc(var(--sz) + 4px); border-radius: 8px; box-shadow: none; }

/* ------------------------------------------------------------------ scoreboard */
.board { background: var(--board); color: var(--board-ink); border: 1px solid var(--board-line); border-radius: 16px; }
.digits { display: inline-flex; gap: 3px; vertical-align: middle; }
.dg {
  font-family: var(--font-pixel); color: var(--amber); background: var(--board-2);
  border-radius: 4px; min-width: 0.95em; text-align: center; line-height: 1.12; padding: 0 0.08em;
  text-shadow: 0 0 10px var(--amber-glow);
  font-variant-numeric: tabular-nums;
}
.digits.is-big .dg { font-size: 54px; padding: 2px 6px 0; border: 1px solid var(--board-line); }
.board-ovr {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px;
  padding: 12px 14px; margin-top: 14px;
}
.board-cap { display: flex; flex-direction: column; gap: 4px; }
.board-cap .pxf { color: var(--amber); font-size: 16px; letter-spacing: 1px; }
.board-kr { font-size: 11px; color: var(--board-ink-2); white-space: nowrap; }
.board-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-size: 12.5px; color: var(--board-ink-2); min-width: 0; }
.board-delta b { display: block; font-family: var(--font-pixel); font-weight: 400; font-size: 20px; color: var(--board-ink); }
.board-delta.is-up b { color: var(--board-up); }
.board-delta.is-down b { color: var(--board-down); }
.board-peak { font-size: 13px; color: var(--board-ink); }
.board-peak .pxf { color: var(--amber); font-size: 8px; }

/* ------------------------------------------------------------------ rating bars & meters */
.rbar {
  display: grid; grid-template-columns: 5.2em 1fr 2.1em 2.4em; align-items: center; gap: 8px;
  min-height: 26px; font-size: 14px;
}
.rbar.no-delta { grid-template-columns: 5.2em 1fr 2.1em; }
.rbar-name { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.focus-pin { display: inline-grid; place-items: center; color: var(--gold); flex: none; }
.rbar-track { position: relative; height: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.rbar-track::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 7px, var(--surface) 7px 9px);
  opacity: 0.85;
}
.rbar-fill { display: block; height: 100%; background: var(--field); transition: width 0.4s ease; }
.rbar-fill.is-elite { background: var(--gold); }
.rbar-fill.is-good { background: var(--field); }
.rbar-fill.is-mid { background: var(--field); opacity: 0.72; }
.rbar-fill.is-low { background: var(--ink-3); }
.rbar-val { font-family: var(--font-pixel); font-size: 13px; text-align: right; }
.rbar-delta { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-flat { color: var(--ink-2); }
.rbar.is-focus .rbar-name { font-weight: 700; }
.bars { display: grid; gap: 4px; }
.legend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); }

.meter + .meter { margin-top: 12px; }
.meter-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.meter-head span { color: var(--ink-2); }
.meter-track { height: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--field); border-radius: 5px; }

/* ------------------------------------------------------------------ title */
.hero { padding: 4px 0 18px; }
.title-logo {
  display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 400;
  font-size: 42px; line-height: 1.1; letter-spacing: -0.5px; margin: 4px 0 12px; color: var(--ink);
}
.title-gg { color: var(--field); }
.pitch { color: var(--ink-2); font-size: 15px; }

.ms-panel { background: var(--board); color: var(--board-ink); border: 1px solid var(--board-line); border-radius: 20px; padding: 10px 10px 8px; margin-bottom: 16px; }
.ms-stage { position: relative; aspect-ratio: 64 / 40; border-radius: 12px; overflow: hidden; background: var(--board-2); }
.ms-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.ms-scene.is-active { opacity: 1; }
.ms-scene .scene { height: 100%; border-radius: 0; }
.ms-cap { margin: 10px 6px 6px; font-size: 14px; font-weight: 600; min-height: 22px; }
.ms-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; position: relative; }
.ms-steps::before { content: ''; position: absolute; left: 10%; right: 10%; top: 15px; height: 2px; background: var(--board-line); }
.ms-step button {
  display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%;
  padding: 8px 0 4px; border: 0; background: none; cursor: pointer; border-radius: 8px;
  color: var(--board-ink-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.ms-dot { position: relative; z-index: 1; width: 14px; height: 14px; background: var(--board-off); border: 2px solid var(--board-line); }
.ms-step.is-done .ms-dot { background: var(--amber); border-color: var(--amber); opacity: 0.5; }
.ms-step.is-active .ms-dot { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.ms-step.is-active button { color: var(--amber); font-weight: 700; }

.title-actions { margin-bottom: 16px; }
.continue-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--card-line); border-radius: 16px; box-shadow: var(--shadow-1);
  text-align: left; cursor: pointer;
}
.continue-card:hover { border-color: var(--field); }
.cc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-eyebrow { font-size: 12px; font-weight: 700; color: var(--field); }
.cc-name { font-size: 17px; line-height: 1.3; }
.cc-meta { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ovr { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--board); border-radius: 10px; padding: 6px 8px; }
.cc-ovr .pxf { font-size: 8px; color: var(--board-ink-2); }
.cc-ovr .dg { font-size: 22px; }
.cc-go { color: var(--ink-3); }

.how-list { list-style: none; margin: 0; padding: 0; counter-reset: how; display: grid; gap: 12px; }
.how-list li { position: relative; padding-left: 34px; display: flex; flex-direction: column; gap: 2px; counter-increment: how; }
.how-list li::before {
  content: counter(how); position: absolute; left: 0; top: 1px; width: 24px; height: 24px;
  display: grid; place-items: center; font-family: var(--font-pixel); font-size: 12px;
  background: var(--board); color: var(--amber); border-radius: 6px;
}
.how-list b { font-size: 15px; }
.how-list span { font-size: 13.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ creation */
.pdots { display: flex; align-items: center; gap: 6px; }
.pdot { width: 20px; height: 6px; border-radius: 3px; background: var(--line); transition: width 0.2s ease, background-color 0.2s ease; }
.pdot.is-done { background: var(--field); opacity: 0.45; }
.pdot.is-on { background: var(--field); width: 34px; }
.pstep { width: 44px; text-align: right; font-size: 12px; color: var(--ink-2); }
.create-title { font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -0.3px; margin: 6px 0 6px; }
.create-sub { color: var(--ink-2); font-size: 14px; margin: 0 0 18px; }

.av-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.av-cell {
  aspect-ratio: 1; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 2px solid transparent; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1);
}
.av-cell > svg, .av-cell > .art-fallback { width: 48px; height: 48px; }
.av-cell:hover { border-color: var(--line); }
.av-cell.is-on { border-color: var(--field); background: var(--field-soft); }

.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field-2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.input {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  font-size: 16px; line-height: 1.4;
}
.input:focus-visible { border-color: var(--field); outline-offset: 1px; }
.input::placeholder { color: var(--ink-3); }
.input-row { position: relative; }
.input-row .input { padding-right: 52px; }
.counter { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.help { font-size: 12.5px; color: var(--ink-2); margin: 6px 2px 0; }
.help.is-error { color: var(--up); font-weight: 600; }
.btn-random { margin-top: 4px; }

.cands { display: grid; gap: 10px; margin-bottom: 12px; }
.cand {
  display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 14px; text-align: left; cursor: pointer;
  background: var(--surface); border: 2px solid var(--card-line); border-radius: 16px; box-shadow: var(--shadow-1);
}
.cand:hover { border-color: var(--line); }
.cand.is-on { border-color: var(--field); box-shadow: 0 0 0 3px var(--field-soft); }
.cand-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cand-name { font-size: 18px; font-weight: 700; }
.cand-check { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: 50%; border: 2px solid var(--line); color: transparent; }
.cand.is-on .cand-check { background: var(--field); border-color: var(--field); color: var(--field-ink); }
.cand-desc { font-size: 13px; color: var(--ink-2); margin-top: -6px; }
.cand-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cand-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); }
.cand-tag b { font-family: var(--font-pixel); font-weight: 400; }
.cand-bars { display: grid; gap: 2px; }
.cand-bars .rbar { min-height: 22px; font-size: 13px; }
.cand-foot { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.cand-foot .pxf { font-size: 8px; }
.sep { margin: 0 4px; color: var(--ink-3); }

.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.focus-tile {
  display: flex; flex-direction: column; gap: 4px; min-height: 92px; padding: 12px; text-align: left; cursor: pointer;
  background: var(--surface); border: 2px solid var(--card-line); border-radius: 14px; box-shadow: var(--shadow-1);
}
.focus-tile.is-on { border-color: var(--gold); background: var(--gold-soft); }
.focus-tile.is-full { opacity: 0.55; }
.ft-top { display: flex; align-items: center; gap: 8px; }
.ft-top b { font-size: 16px; }
.ft-val { font-size: 13px; color: var(--ink-2); }
.ft-mark { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; border: 2px solid var(--line); color: transparent; }
.focus-tile.is-on .ft-mark { background: var(--gold); border-color: var(--gold); color: var(--gold-on); }
.ft-desc { font-size: 12.5px; color: var(--ink-2); }
.focus-count { text-align: center; font-size: 13px; color: var(--ink-2); margin: 12px 0 0; }

/* player card sheet */
.pcard { display: grid; gap: 12px; }
.pcard-top { display: flex; align-items: center; gap: 14px; }
.pcard-name { font-size: 22px; font-weight: 700; line-height: 1.25; }
.pcard-meta { font-size: 13.5px; color: var(--ink-2); }
.pcard .board-ovr { margin-top: 0; }
.pcard-bars { display: grid; gap: 4px; }

/* ------------------------------------------------------------------ home */
.hc-top { display: flex; align-items: center; gap: 14px; }
.hc-id { min-width: 0; }
.hc-name { font-size: 22px; font-weight: 700; line-height: 1.25; }
.hc-meta { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.phase-chip { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--field-soft); color: var(--field); }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.totals > div { text-align: center; min-width: 0; padding: 0 4px; }
.totals > div + div { border-left: 1px solid var(--line); }
.totals dt { font-size: 12px; color: var(--ink-2); }
.totals dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* next goal + focus strip under the home scoreboard */
.goal-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
.goal-strip > div { min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.goal-strip > div:only-child { grid-column: 1 / -1; }
.goal-strip dt { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.goal-strip dd { margin: 1px 0 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
.gs-goal { box-shadow: inset 3px 0 0 var(--field); }
.gs-goal dt svg { color: var(--field); }
.gs-focus { box-shadow: inset 3px 0 0 var(--gold); }

/* 확인할 일: rows read in the order the CTA walks them; the required one carries a red 필수 pill */
.task-card .card-title { margin-bottom: 4px; }
.task-help { font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.task-none { font-size: 13.5px; color: var(--ink-2); }
.task-card.is-empty { padding-top: 14px; padding-bottom: 14px; }
.task-card.is-empty .card-title { margin-bottom: 2px; font-size: 15px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task-row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 9px 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); text-align: left; border-radius: 14px;
}
.task-row:hover { border-color: var(--ink-3); }
.task-row.is-req { border-color: var(--req); box-shadow: inset 4px 0 0 var(--req); padding-left: 14px; }
.task-row.is-next { background: var(--next-soft); }
.task-row.is-next:not(.is-req) { border-color: var(--field); }
.task-ico { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.task-ico > svg, .task-ico > .art-fallback { width: 32px; height: 32px; }
.task-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.task-kind { font-size: 11.5px; font-weight: 700; color: var(--field); line-height: 1.4; }
.task-row.is-req .task-kind { color: var(--req); }
.task-row.is-trade .task-ico { background: var(--field-soft); }
.task-text b { font-size: 15px; line-height: 1.35; }
.task-sub { font-size: 13px; color: var(--ink-2); }
.req-tag { flex: none; font-size: 12px; font-weight: 700; color: var(--req); background: var(--req-soft); padding: 2px 8px; border-radius: 999px; }
.opt-tag { flex: none; font-size: 11px; color: var(--ink-2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; }
.chev { flex: none; color: var(--ink-3); display: grid; }

.fi { background: var(--surface); border: 1px solid var(--card-line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-1); }
.fi.is-compact { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 0; margin: 0; box-shadow: none; }
.fi.is-compact:first-of-type { border-top: 0; padding-top: 0; }
.fi.is-comment.mood-pos:not(.is-compact) { box-shadow: inset 3px 0 0 var(--field), var(--shadow-1); }
.fi.is-comment.mood-neg:not(.is-compact) { box-shadow: inset 3px 0 0 var(--up), var(--shadow-1); }
.fi-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.fi-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--field); color: var(--field-ink); }
.fi-src, .fi-author { color: var(--ink); font-weight: 700; }
.fi-src2 { font-size: 12px; }
.fi-ago { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.fi-text { margin: 5px 0 6px; font-size: 15px; line-height: 1.55; }
.fi.is-article .fi-text { font-size: 15.5px; font-weight: 600; }
.fi-foot { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-2); }
.fi-like { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.fi-like svg { color: var(--up); }
.fi-replies { list-style: none; margin: 8px 0 0; padding: 8px 0 0 6px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.fi-replies li { display: flex; gap: 6px; }
.fi-replies .fi-text { margin: 0 0 2px; font-size: 14px; }
.fi-replies .fi-author { font-size: 13px; }
.fi-rmark { color: var(--ink-3); font-weight: 700; line-height: 1.6; }
.feed-year { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 14px 2px 8px; }
.feed-year:first-child { margin-top: 0; }
.feed-year .pxf { color: var(--field); font-size: 14px; }

/* injuries: severity pill (경상 / 중상 / 시즌 아웃) + name + weeks · return estimate */
.inj { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.inj-sev { flex: none; font-size: 11.5px; font-weight: 700; line-height: 1.5; padding: 0 7px; border-radius: 6px; background: var(--gold); color: var(--gold-on); }
.sev-major .inj-sev { background: var(--up); color: var(--field-ink); }
.sev-out .inj-sev { background: var(--danger); color: var(--danger-ink); }
.inj-name { font-weight: 700; }
.inj-back { font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.status-chips .chip.chip-inj { display: inline-flex; max-width: 100%; color: var(--ink); background: var(--gold-soft); border-color: transparent; border-radius: 12px; padding: 5px 10px 5px 6px; }
.status-chips .chip.chip-inj.sev-major, .status-chips .chip.chip-inj.sev-out { background: var(--up-soft); }
.chip-inj .inj-name { color: var(--ink); }

/* ------------------------------------------------------------------ player */
.player-head .board-ovr { margin-top: 14px; }
.injury-banner { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--up-soft); color: var(--ink); font-weight: 600; font-size: 14px; }
.injury-banner.sev-minor { background: var(--gold-soft); }
.injury-banner > svg { flex: none; width: 32px; height: 32px; }
.injury-banner .inj-name { font-size: 15px; }
.injury-banner .inj-back { flex-basis: 100%; }
.rows dd.is-split .rv { display: inline-block; }
.rows dd.is-split .rv.is-long { display: inline; }
.rows dd.is-split .rv i { font-style: normal; color: var(--ink-3); white-space: pre; }
.hidden-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hid { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line); min-width: 0; }
.hid.is-open { border-style: solid; background: var(--gold-soft); border-color: transparent; }
.hid-k { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.hid-grade { font-size: 26px; line-height: 1.1; color: var(--ink-3); display: flex; align-items: center; min-height: 30px; }
.hid.is-open .hid-grade { color: var(--gold-ink); }
.hid b { font-size: 15px; }
.hid-desc { font-size: 12px; color: var(--ink-2); }
.hidden-grid + .muted { margin-top: 10px; }
.traits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.traits li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.traits b { font-size: 15px; }
.traits span { font-size: 13px; color: var(--ink-2); }
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.items li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); text-align: center; font-size: 12.5px; }
.items svg { width: 32px; height: 32px; }

/* ------------------------------------------------------------------ records */
.table-card { padding-left: 0; padding-right: 0; }
.table-card > .card-title, .table-card > .muted, .table-card > .empty, .table-card > .table-head { padding-left: 16px; padding-right: 16px; }
.table-head { margin: -6px 0 6px; min-height: 28px; }
/* "밀어서 더 보기": shown while columns are hidden, until the player has scrolled once */
.swipe-hint {
  display: none; align-items: center; gap: 2px; flex: none;
  font-size: 12px; font-weight: 700; color: var(--field); background: var(--field-soft);
  padding: 3px 6px 3px 10px; border-radius: 999px;
}
.swipe-hint svg { animation: nudge 1.4s ease-in-out 3; }
.table-card.can-scroll:not(.hint-off) .swipe-hint { display: inline-flex; }
.table-scroll { position: relative; }
.edge-fade {
  position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none; z-index: 2;
  background: linear-gradient(to right, transparent, var(--surface) 85%);
  opacity: 0; transition: opacity 0.2s ease;
}
.table-card.can-right .edge-fade { opacity: 1; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
.rec { border-collapse: collapse; min-width: 100%; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec th, .rec td { padding: 8px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.rec thead th { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.rec th:first-child, .rec td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding-left: 16px; transition: box-shadow 0.2s ease; }
.table-card.is-scrolled .rec th:first-child { box-shadow: inset -1px 0 0 var(--line), 8px 0 10px -6px var(--edge-shadow); }
.rec tbody th { font-weight: 700; font-family: var(--font-pixel); font-size: 12px; }
.rec td:last-child, .rec th:last-child { padding-right: 16px; }
.rec .c-team { text-align: left; }
.rec tr.is-dim td, .rec tr.is-dim th { color: var(--ink-3); }
.rec .c-from { margin-left: 1px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.rec tfoot th, .rec tfoot td { font-weight: 700; background: var(--surface-2); border-bottom: 0; border-top: 1px solid var(--line); }
.rec tfoot th:first-child { background: var(--surface-2); font-family: var(--font-body); font-size: 12px; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; }
.table-card .muted.small { margin-top: 10px; }

.cabinet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cabinet li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.cabinet li.is-gg { background: var(--gold-soft); }
.cabinet b { font-size: 13px; line-height: 1.3; }
.cab-ico > svg { width: 32px; height: 32px; }
.cab-n { font-size: 14px; color: var(--gold-ink); }
.cabinet li:not(.is-gg) .cab-n { color: var(--field); }
.cab-years { font-size: 11px; color: var(--ink-2); line-height: 1.35; }
/* All-Star appearances: a plain line under the cabinet (not a trophy) */
.asg-lines { list-style: none; margin: 10px 0 0; padding: 10px 2px 0; border-top: 1px dashed var(--line); display: grid; gap: 4px; }
.asg-lines li, .asg-line { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.asg-lines li > svg, .asg-line > svg { flex: none; margin-top: 0.2em; color: var(--ink-3); }
.asg-lines b { font-weight: 600; color: var(--ink); }
.asg-line { margin: 8px 2px 0; }
.rec .c-pos { text-align: left; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.timeline li::before { content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); }
.tl-ico > svg { width: 32px; height: 32px; }
.tl-when { font-size: 12px; color: var(--ink-2); }
.tl-when .pxf { color: var(--field); }
.timeline p { font-size: 14.5px; }
.natl, .sched { list-style: none; margin: 0; padding: 0; }
.natl li, .sched li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.natl li:first-child, .sched li:first-child { border-top: 0; padding-top: 0; }
.natl li > div, .sched li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sched li > svg { width: 32px; height: 32px; }
.sched span { font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------------------ season animation */
.season-head { padding: 18px 0 6px; }
.board-season { padding: 12px; }
.sb-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.sb-year { color: var(--amber); font-size: 18px; }
.sb-label { font-weight: 700; font-size: 15px; }
.sb-team { margin-left: auto; font-size: 13px; color: var(--board-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sb-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.sb-grid th { font-family: var(--font-pixel); font-weight: 400; font-size: 12px; color: var(--board-ink-2); text-align: center; padding: 2px 0; }
.sb-grid th.sb-rowh { width: 2.5em; font-family: var(--font-body); font-size: 11px; text-align: left; }
.sb-grid th.sb-ovrh { width: 50px; color: var(--amber); font-size: 8px; }
.sb-grid th.is-cur { color: var(--amber); }
.sb-grid th.is-past { color: var(--board-ink); }
.sb-grid td { text-align: center; padding: 0; vertical-align: middle; }
.lamp { display: block; width: 100%; max-width: 26px; aspect-ratio: 1; margin: 0 auto; background: var(--board-off); border: 1px solid var(--board-line); transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.lamp.is-played { background: var(--board-ink-2); box-shadow: inset 0 0 0 7px var(--board-off); }
.lamp.is-neutral { background: var(--board-ink-2); }
.lamp.is-good { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px var(--amber-glow); }
.lamp.is-big { background: var(--amber); border-color: var(--board-ink); box-shadow: 0 0 14px var(--amber); animation: lamp-pop 0.5s ease; }
.lamp.is-bad { background: var(--board-up); border-color: var(--board-up); }
.sb-ovr { white-space: nowrap; }
.sb-ovr .dg { font-size: 20px; }
.sb-ovr.is-final .dg { animation: lamp-pop 0.6s ease; }
.sb-progress { height: 4px; margin-top: 10px; background: var(--board-off); overflow: hidden; border-radius: 2px; }
.sb-bar { display: block; height: 100%; background: var(--amber); transition: width 0.45s ease; }
.sb-final { margin-top: 10px; font-size: 14px; }
.sb-final b { font-family: var(--font-pixel); font-weight: 400; color: var(--amber); }
.sb-final b.is-up { color: var(--board-up); }
.sb-final b.is-down { color: var(--board-down); }

.ticker {
  display: flex; flex-direction: column; gap: 2px; min-height: 84px; margin: 12px 0;
  padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--card-line);
  box-shadow: inset 4px 0 0 var(--amber), var(--shadow-1);
}
.ticker.is-big { background: var(--gold-soft); border-color: transparent; box-shadow: inset 4px 0 0 var(--gold), var(--shadow-1); animation: ticker-pop 0.45s ease; }
.ticker.is-big .tk-title { color: var(--gold-ink); }
.ticker.is-bad { box-shadow: inset 4px 0 0 var(--up), var(--shadow-1); }
.tk-month { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tk-month.tone-good { color: var(--field); }
.tk-month.tone-big { color: var(--gold-ink); }
.tk-month.tone-bad { color: var(--up); }
.tk-title { font-size: 17px; line-height: 1.4; }
.tk-text { font-size: 14px; color: var(--ink-2); }
.slog { list-style: none; margin: 0; padding: 0; }
.slog li { display: flex; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); animation: slide-in 0.3s ease; }
.slog-m { flex: none; width: 3.2em; font-size: 12px; font-weight: 700; color: var(--ink-2); padding-top: 2px; }
.slog li.tone-good .slog-m { color: var(--field); }
.slog li.tone-big .slog-m { color: var(--gold-ink); }
.slog li.tone-bad .slog-m { color: var(--up); }
.slog li.tone-big b { color: var(--gold-ink); }
.slog b { display: block; font-size: 15px; }
.slog span { font-size: 13.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ sheets */
.layer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade-in 0.2s ease; }
.sheet {
  position: relative; width: 100%; max-width: var(--col);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink);
  border-radius: 22px 22px 0 0; box-shadow: var(--shadow-2);
  padding: 4px var(--gutter) 0; animation: sheet-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet:focus-visible { outline: none; }
.layer.is-update .sheet, .layer.is-update .scrim, .layer.is-update .fx i, .layer.is-update .hero-title,
.layer.is-update .hero-card .hero-art::after { animation: none; }
.sheet-grab { width: 40px; height: 4px; margin: 6px auto 10px; border-radius: 2px; background: var(--line); }
.sheet-x { position: absolute; top: 10px; right: 10px; z-index: 3; background: var(--surface); box-shadow: var(--shadow-1); border-radius: 50%; width: 40px; height: 40px; }
.sheet-body { padding-bottom: 18px; }
.sheet-foot {
  position: sticky; bottom: 0; z-index: 2; margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter) calc(14px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--line);
}
.sheet-scene { margin: 0 0 14px; }
.sheet-title { font-size: 21px; font-weight: 700; line-height: 1.38; margin: 2px 0 8px; padding-right: 40px; }
.sheet-scene + .eyebrow + .sheet-title { padding-right: 0; }
.sheet-sub { font-size: 14px; color: var(--ink-2); margin: -4px 0 8px; }
.sheet-text { font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
.sheet-note { font-size: 13px; color: var(--ink-2); margin: 12px 2px 0; }
div.sheet-note { margin: 12px 0 0; }
.sheet-note.is-warn { padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); }
.sheet-note.is-warn p { font-weight: 600; }
.sheet-note .link-btn { margin-top: 2px; color: var(--gold-ink); }
.sub-h { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px; }
.form-msg { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--field); }
.form-msg.is-error { color: var(--up); }
.warn { padding: 10px 12px; border-radius: 12px; background: var(--up-soft); color: var(--up); font-size: 13.5px; font-weight: 600; margin: 0 0 12px; }

/* summary */
.headline { font-size: 21px; font-weight: 700; line-height: 1.45; margin: 2px 0 14px; padding-right: 40px; }
.headline em { font-style: normal; font-family: var(--font-display); font-weight: 400; font-size: 34px; color: var(--field); margin: 0 1px 0 2px; line-height: 1; }
.sum-ovr { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 8px; border-radius: 14px; }
.sum-ovr > .pxf { color: var(--amber); font-size: 14px; }
.sum-ovr .dg { font-size: 26px; }
.sum-arrow { color: var(--board-ink-2); display: grid; }
.sum-d { margin-left: auto; font-family: var(--font-pixel); font-size: 20px; }
.sum-d.is-up { color: var(--board-up); }
.sum-d.is-down { color: var(--board-down); }
.sum-d.is-flat { color: var(--board-ink-2); }
.deltas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.deltas li { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--ink); }
.deltas li b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.deltas li i { font-style: normal; font-weight: 700; min-width: 2em; text-align: right; }
.deltas li.is-up { background: var(--up-soft); }
.deltas li.is-up i { color: var(--up); }
.deltas li.is-down { background: var(--down-soft); }
.deltas li.is-down i { color: var(--down); }
.awards, .tours, .notes, .highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.awards li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.awards li.is-gg { background: var(--gold-soft); }
.awards li svg { width: 32px; height: 32px; }
.awards li div, .tours li div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.awards span, .tours span:not(.badge) { font-size: 13px; color: var(--ink-2); }
.tours li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.tours li:first-child { border-top: 0; }
.notes { margin-top: 14px; }
.notes li { font-size: 13.5px; color: var(--ink-2); padding-left: 14px; position: relative; }
.notes li::before { content: ''; position: absolute; left: 2px; top: 0.65em; width: 5px; height: 5px; background: var(--ink-3); }
.mini-feed { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }

/* celebration hero: a scoreboard-coloured card with the scene, a display title and one-shot pixel confetti */
.hero-card {
  position: relative; margin: 0 0 18px; overflow: hidden; text-align: center;
  background: var(--board); color: var(--board-ink); border: 1px solid var(--board-line); border-radius: 18px;
}
.hero-card.is-gold { border: 2px solid var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft), 0 10px 28px var(--gold-glow); }
.hero-art { position: relative; overflow: hidden; }
.hero-art .scene { border-radius: 0; }
.hero-card.is-gold .hero-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(105deg, transparent 30%, var(--shine) 50%, transparent 70%);
  transform: translateX(-110%); animation: shine 1.3s ease-in-out 0.55s 1 both;
}
.hero-text { padding: 12px 16px 16px; }
.hero-kicker { font-size: 12.5px; font-weight: 700; color: var(--amber); letter-spacing: 0.02em; }
.hero-title {
  font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.18; letter-spacing: -0.3px;
  margin: 4px 0 2px; color: var(--board-ink); animation: hero-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.15s both;
}
.hero-card.is-long .hero-title { font-size: 25px; }
.hero-card.is-gold .hero-title { color: var(--amber); text-shadow: 0 0 16px var(--amber-glow); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 4px 14px 4px 8px;
  border-radius: 999px; background: var(--amber); color: var(--board); font-size: 15px; font-weight: 700;
}
.hero-badge svg { width: 16px; height: 16px; }
.hero-sub { font-size: 14px; line-height: 1.55; color: var(--board-ink-2); margin: 8px 0 0; }
.hero-sub.is-route { font-size: 17px; font-weight: 700; color: var(--board-ink); }
.hero-note { font-size: 13px; line-height: 1.5; color: var(--board-ink-2); margin: 4px 0 0; }
.hero-also { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 0; padding: 0; }
.hero-also li { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--board-line); background: var(--board-2); color: var(--board-ink); }
.has-hero .headline { padding-right: 0; }

/* pixel confetti / sparkles: invisible unless animated, so fast mode and reduced motion show nothing */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.fx i { position: absolute; left: var(--x); top: -6%; width: var(--s); height: var(--s); opacity: 0; background: var(--amber); }
.fx i.k1 { background: var(--board-up); }
.fx i.k2 { background: var(--board-ink); }
.fx i.k3 { background: var(--board-down); }
.fx-gold i.k1 { background: var(--gold); }
.fx-gold i.k3 { background: var(--amber); }
.fx-confetti i, .fx-gold i { animation: confetti-fall var(--t) cubic-bezier(0.25, 0.6, 0.45, 1) calc(var(--d) + var(--fx-shift, 0s)) 1 both; }
.fx-sparkle i { top: var(--y); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle var(--t) ease-in-out calc(var(--d) + var(--fx-shift, 0s)) 1 both; }
.fx-sparkle i.k1, .fx-sparkle i.k3 { background: var(--amber); }

/* select-then-confirm: what is selected, right above the confirm button */
.sel-line {
  display: flex; align-items: center; gap: 6px; min-height: 22px; margin: -2px 2px 8px;
  font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sel-line > span { flex: none; color: var(--ink-2); }
.sel-line b { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 700; }
.sel-line i { flex: none; font-style: normal; font-weight: 700; color: var(--ink-2); margin-left: auto; }
.sel-line.is-on > svg { flex: none; color: var(--field); }

/* task options */
.path-head { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 8px; }
.path-head .sub-h { margin: 0; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
}
.opt:hover { border-color: var(--ink-3); }
.opt.is-on { border-color: var(--field); background: var(--field-soft); box-shadow: inset 0 0 0 1px var(--field); }
.opt.is-disabled { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.opt.is-disabled .opt-label, .opt.is-disabled .opt-desc { color: var(--ink-3); }
.opt-radio { flex: none; width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); color: transparent; }
.opt.is-on .opt-radio { background: var(--field); border-color: var(--field); color: var(--field-ink); }
.opt-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt-label { font-size: 16px; line-height: 1.4; }
.opt-desc { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.opt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.opt.is-on .tag { background: var(--surface); }
/* projections ('예상 OVR 71 → 74') and raises / cuts ('(+300%)'): red up, blue down (Korean convention) */
.tag.is-up, .opt.is-on .tag.is-up { color: var(--up); background: var(--up-soft); border-color: transparent; }
.tag.is-down, .opt.is-on .tag.is-down { color: var(--down); background: var(--down-soft); border-color: transparent; }
.pos-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: -2px 0 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.pos-now > svg { flex: none; width: 16px; height: 16px; }
.pos-now b { color: var(--ink); font-weight: 700; }
.pos-now i { font-style: normal; color: var(--ink-3); }
.pos-now .pxf { font-size: 9px; }
.task-row.is-pos:not(.is-req) .task-kind { color: var(--gold-ink); }
.trade-now span { min-width: 0; }
.trade-now i { font-weight: 700; color: var(--ink-2); }
/* FA / 다년계약 money: '계약금 40억 · 연봉 총 50억 · 옵션 10억' as a small grid; the headline tag ('4년 최대 100억') in gold */
.tag.is-money, .opt.is-on .tag.is-money { color: var(--gold-ink); background: var(--gold-soft); border-color: transparent; font-weight: 700; }
.opt-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 4px; margin-top: 4px; }
.om { display: flex; flex-direction: column; min-width: 0; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.opt.is-on .om { background: var(--surface); }
.om-k { font-size: 11px; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.om-v { font-size: 13.5px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.opt-cost { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.opt-reason { font-size: 13px; font-weight: 600; color: var(--up); }

.wallet { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.wallet svg { width: 32px; height: 32px; }
.wallet span { color: var(--ink-2); }
.wallet b { margin-left: auto; font-variant-numeric: tabular-nums; }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
}
.shop-item.is-on { border-color: var(--field); background: var(--field-soft); box-shadow: inset 0 0 0 1px var(--field); }
.shop-item.is-disabled { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.shop-item.is-disabled .shop-ico { opacity: 0.5; }
.shop-ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.shop-item.is-on .shop-ico { background: var(--surface); }
.shop-ico > svg { width: 32px; height: 32px; }
.shop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-main b { font-size: 15px; }
.shop-desc { font-size: 13px; color: var(--ink-2); }
.shop-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 42%; }
.price { font-size: 14px; font-weight: 700; text-align: right; }
.tier { display: inline-flex; gap: 2px; }
.tier span { width: 6px; height: 6px; background: var(--line); }
.tier span.on { background: var(--gold); }

.focus-checks { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.focus-checks legend { padding: 0; grid-column: 1 / -1; }
.check { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; background: var(--surface); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.check.is-on { border-color: var(--gold); background: var(--gold-soft); }
.check.is-disabled { opacity: 0.55; cursor: not-allowed; }
.check-box { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; border: 2px solid var(--line); color: transparent; }
.check.is-on .check-box { background: var(--gold); border-color: var(--gold); color: var(--gold-on); }
.check-main { display: flex; flex-direction: column; min-width: 0; }
.check-main b { font-size: 15px; }
.check-main span { font-size: 12.5px; color: var(--ink-2); }
.check-main .check-tags { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.check.is-on .check-main .check-tags { color: var(--gold-ink); }

.result-chips { margin-top: 4px; }

/* settings */
.menu { list-style: none; margin: 4px 0 0; padding: 0; border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left; cursor: pointer;
  border: 0; border-top: 1px solid var(--line); background: none;
}
.menu li:first-child .menu-row { border-top: 0; }
.menu-row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.menu-row b { font-size: 15px; }
.menu-row span span { font-size: 12.5px; color: var(--ink-2); }
.menu-row > svg:first-child { color: var(--field); }
.menu-row > svg:last-child { color: var(--ink-3); }
.menu-row[aria-disabled="true"] { cursor: not-allowed; }
.menu-row[aria-disabled="true"] b, .menu-row[aria-disabled="true"] > svg { color: var(--ink-3); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg-btn { min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.switch-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface-2); text-align: left; cursor: pointer; }
.switch-row > span:first-child { flex: 1; display: flex; flex-direction: column; }
.switch-row b { font-size: 15px; }
.switch-row span span { font-size: 12.5px; color: var(--ink-2); }
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); transition: background-color 0.2s ease; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform 0.2s ease; }
.switch.is-on { background: var(--field); }
.switch.is-on::after { transform: translateX(18px); }
.about { display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding-bottom: 6px; }
.about b { color: var(--ink); }
.back-link { margin: -4px 0 4px; }
.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; resize: vertical; min-height: 110px; word-break: break-all; }
.sheet .btn + label.sub-h, .sheet textarea + .btn { margin-top: 10px; }
.file-btn { position: relative; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ ranking */
.mode-badge { flex: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.mode-badge.is-shared { background: var(--field-soft); color: var(--field); border-color: transparent; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 4px; margin: 0 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tabs-btn { min-height: 40px; padding: 8px 4px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs-btn.is-on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-1); }
.list-h { margin: 6px 2px 10px; align-items: baseline; }
.rk-list { list-style: none; margin: 0 0 14px; padding: 0; background: var(--surface); border: 1px solid var(--card-line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-1); }
.rk-list.is-preview { margin: 0; border: 0; box-shadow: none; border-radius: 0; background: none; }
.rk-row > details > summary, .rk-row.is-compact {
  display: grid; grid-template-columns: 26px auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-top: 1px solid var(--line); cursor: pointer; list-style: none;
}
.rk-row:first-child > details > summary, .rk-row.is-compact:first-child { border-top: 0; }
.rk-row.is-compact { cursor: default; padding: 8px 0; }
.rk-row > details > summary::-webkit-details-marker { display: none; }
.rk-row > details[open] > summary { background: var(--surface-2); }
.rk-n { text-align: center; font-size: 15px; color: var(--ink-2); }
.rk-n.is-1 { color: var(--gold); font-size: 18px; }
.rk-n.is-2 { color: var(--silver); font-size: 17px; }
.rk-n.is-3 { color: var(--bronze); font-size: 16px; }
.rk-id { min-width: 0; display: flex; flex-direction: column; }
.rk-name { font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.rk-name, .rk-meta, .rk-hl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-meta, .rk-hl { font-size: 12px; color: var(--ink-2); }
.rk-hl { color: var(--ink); }
.me-tag { flex: none; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: var(--field); color: var(--field-ink); }
.rk-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rk-gg { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 4px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: 13px; }
.rk-gg svg { width: 16px; height: 16px; }
.rk-gg-k { font-size: 11.5px; font-weight: 700; }
.rk-ovr { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.rk-ovr .pxf { font-size: 8px; }
.rk-more { padding: 4px 14px 10px 48px; background: var(--surface-2); }
.rk-more .row { font-size: 13px; padding: 7px 0; }
.rules { font-size: 12.5px; color: var(--ink-2); text-align: center; margin: 8px 8px 0; }
.rank-preview .empty { padding: 10px 0 4px; }

.nine { background: var(--board); color: var(--board-ink); border: 1px solid var(--board-line); border-radius: 18px; padding: 14px 10px 10px; margin-bottom: 16px; }
.nine .card-title { color: var(--board-ink); padding: 0 4px; margin-bottom: 8px; }
.nine .muted { color: var(--board-ink-2); padding: 6px 4px 0; }
.nine-field {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, 88px);
  grid-template-areas: "lf cf rf" "ss . b2" "b3 p b1" ". c dh";
  gap: 4px 6px; padding: 4px 0;
}
/* infield diamond: corners at 2B (row 2 centre), 3B / 1B (row 3 sides) and home (row 4 centre) */
.nine-field::before, .nine-field::after {
  content: ''; position: absolute; left: 16.67%; right: 16.67%; top: 140px; bottom: 48px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--board-line);
}
.nine-field::after { left: calc(16.67% + 3px); right: calc(16.67% + 3px); top: 143px; bottom: 51px; background: var(--board-2); }
.nine-cell { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 2px; text-align: center; }
.nine-pos { font-size: 11px; font-weight: 700; color: var(--amber); }
.nine-name { max-width: 100%; margin-top: 2px; font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nine-sub { font-size: 10.5px; color: var(--board-ink-2); white-space: nowrap; }
.nine-empty { font-size: 12px; color: var(--board-ink-2); }
.nine-base { display: block; width: 14px; height: 14px; margin-top: 4px; border: 2px solid var(--board-line); transform: rotate(45deg); }
.nine-cell.is-empty .nine-pos { color: var(--board-ink-2); }
.nine-cell .avatar-tile { background: var(--board-2); }

.loading-card { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px; color: var(--ink-2); font-size: 14px; }
.loading-card.is-inline { padding: 14px 0 6px; }
.screen-boot .loading-card { padding-top: 40vh; }
.spinner { flex: none; display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--field); animation: spin 0.8s linear infinite; }

/* ------------------------------------------------------------------ retirement */
.ret-scene { margin: 4px 0 16px; border-radius: 18px; }
.ret-scene.is-hof { box-shadow: 0 0 0 2px var(--gold-line), 0 0 0 6px var(--gold-soft), 0 10px 28px var(--gold-glow); }
.ret-head { margin-bottom: 14px; }
.ret-title { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.25; margin: 2px 0 6px; letter-spacing: -0.3px; }
.hof { display: flex; align-items: flex-start; gap: 12px; }
.hof.is-hof { background: var(--gold-soft); border-color: transparent; }
.hof-medal { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); }
.hof.is-hof .hof-medal { background: var(--gold); }
.hof.is-cand .hof-medal { background: var(--field-soft); }
.hof-medal > svg { width: 32px; height: 32px; }
.hof-label { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hof.is-hof .hof-label { color: var(--gold-ink); }
.hof-score { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--board); color: var(--amber); }
.hof-text { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 1.6; }
.hof.is-hof .hof-text { color: var(--ink); }
.highlights li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-size: 14.5px; }
.highlights svg { width: 32px; height: 32px; }
.reg-status { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; font-size: 14px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.reg-status > svg, .reg-status > .spinner { flex: none; margin-top: 1px; }
.reg-status.is-ok { background: var(--field-soft); color: var(--field); }
.reg-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reg-text b { font-weight: 700; }
.reg-help { font-size: 13px; font-weight: 500; line-height: 1.55; color: var(--ink-2); }
.reg-status.is-local { background: var(--gold-soft); color: var(--gold-ink); }
.reg-status.is-local .reg-help { color: var(--ink); }
/* "this device only": why a record stays local and how to reach the shared ranking (title card, ranking screen) */
.share-note { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--ink); font-size: 13px; line-height: 1.55; }
.share-note > svg { flex: none; margin-top: 0.3em; color: var(--gold-ink); }
.share-note b { display: block; color: var(--gold-ink); }
.share-note.is-compact { margin: 10px 0 0; padding: 8px 10px; font-size: 12.5px; }
/* server copy (cloud backup) offer */
.continue-card.is-cloud { border-style: dashed; border-color: var(--field); background: var(--next-soft); }
.cloud-pair { display: grid; gap: 8px; }
.cc-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.cc-mini:first-child { background: var(--next-soft); border-color: var(--field); }
.cc-mini .cc-name { font-size: 16px; }
.cc-mini .cc-meta { white-space: normal; }
.ret-actions { display: grid; gap: 0; }

/* ------------------------------------------------------------------ error */
.screen-error { padding-top: 24px; }
.error-card { text-align: center; padding: 24px 18px; }
.error-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--up-soft); color: var(--up); margin-bottom: 8px; }
.error-card p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 14px; }
.err-more { text-align: left; margin: 0 0 16px; font-size: 13px; color: var(--ink-2); }
.err-more summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.err-detail { white-space: pre-wrap; word-break: break-all; background: var(--surface-2); border-radius: 10px; padding: 10px; margin: 6px 0 0; font-size: 12px; max-height: 160px; overflow: auto; }
.error-actions { display: grid; }

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--cta-h) + 12px + var(--safe-b)); z-index: 90;
  width: max-content; max-width: min(440px, calc(100vw - 32px));
  padding: 10px 16px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-ink);
  font-size: 14px; font-weight: 600; text-align: center; line-height: 1.45;
  opacity: 0; transform: translate(-50%, 10px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
html.has-sheet .toast { bottom: calc(96px + var(--safe-b)); }

/* ------------------------------------------------------------------ motion */
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lamp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes ticker-pop { 0% { transform: scale(0.98); } 50% { transform: scale(1.015); } 100% { transform: none; } }
@keyframes hero-pop { 0% { opacity: 0; transform: scale(0.82); } 70% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes shine { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes confetti-fall {
  0% { opacity: 0; top: -6%; transform: translateX(0) rotate(0deg); }
  8% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; top: 104%; transform: translateX(var(--dx)) rotate(var(--r)); }
}
@keyframes twinkle { 0% { opacity: 0; transform: scale(0.2); } 45% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.3); } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(3px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .spinner { animation: none !important; border-top-color: var(--line); border-right-color: var(--field); }
  .fx, .hero-card.is-gold .hero-art::after { display: none !important; }
  .hero-title, .ticker.is-big { animation: none !important; }
}
html.is-fast *, html.is-fast *::before, html.is-fast *::after { animation: none !important; transition: none !important; }

/* ------------------------------------------------------------------ wider screens */
@media (min-width: 420px) {
  .av-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 560px) {
  body {
    background-color: var(--bg);
    background-image: repeating-linear-gradient(90deg, var(--bg) 0 88px, var(--bg-stripe) 88px 176px);
  }
  .app-col { box-shadow: 0 0 0 1px var(--line); }
  .tabbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .sheet { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (max-width: 370px) {
  .title-logo { font-size: 38px; }
  .digits.is-big .dg { font-size: 46px; }
  .board-ovr { gap: 10px; padding: 12px; }
  .tab { font-size: 11px; }
}
