/* Snap to League on the EasyChamp Matchday system: tokens.css is the source of truth for
   colour, type, radius, shadow and motion. This file only lays things out. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap");

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--color-ground); color: var(--color-ink); font: 400 var(--text-md)/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--color-brand); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; padding-block: 0 72px; display: flex; flex-direction: column; gap: 22px; }

/* ---- top bar: the scorebug ---- */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--color-ground); padding-block: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--color-line-strong); }
.brand { display: flex; align-items: stretch; text-decoration: none; color: inherit; }
.brand .ec { background: var(--color-brand); color: var(--color-on-brand); font: 800 13px/1 var(--font-display); letter-spacing: .08em; padding: 8px 9px; text-transform: uppercase; display: flex; align-items: center; }
.brand .name { background: var(--color-brand-navy); color: #fff; font: 800 15px/1 var(--font-display); letter-spacing: .04em; padding: 8px 11px; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.brand .name i { font-style: normal; color: var(--color-brand-cool); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 600 11px/1 var(--font-mono); padding: 6px 8px; border-radius: var(--radius-chip); background: var(--color-surface); border: 1px solid var(--color-line-strong); color: var(--color-muted); white-space: nowrap; }
.chip.on { border-color: color-mix(in srgb, var(--color-win) 40%, transparent); color: var(--color-win); }
.chip.on::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }

.kicker { font: 600 var(--text-kicker)/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: var(--text-display-1); font-weight: 900; line-height: 1.02; }
h1 em { font-style: normal; color: var(--color-brand); }
h2 { font-size: var(--text-section); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
p { margin: 0; max-width: 64ch; }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-caption); }

.panel { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: center; padding-block: 18px 6px; }
.hero-copy { display: flex; flex-direction: column; gap: 14px; }
.steps { display: flex; border: 1px solid var(--color-line-strong); border-radius: var(--radius-card); overflow: hidden; background: var(--color-surface); }
.steps div { flex: 1; padding: 10px 12px; border-right: 1px solid var(--color-line-strong); font-size: var(--text-caption); color: var(--color-muted); }
.steps div:last-child { border-right: 0; }
.steps b { display: block; font: 800 var(--text-cell)/1.2 var(--font-display); color: var(--color-ink); text-transform: uppercase; letter-spacing: .04em; }
.hero-art { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-card-lg); overflow: hidden; box-shadow: var(--shadow-float); background: #0f1322; max-width: 100%; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.hero-art .scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-brand-cool) 45%, transparent) 50%, transparent); mix-blend-mode: screen; animation: scan 2.8s var(--ease-standard) infinite; }
.hero-art .bug { position: absolute; left: 12px; bottom: 12px; display: flex; font: 600 13px/1 var(--font-mono); box-shadow: var(--shadow-pop); }
.hero-art .bug span { padding: 8px 10px; background: var(--color-brand-navy); color: #fff; }
.hero-art .bug span:first-child { background: var(--color-brand); }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }

/* ---- buttons ---- */
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { font: 800 15px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; border-radius: var(--radius-button); padding: 14px 18px; min-height: 48px; border: 2px solid var(--color-brand); background: var(--color-brand); color: var(--color-on-brand); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform var(--duration-micro) var(--ease-standard), box-shadow var(--duration-micro) var(--ease-standard); }
.btn:hover { box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--color-brand); }
.btn.big { font-size: 19px; padding: 18px 24px; min-height: 58px; }
.btn:disabled { opacity: .45; cursor: progress; transform: none; box-shadow: none; }
.linkbtn { background: none; border: 0; color: var(--color-brand); font: 600 var(--text-base) var(--font-body); cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---- photo strip (carousel) ---- */
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
.shot { scroll-snap-align: start; flex: 0 0 168px; position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-card); overflow: hidden; background: var(--color-surface-2); border: 1px solid var(--color-line-strong); box-shadow: var(--shadow-card); max-width: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .n { position: absolute; top: 8px; left: 8px; font: 600 11px/1 var(--font-mono); background: var(--color-brand-navy); color: #fff; padding: 5px 7px; border-radius: var(--radius-chip); }
.shot .x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(15, 20, 30, .7); color: #fff; font-size: 18px; cursor: pointer; }
.shot .state { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; font: 600 12px/1.3 var(--font-mono); color: #fff; background: linear-gradient(180deg, transparent, rgba(10, 14, 24, .88)); }
.shot .bar-p { position: absolute; left: 0; top: 0; height: 4px; background: var(--color-brand-cool); transition: width var(--duration-standard) var(--ease-standard); }
.shot.reading::after { content: ""; position: absolute; left: 0; right: 0; height: 35%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-brand-cool) 55%, transparent) 50%, transparent); mix-blend-mode: screen; animation: scan 1.8s var(--ease-standard) infinite; }
.shot.done .state::before { content: "\2713  "; color: #4ade80; }
.shot.error { border-color: var(--color-loss); }
.shot.error .state { background: color-mix(in srgb, var(--color-loss) 85%, black); }
.shot.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--color-line-strong); background: transparent; box-shadow: none; color: var(--color-brand); font: 800 13px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; text-align: center; padding: 10px; }
.shot.add .plus { font: 400 40px/1 var(--font-display); }

