:root {
  --ink: #f4ede4;
  --muted: rgba(244, 237, 228, 0.66);
  --panel: rgba(36, 20, 16, 0.72);
  --line: rgba(214, 180, 140, 0.28);
  --gold: #c9a27a;
  --wine: #2b1410;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b0f0c; color: var(--ink);
  font-family: Inter, system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.brand { position: fixed; top: 18px; left: 22px; pointer-events: none; text-shadow: 0 1px 12px rgba(0,0,0,.45); }
.brand-title { font-family: "Cormorant Garamond", serif; font-size: 30px; letter-spacing: .08em; text-transform: uppercase; }
.brand-sub { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

.intro { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(43,20,16,.55), rgba(20,10,8,.88)); z-index: 10; transition: opacity .5s; }
.intro.hidden { opacity: 0; pointer-events: none; }
.intro-card { max-width: 440px; text-align: center; }
.intro-kicker { color: var(--gold); letter-spacing: .3em; text-transform: uppercase; font-size: 11px; }
.intro h1 { font-family: "Cormorant Garamond", serif; font-weight: 400; font-size: 64px; margin: 6px 0 10px; letter-spacing: .06em; }
.intro p { color: var(--muted); line-height: 1.6; margin: 0 0 26px; }
.intro-help { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 2; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin: 0 2px; font-family: inherit; font-size: 11px; }

.btn-primary { background: var(--gold); color: var(--wine); border: 0; padding: 13px 34px; border-radius: 999px;
  font: 500 14px Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.btn-primary:disabled { opacity: .5; cursor: progress; }

.panel { position: fixed; top: 16px; right: 16px; width: 248px; background: var(--panel); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px; z-index: 5; }
.panel section { padding: 10px 0; border-bottom: 1px solid var(--line); }
.panel section:last-child { border-bottom: 0; }
.panel-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
  display: flex; justify-content: space-between; }
.rooms { display: flex; flex-wrap: wrap; gap: 5px; }
.rooms button, .seg button { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px; font: 12px Inter, sans-serif; cursor: pointer; }
.rooms button:hover, .seg button:hover { border-color: var(--gold); }
.seg { display: flex; gap: 5px; margin-top: 8px; }
.seg button.on { background: var(--gold); color: var(--wine); border-color: var(--gold); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.toggles { display: flex; gap: 14px; }
.toggles label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.toggles input { accent-color: var(--gold); }
#vr-slot:empty { display: none; }
#vr-slot button { position: static !important; width: 100% !important; left: auto !important; bottom: auto !important;
  border-radius: 999px !important; border: 1px solid var(--gold) !important; color: var(--ink) !important;
  background: transparent !important; font: 12px Inter, sans-serif !important; padding: 8px !important; }

.minimap { position: fixed; left: 16px; bottom: 16px; width: 150px; height: 195px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 4; }

.hint { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12px; color: var(--muted); opacity: 0;
  transition: opacity .4s; pointer-events: none; }
.hint.show { opacity: 1; }

.joystick { position: fixed; right: 26px; bottom: 26px; width: 110px; height: 110px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(36,20,16,.35); z-index: 6; touch-action: none; }
.joystick .knob { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: var(--gold); opacity: .85; }

.touch-only { display: none; }
@media (pointer: coarse) {
  .touch-only { display: block; }
  .desktop-only { display: none; }
}
@media (max-width: 640px) {
  .brand { left: 16px; top: 14px; }
  .brand-title { font-size: 22px; }
  .panel { top: auto; bottom: 150px; right: 16px; left: 16px; width: auto; max-height: 40vh; overflow: auto; }
  .panel.collapsed section:not(:first-child) { display: none; }
  .minimap { width: 96px; height: 125px; }
  .intro h1 { font-size: 46px; }
}
