[hidden] { display: none !important; }
:root { color-scheme: dark; font: 15px system-ui, sans-serif; color: #ede5d1; background: #080913; }
body { margin: 0; }
main { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; }
#game { position: relative; width: min(96vw, calc((100vh - 68px) * 1.6), 1280px); width: min(96vw, calc((100dvh - 68px) * 1.6), 1280px); aspect-ratio: 16 / 10; background: #0d0c1b; }
#game:fullscreen { width: 100%; height: 100%; }
#unity-canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
#unity-canvas:focus-visible { outline: 1px solid #d4a84f; outline-offset: -1px; }
#loading, #rotate { display: grid; place-content: center; justify-items: center; gap: 14px; background: #0d0c1b; text-align: center; }
#loading { position: absolute; inset: 0; padding: 16px; }
#loading strong, #rotate strong { color: #f4ce79; font-size: clamp(20px, 4vw, 34px); letter-spacing: 0.12em; }
progress { width: min(220px, 65vw); accent-color: #e5b855; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: #d1c7b6; font-size: 13px; }
button { color: inherit; font: inherit; }
#fullscreen { border: 1px solid #655133; border-radius: 4px; background: #191626; padding: 6px 12px; cursor: pointer; }
#fullscreen:disabled { opacity: 0.45; }
.touch footer { display: none; }
.touch #game { width: min(100vw, calc(100vh * 1.78)); width: min(100vw, calc(100dvh * 1.78)); aspect-ratio: auto; height: 100vh; height: 100dvh; }
#rotate { position: fixed; inset: 0; padding: 16px; }
#touch-controls { position: absolute; inset: 0; pointer-events: none; user-select: none; -webkit-user-select: none; }
#stick, #actions button { pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; }
#stick {
  position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 100px; width: clamp(90px, 27dvh, 150px); aspect-ratio: 1; display: grid; place-items: center;
  border: 1px solid #7dccd9; border-radius: 50%; background: #101a28bb; box-shadow: inset 0 0 0 5px #5c9bad35;
}
#knob {
  width: 40%; aspect-ratio: 1; border: 1px solid #b0eff7; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #4c8795, #233e4d); pointer-events: none;
}
#actions {
  position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; gap: clamp(7px, 2dvh, 14px);
}
#actions button {
  width: 55px; width: clamp(50px, 16dvh, 82px); aspect-ratio: 1; padding: 0;
  border: 1px solid #ceac62; border-radius: 50%; background: #211a32e6; box-shadow: inset 0 0 0 3px #d4aa5738;
  color: #f5deaa; font-size: 12px; font-size: clamp(11px, 3dvh, 15px); font-weight: 700; text-transform: uppercase;
}
#actions button[data-ready="false"] { opacity: 0.50; }
#actions button.slash { border-color: #a8eaf5; color: #dbfaff; background: #18314be6; box-shadow: inset 0 0 0 3px #66dbee50; }
#actions button.surge[data-ready="true"] { background: #6c4128; border-color: #ffda7c; }
#actions button[data-held="true"] { scale: 0.92; filter: brightness(1.35); }
