.prose code {
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.prose section {
  margin-bottom: 40px;
}

.prose h2 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose p {
  margin-bottom: 12px;
}

.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 6px;
}

.prose b {
  color: var(--text);
}

.prose table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  white-space: nowrap;
}

.prose td {
  color: var(--text-muted);
}

/* 操作ボタン */
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.action {
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.action:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.action:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
}

.status {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 追跡中の全画面ステージ */
.stage {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: var(--base);
}

.stage[hidden] {
  display: none;
}

#cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0.16;
  filter: grayscale(1);
}

#overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* 視線で押す的。実マウスでは押せないよう pointer-events を切ってある */
.targets {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 40px);
  pointer-events: none;
}

.target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: clamp(88px, 12vw, 132px);
  height: clamp(88px, 12vw, 132px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.target-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.target-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.target.is-hover {
  border-color: var(--accent);
  background: rgba(217, 143, 174, 0.06);
}

.target.is-hover .target-key {
  color: var(--accent);
}

/* PREVIEW 中はカメラの写りを確認できるようにする */
.stage.is-preview #cam {
  opacity: 1;
  filter: none;
}

.hud-select {
  max-width: 148px;
  padding: 3px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.stage-back {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 3;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.stage-back:hover {
  color: var(--accent);
}

.hud {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.hud-item {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.hud-key {
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.hud-val {
  min-width: 6em;
  text-align: right;
  color: var(--text);
}

.hud-actions {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 24px;
}

.hud-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.hud-slider input[type="range"] {
  width: 108px;
  accent-color: var(--accent);
}

.hud-hint.is-alert {
  color: var(--text);
}

.hud-hint {
  position: absolute;
  bottom: 78px;
  left: 24px;
  right: 24px;
  z-index: 3;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .prose table {
    font-size: 0.82rem;
  }

  .prose th,
  .prose td {
    padding: 8px;
  }

  .hud-slider input[type="range"] {
    width: 72px;
  }
}
