/* Full-bleed canvas with a thin HUD above and a hint line below the board.
   main.js keeps HUD_H / HINT_H px free for them — change both together. */

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background-color: #0b1c18;
  background-image: radial-gradient(120% 90% at 50% 40%, #0f2621 0%, #0b1c18 55%, #06110e 100%);
  color: rgba(214, 245, 228, 0.78);
  font: 15px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Every touch steers: no scrolling, zooming, selection or callouts. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#board {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* Safe-area insets (notches, home indicator), read by main.js. */
#safe {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  visibility: hidden;
  pointer-events: none;
}

#hud {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: calc(env(safe-area-inset-left, 0px) + 16px);
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  height: 48px; /* main.js HUD_H */
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.stat {
  margin: 0;
  min-width: 6em;
  letter-spacing: 0.02em;
}

.stat-best {
  text-align: right;
}

.num {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 255, 242, 0.95);
}

#hint {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: env(safe-area-inset-bottom, 0px);
  height: 44px; /* main.js HINT_H */
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  pointer-events: none;
}

/* Pause button: two bars, or a play triangle while paused. */
#pause {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(214, 245, 228, 0.08);
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

#pause:hover {
  background: rgba(214, 245, 228, 0.16);
}

#pause:focus-visible {
  outline: 2px solid rgba(158, 245, 194, 0.9);
  outline-offset: 2px;
}

#pause::before,
#pause::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 4px;
  height: 12px;
  border-radius: 1px;
  background: rgba(232, 255, 242, 0.85);
}

#pause::before {
  left: 12px;
}

#pause::after {
  right: 12px;
}

#pause[aria-pressed="true"]::before {
  left: 14px;
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent rgba(232, 255, 242, 0.85);
}

#pause[aria-pressed="true"]::after {
  display: none;
}

/* Nothing to pause between rounds. */
html[data-mode="over"] #pause,
html[data-mode="idle"] #pause,
html[data-mode="demo-end"] #pause {
  visibility: hidden;
}

.noscript {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
