html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: #0b0806; overflow: hidden;
  overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#unity-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
  display: block; background: #0b0806; outline: none;
}

#loader {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 30% 50%, rgba(214,130,50,0.12), transparent 60%), #0b0806;
  color: #f3ead8; font-family: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  transition: opacity 0.5s ease;
}
#loader.done { opacity: 0; pointer-events: none; }
#loader .title { font-weight: 800; letter-spacing: 0.16em; font-size: clamp(22px, 4vw, 40px); }
#loader .title span { color: #d4af37; }
#loader .bar { width: min(420px, 70vw); height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
#bar-fill { width: 0; height: 100%; background: linear-gradient(90deg, #b8862e, #f2d06b); transition: width 0.2s ease; }
#loader-text { font-size: 14px; color: rgba(243,234,216,0.62); }
#loader.error #loader-text { color: #e0482f; }
#loader .flame {
  width: 26px; height: 42px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6dc, #f2d06b 35%, #e0782a 70%, transparent 72%);
  filter: drop-shadow(0 0 18px rgba(242,160,60,0.8));
  animation: flicker 1.6s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(-2deg); }
  50% { transform: scale(0.94, 1.06) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) { #loader .flame { animation: none; } }

#rotate {
  position: fixed; inset: 0; display: none; z-index: 10;
  align-items: center; justify-content: center; flex-direction: column; gap: 22px;
  background: #0b0806; color: #f3ead8; text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 18px;
}
#rotate small { color: rgba(243,234,216,0.6); font-size: 14px; }
#rotate .phone {
  width: 46px; height: 80px; border: 3px solid #d4af37; border-radius: 10px;
  animation: turn 2.2s ease-in-out infinite;
}
@keyframes turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }

#banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20; font-family: system-ui, sans-serif; }
#banner .msg { margin-top: 6px; padding: 10px 16px; border-radius: 12px; background: rgba(22,18,14,0.92); color: #f3ead8; border: 1px solid rgba(212,175,55,0.3); font-size: 14px; }
#banner .msg.error { border-color: #e0482f; }
#banner .msg.warning { border-color: #d4af37; }
