/* Called Up — design/v2
   Aesthetic: baseball card × scoreboard.
   Dark field-green base · cream/sand lines · gold award accents.
   Mobile-first single column; desktop centered 640–720px column.
   One external font (Oswald, condensed) for titles + numerals; system stack for body. */

/* Oswald 자체 호스팅(가변, 400-700): 앱은 오프라인 번들이라 CDN 의존 시
   폰트가 안 와서 시스템 폴백(뚱뚱)으로 렌더됐다 (KOAL). 웹도 한 홉 빨라진다. */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/oswald-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/oswald-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* field-tone base */
  --bg: #0c1a12;
  --bg2: #0a1610;
  --panel: #10241a;
  --panel2: #16301f;
  --line: #24422e;
  --line2: #2e5238;

  /* dirt / sand / chalk */
  --sand: #d9c9a3;
  --chalk: #f2ede0;
  --text: #eef4ea;
  --muted: #8fa892;

  /* accents */
  --gold: #f0c460;
  --gold2: #c9972f;
  --accent: #6fd08c;   /* growth green */
  --info: #6bb7e6;     /* league/info blue */
  --danger: #e0736f;   /* risk */

  /* Monochrome baseball glyph (circle + two seam arcs) for the brand mark. */
  --ball-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="black" stroke-width="1.2"/><path d="M3.5 4C5 6 5 10 3.5 12M12.5 4C11 6 11 10 12.5 12" fill="none" stroke="black" stroke-width="1"/></svg>');

  --mono: "Oswald", ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;
  --cond: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans KR", "Noto Sans JP", sans-serif;

  /* 좌우 세이프에어리어. iPhone Duo 바깥 화면은 상태바·다이내믹 아일랜드가 오른쪽
     옆으로 가서 inset-right가 커진다 (시뮬레이터 84px). 가로 모드 노치도 같은 경로.
     --safe-left/--safe-right로 덮어쓸 수 있게 열어둔다 (스샷·QA용). */
  --safe-l: var(--safe-left, env(safe-area-inset-left, 0px));
  --safe-r: var(--safe-right, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(120% 60% at 50% -10%, #14301f 0%, var(--bg) 55%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.main { max-width: 680px; margin: 0 auto; padding: 14px calc(14px + var(--safe-r)) 48px calc(14px + var(--safe-l)); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 16px;
  /* iOS 세이프에어리어 (KOAL: 앱에서 메뉴바가 상태바에 겹침) — 노치/상태바만큼
     상단 패딩. 웹 브라우저에선 env()가 0이라 무영향. */
  padding-top: calc(10px + var(--safe-top, env(safe-area-inset-top, 0px)));
  padding-left: calc(16px + var(--safe-l));
  padding-right: calc(16px + var(--safe-r));
  background: linear-gradient(180deg, rgba(10,22,16,.96), rgba(10,22,16,.82));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--cond);
  font-weight: 700; font-size: 20px; letter-spacing: .5px;
  text-transform: uppercase; color: var(--chalk);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; flex: none; min-height: 34px;
}
/* Baseball brand glyph — inline SVG (monochrome), not an emoji. */
.brand::before {
  content: ""; width: 16px; height: 16px; flex: none; display: inline-block;
  background: currentColor;
  -webkit-mask: var(--ball-mask) center / contain no-repeat;
  mask: var(--ball-mask) center / contain no-repeat;
  opacity: .9;
}
.controls { display: flex; gap: 8px; align-items: center; }

/* segmented controls (lang + speed) */
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button {
  appearance: none; border: none; background: transparent; color: var(--muted);
  font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: .4px;
  text-transform: uppercase; padding: 8px 12px; min-height: 34px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--gold); color: #241800; }
.seg button:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.02) inset;
}

h2, h3 { font-family: var(--cond); letter-spacing: .4px; }

/* ================================================================
   LANDING
   ================================================================ */
.landing { position: relative; overflow: hidden; text-align: center; padding: 34px 20px 28px; }
.landing .emblem-wall {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  opacity: .06; pointer-events: none; padding: 10px; filter: grayscale(1);
}
.landing .emblem-wall .emblem-img, .landing .emblem-wall img { width: 100%; height: auto; }
.landing > * { position: relative; z-index: 1; }
.landing .kicker {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: 3px;
  font-size: 12px; color: var(--gold); font-weight: 600;
}
.landing .hero {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 8vw, 52px); line-height: .98; letter-spacing: .5px;
  color: var(--chalk); margin: 10px auto 12px; max-width: 12ch;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.landing .hero .accent { color: var(--gold); }
.landing .sub { color: var(--muted); font-size: 15px; max-width: 44ch; margin: 0 auto 22px; }
/* 한글은 어절 단위로만 줄바꿈 (466pt 폭에서 "쓰/는"처럼 단어가 쪼개졌다). 일본어는
   띄어쓰기가 없어 keep-all이면 안 끊기므로 ko에만 건다. */
html[lang="ko"] .landing .hero, html[lang="ko"] .landing .sub { word-break: keep-all; }

