@font-face { font-family: "JB"; src: url("assets/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "JB"; src: url("assets/fonts/jetbrains-mono-700.woff2") format("woff2"); font-weight: 700; }

#room-root{
  --bg: #0a0510;
  --deep: #1a0c2b;
  --ink: #f3e5f8;
  --mute: #9c88b4;
  --lilac: #cfa4ff;
  --violet: #8f6fae;
  --line: #4d3a6e;
  --gold: #ffc861;
  --rose: #ff6fae;
  --bone: #eadfcf;
  --mono: "JB", ui-monospace, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, "Helvetica Neue", "Segoe UI", sans-serif;
}

#room-root *{ box-sizing: border-box; }
#room-root, #room-root{ margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
#room-root{ font-family: var(--sans); -webkit-font-smoothing: antialiased; }
#room-root button{ font: inherit; color: inherit; }

#room-root #gl{ position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: grab; touch-action: none; }
#room-root #gl.pointing{ cursor: pointer; }
#room-root #gl.dragging{ cursor: grabbing; }
#room-root #wires{ position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2; }
#room-root #overlay{ position: fixed; inset: 0; pointer-events: none; z-index: 3; }

/* ---------- верх ---------- */
#room-root #top{ position: fixed; top: 14px; left: 16px; z-index: 6; pointer-events: none; }
#room-root .brand{ font: 500 13px/1 var(--mono); letter-spacing: .02em; color: var(--ink); display: flex; align-items: center; gap: 9px; }
#room-root .brand i{ font-style: normal; color: var(--mute); }
#room-root .brand .logo{ width: 18px; height: 18px; filter: invert(1) drop-shadow(0 0 4px var(--lilac)); }
#room-root #meter{ margin-top: 10px; font: 11px/1.6 var(--mono); color: var(--mute); }
#room-root #meter b{ color: var(--ink); font-weight: 400; }
#room-root #meter .k{ display: inline-block; min-width: 0; margin-right: 14px; }

#room-root #hud{ position: fixed; top: 12px; right: 14px; z-index: 9; display: flex; gap: 6px; align-items: center; }
#room-root #hud button{ display: inline-flex; align-items: center; gap: 7px; }
#room-root #hud a#btn-field, #room-root #hud a#btn-demo{ display: inline-flex; align-items: center; text-decoration: none; background: rgba(16, 8, 26, .78); border: 1px solid var(--violet); color: var(--lilac); font: 11px/1 var(--mono); padding: 8px 10px; box-shadow: 0 2px 0 0 rgba(207, 164, 255, .35); }
#room-root #hud a#btn-field:hover, #room-root #hud a#btn-demo:hover{ color: #fff; border-color: var(--lilac); }
#room-root #hud kbd, #room-root .keys kbd, #room-root .door em{ font: 9.5px/1 var(--mono); font-style: normal; color: var(--mute); border: 1px solid var(--line); padding: 2px 4px 3px; border-radius: 2px; }
#room-root #hud button.on kbd{ color: #1a0c2b; border-color: rgba(26, 12, 43, .4); }
#room-root #live{ font: 11px/1 var(--mono); color: var(--ink); padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; }
#room-root #live[hidden]{ display: none; }
#room-root #live b{ font-weight: 400; color: #fff; }
#room-root #live .dot{ width: 7px; height: 7px; border-radius: 50%; background: #ff5f8f; box-shadow: 0 0 8px #ff5f8f; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
#room-root #hud button, #room-root .pop button, #room-root #story-nav button, #room-root #timeline button, #room-root #panel button{
  background: rgba(16, 8, 26, .78); border: 1px solid var(--violet); color: var(--lilac);
  font: 11px/1 var(--mono); padding: 8px 10px; cursor: pointer; letter-spacing: .02em;
  box-shadow: 0 2px 0 0 rgba(207, 164, 255, .35);
}
#room-root #hud button:hover, #room-root .pop button:hover, #room-root #story-nav button:hover, #room-root #timeline button:hover, #room-root #panel button:hover{ border-color: var(--lilac); color: #fff; }
#room-root #hud button.on, #room-root .pop button.on, #room-root #story-nav button.on{ background: var(--lilac); color: #1a0c2b; border-color: var(--lilac); }
#room-root [hidden]{ display: none !important; }

/* ---------- всплывающие панели: вид и звук ---------- */
#room-root .pop{ position: fixed; top: 52px; right: 14px; z-index: 9; width: 250px; padding: 12px 14px 14px; background: rgba(13, 7, 22, .94); border: 1px solid var(--violet);
  font: 11px/1.4 var(--mono); color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
