:root {
  --bg: #0d1726;
  --card: #15253a;
  --card-2: #1c3049;
  --line: #2a3f5a;
  --teal: #27d7c8;
  --blue: #3d8bff;
  --blue-2: #2a6fe0;
  --gold: #ffc83d;
  --text: #eef4ff;
  --muted: #8ea3bf;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 15% -10%, rgba(61, 139, 255, 0.18), transparent 70%),
    radial-gradient(700px 500px at 100% 20%, rgba(39, 215, 200, 0.10), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
h1, h2, h3, p { margin: 0; }

/* Header: sticky, not fixed */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 23, 38, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top__in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--gold); }
.brand small { margin-left: 2px; color: var(--teal); font-size: 12px; letter-spacing: 0.12em; }
.top__link {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.top__link { white-space: nowrap; }
.top__link:hover { border-color: var(--teal); }

/* Layout (index) */
.layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 20px;
}
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 1.1fr 1fr; gap: 28px; padding-top: 28px; }
  .col--side { position: sticky; top: 76px; }
}

/* Train scene */
.scene {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(26% 34% at 72% 30%, rgba(255, 214, 120, 0.85), rgba(255, 170, 80, 0) 70%),
    radial-gradient(1.5px 1.5px at 12% 14%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 8%, #fff, transparent),
    radial-gradient(1px 1px at 46% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 10%, #fff, transparent),
    radial-gradient(1px 1px at 60% 6%, #fff, transparent),
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    linear-gradient(180deg, #1b1446 0%, #4b2a7a 34%, #c4507c 62%, #f39a4a 82%, #f7c46a 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(13, 23, 38, 0.75));
  pointer-events: none;
}
.scene__poster,
.scene__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scene__poster { object-fit: cover; transition: opacity 0.4s; }
.scene.is-live .scene__poster { opacity: 0; }
.scene__power {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(13, 23, 38, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 599px) {
  .scene__power { left: 8px; bottom: 8px; gap: 8px; padding: 5px 9px; font-size: 10px; }
  .scene__power .power i { width: 12px; height: 6px; }
}
.power { display: flex; gap: 4px; }
.quiz__power {
  margin: -6px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.power i {
  width: 18px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s, box-shadow 0.3s;
}
.power i.is-on { background: var(--gold); box-shadow: 0 0 8px rgba(255, 200, 61, 0.8); }
.power i.is-max { background: #ff7a2f; box-shadow: 0 0 10px rgba(255, 122, 47, 0.9); }

/* Intro */
.intro h1 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}
.intro h1 span { color: var(--gold); }
.intro p { margin-top: 8px; color: var(--muted); font-size: 16px; }
@media (min-width: 900px) { .intro h1 { font-size: 40px; } }

/* Bonus banner (as in the reference) */
.bonus__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 14px 18px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #1d3a5c 0%, #172b44 55%, #12324a 100%);
  box-shadow: inset 0 0 0 1px rgba(63, 240, 222, 0.25);
}
.bonus__kicker {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bonus__big {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
}
.bonus__fs {
  margin-top: 2px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}
.bonus__gift { width: 118px; flex: 0 0 auto; }
@media (max-width: 380px) {
  .bonus__big { font-size: 22px; }
  .bonus__fs { font-size: 19px; }
  .bonus__gift { width: 92px; }
}

.cta {
  display: block;
  margin-top: 12px;
  padding: 17px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #4f9bff, var(--blue-2));
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(61, 139, 255, 0.35);
  transition: filter 0.15s, box-shadow 0.15s;
}
.cta:hover { filter: brightness(1.1); box-shadow: 0 10px 30px rgba(61, 139, 255, 0.55); }

/* Departure board (split-flap) */
.board {
  padding: 12px 14px 14px;
  border-radius: 16px;
  background: #0a0f18;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.board__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.board__live { display: flex; align-items: center; gap: 6px; color: #5df29a; }
.board__live i { width: 8px; height: 8px; border-radius: 50%; background: #5df29a; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.board__row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.board__label {
  flex: 0 0 72px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flap { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; color: #f4f7fb; font-family: "Courier New", Courier, monospace; font-weight: 700; }
.flap--gold { color: var(--gold); }
.flap__cell {
  position: relative;
  display: inline-block;
  width: 1.05em;
  padding: 3px 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #1d2a3d 0 49%, #0a0f18 49% 51%, #172233 51% 100%);
  font-size: clamp(13px, 3.6vw, 17px);
  line-height: 1.2;
  text-align: center;
}
.flap__cell--gap { background: none; width: 0.55em; }
.flap__cell.is-flipping { color: #8ea3bf; }
@media (max-width: 599px) {
  .board__row { flex-direction: column; align-items: flex-start; gap: 3px; padding: 5px 0; }
  .board__label { flex: none; }
  .flap { flex-wrap: nowrap; }
  .flap__cell { font-size: 14px; }
}

/* Boarding-pass quiz */
.ticket {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, #17304d 0%, var(--card) 38%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 76px;
  transition: background 0.6s, box-shadow 0.6s;
}
.ticket.is-golden {
  background: linear-gradient(180deg, #3a2c0c 0%, #1c2433 45%);
  box-shadow: inset 0 0 0 2px rgba(255, 200, 61, 0.6), 0 18px 50px rgba(255, 170, 40, 0.25);
}
.ticket__rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 20px;
  pointer-events: none;
  z-index: 3;
}
.ticket__rain img {
  position: absolute;
  top: -40px;
  width: 28px;
  height: 28px;
  animation: coinFall 2s ease-in forwards;
}
@keyframes coinFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(560px) rotate(540deg); opacity: 0; }
}

.ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 6px;
}
.ticket__kicker { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.ticket__title { font-size: 21px; font-weight: 900; font-style: italic; text-transform: uppercase; }
.ticket__pct {
  padding: 4px 10px;
  border-radius: 999px;
  background: #3b3fd8;
  font-size: 13px;
  font-weight: 800;
}
.is-golden .ticket__pct { background: var(--gold); color: #2b1a00; }

.route { position: relative; height: 66px; margin: 4px 34px 6px; }
.route__rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, #22354e 8px 12px);
}
.route__fill {
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.6s ease;
}
.route__loco {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  transform: translateX(-50%);
  transition: left 0.6s cubic-bezier(.45, .05, .3, 1.2);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}
.route__stop {
  position: absolute;
  top: 33px;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card-2);
  box-shadow: 0 0 0 3px var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: background 0.3s, color 0.3s;
}
.route__stop img { width: 18px; height: 17px; }
.route__stop.is-active { background: var(--blue); color: #fff; }
.route__stop.is-done { background: var(--teal); color: #08303a; }

/* Perforated tear line with side notches */
.ticket__tear { position: relative; height: 22px; }
.ticket__tear::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 10px;
  border-top: 2px dashed rgba(255, 255, 255, 0.16);
}
.ticket__tear::after {
  content: "";
  position: absolute;
  left: -11px;
  right: -11px;
  top: 0;
  height: 22px;
  background:
    radial-gradient(circle at 11px 11px, var(--bg) 10px, transparent 11px) left / 22px 22px no-repeat,
    radial-gradient(circle at 11px 11px, var(--bg) 10px, transparent 11px) right / 22px 22px no-repeat;
}

.ticket__body { padding: 4px 16px 6px; }
.ticket__power {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.step h3, .done h3 { font-size: 18px; text-align: center; }
.answers {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.answers--list { grid-template-columns: 1fr; }
.answers button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.answers:not(.answers--list) button { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 8px; text-align: center; }
.answers:not(.answers--list) button img { width: 64px; height: 64px; }
.answers button img { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; }
.answers button:hover { border-color: var(--teal); background: #22395a; }
.answers button:active { transform: scale(0.98); }
.answers button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.answers button.is-picked { border-color: var(--gold); background: #2c3a4f; }
.answers button.is-picked::after {
  content: "PUNCHED";
  position: absolute;
  right: 8px;
  top: 6px;
  padding: 2px 6px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  transform: rotate(-12deg);
  animation: stampIn 0.25s ease-out both;
}
@keyframes stampIn { from { opacity: 0; transform: rotate(-12deg) scale(2); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }
.step:not([hidden]) { animation: stepIn 0.35s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Bonus screen */
.done { text-align: center; animation: stepIn 0.35s ease-out; }
.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 2px auto 10px;
  padding: 8px 18px;
  border: 3px solid var(--gold);
  border-radius: 10px;
  color: var(--gold);
  text-transform: uppercase;
  transform: rotate(-6deg);
  animation: bigStamp 0.5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.stamp span { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; }
.stamp b { font-size: 24px; font-weight: 900; letter-spacing: 0.06em; }
@keyframes bigStamp { from { opacity: 0; transform: rotate(-6deg) scale(2.4); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.done__offer { margin-top: 10px; color: var(--gold); font-size: 22px; line-height: 1.2; font-weight: 900; text-transform: uppercase; }
.done__offer b { color: #fff; }
.done__note { margin-top: 8px; color: var(--muted); font-size: 14px; }
.done__btn {
  width: 100%;
  margin-top: 16px;
  padding: 17px 24px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffd96b, #f2a91d);
  color: #2b1a00;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0.55); } 50% { box-shadow: 0 0 0 10px rgba(255, 200, 61, 0); } }

/* Ticket stub: three holes get punched, one per answer */
.ticket__stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 18px 16px;
  border-top: 2px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ticket__holes { display: flex; gap: 10px; }
.ticket__holes i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.ticket__holes i.is-punched { border: 2px solid var(--gold); background: var(--bg); transform: scale(1.1); }

/* Features */
.features { display: grid; gap: 10px; }
.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(21, 37, 58, 0.7);
}
.feature img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: contain; }
.feature b { display: block; font-size: 15px; text-transform: uppercase; }
.feature span { color: var(--muted); font-size: 14px; }

/* Footer */
.bottom {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 20px 16px 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.bottom a { color: var(--muted); }

.page .cta { display: inline-block; margin-top: 8px; }
.page-icon { display: block; width: 72px; margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) {
  .step:not([hidden]), .done, .stamp, .done__btn, .board__live i, .answers button.is-picked::after { animation: none; }
  .ticket__rain { display: none; }
}

/* Надпись о возрасте — одинаковая на всех страницах. Не меняй. */
.age-notice { position: relative; z-index: 1000; margin: 0; padding: 8px 16px 9px; background: #111; color: #e8e8e8; font: 400 13px/1.5 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; text-align: left; }
.age-notice--bottom { position: sticky; bottom: 0; }
.age-notice-badge { display: inline-block; margin-right: 4px; padding: 3px 6px 2px; border-radius: 999px; background: #fff; color: #111; font-size: 12px; font-weight: 800; line-height: 1; vertical-align: 1px; }
.age-notice a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.age-notice a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.age-notice bdi { overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Privacy и 404 */
.page { max-width: 36rem; margin: 0 auto; padding: 40px 16px; }
.page h1 { margin: 0 0 12px; font-size: 1.6rem; line-height: 1.25; }
.page h2 { margin: 24px 0 8px; font-size: 1.15rem; }
.page p { margin: 0 0 10px; color: var(--muted); }
.page p a { color: var(--teal); }