.progress { height: 6px; background: var(--color-surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--color-brand), var(--color-brand-cool)); transition: width var(--duration-standard) var(--ease-standard); }
.clock { font: 600 var(--text-lg)/1 var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- review ---- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
label.field { display: flex; flex-direction: column; gap: 5px; font: 600 var(--text-kicker)/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--color-muted); }
input, select { font: 500 16px var(--font-body); color: var(--color-ink); background: var(--color-surface-2); border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); padding: 9px 10px; min-width: 0; width: 100%; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; }

.flags { display: flex; flex-direction: column; gap: 8px; }
.flag { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--radius-control); background: color-mix(in srgb, var(--color-ev-yellow-fill) 18%, var(--color-surface)); font-size: var(--text-base); }
.flag .card { width: 13px; height: 18px; border-radius: 2px; background: var(--color-ev-yellow-fill); margin-top: 2px; transform: rotate(-7deg); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.flag.error { background: color-mix(in srgb, var(--color-loss) 12%, var(--color-surface)); }
.flag.error .card { background: var(--color-ev-red); }
.flag.info { background: color-mix(in srgb, var(--color-brand) 9%, var(--color-surface)); }
.flag.info .card { background: var(--color-brand); }
.flag small { display: block; font: 600 10px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); }

.changes { display: flex; flex-direction: column; gap: 6px; }
.change { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: var(--text-base); }
.change .res { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.change .res s { font-size: var(--text-sm, 13px); }
.change.muted { display: block; }
.change .tag { font: 700 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 5px 6px; border-radius: var(--radius-chip); color: #fff; background: var(--color-win); }
.change .tag.changed { background: var(--color-warning); }
.change .tag.scorers { background: var(--color-accent-cool); }
.change s { color: var(--color-muted); }

.matches { display: flex; flex-direction: column; }
.match { display: grid; grid-template-columns: minmax(0, 1fr) 46px 10px 46px minmax(0, 1fr) 28px; gap: 6px; align-items: center; padding-block: 10px; border-top: 1px solid var(--color-line); }
.match:first-child { border-top: 0; }
.match input.score { text-align: center; font: 600 19px var(--font-mono); padding: 8px 2px; }
.match .dash { text-align: center; color: var(--color-muted); font-family: var(--font-mono); }
.match .away { text-align: right; }
.match .meta { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.match .meta select, .match .meta input { font-size: 13px; padding: 5px 7px; width: auto; flex: 1 1 90px; }
.match .goals { grid-column: 1 / -1; font-size: var(--text-caption); color: var(--color-muted); }
.match .del { background: none; border: 0; color: var(--color-muted); font-size: 22px; cursor: pointer; }

.tablebox { overflow-x: auto; }
table.st { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--text-cell); }
table.st th, table.st td { padding: 9px 6px; text-align: right; border-bottom: 1px solid var(--color-line); }
table.st th { font: 600 10px/1 var(--font-mono); letter-spacing: .08em; color: var(--color-muted); text-transform: uppercase; }
table.st td.team, table.st th.team { text-align: left; }
table.st td.team { font-weight: 700; font-size: var(--text-base); }
table.st td.pts { font: 600 16px var(--font-mono); }
table.st td.pos { font: 600 12px var(--font-mono); color: var(--color-muted); text-align: left; width: 26px; }
table.st tr.through td.pos { color: var(--color-qual-promotion); box-shadow: inset 3px 0 0 var(--color-qual-promotion); }

.bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.round { min-width: 170px; flex: 1 0 170px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.bm { border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); background: var(--color-surface); overflow: hidden; }
.bm .p { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: var(--text-base); }
.bm .p + .p { border-top: 1px solid var(--color-line); }
.bm .p.win { font-weight: 700; box-shadow: inset 3px 0 0 var(--color-brand); }
.bm .sc { font: 600 14px var(--font-mono); }
.bm .when { font: 500 11px var(--font-mono); color: var(--color-muted); padding: 5px 10px; border-top: 1px dashed var(--color-line-strong); }
.stagehead { font: 600 var(--text-kicker)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); padding-top: 10px; }

.done { display: flex; flex-direction: column; gap: 12px; }
.url { display: block; color: var(--color-ink); font: 500 14px var(--font-mono); word-break: break-all; background: var(--color-surface-2); padding: 10px 12px; border-radius: var(--radius-control); border: 1px solid var(--color-line-strong); }
details pre { max-height: 320px; overflow: auto; font: 12px/1.45 var(--font-mono); background: var(--color-surface-2); padding: 10px; border-radius: var(--radius-control); }
.err { color: var(--color-loss); font-weight: 600; }

.history { display: flex; flex-direction: column; }
.history .hist { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-line); }
.history .hist:first-child { border-top: 0; }
.history a { flex: 1; min-width: 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; text-decoration: none; color: var(--color-ink); }
.history .btn.small { flex: none; min-height: 40px; padding: 8px 14px; font-size: 14px; }
@media (max-width: 560px) {
  .history .hist { flex-direction: column; align-items: stretch; gap: 8px; }
  .history .btn.small { align-self: flex-start; }
}
.history .meta { font: 500 12px var(--font-mono); color: var(--color-muted); white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 14px; box-shadow: var(--shadow-card); }
.tile b { display: block; font: 600 var(--text-xl)/1.1 var(--font-mono); font-variant-numeric: tabular-nums; }
.tile span { font-size: var(--text-caption); color: var(--color-muted); }