#room-root .pop .cap, #room-root #log .cap{ font: 10px/1 var(--mono); color: var(--mute); margin: 12px 0 6px; }
#room-root .pop .cap:first-child{ margin-top: 0; }
#room-root .seg{ display: flex; gap: 4px; flex-wrap: wrap; }
#room-root .seg.col{ flex-direction: column; }
#room-root .seg.col button{ text-align: left; }
#room-root .tg{ display: flex; align-items: center; gap: 7px; margin: 5px 0; cursor: pointer; }
#room-root .tg.big{ font-size: 12px; color: #fff; }
#room-root .tg input, #room-root .pop input[type=range]{ accent-color: var(--lilac); }
#room-root .pop input[type=range]{ width: 100%; }

/* ---------- поиск ---------- */
#room-root #find{ position: fixed; left: 16px; top: 64px; z-index: 12; width: min(380px, calc(100vw - 32px)); background: rgba(13, 7, 22, .95); border: 1px solid var(--lilac);
  padding: 12px; font: 11px/1.4 var(--mono); box-shadow: 0 0 30px rgba(180, 139, 255, .25); }
#room-root .find-h{ color: var(--lilac); margin-bottom: 8px; }
#room-root #find-q{ width: 100%; background: #07030c; border: 1px solid var(--violet); color: #fff; font: 15px/1.2 var(--sans); padding: 9px 10px; outline: none; }
#room-root #find-q:focus{ border-color: var(--lilac); }
#room-root #find-list{ list-style: none; margin: 8px 0 0; padding: 0; max-height: 52vh; overflow: auto; }
#room-root #find-list li{ padding: 6px 8px; cursor: pointer; border-left: 2px solid transparent; display: flex; gap: 8px; align-items: baseline; }
#room-root #find-list li .sw{ width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); flex: none; transform: translateY(-1px); }
#room-root #find-list li .n{ color: #fff; font-family: var(--sans); font-size: 13.5px; }
#room-root #find-list li .m{ color: var(--mute); margin-left: auto; white-space: nowrap; text-align: right; }
#room-root #find-list li.sec{ cursor: default; color: var(--mute); font-size: 10px; padding: 10px 8px 3px; }
#room-root #find-list li.act{ background: rgba(207, 164, 255, .13); border-color: var(--lilac); }
#room-root .find-f{ color: var(--mute); font-size: 10px; margin-top: 8px; }

/* ---------- боковая карточка ---------- */
#room-root #panel{ position: fixed; right: 14px; top: 56px; z-index: 8; width: min(340px, calc(100vw - 28px)); max-height: calc(100vh - 290px); overflow: auto;
  background: rgba(8, 4, 13, .92); border: 1px solid var(--c, var(--lilac)); padding: 14px 16px 16px; font: 11px/1.5 var(--mono); color: var(--ink); }
#room-root #panel .x, #room-root #help .x{ position: absolute; right: 6px; top: 4px; background: none; border: 0; box-shadow: none; font: 20px/1 var(--mono); color: var(--lilac); cursor: pointer; padding: 4px; }
#room-root #panel h3{ font: 600 17px/1.2 var(--sans); margin: 0 18px 4px 0; color: #fff; }
#room-root #panel .kick{ color: var(--c, var(--lilac)); font-size: 10.5px; margin-bottom: 6px; }
#room-root #panel p{ font: 13px/1.5 var(--sans); margin: 8px 0; color: var(--ink); }
#room-root #panel .dim{ color: var(--mute); }
#room-root #panel .row{ margin: 3px 0; }
#room-root #panel .q{ font: italic 13px/1.45 var(--sans); color: #fff; border-left: 2px solid var(--rose); padding-left: 8px; margin: 10px 0; }
#room-root #panel .acts{ display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
#room-root #panel a.btn, #room-root #panel button{ display: inline-block; text-decoration: none; background: rgba(16, 8, 26, .78); border: 1px solid var(--violet); color: var(--lilac); font: 11px/1 var(--mono); padding: 8px 10px; cursor: pointer; box-shadow: 0 2px 0 0 rgba(207, 164, 255, .35); }
#room-root #panel a.btn:hover{ color: #fff; border-color: var(--lilac); }
#room-root #panel a.btn.main, #room-root #panel button.main{ background: var(--lilac); color: #1a0c2b; border-color: var(--lilac); }
#room-root #panel .sec{ color: var(--mute); font-size: 10px; margin: 14px 0 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
#room-root #panel ul{ list-style: none; margin: 0; padding: 0; }
#room-root #panel li{ margin: 5px 0; }
#room-root #panel li .who{ color: #fff; cursor: pointer; border-bottom: 1px dotted var(--mute); }
#room-root #panel li .why{ color: var(--mute); display: block; }
#room-root #panel li a{ color: var(--lilac); margin-left: 6px; }
#room-root #panel .sess{ display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
#room-root #panel .sess span{ border: 1px solid var(--line); padding: 2px 5px; color: var(--mute); cursor: pointer; }
#room-root #panel .sess span.on{ border-color: var(--gold); color: var(--gold); }
#room-root #panel .stat{ display: flex; gap: 14px; margin: 8px 0; }
#room-root #panel .stat div{ color: var(--mute); }
#room-root #panel .stat b{ display: block; color: #fff; font: 400 20px/1.1 var(--mono); }

