:root {
  --ink: #06131d;
  --deep: #071d2b;
  --panel: rgba(7, 25, 37, 0.84);
  --panel-strong: rgba(5, 20, 31, 0.96);
  --line: rgba(255,255,255,0.13);
  --text: #f8fbfd;
  --muted: #a8bdc9;
  --yellow: #ffd43b;
  --yellow-2: #ffae00;
  --cyan: #47d9e8;
  --green: #53e39a;
  --red: #ff6b6b;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  color: var(--text);
  background: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ambient { position: fixed; inset: 0; overflow: hidden; background:
  radial-gradient(circle at 76% 18%, rgba(255, 207, 54, .14), transparent 28%),
  linear-gradient(148deg, #071621 0%, #0a2738 46%, #07131c 100%); }
.sun-glow { position: absolute; width: 720px; height: 720px; right: -170px; top: -280px; border-radius: 50%; background: radial-gradient(circle, rgba(255,210,58,.28), rgba(255,210,58,0) 68%); filter: blur(4px); animation: breathe 6s ease-in-out infinite; }
.ridge { position: absolute; left: -8%; right: -8%; bottom: -10%; transform-origin: bottom; clip-path: polygon(0 60%, 10% 48%, 22% 59%, 35% 31%, 47% 54%, 60% 25%, 75% 52%, 86% 38%, 100% 55%, 100% 100%, 0 100%); }
.ridge-back { height: 60%; background: rgba(20, 69, 84, .44); transform: translateY(-110px) scaleX(1.06); }
.ridge-mid { height: 51%; background: rgba(11, 49, 63, .72); transform: translateY(-28px) scaleX(1.02); }
.ridge-front { height: 43%; background: #071824; }
.route-line { position: absolute; width: 64%; height: 13px; border-radius: 999px; background: linear-gradient(90deg, transparent, rgba(255,212,59,.38), transparent); transform: rotate(-13deg); filter: blur(1px); opacity: .55; }
.route-line-a { left: 18%; top: 43%; }
.route-line-b { left: 26%; top: 58%; transform: rotate(9deg); opacity: .28; }
.grain { position: absolute; inset: 0; opacity: .055; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }

.starting-shell { position: relative; z-index: 2; width: 100%; height: 100%; display: grid; grid-template-rows: 132px 1fr 70px; padding: 28px 48px 26px; }
.starting-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 18px; }
.brand-mark { width: 102px; height: 72px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; border-radius: 13px; color: var(--ink); background: linear-gradient(145deg, var(--yellow), var(--yellow-2)); box-shadow: 0 14px 40px rgba(255,183,0,.17); transform: skewX(-5deg); }
.brand-mark span { font-size: 17px; font-weight: 900; letter-spacing: .18em; line-height: 1; }
.brand-mark strong { font-size: 29px; line-height: 1; letter-spacing: -.06em; }
.brand-copy { display: flex; flex-direction: column; gap: 4px; }
.brand-copy span { font-size: 25px; font-weight: 900; letter-spacing: .12em; }
.brand-copy small { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.countdown-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 310px; padding: 10px 30px; border-radius: 18px 18px 6px 6px; border: 1px solid rgba(255,212,59,.28); background: linear-gradient(180deg, rgba(255,212,59,.09), rgba(6,19,29,.1)); }
.countdown-wrap span { color: var(--yellow); font-size: 12px; font-weight: 900; letter-spacing: .22em; }
.countdown-wrap strong { margin-top: -3px; font-variant-numeric: tabular-nums; font-size: 57px; line-height: 1; letter-spacing: -.05em; text-shadow: 0 0 28px rgba(255,212,59,.22); }
.live-chip { justify-self: end; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6,20,30,.56); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.live-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 6px rgba(255,107,107,.1); animation: blink 1.5s ease-in-out infinite; }

.scene-stage { position: relative; min-height: 0; }
.scene { position: absolute; inset: 0; display: grid; align-content: center; opacity: 0; transform: translateY(24px) scale(.985); filter: blur(5px); pointer-events: none; transition: opacity .75s ease, transform .75s cubic-bezier(.2,.7,.2,1), filter .75s ease; }
.scene.active { opacity: 1; transform: translateY(0) scale(1); filter: none; pointer-events: auto; }
.scene.leaving { opacity: 0; transform: translateY(-20px) scale(1.012); filter: blur(4px); }
.section-title { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; padding: 0 8px 18px; border-bottom: 1px solid var(--line); }
.section-title span { font-size: 29px; font-weight: 950; letter-spacing: .04em; }
.section-title small { color: var(--yellow); font-size: 12px; font-weight: 900; letter-spacing: .22em; }

.scene-soon { grid-template-columns: 1.15fr .85fr; gap: 54px; }
.hero-copy { align-self: center; }
.eyebrow { display: inline-flex; padding: 9px 14px; border: 1px solid rgba(255,212,59,.38); border-radius: 999px; color: var(--yellow); background: rgba(255,212,59,.08); font-size: 13px; font-weight: 900; letter-spacing: .17em; }
.hero-copy h1 { margin: 22px 0 16px; font-size: clamp(92px, 8.2vw, 154px); line-height: .78; letter-spacing: -.085em; font-weight: 1000; }
.hero-copy h1 em { color: transparent; -webkit-text-stroke: 3px var(--yellow); font-style: normal; text-shadow: 0 0 40px rgba(255,212,59,.12); }
.hero-copy p { width: min(760px, 90%); margin: 0; color: var(--muted); font-size: 22px; line-height: 1.45; }
.hero-road { align-self: center; justify-self: stretch; min-height: 410px; padding: 38px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 34px; background:
  linear-gradient(150deg, rgba(255,255,255,.08), rgba(255,255,255,.015)),
  var(--panel); box-shadow: 0 30px 90px rgba(0,0,0,.28); overflow: hidden; position: relative; }
.hero-road::before { content: ""; position: absolute; width: 160%; height: 80px; left: -30%; bottom: 70px; background: repeating-linear-gradient(90deg, transparent 0 32px, rgba(255,255,255,.72) 32px 78px, transparent 78px 112px); transform: rotate(-25deg); opacity: .16; }
.road-sign { z-index: 1; color: var(--yellow); font-size: 13px; font-weight: 900; letter-spacing: .22em; }
.hero-road strong { z-index: 1; max-width: 100%; margin: 14px 0; font-size: 62px; line-height: 1; text-align: center; letter-spacing: -.055em; text-transform: uppercase; }
.road-arrow { z-index: 1; margin-top: 10px; color: var(--yellow); font-size: 52px; animation: arrowDown 1.5s ease-in-out infinite; }

.today-layout { display: grid; grid-template-columns: 280px 1fr 310px; gap: 24px; align-items: stretch; }
.episode-card, .city-card, .today-stats { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 26px 80px rgba(0,0,0,.22); }
.episode-card { min-height: 430px; padding: 36px; border-radius: 26px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: linear-gradient(155deg, rgba(255,212,59,.16), rgba(7,25,37,.93)); }
.episode-card > span { color: var(--yellow); font-weight: 900; letter-spacing: .25em; }
.episode-card strong { margin: 18px 0; font-size: 132px; line-height: .8; letter-spacing: -.08em; }
.episode-card small { color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.city-card { border-radius: 26px; padding: 52px; display: flex; flex-direction: column; justify-content: center; }
.city-card > span { color: var(--yellow); font-size: 13px; font-weight: 900; letter-spacing: .2em; }
.city-card h2 { margin: 12px 0 28px; font-size: clamp(74px, 6.2vw, 118px); line-height: .92; letter-spacing: -.075em; }
.location-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 20px; }
.location-line i { width: 14px; height: 14px; border: 3px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 0 7px rgba(71,217,232,.09); }
.today-stats { border-radius: 26px; display: grid; grid-template-rows: repeat(3, 1fr); overflow: hidden; }
.today-stats div { padding: 28px; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--line); }
.today-stats div:last-child { border-bottom: none; }
.today-stats span { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.today-stats strong { margin-top: 8px; font-size: 27px; letter-spacing: -.03em; }

.starting-map-wrap { position: relative; height: 560px; padding: 12px 18px 8px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg, rgba(30,85,96,.16), rgba(5,20,31,.86)); overflow: hidden; }
.starting-map-wrap::before { content: ""; position: absolute; inset: 0; opacity: .2; background: repeating-linear-gradient(164deg, transparent 0 56px, rgba(255,255,255,.025) 56px 58px); }
#startingRouteSvg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.route-shadow { fill: none; stroke: rgba(0,0,0,.45); stroke-width: 35; stroke-linecap: round; stroke-linejoin: round; }
.route-base { fill: none; stroke: rgba(245,249,248,.8); stroke-width: 23; stroke-linecap: round; stroke-linejoin: round; }
.route-center { fill: none; stroke: rgba(255,190,0,.85); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 18 18; animation: roadMove 6s linear infinite; }
.route-travelled { fill: none; stroke: var(--yellow); stroke-width: 23; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 9px rgba(255,212,59,.45)); }
.map-stop circle { stroke-width: 5; }
.map-stop text { fill: #f7fbfd; font-size: 22px; font-weight: 850; paint-order: stroke; stroke: rgba(3,16,24,.95); stroke-width: 7; stroke-linejoin: round; }
.map-stop .stop-number { font-size: 15px; text-anchor: middle; dominant-baseline: central; stroke-width: 0; fill: var(--ink); font-weight: 1000; }
.map-stop.planned circle { fill: #183849; stroke: rgba(255,255,255,.5); }
.map-stop.visited circle { fill: var(--green); stroke: #d9ffed; }
.map-stop.current circle { fill: var(--yellow); stroke: #fff8c7; filter: drop-shadow(0 0 14px rgba(255,212,59,.8)); animation: mapPulse 1.6s ease-in-out infinite; }
.map-legend { position: absolute; z-index: 2; left: 28px; bottom: 20px; display: flex; gap: 26px; padding: 11px 17px; border-radius: 999px; background: rgba(4,18,28,.78); border: 1px solid var(--line); }
.map-legend span { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; }
.map-legend i.visited { background: var(--green); }
.map-legend i.current { background: var(--yellow); }
.map-legend i.planned { background: #507084; }

.passport-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 15px; }
.passport-stamp { min-height: 185px; padding: 18px 12px; border: 1px dashed rgba(255,255,255,.19); border-radius: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: rgba(5,20,31,.62); opacity: .38; transform: rotate(var(--tilt)); }
.passport-stamp.visited { opacity: 1; border: 2px solid rgba(255,212,59,.65); background: linear-gradient(145deg, rgba(255,212,59,.12), rgba(7,25,37,.9)); box-shadow: inset 0 0 0 5px rgba(255,212,59,.035); }
.passport-stamp.current { opacity: 1; border-color: var(--cyan); box-shadow: 0 0 0 5px rgba(71,217,232,.08); }
.passport-stamp .stamp-check { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--muted); font-size: 21px; font-weight: 1000; }
.passport-stamp.visited .stamp-check { background: var(--yellow); color: var(--ink); }
.passport-stamp strong { margin-top: 13px; font-size: 17px; line-height: 1.1; text-transform: uppercase; }
.passport-stamp small { margin-top: 7px; color: var(--yellow); font-size: 9px; font-weight: 900; letter-spacing: .1em; }

.leaderboard-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 42px; align-items: end; }
.podium-visual { height: 460px; display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 30px 25px 0; border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(5,20,31,.78)); }
.podium-place { width: 28%; display: flex; align-items: flex-start; justify-content: center; border-radius: 20px 20px 0 0; border: 1px solid rgba(255,255,255,.13); border-bottom: none; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.025)); }
.podium-place span { margin-top: 24px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(4,18,28,.86); font-size: 24px; font-weight: 1000; }
.podium-place.first { height: 90%; border-color: rgba(255,212,59,.45); background: linear-gradient(180deg, rgba(255,212,59,.23), rgba(255,212,59,.03)); }
.podium-place.first span { background: var(--yellow); color: var(--ink); }
.podium-place.second { height: 69%; }
.podium-place.third { height: 54%; }
.leaderboard-list { display: grid; gap: 12px; }
.leader-row { min-height: 67px; padding: 0 22px; display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.leader-row .place { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.06); font-weight: 1000; }
.leader-row:nth-child(1) .place { color: var(--ink); background: var(--yellow); }
.leader-row strong { font-size: 22px; }
.leader-row .score { color: var(--yellow); font-size: 24px; font-weight: 1000; font-variant-numeric: tabular-nums; }
.leader-row .score small { color: var(--muted); font-size: 13px; }

