/* Plinth: a dark room, bone type, one copper accent. Instrument Serif and Archivo. */
:root { --bg: #141412; --bone: #e9e2d4; --mute: #a39d91; --line: rgba(233, 226, 212, .18); --copper: #c98b63; --serif: "Instrument Serif", Georgia, serif; --sans: "Archivo", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--bone); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.demo { display: flex; justify-content: space-between; gap: 12px; padding: 8px 20px; background: #24221f; color: #cfc8ba; font-size: 13px; position: relative; z-index: 5; }
.demo a { white-space: nowrap; color: var(--bone); }
.room { position: relative; height: calc(100vh - 37px); min-height: 560px; overflow: hidden; }
.stage { position: absolute; inset: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; opacity: 0; transition: opacity 1.2s ease; }
.stage canvas.on { opacity: 1; }
.stage canvas:active { cursor: grabbing; }
.still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.room::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(20,20,18,.55), transparent 22%, transparent 55%, rgba(20,20,18,.75)); }
.bar, .note, .light, .index, .hint { position: absolute; z-index: 3; }
.bar { top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 20px; padding: 18px 28px; }
.mark { font-family: var(--serif); font-size: 30px; text-decoration: none; letter-spacing: .01em; }
.show { margin: 0; color: var(--mute); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.ghost { margin-left: auto; background: rgba(20,20,18,.4); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; backdrop-filter: blur(8px); min-height: 40px; }
.note { left: 28px; bottom: 28px; width: min(440px, calc(100% - 56px)); background: rgba(20, 20, 18, .62); backdrop-filter: blur(14px); border: 1px solid var(--line); padding: 22px 24px; }
.no { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); }
.note h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 48px); line-height: 1; margin: 8px 0 6px; }
.mat { margin: 0 0 12px; color: var(--mute); font-size: 13.5px; }
.text { margin: 0; font-size: 15px; color: #ddd6c8; min-height: 3em; }
.nav { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--mute); }
.nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 16px; }
.nav button:hover { border-color: var(--bone); }
.light { right: 28px; bottom: 28px; width: 280px; background: rgba(20, 20, 18, .62); backdrop-filter: blur(14px); border: 1px solid var(--line); padding: 16px 18px; }
.light label { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); }
.light output { color: var(--bone); }
.light input { width: 100%; margin: 12px 0 6px; accent-color: var(--copper); height: 28px; }
.help { margin: 0; font-size: 12px; color: var(--mute); }
.index { right: 28px; top: 88px; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.index button { display: flex; gap: 12px; align-items: baseline; background: none; border: 0; cursor: pointer; padding: 6px 4px; text-align: left; color: var(--mute); font-size: 14px; width: 100%; }
.index button span { font-size: 11px; letter-spacing: .1em; width: 22px; }
.index button[aria-current="true"] { color: var(--bone); }
.index button[aria-current="true"] span { color: var(--copper); }
.hint { left: 50%; top: 24px; transform: translateX(-50%); margin: 0; font-size: 12.5px; color: var(--mute); pointer-events: none; transition: opacity .6s; }
.fallback .hint { display: none; }
@media (max-width: 860px) {
  .room { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .stage { position: relative; height: 62vh; min-height: 380px; }
  .room::after { display: none; }
  .bar { padding: 14px 16px; }
  .show { display: none; }
  .note, .light { position: relative; left: auto; right: auto; bottom: auto; width: auto; margin: 0 16px 12px; background: #1c1b18; backdrop-filter: none; }
  .index { position: relative; top: auto; right: auto; margin: 0 16px 24px; grid-template-columns: 1fr 1fr; }
  .hint { top: auto; bottom: auto; position: absolute; top: calc(62vh - 34px); }
  .demo { flex-direction: column; gap: 2px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