.speed-picker { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.speed-pills { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.speed-pill {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .6px; font-weight: 600;
  font-size: 14px; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line2); border-radius: 999px; padding: 9px 18px; cursor: pointer;
  transition: transform .05s, border-color .15s, background .15s;
}
.speed-pill:hover { border-color: var(--gold2); }
.speed-pill[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #241800; border-color: var(--gold);
}
.speed-pill:active { transform: translateY(1px); }
.speed-hint { font-size: 13px; color: var(--muted); min-height: 1.2em; }

/* ---------- Primary / secondary buttons ---------- */
.btn-primary {
  width: 100%; font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  color: #241800; border: none; border-radius: 12px;
  padding: 13px 16px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 4px;
  box-shadow: 0 4px 14px rgba(201,151,47,.25);
}
.btn-primary:active { transform: translateY(1px); }
.app-store-badge {
  display: inline-flex; margin: 16px auto 0; border-radius: 8px;
  transition: transform .05s, opacity .15s;
}
.app-store-badge:hover { opacity: .92; }
.app-store-badge:active { transform: translateY(1px); }
.app-store-badge:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
.app-store-badge img { display: block; width: auto; height: 40px; }
.landing-leaderboard, .landing-team { width: 100%; margin-top: 10px; }
.landing-team-status { display: block; margin-top: 2px; font: 600 12px/1.3 var(--body); color: var(--gold); opacity: .9; }
.landing .resume-bar { margin-bottom: 12px; }
.landing-notes {
  display: flex; align-items: center; gap: 6px; margin: 12px auto 0; padding: 4px 6px;
  border: 0; background: none; color: var(--muted); font: 600 13px/1.2 var(--body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.landing-notes:hover, .landing-notes:focus-visible { color: var(--gold); outline: none; }
.notes-new { padding: 2px 5px; border-radius: 4px; background: var(--gold); color: var(--bg); font: 800 9px/1 var(--cond); letter-spacing: .5px; text-decoration: none; }
.update-notes-list { max-height: 55vh; overflow-y: auto; margin: 10px 0 16px; text-align: left; }
.notes-drawer {
  border: 1px solid rgba(240, 196, 96, .18); border-radius: 12px;
  background: rgba(255, 255, 255, .03); overflow: hidden;
}
.notes-drawer + .notes-drawer { margin-top: 8px; }
.notes-drawer.is-pinned { border-color: rgba(240, 196, 96, .45); background: rgba(240, 196, 96, .06); }
.notes-drawer-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  color: var(--gold); font: 700 14px/1 var(--cond); letter-spacing: .5px;
  list-style: none; cursor: pointer; user-select: none;
}
.notes-drawer.is-pinned .notes-drawer-head { cursor: default; }
.notes-drawer-head::-webkit-details-marker { display: none; }
summary.notes-drawer-head { color: var(--muted); }
summary.notes-drawer-head::after {
  content: ""; margin-left: auto; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s;
}
.notes-drawer[open] > summary.notes-drawer-head { color: var(--gold); }
.notes-drawer[open] > summary.notes-drawer-head::after { transform: rotate(-135deg); }
.notes-latest { padding: 3px 6px; border-radius: 4px; background: var(--gold); color: var(--bg); font: 800 9px/1 var(--cond); letter-spacing: .5px; }
.notes-drawer ul { margin: 0; padding: 0 14px 14px 30px; color: var(--chalk); font-size: 14px; line-height: 1.5; }
.notes-drawer li + li { margin-top: 4px; }
.update-notes-actions { display: flex; gap: 8px; }
.update-notes-actions > button { flex: 1; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .choice-btn:focus-visible,
.diamond-pos:focus-visible, .chip:focus-visible, .btn-mini:focus-visible {
  outline: 3px solid var(--info); outline-offset: 2px;
}
.btn-secondary {
  flex: 1; font-family: var(--cond); text-transform: uppercase; letter-spacing: .6px;
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--line2); border-radius: 12px;
  padding: 11px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gold2); }
.btn-mini {
  font-family: var(--cond); background: var(--info); color: #04121e; border: none;
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: .4px;
}

/* ================================================================
   IDENTITY — stepped cards
   ================================================================ */
.identity h2 { margin: 0 0 4px; font-size: 22px; text-transform: uppercase; color: var(--chalk); }
/* Step indicator = back navigation: visited segments are clickable. */
.step-rail { display: flex; align-items: center; gap: 8px; margin: 10px 0 18px; }
.step-dot {
  flex: 1; height: 7px; border-radius: 999px; background: var(--line);
  border: none; padding: 0; appearance: none; cursor: default;
}
.step-dot.on { background: var(--gold2); }
.step-dot.current { background: var(--gold); box-shadow: 0 0 0 2px rgba(240,196,96,.22); }
.step-dot:not(:disabled):not(.current) { cursor: pointer; }
.step-dot:not(:disabled):not(.current):hover { background: var(--sand); }
.step-dot:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.step-label { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
.field > span { font-family: var(--cond); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.field input, .field select, select, input {
  width: 100%; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line2); border-radius: 10px; padding: 11px 12px; font-size: 15px;
  font-family: var(--body);
}
.field .btn-mini { position: absolute; right: 7px; bottom: 7px; }

/* jersey-number preview */
.id-row { display: flex; gap: 14px; align-items: flex-end; }
.id-row .field { flex: 1; margin-bottom: 0; }
.jersey-preview {
  flex: none; width: 92px; height: 108px; border-radius: 12px;
  background: linear-gradient(180deg, var(--panel2), #0d1f15);
  border: 2px solid var(--gold2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.jersey-preview .jname {
  font-family: var(--cond); font-weight: 700; font-size: 12px; letter-spacing: 2.5px;
  color: var(--gold); text-transform: uppercase; margin-bottom: 3px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jersey-preview .jn { font-family: var(--cond); font-weight: 700; font-size: 52px; line-height: 1; color: var(--chalk); }
.jersey-preview .jl { font-family: var(--cond); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-top: 4px; }

/* segmented toggle group (bats/throws) */
.toggle-group { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-group button {
  font-family: var(--body); font-size: 14px; color: var(--text);
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; flex: 1; min-width: 44%;
}
.toggle-group button[aria-pressed="true"] { border-color: var(--gold); background: rgba(240,196,96,.12); color: var(--chalk); }

/* nationality chips */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line2); border-radius: 999px; padding: 8px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { border-color: var(--gold); background: rgba(240,196,96,.14); color: var(--chalk); }
.chip .flag { font-size: 15px; }
/* Country-code chip (replaces emoji flags). */
.cc-code {
  font-family: var(--cond); font-weight: 700; font-size: 10px; letter-spacing: .5px;
  color: var(--sand); background: rgba(217,201,163,.12); border: 1px solid var(--line2);
  border-radius: 4px; padding: 1px 4px; margin-right: 2px; vertical-align: 1px;
}
.league-preview { margin-top: 12px; font-family: var(--cond); text-transform: uppercase; letter-spacing: .6px; font-size: 13px; color: var(--info); }

/* position field — real ballpark geometry:
   outfield fence arc up top, chalk foul lines from home plate, dirt infield
   diamond with bases + mound, bullpen pad in foul ground, DH in a lineup slot. */
.diamond-hint { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 8px; }
.field-wrap { max-width: 360px; margin: 0 auto; }
.diamond {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background:
    radial-gradient(85% 75% at 50% 78%, #1e4e2d 0%, #1a452a 45%, #143620 75%, #0f2818 100%);
  border: 2px solid rgba(217,201,163,.4);
  border-radius: 48% 48% 16px 16px / 34% 34% 16px 16px; /* outfield fence arc */
  overflow: hidden;
}
/* warning-track line inside the fence */
.diamond .of-fence {
  position: absolute; inset: 7px;
  border: 1.5px dashed rgba(217,201,163,.22);
  border-radius: 48% 48% 12px 12px / 34% 34% 12px 12px;
  pointer-events: none;
}
/* chalk foul lines from home plate to the corners */
.diamond .foul-line {
  position: absolute; left: 50%; bottom: 10%; width: 2px; height: 58%;
  background: rgba(242,237,224,.4); transform-origin: bottom center; pointer-events: none;
}
.diamond .foul-line.l { transform: rotate(45deg); }
.diamond .foul-line.r { transform: rotate(-45deg); }
/* infield: dirt diamond + inner grass + mound + bases + home plate */
.diamond .infield-dirt {
  position: absolute; left: 50%; top: 62%; width: 40%; height: 40%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(199,168,120,.30); border: 2px solid rgba(217,201,163,.55); border-radius: 8px;
  pointer-events: none;
}
.diamond .infield-grass {
  position: absolute; left: 50%; top: 62%; width: 26%; height: 26%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #1d4a2b; border-radius: 4px; pointer-events: none;
}
.diamond .mound {
  position: absolute; left: 50%; top: 62%; width: 12%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(199,168,120,.5); border: 1px solid rgba(217,201,163,.45); pointer-events: none;
}
.diamond .base {
  position: absolute; width: 9px; height: 9px; background: var(--chalk);
  transform: translate(-50%, -50%) rotate(45deg); border-radius: 1.5px; pointer-events: none;
}
.diamond .base.b2 { left: 50%; top: 33.7%; }
.diamond .base.b1 { left: 78.3%; top: 62%; }
.diamond .base.b3 { left: 21.7%; top: 62%; }
.diamond .home-plate {
  position: absolute; left: 50%; top: 90%; width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  background: var(--chalk); pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
/* bullpen pad in right-field foul ground (RP waits here) */
.diamond .bullpen-pad {
  position: absolute; right: 2.5%; top: 69%; width: 19%; height: 16%;
  background: rgba(199,168,120,.16); border: 1px dashed rgba(217,201,163,.35);
  border-radius: 10px; pointer-events: none;
}
.diamond-pos {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: .3px;
  color: var(--text); background: rgba(12,26,18,.9); border: 1px solid var(--line2);
  border-radius: 999px; padding: 5px 9px; cursor: pointer; white-space: nowrap;
  transition: transform .08s, background .15s, border-color .15s;
}
.diamond-pos:hover { border-color: var(--gold2); }
.diamond-pos[aria-pressed="true"] {
  background: var(--gold); color: #241800; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240,196,96,.25); transform: translate(-50%, -50%) scale(1.12);
}
/* DH: separate lineup slot beneath the field (not a defensive position) */
.dh-slot {
  display: flex; align-items: center; gap: 10px; width: fit-content;
  margin: 10px auto 0; padding: 7px 14px;
  background: var(--panel2); border: 1px dashed var(--line2); border-radius: 999px;
}
.dh-cap { font-family: var(--cond); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.diamond-pos.in-slot { position: static; transform: none; }
.diamond-pos.in-slot[aria-pressed="true"] { transform: scale(1.08); }
.pos-readout { text-align: center; margin-top: 12px; font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; color: var(--chalk); font-size: 15px; }

.step-nav { display: flex; gap: 10px; margin-top: 18px; }
.step-nav .btn-secondary { flex: 0 0 auto; padding-left: 22px; padding-right: 22px; }
.step-nav .spacer { flex: 1; }

/* confirmation summary */
.confirm-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 14px; padding: 16px;
}
.confirm-jersey {
  flex: none; width: 84px; height: 98px; border-radius: 12px;
  background: linear-gradient(180deg, #16301f, #0d1f15);
  border: 2px solid var(--gold2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); padding: 0 6px;
}
.confirm-jersey .jname {
  font-family: var(--cond); font-weight: 700; font-size: 10px; letter-spacing: 1.8px;
  color: var(--gold); text-transform: uppercase; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.confirm-jersey .jn { font-family: var(--cond); font-weight: 700; font-size: 44px; line-height: 1; color: var(--chalk); }
.confirm-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.cr:last-child { border-bottom: none; padding-bottom: 0; }
.cr span { font-family: var(--cond); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); white-space: nowrap; }
/* Value wraps instead of truncating — the confirm screen must show the full pick
   (e.g. "SP — Starting Pitcher", "Right throw / Right bat") on a 390px phone. */
.cr b { font-size: 14px; font-weight: 600; color: var(--chalk); text-align: right; white-space: normal; overflow-wrap: anywhere; }
.confirm-hint { font-size: 13px; color: var(--muted); margin: 12px 2px 14px; }

/* ================================================================
   PLAYER CARD — trading-card frame
   ================================================================ */
.player-card {
  position: relative; overflow: hidden;
  background:
    linear-gradient(160deg, #163a24 0%, #0f2618 60%, #0c1e13 100%);
  border: 1px solid var(--line2);
}
.player-card .watermark {
  position: absolute; right: -26px; top: 50%; transform: translateY(-50%);
  width: 190px; height: 190px; opacity: .09; pointer-events: none; filter: grayscale(1);
}
.player-card .watermark img, .player-card .watermark .emblem-img { width: 100%; height: 100%; }
.pc-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pc-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pc-emblem { flex: none; }
.pc-id { min-width: 0; }
/* Name truncates within its own space; the number is a separate, non-shrinking sibling
   so it never gets clipped INTO the OVR badge (Memcho C). */
.pc-nameline { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.pc-name { font-family: var(--cond); font-size: 22px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--chalk); min-width: 0; }
.pc-num { color: var(--gold); font-weight: 600; flex: none; }
.radar-val { fill: var(--chalk); font: 700 10px var(--mono); }
.radar-val-in { fill: var(--gold); font-weight: 700; }
.pc-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pc-team { font-family: var(--cond); text-transform: uppercase; letter-spacing: .5px; font-size: 13px; color: var(--info); margin-top: 3px; }

/* OVR badge — big scoreboard block */
.pc-ovr {
  flex: none; width: 74px; height: 74px; border-radius: 14px;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(201,151,47,.3);
}
.pc-ovr-num { font-family: var(--mono); font-weight: 700; font-size: 34px; line-height: 1; color: #241800; font-variant-numeric: tabular-nums; }
.pc-ovr-label { font-family: var(--cond); font-size: 10px; letter-spacing: 2px; color: #4a3200; font-weight: 600; }
.pc-age { position: relative; z-index: 1; margin-top: 10px; font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; font-size: 13px; color: var(--muted); }
.pc-age b { color: var(--chalk); font-weight: 600; }

/* trophy case chips (inline, compact) */
.trophy-case { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line2); }
.trophy {
  font-family: var(--cond); font-size: 12px; letter-spacing: .3px;
  background: rgba(240,196,96,.12); color: var(--gold);
  border: 1px solid rgba(240,196,96,.35); border-radius: 999px; padding: 4px 11px; font-weight: 600;
}
.trophy.title { color: #ffe4a0; border-color: rgba(255,228,160,.5); }
.trophy.muted { color: var(--muted); background: transparent; border-color: var(--line); }

/* Monochrome SVG glyphs (replace all emoji). Inherit color from context. */
.glyph { display: inline-block; vertical-align: -0.14em; width: 1em; height: 1em; }
.glyph-slot { display: inline-flex; align-items: center; }
.mini-award { display: inline-flex; align-items: center; gap: 3px; }
.mini-award .glyph { width: .9em; height: .9em; }
/* Beat badge glyph chip. */
.beat-badge .glyph { width: 13px; height: 13px; }
/* Choice hint glyph sizing inside the hint square. */
.choice-hint .glyph { width: 16px; height: 16px; }
/* Trophy/case glyphs. */
.trophy .glyph { width: .95em; height: .95em; vertical-align: -0.12em; }
.hof-badge .glyph { width: 1em; height: 1em; }
.ci-icon .glyph { width: 26px; height: 26px; color: var(--gold); }
/* Individual named-championship entries in the retire display case. */
.champ-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.champ-entry {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: rgba(240,196,96,.06); border: 1px solid rgba(240,196,96,.2); border-radius: 8px;
}
.champ-entry .ce-glyph { color: var(--gold); display: inline-flex; }
.champ-entry .ce-year { font-family: var(--mono); color: var(--sand); font-weight: 700; font-size: 13px; }
.champ-entry .ce-title { font-family: var(--cond); color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; font-size: 13px; }
.champ-entry .ce-team { font-size: 12px; color: var(--muted); margin-left: auto; }

/* emblem slot base */
.emblem { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.emblem-img { object-fit: contain; border-radius: 8px; display: block; }
.emblem-badge {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: #fff; font-family: var(--cond); font-weight: 700; letter-spacing: .3px;
}

/* ================================================================
   PLAY MODE — mobile-first restructure (v1.2)
   Layout: sticky compact header · scrollable timeline · bottom choice sheet.
   ================================================================ */
/* 플레이 중 몸통 스크롤 잠금 — 헤더(OVR)가 항상 보이게. 스크롤은 타임라인
   내부에서만 일어난다 (KOAL: 스크롤 내리면 오버롤이 안 보임). */
body.play-lock { overflow: hidden; height: 100dvh; }

.main.play-mode {
  display: flex; flex-direction: column;
  height: 100dvh; max-height: 100dvh;
  /* Same column width as every other screen (Memcho: 랜딩→플레이 폭 점프 금지) and
     min-width:0 so a wide two-way table can NEVER stretch main past the viewport
     inside the play-lock flex column (min-width:auto did exactly that). */
  padding: 0 var(--safe-r) 0 var(--safe-l); max-width: 680px; width: 100%; min-width: 0;
}
.play-header {
  position: sticky; top: 0; z-index: 8;
  background: linear-gradient(180deg, var(--bg) 60%, rgba(12,26,18,.92));
  padding: 10px 14px 6px; border-bottom: 1px solid var(--line);
  flex: none;
}
/* Compact one-line header card (tap to expand full player card). */
.compact-card {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(160deg, #163a24, #0f2618);
  border: 1px solid var(--line2); border-radius: 12px; padding: 8px 12px;
  cursor: pointer; color: var(--text); text-align: left;
}
.compact-card:active { transform: translateY(1px); }
.cc-emblem { flex: none; display: flex; align-items: center; }
.cc-id { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.cc-name { font-family: var(--cond); font-weight: 700; font-size: 16px; color: var(--chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-team { font-size: 11px; color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta { flex: none; display: flex; align-items: center; gap: 8px; }
.cc-salary { font-family: var(--cond); font-size: 12px; color: var(--gold); font-weight: 600; }
.cc-age { font-family: var(--cond); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.cc-ovr {
  font-family: var(--mono); font-weight: 700; font-size: 18px; color: #241800;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  border-radius: 8px; padding: 2px 9px; font-variant-numeric: tabular-nums;
}
.cc-caret { font-size: 10px; color: var(--muted); }
/* When expanded, the full card sits directly under the compact bar. */
.play-header .player-card { margin: 8px 0 0; }

/* Scrollable timeline region (independent scroll; auto-scrolls to newest). */
.timeline-scroll {
  flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch;
  /* bottom padding >= the fade height so the NEWEST row (at scroll-bottom) sits
     above the fade zone and is never dimmed; only mid-rows crossing the seam fade. */
  padding: 0 14px 26px; scroll-behavior: smooth;
  /* Fade only the last strip so a TALL, scrolled timeline dissolves cleanly into the
     choice sheet instead of hard-clipping a season row mid-height at the seam. A short
     timeline sits above the fade zone, so its content is never touched. Top stays
     opaque (the sticky column header is unaffected). */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}
.timeline-scroll .timeline { margin-bottom: 0; }
/* Keep the scoreboard header visible while scrolling seasons. */
.timeline-scroll .timeline thead th { position: sticky; top: 0; z-index: 3; }

/* Bottom choice sheet — sticky, thumb-reachable; shown only when choosing. */
.choice-sheet {
  padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
  flex: none; position: sticky; bottom: 0; z-index: 9;
  background: linear-gradient(180deg, rgba(12,26,18,.4), var(--bg) 22%);
  border-top: 1px solid var(--line2); padding: 12px 14px calc(12px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
  max-height: 62dvh; overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(0,0,0,.35);
}
/* Collapsed during simulation — a slim status strip, not a big empty panel. */
.choice-sheet.collapsed {
  max-height: none; box-shadow: none;
  background: transparent; border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}
.choice-sheet.collapsed .simulating { flex-direction: row; gap: 10px; padding: 4px; font-size: 13px; }
.choice-sheet.collapsed .spinner { width: 18px; height: 18px; border-width: 2px; }

/* ================================================================
   DECISION / EVENT CARD
   ================================================================ */
.decision-area { min-height: 130px; }
.event-card { animation: dealIn .32s cubic-bezier(.2,.7,.2,1); }
@keyframes dealIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.event-tag { font-family: var(--cond); text-transform: uppercase; letter-spacing: 2px; font-size: 11px; color: var(--gold); }
.event-title { font-family: var(--cond); font-size: 22px; font-weight: 700; margin: 4px 0 6px; color: var(--chalk); text-transform: uppercase; letter-spacing: .3px; }
.event-desc { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice-btn {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--line2); border-radius: 12px; padding: 14px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, transform .05s, background .15s;
}
.choice-btn:hover { border-color: var(--gold); background: rgba(240,196,96,.06); }
.choice-btn:active { transform: translateY(1px); }
.choice-hint {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; background: var(--panel); border: 1px solid var(--line2);
}
.choice-hint.growth { color: var(--accent); border-color: rgba(111,208,140,.4); }
.choice-hint.playtime { color: var(--info); border-color: rgba(107,183,230,.4); }
.choice-hint.risk { color: var(--danger); border-color: rgba(224,115,111,.4); }
.choice-label { flex: 1; }
.choice-league {
  font-family: var(--cond); font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--info); background: rgba(107,183,230,.12);
  border: 1px solid rgba(107,183,230,.35); border-radius: 7px; padding: 3px 9px; white-space: nowrap; font-weight: 600;
}

/* draft-day: real-team selection buttons (emblem + name + league + tier) */
.draft-team-btn { align-items: center; gap: 14px; padding: 12px 14px; }
.draft-team-btn .draft-emblem { flex: none; display: flex; }
.draft-team-btn .draft-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.draft-teamname { font-family: var(--cond); font-weight: 700; font-size: 17px; color: var(--chalk); letter-spacing: .3px; }
.draft-meta { display: flex; gap: 8px; align-items: center; }
.draft-league {
  font-family: var(--cond); font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--info); background: rgba(107,183,230,.12);
  border: 1px solid rgba(107,183,230,.35); border-radius: 7px; padding: 2px 8px; font-weight: 600;
}
.draft-tier {
  font-family: var(--cond); font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  border-radius: 7px; padding: 2px 8px; font-weight: 600;
}
.tier-contender .draft-tier { color: var(--gold); background: rgba(240,196,96,.12); border: 1px solid rgba(240,196,96,.4); }
.tier-rebuild .draft-tier { color: var(--accent); background: rgba(111,208,140,.12); border: 1px solid rgba(111,208,140,.4); }
.tier-overseas .draft-tier { color: var(--danger); background: rgba(224,115,111,.12); border: 1px solid rgba(224,115,111,.4); }
.draft-flavor { font-size: 12px; color: var(--muted); }
.pc-team.free-agent { color: var(--sand); font-style: italic; opacity: .85; }

/* Light choice — visually distinct: small card, beat/ticker tone (task 1). */
.light-card { animation: dealIn .22s ease; }
.light-card .event-tag { color: var(--sand); letter-spacing: 1.4px; }
.light-card .event-title { font-size: 17px; color: var(--sand); }
.light-card .event-desc { font-size: 13px; margin-bottom: 12px; }
.light-card .choices { gap: 8px; }
.light-card .choice-btn {
  padding: 10px 12px; font-size: 13px; background: rgba(217,201,163,.05);
  border-color: var(--line);
}
.light-card .choice-hint { width: 26px; height: 26px; font-size: 14px; }

/* FA / posting offer buttons (real club + $ terms + years). */
.offer-btn { align-items: center; gap: 14px; padding: 12px 14px; }
.offer-btn .draft-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.offer-terms { font-family: var(--mono); font-size: 13px; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.tier-winnow .draft-tier { color: var(--gold); background: rgba(240,196,96,.12); border: 1px solid rgba(240,196,96,.4); }
.tier-cornerstone .draft-tier { color: var(--accent); background: rgba(111,208,140,.12); border: 1px solid rgba(111,208,140,.4); }
.tier-posting .draft-tier, .tier-upgrade .draft-tier { color: var(--info); background: rgba(107,183,230,.12); border: 1px solid rgba(107,183,230,.4); }
.tier-tryout .draft-tier, .tier-shortdeal .draft-tier { color: var(--danger); background: rgba(224,115,111,.12); border: 1px solid rgba(224,115,111,.4); }
.tier-journeyman .draft-tier { color: var(--sand); background: rgba(217,201,163,.1); border: 1px solid rgba(217,201,163,.35); }
.offer-stay { justify-content: flex-start; }
.offer-nogar { color: var(--danger); font-family: var(--cond); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; margin-left: 6px; }
.offer-empty-note { font-size: 13px; color: var(--sand); font-style: italic; margin-bottom: 10px; text-align: center; }
/* Inline career-card image (share-to-photos fallback: long-press to save). */
.card-save-img { display: block; width: 100%; max-width: 340px; margin: 8px auto 0; border-radius: 14px; border: 1px solid var(--line2); box-shadow: 0 8px 24px rgba(0,0,0,.4); }

/* Player-card salary chip + retire earnings banner (economy, task 2). */
.pc-salary { color: var(--gold); }
.pc-salary b { color: var(--gold); }
.earnings-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 2px auto 16px; padding: 10px 18px; width: fit-content;
  background: rgba(240,196,96,.1); border: 1px solid var(--gold2); border-radius: 999px;
}
.eb-label { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; color: var(--sand); }
.eb-value { font-family: var(--mono); font-weight: 700; font-size: 20px; color: var(--gold); font-variant-numeric: tabular-nums; }
.totals tr.total-earnings td { color: var(--gold); font-weight: 700; }

/* feedback narration line after a choice */
.feedback-line {
  animation: dealIn .3s ease; text-align: center; padding: 22px 12px; color: var(--sand);
  font-size: 15px; font-style: italic;
}
/* Outcome tone (task 7): success/failure result of a probabilistic choice. */
.feedback-line.tone-good { color: var(--accent); font-style: normal; font-weight: 600; }
.feedback-line.tone-bad { color: var(--danger); font-style: normal; font-weight: 600; }
.feedback-line.tone-good::before { content: "▲ "; }
.feedback-line.tone-bad::before { content: "▼ "; }

/* simulating */
.simulating { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px; color: var(--muted); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line2); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   TIMELINE — scoreboard
   ================================================================ */
.timeline h3 { margin: 0 0 12px; font-size: 16px; text-transform: uppercase; color: var(--chalk); letter-spacing: 1px; }
/* No overflow on .board: it would become the sticky header's containing block and
   scroll the whole header out of view (Memcho root-cause). Horizontal scroll for wide
   two-way (12-col) tables lives on .timeline-scroll (also the vertical scroller), so
   the sticky header stays pinned while wide tables pan sideways. */
.timeline .board { border: 1px solid var(--line2); border-radius: 12px; }
/* Outside the play screen (retire/records) there is no .timeline-scroll ancestor, so
   the wide two-way table needs ITS OWN horizontal scroller here — otherwise it bleeds
   past the viewport and the whole page pans (430px regression). Play-mode keeps the
   board overflow-free so the sticky header still anchors to .timeline-scroll. */
.main:not(.play-mode) .timeline .board { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Stacked two-way rows keep every table at <=7 columns, so tables simply FIT the
   panel — no max-content/nowrap overflow (that combo made even normal 7-col tables
   pan sideways on 390px: KOAL의 'width 줄어드는 버그'). */
.timeline table { width: 100%; }
.timeline thead th { background: var(--panel); }
.timeline table { width: 100%; border-collapse: collapse; font-size: 13px; }
.timeline th, .timeline td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.timeline thead th {
  font-family: var(--cond); color: var(--sand); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .6px; background: #0c2013;
}
.timeline td { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.timeline td:first-child, .timeline th:first-child { text-align: left; padding-left: 12px; }
.timeline thead th:first-child { text-align: left; }
.timeline td:first-child { color: var(--sand); font-weight: 600; }
/* Team names wrap to a second line rather than truncate — on a 390px phone the
   TEAM column is ~95px, too narrow for "Cleveland Guardians"/"Baltimore Orioles".
   keep-all wraps at spaces so club names stay whole. */
.timeline .team-cell { text-align: left; font-family: var(--body); color: var(--muted); max-width: 130px; white-space: normal; word-break: keep-all; overflow-wrap: normal; line-height: 1.2; }
.timeline tr.off td { color: var(--muted); font-style: italic; }
.timeline tr.champ { background: rgba(240,196,96,.07); }
.timeline tr.champ td:first-child { color: var(--gold); }
.timeline tr.awarded { background: rgba(240,196,96,.05); }
.timeline tbody tr:last-child td { border-bottom: none; }
.timeline tbody tr:hover td { background: rgba(255,255,255,.03); }
.timeline tr.fill-in { animation: rowIn .35s ease; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.timeline tr.ghost td { color: var(--muted); }
.timeline tr.ghost .team-cell::before { content: "▸ "; color: var(--gold); }
.season-award { display: block; font-family: var(--cond); font-size: 10px; color: var(--gold); margin-top: 2px; letter-spacing: .3px; }
/* Narrow viewports: keep G, drop the RBI column to fit (coordinator directive). */
@media (max-width: 480px) {
  .timeline .col-rbi { display: none; }
  .timeline th, .timeline td { padding: 8px 4px; font-size: 12px; }
  .timeline .team-cell { max-width: 84px; }
}

/* Future-age skeleton rows (copero-style): greyed placeholders for seasons still ahead
   so the career arc is always visible and the timeline never looks empty. */
.timeline tr.tl-future td { color: rgba(143,168,146,.4); border-bottom: 1px solid var(--line); }
.timeline tr.tl-future td:first-child { color: rgba(143,168,146,.5); font-weight: 600; }
.timeline tr.tl-future:hover td { background: transparent; }

/* calendar beats — flat ticker sub-row (no boxed pills) for a cleaner scoreboard */
.timeline tr.beats-row td { padding: 3px 12px 7px; border-bottom: 1px solid var(--line); }
.timeline tr.beats-row:hover td { background: transparent; }
.beats { display: flex; flex-direction: column; gap: 3px; }
.beat {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--body); font-size: 11.5px; color: var(--muted);
  padding-left: 2px;
}
.beat-badge { font-size: 12px; opacity: .85; }
.beat.kind-postseason, .beat.kind-milestone { color: var(--gold); }
.beat.kind-moment { color: var(--info); }
.pace-mult { font-size: 0.7em; font-weight: 700; color: var(--gold); border: 1px solid var(--gold); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.beat.kind-auto { color: var(--muted, #8a8f98); font-style: italic; }
.beat.kind-awards { color: var(--gold); }
.totals tr.total-war td { color: var(--gold); font-weight: 700; }

/* non-blocking seed-URL reveal (share/copy fallback) */
.seed-reveal { margin-top: 12px; padding: 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel2); }
.seed-reveal-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.seed-reveal-row { display: flex; gap: 8px; align-items: center; }
.seed-reveal-input {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px;
  color: var(--text); background: var(--panel); border: 1px solid var(--line2);
  border-radius: 8px; padding: 9px 10px;
}

/* toast */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; font-size: 14px;
  background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #241800;
  border-radius: 999px; padding: 10px 20px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: toastIn .3s ease, toastOut .3s ease 1.9s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* ================================================================
   RETIRE
   ================================================================ */
.retire { text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #163a24, #0d2216); }
.retire-label { font-family: var(--cond); font-size: 12px; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }
.retire-title {
  font-family: var(--cond); font-size: clamp(30px, 9vw, 46px); font-weight: 700; text-transform: uppercase;
  color: var(--gold); margin: 8px 0; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.35);
  animation: dealIn .5s ease;
}
.retire-desc { font-size: 15px; color: var(--sand); margin-bottom: 16px; }
.hof-badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 16px;
  background: rgba(240,196,96,.15); border: 1px solid var(--gold);
  color: var(--gold); font-family: var(--cond); font-weight: 600; letter-spacing: 1px;
  padding: 8px 16px; border-radius: 999px; font-size: 15px; text-transform: uppercase;
}

/* trophy display case */
.display-case { margin: 8px 0 18px; }
.display-case h3 { font-size: 13px; letter-spacing: 1px; color: var(--sand); text-transform: uppercase; margin: 0 0 10px; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.case-item {
  background: linear-gradient(180deg, #123020, #0c2015);
  border: 1px solid var(--gold2); border-radius: 12px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,.3) inset;
}
.case-item .ci-icon { font-size: 26px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.case-item .ci-count { font-family: var(--mono); font-weight: 700; font-size: 20px; color: var(--gold); font-variant-numeric: tabular-nums; }
.case-item .ci-label { font-family: var(--cond); text-transform: uppercase; letter-spacing: .4px; font-size: 10px; color: var(--muted); text-align: center; }
.case-empty { color: var(--muted); font-style: italic; font-size: 14px; }

/* career totals table */
.totals { margin: 8px 0 18px; text-align: left; }
.totals h3 { font-size: 13px; letter-spacing: 1px; color: var(--sand); text-transform: uppercase; margin: 0 0 8px; }
.totals table { width: 100%; border-collapse: collapse; }
.totals td { padding: 7px 6px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }
.totals td:first-child { text-align: left; font-family: var(--body); color: var(--muted); }
.totals tr:last-child td { border-bottom: none; }
.totals .section td { color: var(--gold); font-family: var(--cond); text-transform: uppercase; letter-spacing: .6px; }

/* share-card preview */
.sharecard-preview { margin: 10px 0 18px; }
.sharecard-preview h3 { font-size: 13px; letter-spacing: 1px; color: var(--sand); text-transform: uppercase; margin: 0 0 10px; }
.sharecard-preview canvas, .sharecard-preview img {
  width: 100%; max-width: 340px; height: auto; border-radius: 14px;
  border: 1px solid var(--line2); box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.retire-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.retire-actions .btn-primary { width: 100%; margin-top: 0; }

/* share fork (seed-arrival) */
.share-fork { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; }

/* ---------- Footer ---------- */
.footer { max-width: 680px; margin: 0 auto; padding: 22px 18px 44px; }
.footer p { font-size: 11px; color: #5c7062; line-height: 1.6; margin: 0; }

@media (min-width: 560px) {
  .retire-actions .btn-primary { width: auto; flex: 1; }
  .share-fork { flex-direction: row; }
}

/* Desktop (>720px): same structure, but the choice sheet floats as a bounded panel
   rather than a full-width bottom bar, and the timeline scroll gets breathing room. */
@media (min-width: 721px) {
  /* 플레이 중 몸통 스크롤 잠금 — 헤더(OVR)가 항상 보이게. 스크롤은 타임라인
   내부에서만 일어난다 (KOAL: 스크롤 내리면 오버롤이 안 보임). */
body.play-lock { overflow: hidden; height: 100dvh; }

.main.play-mode { height: auto; max-height: none; padding: 14px 14px 48px; }
  .play-header { position: static; padding: 0 0 10px; border-bottom: none; background: transparent; }
  .timeline-scroll { flex: none; overflow: visible; padding: 0; }
  .timeline-scroll .timeline thead th { position: static; }
  .choice-sheet {
    position: sticky; bottom: 14px; max-height: none;
    border: 1px solid var(--line2); border-radius: 16px; margin-top: 14px;
    background: var(--panel); box-shadow: 0 8px 28px rgba(0,0,0,.35);
  }
  .choice-sheet.collapsed { border: 1px solid var(--line); background: var(--panel); }
}

/* Play-mode page lock (mobile): the body becomes a fixed-height flex column so the
   ONLY thing that scrolls is the career timeline — the topbar + choice sheet stay put
   and the whole page never scrolls (task: 커리어 스크롤만, 전체 스크롤 X). Desktop keeps
   its normal page scroll (the min-width:721px rules above float the choice sheet). */
@media (max-width: 720px) {
  body.play-lock { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.play-lock .topbar { flex: none; }
  body.play-lock main/* 플레이 중 몸통 스크롤 잠금 — 헤더(OVR)가 항상 보이게. 스크롤은 타임라인
   내부에서만 일어난다 (KOAL: 스크롤 내리면 오버롤이 안 보임). */
body.play-lock { overflow: hidden; height: 100dvh; }

.main.play-mode { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; }
  body.play-lock .footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, .event-card, .timeline tr.fill-in, .toast, .retire-title, .feedback-line { animation: none !important; }
}

/* ============================================================
   ACCOUNTS LAYER — account control, login modal, save, records
   ============================================================ */
.account { display: inline-flex; gap: 6px; align-items: center; }
.acct-btn {
  font: 600 12px/1 var(--cond);
  letter-spacing: .04em;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 34px;
  cursor: pointer;
  text-transform: uppercase;
}
.acct-btn:hover { border-color: var(--gold2, var(--gold)); }
.acct-btn:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.acct-logout { color: var(--muted); }

/* ---- modal ---- */
.modal-root:empty { display: none; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 10, 6, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px calc(20px + var(--safe-r)) 20px calc(20px + var(--safe-l));
}
.modal-panel {
  width: 100%; max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}
.modal-title { font: 700 20px/1.1 var(--cond); margin: 0 0 14px; color: var(--chalk); }
.modal-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
/* display:flex above beats the UA [hidden] rule, so tab switching (which hides the
   confirm field / tab header via el.hidden = true) had no visual effect. Restore it. */
.modal-field[hidden], .auth-tabs[hidden] { display: none; }
.modal-field span { font: 600 12px/1 var(--cond); text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.modal-field input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 11px 12px; font: 15px/1.2 var(--body);
}
.modal-field input:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.modal-status { min-height: 18px; font: 13px/1.3 var(--body); color: var(--accent); margin-bottom: 12px; }
.modal-status.error { color: var(--danger); }
.modal-status.success { color: var(--accent); }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn-primary, .modal-actions .btn-secondary { flex: 1; margin-top: 0; }

/* ---- auth modal: tabs + inline validation + links ---- */
.auth-panel[aria-hidden] { display: none; }
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.auth-tab {
  flex: 1; appearance: none; border: none; background: transparent; cursor: pointer;
  font: 600 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 9px 10px; border-radius: 999px;
  transition: background .12s ease, color .12s ease;
}
.auth-tab[aria-pressed="true"] { background: var(--gold); color: #241800; }
.auth-tab:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.auth-tab:disabled { opacity: .6; cursor: default; }
.modal-field span.field-error { font: 12px/1.2 var(--body); color: var(--danger); text-transform: none; letter-spacing: 0; }
.auth-links { display: flex; justify-content: space-between; margin-top: 10px; }
.auth-link {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font: 600 12px/1.2 var(--body); color: var(--info); text-decoration: underline;
  text-underline-offset: 2px; padding: 4px 0;
}
.auth-link:hover { color: var(--gold); }
.auth-link:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.auth-panel.is-busy { opacity: .92; }
.auth-panel.is-busy .btn-primary { cursor: progress; }
.modal-field input:disabled { opacity: .6; }

/* ---- retire-screen leaderboard submission ---- */
.save-section {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.save-btn { width: 100%; margin-top: 0; }
.save-status { font: 700 14px/1.3 var(--body); color: var(--gold); text-align: center; }
.save-hint { font: 13px/1.4 var(--body); color: var(--muted); text-align: center; }
.save-hint:empty { display: none; }
.save-achv-head, .records-subhead {
  font: 700 14px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em;
  color: var(--gold); margin: 14px 0 8px;
}

/* ---- achievements grid ---- */
.achv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 10px; }
.achv-badge {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
  background: var(--bg);
}
.achv-badge.unlocked { border-color: var(--gold); background: linear-gradient(180deg, rgba(240,196,96,.10), transparent); }
.achv-badge.locked { opacity: .5; }
.career-achv { margin-top: 14px; }
.records-tabs { display: flex; gap: 8px; margin: 10px 0 14px; }
.records-tab {
  padding: 7px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); font: 700 13px/1 var(--cond); cursor: pointer;
}
.records-tab.active { border-color: var(--gold); color: var(--gold); background: linear-gradient(180deg, rgba(240,196,96,.08), transparent); }
.achv-drawer { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.achv-drawer[open] { padding-bottom: 10px; }
.achv-drawer > .achv-grid { padding: 0 10px; }
.achv-group-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px; cursor: pointer; list-style: none;
  font: 700 12px/1 var(--cond); color: var(--gold); letter-spacing: .8px; text-transform: uppercase;
}
.achv-group-head::-webkit-details-marker { display: none; }
.achv-group-head::after {
  content: ""; width: 7px; height: 7px; margin-left: 4px; color: var(--muted);
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s;
}
.achv-drawer[open] > .achv-group-head::after { transform: rotate(-135deg); }
.achv-group-count { margin-left: auto; color: var(--muted); letter-spacing: .4px; }
.achv-group-count.is-complete { color: var(--gold); }
.achv-autosaved { margin-top: 6px; font-size: 12px; color: var(--muted); }
.achv-badge { position: relative; }
.achv-badge .achv-new {
  position: absolute; top: -7px; right: -5px;
  background: var(--gold); color: #1a1a12; font-size: 10px; font-weight: 800;
  padding: 1px 6px; border-radius: 8px; letter-spacing: .5px;
}
.achv-badge.is-new { box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(240,196,96,.25); }
.achv-name { font: 700 12px/1.1 var(--cond); color: var(--chalk); margin-bottom: 1px; }
.achv-badge.locked .achv-name { color: var(--muted); }
.achv-desc {
  font: 11px/1.25 var(--body); color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.achv-badge { cursor: pointer; }
.achv-badge:hover { border-color: var(--gold); }
.achv-panel { max-width: 340px; text-align: center; }
.achv-modal-state {
  display: inline-block; font: 800 10px/1 var(--cond); letter-spacing: 1px;
  padding: 3px 10px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted);
  margin-bottom: 10px;
}
.achv-modal-state.unlocked { border-color: var(--gold); color: var(--gold); }
.achv-cond-label {
  margin-top: 12px; font: 800 10px/1 var(--cond); letter-spacing: 1px;
  color: var(--gold); text-transform: uppercase;
}
.achv-modal-cond { font: 700 14px/1.6 var(--body); color: var(--chalk); margin: 6px 0 4px; }
.achv-modal-flavor { font: italic 12px/1.5 var(--body); color: var(--muted); margin: 0 0 16px; }

/* ---- records screen ---- */
.records-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.records-head .btn-secondary { margin-top: 0; flex: 0 0 auto; }
.records-title { font: 800 26px/1 var(--cond); color: var(--chalk); margin: 0; }
.records-loading, .records-empty { color: var(--muted); font: 14px/1.4 var(--body); padding: 12px 0; }
.records-loading { display: flex; align-items: center; gap: 10px; }
.records-loading::before {
  content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line2); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
.records-list { display: flex; flex-direction: column; gap: 8px; }
.record-row {
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  text-decoration: none; color: inherit; background: var(--bg);
  transition: border-color .12s ease;
}
.record-row:hover { border-color: var(--gold); }
.record-name { font: 700 16px/1.1 var(--cond); color: var(--chalk); }
.record-meta { font: 13px/1.3 var(--body); color: var(--muted); }
.record-meta .glyph { vertical-align: -2px; }
.record-replay {
  align-self: flex-start; margin-top: 4px;
  font: 700 11px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent);
}

/* ---- leaderboard ---- */
.leaderboard-metrics { display: flex; gap: 7px; margin: 18px 0 10px; }
.leaderboard-metrics .records-tab { flex: 1; }
.leaderboard-modes { display: flex; gap: 7px; margin: 0 0 10px; }
.leaderboard-modes .records-tab { flex: 1; }
.leaderboard-periods { display: flex; gap: 7px; margin: 0 0 10px; }
.leaderboard-periods .records-tab { flex: 1; }
.leaderboard-archive { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line, rgba(127,127,127,.25)); }
.leaderboard-archive-modes { display: flex; }
.leaderboard-archive-modes .records-tab { flex: 1; }
.leaderboard-positions {
  display: flex; gap: 6px; margin: 0 0 10px; padding-bottom: 4px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.leaderboard-positions::-webkit-scrollbar { display: none; }
.leaderboard-positions .records-tab { flex: 0 0 auto; min-width: 44px; padding-left: 10px; padding-right: 10px; }
.leaderboard-handle { color: var(--muted); font: 11px/1.2 var(--body); letter-spacing: 0.02em; }
.leaderboard-generated { color: var(--muted); font: 11px/1.3 var(--body); text-align: right; margin: 8px 0; }
.leaderboard-unavailable { color: var(--danger); padding: 18px 0; text-align: center; }
.leaderboard-stale { color: var(--muted); font: 13px/1.4 var(--body); padding: 6px 0; }
.leaderboard-my {
  width: 100%; border: 1px solid var(--gold2); border-radius: 10px; padding: 10px 12px;
  background: rgba(240,196,96,.1); color: var(--gold); font: 700 14px/1.2 var(--cond);
  text-align: left;
}
.leaderboard-list { display: flex; flex-direction: column; gap: 6px; }
.leaderboard-row {
  appearance: none; width: 100%; display: grid; grid-template-columns: 34px 42px minmax(0,1fr) 62px;
  align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--text); cursor: pointer; text-align: left;
}
.leaderboard-row:hover, .leaderboard-row:focus-visible { border-color: var(--gold); outline: none; }
.leaderboard-row.is-mine { border-color: var(--gold2); background: rgba(240,196,96,.1); }
.leaderboard-identity > span.leaderboard-you { color: var(--gold); font: 700 10px/1 var(--cond); letter-spacing: .06em; }
.leaderboard-gap { color: var(--muted); text-align: center; font: 700 14px/1 var(--cond); letter-spacing: .3em; padding: 2px 0; }
.leaderboard-rank { font: 800 18px/1 var(--cond); color: var(--gold); text-align: center; }
.leaderboard-emblem { display: flex; align-items: center; justify-content: center; min-height: 36px; }
.leaderboard-identity { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.leaderboard-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px/1.1 var(--cond); color: var(--chalk); }
.leaderboard-identity > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.leaderboard-war { display: flex; flex-direction: column; align-items: flex-end; }
.leaderboard-war small { color: var(--muted); font: 10px/1 var(--cond); }
.leaderboard-war strong { color: var(--chalk); font: 800 19px/1.15 var(--cond); }
.leaderboard-detail-name { font: 800 25px/1.1 var(--cond); color: var(--chalk); margin-bottom: 5px; }
.leaderboard-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 16px 0; }
.leaderboard-summary > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.leaderboard-summary span { color: var(--muted); font: 10px/1 var(--cond); }
.leaderboard-summary strong { color: var(--chalk); font: 800 17px/1.1 var(--cond); }

@media (max-width: 430px) {
  .topbar { padding: 6px 10px; padding-top: calc(6px + var(--safe-top, env(safe-area-inset-top, 0px))); gap: 6px; }
  .brand { font-size: 15px; gap: 6px; letter-spacing: .3px; min-height: 44px; }
  .seg { padding: 2px; }
  .seg button { padding: 4px 8px; font-size: 11px; min-height: 40px; }
  .controls { gap: 5px; }
  .account { gap: 4px; }
  .account .acct-btn { padding: 5px 9px; font-size: 11px; white-space: nowrap; min-height: 40px; }
}

/* ============================================================
   v1.3 — contract status line, trade destination, jump-to-new
   ============================================================ */

/* Contract status line on the player card (task 1: 잔여 연수·AAV·계약 종류). */
.pc-contract {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 6px 10px;
  border: 1px solid var(--line2); border-radius: 9px;
  background: rgba(240,196,96,.05);
  font: 600 12.5px/1.2 var(--cond); letter-spacing: .3px; color: var(--sand);
}
.pc-contract-icon { flex: none; display: inline-flex; color: var(--gold); }
.pc-contract .glyph { vertical-align: -2px; }

/* Trade destination panel — shown FIRST, before the accept/reject choices (task 2). */
.trade-dest {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 10px; padding: 12px 14px;
  border: 1px solid var(--line2); border-radius: 12px;
  background: linear-gradient(180deg, rgba(240,196,96,.06), rgba(16,36,26,.2));
}
.trade-emblem { flex: none; display: flex; }
.trade-body { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.trade-head {
  font: 700 18px/1.1 var(--cond); letter-spacing: .3px; color: var(--chalk);
}
.trade-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.trade-league {
  font: 600 11px/1 var(--cond); text-transform: uppercase; letter-spacing: .5px;
  color: var(--info); background: rgba(107,183,230,.12);
  border: 1px solid rgba(107,183,230,.35); border-radius: 7px; padding: 3px 8px;
}
.trade-tier {
  font: 600 11px/1 var(--cond); text-transform: uppercase; letter-spacing: .5px;
  border-radius: 7px; padding: 3px 8px;
}
.trade-tier.tier-contender { color: var(--gold); background: rgba(240,196,96,.12); border: 1px solid rgba(240,196,96,.4); }
.trade-tier.tier-rebuild  { color: var(--accent); background: rgba(111,208,140,.12); border: 1px solid rgba(111,208,140,.4); }
.trade-reason {
  font: 13px/1.4 var(--body); color: var(--muted);
  margin: -4px 0 10px; padding-left: 2px;
}
.choice-btn.trade-accept { border-color: rgba(240,196,96,.5); background: rgba(240,196,96,.06); }
.choice-btn.trade-accept:hover { border-color: var(--gold); }

/* "New decision below" jump button (task 3) — floats above the choice sheet when the
   user has scrolled up and a fresh decision arrives; tapping jumps to the newest row. */
.jump-to-new {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(6px);
  /* bottom is set inline (in showJumpButton) to sit just above the choice sheet. */
  bottom: calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 96px); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .6px;
  color: #241800; background: linear-gradient(180deg, var(--gold), var(--gold2));
  border: 1px solid var(--gold); border-radius: 999px; padding: 10px 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4); cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease;
}
.jump-to-new.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.jump-to-new .jump-caret { display: inline-flex; color: #241800; }
.jump-to-new .jump-caret .glyph { vertical-align: -2px; }

/* ============================================================
   fix/nav-share — brand home button, challenge card, leave-confirm
   ============================================================ */
/* The brand is now a real <button> that navigates home: reset button chrome,
   keep the existing wordmark look, and signal clickability. */
button.brand {
  appearance: none; background: transparent; border: none; padding: 0;
  cursor: pointer; transition: color .15s ease;
}
button.brand:hover { color: var(--gold); }
button.brand:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; border-radius: 4px; }

/* Challenge card (shared-seed arrival on landing). */
.challenge-card {
  margin-top: 18px; padding: 16px 16px 18px; text-align: center;
  border: 1px solid rgba(240,196,96,.45); border-radius: 14px;
  background: rgba(240,196,96,.06);
}
.challenge-card .ch-head {
  font: 800 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold); margin-bottom: 8px;
}
.challenge-card .ch-desc { font: 700 17px/1.35 var(--cond); color: var(--chalk); }
.challenge-card .ch-note { font: 13px/1.5 var(--body); color: var(--muted); margin-top: 6px; }
.challenge-card .ch-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 14px; align-items: stretch;
}
.challenge-card .ch-actions .btn-primary,
.challenge-card .ch-actions .btn-secondary { margin-top: 0; }

/* Leave-confirm dialog (logo → landing while a career is live). */
.confirm-panel { max-width: 380px; }
.confirm-panel .confirm-body { font: 14px/1.55 var(--body); color: var(--text); margin: 10px 0 4px; }

/* Records rows are now <button>s (in-app auto-replay): keep the card look. */
button.record-row {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  font: inherit;
}

/* Ad slots (AdSense). Rendered only on landing + retire when configured; the module
   returns null otherwise so no empty chrome ships. Reserve min-height to avoid CLS,
   center within the game's single column, keep it visually subordinate to the game. */
.ad-slot {
  max-width: 468px; margin: 18px auto 4px; width: 100%;
  text-align: center; min-height: 100px;
}
.ad-slot .ad-label {
  font: 700 10px/1 var(--cond); text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); opacity: .6; margin-bottom: 6px;
}
.ad-slot .adsbygoogle { display: block; min-height: 90px; }

/* Timeline cold-start placeholder (no seasons yet). */
.timeline .tl-empty td { text-align: center; color: var(--muted); font-style: italic; font-family: var(--body); padding: 20px 12px; }

/* 5-stat radar (player card). */
.stat-radar { display: flex; flex-direction: column; align-items: center; margin: 6px 0 2px; }
.radar-svg { width: 190px; height: 190px; }
.radar-grid { fill: none; stroke: var(--line2); stroke-width: 1; }
.radar-poly { stroke-width: 1.5; }
.radar-poly.pit { fill: rgba(107,183,230,.22); stroke: var(--info); }
.radar-poly.bat { fill: rgba(240,196,96,.22); stroke: var(--gold); }
.radar-poly.bat.overlay { fill: rgba(240,196,96,.16); }
.radar-label { fill: var(--muted); font: 600 9.5px var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.radar-legend { display: flex; gap: 12px; margin-top: 2px; }
.radar-legend .rl { font: 700 10px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; }
.radar-legend .rl.pit { color: var(--info); }
.radar-legend .rl.bat { color: var(--gold); }

/* Player detail as a modal popup (over the career timeline, not a drawer). */
.player-modal { max-width: 460px; width: calc(100% - 32px); padding: 0; position: relative; background: transparent; border: none; box-shadow: none; }
.player-modal .player-card { margin: 0; }
.modal-close {
  position: absolute; top: -6px; right: -6px; z-index: 2;
  width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line2);
  font: 700 15px/1 var(--body);
}
.modal-close:hover { border-color: var(--gold2); }

/* Records: main click area + delete button side by side. */
.records-list .record-row { flex-direction: row; align-items: stretch; padding: 0; gap: 0; border: none; }
.record-main {
  appearance: none; flex: 1; text-align: left; cursor: pointer; color: inherit;
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--line); border-right: none; border-radius: 10px 0 0 10px;
  padding: 12px 14px; background: var(--bg); font: inherit;
}
.record-main:hover { border-color: var(--gold); }
.record-del {
  flex: none; width: 64px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 0 10px 10px 0; background: var(--bg);
  color: var(--muted); font: 700 12px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .04em;
}
.record-del:hover { border-color: var(--danger); color: var(--danger); }
.record-del.confirm { background: var(--danger); color: #200; border-color: var(--danger); }

/* Retire-screen totals timeline also scrolls sideways for two-way (Memcho A). */
.retire ~ .timeline .board, .totals ~ * { }

/* KR military status chip on the player card. */
.pc-military {
  font: 600 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .04em;
  border-radius: 8px; padding: 6px 10px; margin-top: 6px; display: inline-block;
}
.pc-military.mil-exempt { color: var(--gold); border: 1px solid rgba(240,196,96,.4); }
.pc-military.mil-sangmu, .pc-military.mil-served { color: var(--muted); border: 1px solid var(--line); }
.pc-military.mil-pending { color: var(--danger); border: 1px solid rgba(224,115,111,.4); }

/* Two-way stacked season rows: 타/투 tags + tight pitching sub-row. */
.tw-tag {
  display: inline-block; min-width: 16px; text-align: center;
  font: 700 10px/1.5 var(--cond); border-radius: 4px; padding: 0 3px; margin-right: 3px;
}
.tw-tag.bat { color: var(--gold); border: 1px solid rgba(240,196,96,.4); }
.tw-tag.pit { color: var(--info); border: 1px solid rgba(107,183,230,.4); }
.timeline tr.tw-pit td { border-bottom: 1px solid var(--line); }
.timeline td[rowspan] { vertical-align: top; }

/* Outcome formula chips on choice buttons (60% +4 / 40% -3). */
.outcome-formula { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; flex: none; font: 700 10.5px/1 var(--mono); }
.of-part { border-radius: 6px; padding: 3px 6px; border: 1px solid var(--line2); color: var(--muted); }
.of-part.up { color: var(--accent); border-color: rgba(111,208,140,.4); }
.of-part.down { color: var(--danger); border-color: rgba(224,115,111,.4); }
.of-sep { color: var(--line2); }

/* Roll reveal line (판정 60% → 성공 (+4)). */
.roll-line {
  font: 700 13px/1.3 var(--cond); text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); text-align: center; margin-bottom: 6px;
}
.roll-line.tone-good { color: var(--accent); }
.roll-line.tone-bad { color: var(--danger); }

/* Phase tag on light cards (시즌 전/중/후). */
.phase-tag {
  font: 700 10px/1 var(--cond); border-radius: 6px; padding: 2px 6px; margin-left: 6px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--info); border: 1px solid rgba(107,183,230,.35);
}

/* OVR tick pulse (+1 steps). */
.cc-ovr.ovr-tick { transform: scale(1.12); transition: transform .08s ease; }

/* Peak caption on the retired player card. */
.peak-caption { font: 600 11px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); text-align: center; margin-top: 8px; }

/* Radar track tabs (투구/타격) — segmented pill, matching the app's seg control. */
.radar-tabs {
  display: inline-flex; background: var(--panel2); border: 1px solid var(--line2);
  border-radius: 999px; padding: 2px; margin: 6px auto 2px; gap: 0;
}
.radar-tab {
  appearance: none; border: none; background: transparent; color: var(--muted);
  font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; min-height: 30px;
}
.radar-tab[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #241800; }
.radar-tab:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }

/* Scout grade chip (S/A/B/C — 재능 관측치). */
.scout-grade { font: 700 10px/1 var(--cond); border-radius: 5px; padding: 2px 6px; margin-left: 6px; letter-spacing: .05em; }
.scout-grade.grade-S { color: #f0c460; border: 1px solid rgba(240,196,96,.55); }
.scout-grade.grade-A { color: var(--accent); border: 1px solid rgba(111,208,140,.45); }
.scout-grade.grade-B { color: var(--info); border: 1px solid rgba(107,183,230,.4); }
.scout-grade.grade-C { color: var(--muted); border: 1px solid var(--line2); }

.footer-links { margin-top: 6px; font-size: 11px; opacity: .55; }
.footer-links a { color: inherit; }

/* ---- 모바일 UX 하드닝 (KOAL): 줌/더블탭 줌/바운스/롱프레스/드래그 배제 ---- */
html, body { overscroll-behavior-y: none; }
body {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* 더블탭 줌 제거 (스크롤/제스처는 유지) */
}
button, .choice-btn, .achv-badge, .topbar, .seg, .pills, .retire-actions,
.records-tab, .draft-body, .offer-btn, .modal-panel {
  -webkit-user-select: none; user-select: none;
}
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; } /* 입력은 예외 */

/* 국적 셀렉트박스 (KOAL) */
.nat-select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--chalk);
  font: 600 15px/1.2 var(--body);
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.nat-select:focus { outline: none; border-color: var(--gold); }

/* 국적 선택 (카드 + 변경 -> 리스트 모달) */
.nat-current {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--gold); border-radius: 12px; padding: 14px 16px;
  background: linear-gradient(180deg, rgba(240,196,96,.08), transparent);
  font: 700 17px/1.2 var(--body);
}
.nat-change { margin-top: 10px; width: 100%; }
.nat-panel { max-width: 360px; width: 92vw; }
/* 높이 고정: 검색 필터로 행 수가 바뀌어도 패널이 안 출렁인다 (KOAL) */
.nat-list { height: 55dvh; overflow-y: auto; margin: 10px 0; overscroll-behavior: contain; }
.nat-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--chalk); font: 600 14px/1.2 var(--body);
  margin-bottom: 6px; cursor: pointer; text-align: left;
}
.nat-row.selected { border-color: var(--gold); }
.nat-more { width: 100%; }

.nat-search {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--chalk);
  font: 500 14px/1.2 var(--body); margin-top: 8px;
}
.nat-search:focus { outline: none; border-color: var(--gold); }
.cc-flag { font-size: 20px; line-height: 1; }

/* 진행 중 커리어 이어하기 배너 */
.resume-bar {
  margin-top: 14px; padding: 12px 14px; border: 1px solid var(--gold); border-radius: 12px;
  background: linear-gradient(180deg, rgba(240,196,96,.08), transparent);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.resume-label { flex: 1 1 100%; font: 600 13px/1.4 var(--body); color: var(--chalk); }
.resume-drop { opacity: .7; }

.achv-progress {
  margin: 6px 0 10px; font: 700 14px/1.3 var(--cond); color: var(--gold);
}
.achv-filters { display: flex; gap: 6px; margin-bottom: 4px; }

/* 홈 인디케이터 회피 (앱/PWA) */
.footer { padding-bottom: calc(16px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))); }

/* 계정 삭제 (records 하단, 절제된 링크형) */
.account-danger { margin-top: 30px; text-align: center; }
.acct-delete {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; text-decoration: underline;
  padding: 12px; min-height: 44px;
}
.acct-delete:hover { color: #c96a5a; }

/* 크롤러 가시 소개 섹션 (랜딩 하단, 절제된 톤) */
.about-static { max-width: 680px; margin: 0 auto; padding: 26px 18px 6px; border-top: 1px solid var(--line); }
.about-static h2 { font-family: var(--cond); color: var(--muted); font-size: 16px; letter-spacing: .4px; margin: 0 0 8px; }
.about-static p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 10px; }
.about-static a { color: var(--gold); }
.about-static-en { opacity: .85; }
body.play-lock .about-static { display: none; } /* 플레이 중 몸통 잠금 시 숨김 */

/* ---- Clutch showdown (3x3 strike zone that decides a final) ---- */
.clutch-card { border-color: var(--gold); }
.clutch-stake { font-weight: 700; color: var(--gold); margin: -2px 0 6px; }
.clutch-hint { font-size: 13px; color: var(--chalk); background: rgba(240, 196, 96, .1); border-left: 3px solid var(--gold); padding: 6px 10px; margin: 0 0 12px; border-radius: 4px; }
.clutch-rules { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.clutch-zone { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto auto; gap: 4px 8px; align-items: center; justify-items: center; max-width: 300px; margin: 0 auto; }
.cz-axis { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.cz-top { grid-column: 2; grid-row: 1; }
.cz-left { grid-column: 1; grid-row: 2; }
.cz-right { grid-column: 3; grid-row: 2; }
.cz-bottom { grid-column: 2; grid-row: 3; }
.cz-grid { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; aspect-ratio: 3 / 3.6; border: 2px solid var(--chalk); border-radius: 4px; padding: 4px; }
.cz-cell { position: relative; border: 1px solid rgba(242, 237, 224, .25); background: rgba(242, 237, 224, .05); border-radius: 3px; cursor: pointer; min-height: 56px; }
.cz-cell.hinted { background: rgba(240, 196, 96, .14); border-style: dashed; border-color: rgba(240, 196, 96, .55); }
.cz-cell:not(:disabled):hover, .cz-cell:not(:disabled):active { background: rgba(240, 196, 96, .35); }
.cz-cell:disabled { cursor: default; }
.cz-cell.picked { outline: 3px solid var(--gold); outline-offset: -3px; }
.cz-cell.ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .15), 0 0 0 2px #c0392b; }
.clutch-result .event-title { font-size: 26px; }
.clutch-result.tone-good .event-title { color: var(--accent); }
.clutch-result.tone-bad .event-title { color: var(--danger); }
.clutch-next { margin-top: 12px; width: 100%; text-align: center; justify-content: center; }
/* Action buttons never hide below the fold (KOAL 2026-09-30: 미니게임 끝나면 스크롤해야
   됨). Inside the scrolling choice sheet, the continue button and the choice list pin to
   the sheet's bottom edge; the solid shadow masks the content scrolling underneath. */
@media (max-width: 720px) {
  .choice-sheet .clutch-next,
  .choice-sheet .event-card > .choices:not(.choices-list) {
    position: sticky; bottom: 0; z-index: 2;
    box-shadow: 0 12px 0 var(--bg), 0 -14px 14px -2px var(--bg);
  }
  .choice-sheet .event-card > .choices:not(.choices-list) { background: var(--bg); padding-top: 6px; }
}


/* ---- Salary negotiation (pacing v3) ---- */
.nego-card { border-color: var(--info); }
.nego-head { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.nego-head .draft-body { display: flex; flex-direction: column; gap: 2px; }
.nego-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.nego-chip { font-size: 11px; padding: 3px 8px; border-radius: 10px; border: 1px solid var(--line2); color: var(--sand); background: rgba(242, 237, 224, .05); }
.nego-read { font-size: 13px; color: var(--chalk); border-left: 3px solid var(--muted); background: rgba(242, 237, 224, .05); padding: 6px 10px; margin: 0 0 12px; border-radius: 4px; }
.nego-read.read-room { border-left-color: var(--accent); }
.nego-read.read-some { border-left-color: var(--gold); }
.nego-read.read-tight { border-left-color: var(--danger); }
.nego-read-label { font-family: var(--cond); font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-right: 4px; }
.nego-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nego-amount { font-family: var(--mono); color: var(--gold); white-space: nowrap; }
.nego-ask50 .nego-amount, .nego-walk .choice-label { color: var(--danger); }
.nego-result .event-title { font-size: 22px; }
.nego-result.tone-good .event-title { color: var(--accent); }
.nego-result.tone-bad .event-title { color: var(--danger); }

/* ---- Team mode (CU-PLAN-005) ---- */
.team-intro { color: var(--sand); font: 14px/1.5 var(--body); margin: 0 0 14px; }
.team-toast { min-height: 18px; font: 13px/1.3 var(--body); color: var(--accent); margin: 4px 0 8px; }
.team-toast.is-error { color: var(--danger); }
.team-muted { color: var(--muted); font: 12px/1.3 var(--body); }
.team-card { border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); padding: 14px; margin-bottom: 16px; }
.team-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.team-name { font: 700 22px/1.1 var(--cond); color: var(--chalk); overflow-wrap: anywhere; }
.team-tier { font: 700 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--gold2); color: var(--gold); white-space: nowrap; }
.team-tier.tier-rookie, .team-tier.tier-a { border-color: var(--line2); color: var(--sand); }
.team-tier.tier-legend { background: var(--gold); color: #241800; }
.team-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 12px; font: 14px/1.3 var(--body); color: var(--text); }
.team-play { width: 100%; margin-top: 0; }
.team-section { margin-bottom: 18px; }
.team-slots { display: grid; gap: 6px; }
.team-slot { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 14px/1.2 var(--body); cursor: pointer; }
.team-slot:hover { border-color: var(--gold2); }
.team-slot:focus-visible, .team-pick-row:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.team-slot.is-empty .team-slot-name { color: var(--muted); }
.team-slot-pos { font: 600 12px/1.1 var(--cond); text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.team-slot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-ovr { font: 700 16px/1 var(--mono); color: var(--gold); min-width: 2ch; text-align: right; }
.team-player { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 1; min-width: 0; }
.team-player-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.team-player-name { font: 600 15px/1.2 var(--body); color: var(--chalk); overflow-wrap: anywhere; }
.team-roster-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-roster-row.is-expired .team-player-name, .team-roster-row.is-expired .team-ovr { opacity: .55; }
.team-roster-row.is-locked .team-player-name { opacity: .55; }
.team-roster-row.is-locked .btn-mini { background: transparent; color: var(--muted); border: 1px solid var(--line2); box-shadow: none; cursor: not-allowed; }
.team-roster-meta { display: flex; align-items: center; gap: 10px; width: 100%; }
.team-roster-meta .btn-mini { margin-left: auto; }
.team-expired { color: var(--danger); font: 600 12px/1.3 var(--body); }
.team-pick { max-height: 80vh; overflow-y: auto; }
.team-pick-row { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 10px; margin-bottom: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.team-pick-row:hover { border-color: var(--gold2); }
.team-result { text-align: center; }
.team-verdict { font: 700 30px/1 var(--cond); text-transform: uppercase; margin-bottom: 12px; color: var(--chalk); }
.team-verdict.is-win { color: var(--accent); }
.team-verdict.is-loss { color: var(--danger); }
.team-score { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 8px; margin-bottom: 8px; font: 14px/1.2 var(--body); }
.team-score span:first-child { text-align: right; }
.team-score span:last-child { text-align: left; }
.team-score b { font: 700 32px/1 var(--mono); color: var(--chalk); }
.team-reward { margin: 12px 0; font: 600 15px/1.2 var(--body); color: var(--gold); }
.team-callup { margin: 4px 0 14px; padding: 8px 0; border-top: 1px solid var(--gold2); border-bottom: 1px solid var(--gold2); color: var(--gold); text-transform: uppercase; font: 700 20px/1.1 var(--cond); letter-spacing: .04em; animation: team-callup .6s ease-out; }
@keyframes team-callup { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .team-callup { animation: none; } }
/* Field view: diamond for hitters, rows for pitchers */
.team-field-tabs { margin-bottom: 10px; }
.team-field-tabs .records-tab { flex: 1; }
.team-field { position: relative; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; padding: 14px 8px; background: radial-gradient(120% 90% at 50% 100%, #1d3d27 0%, var(--panel) 70%); }
.team-field.is-bat::before { content: ''; position: absolute; left: 50%; top: 58%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border: 2px solid rgba(242,237,224,.16); background: rgba(217,201,163,.07); pointer-events: none; }
.team-diamond { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); gap: 10px 4px; justify-items: center; }
.team-card-slot { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; max-width: 76px; padding: 6px 4px 7px; border-radius: 8px; border: 1px solid var(--gold2); background: linear-gradient(180deg, var(--panel2), var(--bg2)); color: var(--text); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.team-card-slot:hover { border-color: var(--gold); }
.team-card-slot:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.team-card-slot.is-empty { border-color: var(--line2); border-style: dashed; background: rgba(12,26,18,.7); box-shadow: none; }
.team-card-slot.is-expired { border-color: var(--danger); }
.team-card-pos { font: 600 11px/1 var(--cond); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.team-card-ovr { font: 700 22px/1 var(--mono); color: var(--gold); }
.team-card-slot.is-empty .team-card-ovr { color: var(--muted); }
.team-card-name { font: 11px/1.15 var(--body); color: var(--chalk); max-width: 100%; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.team-card-slot.is-empty .team-card-name { color: var(--muted); }
.team-pgroup { margin-bottom: 12px; }
.team-pgroup:last-child { margin-bottom: 0; }
.team-pgroup-title { text-align: center; font: 600 12px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--sand); margin-bottom: 8px; }
.team-prow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; justify-items: center; }
.team-prow:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.team-prow:has(> :only-child) .team-card-slot { max-width: 110px; }
.team-field-sum { margin-top: 8px; text-align: right; font: 13px/1.2 var(--body); color: var(--muted); }

/* Club identity: composed emblem + editor (CU-PLAN-005 §3.1) */
.team-card-top { justify-content: flex-start; }
.team-card-top .team-name { flex: 1 1 auto; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.team-card-top .team-tier { flex: none; }
.team-identity { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.team-emblem { display: block; }
.team-edit { flex: none; width: auto; min-width: 0; padding: 4px 10px; font-size: 0.8rem; }
.team-ident { max-height: 88vh; overflow-y: auto; }
.team-ident-preview { display: flex; justify-content: center; margin: 4px 0 12px; }
.team-ident-row { margin: 10px 0; }
.team-ident-label { display: block; font-size: 0.8rem; opacity: 0.75; margin-bottom: 6px; }
.team-ident-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.team-ident-opt { background: transparent; border: 2px solid transparent; border-radius: 8px; padding: 2px; cursor: pointer; line-height: 0; }
.team-ident-opt.is-on { border-color: var(--accent, #f0c460); }
.team-ident-swatch { display: block; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); }
.team-ident-err:empty { display: none; }
.team-ident-err { color: #e0786b; opacity: 1; }
/* Team match viewer (KOAL 2026-10-15) */
.team-week { color: var(--muted); font-size: 13px; }
.team-match { text-align: center; max-height: 90vh; overflow-y: auto; }
.team-line-wrap { overflow-x: auto; margin: 6px 0 10px; }
.team-line { border-collapse: collapse; width: 100%; font: 12px/1.2 var(--mono); color: var(--text); }
.team-line th, .team-line td { padding: 5px 1px; border-bottom: 1px solid var(--line); text-align: center; min-width: 1.3em; }
.team-line th { color: var(--muted); font-weight: 600; }
.team-line .team-line-name { text-align: left; font: 600 12px/1.2 var(--body); color: var(--chalk); max-width: 5.5em; padding-right: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-line .team-line-r { color: var(--gold); font-weight: 700; border-left: 1px solid var(--line2); }
.team-line tr.is-mine td { color: var(--chalk); }
.team-pbp { list-style: none; margin: 0 0 12px; padding: 0; max-height: 34vh; overflow-y: auto; text-align: left; }
.team-pbp li { display: flex; gap: 8px; align-items: baseline; padding: 6px 2px; border-bottom: 1px solid var(--line); font: 13px/1.35 var(--body); color: var(--text); animation: team-pbp-in .3s ease-out; }
.team-pbp li.is-mine { color: var(--accent); }
.team-pbp li.is-pc { color: var(--muted); font-size: 12px; }
.team-pbp-inn { flex: none; min-width: 4.2em; font: 600 11px/1.3 var(--cond); text-transform: uppercase; color: var(--muted); }
.team-pbp-score { margin-left: auto; flex: none; font: 600 12px/1.3 var(--mono); color: var(--sand); }
@keyframes team-pbp-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .team-pbp li { animation: none; } }
.team-skip { width: 100%; }
.team-mvp { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; margin: 10px 0 2px; color: var(--chalk); font: 14px/1.3 var(--body); }
.team-mvp-label { font: 700 11px/1 var(--cond); text-transform: uppercase; letter-spacing: .05em; color: var(--gold); border: 1px solid var(--gold2); border-radius: 999px; padding: 4px 8px; }
.team-weekly { margin: 10px 0; padding: 12px; border: 1px solid var(--gold2); border-radius: 10px; text-align: center; font: 14px/1.4 var(--body); color: var(--text); }
.team-weekly-title { font: 700 20px/1.1 var(--cond); text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.team-history-row { display: grid; grid-template-columns: 2.4em 3.6em 3.4em 1fr auto; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; margin-bottom: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 14px/1.2 var(--body); cursor: pointer; }
.team-history-row:hover { border-color: var(--gold2); }
.team-history-row:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.team-history-row b { font-family: var(--mono); }
.team-hist-opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-hist-v.is-win { color: var(--accent); }
.team-hist-v.is-loss { color: var(--danger); }
.team-bench-hint { margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--gold2); border-radius: 8px; color: var(--gold); font: 13px/1.4 var(--body); }
.team-play:disabled { opacity: .45; filter: grayscale(.7); cursor: default; box-shadow: none; }
