:root{
  --hud-bg: rgba(0,0,0,0.45);
  --stroke: rgba(255,255,255,0.22);
}

html, body {
  height: 100%;
  margin: 0;
  background: #000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

#app{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#cam{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: saturate(1.05) contrast(1.03);
}

#stage{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#hud{
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  color: #fff;
  z-index: 10;
  pointer-events: none;
}

#hud .row{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  pointer-events: auto;
}

#btnStart{
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.pill{
  background: var(--hud-bg);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  font-size: 14px;
}

.pill select{
  background: transparent;
  color: #fff;
  border: none;
  outline: none;
}

.pill input[type="checkbox"]{
  width: 18px;
  height: 18px;
}

.hint{
  margin-top: 10px;
  background: var(--hud-bg);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
  font-size: 14px;
  max-width: 720px;
}

#overlayMessage{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 5;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  pointer-events: none; /* 重要：下のボタンをクリックできるように */
}

#overlayMessage.hidden{
  display: none;
}

#overlayMessage .card{
  width: min(520px, calc(100% - 32px));
  border-radius: 18px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  background: rgba(255,255,255,0.06);
}

#overlayMessage h1{
  margin: 0 0 10px;
  font-size: 22px;
}

#overlayMessage p{
  margin: 8px 0;
  line-height: 1.5;
}

#overlayMessage .small{
  opacity: 0.85;
  font-size: 13px;
}
