:root { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: #0A0F22 radial-gradient(circle 70vmax at 50% 45%, #25306A 0%, #0A0F22 75%) fixed; color: #F3F1EA; font: 15px/1.5 "Inter", system-ui, sans-serif; overflow-x: hidden; }
main { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 100vh; min-height: 100dvh; padding: max(14px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom)); text-align: center; }
h1 { margin: 0; font: 600 clamp(20px, 5vw, 30px)/1.2 "Fraunces", Georgia, serif; text-wrap: balance; }
.sub { margin: 0; font-size: 14px; color: #C3CBE4; }
.mark { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 15px solid #F6D37E; }
.stage { --s: max(160px, min(94vw, calc(100vh - 290px), 740px)); width: var(--s); height: var(--s); perspective: 1400px; }
.tilt, .layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.tilt { position: relative; transform-style: preserve-3d; }
.layer img { display: block; width: 100%; height: 100%; }
img.layer { display: block; }
.halo { position: absolute; inset: 7%; border-radius: 50%; transform: translateZ(-12px); box-shadow: 0 0 70px 14px rgba(120,150,255,.18); transition: box-shadow .4s; }
.on .halo { box-shadow: 0 0 90px 44px rgba(255,208,100,.55); }
.throne { transform-origin: 50% 10%; }
.body { filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); }
.rete { transform: translateZ(16px); filter: drop-shadow(0 4px 4px rgba(50,28,0,.5)); }
.glint { inset: 6.5%; width: 87%; height: 87%; left: 6.5%; top: 6.5%; border-radius: 50%; pointer-events: none; transform: translateZ(22px);
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,.28) 20deg, transparent 52deg, transparent 180deg, rgba(255,255,255,.13) 200deg, transparent 230deg); }
.marks { transform: translateZ(26px); }
.sun span { position: absolute; left: 46.6%; top: 3.4%; width: 6.8%; height: 6.8%; border-radius: 50%; background: radial-gradient(circle, #FFFBE0 0%, #FFD35C 45%, #F08A1C 70%, rgba(240,138,28,0) 72%); box-shadow: 0 0 28px 10px rgba(255,190,70,.55); }
.needle { filter: drop-shadow(4px 7px 5px rgba(40,20,0,.5)); }
.hub { transform: translateZ(54px); }
.status { margin: 0; min-height: 34px; font: 600 clamp(20px, 5vw, 26px)/1.35 "Fraunces", Georgia, serif; font-variant-numeric: tabular-nums; }
.on .status { color: #FFD971; }
.hint { margin: 0; max-width: 46ch; min-height: 20px; font-size: 13px; color: #E8C88A; }
.controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; width: min(100%, 760px); }
button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #3A4778; background: #141C3B; color: #F3F1EA; font: 600 15px "Inter", system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
button:hover { background: #1E2954; }
button.gold { background: #F2C14E; border-color: #F2C14E; color: #1A1400; }
button.gold:hover { background: #FFD571; }
a { color: #C3CBE4; } a:hover { color: #fff; }
:focus-visible { outline: 3px solid #FFB000; outline-offset: 2px; }
.turn { display: flex; align-items: center; gap: 10px; flex: 1 1 280px; font-size: 14px; color: #C3CBE4; white-space: nowrap; }
.turn input { flex: 1; min-width: 0; height: 44px; accent-color: #F2C14E; cursor: pointer; }
.credit { margin: auto 0 0; padding-top: 4px; font-size: 12px; color: #9AA4C4; }
@media (max-height: 560px) { .sub, .mark, .turn span { display: none; } .stage { --s: max(150px, min(94vw, calc(100vh - 200px))); } .controls button { min-height: 36px; padding: 0 12px; font-size: 13px; } }

/* the turning layers are square: their corners must not widen the page */
html, body { overflow-x: clip; }
