/*
Theme Name: sErgii0o's sandbox v3.4
Theme URI: https://sergii0o.com
Author: Sergio Morales
Description: Dark workshop portfolio for prints, drones, AI, and field work. v3.4: the night bench in a closed U-shaped room with a bigger centred laptop and an 80s radio-cassette that plays a song through YouTube's player, plus a static fallback.
Version: 3.4.0
Text Domain: sergii0o-sandbox
*/

:root {
  --bg: #0b0b0b;
  --panel: #111213;
  --panel-2: #161719;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --cyan: #2ee6d6;
  --cyan-soft: rgba(46, 230, 214, 0.10);
  --cyan-line: rgba(46, 230, 214, 0.35);
  --head: #f3f4f5;
  --text: #b9bec4;
  --muted: #80878f;
  --faint: #5c6269;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Sora", "Segoe UI", system-ui, sans-serif;
  --pad-section: clamp(72px, 10vw, 128px);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--cyan); color: #04201e; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(11, 11, 11, 0.8);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: var(--mono);
  color: var(--head);
  letter-spacing: 0.04em;
  font-size: 14px;
  font-weight: 500;
}
.logo::before { content: "▍"; color: var(--cyan); margin-right: 6px; font-size: 12px; }
.nav-links { display: flex; gap: 28px; color: var(--muted); font-size: 13px; font-family: var(--mono); letter-spacing: 0.02em; }
.nav-links a { padding: 4px 0; transition: color .2s ease; }
.nav-links a:hover { color: var(--head); }
.nav-links a.active { color: var(--head); box-shadow: inset 0 -1px 0 var(--cyan); }

