:root {
  --yellow: #ffd400;
  --panel: rgba(0, 0, 0, 0.8);
  --chip: #1e2a44;
  --text: #fff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text);
  font: 16px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none;
}
#video { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#gl, #gesture { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#gesture { touch-action: none; }

#reticle {
  position: fixed; left: 50%; top: 50%; pointer-events: none;
  width: 35vmin; height: 35vmin; transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 50%;
}
#reticle.hit { border: 4px solid var(--yellow); }

.panel { position: fixed; left: 0; right: 0; background: var(--panel); padding: 6px 8px; }
#top { top: 0; padding-top: calc(6px + env(safe-area-inset-top)); }
#bottom { bottom: 0; padding: 10px 10px calc(8px + env(safe-area-inset-bottom)); }
.row { display: flex; gap: 6px; margin-top: 6px; }
.row:first-child { margin-top: 0; }
button {
  flex: 1; min-height: 52px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--chip); color: #fff; font: 600 17px/1 inherit; font-family: inherit; padding: 0 4px;
  white-space: nowrap; touch-action: manipulation;
}
button.on { background: var(--yellow); color: #000; }
button:active { filter: brightness(1.3); }
.status { display: flex; align-items: center; margin-top: 4px; min-height: 24px; font-size: 15px; }
#status { flex: 1; }
#badge { background: var(--yellow); color: #000; font-weight: 700; border-radius: 8px; padding: 2px 8px; }
.slider { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.slider span { width: 96px; }
.slider input { flex: 1; height: 36px; accent-color: var(--yellow); }
.hint { margin: 6px 0 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.6); }

#toast {
  position: fixed; left: 50%; bottom: calc(230px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); background: var(--panel); border-radius: 12px; padding: 12px 16px;
  font-size: 18px; text-align: center;
}

#start {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #050a1a; padding: 16px;
}
#start[hidden] { display: none; }
.card { max-width: 420px; text-align: center; }
.card h1 { font-size: 34px; margin: 0 0 8px; color: var(--yellow); }
.card p { margin: 10px 0; }
.y { color: var(--yellow); }
.big { width: 100%; min-height: 64px; font-size: 22px; background: var(--yellow); color: #000; margin: 14px 0 4px; }
.small { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
#err { color: #ff9d9d; }
[hidden] { display: none !important; }
