:root {
  --ink: #102f38;
  --navy: #123a49;
  --teal: #167d78;
  --teal-dark: #0d554f;
  --coral: #e95f45;
  --coral-dark: #a93627;
  --gold: #f2bd48;
  --cream: #fff9e9;
  --paper: #fffdf5;
  --muted: #597277;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: #173f43; font-family: ui-rounded, "Avenir Next", Nunito, system-ui, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 4px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 7px #176e83 !important; }
[hidden] { display: none !important; }
.station { position: relative; width: 100%; height: 100%; min-width: 1100px; min-height: 680px; overflow: hidden; isolation: isolate; background: linear-gradient(rgba(11,40,44,.18),rgba(11,40,44,.36)), url("art/station-backdrop-01.webp") center / cover no-repeat; }
.station::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 62% 30%,transparent 0 24%,rgba(7,32,37,.18) 72%), linear-gradient(90deg,rgba(10,42,45,.28),transparent 35%); pointer-events: none; }
.sunwash { position: absolute; z-index: 0; width: 390px; height: 390px; left: 39%; top: 8%; opacity: .23; border-radius: 50%; background: #ffe7a4; filter: blur(45px); }
.platform-lights i { position: absolute; z-index: 1; width: 6px; height: 6px; border-radius: 50%; background: #ffe49b; box-shadow: 0 0 24px 9px rgba(255,221,126,.72); animation: lamp-breathe 3s ease-in-out infinite; }
.platform-lights i:nth-child(1) { left: 8.5%; top: 22%; }.platform-lights i:nth-child(2) { left: 18.8%; top: 31%; animation-delay: .8s; }.platform-lights i:nth-child(3) { right: 12%; top: 27%; animation-delay: 1.5s; }

.rail-hud { position: absolute; z-index: 12; left: 30px; right: 30px; top: 24px; height: 67px; display: grid; grid-template-columns: 220px 1fr 320px; align-items: center; gap: 24px; padding: 9px 13px 9px 17px; border: 1px solid rgba(255,255,255,.52); border-radius: 18px; color: white; background: rgba(12,47,53,.87); box-shadow: 0 8px 28px rgba(5,27,30,.25), inset 0 1px rgba(255,255,255,.15); backdrop-filter: blur(12px); }
.station-badge span,.score-cluster span { display: block; opacity: .7; font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.station-badge strong { display: block; margin-top: 2px; font-size: 16px; }
.route-stamps { display: flex; align-items: center; justify-content: center; }
.route-stamps i { width: 24px; height: 24px; display: grid; flex: 0 0 auto; place-items: center; border: 2px solid rgba(255,255,255,.46); border-radius: 50%; color: rgba(255,255,255,.72); font-style: normal; font-size: 10px; font-weight: 1000; transition: transform 180ms ease-out, background 180ms ease-out; }
.route-stamps i.is-current { color: var(--ink); border-color: var(--gold); background: var(--gold); transform: scale(1.14); box-shadow: 0 0 0 5px rgba(242,189,72,.18); }
.route-stamps i.is-done { color: white; border-color: #68c7a6; background: var(--teal); }
.route-stamps b { width: clamp(3px,1vw,14px); height: 2px; background: rgba(255,255,255,.24); }
.score-cluster { display: flex; justify-content: flex-end; align-items: center; gap: 19px; }
.score-cluster > div { min-width: 62px; }.score-cluster strong { display: block; margin-top: 2px; font-size: 17px; }.score-cluster em { font-style: normal; }
.difficulty-meter { min-width: 104px !important; }.difficulty-meter > strong { position: absolute; margin: -13px 0 0 75px; font-size: 11px; }.difficulty-meter > i { width: 104px; height: 7px; display: block; margin-top: 6px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.19); }.difficulty-meter > i b { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#69d2aa,var(--gold)); transition: width 280ms ease-out; }

.mascot-dock { position: absolute; z-index: 7; left: 24px; bottom: 46px; width: 300px; height: 650px; pointer-events: none; }
.mascot { position: absolute; z-index: 2; left: -30px; bottom: -35px; width: 350px; height: 490px; object-fit: contain; filter: drop-shadow(0 22px 15px rgba(5,28,30,.4)); transform-origin: 50% 82%; transition: transform 170ms ease-out, filter 170ms ease-out; }
.mascot-shadow { position: absolute; left: 55px; bottom: 2px; width: 210px; height: 34px; border-radius: 50%; background: rgba(4,24,26,.42); filter: blur(8px); }
.speech { position: absolute; z-index: 4; left: 96px; top: 118px; width: 205px; padding: 15px 17px; border: 2px solid #d8bd79; border-radius: 18px 18px 18px 4px; color: #173840; background: rgba(255,251,232,.96); box-shadow: 0 7px 0 rgba(87,63,24,.18), 0 18px 28px rgba(9,34,38,.22); font-size: 14px; font-weight: 850; line-height: 1.25; transform-origin: 0 100%; }
.mascot-dock.is-happy .mascot { animation: mascot-hop 680ms cubic-bezier(.2,.85,.3,1.2); }.mascot-dock.is-happy .speech { animation: speech-pop 420ms ease-out; }
.mascot-dock.is-oops .mascot { animation: mascot-oops 380ms ease-out; filter: drop-shadow(0 20px 15px rgba(5,28,30,.4)) saturate(.85); }

.mission-card { position: absolute; z-index: 6; left: 316px; right: 42px; top: 108px; bottom: 97px; min-height: 500px; display: grid; grid-template-rows: auto minmax(270px,1fr) 34px 88px; padding: 24px 34px 25px; border: 1px solid rgba(255,255,255,.7); border-radius: 26px; background: linear-gradient(145deg,rgba(255,253,245,.97),rgba(250,242,218,.94)); box-shadow: 0 11px 0 rgba(14,65,65,.32), 0 28px 60px rgba(7,31,33,.32), inset 0 1px white; overflow: hidden; }
.mission-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(167,126,53,.25); border-radius: 19px; pointer-events: none; }
.mission-copy { position: relative; z-index: 2; text-align: center; }.kicker { color: var(--coral-dark); font-size: 10px; font-weight: 1000; letter-spacing: .14em; text-transform: uppercase; }.mission-copy h1 { margin: 5px 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(29px,3.2vw,45px); line-height: 1; letter-spacing: -.035em; }.mission-copy p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 650; }
.playfield { position: relative; z-index: 2; display: grid; place-items: center; min-height: 0; padding: 8px 0 2px; }
.clock-zone { position: relative; width: min(100%,650px); height: 100%; min-height: 290px; display: grid; grid-template-columns: minmax(260px,330px) minmax(190px,1fr); align-items: center; justify-content: center; gap: 25px; }
.clock-label { position: absolute; left: 90px; top: 5px; z-index: 4; padding: 5px 11px; border-radius: 999px; color: #f8f2db; background: var(--navy); box-shadow: 0 3px 0 #082a32; font-size: 10px; font-weight: 1000; letter-spacing: .1em; text-transform: uppercase; }
.clock { width: min(31vh,300px); min-width: 240px; max-width: 300px; overflow: visible; filter: drop-shadow(0 12px 10px rgba(25,56,58,.24)); }
.clock-rim-outer { fill: #194f58; stroke: #d49b38; stroke-width: 8; }.clock-rim { fill: #fffaf0; stroke: #0b3139; stroke-width: 7; }.tick { stroke: #36565a; stroke-linecap: round; }.tick.major { stroke: var(--ink); stroke-width: 4; }.tick.minor { stroke-width: 2; opacity: .68; }
.clock-numbers text { fill: var(--ink); font-family: Georgia,serif; font-size: 24px; font-weight: 900; text-anchor: middle; dominant-baseline: middle; }
.hand { transform-origin: 150px 150px; stroke-linecap: round; filter: url(#handShadow); transition: transform 520ms cubic-bezier(.22,.88,.3,1.08); }.hour-hand { stroke: var(--ink); stroke-width: 13; }.minute-hand { stroke: var(--coral); stroke-width: 8; }.pin { fill: var(--gold); stroke: var(--ink); stroke-width: 4; }.pin-light { fill: white; opacity: .75; }.elapsed-arc { fill: none; stroke: rgba(22,125,120,.28); stroke-width: 17; stroke-linecap: round; }
.time-strip { display: grid; gap: 11px; align-content: center; }
.time-chip { min-height: 61px; padding: 10px 16px; border: 2px solid #9eaaa4; border-radius: 14px; color: var(--navy); background: white; box-shadow: 0 5px 0 #d5d4c8; font-size: 24px; font-weight: 1000; letter-spacing: .02em; transition: transform 140ms ease-out, box-shadow 140ms ease-out, border-color 140ms ease-out; }.time-chip small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.time-chip:hover { transform: translateY(-2px) rotate(-.5deg); border-color: var(--teal); box-shadow: 0 7px 0 #c1d6ce; }.time-chip:active { transform: translateY(4px); box-shadow: 0 1px 0 #c1d6ce; }
.timetable-wrap { position: relative; width: min(93%,760px); min-height: 300px; display: grid; place-items: center; }.timetable-wrap > img { position: absolute; width: 480px; height: 370px; left: -58px; top: -38px; object-fit: contain; filter: drop-shadow(0 12px 9px rgba(13,45,47,.24)); opacity: .98; }.timetable { position: relative; z-index: 2; width: 385px; margin-left: -170px; display: grid; overflow: hidden; border: 2px solid #b98b3c; border-radius: 8px; color: #f9f0d0; background: #102d36; box-shadow: inset 0 0 0 3px rgba(255,255,255,.06); }
.table-row { display: grid; grid-template-columns: 1.25fr .8fr .8fr; min-height: 48px; align-items: center; padding: 0 14px; border-bottom: 1px solid rgba(242,189,72,.28); }.table-row:last-child { border-bottom: 0; }.table-row.is-header { min-height: 35px; color: #e9b946; font-size: 9px; font-weight: 1000; letter-spacing: .12em; text-transform: uppercase; }.table-row.is-focus { background: rgba(233,95,69,.18); box-shadow: inset 4px 0 var(--coral); }.table-row span { font-size: 13px; font-weight: 800; }.table-row strong { font-size: 16px; }
.timetable-wrap .time-strip { position: absolute; right: -25px; top: 28px; width: 225px; }

.feedback { position: relative; z-index: 2; display: grid; place-items: center; min-height: 34px; color: var(--teal-dark); font-size: 14px; font-weight: 900; text-align: center; }.feedback.is-error { color: var(--coral-dark); }
.action-area { position: relative; z-index: 2; min-height: 84px; display: grid; place-items: center; }
.primary { min-width: 235px; min-height: 62px; padding: 0 26px; border: 2px solid var(--teal-dark); border-radius: 15px; color: white; background: var(--teal); box-shadow: 0 6px 0 var(--teal-dark); font-size: 16px; font-weight: 1000; transition: transform 140ms ease-out,box-shadow 140ms ease-out; }.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--teal-dark); }.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--teal-dark); }.primary.is-coral { border-color: var(--coral-dark); background: var(--coral); box-shadow: 0 6px 0 var(--coral-dark); }
.observation { width: min(650px,100%); min-height: 73px; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 13px; padding: 12px 18px; border: 2px solid #d5b467; border-radius: 16px; background: #fff4c9; box-shadow: 0 5px 0 #e0d0a2; }.observation b { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 22px; }.observation strong { display: block; font-size: 15px; }.observation span { display: block; margin-top: 2px; color: #5b654c; font-size: 12px; font-weight: 700; }

.train-track { position: absolute; z-index: 8; left: 0; right: 0; bottom: -6px; height: 106px; pointer-events: none; }.train { position: absolute; z-index: 2; width: 225px; height: 112px; left: 54%; bottom: 6px; object-fit: contain; filter: drop-shadow(0 12px 6px rgba(6,29,31,.42)); transform: translateX(-50%); transition: left 800ms cubic-bezier(.25,.8,.3,1), transform 170ms ease-out; }.rail { position: absolute; z-index: 1; left: 0; right: 0; bottom: 15px; height: 8px; border-top: 3px solid #9b7748; border-bottom: 3px solid #5d432b; background: #322b24; box-shadow: 0 8px 0 rgba(24,32,29,.55); }.station.is-departing .train { animation: train-dash 1.25s ease-in both; }
.celebration { position: absolute; z-index: 30; left: 61%; top: 45%; pointer-events: none; }.celebration i { position: absolute; width: 14px; height: 8px; opacity: 0; border-radius: 3px; background: var(--gold); }.celebration i:nth-child(2n) { background: var(--coral); }.celebration i:nth-child(3n) { background: #51bfa4; }.celebration.is-live i { animation: ticket-burst 720ms ease-out both; }.celebration i:nth-child(1){--x:-150px;--y:-80px}.celebration i:nth-child(2){--x:-80px;--y:-135px;animation-delay:40ms}.celebration i:nth-child(3){--x:15px;--y:-145px;animation-delay:80ms}.celebration i:nth-child(4){--x:105px;--y:-115px;animation-delay:120ms}.celebration i:nth-child(5){--x:155px;--y:-35px;animation-delay:160ms}.celebration i:nth-child(6){--x:130px;--y:65px;animation-delay:200ms}.celebration i:nth-child(7){--x:45px;--y:110px;animation-delay:240ms}.celebration i:nth-child(8){--x:-65px;--y:100px;animation-delay:280ms}.celebration i:nth-child(9){--x:-145px;--y:40px;animation-delay:320ms}
.toast { position: absolute; z-index: 40; left: 61%; bottom: 108px; max-width: 520px; padding: 11px 18px; opacity: 0; transform: translate(-50%,12px); border-radius: 999px; color: white; background: var(--ink); box-shadow: 0 7px 20px rgba(4,27,29,.28); pointer-events: none; font-size: 13px; font-weight: 900; transition: opacity 150ms ease-out,transform 150ms ease-out; }.toast.is-showing { opacity: 1; transform: translate(-50%,0); }
.mission-card.is-shaking { animation: card-shake 330ms ease-out; }

@keyframes lamp-breathe { 50% { opacity: .7; transform: scale(.8); } }
@keyframes mascot-hop { 0%,100% { transform: translateY(0) rotate(0); } 38% { transform: translateY(-23px) rotate(-3deg) scale(1.035); } 67% { transform: translateY(2px) rotate(2deg); } }
@keyframes mascot-oops { 25% { transform: rotate(-3deg) translateX(-5px); } 60% { transform: rotate(3deg) translateX(5px); } }
@keyframes speech-pop { 50% { transform: scale(1.07) rotate(-1deg); } }
@keyframes ticket-burst { 0% { opacity: 0; transform: translate(0,0) rotate(0) scale(.3); } 28% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x),var(--y)) rotate(280deg) scale(1); } }
@keyframes card-shake { 25% { transform: translateX(-8px) rotate(-.25deg); } 55% { transform: translateX(7px) rotate(.2deg); } 80% { transform: translateX(-3px); } }
@keyframes train-dash { 0% { left: 54%; transform: translateX(-50%) scale(1); } 25% { transform: translateX(-53%) scale(1.04); } 100% { left: 118%; transform: translateX(-50%) scale(.92); } }
@media (max-height: 760px) { .rail-hud { top: 14px; }.mission-card { top: 93px; bottom: 82px; padding-top: 18px; padding-bottom: 18px; grid-template-rows: auto minmax(250px,1fr) 30px 76px; }.mascot-dock { bottom: 20px; transform: scale(.88); transform-origin: bottom left; }.clock { width: 250px; }.train-track { height: 92px; }.train { width: 190px; height: 96px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
