/* ============================================================
   TÍO LIBRE FC: design system
   Derived from the crest: warm black, antique gold, cream.
   Cinzel (inscriptional caps) / Newsreader (editorial serif)
   / Archivo (utility, tabular figures).
   ============================================================ */

:root {
  --bg: #0B0A08;
  --surface: #14110D;
  --surface-2: #1B1712;
  --gold: #C9A45C;
  --gold-bright: #E8CE93;
  --gold-dim: rgba(201, 164, 92, 0.55);
  --line: rgba(201, 164, 92, 0.22);
  --line-strong: rgba(201, 164, 92, 0.45);
  --cream: #EFE6D3;
  --cream-dim: #A79E8C;
  --cream-faint: #6E675A;

  --font-display: "Cinzel", "Trajan Pro", serif;
  --font-editorial: "Newsreader", "Georgia", serif;
  --font-utility: "Archivo", -apple-system, sans-serif;

  --nav-h: 64px;
  --pad: 20px;
  --maxw: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-editorial);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* subtle paper grain on the ground, like the mockup's stock */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,164,92,0.06), transparent 60%);
}

#app { position: relative; z-index: 1; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 14px) var(--pad) 12px;
  text-align: center;
}

.masthead h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* optically recenter letterspaced caps */
  color: var(--gold);
  text-transform: uppercase;
}

.masthead .sub {
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--cream-faint);
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- the line-dot-line device (from the crest) ---------- */

.rule-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px auto;
  max-width: 220px;
}
.rule-dot::before, .rule-dot::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}
.rule-dot span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- layout ---------- */

.view {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--pad) calc(var(--nav-h) + env(safe-area-inset-bottom) + 40px);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section { margin-bottom: 8px; }

/* ---------- The Read (editorial lead) ---------- */

.read-date {
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-bottom: 10px;
}

.read-title {
  font-family: var(--font-editorial);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 18px;
}

.read-body p {
  color: var(--cream-dim);
  font-size: 17.5px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.read-body p:first-of-type {
  color: var(--cream);
}
.read-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.1em;
  line-height: 0.85;
  float: left;
  padding-right: 10px;
  padding-top: 4px;
  color: var(--gold);
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
  margin-bottom: 14px;
}

.card--tappable { cursor: pointer; transition: border-color 0.25s ease; }
.card--tappable:hover, .card--tappable:focus-visible { border-color: var(--line-strong); }
.card--tappable:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }

/* match card */
.match-comp {
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.match-comp .when { color: var(--gold-dim); }

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.match-team {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--cream);
}
.match-team.away { text-align: right; }
.match-v {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 14px;
  color: var(--gold-dim);
  padding: 0 10px;
}
.match-matters {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--cream-dim);
}

/* change items: a ledger, not cards */
.change {
  display: flex;
  gap: 14px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.change:last-child { border-bottom: none; }
.change-marker {
  flex: none;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  position: relative;
  top: -2px;
}
.change-text { font-size: 15.5px; line-height: 1.55; color: var(--cream-dim); }
.change-text strong { color: var(--cream); font-weight: 500; }

/* ---------- the UNCONFIRMED chip (loud, honest) ---------- */

.chip-unconfirmed {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-utility);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  background: rgba(201, 164, 92, 0.07);
  white-space: nowrap;
}
.chip-unconfirmed::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  border: 1px solid var(--gold-bright);
}

.verify-note {
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  color: var(--cream-dim);
  border-left: 1px solid var(--gold-dim);
  padding-left: 14px;
  margin-top: 10px;
}

/* ---------- table ---------- */

.table-note {
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-bottom: 18px;
}