/* ---------- type ---------- */
h1, h2, h3 { color: var(--head); font-weight: 600; }
h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  font-weight: 700;
}
h2 {
  font-size: clamp(26px, 3.1vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 24ch;
}
.lede { color: var(--text); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; max-width: 38ch; margin: 0 0 36px; }

/* Kicker = mono label; "Fig 0N" = the recurring figure-caption motif. */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.kicker .fig {
  color: var(--cyan);
  letter-spacing: 0.08em;
  padding-right: 12px;
  border-right: 1px solid var(--line-2);
}
.hero .kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0 clamp(64px, 8vw, 104px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 72% 40%, black 15%, transparent 68%);
  mask-image: radial-gradient(ellipse at 72% 40%, black 15%, transparent 68%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cyan); color: #04201e;
  border: 0; border-radius: 999px;
  padding: 13px 20px; font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  transition: filter .2s ease, transform .2s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.hero-visual { position: relative; min-height: 320px; }
.wire {
  position: relative;
  width: 100%; height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 70% 40%, rgba(46,230,214,0.07), transparent 45%),
    linear-gradient(180deg, #111213, #0c0c0d);
  overflow: hidden;
}
.wire svg { opacity: 0.9; }
.wire-cap {
  position: absolute; left: 16px; top: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--faint);
}
.term {
  position: absolute; right: 18px; bottom: 18px;
  width: min(300px, 90%);
  background: rgba(10, 10, 11, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.term b { color: var(--cyan); font-weight: 500; }

/* ---------- sections ---------- */
.section {
  padding: var(--pad-section) 0;
  border-top: 1px solid var(--line);
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 28px; }
.filter {
  border: 1px solid var(--line-2);
  background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 15px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.filter:hover { color: var(--head); border-color: rgba(255,255,255,0.22); }
.filter.is-on { background: var(--cyan-soft); color: var(--cyan); border-color: var(--cyan-line); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: fig;
}
.card {
  counter-increment: fig;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 100%;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.thumb {
  height: 176px;
  position: relative;
  background-color: #0e0f10;
  border-bottom: 1px solid var(--line);
}
.thumb::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
}
.thumb::after {
  content: "Fig 1." counter(fig);
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint);
}
.thumb.drones { background-image: radial-gradient(circle at 50% 42%, #18202a, #0e0f10 68%); }
.thumb.print { background-image: radial-gradient(circle at 40% 58%, #1a2321, #0e0f10 68%); }
.thumb.ai { background-image: radial-gradient(circle at 66% 42%, #171d27, #0e0f10 68%); }
.thumb.deployed { background-image: radial-gradient(circle at 50% 50%, #211c18, #0e0f10 68%); }
.card-body { padding: 20px 20px 24px; }
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.14em; margin-bottom: 10px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; }
.card p { margin: 0; color: var(--text); font-size: 14.5px; line-height: 1.6; }

.stack, .contact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
}
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-family: var(--mono); font-size: 12px; color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px;
}
.contact .lede { max-width: none; }
.contact a { text-decoration: underline; text-decoration-color: var(--cyan-line); text-underline-offset: 4px; word-break: break-word; }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12px; letter-spacing: 0.04em;
  padding: 32px 0 48px;
  font-family: var(--mono);
}

/* Generic pages/posts rendered by index.php */
main.wrap.section { border-top: 0; }
main.wrap.section article { max-width: 70ch; }
main.wrap.section article a { color: var(--cyan); }

/* ---------- reveals (only when main.js added .js; never without JS) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .card.reveal.is-in { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1), border-color .25s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .card:hover, .btn:hover { transform: none; }
}

@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 40px); }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .nav-links { gap: 18px; font-size: 12px; }
  .hero-visual { min-height: 0; }
  .wire { height: 230px; }
  .term { position: relative; right: auto; bottom: auto; width: auto; margin: -40px 14px 0; }
  .thumb { height: 152px; }
  h2 { margin-bottom: 24px; }
}


/* =================================================================
 * v3 — the night bench
 * ================================================================= */
.room { position: relative; background: #060708; border-bottom: 1px solid var(--line); }
.room-stage {
  position: relative; overflow: hidden;
  height: min(max(560px, calc(100svh - 60px - 52px)), 960px);
  background: #060708;
}
.room-poster, .room-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
}
.room-canvas { opacity: 0; transition: opacity .8s ease; display: block; touch-action: manipulation; }
.room.is-live .room-canvas { opacity: 1; }
.room.is-live .room-poster, .room.is-live .room-hotspots { visibility: hidden; transition: visibility 0s .8s; }
/* the poster must line up with the hotspots, so in static mode the picture is shown whole */
.room[data-mode="static"] .room-stage { height: auto; aspect-ratio: 16 / 9; max-height: none; }
.room[data-mode="static"] .room-poster { object-fit: contain; }

.room-hud { position: absolute; inset: 0; pointer-events: none; }
.room-hud > * { pointer-events: auto; }
.room-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: lowercase;
  color: var(--head); background: rgba(8,10,11,.62); border: 1px solid var(--cyan-line);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .4s ease;
}
.room-hint .dim { color: var(--muted); }
.room-hint.is-gone { opacity: 0; }
.room-hint-3d { display: none; }
.room.is-live .room-hint-3d { display: inline; }
.room.is-live .room-hint-static { display: none; }
.room[data-mode="static"] .room-hint { bottom: 12px; }

.room-label {
  position: absolute; left: 0; top: 0; pointer-events: none;
  font-family: var(--mono); font-size: 12px; color: var(--head);
  background: rgba(6,8,9,.85); border: 1px solid var(--cyan-line); border-radius: 6px;
  padding: 6px 10px; white-space: nowrap; box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.room-label .fig { color: var(--cyan); margin-right: 8px; padding-right: 8px; border-right: 1px solid var(--line-2); }

.room-back {
  position: absolute; left: clamp(16px, 3vw, 40px); bottom: 22px;
  font-family: var(--mono); font-size: 12px; color: var(--head);
  background: rgba(8,10,11,.75); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px;
}
.room-back:hover { border-color: var(--cyan-line); }
.room-back kbd { font-family: var(--mono); font-size: 10px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }

.room-panel {
  position: absolute; right: clamp(16px, 3vw, 40px); top: 50%; width: min(360px, calc(100% - 32px));
  transform: translate(16px, -50%); opacity: 0; transition: opacity .25s ease, transform .25s ease;
  background: rgba(10,12,13,.86); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 22px 22px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.room-panel.is-open { opacity: 1; transform: translate(0, -50%); }
.room-panel-fig { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.room-panel-title { font-size: 24px; margin: 0 0 10px; letter-spacing: -0.02em; outline: none; }
.room-panel-body { font-size: 15px; color: var(--text); }
.room-panel-body p { margin: 0 0 14px; }
.room-panel-body ol, .room-panel-body ul { margin: 0 0 14px; padding-left: 20px; }
.room-panel-body li { margin: 4px 0; }
.room-check { list-style: none; padding-left: 0 !important; font-family: var(--mono); font-size: 14px; }
.room-check li::before { content: "☐"; color: var(--muted); margin-right: 10px; }
.room-check li.done::before { content: "☑"; color: var(--cyan); }
.room-panel-links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.room-panel-close {
  position: absolute; right: 10px; top: 8px; width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 0; color: var(--muted); font-size: 22px; line-height: 1;
}
.room-panel-close:hover { color: var(--head); }

.room-modes { position: absolute; right: clamp(16px, 3vw, 40px); bottom: 22px; display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; }
.room-modes a, .room-modes span { color: var(--muted); background: rgba(8,10,11,.6); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; display: none; }
.room-modes a:hover { color: var(--head); border-color: var(--cyan-line); }
.room.is-live .room-static { display: inline-block; }
.room.is-loading:not(.is-live) .room-loading { display: inline-block; }

/* static hotspots */
.room-hotspots { position: absolute; inset: 0; }
.room[data-mode="room"] .room-hotspots { pointer-events: none; }
.hotspot { position: absolute; border-radius: 10px; outline-offset: 0; }
.hotspot-cap {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 11px; color: var(--head); white-space: nowrap;
  background: rgba(6,8,9,.78); border: 1px solid var(--cyan-line); border-radius: 999px; padding: 4px 9px;
  opacity: 0; transition: opacity .2s ease;
}
.hotspot-cap b { color: var(--cyan); font-weight: 500; margin-right: 4px; }
.hotspot:hover, .hotspot:focus-visible { box-shadow: inset 0 0 0 1px var(--cyan-line), 0 0 30px rgba(46,230,214,.15); background: rgba(46,230,214,.05); }
.hotspot:hover .hotspot-cap, .hotspot:focus-visible .hotspot-cap { opacity: 1; }
@media (hover: none) { .room[data-mode="static"] .hotspot-cap { opacity: .92; font-size: 10px; padding: 3px 7px; } }

/* plain index under the stage: real links in every mode */
.bench-index { border-top: 1px solid var(--line); background: #08090a; }
.bench-index ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 16px 0; margin: 0 auto; font-family: var(--mono); font-size: 12px; }
.bench-index a { color: var(--muted); display: inline-flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.bench-index a:hover, .bench-index a:focus-visible { color: var(--head); }
.bench-index .fig { color: var(--cyan); }
.bench-index em { font-style: normal; color: var(--faint); }

/* reading list */
.reading { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 640px; counter-reset: r; }
.reading li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); counter-increment: r; }
.reading li::before { content: "0" counter(r); font-family: var(--mono); color: var(--cyan); font-size: 12px; margin-right: 14px; padding-top: 3px; }
.reading b { color: var(--head); font-weight: 600; flex: 1; }
.reading span { color: var(--muted); font-family: var(--mono); font-size: 13px; }

@media (max-width: 767px) {
  .room-modes { bottom: 6px; right: 6px; font-size: 10px; }
  .room-modes a, .room-modes span { padding: 3px 8px; }
  .room[data-mode="static"] .room-hint { display: none; }
  .room[data-mode="static"] .hotspot-cap { font-size: 9px !important; padding: 2px 6px !important; }
  .room[data-mode="static"] .hotspot-cap .hc-text { display: none; }
  .room-panel { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; transform: translateY(16px); }
  .room-panel.is-open { transform: none; }
  .room-hint { font-size: 11px; }
  .bench-index ol { gap: 4px 16px; }
  .bench-index em { display: none; }
  .reading li { flex-direction: column; gap: 2px; }
}
@media (max-width: 479px) { .nav-links { gap: 18px; } .nav-links a[href="#bench"] { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .room-canvas, .room-panel, .room-hint, .hotspot-cap { transition: none; }
}

/* =================================================================
 * v3.1 — overlay nav, full-bleed stage, keys/pills, credits, static banner
 * ================================================================= */
.nav-links a { text-transform: uppercase; letter-spacing: .16em; font-size: 11.5px; }
@media (min-width: 768px) {
  .site-header.is-overlay {
    position: fixed; left: 0; right: 0; top: 0;
    background: transparent; border-bottom-color: transparent;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transition: background-color .3s ease, border-color .3s ease;
  }
  .site-header.is-overlay::before { /* soft scrim so the nav stays readable over the scene */
    content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
    background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); transition: opacity .3s ease;
  }
  .site-header.is-overlay .nav-links { color: rgba(236,240,241,.78); }
  .site-header.is-overlay.is-solid {
    background: rgba(11, 11, 11, 0.82); border-bottom-color: var(--line);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .site-header.is-overlay.is-solid::before { opacity: 0; }
  .room-stage { height: max(600px, 100svh); max-height: none; }
  .room[data-mode="static"] .room-stage { padding-top: 0; }
}

.room-hud kbd {
  font-family: var(--mono); font-size: 10px; color: var(--head); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 0 5px; background: rgba(255,255,255,.04);
}
.room-modes { right: auto; left: clamp(16px, 3vw, 40px); }
.room.is-focused .room-modes { display: none; }
.room-keys, .room-pills { display: none; }
.room.is-live .room-keys, .room.is-live .room-pills { display: flex; }
.room-keys {
  position: absolute; right: clamp(16px, 3vw, 40px); bottom: 62px; margin: 0; gap: 6px; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: rgba(236,240,241,.62);
  pointer-events: none; text-shadow: 0 1px 8px rgba(0,0,0,.8);
}
.room-pills { position: absolute; right: clamp(16px, 3vw, 40px); bottom: 22px; gap: 8px; }
.room-pill {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--head);
  background: rgba(8,10,11,.62); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.room-pill:hover, .room-pill:focus-visible { border-color: var(--cyan-line); }
.room-pill[aria-pressed="true"] { border-color: var(--cyan-line); color: var(--cyan); }
.room.is-zoomed .room-hint, .room.is-zoomed .room-label { opacity: 0; }

/* credits overlay */
.room-credits {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.room-credits[hidden] { display: none; }
.room-credits-card {
  position: relative; width: min(560px, 100%); max-height: calc(100svh - 40px); overflow: auto;
  background: #0d0f10; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px 26px 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.room-credits-card h2 { font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); margin: 0 0 16px; font-weight: 500; }
.room-credits-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.room-credits-card li { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.room-credits-card li:last-child { border-bottom: 0; }
.room-credits-card b { color: var(--head); font-weight: 600; font-size: 15px; }
.room-credits-card span { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.room-credits-card a { color: var(--cyan); }
.room-credits-x { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.room-credits-x:hover { color: var(--head); }

/* static banner (hazard tape) */
.room-banner {
  --tape: repeating-linear-gradient(-45deg, #f5c518 0 12px, #111 12px 24px);
  padding: 6px; background: var(--tape);
}
.room-banner[hidden], .room[data-mode="room"] .room-banner { display: none; }
.room-banner-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px;
  background: #0b0b0b; padding: 11px 48px 11px 16px; position: relative;
  font-family: var(--mono); font-size: 12px; color: var(--text);
}
.room-banner-tag { color: #f5c518; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.room-banner .room-try { color: var(--head); border: 1px solid var(--cyan-line); border-radius: 999px; padding: 4px 12px; }
.room-banner .room-try:hover { background: rgba(46,230,214,.08); }
.room.no-webgl2 .room-banner .room-try { display: none; }
.room-banner-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.room-banner-x:hover { color: var(--head); }
@media (max-width: 767px) {
  .room-banner-text { display: none; }
  .room-banner-inner { padding: 9px 44px 9px 12px; gap: 6px 12px; font-size: 11px; }
  .nav-links a { letter-spacing: .12em; font-size: 11px; }
}

/* =================================================================
 * v3.2 — look-around camera + wing affordances
 * ================================================================= */
.room-canvas { touch-action: pan-y; cursor: grab; }
.room.is-dragging .room-canvas { cursor: grabbing; }
.room.is-dragging .room-label { opacity: 0; }
.room-edge {
  display: none; position: absolute; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(236,240,241,.62); background: rgba(8,10,11,.35); border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; transition: color .2s ease, border-color .2s ease, opacity .3s ease;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.room-edge[data-edge="l"] { left: clamp(10px, 1.6vw, 24px); }
.room-edge[data-edge="r"] { right: clamp(10px, 1.6vw, 24px); }
.room-edge:hover, .room-edge:focus-visible { color: var(--head); border-color: var(--cyan-line); }
.room.is-live .room-edge:not([hidden]) { display: block; }
.room.is-focused .room-edge, .room.is-dragging .room-edge { opacity: 0; pointer-events: none; }
@media (max-width: 1100px) { .room-keys { font-size: 10px; } }

/* ------------------------------------------------------------------
 * v3.4 — radio: NOW PLAYING tape label (panel), mini chip, offscreen YouTube player
 * ------------------------------------------------------------------ */
.room-np { margin-top: 14px; display: grid; gap: 8px; }
.room-np-tape { overflow: hidden; white-space: nowrap; border: 1px solid rgba(255,176,90,.35); border-radius: 6px; background: linear-gradient(#2a1a0c, #1a1007); padding: 6px 0; }
.room-np-marquee { display: inline-block; padding-left: 100%; font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; color: #ffc070; text-shadow: 0 0 8px rgba(255,150,60,.7); animation: room-np-scroll 14s linear infinite; animation-play-state: paused; opacity: .55; }
.room-np.is-playing .room-np-marquee { animation-play-state: running; opacity: 1; }
.room-np-note { margin: 0; font-size: 12px; color: var(--muted, #9aa3ab); min-height: 0; }
.room-np-note:empty { display: none; }
@keyframes room-np-scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .room-np-marquee { animation: none; padding-left: 10px; } }
.room-nowplaying { position: absolute; right: clamp(16px, 3vw, 40px); bottom: 92px; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(20,14,9,.82); border: 1px solid rgba(255,176,90,.35); font: 500 11px/1 "IBM Plex Mono", monospace; letter-spacing: .06em; color: #ffc070; box-shadow: 0 0 18px rgba(255,140,50,.18); }
.room-nowplaying[hidden] { display: none; }
.room-nowplaying a { color: #f4e9d8; text-decoration: underline; text-underline-offset: 3px; }
.room-np-mini { width: 26px; height: 26px; border-radius: 50%; border: 0; background: #ffb25a; color: #1a1007; font-size: 10px; cursor: pointer; }
.room.is-focused .room-nowplaying { display: none; }
.room-yt { position: fixed; left: -10000px; top: 0; width: 200px; height: 200px; overflow: hidden; pointer-events: none; }

/* v3.4 Field terminal: the real input sits exactly over the CODE box of the 3D screen.
   Its text is see-through on purpose (the 3D screen mirrors it); the caret and focus ring stay visible. */
.room-code{position:absolute;left:0;top:0;z-index:6;display:flex;align-items:stretch;gap:6px;margin:0;transform-origin:0 0;--code-fs:20px}
.room-code[hidden]{display:none}
.room-code input{flex:1;min-width:0;height:100%;padding:0 0 0 18%;border:0;border-radius:2px;background:transparent;color:transparent;caret-color:transparent;
  font:600 var(--code-fs)/1 var(--mono,ui-monospace,monospace);letter-spacing:.04em;text-transform:uppercase;cursor:text}
.room-code input::placeholder{color:transparent}
.room-code input::selection{background:rgba(46,230,214,.35);color:transparent}
.room-code input:focus-visible{outline:2px solid #2ee6d6;outline-offset:3px}
.room-code input:focus{outline:2px solid rgba(46,230,214,.75);outline-offset:3px}
.room-code button{flex:0 0 auto;align-self:center;height:min(100%,44px);min-height:32px;padding:0 12px;border:1px solid rgba(46,230,214,.7);border-radius:3px;
  background:rgba(4,9,12,.85);color:#2ee6d6;font:600 13px/1 var(--mono,ui-monospace,monospace);letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.room-code button:hover,.room-code button:focus-visible{background:#2ee6d6;color:#04090c;outline:none}
.room-code .screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.is-code-denied .room-code{animation:room-code-shake .42s linear}
@keyframes room-code-shake{0%,100%{margin-left:0}20%{margin-left:-8px}40%{margin-left:7px}60%{margin-left:-5px}80%{margin-left:3px}}
@media (prefers-reduced-motion:reduce){.is-code-denied .room-code{animation:none}}
.room[data-mode="static"] .room-code{display:none}