.social-partner-layout { display: grid; grid-template-columns: .84fr 1.16fr; gap: 24px; }
.social-panel, .partner-panel { min-height: 480px; padding: 34px; border-radius: 27px; border: 1px solid var(--line); background: var(--panel); }
.panel-label { display: block; margin-bottom: 26px; color: var(--yellow); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.social-list { display: grid; gap: 14px; }
.social-item { min-height: 82px; padding: 14px 18px; display: grid; grid-template-columns: 50px 1fr; gap: 16px; align-items: center; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.035); }
.social-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, var(--yellow), var(--yellow-2)); color: var(--ink); font-size: 18px; font-weight: 1000; }
.social-item span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.social-item strong { display: block; margin-top: 3px; font-size: 24px; }
.sponsor-logo-grid { height: calc(100% - 38px); display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(128px, 1fr); gap: 20px; }
.sponsor-logo { padding: 12px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; overflow: visible; }
.sponsor-logo img { width: 100%; height: 100%; max-width: 240px; max-height: 145px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.38)); }
.sponsor-logo span { color: #fff; font-size: 18px; font-weight: 900; text-align: center; text-shadow: 0 3px 10px rgba(0,0,0,.55); }
.empty-state { height: 100%; min-height: 180px; display: grid; place-items: center; border: 1px dashed rgba(255,255,255,.18); border-radius: 18px; color: var(--muted); text-align: center; font-size: 16px; letter-spacing: .03em; }

.starting-footer { display: flex; flex-direction: column; justify-content: flex-end; gap: 11px; }
.scene-progress { height: 4px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.09); }
.scene-progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), #fff3a3); }
.footer-copy { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .18em; }

body.finished .countdown-wrap { border-color: rgba(83,227,154,.52); background: rgba(83,227,154,.1); }
body.finished .countdown-wrap span { color: var(--green); }
body.finished .live-chip i { background: var(--green); box-shadow: 0 0 0 6px rgba(83,227,154,.11); }

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes arrowDown { 0%,100% { transform: translateY(-6px); } 50% { transform: translateY(8px); } }
@keyframes roadMove { to { stroke-dashoffset: -72; } }
@keyframes mapPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.13); } }

@media (max-aspect-ratio: 4/3) {
  .starting-shell { padding: 24px 28px 22px; }
  .today-layout { grid-template-columns: 220px 1fr; }
  .today-stats { display: none; }
  .passport-grid { grid-template-columns: repeat(5, 1fr); }
}