.standings {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-utility);
  font-variant-numeric: tabular-nums;
}
.standings th {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-faint);
  text-align: right;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-strong);
}
.standings th.club-col { text-align: left; }
.standings td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--cream-dim);
  text-align: right;
}
.standings tr:last-child td { border-bottom: none; }
.standings td.pos {
  color: var(--cream-faint);
  font-size: 12px;
  width: 30px;
  text-align: left;
}
.standings td.club-col {
  text-align: left;
  color: var(--cream);
  font-family: var(--font-editorial);
  font-size: 15.5px;
}
.standings tr { cursor: pointer; }
.standings tr:hover td { color: var(--cream); }

/* race indicator: a thin gold cell-edge, not a colored row */
.standings tr.race-title td.pos { box-shadow: inset 2px 0 0 var(--gold); }
.standings tr.race-europe td.pos { box-shadow: inset 2px 0 0 var(--gold-dim); }
.standings tr.race-relegation td.pos { box-shadow: inset 2px 0 0 var(--cream-faint); }

.race-legend {
  display: flex;
  gap: 22px;
  margin-top: 18px;
  font-family: var(--font-utility);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-faint);
}
.race-legend span { display: inline-flex; align-items: center; gap: 8px; }
.race-legend i { width: 10px; height: 2px; display: inline-block; }
.race-legend .l-title i { background: var(--gold); }
.race-legend .l-europe i { background: var(--gold-dim); }
.race-legend .l-relegation i { background: var(--cream-faint); }

.promoted-row td.club-col::after {
  content: "PROMOTED";
  font-family: var(--font-utility);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-left: 10px;
  position: relative;
  top: -1px;
}

/* ---------- fixtures ---------- */

.matchweek { margin-bottom: 10px; }

.mw-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

/* matchweek navigator */
.mw-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.mw-nav-center { text-align: center; }
.mw-nav-center .mw-label { display: block; }
.mw-nav-center .mw-range { display: block; margin-top: 4px; }
.mw-arrow {
  font-family: var(--font-editorial);
  font-size: 18px;
  color: var(--gold);
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.mw-arrow:hover:not(:disabled) { border-color: var(--line-strong); color: var(--gold-bright); }
.mw-arrow:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }
.mw-arrow:disabled { color: var(--cream-faint); opacity: 0.4; cursor: default; }

.fixture-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fixture-time {
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fixture-time.is-live { color: var(--gold-bright); letter-spacing: 0.18em; }

.fixture-score {
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 16px;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* live pulse, used in the Live Now eyebrow */
.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  margin-right: 10px;
  vertical-align: 1px;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 206, 147, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(232, 206, 147, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* match center live score */
.mh-score {
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 34px;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  margin-top: 16px;
}
.mh-status {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--cream-faint);
  margin-top: 6px;
}
.mh-status.is-live { color: var(--gold-bright); }
.mw-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
}
.mw-range {
  font-family: var(--font-utility);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

.mw-day {
  font-family: var(--font-utility);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 16px 2px 6px;
}

.fixture {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 8px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.fixture:last-child { border-bottom: none; }
.fixture-team {
  font-family: var(--font-editorial);
  font-size: 16px;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.fixture-team.away { justify-content: flex-end; text-align: right; }
.fixture-team .crest-sm { flex: none; }
.fixture-v {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 13px;
  color: var(--gold-dim);
  padding: 0 8px;
}

/* segmented control */
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: 22px;
  overflow: hidden;
}
.seg button {
  flex: 1;
  font-family: var(--font-utility);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
  background: none;
  border: none;
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on {
  color: var(--gold);
  background: rgba(201, 164, 92, 0.07);
}
.seg button:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: -3px; }

/* filter chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.chip {
  font-family: var(--font-utility);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--cream-faint);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip.on {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(201, 164, 92, 0.07);
}
.chip-action { color: var(--gold-bright); border-color: var(--gold-dim); margin-left: auto; }
.chip:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }

/* month calendar */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head { margin: 18px 0 6px; }
.cal-wd {
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--cream-faint);
  text-align: center;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: default;
  padding: 0;
  position: relative;
}
.cal-cell .cal-d {
  font-family: var(--font-utility);
  font-size: 13px;
  color: var(--cream-faint);
  font-variant-numeric: tabular-nums;
}
.cal-cell.has { cursor: pointer; border-color: var(--line); background: var(--surface); }
.cal-cell.has .cal-d { color: var(--cream); }
.cal-cell .cal-n {
  font-family: var(--font-utility);
  font-size: 8.5px;
  color: var(--gold-dim);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cal-cell.fav::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.cal-cell.watch::before {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: var(--gold-bright);
  border-radius: 99px;
}
.cal-cell.today .cal-d { color: var(--gold-bright); }
.cal-cell.sel {
  border-color: var(--gold);
  background: rgba(201, 164, 92, 0.08);
}
.cal-cell:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 1px; }

/* ---------- clubs grid ---------- */

.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.club-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px 14px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease;
}
.club-tile:hover, .club-tile:focus-visible { border-color: var(--line-strong); }
.club-tile:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }

.monogram {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  color: var(--gold);
  width: 62px; height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.crest-ring {
  width: 62px; height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: radial-gradient(circle at 50% 42%, rgba(239,230,211,0.05), transparent 70%);
}
.crest-ring .crest {
  width: 58%;
  height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.club-head .crest-ring { width: 84px; height: 84px; }

/* small inline crest: fixtures rows, table */
.crest-sm {
  width: 19px;
  height: 19px;
  object-fit: contain;
  vertical-align: -4px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.standings .crest-sm { margin-right: 10px; }

/* onboarding pick crest */
.crest-pick {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin: 0 auto 8px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}

.club-tile .name {
  font-family: var(--font-editorial);
  font-size: 14.5px;
  color: var(--cream);
  line-height: 1.25;
}
.club-tile .stadium {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 12.5px;
  color: var(--cream-dim);
  margin-top: 4px;
  line-height: 1.3;
}
.club-tile .hook {
  font-family: var(--font-utility);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-top: 8px;
}

/* ---------- club detail ---------- */

.back-link {
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.back-link:hover { color: var(--gold); }

.club-head { text-align: center; margin-bottom: 6px; }
.club-head .monogram { width: 84px; height: 84px; font-size: 30px; }
.club-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: var(--cream);
  text-transform: uppercase;
  margin-top: 6px;
}
.club-head .meta {
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-top: 8px;
}

.club-story {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--cream-dim);
}
.club-story::first-letter {
  font-family: var(--font-display);
  font-size: 2.9em;
  line-height: 0.85;
  float: left;
  padding-right: 10px;
  padding-top: 4px;
  color: var(--gold);
}

.factlist { list-style: none; }
.factlist li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.factlist li:last-child { border-bottom: none; }
.factlist .k {
  font-family: var(--font-utility);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-faint);
  flex: none;
}
.factlist .v { color: var(--cream); text-align: right; }

.players { display: flex; flex-wrap: wrap; gap: 8px; }
.player {
  font-family: var(--font-editorial);
  font-size: 14.5px;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
}

/* ---------- match center ---------- */

.match-head { text-align: center; }
.match-head-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 20px;
}
.match-head-side { text-align: center; }
.match-head-side .crest-ring { width: 72px; height: 72px; }
.mh-name {
  font-family: var(--font-editorial);
  font-size: 16px;
  color: var(--cream);
  line-height: 1.3;
  margin-top: 2px;
}
.mh-v {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-dim);
  padding-top: 24px;
}
.mh-meta {
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-faint);
  line-height: 1.9;
  margin-top: 18px;
}

.story-club {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.fixture.watched { box-shadow: inset 2px 0 0 var(--gold-bright); padding-left: 10px; }

.match-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.btn-outline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  padding: 14px 34px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-outline:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }

.fixture--tappable { cursor: pointer; transition: background 0.2s ease; }
.fixture--tappable:hover { background: rgba(201, 164, 92, 0.04); }
.fixture--tappable:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: -1px; }

