/* HANDS ON THE WHEEL — the interactive player. Gas is amber, brake is teal, the middle road is snipKI mint. */
.wheel { --gas: #f2a54a; --gas-soft: #f2a54a24; --brake: #45b8c8; --brake-soft: #45b8c824;
  position: fixed; inset: 0; background: #000; z-index: 90; overflow: hidden; cursor: none; user-select: none; }
.wheel.ui, .wheel.w-menu, .wheel.ended, .wheel.choosing { cursor: default; }
.wheel button { cursor: pointer; }
.w-stage { position: absolute; inset: 0; }
.w-stage .wv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .12s; }
.w-stage .wv.on { opacity: 1; }
.w-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, #000d 0%, #0008 32%, transparent 60%); opacity: 0; transition: opacity .6s; }
.wheel.choosing .w-shade, .wheel.ui .w-shade { opacity: 1; }
.wheel.ui:not(.choosing) .w-shade { opacity: .55; }

/* captions */
.w-cc { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; pointer-events: none; padding: 0 12%; transition: bottom .35s; }
.wheel.ui .w-cc { bottom: 14%; }
.w-cc span { font-size: clamp(17px, 2.1vw, 36px); font-weight: 600; line-height: 1.35; text-shadow: 0 0 6px #000, 0 2px 3px #000, 0 0 2px #000; }
.w-cc span:empty, .wheel.cc-off .w-cc { display: none; }

/* chapter card: the year typed small, the title large */
.w-card { position: absolute; left: var(--pad); top: 12vh; pointer-events: none; display: flex; flex-direction: column; gap: .5vw; }
.w-card small { font-family: var(--mono); font-size: clamp(12px, 1.1vw, 18px); color: var(--accent); letter-spacing: .08em; text-transform: lowercase; }
.w-card b { font-family: var(--head); font-weight: 700; font-size: clamp(30px, 4.4vw, 76px); letter-spacing: -.03em; line-height: 1; text-shadow: 0 2px 30px #000c; }
.w-card.in small { animation: cardin .7s both; }
.w-card.in b { animation: cardin .9s .15s both; }
.w-card.out { transition: opacity .7s; opacity: 0; }
@keyframes cardin { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* the choice */
.w-choice { position: absolute; left: 0; right: 0; bottom: 7vh; display: flex; flex-direction: column; align-items: center; gap: 1.6vw; padding: 0 var(--pad); animation: choicein .6s both; }
@keyframes choicein { from { opacity: 0; transform: translateY(24px); } }
.w-q { margin: 0; font-size: clamp(18px, 2vw, 34px); font-weight: 600; text-align: center; max-width: 34em; text-shadow: 0 2px 20px #000; letter-spacing: -.01em; }
.w-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4vw; width: min(1100px, 88vw); }
.w-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .35em; text-align: left; padding: 1.1em 1.4em 1.2em; border-radius: 16px;
  border: 1.5px solid var(--c); background: linear-gradient(135deg, var(--soft), #0009); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s, opacity .4s, box-shadow .25s, background .25s; }
.w-opt.gas { --c: var(--gas); --soft: var(--gas-soft); }
.w-opt.brake { --c: var(--brake); --soft: var(--brake-soft); align-items: flex-end; text-align: right; }
.w-opt b { font-size: clamp(17px, 1.75vw, 30px); font-weight: 800; letter-spacing: .01em; color: var(--c); }
.w-opt span { font-size: clamp(12px, 1vw, 17px); color: var(--txt); opacity: .85; }
.w-opt kbd { position: absolute; top: .9em; font-family: var(--mono); font-size: 11px; color: var(--c); border: 1px solid var(--c); border-radius: 6px; padding: 0 6px; opacity: .7; }
.w-opt.gas kbd { right: 1em; } .w-opt.brake kbd { left: 1em; }
.w-opt:hover { transform: translateY(-4px); box-shadow: 0 10px 40px var(--soft), 0 0 0 1px var(--c); }
.w-opt.gas::before, .w-opt.brake::before { position: absolute; bottom: 1.1em; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--c); opacity: .55; }
.w-opt.gas::before { content: "GAS"; right: 1.2em; } .w-opt.brake::before { content: "BRAKE"; left: 1.2em; }
/* dead ends: both doors say the same thing */
.w-choice.same .w-opt { --c: var(--txt); --soft: #ffffff10; }
.w-choice.same .w-opt::before { content: none; }
.w-timer { width: min(1100px, 88vw); height: 3px; background: #ffffff1a; border-radius: 3px; overflow: hidden; }
.w-timer i { display: block; height: 100%; background: var(--accent); transform-origin: 50% 50%; box-shadow: 0 0 12px var(--accent); }
.w-choice.picked { pointer-events: none; }
.w-choice.picked .w-q, .w-choice.picked .w-timer { transition: opacity .4s; opacity: 0; }
.w-choice.pick-gas .w-opt.brake, .w-choice.pick-brake .w-opt.gas { opacity: 0; transform: scale(.94); }
.w-choice.pick-gas .w-opt.gas, .w-choice.pick-brake .w-opt.brake { transform: scale(1.04); box-shadow: 0 0 60px var(--soft), 0 0 0 2px var(--c); background: linear-gradient(135deg, var(--c), #000a 140%); }
.w-choice.pick-gas .w-opt.gas *, .w-choice.pick-brake .w-opt.brake * { color: #0b0f0e; border-color: #0b0f0e; }
.w-choice.timeout .w-opt.gas::after { content: "Theo chose"; position: absolute; top: -1.8em; left: 0; font-size: 13px; font-family: var(--mono); color: var(--accent); }

/* top bar + HUD, shown on mouse move */
.w-top, .w-hud { position: absolute; left: 0; right: 0; display: flex; align-items: center; padding: 0 var(--pad); opacity: 0; transition: opacity .35s; pointer-events: none; }
.wheel.ui .w-top, .wheel.ui .w-hud, .wheel.w-menu .w-top, .wheel.ended .w-top { opacity: 1; pointer-events: auto; }
.wheel.w-menu .w-hud, .wheel.ended .w-hud { display: none; }
.w-top { top: 0; height: 90px; gap: 18px; background: linear-gradient(#0009, transparent); z-index: 5; }
.w-top button svg, .w-hud button svg { width: 30px; height: 30px; }
.w-top button, .w-hud button { opacity: .85; transition: opacity .2s, transform .2s; }
.w-top button:hover, .w-hud button:hover { opacity: 1; transform: scale(1.12); }
.w-ttl { display: flex; flex-direction: column; } .w-ttl b { font-size: 15px; letter-spacing: .06em; } .w-ttl span { font-size: 12px; color: var(--dim); }
.wheel.w-menu .w-ttl, .wheel.ended .w-ttl { display: none; }
.w-hud { bottom: 0; height: 80px; justify-content: space-between; }
.wheel.choosing .w-hud { bottom: auto; top: 70px; }
.w-hud .l, .w-hud .r { display: flex; gap: 22px; align-items: center; }
.w-route { display: flex; gap: 8px; align-items: center; }
.w-route i { width: 26px; height: 6px; border-radius: 3px; background: #ffffff22; }
.w-route i.g { background: var(--gas); } .w-route i.b { background: var(--brake); }
.w-route i.to { opacity: .55; background-image: repeating-linear-gradient(90deg, transparent 0 3px, #000a 3px 5px); }
.w-route i.now { background: #ffffff55; animation: blink 1.4s steps(1) infinite; }

.w-spin { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border: 3px solid #ffffff1a; border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; display: none; }
.wheel.waiting:not(.w-menu):not(.ended) .w-spin { display: block; }
/* skip: always there while a clip plays, brighter when the HUD is up */
/* standalone (wheel.html): the start screen is the page's first fold and scrolls away with it; it is home, so no way back */
.wheel.solo.w-menu { position: absolute; bottom: auto; height: 100vh; height: 100svh; }
.wheel.solo.w-menu .w-top { display: none; }
.w-skip { position: absolute; right: var(--pad); bottom: 96px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 18px;
  border: 1px solid #ffffff55; border-radius: 999px; background: #0008; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 600; letter-spacing: .04em; opacity: .5; transition: opacity .3s, background .2s, border-color .2s; }
.w-skip svg { width: 18px; height: 18px; fill: currentColor; }
.wheel.ui .w-skip, .w-skip:hover { opacity: 1; }
.w-skip:hover { background: #fff2; border-color: #fff; }
.wheel.choosing .w-skip, .wheel.w-menu .w-skip, .wheel.ended .w-skip { display: none; }
.w-paused { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #0007; z-index: 4; }
.w-paused button svg { width: 80px; height: 80px; } .w-paused p { margin: 0; color: var(--dim); font-size: 14px; font-family: var(--mono); }

/* start screen */
.w-start { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 var(--pad); background: var(--bg); z-index: 3; animation: fadein .6s; }
.w-start .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 60%); mask-image: linear-gradient(90deg, transparent 5%, #000 60%); }
.w-start .in { position: relative; max-width: min(640px, 80vw); }
.w-start .kick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--dim); margin-bottom: 1.2vw; }
.w-start .orig { display: inline-flex; align-items: baseline; gap: 6px; color: var(--txt); border: 1px solid #7ed9b155; background: var(--mint-soft); padding: 2px 10px; border-radius: 999px; }
.w-start .orig .snipword { font-size: 13px; }
.w-start h1, .w-end h1 { font-family: var(--head); font-weight: 800; font-size: clamp(40px, 6vw, 104px); line-height: .95; letter-spacing: -.04em; margin: 0 0 1.4vw; }
.w-start h1 { background: linear-gradient(90deg, var(--gas), var(--accent) 50%, var(--brake)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.w-start .d { font-size: clamp(14px, 1.15vw, 19px); line-height: 1.55; color: #e6efe9dd; margin: 0 0 1.2vw; }
.w-start .meta { display: flex; gap: 12px; align-items: center; color: var(--dim); font-size: 13px; margin-bottom: 2vw; }
.wheel .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.wheel .btn { display: inline-flex; align-items: center; gap: .5em; border-radius: 999px; padding: .75em 1.6em .75em 1.25em; font-size: max(14px, 1vw); font-weight: 700; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s; }
.wheel .btn svg { width: 1.3em; height: 1.3em; }
.wheel .btn.go { background: var(--accent); color: var(--ink); } .wheel .btn.go:hover { background: #a3e8c9; transform: translateY(-2px); }
.wheel .btn.ghost { border: 1px solid #e6efe955; background: #0d121188; } .wheel .btn.ghost:hover { border-color: var(--txt); }
.wheel .btn.glow { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px #7ed9b133, 0 0 40px #7ed9b166; } }
.w-start .keys { margin: 2vw 0 0; font-size: 12px; color: var(--ghost); }
.wheel kbd { font-family: var(--mono); font-size: 11px; color: var(--txt); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; }
.w-start .keys kbd { color: var(--dim); }

/* end screen: verdict, the road you drove across all 64, the collection */
.w-end { position: absolute; inset: 0; z-index: 3; overflow-y: auto; background: radial-gradient(ellipse at 70% 40%, #12201c, var(--bg) 70%); padding: 9vh var(--pad) 6vh; opacity: 0; transition: opacity 1.2s; }
.w-end.show { opacity: 1; }
.w-end .in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 4vw; align-items: center; }
.w-end .kick { font-family: var(--mono); font-size: 13px; color: var(--accent); text-transform: lowercase; margin-bottom: 1.2vw; }
.w-end .v { font-size: clamp(18px, 1.7vw, 28px); line-height: 1.4; margin: 0 0 1.2vw; color: #e6efe9ee; font-weight: 500; }
.w-end .you { font-size: 14px; color: var(--dim); margin: 0 0 2.2vw; line-height: 1.5; }
.lat { width: 100%; max-height: 74vh; display: block; overflow: visible; }
.lat .band { fill: #7ed9b10d; stroke: #7ed9b133; stroke-dasharray: 3 5; }
.lat .e { stroke-width: 1.2; opacity: .2; } .lat .e.gas { stroke: var(--gas); } .lat .e.brake { stroke: var(--brake); }
.lat .me { stroke-width: 4.5; stroke-linecap: round; animation: draw .45s ease-out forwards; filter: drop-shadow(0 0 6px currentColor); }
.lat .me.gas { stroke: var(--gas); color: var(--gas); } .lat .me.brake { stroke: var(--brake); color: var(--brake); }
.lat .me.to { stroke-dasharray: 2 7 !important; animation: fadein .45s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lat .n { fill: #e6efe955; } .lat .n.dead { fill: #e6efe9aa; }
.lat .end { fill: var(--bg); stroke: var(--ghost); stroke-width: 1.5; } .lat .end.got { fill: var(--ghost); }
.lat .end.here { fill: var(--accent); stroke: var(--accent); animation: here 1.6s 3.4s ease-in-out infinite; }
@keyframes here { 50% { r: 9; } }
.lat text { font-family: var(--sans); fill: var(--dim); font-size: 12px; text-anchor: middle; }
.lat .lbl.mid { fill: var(--accent); font-weight: 700; } .lat .lbl.mid.sub { font-weight: 500; font-size: 11px; opacity: .8; }
.lat .yr { font-family: var(--mono); fill: var(--ghost); font-size: 11px; text-anchor: end; }
.lat .mid-note { fill: var(--accent); font-family: var(--mono); font-size: 11px; }
.lat .side { font-family: var(--mono); font-size: 11px; } .lat .side.gas { fill: var(--gas); } .lat .side.brake { fill: var(--brake); }
.coll { margin-top: 5vh; }
.coll.solo { max-width: 1200px; margin: 6vh auto 0; }
.coll h3 { font-size: 18px; margin: 0 0 1.2vw; } .coll h3 small { color: var(--dim); font-weight: 400; font-size: 14px; margin-left: 10px; }
.coll .btns { margin-top: 3vh; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #000c, transparent 65%); }
.tile b, .tile small { position: relative; z-index: 1; } .tile b { font-size: 14px; } .tile small { font-size: 11px; color: var(--dim); }
.tile .lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ghost); }
.tile .lock svg { width: 22px; height: 22px; margin-top: -14px; }
.tile:not(.got) b { color: var(--ghost); }
.tile.secret { border-style: dashed; }
.tile.here { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 30px #7ed9b133; }

/* upright: letterbox the film instead of cropping Theo out of it, and stack the two choices */
@media (orientation: portrait) {
  .w-stage .wv { object-fit: contain; }
}
@media (max-width: 800px) and (orientation: portrait) {
  .w-opts { grid-template-columns: 1fr; } .w-opt.brake { align-items: flex-start; text-align: left; } .w-opt.brake kbd { left: auto; right: 1em; }
  .w-choice { bottom: 4vh; }
  /* captions right under the letterboxed picture (its bottom edge is half a 16:9 frame below the middle) */
  .w-cc, .wheel.ui .w-cc { bottom: auto; top: calc(50% + 28.125vw + 18px); }
}
@media (pointer: coarse) { .w-opt kbd { display: none; } }
@media (max-width: 800px) {
  .w-end .in { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-card { top: 9vh; }
}

/* the legally required label: always on, over every scene, menu and end screen */
.w-ai { position: absolute; left: var(--pad); bottom: 8px; z-index: 6; pointer-events: none; font-family: var(--mono); font-size: 10px; letter-spacing: .04em;
  color: #e6efe9a6; background: #0d1211a6; padding: 2px 6px; border-radius: 4px; }

/* the card that asks for the phone on its side */
.w-rotate { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 12vw; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, #12201c, #000 75%); animation: fadein .4s; }
.w-rotate .ph { position: relative; width: 46px; height: 80px; margin-bottom: 22px; border: 3px solid var(--accent); border-radius: 10px; animation: tilt 2.8s cubic-bezier(.6, 0, .3, 1) infinite; }
.w-rotate .ph i { position: absolute; left: 50%; bottom: 6px; width: 12px; height: 3px; margin-left: -6px; border-radius: 2px; background: var(--accent); opacity: .6; }
@keyframes tilt { 0%, 18% { transform: rotate(0); } 48%, 82% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
.w-rotate b { font-family: var(--head); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.w-rotate p { margin: 0 0 14px; max-width: 26em; color: var(--dim); font-size: 15px; line-height: 1.5; }
.w-rotate .btn { font-size: 14px; }

/* a phone on its side: about 390px of height for the film, the controls and the choice */
@media (max-height: 500px) and (orientation: landscape) {
  .w-top { height: 56px; gap: 14px; } .w-ttl b { font-size: 13px; } .w-ttl span { font-size: 11px; }
  .w-top button svg, .w-hud button svg { width: 24px; height: 24px; }
  .w-hud { height: 52px; } .w-hud .l, .w-hud .r { gap: 18px; } .w-route i { width: 18px; height: 5px; }
  .wheel.choosing .w-hud { display: none; }
  .wheel.choosing .w-card { opacity: 0; }
  .w-skip { top: 12px; bottom: auto; padding: 6px 10px 6px 14px; font-size: 13px; }
  .w-cc { bottom: 7%; padding: 0 10%; } .wheel.ui .w-cc { bottom: 16%; }
  .w-cc span { font-size: 17px; }
  .w-card { top: 64px; } .w-card b { font-size: 30px; }
  .w-choice { bottom: 26px; gap: 10px; }
  .w-q { font-size: 17px; }
  .w-opts, .w-timer { width: min(760px, 92vw); } .w-opts { gap: 10px; }
  .w-opt { padding: .65em 1em .75em; border-radius: 12px; gap: .2em; }
  .w-opt b { font-size: 16px; } .w-opt span { font-size: 12px; }
  .w-opt.gas::before, .w-opt.brake::before { bottom: .8em; font-size: 9px; }
  .w-start .in { max-width: 64vw; }
  .w-start h1, .w-end h1 { font-size: 38px; margin-bottom: 10px; }
  .w-start .kick { margin-bottom: 10px; } .w-start .d { font-size: 13px; line-height: 1.45; margin-bottom: 10px; }
  .w-start .meta { margin-bottom: 14px; } .w-start .keys { display: none; }
  .w-end { padding: 5vh var(--pad); } .lat { max-height: 86vh; }
  .w-paused button svg { width: 56px; height: 56px; }
}
