*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #182858;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  position: fixed;
  inset: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  height: 100dvh;
}

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

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
}

#parent-hotspot {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: calc(8px + env(safe-area-inset-right, 0px));
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 20;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  cursor: pointer;
}

#parent-hotspot .glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 2px rgba(16, 20, 48, 0.55);
}

#parent-hotspot .ring {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
  pointer-events: none;
}

#parent-hotspot .ring-bg,
#parent-hotspot .ring-fg {
  fill: none;
  stroke-width: 3;
}

#parent-hotspot .ring-bg {
  stroke: transparent;
}

#parent-hotspot .ring-fg {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
}

#parent-hotspot.holding .ring-bg {
  stroke: rgba(255, 255, 255, 0.35);
}

#parent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 70, 0.35);
  z-index: 30;
  touch-action: auto;
}

#parent-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: auto;
  z-index: 31;
  background: #fff8f0;
  color: #2c3a4a;
  border-radius: 28px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 40px rgba(40, 50, 80, 0.22);
}

#parent-panel h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  text-align: center;
}

#parent-panel .hint {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.9rem;
  color: #5a6a7a;
}

.btn {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: #e6eef5;
  color: #2c3a4a;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.btn.primary {
  background: #7ec8e8;
  color: #153044;
}

.btn.ghost {
  background: transparent;
  color: #5a6a7a;
  margin-bottom: 0;
}

.btn:active {
  filter: brightness(0.95);
}

.session {
  margin: 6px 0 14px;
}

.session-label {
  font-size: 0.85rem;
  color: #5a6a7a;
  margin-bottom: 8px;
  text-align: center;
}

.pills {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.pill {
  padding: 12px 8px;
  border: 0;
  border-radius: 14px;
  background: #e6eef5;
  color: #2c3a4a;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.pill.on {
  background: #f4c27a;
  color: #3a2a10;
}

[hidden] {
  display: none !important;
}

#safe-probe {
  position: absolute;
  pointer-events: none;
  visibility: hidden;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
