* { 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; }
#enter { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle, #0008, #000c); color: #fff; cursor: pointer; text-align: center; padding: 24px; }
#enter[hidden] { display: none; }
.enter-title { font: 800 clamp(28px, 6vw, 64px) system-ui, sans-serif; letter-spacing: 3px; }
#enter-msg { font: 600 clamp(16px, 3vw, 28px) system-ui, sans-serif; opacity: .85; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
#load-error { position: fixed; bottom: 10px; left: 10px; color: #b00; font-weight: 700; z-index: 60; }
#load-error[hidden] { display: none; }


#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; }
