* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fb4dc; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: #1c2430; touch-action: none; user-select: none; -webkit-user-select: none; }
#app canvas { display: block; }

/* splash: shown for ~3 s on load, then you're in the game */
#splash { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; z-index: 50; transition: opacity .7s; }
#splash.out { opacity: 0; }
.splash-inner { display: flex; align-items: center; gap: 2.2vw; color: #fff; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; animation: splashIn 1.2s ease-out both; }
.splash-made { font-weight: 800; font-size: 4.8vw; line-height: 1.12; }
.splash-logo { width: 14vw; height: auto; }
.splash-name { font-weight: 800; font-size: 5vw; }
@keyframes splashIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

button { font: 700 16px system-ui, sans-serif; border: 0; cursor: pointer; border-radius: 12px; background: #4f4f4f; color: #fff; box-shadow: 0 4px 0 #2c2c2c; }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 #2c2c2c; }
#btn-vr { position: fixed; top: 14px; right: 14px; padding: 12px 18px; z-index: 10; }
#btn-vr[hidden], #btn-vr.in-vr { display: none; }
#load-error { position: fixed; bottom: 10px; left: 10px; color: #b00; font-weight: 700; z-index: 60; }
#load-error[hidden] { display: none; }

#touch-ui[hidden], #touch-ui.off { display: none; }
#stick { position: fixed; left: 40px; bottom: 60px; width: 120px; height: 120px; border-radius: 50%; background: #ffffff44; border: 2px solid #fff8; opacity: .35; pointer-events: none; }
#knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: #fffc; }
#touch-ui button { position: fixed; padding: 0; font-size: 16px; opacity: .85; }
#btn-jump { right: 28px; bottom: 50px; width: 96px; height: 96px; border-radius: 50%; }
#btn-view { right: 140px; bottom: 40px; width: 70px; height: 50px; }
#btn-respawn { right: 30px; top: 70px; width: 50px; height: 50px; }
#btn-grab { right: 140px; bottom: 110px; width: 70px; height: 50px; }

#toast {
  position: fixed; top: 22%; left: 50%; transform: translate(-50%, -50%) scale(.85); opacity: 0; transition: all .2s;
  padding: 10px 20px; border-radius: 12px; background: #0f0f12cc; color: #fff; pointer-events: none; white-space: nowrap;
  font: 800 clamp(18px, 4vw, 34px) system-ui, sans-serif;
}
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

#flash { position: fixed; inset: 0; background: #ff0000; opacity: 0; pointer-events: none; }
