/* 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. */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap');

: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 */

  --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;
}

* { 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 14px 48px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 16px;
  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;
}
.brand::before {
  content: "⚾"; font-size: 16px; filter: grayscale(.2);
}
.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: 5px 10px; 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; }

.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: 15px; font-size: 18px; font-weight: 700; cursor: pointer; margin-top: 4px;
  box-shadow: 0 4px 14px rgba(201,151,47,.25);
}
.btn-primary:active { transform: translateY(1px); }
.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: 13px; font-size: 15px; 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 .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; }
.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; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.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; }
.cr b { font-size: 14px; font-weight: 600; color: var(--chalk); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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; }
.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); }
.pc-num { color: var(--gold); font-weight: 600; }
.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); }

/* 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;
}

/* ================================================================
   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; }

/* 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;
}

/* 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; }
.timeline .board { border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.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; }
.timeline .team-cell { text-align: left; font-family: var(--body); color: var(--muted); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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::after { content: " 🏆"; }
.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; }

/* calendar beats — ticker sub-row beneath a season's stat row */
.timeline tr.beats-row td { padding: 4px 12px 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.timeline tr.beats-row:hover td { background: rgba(255,255,255,.015); }
.beats { display: flex; flex-wrap: wrap; gap: 6px; }
.beat {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--body); font-size: 11.5px; color: var(--sand);
  background: rgba(217,201,163,.06); border: 1px solid var(--line2);
  border-radius: 999px; padding: 3px 10px 3px 8px;
}
.beat-badge { font-size: 12px; }
.beat.kind-postseason, .beat.kind-milestone { color: var(--gold); border-color: rgba(240,196,96,.32); background: rgba(240,196,96,.06); }
.beat.kind-moment { color: var(--info); border-color: rgba(107,183,230,.32); background: rgba(107,183,230,.06); }
.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; }
}

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