*{box-sizing:border-box}
html,body{height:100%}
html{overflow:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;overflow:hidden;overscroll-behavior:none;background:#344857;color:#e9eff1;font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;-webkit-tap-highlight-color:transparent}

/* Blurred card artwork behind the globe. */
body:before{content:'';position:fixed;inset:-35px;pointer-events:none;background-image:linear-gradient(#263a4c70,#172d43b0),url('/assets/card-landscape.jpg');background-size:100% 100%,300% 400%;background-position:center,100% 0%;filter:blur(20px);transform:scale(1.08);transition:filter 1.2s}
body.dusk:before{filter:blur(20px) brightness(.52) saturate(.85)}

/* The scene fills the whole viewport; the controls float on top of it, so the globe
   passes behind the buttons when it is zoomed in. */
main{position:fixed;inset:0;overflow:hidden}
#scene{position:absolute;inset:0;z-index:1;touch-action:none;cursor:grab;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#scene:active{cursor:grabbing}
canvas{display:block;width:100%;height:100%;touch-action:none}
#loading{position:absolute;z-index:4;top:45%;left:0;right:0;margin:0;text-align:center;color:#f1eadb;font-size:13px;letter-spacing:.05em}

.bottom{position:absolute;z-index:3;left:0;right:0;bottom:max(18px,env(safe-area-inset-bottom));padding:0 max(10px,env(safe-area-inset-left)) 0 max(10px,env(safe-area-inset-right));text-align:center;pointer-events:none}
.hint{margin:0 0 12px;font-size:10px;letter-spacing:.07em;color:#dae2e8;text-shadow:0 1px 8px #0c1a26,0 0 2px #0c1a26;transition:opacity .8s}
/* The hint has done its job once the globe has been touched. */
.bottom.used .hint{opacity:0}
.controls{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
#status{min-height:14px;margin:10px 0 0;font-size:11px;color:#edf1f3;text-shadow:0 1px 8px #0c1a26,0 0 2px #0c1a26}

button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:11px 18px;border:1px solid #e4e9ed40;border-radius:30px;background:#142b4085;color:#edf1f3;font:inherit;font-size:12px;line-height:1;cursor:pointer;pointer-events:auto;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);transition:background .2s,border-color .2s,transform .2s}
button svg{flex:none;width:1.15em;height:1.15em;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
button:active{transform:scale(.96)}
button:disabled{opacity:.6;cursor:default}
button:focus-visible{outline:2px solid #e5c581;outline-offset:3px}
@media(hover:hover){button:hover{background:#344d60c0;border-color:#e4e9ed80}#snow:hover{background:#eee0c2;border-color:#eee0c2}}
#snow{background:#e2d2af;color:#243440;border-color:#e2d2af;font-weight:500}
#dusk[aria-pressed=true]{background:#c7a667;border-color:#c7a667;color:#172a3b}
#reset{min-width:42px;padding:11px 12px}
[hidden]{display:none!important}

@media(max-width:700px){
  .controls{max-width:400px;margin:0 auto;gap:7px}
  button{padding:11px 14px}
  .hint{margin-bottom:10px}
}
@media(max-height:480px){
  .hint{display:none}
  #status{margin-top:6px}
}
@media(prefers-reduced-motion:reduce){body:before,button{transition:none}}

#music-toggle{position:fixed;z-index:5;top:max(18px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));width:44px;height:44px;padding:11px;border-radius:50%}
#music-toggle svg{width:20px;height:20px}
#music-toggle .sound-off{display:none}
#music-toggle[aria-pressed=true] .sound-off{display:block}
#music-toggle[aria-pressed=true] .sound-on{display:none}