/* ---------- scenario lab (locked, honest) ---------- */

.lab-locked { text-align: center; padding: 40px 10px 20px; }
.lab-locked .monogram { width: 74px; height: 74px; font-size: 24px; }
.lab-locked h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 18px 0 14px;
}
.lab-locked p {
  color: var(--cream-dim);
  font-size: 16px;
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto 14px;
}
.lab-locked .date {
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 24px;
}

/* ---------- onboarding ---------- */

.onboard {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  overflow-y: auto;
  padding: 0 var(--pad) 40px;
}

.onboard-inner { max-width: var(--maxw); margin: 0 auto; }

.onboard-crest {
  text-align: center;
  padding: 72px 0 8px;
}
.onboard-crest img {
  width: 210px;
  height: auto;
  opacity: 0;
  animation: crestIn 1.4s ease 0.2s forwards;
  /* melt the PNG's own dark stock into the page ground */
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 48%, black 48%, transparent 74%);
  mask-image: radial-gradient(ellipse 62% 62% at 50% 48%, black 48%, transparent 74%);
}
@keyframes crestIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.onboard h2 {
  font-family: var(--font-editorial);
  font-weight: 500;
  font-size: 26px;
  text-align: center;
  color: var(--cream);
  margin-bottom: 10px;
  opacity: 0;
  animation: crestIn 1s ease 0.9s forwards;
}
.onboard .lede {
  text-align: center;
  color: var(--cream-dim);
  font-size: 16px;
  max-width: 420px;
  margin: 0 auto 34px;
  opacity: 0;
  animation: crestIn 1s ease 1.1s forwards;
}

.onboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  opacity: 0;
  animation: crestIn 1s ease 1.3s forwards;
}

.pick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: var(--font-editorial);
  font-size: 14px;
  color: var(--cream);
  line-height: 1.3;
}
.pick[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(201, 164, 92, 0.08);
}

.onboard-actions {
  position: sticky;
  bottom: 0;
  padding: 18px 0 calc(env(safe-area-inset-bottom) + 10px);
  background: linear-gradient(to top, var(--bg) 65%, transparent);
  text-align: center;
}

.btn-gold {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  border: none;
  border-radius: 2px;
  padding: 16px 42px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-gold:hover { background: var(--gold-bright); }
.btn-gold:disabled {
  background: var(--surface-2);
  color: var(--cream-faint);
  cursor: default;
}

.btn-quiet {
  display: block;
  margin: 14px auto 0;
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-faint);
  background: none;
  border: none;
  cursor: pointer;
}
.btn-quiet:hover { color: var(--cream-dim); }

/* ---------- bottom nav ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
  transition: color 0.2s ease;
}
.tab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.3; }
.tab[aria-current="page"] { color: var(--gold); }
.tab:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: -4px; }

/* ---------- footer / origin line ---------- */

.origin {
  text-align: center;
  padding: 34px 20px 10px;
  font-style: italic;
  font-size: 13.5px;
  color: var(--cream-faint);
  line-height: 1.6;
}

/* ---------- splash (ported from Cup26, rebranded) ----------
   Phases applied as .phase-{ignite|reveal|strike|hold|lift}. */

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.75s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.75s ease;
  will-change: transform, opacity;
}
.splash.phase-lift {
  transform: translateY(-104%);
  opacity: 0.98;
}

.splash-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.1s ease;
}
.phase-reveal .splash-video,
.phase-strike .splash-video,
.phase-hold .splash-video,
.phase-lift .splash-video {
  opacity: 1;
  animation: splash-push 14s linear forwards;
}
@keyframes splash-push {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}

/* dark grade so the gold crest owns the frame */
.splash-grade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 5, 4, 0.86) 0%, rgba(6, 5, 4, 0.6) 45%, rgba(6, 5, 4, 0.92) 100%);
  mix-blend-mode: multiply;
}
.splash-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 46%, transparent 40%, rgba(6, 5, 4, 0.78) 100%);
}