/* ---------- легенда и журнал ---------- */
#room-root #legend{ position: fixed; left: 16px; bottom: 22px; transition: opacity .4s; z-index: 5; font: 11px/1.75 var(--mono); color: var(--ink); pointer-events: none; max-width: 300px; }
#room-root #legend .row{ display: flex; align-items: center; gap: 8px; }
#room-root #legend .sw{ width: 9px; height: 15px; border-radius: 4px 4px 1px 1px; flex: none; box-shadow: 0 0 6px var(--c); background: var(--c); }
#room-root #legend .n{ color: var(--mute); margin-left: auto; padding-left: 12px; }
#room-root #legend .ttl{ color: var(--mute); font-size: 10px; margin-bottom: 3px; }

#room-root #log{ position: fixed; right: 0; top: 56px; width: 360px; padding: 8px 16px 10px 26px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: linear-gradient(90deg, rgba(7, 3, 12, 0), rgba(7, 3, 12, .78) 18%); }
#room-root #log.on{ opacity: 1; }
#room-root #log ol{ list-style: none; margin: 0; padding: 0; font: 10.5px/1.45 var(--mono); }
#room-root #log li{ color: var(--lilac); padding: 4px 0 4px 10px; border-left: 1px solid var(--line); margin-bottom: 3px; transition: opacity 1.2s; }
#room-root #log li .t{ color: var(--mute); }
#room-root #log li .w{ color: #fff; }
#room-root #log li.orch{ border-color: #fff; }
#room-root #log li.long{ border-color: var(--lilac); }
#room-root #log li.dyn{ border-color: var(--rose); }
#room-root #log li.sys{ border-color: var(--gold); color: var(--gold); }

/* ---------- показ ---------- */
#room-root #story{ position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7; width: min(700px, calc(100vw - 32px)); text-align: left; }
#room-root #story-kick{ font: 11px/1 var(--mono); color: var(--c, var(--lilac)); margin-bottom: 7px; letter-spacing: .03em; text-shadow: 0 0 8px #000; transition: opacity .35s; }
#room-root #story-text{ margin: 0; padding: 15px 18px 14px; background: rgba(10, 5, 16, .76); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 400 16px/1.5 var(--sans); color: var(--ink); border-left: 2px solid var(--c, var(--lilac)); transition: opacity .35s; }
#room-root #story-text h2{ font: 600 19px/1.25 var(--sans); margin: 0 0 6px; color: #fff; }
#room-root #story-text .sum{ margin: 0; }
#room-root #story-text .chips{ margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; font: 11px/1 var(--mono); }
#room-root #story-text .chips span{ border: 1px solid var(--line); padding: 4px 6px; color: var(--mute); }
#room-root #story-text .chips span b{ color: #fff; font-weight: 400; }
#room-root #story-text.fade, #room-root #story-kick.fade{ opacity: 0; }
#room-root #story-dots{ display: flex; gap: 3px; margin-left: 10px; flex: 1; flex-wrap: wrap; }
#room-root #story-dots i{ width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--violet); cursor: pointer; }
#room-root #story-dots i.s{ border-color: var(--gold); }
#room-root #story-dots i.on{ background: var(--lilac); border-color: var(--lilac); box-shadow: 0 0 6px var(--lilac); }
#room-root #story-dots i.s.on{ background: var(--gold); border-color: var(--gold); box-shadow: 0 0 6px var(--gold); }
#room-root #story-bar{ height: 2px; background: rgba(77, 58, 110, .5); margin-top: 7px; }
#room-root #story-bar i{ display: block; height: 100%; width: 0; background: var(--lilac); }
#room-root #coach{ position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7; font: 11px/1.6 var(--mono); color: var(--ink); background: rgba(10, 5, 16, .7);
  padding: 8px 14px; border: 1px solid var(--line); white-space: nowrap; transition: opacity .8s; }
