/* Run & Rave — Volkswagen Bouderka */
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-italic.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kufi'; src: url('../fonts/kufi.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #001e50;
  --deep: #00113a;
  --lime: #d9f600;
  --cyan: #00b0f0;
  --ice: #eef4fa;
  --paper: #f4efe4;
  --ink: #0e1b33;
  --muted: #5b6b84;
  --line: #d5dfeb;
  --ok: #19c37d;
  --warn: #ffb020;
  --bad: #ff4d5e;
  --radius: 14px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--ice); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ar { font-family: 'Kufi', var(--font); direction: rtl; }

/* ---------- Display type ---------- */
.display {
  font-style: italic; font-stretch: 125%; font-weight: 900;
  line-height: .86; letter-spacing: -.035em; margin: 0;
}
.slash { display: block; width: 7.5em; max-width: 70%; height: .14em; margin-top: .12em; background: var(--lime); transform: skewX(-28deg); transform-origin: left; }
h2.title { font-stretch: 112%; font-weight: 850; font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -.025em; margin: 0 0 20px; color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--navy); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--bg); color: var(--fg); font: inherit; font-weight: 800; font-stretch: 110%; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-lime { --bg: var(--lime); --fg: var(--navy); }
.btn-ghost { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 2px currentColor; }
.btn-danger { --bg: var(--bad); --fg: #fff; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(18px, 4vw, 56px); color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-stretch: 110%; line-height: 1.1; }
.brand small { display: block; font-weight: 500; font-stretch: 100%; opacity: .75; font-size: 13px; }
.vw-mark { width: 40px; height: 40px; flex: none; }
.topbar nav { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 600; }
.topbar nav a:not(.btn) { text-decoration: none; opacity: .85; }
.topbar nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero / 3D ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; max-height: 1100px; background: radial-gradient(ellipse at 60% 70%, #0a2a72, var(--deep) 60%); color: #fff; overflow: hidden; }
.scene { position: absolute; inset: 0; }
.scene canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; cursor: pointer; }
.scene.is-ready canvas { opacity: 1; }
.scene.no-webgl { background: url('../img/poster.jpg') center/cover; }
.scene-labels { position: absolute; inset: 0; pointer-events: none; }
.scene-label {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  font: inherit; font-size: 13px; font-weight: 700; font-stretch: 110%; color: #fff;
  background: rgba(0, 17, 58, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  transition: background .2s, color .2s, opacity .3s; white-space: nowrap;
}
.scene-label:hover, .scene-label.is-active { background: var(--lime); color: var(--navy); border-color: var(--lime); }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,17,58,.82) 0%, rgba(0,17,58,.35) 38%, transparent 60%), linear-gradient(0deg, rgba(0,17,58,.9), transparent 38%); }
.hero-copy { position: absolute; left: clamp(18px, 5vw, 72px); bottom: clamp(28px, 7vh, 80px); right: 18px; max-width: 760px; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero h1 { font-size: clamp(64px, 12.5vw, 188px); }
.hero h1 .amp { color: transparent; -webkit-text-stroke: 3px #fff; }
.hero-lede { font-size: clamp(17px, 1.6vw, 21px); max-width: 30em; margin: 26px 0 26px; color: #dfe9f7; }
.hero-lede strong { color: #fff; }
.hero-row { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; }
.mini-count { display: flex; gap: 14px; font-variant-numeric: tabular-nums; }
.mini-count span { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.mini-count b { font-size: 26px; font-weight: 800; font-stretch: 115%; line-height: 1; }
.mini-count i { font-style: normal; font-size: 12px; opacity: .7; margin-top: 4px; }
.hero-hint { position: absolute; right: clamp(18px, 4vw, 56px); bottom: clamp(28px, 7vh, 80px); font-size: 13px; color: #b9cbe6; max-width: 15em; text-align: right; }

/* ---------- Sections ---------- */
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 10vw, 130px) 0; }
.intro-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.intro-grid p { font-size: 19px; color: #33435e; max-width: 34em; margin: 0; }
.facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--navy); }
.facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.facts dt { font-stretch: 120%; font-weight: 900; font-style: italic; font-size: 30px; color: var(--navy); line-height: 1; }
.facts dd { margin: 0; color: var(--muted); }

.poster { background: var(--navy); }
.poster figure { margin: 0; }
.poster img { width: 100%; height: auto; }
.poster figcaption { color: #b9cbe6; font-size: 14px; padding: 14px clamp(18px, 4vw, 56px); }

.programme { background: #fff; }
.prog-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); }
.pickup { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 28px; margin-top: 28px; }
.pickup .date { font-stretch: 125%; font-weight: 900; font-style: italic; font-size: 54px; line-height: .9; color: var(--lime); }
.pickup p { margin: 12px 0 0; color: #d7e3f4; }
.pickup strong { color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--navy); }
.timeline li { position: relative; padding: 0 0 30px 30px; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--navy); }
.timeline li.key::before { background: var(--lime); }
.timeline time { display: block; font-weight: 800; font-stretch: 115%; color: #0076b9; font-size: 18px; font-variant-numeric: tabular-nums; }
.timeline strong { display: block; font-size: 19px; color: var(--navy); margin-top: 2px; }
.timeline small { color: var(--muted); font-size: 15px; }
.note { font-size: 14px; color: var(--muted); }

/* ---------- Registration ---------- */
.register { background: var(--deep); color: #fff; position: relative; overflow: hidden; }
.register::before { content: ''; position: absolute; inset: auto -10% -40% 40%; height: 80%; background: radial-gradient(closest-side, rgba(0,176,240,.25), transparent); pointer-events: none; }
.reg-grid { position: relative; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.reg-aside { position: sticky; top: 32px; }
.register h2.title { color: #fff; }
.reg-aside p { color: #c8d6ea; }
.big-count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 30px 0; font-variant-numeric: tabular-nums; }
.big-count div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 16px 6px; text-align: center; }
.big-count b { display: block; font-size: clamp(30px, 3.4vw, 44px); font-weight: 900; font-stretch: 120%; font-style: italic; color: var(--lime); line-height: 1; }
.big-count span { font-size: 12px; color: #aebfd9; }
.insta { display: inline-flex; gap: 8px; align-items: center; color: #fff; font-weight: 700; }

.card { background: #fff; color: var(--ink); border-radius: 20px; padding: clamp(22px, 4vw, 48px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.step { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 22px; font-weight: 800; font-stretch: 110%; color: var(--navy); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: 16px; font-style: italic; }
.step + .step, fieldset + .step { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .legend { font-weight: 700; font-size: 15px; color: var(--navy); }
.req { color: #0076b9; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=search], input[type=password], select {
  font: inherit; font-size: 16px; width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid #c3cfdf; border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0,176,240,.2); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); }
.err { color: #d21f3c; font-size: 14px; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg { display: inline-flex; background: var(--ice); border-radius: 999px; padding: 4px; gap: 4px; margin-top: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 26px; border-radius: 999px; font-weight: 700; color: var(--muted); transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.reveal-box { margin-top: 18px; padding: 18px; border-radius: 12px; background: var(--ice); }
.checks { margin-top: 30px; display: grid; gap: 14px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 15px; color: #33435e; align-items: start; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { margin-top: 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); }
.alert { border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; font-weight: 600; }
.alert-bad { background: #ffe8eb; color: #9b1028; }
.alert-ok { background: #e3fbef; color: #0b6b43; }
.closed { text-align: center; padding: clamp(30px, 6vw, 64px) 10px; }
.closed h3 { font-size: 30px; font-stretch: 115%; color: var(--navy); margin: 0 0 10px; }

.site-foot { background: #000c2b; color: #a8b8d2; padding: 40px 0; font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: #fff; }

/* ---------- Ticket page ---------- */
.ticket-page { min-height: 100svh; background: radial-gradient(ellipse at 50% 0%, #0a3a9a 0%, var(--deep) 55%); color: #fff; padding: 28px 0 60px; }
.ticket-page .topbar { position: static; padding-top: 0; }
.welcome { text-align: center; margin: 30px auto 36px; max-width: 760px; }
.welcome .ar { font-size: clamp(36px, 7vw, 64px); font-weight: 800; color: var(--lime); line-height: 1.35; margin: 0; }
.welcome h1 { font-size: clamp(40px, 7vw, 84px); margin-top: 4px; }
.welcome p { color: #cfdcf0; font-size: 18px; margin: 18px auto 0; max-width: 36em; }
.ticket {
  width: min(880px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 300px;
  background: var(--paper); color: var(--ink); border-radius: 22px; overflow: hidden; position: relative;
  box-shadow: 0 40px 90px rgba(0,0,0,.45);
  animation: ticketIn .9s cubic-bezier(.2,.8,.2,1) both .15s;
}
@keyframes ticketIn { from { transform: translateY(40px) rotate(-1.5deg); opacity: 0; } }
.t-main { padding: 30px 34px; position: relative; }
.t-main::after { content: ''; position: absolute; right: -1px; top: 18px; bottom: 18px; border-right: 2px dashed #c9bfa8; }
.t-band { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-band .display { font-size: 44px; color: var(--navy); }
.t-band .display span { color: #8aa600; }
.t-tag { background: var(--navy); color: var(--lime); font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: 13px; white-space: nowrap; }
.t-name { font-size: clamp(26px, 3.4vw, 36px); font-weight: 850; font-stretch: 110%; line-height: 1.05; margin: 26px 0 4px; color: var(--navy); overflow-wrap: anywhere; }
.t-sub { color: #6b6250; margin: 0; }
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.t-grid dt { font-size: 12px; color: #7d7360; }
.t-grid dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
.t-stub { padding: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; background: #fff; }
.t-stub img { width: 220px; height: 220px; image-rendering: pixelated; }
.t-code { font-size: 22px; font-weight: 900; font-stretch: 120%; letter-spacing: .04em; color: var(--navy); }
.t-stub small { color: var(--muted); font-size: 13px; }
.ticket::before, .ticket::after { content: ''; position: absolute; right: 288px; width: 26px; height: 26px; border-radius: 50%; background: var(--deep); }
.ticket::before { top: -13px; } .ticket::after { bottom: -13px; }
.ticket-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.ticket-help { text-align: center; color: #b9cbe6; font-size: 15px; margin-top: 20px; }

/* Find ticket / small pages */
.narrow { width: min(520px, 100% - 40px); margin: 40px auto; }
.narrow .card { box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.narrow h1 { font-size: 34px; font-stretch: 112%; color: var(--navy); margin: 0 0 8px; line-height: 1.05; }
.stack { display: grid; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .intro-grid, .prog-grid, .reg-grid { grid-template-columns: 1fr; }
  .reg-aside { position: static; }
  .ticket { grid-template-columns: 1fr; }
  .t-main::after { right: 18px; left: 18px; top: auto; bottom: 0; border-right: 0; border-bottom: 2px dashed #c9bfa8; }
  .ticket::before, .ticket::after { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar nav a:not(.btn) { display: none; }
  .brand small { display: none; }
  .hero-shade { background: linear-gradient(0deg, rgba(0,17,58,.95) 8%, rgba(0,17,58,.2) 55%, transparent 75%); }
  .hero-hint { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .t-grid { grid-template-columns: 1fr 1fr; }
  .t-band .display { font-size: 34px; }
  .t-main { padding: 24px; }
  .scene-label { font-size: 11px; padding: 4px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticket { animation: none; }
  .scene canvas { transition: none; }
}

/* =========================================================
   Admin
   ========================================================= */
.admin { background: #f3f6fb; min-height: 100svh; }
.admin-top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.admin-top nav { display: flex; gap: 6px; align-items: center; }
.admin-top nav a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.admin-top nav a[aria-current=page] { background: rgba(255,255,255,.14); }
.admin-top form { margin: 0; }
.admin-top .linkish { background: none; border: 0; color: #b9cbe6; font: inherit; font-size: 14px; cursor: pointer; padding: 8px; }
.admin main { padding: 28px 0 60px; }
.admin h1 { font-size: 30px; font-stretch: 112%; margin: 0 0 18px; color: var(--navy); }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 14px; padding: 16px 18px; border: 1px solid #e3e9f2; }
.stat b { display: block; font-size: 32px; font-weight: 900; font-stretch: 115%; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.stat.lead { background: var(--navy); border-color: var(--navy); }
.stat.lead b { color: var(--lime); } .stat.lead span { color: #b9cbe6; }
.controls { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-bottom: 18px; }
.panel { background: #fff; border-radius: 14px; padding: 18px; border: 1px solid #e3e9f2; }
.panel h2 { font-size: 17px; margin: 0 0 4px; color: var(--navy); }
.panel p { margin: 0; color: var(--muted); font-size: 14px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.pill-ok { background: #e3fbef; color: #0b8a55; } .pill-bad { background: #ffe8eb; color: #c4142f; } .pill-warn { background: #fff4dc; color: #a56a00; }
.inline-form { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.inline-form input { max-width: 140px; min-height: 42px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar form { display: flex; gap: 8px; flex: 1 1 320px; }
.toolbar input[type=search] { min-height: 44px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { text-decoration: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #dbe3ee; font-size: 14px; font-weight: 600; color: var(--ink); }
.chip[aria-current=true] { background: var(--navy); color: #fff; border-color: var(--navy); }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #e3e9f2; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #edf1f6; font-size: 15px; vertical-align: middle; }
.table th { font-size: 13px; color: var(--muted); font-weight: 700; background: #fafcfe; }
.table tr:last-child td { border-bottom: 0; }
.table .code { font-weight: 800; font-stretch: 112%; color: var(--navy); white-space: nowrap; }
.table .who a { font-weight: 700; text-decoration: none; color: var(--ink); }
.table .who small { display: block; color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.empty { text-align: center; padding: 48px 10px; color: var(--muted); background: #fff; border-radius: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.pager .btns { display: flex; gap: 8px; }
.detail { display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid #edf1f6; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { font-weight: 600; }
.qr-box { text-align: center; }
.qr-box img { margin: 0 auto 10px; width: 200px; height: 200px; image-rendering: pixelated; }
.login-page { min-height: 100svh; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 0%, #0a3a9a, var(--deep) 60%); padding: 20px; }
.login-page .card { width: min(420px, 100%); }
.login-page h1 { font-size: 28px; color: var(--navy); margin: 0 0 4px; font-stretch: 112%; }

/* Scanner */
.scan-page { background: #000a20; color: #fff; min-height: 100svh; }
.scan-page main { padding: 16px 0 40px; }
.scanner { width: min(560px, 100% - 24px); margin: 0 auto; }
.reader-wrap { position: relative; border-radius: 22px; overflow: hidden; background: #071534; aspect-ratio: 1; display: grid; place-items: center; }
#reader { width: 100%; }
#reader video { width: 100% !important; height: auto !important; object-fit: cover; }
.reader-wrap .btn { position: absolute; }
.scan-opts { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.switch { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--lime); }
.manual { display: flex; gap: 8px; }
.manual input { min-height: 46px; text-transform: uppercase; }
.result { position: fixed; inset: auto 0 0 0; z-index: 50; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; color: #fff; box-shadow: 0 -20px 60px rgba(0,0,0,.5); animation: sheetUp .28s cubic-bezier(.2,.8,.2,1); max-width: 640px; margin: 0 auto; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.result[data-status=valid] { background: #0c8a55; }
.result[data-status=checked] { background: #0c8a55; }
.result[data-status=already] { background: #c27400; }
.result[data-status=invalid] { background: #c4142f; }
.scan-status { margin: 0; font-weight: 900; font-stretch: 120%; font-style: italic; font-size: 34px; line-height: 1; }
.scan-name { margin: 12px 0 0; font-size: 26px; line-height: 1.1; }
.scan-code { margin: 4px 0 0; opacity: .85; font-weight: 700; letter-spacing: .04em; }
.scan-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 16px 0 0; }
.scan-meta dt { font-size: 12px; opacity: .8; } .scan-meta dd { margin: 0; font-weight: 700; }
.scan-msg { margin: 14px 0 0; font-weight: 600; }
.scan-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.scan-actions .btn { flex: 1 1 160px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat.lead { grid-column: 1 / -1; }
  .controls, .detail { grid-template-columns: 1fr; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid #edf1f6; padding: 10px 0; }
  .table td { border: 0; padding: 4px 14px; }
  .row-actions { justify-content: flex-start; margin-top: 6px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border: 0; padding-bottom: 0; }
}
.check .err { grid-column: 2; }
html, body { overflow-x: clip; }

/* ---------- Hero v2: living poster ---------- */
.hero2 { background: var(--navy); color: #fff; }
.topbar2 { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(18px, 4vw, 56px); min-height: 68px; }
.topbar2 nav { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 600; }
.topbar2 nav a:not(.btn) { text-decoration: none; opacity: .85; }
.topbar2 nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.hero-media { position: relative; height: min(calc(100vw / 2.219), calc(100svh - 68px - 96px)); min-height: 420px; overflow: hidden; background: #2a5fb0; }
.hero-live, .hero-live img, .hero-live canvas, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-live img { object-position: 50% 50%; }
.hero-live canvas { opacity: 0; transition: opacity .8s ease; }
.hero-live.is-ready canvas { opacity: 1; }
.hero-strip { background: var(--navy); border-top: 4px solid var(--lime); }
.hero-strip-in { display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 18px 0; flex-wrap: wrap; }
.hs-text { flex: 1 1 320px; }
.hs-date { margin: 0; font-weight: 900; font-style: italic; font-stretch: 120%; font-size: 24px; line-height: 1.1; color: var(--lime); }
.hs-lede { margin: 4px 0 0; color: #cfdcf0; font-size: 15px; }
@media (max-width: 760px) {
  .topbar2 nav a:not(.btn) { display: none; }
  .hero-media { height: 58svh; min-height: 340px; }
  .hero-live img { object-position: 56% 50%; }
  .hero-strip-in { flex-direction: column; align-items: stretch; text-align: left; }
  .hero-strip-in .btn { width: 100%; }
  .mini-count { justify-content: space-between; }
}
.hero-mtitle { display: none; }
@media (max-width: 760px) {
  .hs-text { flex: none; }
  .hero-media::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 46%; background: linear-gradient(180deg, var(--navy) 0%, rgba(0,30,80,.85) 45%, transparent 100%); pointer-events: none; }
  .hero-mtitle { display: block; position: absolute; z-index: 2; left: 20px; top: 14px; margin: 0; font-size: clamp(36px, 11vw, 48px); color: #fff; }
  .hero-mtitle .slash { width: 4.2em; }
}


/* ---------- Finish-line intro (after registration) ---------- */
.finish { position: fixed; inset: 0; z-index: 1000; background: var(--deep); transition: opacity .45s ease, transform .45s ease; }
.finish canvas { display: block; width: 100%; height: 100%; }
.finish.is-leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }
.finish-skip { position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.finish-skip:hover { background: rgba(255,255,255,.22); }
body.intro-playing { overflow: hidden; }
body.intro-playing .ticket, body.intro-playing .welcome, body.intro-playing .ticket-actions { opacity: 0; }
body.intro-done .ticket { animation: ticketIn .9s cubic-bezier(.2,.8,.2,1) both .35s; }
body.intro-done .welcome { animation: fadeUp .6s ease both .3s; }
body.intro-done .ticket-actions { animation: fadeUp .6s ease both .7s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Hero: static official artwork (desktop) / event photo (mobile) ---------- */
.hero-media picture, .hero-media .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media .hero-img { object-fit: cover; object-position: 50% 50%; }
@media (max-width: 760px) {
  .hero-media { height: 74svh; min-height: 460px; }
  .hero-media .hero-img { object-position: 50% 38%; }
  .hero-media::after { inset: auto 0 0 0; height: 42%; background: linear-gradient(0deg, var(--navy) 0%, rgba(0,30,80,.75) 45%, transparent 100%); }
  .hero-mtitle { top: auto; bottom: 18px; font-size: clamp(42px, 13vw, 60px); }
}

.facts dt .fact-n { display: block; font-size: 14px; font-style: normal; font-stretch: 100%; font-weight: 800; color: #0076b9; margin-bottom: 6px; }
.facts dd strong { color: var(--navy); }
@media (min-width: 761px) { .poster { display: none; } }