/* ignite: a hairline of gold light that flares open, then dies as video appears */
.splash-ignite-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C9A45C 20%, #F5E9CB 50%, #C9A45C 80%, transparent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px 2px rgba(201, 164, 92, 0.8);
  opacity: 0;
}
.phase-ignite .splash-ignite-line {
  animation: splash-ignite 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
.phase-reveal .splash-ignite-line {
  width: 86vw;
  animation: splash-ignite-out 0.5s ease forwards;
}
@keyframes splash-ignite {
  0% { width: 0; opacity: 0; }
  25% { opacity: 1; }
  100% { width: 86vw; opacity: 1; }
}
@keyframes splash-ignite-out {
  from { opacity: 1; }
  to { opacity: 0; height: 0; }
}

/* light sweep: one diagonal flash as the crest strikes */
.splash-sweep {
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 42%, rgba(245, 233, 203, 0.32) 50%, transparent 58%);
  transform: translateX(-130%);
  pointer-events: none;
}
.phase-strike .splash-sweep {
  animation: splash-sweep 0.8s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}
@keyframes splash-sweep {
  to { transform: translateX(130%); }
}

/* crest: screen-blended so its dark plate melts into the footage */
.splash-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px;
}
.splash-logo {
  width: min(72vw, 380px);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 64% 64% at 50% 48%, black 46%, transparent 72%);
  mask-image: radial-gradient(ellipse 64% 64% at 50% 48%, black 46%, transparent 72%);
  opacity: 0;
  transform: scale(1.55);
  filter: blur(14px) brightness(2.2);
  will-change: transform, opacity, filter;
  user-select: none;
  -webkit-user-select: none;
}
.phase-strike .splash-logo,
.phase-hold .splash-logo,
.phase-lift .splash-logo {
  animation: splash-logo-strike 0.65s cubic-bezier(0.2, 1.2, 0.3, 1) forwards,
             splash-logo-breathe 2.6s ease-in-out 0.8s infinite;
}
@keyframes splash-logo-strike {
  0% { opacity: 0; transform: scale(1.55); filter: blur(14px) brightness(2.2); }
  55% { opacity: 1; filter: blur(0) brightness(1.35); }
  75% { transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1) drop-shadow(0 0 28px rgba(201, 164, 92, 0.35)); }
}
@keyframes splash-logo-breathe {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(201, 164, 92, 0.28)); }
  50% { filter: drop-shadow(0 0 40px rgba(201, 164, 92, 0.5)); }
}

/* loader: thin gold bar that fills across the hold phase */
.splash-loader {
  width: min(46vw, 220px);
  height: 2px;
  background: rgba(239, 230, 211, 0.14);
  border-radius: 99px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.phase-hold .splash-loader,
.phase-lift .splash-loader {
  opacity: 1;
}
.splash-loader span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8A6F35, #C9A45C, #F5E9CB);
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(201, 164, 92, 0.6);
}
.phase-hold .splash-loader span {
  animation: splash-fill 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.phase-lift .splash-loader span { width: 100%; }
@keyframes splash-fill {
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .splash, .splash-video, .splash-logo, .splash-sweep, .splash-ignite-line, .splash-loader span {
    animation: none !important;
    transition: opacity 0.6s ease !important;
  }
  .splash-video { opacity: 1; transform: none; }
  .splash-logo { opacity: 1; transform: none; filter: none; }
  .splash-loader { opacity: 1; }
  .splash-loader span { width: 100%; }
  .splash.phase-lift { transform: none; opacity: 0; }
}

/* ---------- misc ---------- */

.fav-star { color: var(--gold); font-size: 12px; margin-left: 8px; }

@media (max-width: 420px) {
  .read-title { font-size: 33px; }
  .standings th:nth-child(4), .standings td:nth-child(4) { display: none; } /* hide GD on tiny screens */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