#room-root #coach kbd{ font: 10px/1 var(--mono); border: 1px solid var(--violet); padding: 1px 4px 2px; margin: 0 2px; color: var(--lilac); }
#room-root #coach.fade{ opacity: .25; }
#room-root.explore #coach{ bottom: 112px; }
#room-root .chip{ background: var(--c, var(--lilac)); color: #12081d; padding: 0 5px; border-radius: 2px; white-space: nowrap; font-weight: 500; }
#room-root #story-nav{ display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#room-root #story-count{ font: 11px/1 var(--mono); color: var(--mute); }
#room-root #walk-hint{ position: absolute; left: 50%; top: -38px; transform: translateX(-50%); font: italic 11px/1 var(--mono); color: var(--ink); opacity: .85; white-space: nowrap; letter-spacing: .02em; text-transform: lowercase; }
#room-root #walk-hint::before{ content: "↑"; display: block; width: 18px; height: 18px; margin: 0 auto 6px; border: 1px solid var(--ink); font: 11px/16px var(--mono); text-align: center; font-style: normal; }
#room-root.explore #story{ display: none; }

/* ---------- лента времени ---------- */
#room-root #timeline{ position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(820px, calc(100vw - 32px)); z-index: 7; }
#room-root:not(.explore) #timeline{ width: min(700px, calc(100vw - 32px)); bottom: 238px; }
#room-root .tl-row{ display: flex; align-items: center; gap: 8px; font: 11px/1 var(--mono); color: var(--mute); margin-bottom: 8px; flex-wrap: wrap; }
#room-root #cycle-badge{ color: #12081d; background: var(--lilac); padding: 5px 7px; }
#room-root #cycle-badge.model{ background: var(--rose); }
#room-root .loop{ display: flex; align-items: center; gap: 5px; cursor: pointer; }
#room-root .loop input{ accent-color: var(--lilac); }
#room-root #tl-day{ margin-left: auto; color: var(--ink); }
#room-root #tl-track{ position: relative; height: 34px; background: rgba(16, 8, 26, .7); border: 1px solid var(--line); cursor: pointer; }
#room-root #tl-fill{ position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(143, 111, 174, .08), rgba(207, 164, 255, .22)); }
#room-root #tl-head{ position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; box-shadow: 0 0 10px #fff; }
#room-root .tl-tick{ position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line); }
#room-root .tl-tick.d0{ height: 34px; background: var(--violet); }
#room-root .tl-sess{ position: absolute; top: 5px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
#room-root .tl-sess.planned{ background: transparent; border: 1px solid var(--gold); }
#room-root .tl-sess.lit{ background: #fff; box-shadow: 0 0 14px var(--gold); }
#room-root .tl-lbl{ position: absolute; bottom: 3px; font: 9px/1 var(--mono); color: var(--mute); transform: translateX(-50%); white-space: nowrap; }

/* ---------- карточка (как у Pudding) ---------- */
#room-root #card{ position: fixed; z-index: 8; pointer-events: none; background: #000; border: 1px solid #fff; padding: 7px 10px 8px; text-align: center;
  font: 10.5px/1.5 var(--mono); color: #fff; max-width: 290px; transform: translate(-50%, -100%); white-space: normal; }
#room-root #card .nm{ font-weight: 700; }
#room-root #card .ctx{ color: var(--c, var(--lilac)); }
#room-root #card .q{ color: var(--ink); font-style: italic; font-family: var(--sans); font-size: 11.5px; line-height: 1.4; margin-top: 4px; }
#room-root #card .dim{ color: var(--mute); }

/* ---------- подписи в сцене ---------- */
#room-root .dept{ position: absolute; transform: translate(-50%, -100%); font: 11px/1.55 var(--mono); color: var(--ink); white-space: nowrap; text-align: left; transition: opacity .4s; }
#room-root .dept .h{ color: var(--c); font-weight: 700; letter-spacing: .02em; }
#room-root .dept .h::before{ content: "◇ "; }
#room-root .dept .h b{ color: var(--mute); font-weight: 400; margin-left: 6px; }
#room-root .dept ul{ margin: 2px 0 0; padding: 0; list-style: none; color: #c9b8dd; font-size: 10px; line-height: 1.5; }
#room-root .dept li::before{ content: "• "; color: var(--c); }
#room-root .bubble{ position: absolute; transform: translate(-50%, -100%); max-width: 230px; font: italic 12px/1.4 var(--sans); color: #fff; background: rgba(40, 10, 40, .82);
  border: 1px solid var(--rose); padding: 6px 9px; text-align: left; transition: opacity .5s; }
