:root { --bg: #0b0f17; --panel: #111725; --btn: #2a3446; --btn2: #1e2636; --text: #e8ecf2; --muted: #9aa6b8; --accent: #3d7bff; }
[hidden] { display: none !important; } /* overlays use display:flex; keep the hidden attribute authoritative */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }
#app { display: flex; height: 100dvh; }
#stageWrap { flex: 3; position: relative; min-width: 0; }
#stage { width: 100%; height: 100%; display: block; touch-action: none; }
#panel { flex: 2; overflow-y: auto; padding: 16px 18px 40px; max-width: 520px; }
@media (orientation: portrait) {
  #app { flex-direction: column; }
  #stageWrap { flex: none; height: 52dvh; }
  #panel { flex: 1; max-width: none; }
}
h1 { font-size: 26px; margin: 4px 0 2px; }
#status { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.label { display: block; color: #cfd6e2; margin: 16px 0 4px; font-size: 15px; }
.hint { color: #6f7a8c; font-size: 13px; line-height: 1.5; }
.row { display: flex; gap: 6px; }
.row > * { flex: 1; }
.btn { position: relative; overflow: hidden; width: 100%; margin-top: 10px; min-height: 52px; border: 0; border-radius: 14px;
  background: var(--btn); color: #fff; font-size: 17px; font-weight: 600; cursor: pointer;
  transition: transform .26s cubic-bezier(.34,1.56,.64,1), background-color .25s; font-family: inherit; }
.btn:active, .btn.pressed { transform: scale(.96); transition-duration: .09s; }
.btn.primary { background: var(--accent); font-size: 20px; }
.btn.subtle { background: var(--btn2); font-size: 15px; }
.btn.small { min-height: 44px; margin-top: 0; font-size: 15px; }
.btn.active { background: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
.srow { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.srow .btn { flex: 0 0 140px; margin-top: 0; min-height: 48px; font-size: 16px; }
.srow input { flex: 1; }
.srow input:disabled { opacity: .35; }
/* water-drop ripple on buttons */
.drop { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0);
  background: rgba(255,255,255,.35); animation: drop .6s ease-out forwards; }
@keyframes drop { to { transform: scale(2.6); opacity: 0; } }
#darkOverlay { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2); font-size: 15px; text-align: center; white-space: pre-line; z-index: 20; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: rgba(30,38,54,.96); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 15px; z-index: 40; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 30; }
.sheet { background: var(--panel); border-radius: 18px; width: min(560px, 92vw); max-height: 82dvh; display: flex; flex-direction: column; }
.sheetHead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; gap: 12px; }
.sheetHead h2 { font-size: 19px; margin: 0; }
.sheetHead .btn { width: auto; padding: 0 16px; }
#modalBody { overflow-y: auto; padding: 6px 18px 18px; white-space: pre-line; line-height: 1.55; font-size: 15px; }
#modalBody label { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; white-space: normal; }
#modalBody input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
#placesView { position: fixed; inset: 0; background: var(--bg); z-index: 25; display: flex; flex-direction: column; }
#placesView .bar { display: flex; gap: 6px; padding: 10px; }
#placesView .bar .btn { flex: 1; }
#placesBody { flex: 1; position: relative; min-height: 0; }
#radar, #map { position: absolute; inset: 0; width: 100%; height: 100%; }
#radar { touch-action: none; }
#placeInfo { margin: 0; padding: 12px 16px 18px; color: #cfd6e2; font-size: 15px; white-space: pre-line; }
