:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #080b12;
  color: #e8edf7;
  --muted: #96a2b8;
  --panel: #111722;
  --line: #263247;
  --accent: #72e4c2;
  --accent-dark: #092b26;
  --danger: #ff858d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0, #153044 0, transparent 38%), #080b12; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 56px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: var(--muted); }
.topbar a { color: var(--accent); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.panel { background: color-mix(in srgb, var(--panel) 95%, transparent); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 36px); margin-bottom: 20px; box-shadow: 0 20px 60px #0005; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 12px; }
h2 { font-size: 1.15rem; }
.eyebrow { color: var(--accent); letter-spacing: .18em; font-size: .72rem; font-weight: 800; margin-bottom: 8px; }
.status, .hint, .room p, .notice { color: var(--muted); line-height: 1.65; }
.status.error { color: var(--danger); }
.badge { border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; white-space: nowrap; font-size: .8rem; }
.badge.live { border-color: #3d8c78; background: var(--accent-dark); color: var(--accent); }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.controls label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #1a2331; color: #e8edf7; padding: 11px 18px; min-height: 44px; cursor: pointer; text-decoration: none; font-weight: 700; }
.button:hover { filter: brightness(1.12); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { background: var(--accent); color: #07251f; border-color: var(--accent); }
.button.danger { color: var(--danger); }
select, input { color: #e8edf7; background: #0a0f18; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-height: 44px; }
.room { border-top: 1px solid var(--line); padding-top: 20px; }
.room label { display: block; font-weight: 700; margin-bottom: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.room p { font-size: .85rem; margin: 10px 0 0; }
.room p.warning { color: #ffbf69; }
.preview { display: block; width: 100%; max-height: 55vh; margin-top: 24px; border-radius: 12px; background: #000; aspect-ratio: 16/9; object-fit: contain; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.stats div { background: #0a0f18; border-radius: 10px; padding: 14px; }
.stats dt { color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hint { font-size: .82rem; margin-bottom: 0; }
code { color: var(--accent); }
.landing { width: min(1120px, calc(100% - 32px)); margin: auto; padding: 10vh 0 48px; }
.hero { max-width: 760px; }
.hero .lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.7; margin-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 56px 0 24px; }
.steps article { position: relative; border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: 24px; }
.steps article > span { color: var(--accent); font-size: .8rem; font-weight: 800; }
.steps h2 { margin: 12px 0; }
.steps p { color: var(--muted); line-height: 1.6; margin: 0; }
.notice { border-left: 2px solid #b68c4d; padding-left: 14px; }
.viewer-layout { max-width: 900px; }
.viewer-video { background: #000; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
#xr-canvas { width: 1px; height: 1px; opacity: .01; position: absolute; pointer-events: none; }

@media (max-width: 700px) {
  .steps, .stats { grid-template-columns: 1fr; }
  .copy-row { flex-direction: column; }
  .panel-heading { flex-direction: column; }
}