#room-root .bubble .who{ display: block; font: normal 9.5px/1.3 var(--mono); color: var(--rose); margin-bottom: 2px; }
#room-root .stage-lbl{ position: absolute; transform: translate(-50%, -100%); font: 11px/1.5 var(--mono); color: #12081d; background: var(--gold); padding: 3px 8px; white-space: nowrap; box-shadow: 0 0 18px rgba(255, 200, 97, .55); }
#room-root .stage-lbl i{ font-style: normal; opacity: .7; }
#room-root .nlbl{ position: absolute; transform: translate(-50%, -100%); font: 10px/1.25 var(--mono); color: var(--c); white-space: nowrap; text-align: center; text-shadow: 0 0 6px #000, 0 0 2px #000; transition: opacity .35s; pointer-events: none; }
#room-root .nlbl b{ display: block; color: #fff; font-weight: 400; }
#room-root .nlbl.on{ font-size: 11.5px; }
#room-root .nlbl.on b{ color: var(--c); }
#room-root .wk{ position: absolute; transform: translate(-50%, -50%); font: 10px/1 var(--mono); color: var(--mute); letter-spacing: .08em; white-space: nowrap; transition: opacity .4s; }
#room-root .vis{ position: absolute; transform: translate(-50%, -100%); font: 10.5px/1.3 var(--mono); color: #fff; white-space: nowrap; background: rgba(255, 95, 143, .18); border: 1px solid #ff5f8f; padding: 2px 6px; }
#room-root .metag{ position: absolute; transform: translate(-50%, -100%); font: 700 11px/1 var(--mono); color: #12081d; background: #fff; padding: 3px 6px; white-space: nowrap; box-shadow: 0 0 16px #fff; }
#room-root .tag{ position: absolute; transform: translate(-50%, -100%); font: 10px/1 var(--mono); color: var(--c, #fff); white-space: nowrap; text-shadow: 0 0 6px #000; }

/* ---------- помощь и о данных ---------- */
#room-root #help{ position: fixed; inset: 0; z-index: 20; background: rgba(5, 2, 9, .7); display: grid; place-items: center; }
#room-root .keys{ display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; font: 12px/1.5 var(--mono); color: var(--ink); }
#room-root .keys kbd{ margin-right: 4px; color: var(--lilac); border-color: var(--violet); }
#room-root .h2b{ margin-top: 26px !important; }
#room-root .info-box{ position: relative; width: min(640px, calc(100vw - 32px)); max-height: 80vh; overflow: auto; background: #0d0716; border: 1px solid var(--violet); padding: 22px 24px; font: 13.5px/1.55 var(--sans); }
#room-root .info-box h2{ font: 500 14px/1 var(--mono); margin: 0 0 14px; color: var(--lilac); }
#room-root .info-box h3{ font: 500 11px/1 var(--mono); color: var(--mute); margin: 18px 0 6px; }
#room-root .info-box ul{ margin: 0; padding-left: 18px; }


