@font-face {
  font-family: 'Anton';
  src: url('/fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #07080c;
  --panel: #10121a;
  --panel-2: #161925;
  --line: #262a38;
  --ink: #f4efe6;
  --muted: #9aa0ad;
  --fire: #ff6a1a;
  --fire-2: #ffb347;
  --red: #e0261b;
  --gold: #ffd27a;
  --green: #4ade80;
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 3rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fire-2); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.02em; line-height: 1.02; margin: 0; }
[hidden] { display: none !important; }

/* ---------- banners ---------- */
.test-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
  text-align: center;
  color: #111;
  background: repeating-linear-gradient(-45deg, #ffd400 0 14px, #ffe45c 14px 28px);
}

/* ---------- the screen: video on top, fuse scene below ---------- */
.screen {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 1fr;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  max-height: 1100px;
  overflow: hidden;
  background: #000;
}
.is-test .screen { height: calc(100svh - 2.4rem); }
.video-wrap, .scene-wrap { position: relative; overflow: hidden; min-height: 0; }
.video-wrap { background: radial-gradient(120% 90% at 30% 20%, #3a2a4a 0%, #120f1c 55%, #07080c 100%); }
#loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.no-video #loop { display: none; }
.video-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.92) 0%, rgba(7, 8, 12, 0.35) 38%, rgba(7, 8, 12, 0) 62%, rgba(7, 8, 12, 0.5) 100%);
  pointer-events: none;
}
.tag-sponsored {
  position: absolute;
  bottom: 0.6rem;
  right: 0.7rem;
  margin: 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  background: rgba(255, 210, 122, 0.92);
  border-radius: 3px;
}
.title-block { position: absolute; left: 0; right: 0; top: 0; padding: 1rem 1.1rem 0; }
.kicker { margin: 0 0 0.25rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fire-2); }
.title-block h1 {
  font-size: clamp(3rem, 15vw, 4.6rem);
  letter-spacing: 0.04em;
  text-shadow: 0 0 24px rgba(255, 106, 26, 0.45), 0 2px 0 #000;
}
.logline { margin: 0.35rem 0 0; max-width: 30rem; font-size: 0.95rem; color: #e6dfd3; text-shadow: 0 1px 8px #000; }

.scene-wrap { background: linear-gradient(180deg, #0d0f1d, #1d1830 60%, #2a1c22); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.no-webgl .scene-wrap::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 52%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6b5a3a 0 60%, var(--fire-2) 60% 61%, transparent 61%);
  box-shadow: 0 0 18px var(--fire);
}
.hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.7rem 1.1rem calc(0.9rem + env(safe-area-inset-bottom));
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.85) 0%, rgba(7, 8, 12, 0) 24%, rgba(7, 8, 12, 0) 58%, rgba(7, 8, 12, 0.92) 100%);
}
.hud a, .hud button { pointer-events: auto; }
.raised { margin: 0; font-size: 0.9rem; color: #e6dfd3; }
.raised b { font-family: var(--display); font-weight: 400; font-size: 1.55rem; letter-spacing: 0.02em; color: var(--ink); }
.raised b:first-child { color: var(--gold); }
.nowrap { white-space: nowrap; }
progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 0.35rem 0 0.3rem;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #2a2420;
  appearance: none;
}
progress::-webkit-progress-bar { background: #2a2420; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--gold), var(--fire)); box-shadow: 0 0 12px var(--fire); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--gold), var(--fire)); }
.fuse-meta { margin: 0; font-size: 0.78rem; line-height: 1.4; color: #c9c2b6; text-shadow: 0 1px 6px #000; }
.fuse-meta b { font-family: var(--display); font-weight: 400; font-size: 1rem; color: var(--fire-2); font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }

.next-seat p { margin: 0; }
.ns-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.55rem; }
.ns-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--fire-2); text-shadow: 0 1px 6px #000; }
.ns-label b { color: var(--ink); }
.ns-price { font-family: var(--display); font-size: 3.1rem; line-height: 0.95; text-shadow: 0 0 22px rgba(255, 106, 26, 0.5); }
.ns-closed { font-size: 2.1rem; }
.ns-after { font-size: 0.78rem; line-height: 1.35; color: #d7d0c4; text-align: right; text-shadow: 0 1px 6px #000; }
.ns-after b { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border: 0;
  border-radius: 10px;
  font: 400 1.15rem/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a0d05;
  background: linear-gradient(180deg, var(--fire-2), var(--fire));
  box-shadow: 0 6px 24px rgba(255, 106, 26, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-buy { width: 100%; font-size: 1.3rem; min-height: 54px; }
.btn-wide { width: 100%; }
.btn-small { min-height: 42px; font-size: 1rem; }
.btn-wire { color: #fff; background: linear-gradient(180deg, #ff4a3a, #b3140d); box-shadow: 0 6px 24px rgba(224, 38, 27, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

/* ---------- content ---------- */
.content { padding: 0 1.1rem 2rem; }
.block { padding: 2.6rem 0 0.4rem; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block h2 { font-size: 2.3rem; text-transform: uppercase; margin-bottom: 0.6rem; }
.block h3 { font-size: 1.35rem; text-transform: uppercase; margin: 1.6rem 0 0.6rem; }
.lede { margin: 0 0 1.2rem; color: #d7d0c4; }
.lede b { color: var(--ink); }
.fine { font-size: 0.8rem; color: var(--muted); }

/* the train */
.cars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.car {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 104px;
  padding: 0.5rem 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #1a1d29, #12141c);
}
.car::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -5px;
  height: 10px;
  background: radial-gradient(circle at 10% 50%, #2c303d 4px, transparent 5px), radial-gradient(circle at 90% 50%, #2c303d 4px, transparent 5px);
}
.car-no { font: 400 0.95rem/1 var(--display); letter-spacing: 0.06em; color: var(--muted); }
.car-price { font: 400 1.35rem/1 var(--display); color: #8b8f9b; }
.car.future { opacity: 0.62; }
.car.closed { opacity: 0.4; }
.car.next { border-color: var(--fire); box-shadow: 0 0 0 1px var(--fire), 0 0 22px rgba(255, 106, 26, 0.35); animation: pulse 1.6s ease-in-out infinite; }
.car.next .car-price { color: var(--ink); }
.car-cta {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font: 400 0.85rem/1.2 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a0d05;
  background: var(--fire-2);
}
.car.sold { border-color: rgba(255, 210, 122, 0.65); background: linear-gradient(180deg, #2a2216, #17140f); box-shadow: 0 0 18px rgba(255, 210, 122, 0.12); }
.car.sold .car-no { color: var(--gold); }
.car.refunded { border-style: dashed; border-color: var(--line); background: #101219; box-shadow: none; }
.car-empty { font-size: 0.75rem; color: var(--muted); }
.face { display: flex; align-items: center; gap: 0.4rem; min-width: 0; color: var(--ink); text-decoration: none; }
.face img { width: 30px; height: 30px; object-fit: contain; border-radius: 5px; background: #fff; padding: 2px; flex: none; }
.face-name { font-weight: 700; font-size: 0.85rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
a.face:hover .face-name { text-decoration: underline; }
.face-anon { font-weight: 700; color: var(--gold); }
.label-sponsored {
  align-self: flex-start;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
  background: var(--gold);
}
.bomb-end { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--muted); }
.dynamite {
  width: 46px;
  height: 22px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--red) 0 13px, #7a0f0a 13px 15px);
  box-shadow: 0 0 14px rgba(224, 38, 27, 0.5);
}

/* red wire */
.wire-dot { display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.35em; border-radius: 50%; background: var(--red); box-shadow: 0 0 14px var(--red); vertical-align: 0.12em; }
.rw {
  position: relative;
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem;
  border: 1px solid rgba(224, 38, 27, 0.55);
  border-radius: 14px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(224, 38, 27, 0.18), transparent 60%), var(--panel);
}
.rw::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
}
.rw p { margin: 0; }
.rw-holder { display: grid; gap: 0.4rem; }
.rw-holder .face img { width: 44px; height: 44px; }
.rw-holder .face-name { font-size: 1.1rem; }
.rw-bid { font: 400 2.2rem/1 var(--display); }
.rw-bid small { display: block; margin-top: 0.3rem; font: 600 0.78rem/1.3 var(--body); color: var(--muted); }
.rw-empty { color: #d7d0c4; }
.rw-meta { font-size: 0.8rem; color: var(--muted); }
.rw-clock { margin: 0.9rem 0 0.2rem; }
.rw-clock b { font: 400 1.2rem/1 var(--display); color: var(--fire-2); font-variant-numeric: tabular-nums; }
.rw-clock small { display: block; color: var(--muted); font-size: 0.75rem; }

/* one-offs */
.slots { display: grid; gap: 0.9rem; }
.slot { padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.slot header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.slot h3 { margin: 0; font-size: 1.6rem; }
.slot-price { margin: 0; font: 400 1.6rem/1 var(--display); color: var(--gold); }
.slot p { margin: 0.5rem 0; color: #d7d0c4; }
.slot ul { margin: 0.3rem 0 0.9rem; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }
.slot-state { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.slot-state.available { color: var(--green); }
.slot.is-sold { border-color: rgba(255, 210, 122, 0.55); }
.slot.is-sold .slot-state { color: var(--gold); }

/* feed */
.feed { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.4rem; }
.feed li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--panel); font-size: 0.92rem; }
.feed li svg { width: 20px; height: 20px; fill: var(--fire-2); }
.feed time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.feed .feed-empty { display: block; color: var(--muted); }
.pax-count { margin: 0.4rem 0; color: #d7d0c4; }
.pax-names { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1rem; padding: 0; }
.pax-names li { padding: 0.2rem 0.55rem; border-radius: 99px; background: var(--panel-2); font-size: 0.8rem; }

/* buy form */
.buy form { display: grid; gap: 1rem; }
.opts { margin: 0; padding: 0; border: 0; }
.opts legend { margin-bottom: 0.5rem; font-weight: 700; }
.opts > div { display: grid; gap: 0.5rem; }
.opt {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.7rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
}
.opt input { grid-row: span 2; align-self: center; width: 20px; height: 20px; accent-color: var(--fire); }
.opt-title { font-size: 1rem; }
.opt-title b { color: var(--gold); }
.opt-detail { font-size: 0.8rem; color: var(--muted); }
.opt:has(input:checked) { border-color: var(--fire); box-shadow: 0 0 0 1px var(--fire); background: linear-gradient(180deg, #221812, var(--panel)); }
.opt.is-off { opacity: 0.45; cursor: not-allowed; }
.fields { display: grid; gap: 0.85rem; }
.fields label { display: grid; gap: 0.3rem; }
.fields label > span { font-weight: 700; font-size: 0.9rem; }
.fields em { font-style: normal; font-weight: 400; color: var(--muted); }
input, textarea {
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 16px/1.4 var(--body);
  color: var(--ink);
  background: #0c0e15;
}
input[type='file'] { padding: 0.6rem; }
textarea { resize: vertical; }
.logo-pick { display: grid; gap: 0.6rem; padding: 0.8rem; border: 1px dashed var(--line); border-radius: 12px; }
.fields .check { display: flex; align-items: flex-start; gap: 0.6rem; }
.check input { width: 20px; height: 20px; margin-top: 0.1rem; flex: none; accent-color: var(--fire); }
.check span { font-weight: 400 !important; }
.pay-line { margin: 0; font-weight: 700; color: var(--gold); }
.form-msg { margin: 0; padding: 0.7rem 0.85rem; border-radius: 10px; background: rgba(224, 38, 27, 0.15); border: 1px solid rgba(224, 38, 27, 0.5); }
.form-msg[data-kind='warn'] { background: rgba(255, 179, 71, 0.12); border-color: rgba(255, 179, 71, 0.6); }

/* rules */
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.rules li { position: relative; padding-left: 1.4rem; color: #d7d0c4; }
.rules li::before { content: ''; position: absolute; left: 0.1rem; top: 0.55em; width: 0.6rem; height: 0.6rem; border-radius: 2px; background: var(--fire); }
.rules b { color: var(--ink); }
.table-wrap { overflow-x: auto; }
.ladder { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.ladder th, .ladder td { padding: 0.32rem 0.5rem; text-align: right; border-bottom: 1px solid var(--line); }
.ladder th:last-child, .ladder td:last-child { text-align: left; color: var(--muted); font-size: 0.78rem; }
.ladder th { font-weight: 700; color: var(--muted); }
.ladder tr.is-sold td { color: var(--gold); }
.ladder tr.is-next td { color: var(--ink); background: rgba(255, 106, 26, 0.12); font-weight: 700; }
.addons { padding-left: 1.1rem; color: #d7d0c4; }
.addons li { margin-bottom: 0.4rem; }

.what p { max-width: 38rem; font-size: 1.05rem; color: #e2dbcf; }
.sig { font: 400 1.8rem/1 var(--display); color: var(--fire-2) !important; }

.foot { padding: 1.4rem 1.1rem 2.2rem; font-size: 0.78rem; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }

/* toasts */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 0.5rem; width: min(92vw, 420px); pointer-events: none; }
.toast { margin: 0; padding: 0.75rem 1rem; border-radius: 12px; font-weight: 700; color: #1a0d05; background: linear-gradient(180deg, var(--gold), var(--fire-2)); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: toast-in 0.3s ease-out; transition: opacity 0.6s, transform 0.6s; }
.toast.out { opacity: 0; transform: translateY(8px); }

.is-defused .raised b:first-child, .is-defused .ns-label { color: var(--green); }
.is-defused progress::-webkit-progress-value { background: var(--green); box-shadow: 0 0 12px var(--green); }

@keyframes pulse { 50% { box-shadow: 0 0 0 1px var(--fire), 0 0 34px rgba(255, 106, 26, 0.6); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  .car.next, .toast { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- wider screens: the vertical screen stays put, the story scrolls next to it ---------- */
@media (min-width: 560px) {
  .cars { grid-template-columns: repeat(5, 1fr); }
  .slots { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .page { display: grid; grid-template-columns: min(56.25vh, 540px) 1fr; align-items: start; }
  .screen { position: sticky; top: 0; height: 100vh; max-height: none; border-right: 1px solid var(--line); }
  .is-test .screen { top: 2rem; height: calc(100vh - 2rem); }
  .content { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 2.5rem 3rem; }
  .block h2 { font-size: 2.8rem; }
  .title-block h1 { font-size: 4.2rem; }
}

/* ---------- promo: full-screen scene for screen recording ---------- */
.promo .content, .promo .foot, .promo .toasts { display: none; }
.promo .page { display: block; }
.promo .screen { position: fixed; inset: 0; height: 100vh; max-height: none; min-height: 0; grid-template-rows: 0 1fr; border: 0; }
.promo .video-wrap { overflow: visible; z-index: 2; }
.promo #loop, .promo .video-shade, .promo .tag-sponsored { display: none; }
.promo .title-block { top: 8vh; text-align: center; }
.promo .logline { display: none; }
.promo .screen::before, .promo .screen::after { content: ''; position: absolute; left: 0; right: 0; height: 7vh; background: #000; z-index: 3; }
.promo .screen::before { top: 0; }
.promo .screen::after { bottom: 0; }
.promo .hud { padding-top: 22vh; padding-bottom: 9vh; background: linear-gradient(180deg, rgba(7, 8, 12, 0.6) 0%, rgba(7, 8, 12, 0) 40%, rgba(7, 8, 12, 0) 60%, rgba(7, 8, 12, 0.8) 100%); }
.promo .hud > * { width: min(100%, 560px); margin-inline: auto; }
.promo-clean .hud, .promo-clean .title-block { display: none; }

/* ---------- plain pages (thanks, errors) ---------- */
.plain { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; background: radial-gradient(100% 70% at 50% 0%, #2a1c2e, var(--bg)); }
.plain-card { width: min(100%, 560px); padding: 2rem 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.plain-card h1 { font-size: 2.6rem; text-transform: uppercase; margin-bottom: 0.8rem; }
.plain-card p { color: #d7d0c4; }
.plain-back { margin-top: 1.5rem; font-size: 0.9rem; }
