:root {
  color-scheme: light;
  --bg: #082f49;
  --ink: #f0f9ff;
  --accent: #fbbf24;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  user-select: none;
  -webkit-user-select: none;
}

.topbar { display: flex; align-items: center; gap: 8px; padding: 2px 2px 6px; }
.title { font-weight: 800; font-size: 20px; }
.title small { font-weight: 500; font-size: 12px; color: #7dd3fc; }
.spacer { flex: 1; }
.hud { font-size: 15px; background: rgba(0,0,0,.35); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.hud .sep { color: #38bdf8; margin: 0 4px; }
.hud .opt { color: #bae6fd; font-size: 13px; }

#status { font-size: 14px; color: #fde68a; min-height: 20px; margin: 0 2px 6px; }

#stage {
  width: 100%;
  height: auto;
  aspect-ratio: 440 / 360;
  background: linear-gradient(#0c4a6e 0 62%, #14532d 62% 100%);
  border-radius: 12px;
  touch-action: none;
  cursor: crosshair;
}

#statusbar { margin-top: 8px; }
#statusbar .actions { display: flex; gap: 8px; justify-content: center; }
.btn {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.3);
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #082f49; }

#how {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(0,0,0,.3);
  border-radius: 10px;
  padding: 8px 12px;
}
#how.hidden { display: none; }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(0,0,0,.85);
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  max-width: 92vw;
  text-align: center;
}
#toast.show { opacity: 1; }

html.touch .btn { padding-top: 10px; padding-bottom: 10px; }