/* ---------- вход: двери ---------- */
#room-root #intro{ position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6vh;
  background: radial-gradient(ellipse at 50% 120%, #3a2152 0%, #160b24 45%, #07030c 80%); transition: opacity 1.1s ease, visibility 1.1s; overflow: hidden; }
#room-root #intro.gone{ opacity: 0; visibility: hidden; }
#room-root .intro-dust{ position: absolute; inset: 0; background-image:
  radial-gradient(1.2px 1.2px at 12% 20%, #ffd99a 50%, transparent 51%), radial-gradient(1px 1px at 33% 8%, #cfa4ff 50%, transparent 51%),
  radial-gradient(1px 1px at 71% 15%, #ffd99a 50%, transparent 51%), radial-gradient(1.4px 1.4px at 88% 31%, #cfa4ff 50%, transparent 51%),
  radial-gradient(1px 1px at 52% 27%, #ffd99a 50%, transparent 51%), radial-gradient(1px 1px at 7% 44%, #cfa4ff 50%, transparent 51%),
  radial-gradient(1px 1px at 94% 9%, #ffd99a 50%, transparent 51%), radial-gradient(1.2px 1.2px at 40% 38%, #cfa4ff 50%, transparent 51%);
  opacity: .8; pointer-events: none; }
#room-root .intro-logo{ width: 74px; height: 74px; margin-bottom: 22px; filter: invert(1) drop-shadow(0 0 10px #fff) drop-shadow(0 0 26px var(--lilac)); }
#room-root .neon{ font: 400 clamp(34px, 6vw, 64px)/1 var(--mono); letter-spacing: .01em; color: #fff; margin: 0; padding: 14px 28px; border: 2px solid #fff; border-radius: 40px;
  text-shadow: 0 0 6px #fff, 0 0 18px var(--lilac), 0 0 42px #b061ff; box-shadow: 0 0 10px #fff, 0 0 26px var(--lilac), inset 0 0 18px rgba(207, 164, 255, .6); }
#room-root .by{ font: 12px/1 var(--mono); color: var(--lilac); margin: 22px 0 0; letter-spacing: .03em; text-shadow: 0 0 10px #b061ff; }
#room-root .doors{ display: flex; gap: clamp(22px, 6vw, 110px); margin-top: 7vh; align-items: flex-end; }
#room-root .door{ position: relative; width: clamp(84px, 10vw, 128px); height: clamp(150px, 26vh, 230px); background: none; border: 0; padding: 0; cursor: pointer; }
#room-root .door .slab{ position: absolute; inset: 0; z-index: 2; display: grid; place-items: start center; padding-top: 22%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #000) 0%, var(--c2) 100%); border-radius: 3px 3px 0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), inset -10px 0 18px rgba(0, 0, 0, .35); transition: transform .35s, filter .35s; }
#room-root .door .slab::after{ content: ""; position: absolute; right: 14%; top: 54%; width: 9px; height: 9px; border-radius: 50%; background: #1b1022; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
#room-root .door b{ font: 700 clamp(13px, 1.4vw, 17px)/1.15 var(--mono); color: #fff; text-shadow: 0 0 6px var(--c), 0 0 16px var(--c); text-align: center; }
#room-root .door .slab{ grid-template-rows: auto 1fr; }
#room-root .door em{ align-self: end; margin-bottom: 14px; color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .35); }
#room-root .door .lamp{ position: absolute; left: 50%; top: -38px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c), 0 0 26px var(--c); z-index: 3; }
#room-root .door .cone{ position: absolute; left: 50%; top: -32px; width: 260%; height: calc(100% + 60px); transform: translateX(-50%); z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 40%, transparent), transparent 85%); clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%); opacity: .55; pointer-events: none; }
#room-root .door .pool{ position: absolute; left: 50%; bottom: -26px; width: 300%; height: 52px; transform: translateX(-50%); border-radius: 50%; z-index: 0;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--c) 55%, transparent) 0%, transparent 70%); opacity: .7; }
#room-root .door:hover .slab, #room-root .door:focus-visible .slab{ transform: perspective(500px) rotateY(-24deg); transform-origin: left center; filter: brightness(1.15); }
#room-root .door:hover .cone{ opacity: .85; }
#room-root .hint{ margin-top: 58px; font: 12px/1.7 var(--mono); color: #fff; letter-spacing: .02em; text-align: center; max-width: 780px; padding: 0 16px; opacity: .9; }
#room-root .intro-count{ margin-top: 10px; font: 11px/1.6 var(--mono); color: var(--mute); text-align: center; max-width: 560px; padding: 0 16px; }

@media  (max-width: 720px) {
  #room-root #hud{ top: 38px; left: 12px; right: 12px; justify-content: flex-start; flex-wrap: wrap; }
  #room-root #hud button{ padding: 6px 8px; font-size: 10px; }
  #room-root #hud kbd, #room-root #coach, #room-root #story-dots{ display: none; }
  #room-root .pop{ top: 76px; left: 12px; right: 12px; width: auto; }
  #room-root #panel{ top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-height: 46vh; z-index: 11; }
  #room-root #find{ top: 76px; }
  #room-root .keys{ grid-template-columns: 1fr; }
  #room-root .intro-logo{ width: 54px; height: 54px; }
  #room-root #meter{ display: none; }
  #room-root:not(.explore) #timeline{ bottom: 250px; }
  #room-root #log{ display: none; }
  #room-root #legend{ bottom: auto; top: 112px; font-size: 10px; }
  #room-root #story-text{ font-size: 14.5px; padding: 12px 14px; }
  #room-root .brand i{ display: none; }
}
/* подписи людей: найденные поиском и ближайшие в прогулке */
#room-root .ptag{ position: absolute; left: 0; top: 0; display: none; font: 11px/1.25 var(--sans); color: #fff; white-space: nowrap; background: rgba(13, 7, 22, .78); border-left: 2px solid var(--c, #cfa4ff); padding: 2px 7px 3px; }
#room-root .ptag small{ display: block; font: 9.5px/1.2 var(--mono); color: var(--mute); }
#room-root .dept.far ul{ display: none; }
#room-root .intro-demo{ margin-top: 14px; font: 12px/1.6 var(--mono); color: var(--ink); text-align: center; }
#room-root .intro-demo a{ color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(255, 200, 97, .5); padding: 0 2px; }
#room-root .intro-demo a:hover{ color: #fff; border-color: #fff; }

/* ---------- демо «как прошла лаба»: крупно для большого экрана, пульт убран ---------- */
#room-root #story-exit{ display: none; }
#room-root.demo #hud > :not(#btn-dshow):not(#btn-sound):not(#btn-help), #room-root.demo #legend, #room-root.demo #meter, #room-root.demo #log, #room-root.demo #timeline, #room-root.demo #coach{ display: none !important; }
#room-root.demo #hud{ opacity: .55; }
#room-root.demo #story{ width: min(1280px, calc(100vw - 64px)); bottom: 30px; }
#room-root.demo #story-kick{ font-size: clamp(12px, .95vw, 17px); margin-bottom: 10px; letter-spacing: .05em; }
#room-root.demo #story-text{ padding: clamp(16px, 1.5vw, 28px) clamp(18px, 1.8vw, 32px); font-size: clamp(16px, 1.25vw, 23px); line-height: 1.45; border-left-width: 3px; background: rgba(10, 5, 16, .8); }
#room-root.demo #story-text h2{ font-size: clamp(26px, 2.5vw, 48px); line-height: 1.12; margin-bottom: 10px; }
#room-root.demo #story-text .sum{ max-width: none; }
#room-root.demo #story-exit{ display: inline-block; margin-left: auto; }
#room-root.demo #story-nav{ margin-top: 10px; }
#room-root.demo #story-count{ font-size: 13px; }
#room-root.demo #story-dots i{ width: 10px; height: 10px; }
#room-root.demo #story-bar{ height: 3px; }
#room-root.demo #slidecap{ font-size: 13px; }
#room-root .dnums{ display: flex; gap: clamp(18px, 2.4vw, 44px); margin-top: 16px; flex-wrap: wrap; }
#room-root .dnums span{ display: flex; flex-direction: column; font: clamp(11px, .8vw, 14px)/1.25 var(--mono); color: var(--mute); }
#room-root .dnums b{ font: 600 clamp(26px, 2.5vw, 46px)/1 var(--sans); color: var(--c, #fff); margin-bottom: 5px; }
#room-root .dcol{ display: grid; gap: clamp(10px, 1vw, 18px); margin-top: 16px; --c: var(--lilac); }
#room-root .dcol.w5{ grid-template-columns: repeat(5, 1fr); }
#room-root .dcol.w3{ grid-template-columns: repeat(3, 1fr); }
#room-root .dcol.gold{ --c: #ffc861; } #room-root .dcol.teal{ --c: #4fe3c8; } #room-root .dcol.pink{ --c: #ff6fae; }
#room-root .dcol > div{ display: flex; flex-direction: column; gap: 5px; border-top: 2px solid rgba(255, 255, 255, .16); padding-top: 10px; opacity: .5; transition: opacity .45s, border-color .45s; }
#room-root .dcol > div.on{ opacity: 1; border-color: var(--c); }
#room-root .dcol b{ font: 600 clamp(14px, 1vw, 19px)/1.25 var(--sans); color: #fff; }
#room-root .dcol > div.on b{ color: var(--c); }
#room-root .dcol span{ font: clamp(12.5px, .85vw, 16px)/1.38 var(--sans); color: var(--ink); }
#room-root .dcol.next{ --c: #b48bff; }
#room-root .dcol i{ font: 600 clamp(13px, .95vw, 18px)/1.2 var(--mono); font-style: normal; color: var(--c); }
#room-root .dcol b a{ color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); pointer-events: auto; }
#room-root .dcol b a:hover{ border-color: var(--c); }
#room-root .dcol small{ font: clamp(10.5px, .7vw, 13px)/1 var(--mono); color: var(--mute); }
#room-root .dcol em{ display: flex; align-items: center; gap: 7px; font: normal clamp(11px, .75vw, 14px)/1.2 var(--mono); color: var(--c); }
#room-root .dcol em img, #room-root .dcol em i{ width: clamp(24px, 1.8vw, 34px); height: clamp(24px, 1.8vw, 34px); border-radius: 50%; object-fit: cover; flex: none; }
#room-root .dcol em i{ display: grid; place-items: center; background: #2a1c3d; font: normal 11px/1 var(--mono); color: #fff; }
#room-root.demo .ptag{ font-size: clamp(11px, .8vw, 15px); }
#room-root.demo .ptag small{ font-size: clamp(9.5px, .6vw, 12px); }
#room-root .dcast{ display: flex; flex-wrap: wrap; gap: clamp(12px, 1.4vw, 26px); margin-top: 16px; }
#room-root .dcast span{ display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; opacity: .75; }
#room-root .dcast span.lead{ opacity: 1; }
#room-root .dcast img, #room-root .dcast i{ grid-row: span 2; width: clamp(38px, 3vw, 60px); height: clamp(38px, 3vw, 60px); border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
#room-root .dcast span:not(.lead) img, #room-root .dcast span:not(.lead) i{ width: clamp(28px, 2.1vw, 42px); height: clamp(28px, 2.1vw, 42px); }
#room-root .dcast i{ display: grid; place-items: center; background: #2a1c3d; font: normal 13px/1 var(--mono); color: #fff; }
#room-root .dcast b{ font: 600 clamp(15px, 1.1vw, 21px)/1.2 var(--sans); color: var(--c); }
#room-root .dcast small{ font: clamp(11px, .75vw, 14px)/1.2 var(--mono); color: var(--mute); }
/* лёгкая выкладка: без «лабы целиком», обзора, графа, поля и ссылок на записи */
#room-root.lean .full, #room-root.lean #btn-lab, #room-root.lean #btn-frag, #room-root.lean #btn-demo, #room-root.lean #btn-field, #room-root.lean #intro-demo, #room-root.lean .door[data-door="lab"], #room-root.lean .door[data-door="frag"], #room-root.lean [data-rec="play"], #room-root.lean [data-rec="open"], #room-root.lean [data-rec="lab"], #room-root.lean [data-rec="frag"], #room-root.lean [data-act="rec-play"], #room-root.lean [data-act="rec-open"]{ display: none !important; }
#room-root .dday{ margin-top: 12px; font: clamp(13px, .95vw, 17px)/1 var(--mono); color: var(--lilac); min-height: 1em; }
#room-root .dday b{ color: #fff; font-weight: 400; }
#room-root #story-text .rec a.btn{ display: inline-block; text-decoration: none; }
@media  (max-width: 720px) {
  #room-root.demo #story{ width: calc(100vw - 20px); bottom: 10px; }
  #room-root.demo #story-text h2{ font-size: 22px; }
  #room-root.demo #story-text{ font-size: 15px; padding: 13px 15px; }
  #room-root .dcol.w5, #room-root .dcol.w3{ grid-template-columns: 1fr; }
  #room-root .dcol > div:not(.on){ display: none; }
  #room-root .dnums{ gap: 14px; } #room-root .dnums b{ font-size: 24px; }
  #room-root.demo #story-dots{ display: none; }
  #room-root.demo #overlay .tag{ display: none; }
}
#room-root.demo #story-text .rec{ margin-top: 16px; gap: 8px; flex-wrap: wrap; }
#room-root.demo #story-text .rec button{ font-size: clamp(11px, .8vw, 14px); padding: 10px 13px; }

/* публичная копия: без следов активности людей и без поиска по именам */
#room-root.public #live, #room-root.public #timeline, #room-root.public #meter, #room-root.public #log, #room-root.public #btn-find{ display: none !important; }

#room-root{position:relative;isolation:isolate;transform:translateZ(0);height:calc(100svh - 72px);min-height:540px;width:100%;overflow:hidden;outline:none}#room-root #gl,#room-root #wires{width:100%;height:100%}#room-root #intro{height:100%}#room-root:fullscreen{height:100svh}#room-root #top{top:calc(14px + var(--room-safe-top,0px))}#room-root #hud{top:calc(12px + var(--room-safe-top,0px))}#room-root .pop{top:calc(52px + var(--room-safe-top,0px))}@media(max-width:700px){#room-root #hud{top:calc(38px + var(--room-safe-top,0px))}}@media(max-width:700px){#room-root{min-height:560px}}