.fx { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-line); }
.fx .h { text-align: right; font-weight: 700; }
.fx .a { font-weight: 700; }
.fx .s { font: 600 18px var(--font-mono); min-width: 70px; text-align: center; background: var(--color-brand-navy); color: #fff; padding: 6px 8px; }
.fx .s.sched { font: 500 12px var(--font-mono); background: var(--color-surface-2); color: var(--color-muted); }
.fx .g { grid-column: 1 / -1; text-align: center; font-size: var(--text-caption); color: var(--color-muted); }

.foot { font-size: var(--text-caption); color: var(--color-muted); display: flex; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--color-line-strong); padding-top: 14px; }

@media (max-width: 820px) {
  .hero, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; aspect-ratio: 16 / 9; }
  .shot { flex-basis: 136px; }
  .steps { flex-direction: column; }
  .steps div { border-right: 0; border-bottom: 1px solid var(--color-line-strong); }
  .steps div:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 560px) {
  .bar .chips .chip:not(:first-child) { display: none; }
  .bar { padding-block: 8px; }
}

/* =====================================================================
   Broadcast pass: ticker, chalk-to-scorebug hero, staggered reveals
   ===================================================================== */
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--color-brand) 10%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 119px, color-mix(in srgb, var(--color-line-strong) 45%, transparent) 119px 120px),
    var(--color-ground);
}
body::after { /* print-grain, very light */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ticker { overflow: hidden; background: var(--color-brand-navy); color: #fff; border-radius: var(--radius-control); margin-top: -8px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; gap: 34px; width: max-content; padding: 9px 0; animation: ticker 38s linear infinite; font: 600 12px/1 var(--font-mono); letter-spacing: .02em; }
.ticker-track span { white-space: nowrap; opacity: .92; }
.ticker-track b { background: var(--color-brand-cool); color: var(--color-brand-navy); padding: 3px 5px; margin-right: 8px; border-radius: 2px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.hero-art { aspect-ratio: auto; background: linear-gradient(160deg, #1a2150, #0d1230 70%); display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; min-height: 340px; }
.hero-art .photo { position: relative; overflow: hidden; }
.hero-art .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; opacity: .95; transform: scale(1.04); animation: drift 14s ease-in-out infinite alternate; }
.hero-art .photo .tag { position: absolute; left: 10px; top: 10px; font: 600 10px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(10, 14, 30, .75); color: #fff; padding: 6px 7px; }
.hero-art .photo::after { content: ""; position: absolute; top: 0; bottom: 0; right: -1px; width: 48px; background: linear-gradient(90deg, transparent, #141a42); }
.hero-art .scan { height: 36%; }
.hero-art .board { position: relative; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; color: #fff; justify-content: center; }
.board-head { font: 600 10px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #aab4ff; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.board-head .live { background: var(--color-live); color: #fff; padding: 3px 6px; border-radius: 2px; animation: blink 1.6s ease-in-out infinite; }
.board .row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; background: rgba(255, 255, 255, .06); border-left: 3px solid var(--color-brand-cool); padding: 9px 10px; font: 700 15px/1.1 var(--font-display); letter-spacing: .01em;
  opacity: 0; transform: translateX(24px); animation: slam .5s var(--ease-overshoot) forwards, loopfade 9s linear infinite; animation-delay: calc(.9s + var(--i) * .16s), calc(.9s + var(--i) * .16s); }
.board .row b { font: 600 12px/1 var(--font-mono); color: #aab4ff; }
.board .row em { font: 600 18px/1 var(--font-mono); font-style: normal; }
.board .row:first-of-type { border-left-color: #4ade80; }
.board-foot { font: 500 11px/1.4 var(--font-mono); color: #aab4ff; margin-top: 6px; opacity: 0; animation: slam .5s ease forwards; animation-delay: 1.8s; }
@keyframes slam { to { opacity: 1; transform: none; } }
@keyframes loopfade { 0%, 88% { filter: none; } 92% { filter: brightness(1.8); } 100% { filter: none; } }
@keyframes drift { to { transform: scale(1.12) translate(-2%, -2%); } }
@keyframes blink { 50% { opacity: .55; } }

.hero-copy > * { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease-reveal, cubic-bezier(.2,.7,.2,1)) forwards; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; } .hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .28s; } .hero-copy > *:nth-child(4) { animation-delay: .4s; }
.hero-copy > *:nth-child(5) { animation-delay: .5s; } .hero-copy > *:nth-child(6) { animation-delay: .55s; }
h1 em { background: linear-gradient(90deg, var(--color-brand), var(--color-brand-cool)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise { to { opacity: 1; transform: none; } }

.steps div { position: relative; transition: background var(--duration-standard) var(--ease-standard); }
.steps div:hover { background: var(--color-surface-2); }
.steps b { color: var(--color-brand); }

.btn.big { box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--color-brand) 80%, transparent); }
.btn.big::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }

/* review reveals */
.match, .flag, table.st tbody tr { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.match { transform-origin: left; }
.checking { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-control); background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface)); font-size: var(--text-base); }
.checking .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-brand); animation: blink 1s ease-in-out infinite; flex: none; }
.checking.finished { background: color-mix(in srgb, var(--color-win) 10%, var(--color-surface)); }
.checking.finished .dot { background: var(--color-win); animation: none; }

table.scorers td.team .shirt { display: inline-block; min-width: 22px; margin-right: 6px; padding: 2px 4px; font: 600 11px/1 var(--font-mono); text-align: center; color: #fff; background: var(--color-brand-navy); border-radius: 2px; }
table.st td.muted-cell { color: var(--color-muted); font-weight: 400; font-size: var(--text-caption); }
#scorers-box { display: flex; flex-direction: column; gap: 10px; }

/* published: full-time stamp */
.done { position: relative; overflow: hidden; }
.stamp { position: absolute; right: 18px; top: 18px; font: 900 22px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--color-win); border: 3px solid var(--color-win); padding: 8px 12px; transform: rotate(-8deg) scale(2.2); opacity: 0; }
#done:not([hidden]) .stamp { animation: stamp .55s cubic-bezier(.2,1.6,.4,1) .15s forwards; }
@keyframes stamp { to { opacity: .9; transform: rotate(-8deg) scale(1); } }

.shot { transition: transform var(--duration-standard) var(--ease-standard); }
.shot:hover { transform: translateY(-3px) rotate(-.6deg); }
.shot.done { animation: pop .4s var(--ease-overshoot); }
@keyframes pop { 50% { transform: scale(1.04); } }

@media (max-width: 820px) {
  .hero-art { grid-template-columns: 1fr 1.15fr; min-height: 250px; }
  .board .row { font-size: 13px; padding: 7px 8px; }
  .stamp { position: static; align-self: flex-start; margin: 14px 0 4px 6px; font-size: 18px; }
}
@media (max-width: 420px) {
  .hero-art { grid-template-columns: 1fr; }
  .hero-art .photo { height: 150px; }
  .hero-art .photo::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .board .row, .board-foot, .hero-copy > * { opacity: 1; transform: none; }
}

#reader-box { max-width: 460px; }
#reader-box:not(.ready) { display: none; }
#reader-note { text-transform: none; letter-spacing: 0; font: 400 13px/1.4 var(--font-body); }

/* sticky "read" bar once photos are chosen: the next step is always under the thumb */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--color-surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-line-strong); box-shadow: 0 -10px 30px -18px rgba(15, 20, 40, .45); animation: barup .35s var(--ease-overshoot) both; }
.actionbar-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.actionbar .btn { min-height: 52px; }
.actionbar-hint { max-width: 1120px; margin: 6px auto 0; font-size: var(--text-caption); color: var(--color-muted); text-align: center; }
body.has-actionbar .wrap { padding-bottom: 150px; }
@keyframes barup { from { transform: translateY(100%); } }
body.has-actionbar #read { display: none; }

/* =====================================================================
   Readability pass: scorecard match rows, calmer header, phone/iPad/desktop
   ===================================================================== */
.matches { gap: 10px; }
.match { grid-template-columns: 44px minmax(0, 1fr) 64px 32px; grid-template-areas:
  "htag home hs del" "atag away as ." "meta meta meta meta" "goals goals goals goals";
  gap: 6px 8px; padding: 12px; border: 1px solid var(--color-line); border-radius: var(--radius-card); background: var(--color-surface); border-top: 1px solid var(--color-line); }
.match:first-child { border-top: 1px solid var(--color-line); }
.match .side { font: 600 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); }
.match .home-tag { grid-area: htag; } .match .away-tag { grid-area: atag; }
.match input.team { font: 700 17px/1.2 var(--font-body); padding: 10px 12px; text-align: left; }
.match input[data-f="home"] { grid-area: home; } .match input[data-f="away"] { grid-area: away; }
.match input[data-f="homeScore"] { grid-area: hs; } .match input[data-f="awayScore"] { grid-area: as; }
.match input.score { font: 600 22px var(--font-mono); padding: 8px 0; height: 46px; }
.match.played input.score { background: var(--color-brand-navy); color: #fff; border-color: var(--color-brand-navy); }
.match .del { grid-area: del; width: 32px; height: 32px; border-radius: 50%; align-self: center; }
.match .del:hover { background: var(--color-surface-2); color: var(--color-loss); }
.match .meta { grid-area: meta; margin-top: 4px; }
.match .meta select, .match .meta input { font-size: 14px; padding: 7px 8px; }
.match .goals { grid-area: goals; }
.match .dash { display: none; }
.hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* header: sticky only where there is room for it */
@media (max-width: 820px) {
  .bar { position: static; }
  .grid2 .actions .btn { flex: 1 1 140px; }
  table.st th:nth-child(7), table.st td:nth-child(7), table.st th:nth-child(8), table.st td:nth-child(8) { display: none; } /* GF, GA */
}
/* iPad portrait and small laptops: review stacks so match cards stay wide */
@media (min-width: 821px) and (max-width: 1100px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1101px) {
  .wrap { max-width: 1200px; }
}
@media (max-width: 560px) {
  .match { grid-template-columns: minmax(0, 1fr) 54px 30px; grid-template-areas: "home hs del" "away as ." "meta meta meta" "goals goals goals"; padding: 10px; }
  .match .side { display: none; }
  .match input.team { font-size: 16px; padding: 10px; }
}

/* leaderboard podium: 2nd, 1st, 3rd */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 6px 0 14px; }
.podium .step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 6px 0; animation: rise .6s var(--ease-overshoot) both; animation-delay: calc(var(--i) * 120ms); min-width: 0; }
.podium .step b { font: 800 15px/1.15 var(--font-display); overflow-wrap: anywhere; }
.podium .step em { font: 600 12px/1 var(--font-mono); font-style: normal; color: var(--color-muted); }
.podium .step i { display: block; width: 100%; margin-top: 6px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--color-brand), var(--color-brand-navy)); }
.podium .p1 i { height: 96px; } .podium .p2 i { height: 68px; opacity: .85; } .podium .p3 i { height: 48px; opacity: .72; }
.podium .medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 16px/1 var(--font-display); color: #1d1602; box-shadow: var(--shadow-pop); }
.podium .p1 .medal { background: linear-gradient(135deg, #ffe38a, #f2b01e); width: 42px; height: 42px; font-size: 19px; }
.podium .p2 .medal { background: linear-gradient(135deg, #f1f4f8, #b7c0cc); }
.podium .p3 .medal { background: linear-gradient(135deg, #f3c9a0, #c47a3f); }
.entries { display: flex; flex-direction: column; gap: 8px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--cols, 1), minmax(52px, 72px)) 30px; gap: 6px; align-items: center; animation: rise .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.entry input { font-size: 15px; padding: 8px; }
.entry input.num { text-align: center; font-family: var(--font-mono); }
.entries-head { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--cols, 1), minmax(52px, 72px)) 30px; gap: 6px; font: 600 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); }
.entries-head span:not(:first-child) { text-align: center; }

/* EasyChamp account in the header */
.bar .account { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; }
.bar .account .who { font-weight: 700; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .account .btn.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
