:root {
  --yellow: #fdeb19;
  --yellow-pressed: #e4d407;
  --ink: #11120f;
  --ink-soft: #2b2c27;
  --paper: #f4f3ec;
  --surface: #ffffff;
  --muted: #62645c;
  --border: #d9d8cf;
  --success: #0f6f45;
  --success-soft: #e4f3eb;
  --danger: #b42318;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 8px 30px rgba(17,18,15,.09);
  --focus: 0 0 0 4px rgba(17,18,15,.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-150%); background: var(--surface); color: var(--ink); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.kiosk-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.match-header { min-height: 112px; padding: 16px clamp(20px,4vw,56px); display: grid; grid-template-columns: minmax(210px,1fr) minmax(360px,1.5fr) minmax(120px,1fr); align-items: center; gap: 24px; background: var(--yellow); }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand-mark { width: 64px; height: 64px; flex: 0 0 auto; border: 4px solid var(--ink); border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: .82; }
.brand-mark strong { font-size: 21px; font-weight: 900; letter-spacing: -.08em; }
.brand-mark span { font-size: 12px; font-weight: 800; margin-top: 4px; }
.brand-name { font-size: 18px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.brand-note { margin-top: 6px; font-size: 13px; color: rgba(17,18,15,.68); }
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; text-align: center; }
.fixture > strong { font-size: clamp(16px,1.7vw,22px); line-height: 1.1; text-transform: uppercase; }
.kickoff { min-width: 142px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ink); color: white; }
.kickoff span { display: block; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.kickoff small { display: block; margin-top: 3px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.admin-link { justify-self: end; min-height: 52px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-sm); text-decoration: none; font-weight: 800; transition: background 180ms ease, color 180ms ease; }
.admin-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-link:hover, .admin-link:active { background: var(--ink); color: white; }
.guest-main { width: min(1440px,100%); margin: 0 auto; flex: 1; padding: clamp(28px,4vw,56px); display: flex; flex-direction: column; }
.guest-main > section { flex: 1; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 900; letter-spacing: .14em; color: var(--muted); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(34px,4vw,58px); line-height: 1; letter-spacing: -.045em; }
h2 { font-size: 26px; letter-spacing: -.025em; }
.page-heading p:not(.eyebrow), .admin-title p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: 17px; }
.submission-counter { min-width: 140px; text-align: right; }
.submission-counter span { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.submission-counter strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.guest-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(12px,1.5vw,20px); }
.guest-button { min-height: 112px; padding: 18px; display: flex; align-items: center; gap: 14px; border: 2px solid transparent; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; box-shadow: var(--shadow); transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.guest-button:hover { border-color: var(--ink); }
.guest-button:active { transform: scale(.98); }
.guest-avatar { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #e8e7df; font-size: 15px; font-weight: 900; }
.guest-button strong { display: block; font-size: 17px; line-height: 1.15; }
.guest-button small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.guest-button.is-done { background: var(--success-soft); }
.guest-button.is-done .guest-avatar { background: var(--success); color: white; }
.guest-button.is-done small { color: var(--success); font-weight: 800; }
.check-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kiosk-footer { margin-top: 28px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); }
.kiosk-footer strong { color: var(--ink); }
.state-panel { min-height: 60dvh; display: grid; place-content: center; justify-items: center; text-align: center; }
.state-panel h1 { max-width: 760px; font-size: clamp(34px,5vw,64px); }
.state-panel p { font-size: 18px; color: var(--muted); }
.state-icon { width: 74px; height: 74px; margin-bottom: 24px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.spinner { width: 52px; height: 52px; margin-bottom: 24px; border: 5px solid var(--border); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.prediction-dialog { width: min(620px,calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.prediction-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
.prediction-dialog form { position: relative; padding: clamp(24px,5vw,40px); }
.prediction-dialog h2 { margin: 0 0 8px; font-size: clamp(30px,4vw,42px); }
.dialog-copy { color: var(--muted); }
.close-button { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #ecebe4; }
.close-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.score-editor { margin: 32px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.score-team { text-align: center; }
.score-team > span { display: block; min-height: 42px; font-size: 15px; font-weight: 900; text-transform: uppercase; }
.score-team output { display: block; margin: 4px 0 14px; font-size: clamp(58px,9vw,86px); font-weight: 900; line-height: .9; font-variant-numeric: tabular-nums; }
.score-colon { margin-top: 32px; font-size: 46px; font-weight: 900; }
.stepper { display: flex; justify-content: center; gap: 10px; }
.stepper button { width: 60px; height: 56px; border: 0; border-radius: var(--radius-sm); background: #ecebe4; color: var(--ink); font-size: 30px; font-weight: 800; transition: background 160ms ease, transform 160ms ease; }
.stepper button:active { transform: scale(.94); background: var(--border); }
.dialog-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.button { min-height: 52px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-sm); text-decoration: none; font-weight: 850; transition: background 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease; }
.button:active { transform: scale(.98); }
.button:disabled { cursor: wait; opacity: .55; }
.button-primary { background: var(--yellow); color: var(--ink); }
.button-primary:hover { background: var(--yellow-pressed); }
.button-secondary { background: #ecebe4; color: var(--ink); }
.button-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.button-full { width: 100%; }
.form-error { margin: 12px 0; color: var(--danger); font-weight: 750; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 15px 20px; border-radius: var(--radius-sm); background: var(--ink); color: white; box-shadow: 0 15px 40px rgba(0,0,0,.3); font-weight: 800; text-align: center; }
.admin-body { background: #eeede6; }
.admin-header { min-height: 88px; padding: 12px clamp(20px,4vw,52px); display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--ink); color: white; }
.brand-dark .brand-mark { width: 56px; height: 56px; border-color: var(--yellow); color: var(--yellow); }
.brand-dark .brand-note { color: rgba(255,255,255,.62); }
.admin-header-actions { display: flex; gap: 10px; }
.admin-main { width: min(1280px,100%); margin: 0 auto; padding: clamp(28px,4vw,52px); }
.login-panel { width: min(500px,100%); margin: 8dvh auto 0; padding: clamp(28px,5vw,46px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.login-panel h1 { font-size: clamp(36px,5vw,52px); }
.login-panel > p:not(.eyebrow) { color: var(--muted); }
.stack-form { margin-top: 28px; }
.stack-form label, .field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
input, textarea, select { width: 100%; min-height: 50px; border: 1px solid #bcbcb3; border-radius: var(--radius-sm); background: white; color: var(--ink); padding: 11px 13px; font-size: 16px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(253,235,25,.65); border-color: var(--ink); }
.stack-form .button { margin-top: 16px; }
.admin-title { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.admin-title h1 { margin-bottom: 8px; }
.save-state { color: var(--success); font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.admin-card { padding: 26px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 20px rgba(17,18,15,.06); }
.guests-card { grid-row: span 2; }
.card-heading { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-heading .eyebrow { margin-bottom: 3px; }
.card-heading h2 { margin: 0; }
.status-chip { padding: 8px 11px; border-radius: 999px; background: #ecebe4; color: var(--muted); font-size: 12px; font-weight: 850; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field small, .helper { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.result-inputs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 14px; }
.result-inputs > span { padding-bottom: 11px; font-size: 28px; font-weight: 900; }
.result-inputs input { text-align: center; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.leaderboard { margin-top: 18px; }
.leader-row { min-height: 48px; display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 10px; border-top: 1px solid var(--border); }
.leader-row:first-child { border-top: 0; }
.leader-row strong:last-child { min-width: 64px; text-align: right; }
.winner-row { margin: 0 -10px; padding: 0 10px; border-radius: 10px; background: var(--success-soft); }
.empty-note { color: var(--muted); }
.admin-savebar { grid-column: 1/-1; padding: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 20px; border-radius: var(--radius); background: var(--ink); }
.admin-savebar .form-error { margin: 0 auto 0 0; color: #ffb4ab; }
.admin-savebar .button { min-width: 220px; }
@media (max-width: 980px) {
  .match-header { grid-template-columns: 1fr auto; }
  .fixture { grid-column: 1/-1; grid-row: 2; }
  .guest-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
  .guests-card { grid-row: auto; }
  .admin-savebar { grid-column: auto; }
}
@media (max-width: 720px) {
  .match-header { padding: 14px 18px; }
  .brand-mark { width: 52px; height: 52px; }
  .brand-note { display: none; }
  .admin-link { width: 52px; padding: 0; justify-content: center; }
  .admin-link span { display: none; }
  .fixture { gap: 10px; }
  .kickoff { min-width: 105px; padding: 9px 10px; }
  .kickoff span { font-size: 20px; }
  .guest-main { padding: 26px 18px; }
  .page-heading { align-items: flex-start; }
  .guest-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .guest-button { min-height: 100px; padding: 14px; }
  .guest-avatar { width: 46px; height: 46px; }
  .kiosk-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .admin-main { padding: 28px 18px; }
  .admin-title { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-savebar { align-items: stretch; flex-direction: column; }
  .admin-savebar .button { width: 100%; }
}
@media (max-width: 460px) {
  .brand-name { font-size: 14px; }
  .fixture > strong { font-size: 12px; }
  .page-heading { display: block; }
  .submission-counter { margin-top: 18px; text-align: left; }
  .guest-grid { grid-template-columns: 1fr; }
  .dialog-actions { grid-template-columns: 1fr; }
  .button-primary { order: -1; }
  .admin-header .brand-name { font-size: 13px; }
  .admin-header-actions .button { min-height: 46px; padding: 0 11px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
