/* The room home (room.js). The painted desk fills the window; live screens sit in the CRTs; views open flat. */
html.room-on, html.room-on body { overflow: hidden !important; height: 100%; overscroll-behavior: none; }
html.room-on body > :is(.topbar, main.layout, footer.foot, .chat-fab, .chat), html.room-on :is(canvas.dk-skin, #scene, #scene-anim, .terminal-nav) { display: none !important; }

#room { position: fixed; inset: 0; z-index: 2; overflow: hidden; background: #040506; contain: strict; }
#room .room-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform;
  translate: calc(var(--px, 0) * -9px) calc(var(--py, 0) * -6px); transition: translate .6s cubic-bezier(.2,.7,.3,1); }
#room .room-plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
#room.room-flying .room-stage { filter: brightness(.9); }

/* live screens: laid out at real size, mapped onto the painted glass */
#room .room-scr { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; background: #020403; cursor: pointer;
  container-type: size; border-radius: var(--gr, 5% / 8%); box-shadow: var(--glass); outline: none;
  --glass: inset 0 0 0 1px rgb(0 0 0 / .9), inset 0 1.6cqh 2.6cqh -.6cqh rgb(0 0 0 / .85), inset 0 0 4cqmin rgb(0 0 0 / .8); }
/* each live screen takes the painted glass's own rounded corners (design/room helpers.js roundRect), so it sits inside the
   bezel instead of on top of it; the bezel's lip shades the top of the glass (--glass), and a curved sheen sits on the tube */
#room .room-scr[data-scr="hero"] { --gr: 2.6% / 5%; }
#room .room-scr[data-scr="chat"] { --gr: 7% / 4.8%; }
#room .room-scr[data-scr="pulls"] { --gr: 7.5% / 13%; }
#room .room-scr[data-scr="tel"] { --gr: 6.5% / 16%; }
#room .room-scr[data-scr="dead"] { --gr: 8% / 10%; }
#room .room-scr::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; border-radius: inherit;
  background: radial-gradient(140% 85% at 28% -12%, rgb(255 255 255 / .07), transparent 46%), radial-gradient(90% 60% at 70% 118%, rgb(255 255 255 / .03), transparent 60%); }
#room .room-scr::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;   /* scanlines + a tube vignette */
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgb(0 0 0 / .18) 2px 3px), radial-gradient(120% 120% at 50% 50%, transparent 55%, rgb(0 0 0 / .55)); }
#room .room-glare { position: absolute; z-index: 6; pointer-events: none; right: 0; top: 0; width: 38%; height: 30%;   /* light glare, kept in the corner, off the text */
  background: radial-gradient(80% 90% at 100% 0, rgb(255 255 255 / .07), transparent 70%); }
#room .room-scr:is(:hover, :focus-visible) { box-shadow: var(--glass), 0 0 0 2px rgb(230 160 60 / .75), 0 0 22px rgb(230 160 60 / .35); }
@media (hover: none) { #room .room-scr:hover { box-shadow: var(--glass); } }

/* the hero: the real specimen screen, display only in the room (click to go in) */
#room .room-hero-slot { position: absolute; inset: 0; pointer-events: none; }
#room .room-hero-slot > .rx-type { position: absolute !important; inset: auto !important; left: 4cqw !important; top: 5cqh !important; width: 92cqw !important; height: 90cqh !important; min-height: 0 !important; max-width: none !important;   /* inset from the glass's edge: ivy may grow over the edge, never over the text */
  margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
#room .room-hero-slot > .rx-type :is(.sp-pick, .ac-interaction) { display: none !important; }

/* chat CRT: the newest lines only, big phosphor type, older lines fading */
#room .room-pager { display: flex; flex-direction: column; justify-content: flex-end; padding: 0; background: radial-gradient(90% 80% at 50% 60%, #04140b, #010402); }
#room .rp-lines { display: grid; gap: 2.4cqh; margin: 6cqh 7cqw; }   /* margins, not padding: % padding is measured against the whole room */
#room .rp-l { margin: 0; font: 7.4cqh/1.08 DecayReadout, VT323, monospace; color: #9dffb8; text-shadow: 0 0 6px rgb(110 255 150 / .55);
  opacity: calc(1 - var(--age, 0) * .24); overflow-wrap: anywhere; }   /* whole messages only: room.js drops the oldest until the rest fit */
#room .rp-l b { font-weight: 400; color: #e6c27a; text-shadow: 0 0 6px rgb(230 180 90 / .5); }
#room .rp-l.k-sys { color: #7fb8a0; }
#room .rp-l:is(.k-open, .k-share, .k-card) { color: #ffd38a; }

/* live pulls CRT: three rows, big */
#room .room-pulls { display: flex; flex-direction: column; justify-content: center; padding: 0; background: radial-gradient(90% 80% at 50% 50%, #08142a, #02040a); }
#room .rl-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4cqh; margin: 4cqh 6cqw; min-width: 0; }   /* a row never grows past the glass */
#room :is(.rp-l, .rl-rows p, .vfd-text, .ro-lv, .ro-coins), #room-pager .pg-text { font-family: DecayReadout, VT323, monospace !important; }
#room .rl-rows p { margin: 0; display: flex; justify-content: space-between; gap: 6px; font: 15cqh/1 DecayReadout, VT323, monospace; color: #cfe2ff; text-shadow: 0 0 6px rgb(120 170 255 / .5); white-space: nowrap; }
#room .rl-rows b { flex: 1; min-width: 0; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
#room .rl-rows em { flex: none; }
#room .rl-rows p { min-width: 0; align-items: baseline; }
#room .rl-rows i { flex: none; font-style: normal; font-size: .62em; padding: .12em .3em 0; border: 1px solid currentColor; border-radius: 2px; color: #8fa6c8; text-shadow: none; }
#room .rl-rows p:is(.t2, .t3) i { color: #7ec8ff; } #room .rl-rows p.t4 i { color: #f0b25a; } #room .rl-rows p.t5 i { color: #ff8ad8; }
#room .rl-rows em { font-style: normal; color: #f0b25a; text-shadow: 0 0 6px rgb(240 170 80 / .6); }
#room .room-tel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#room .room-dead { cursor: default; background: transparent; box-shadow: none; }
#room .room-dead::after { background: url('/static/kc-grain.png') 0 0 / 90px; opacity: .22; mix-blend-mode: screen; animation: room-static .24s steps(3) infinite; }
@keyframes room-static { 0% { background-position: 0 0; } 33% { background-position: 31px 17px; } 66% { background-position: -23px 41px; } }

/* the printout on the desk */
#room .room-hot { position: absolute; cursor: pointer; outline: none; }
/* hover: the thing's own traced outline (.rh-shape, drawn by room.js) lights a see-through light orange and pulses every 1.5s */
#room .room-hot .rh-shape { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .12s; }
#room .room-hot .rh-shape :is(path, polygon) { fill: rgb(255 165 70 / .1); stroke: rgb(255 178 90 / .85); stroke-width: 11px; stroke-linejoin: round; }
#room .room-hot:is(:hover, :focus-visible) .rh-shape { opacity: 1; animation: rh-flash 1.5s ease-in-out infinite; }
@keyframes rh-flash { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
/* the console's two little screens (chat strip, level + coins readout) get the same light orange edge */
#room :is(.room-vfd, .room-ro)::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .12s;
  box-shadow: inset 0 0 0 2px rgb(255 178 90 / .85), inset 0 0 16px rgb(255 160 60 / .3); background: rgb(255 165 70 / .06); }
#room.has-me .room-ro { cursor: pointer; }
#room .room-vfd:is(:hover, :focus-visible)::before, #room.has-me .room-ro:hover::before { opacity: 1; animation: rh-flash 1.5s ease-in-out infinite; }
@media (hover: none) { #room :is(.room-vfd, .room-ro)::before { display: none; } }
@media (prefers-reduced-motion: reduce) { #room .room-hot:is(:hover, :focus-visible) .rh-shape, #room :is(.room-vfd, .room-ro):hover::before { animation: none !important; } }

/* console keys: the painted caps darken and sink a little when pressed */
#room .room-key { position: absolute; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
#room .room-key:is(:hover, :focus-visible) { -webkit-backdrop-filter: brightness(1.16); backdrop-filter: brightness(1.16); }
#room .room-key .rk-cap { position: absolute; inset: 0; background-repeat: no-repeat; opacity: 0; transform-origin: 50% 100%; pointer-events: none; transition: opacity 0s .09s, transform .09s ease-out, filter .09s; }
#room .room-key.down { background: #0a0806; -webkit-backdrop-filter: none; backdrop-filter: none; }   /* the cap drops into its dark well */
#room .room-key.down .rk-cap { opacity: 1; transform: translateY(5%) scale(.95); filter: brightness(.7) saturate(.9); transition: none; }

/* the console message strip: a VFD that scrolls the newest line, flickers on news */
#room .room-vfd { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: size; cursor: pointer; overflow: hidden; outline: none;
  background: linear-gradient(180deg, #020605, #041210); border-radius: 2px; box-shadow: inset 0 0 8px #000; display: flex; align-items: center; padding: 0 2.2cqh; gap: 2cqh; }
#room .vfd-track { flex: 1; min-width: 0; overflow: hidden; }
#room .vfd-text { display: inline-block; white-space: nowrap; font: 62cqh/1 DecayReadout, VT323, monospace; letter-spacing: .06em; color: #74ffd6;
  text-shadow: 0 0 4px rgb(90 255 210 / .9), 0 0 12px rgb(60 230 190 / .45); }
#room .room-vfd::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 3px, rgb(0 0 0 / .22) 3px 4px); }
#room .room-vfd.vfd-new .vfd-text { animation: vfd-flick .5s steps(2) 1; }
#room .vfd-badge, #room-pager .pg-badge { flex: none; font: 50cqh/1 DecayReadout, monospace; color: #1a0e02; background: #f0a94a; padding: .1em .35em; border-radius: 2px; box-shadow: 0 0 8px rgb(240 169 74 / .7); }
@keyframes vfd-flick { 0% { opacity: .2; } 25% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: 1; } }
@keyframes vfd-scroll { from { transform: translateX(0); } to { transform: translateX(var(--over, 0)); } }

/* the readout: level and coins in amber, or the oxide login key */
#room .room-ro { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: size; display: flex; align-items: center; justify-content: space-between; gap: 3cqh; padding: 0 3cqh;
  background: linear-gradient(180deg, #070402, #120904); border-radius: 2px; box-shadow: inset 0 0 8px #000; overflow: hidden; }
#room .room-ro :is(.ro-lv, .ro-coins) { font: 62cqh/1 DecayReadout, VT323, monospace; color: #ffb84a; text-shadow: 0 0 5px rgb(255 170 60 / .85), 0 0 14px rgb(255 140 40 / .4); white-space: nowrap; }
#room .room-ro .ro-coins { margin-left: auto; }
#room .room-ro .ro-login { flex: 1; height: 82%; white-space: nowrap; overflow: hidden; font: 800 54cqh/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .08em; cursor: pointer; }

/* a view or a window: flat in the glass of the screen you moved into; the machine stays around it (room.js sets --g-*) */
:is(#room-view, html.room-on.room-win #layer) { position: fixed !important; inset: auto !important; left: var(--g-l) !important; top: var(--g-t) !important; width: var(--g-w) !important; height: var(--g-h) !important;
  border-radius: 10px / 14px; box-shadow: 0 0 0 3px #0b0b09, 0 0 0 4px #2a2820, 0 0 40px rgb(120 200 170 / .12); }
#room-view { z-index: 40; background: #020303; overflow: hidden; }   /* opaque from its first frame: nothing behind ever shows through */
/* no fade or wipe: an animation that hides content can stall on a busy page, so the view simply cuts in */
#room-view .rv-frame { position: absolute; inset: 0; display: flex; flex-direction: column; }
#room-view .rv-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 28px rgb(0 0 0 / .7); }
#room-view .rv-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 6px 8px; background: #0b0c0a; border-bottom: 1px solid #23251e; }
#room-view .rv-name { font: 18px/1 DecayReadout, VT323, monospace !important; letter-spacing: .1em; color: #8fbfa6; }
#room-view .rv-body { position: relative; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
#room-view .rv-body > .rx-type { position: relative !important; flex: 1 1 auto; width: 100% !important; min-height: 0 !important; height: auto !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
#room-view .rv-body > .dk-deck { flex: none; margin: 0 !important; padding: 10px 18px 12px 120px !important; }
/* telemetry: the scope itself fills the view (no tube bezel, no stickers) */
#room-view .rv-body > .rx-broadcast { position: relative !important; flex: 1 1 auto; width: 100% !important; height: auto !important; min-height: 0; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; display: flex !important; flex-direction: column; }
#room-view .rv-body > .rx-broadcast > * { flex: 1 1 auto; min-height: 0; }
#room-view .rv-body > .rx-broadcast :is(.rx-broadcast-graphic, .rx-scope) { position: relative !important; width: 100% !important; height: 100% !important; inset: auto !important; }
#room-view .rv-body > .rx-broadcast .rx-scope-data { font-size: clamp(15px, 1.1vw, 22px) !important; padding: clamp(10px, 1vw, 20px) !important; }
#room-view .rv-body > .rx-broadcast .rx-scope-data * { font-size: inherit !important; }
#room-view .rv-body > .rx-broadcast .rx-scope-name { font-size: clamp(20px, 1.7vw, 34px) !important; }
#room-view .rv-body > .rail { display: block !important; width: 100%; max-width: none; padding: 24px; }
#room-view .rv-body > .chat, #room-dock .rd-slot > .chat, #room-sheet .rs-slot > .chat { visibility: visible !important; position: relative !important; inset: auto !important; display: flex !important; flex-direction: column; width: 100% !important; height: 100% !important; max-height: none !important; margin: 0 !important; transform: none !important; }
#room-view .rv-back, #room-sheet .rs-close { min-height: 40px; padding: 9px 14px 7px; border: 0; border-radius: 4px; cursor: pointer;
  font: 800 15px/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .12em; color: #2a2418; background: linear-gradient(180deg, #d9cfb2, #b9ad8d); box-shadow: 0 3px 0 #6e664f, 0 5px 8px #000a; }
#room-view .rv-back:active, #room-sheet .rs-close:active { translate: 0 3px; box-shadow: 0 1px 0 #6e664f, 0 2px 4px #000a; }

/* windows: the same glass, no dimmed backdrop over the room */
html.room-on.room-win #layer { z-index: 60 !important; padding: 0 !important; background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; display: flex !important; overflow: hidden; }
html.room-on.room-win #layer .window { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; border-radius: inherit !important; animation: none !important; }

/* desktop: chat docked on the right while you're in a view or a window */
#room-dock { position: fixed; z-index: 1200; top: 0; right: 0; bottom: 0; width: 340px; background: #020403; border-left: 1px solid #1d2a22; box-shadow: -8px 0 24px #000a; display: flex; flex-direction: column; }
#room-dock.folded { width: 0; border: 0; box-shadow: none; }
#room-dock .rd-slot { flex: 1; min-height: 0; display: flex; }
#room-dock.folded .rd-slot { display: none; }
#room-dock .rd-fold { position: relative; align-self: flex-end; margin: 8px 10px 6px; padding: 0 14px; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 4px; cursor: pointer;   /* inside the dock, never over a window's title bar */
  font: 800 14px/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .1em; color: #2a2418; background: linear-gradient(180deg, #d9cfb2, #b9ad8d); box-shadow: -2px 3px 8px #000a, 0 3px 0 #6e664f; }
#room-dock .rd-fold:active { translate: 0 2px; box-shadow: -2px 1px 4px #000a, 0 1px 0 #6e664f; }
#room-dock .rd-badge { font: 15px/1 DecayReadout, monospace !important; color: #1a0e02; background: #f0a94a; padding: 2px 5px; border-radius: 2px; }
#room-dock.folded .rd-fold { position: absolute; margin: 0; padding: 0; left: auto; right: 0; top: 50%; width: 44px; min-height: 120px; translate: 0 -50%; flex-direction: column; padding: 10px 0; writing-mode: vertical-rl; }
#room-dock.folded .rd-fold:active { translate: 2px -50%; }

/* phone: a one-line pager at the bottom; tap for the full chat */
#room-pager { position: fixed; z-index: 1200; left: 0; right: 0; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: #020504; border-top: 1px solid #1d3a2c; container-type: inline-size; }
#room-pager .pg-line { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; background: #041210; border-radius: 4px; cursor: pointer; text-align: left; box-shadow: inset 0 0 8px #000; }
#room-pager .pg-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 21px/1 DecayReadout, VT323, monospace; color: #74ffd6; text-shadow: 0 0 6px rgb(90 255 210 / .7); }
#room-pager .pg-badge { font-size: 17px; }
#room-sheet { position: fixed; z-index: 1300; left: 0; right: 0; bottom: 0; height: 82vh; background: #020403; border-top: 2px solid #2a3b30; border-radius: 10px 10px 0 0; box-shadow: 0 -10px 30px #000c;
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.3,1); }
#room-sheet.rs-on { transform: none; }
#room-sheet .rs-grip { flex: none; height: 26px; cursor: grab; touch-action: none; background: radial-gradient(closest-side, #3b4a40 40%, transparent 42%) center / 60px 6px no-repeat; }
#room-sheet .rs-slot { flex: 1; min-height: 0; display: flex; padding-bottom: env(safe-area-inset-bottom); }
#room-sheet .rs-close { position: absolute; top: 10px; right: 12px; min-height: 36px; padding: 8px 12px 6px; font-size: 13px !important; }

@media (prefers-reduced-motion: reduce) { #room .room-stage, #room-sheet { transition: none !important; } #room .room-dead::after, #room .vfd-text { animation: none !important; } }

/* phone: the CRTs are small, so fewer, bigger lines; the hero shows the specimen and title only (readouts are in the flat view) */
#room[data-layout=phone] .rp-l { font-size: 11cqh; }
#room[data-layout=phone] .rp-l:nth-last-child(n+4) { display: none; }
#room[data-layout=phone] .rl-rows p { font-size: 20cqh; }
#room[data-layout=phone] .room-hero-slot > .rx-type :is(.ins-tick, .dk-inst, .rx-type > p) { display: none !important; }
/* the main screen's readouts (logged out PULLS / SETS / PLAYERS / VALUE, logged in SETS / CARDS / COMPLETE / VALUE): in the
   empty lower left under the title, sized with the screen; the instrument group's other parts stay out of the room */
#room .room-hero-slot > .rx-type .ac-instruments.sp-instruments { display: block !important; position: absolute !important; inset: 0 !important; z-index: 3; pointer-events: none; background: none !important; border: 0 !important; box-shadow: none !important; }
#room .room-hero-slot > .rx-type .sp-instruments > :not(.sp-readouts) { display: none !important; }
#room .room-hero-slot > .rx-type .sp-readouts { position: absolute !important; left: 3.4cqw !important; right: auto !important; top: auto !important; bottom: 11cqh !important; width: 30cqw !important;
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.6cqh 2.4cqw !important; padding: 1.8cqh 2.2cqw !important; visibility: visible !important; }
#room .room-hero-slot > .rx-type .sp-readouts span { font-size: max(11px, 2.5cqh) !important; letter-spacing: .1em; white-space: nowrap; overflow: hidden; }
#room .room-hero-slot > .rx-type .sp-readouts b { display: block !important; font-size: max(15px, 4.8cqh) !important; margin-top: .15em; white-space: nowrap; }
#room .room-hero-slot > .rx-type > p { font-size: max(11px, 2.6cqh) !important; max-width: 34cqw !important; line-height: 1.35 !important; text-wrap: balance; }   /* balanced lines: never one word left alone */
#room[data-layout=phone] .room-hero-slot > .rx-type .rx-frequency { display: none !important; }   /* phone: the readouts take the status line's place */
#room[data-layout=phone] .room-hero-slot > .rx-type .sp-readouts { left: 3cqw !important; right: 3cqw !important; width: auto !important; bottom: 3cqh !important; grid-template-columns: repeat(4, minmax(0, auto)) !important; justify-content: space-between; gap: 1cqh 2cqw !important; padding: 1.4cqh 2.4cqw !important; }
#room[data-layout=phone] .room-hero-slot > .rx-type .sp-readouts span { font-size: max(10px, 2.2cqh) !important; letter-spacing: .06em; }
#room[data-layout=phone] .room-hero-slot > .rx-type .sp-readouts b { font-size: max(15px, 3.6cqh) !important; }
/* the title: sized with the screen; logged in it is a size smaller (long names smaller again), so the specimen has room */
#room .room-hero-slot > .rx-type h1 { font-size: 11cqh !important; max-width: 30cqw; }
#room .room-hero-slot > .rx-type:not(.sp-sample) h1 { font-size: 9.2cqh !important; }
#room .room-hero-slot > .rx-type:not(.sp-sample) h1.sp-len-m { font-size: 8cqh !important; }
#room .room-hero-slot > .rx-type:not(.sp-sample) h1.sp-len-l { font-size: 6.6cqh !important; }
#room .room-hero-slot > .rx-type:not(.sp-sample) h1.sp-len-xl { font-size: 5.4cqh !important; }
#room[data-layout=phone] .room-hero-slot > .rx-type h1 { font-size: 7cqh !important; max-width: 70cqw; }
#room[data-layout=phone] .room-hero-slot > .rx-type:not(.sp-sample) h1 { font-size: 6cqh !important; }
/* the bar names the screen, so the tape labels stay on the machine */
html.room-on.room-win .dk-wintape, #room-view :is(.dk-tape, .dk-tube-badge) { display: none !important; }
#win-body .room-q { display: flex; gap: 8px; flex-wrap: wrap; }
#win-body .room-q .btn[aria-pressed=true] { box-shadow: inset 0 0 0 2px #e6a64a; }
#win-body .room-status { margin-top: 16px; font: 15px/1.4 DecayReadout, VT323, monospace !important; color: #7fa894; }
/* the sheet has its own BACK key in the grip row; the chat's old ✕ stays out of the way */
#room-sheet .rs-grip { height: 54px; }
#room-sheet .rs-close { z-index: 2; top: 7px; }
:is(#room-sheet .rs-slot, #room-view .rv-body, #room-dock .rd-slot) > .chat header .close { display: none !important; }

/* a console key opens its first page; the module's other pages are tabs across the window */
.room-tabs { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; flex: none; background: #0b0c0a; border-bottom: 1px solid #23251e; scrollbar-width: none; }
.room-tabs::-webkit-scrollbar { display: none; }
.room-tabs button { flex: none; min-height: 38px; padding: 8px 14px 6px; border: 0; border-radius: 4px; cursor: pointer; white-space: nowrap;
  font: 800 14px/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .08em; text-transform: uppercase; color: #2a2418; background: linear-gradient(180deg, #d9cfb2, #b9ad8d); box-shadow: 0 3px 0 #6e664f, 0 4px 6px #0008; }
.room-tabs button:active { translate: 0 2px; box-shadow: 0 1px 0 #6e664f; }
.room-tabs button { position: relative; padding-left: 26px; }
.room-tabs button::before { content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-radius: 50%; background: #4a3a24; box-shadow: inset 0 1px 1px #0009; }
/* the page you're on: its key latched down in the well, its lamp lit amber */
.room-tabs button[aria-pressed=true] { color: #241c10; background: linear-gradient(180deg, #b9ad8d, #a89c7c); box-shadow: 0 0 0 #0000, inset 0 2px 5px #000a, inset 0 -1px 0 #fff2; translate: 0 3px; }
.room-tabs button[aria-pressed=true]::before { background: #ffb347; box-shadow: 0 0 6px #ff9a2a, 0 0 2px #ffd9a0 inset; }
html:not(.room-on) .room-tabs { display: none; }
#room .rp-av { width: 1.05em; height: 1.05em; margin: 0 .3em -.12em 0; border-radius: 2px; object-fit: cover; box-shadow: 0 0 4px rgb(110 255 150 / .4); }
#room .rp-l.rp-hasgif { display: block; }
#room .rp-gif { display: block; margin-top: .25em; height: 34cqh; }
#room .rp-gif img { height: 100%; max-width: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 0 10px rgb(110 255 150 / .25); }
#room[data-layout=phone] .rp-gif { height: 38cqh; }
#room[data-layout=phone] .rp-lines:has(.rp-hasgif) .rp-l:nth-last-child(n+3) { display: none; }

/* desk props: shortcuts with a hover glow and a label tag that keeps its reading size (--is = 1 / the room's scale) */
#room .room-prop:is(:hover, :focus-visible) { -webkit-backdrop-filter: brightness(1.06) sepia(.18); backdrop-filter: brightness(1.06) sepia(.18); }   /* just a touch warmer; the outline does the rest */
#room .room-prop:active { -webkit-backdrop-filter: brightness(.8); backdrop-filter: brightness(.8); }
#room .room-prop.live { animation: room-raid 1.4s ease-in-out infinite; }
@keyframes room-raid { 0%, 100% { -webkit-backdrop-filter: brightness(1); backdrop-filter: brightness(1); } 50% { -webkit-backdrop-filter: brightness(1.5) sepia(.4) hue-rotate(-30deg) saturate(1.8); backdrop-filter: brightness(1.5) sepia(.4) hue-rotate(-30deg) saturate(1.8); } }
#room .room-tag { position: absolute; z-index: 3; pointer-events: none; white-space: nowrap; transform-origin: 50% 100%; transform: translate(-50%, -100%) translateY(-6px) scale(var(--is, 1));
  padding: 4px 8px 3px; border-radius: 2px; font: 800 13px/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .1em; color: #2a2418; background: #d9cfb2; box-shadow: 0 2px 6px #000a;
  opacity: 0; transition: opacity .12s; }
#room .room-tag.on, #room .room-tag.hot { opacity: 1; }
#room .room-tag.hot { color: #1a0e02; background: #f0a94a; box-shadow: 0 0 10px rgb(240 169 74 / .6), 0 2px 6px #000a; }
#room .room-steam { position: absolute; pointer-events: none; transform: translate(-50%, -100%); }
#room .room-steam i { position: absolute; bottom: 0; width: 26%; height: 100%; border-radius: 50%; filter: blur(9px); opacity: 0;
  background: radial-gradient(closest-side, rgb(240 236 225 / .8), transparent); animation: room-steam 3.2s ease-out infinite; }
#room .room-steam i:nth-child(1) { left: 18%; } #room .room-steam i:nth-child(2) { left: 40%; animation-delay: 1.1s; } #room .room-steam i:nth-child(3) { left: 60%; animation-delay: 2.1s; }
@keyframes room-steam { 0% { transform: translateY(30%) scaleX(.6); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-40%) scaleX(1.4) rotate(8deg); opacity: 0; } }
#room .room-dead { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { #room .room-prop.live, #room .room-steam i { animation: none !important; } }
#room .room-dead canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; filter: brightness(.55) contrast(1.1); opacity: .85; }   /* static, dim enough to sit behind the tape */
#room .room-dead::after { display: none; }

/* big screens (windows, the specimen, pulls, telemetry, Happening now): grown past the painted glass, so a bezel goes round them */
html.glass-big :is(#room-view, html.room-on.room-win #layer) { border-radius: 14px !important;
  box-shadow: 0 0 0 10px #1d1b16, 0 0 0 11px #3b382e, 0 0 0 13px #0b0a08, 0 24px 60px #000d, inset 0 0 0 1px #2a2820 !important; }
#room-view .rv-explore { display: none !important; margin-left: auto; min-height: 40px; padding: 9px 14px 7px; border: 0; border-radius: 4px; cursor: pointer;
  font: 800 15px/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .12em; color: #1a0e02; background: linear-gradient(180deg, #f2bf6a, #d99a3e); box-shadow: 0 3px 0 #7a5420, 0 5px 8px #000a; }
#room-view .rv-explore:active { translate: 0 3px; box-shadow: 0 1px 0 #7a5420; }

/* the chat popped out of the console strip: it grows up out of the strip */
#room-sheet.rs-pop { border-radius: 8px; border: 2px solid #2a3b30; transform-origin: 50% 100%; transform: scaleY(.04); opacity: 0; transition: transform .22s cubic-bezier(.2,.8,.3,1), opacity .12s; box-shadow: 0 0 0 1px #000, 0 18px 50px #000d, 0 0 30px rgb(90 255 210 / .12); }
#room-sheet.rs-pop.rs-on { transform: none; opacity: 1; }
#room-sheet.rs-pop .rs-grip { height: 40px; }
@media (prefers-reduced-motion: reduce) { #room-sheet.rs-pop { transition: none; } }
#room .rp-l b[class*="nfx-"] { text-shadow: none; }   /* Locker name effects show on the chat screen too */
#room .room-desk { position: absolute; inset: 0; pointer-events: none; z-index: 3; }   /* the desk things stand in front of the machines: above the live screens and the ivy over them (room-occ) */
#room .room-desk img { position: absolute; display: block; }

/* live effects on the Locker desk things (room.js deskFx); only animate when #room has fx-on (not LO / calm / reduced motion) */
#room .dfx { position: absolute; pointer-events: none; display: block; }
#room:not(.fx-on) :is(.dfx-spark, .dfx-steam, .dfx-blob, .dfx-petal, .dfx-bubble, .dfx-holo, .dfx-glint) { display: none; }
#room .dfx-glow { border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--c) / .32), rgb(var(--c) / .1) 55%, transparent); mix-blend-mode: screen; }
#room.fx-on .dfx-pulse { animation: dfx-pulse 2.6s ease-in-out infinite; }
#room.fx-on .dfx-pulse-slow { animation: dfx-pulse 5s ease-in-out infinite; }
@keyframes dfx-pulse { 0%, 100% { opacity: .65; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
#room .dfx-spark { opacity: 0; background: radial-gradient(closest-side, rgb(255 255 255), rgb(var(--c)) 35%, transparent); mix-blend-mode: screen; animation: dfx-twinkle 2.6s ease-in-out infinite; }
#room .dfx-spark::before { content: ""; position: absolute; inset: -60%; background: linear-gradient(rgb(var(--c) / .9), rgb(var(--c) / .9)) 50% 50% / 8% 100% no-repeat, linear-gradient(rgb(var(--c) / .9), rgb(var(--c) / .9)) 50% 50% / 100% 8% no-repeat; }
@keyframes dfx-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 15% { opacity: 1; transform: scale(1) rotate(20deg); } 40% { opacity: 0; transform: scale(.4) rotate(45deg); } }
#room .dfx-steam i { position: absolute; bottom: 0; width: 34%; height: 100%; border-radius: 50%; opacity: 0; filter: blur(10px); background: radial-gradient(closest-side, rgb(240 236 225 / .75), transparent); animation: room-steam 3.4s ease-out infinite; }
#room .dfx-steam i:nth-child(1) { left: 10%; } #room .dfx-steam i:nth-child(2) { left: 36%; animation-delay: 1.1s; } #room .dfx-steam i:nth-child(3) { left: 58%; animation-delay: 2.2s; }
#room .dfx-blob { border-radius: 50%; mix-blend-mode: screen; filter: blur(3px); background: radial-gradient(closest-side, rgb(var(--c) / .95), rgb(var(--c) / 0)); background-size: 100% 22%; background-repeat: no-repeat; animation: dfx-blob 4s ease-in-out infinite alternate; }
@keyframes dfx-blob { from { background-position: 50% 100%; } to { background-position: 50% 0%; } }
#room .dfx-bubble::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 60%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; border: 1.5px solid rgb(var(--c) / .85); opacity: 0; }
#room.fx-on .dfx-bubble::before { animation: dfx-up 4s ease-in infinite; animation-delay: inherit; animation-duration: inherit; }
@keyframes dfx-up { 0% { bottom: 0; opacity: 0; } 15% { opacity: 1; } 100% { bottom: 100%; opacity: 0; } }
#room .dfx-petal::before { content: ""; position: absolute; left: 50%; top: 0; width: 7%; aspect-ratio: 1.4; border-radius: 60% 0 60% 0; background: rgb(var(--c) / .9); opacity: 0; }
#room.fx-on .dfx-petal::before { animation: dfx-fall 6s ease-in infinite; animation-delay: inherit; animation-duration: inherit; }
@keyframes dfx-fall { 0% { top: 0; left: 50%; transform: rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { top: 100%; left: 70%; transform: rotate(260deg); opacity: 0; } }
#room .dfx-holo { mix-blend-mode: soft-light; opacity: .22; background: linear-gradient(115deg, #ff6ad5, #6ad8ff, #9aff8a, #ffe36a, #c46aff, #ff6ad5); background-size: 300% 300%; animation: dfx-holo 5s linear infinite; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
@keyframes dfx-holo { to { background-position: 300% 0; } }
#room .dfx-glint { mix-blend-mode: screen; background: linear-gradient(105deg, transparent 40%, rgb(255 255 255 / .55) 48%, transparent 56%); background-size: 300% 100%; animation: dfx-glint 4.5s ease-in-out infinite; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
@keyframes dfx-glint { 0%, 55% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
#room.fx-on .room-desk img[data-k="pet_cat"] { transform-origin: 50% 85%; animation: dfx-breathe 3.6s ease-in-out infinite; }
@keyframes dfx-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.03); } }
@media (prefers-reduced-motion: reduce) { #room .dfx, #room .room-desk img { animation: none !important; } }
/* things in front of the screens (room.js loads web/occ): above the live screens, never in the way of a click */
#room .room-occ { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
#room .room-occ img { position: absolute; display: block; }
/* the LOG IN TO PLAY key: its legend fills the key (beats the key family's fixed legend sizes) */
#room .room-ro :is(.kc, #_k).kc.kc.kc.kc.kc.kc.ro-login { height: 86% !important; min-height: 0 !important; padding: 0 4% !important; justify-content: center !important; align-items: center !important;
  font-size: 46cqh !important; letter-spacing: .06em !important; line-height: 1 !important; }
/* a big pull on the strip (instead of the old pop-up): amber, a few slow pulses */
#room .room-vfd.vfd-big .vfd-text { color: #ffcf7a; text-shadow: 0 0 5px rgb(255 190 90 / .95), 0 0 16px rgb(255 150 50 / .55); }
#room .room-vfd.vfd-big { animation: vfd-big 1.1s ease-in-out 4; }
@keyframes vfd-big { 50% { box-shadow: inset 0 0 8px #000, 0 0 18px rgb(255 170 60 / .55); } }
@media (prefers-reduced-motion: reduce) { #room .room-vfd.vfd-big { animation: none; } }

/* ---------- full-screen views and windows scale with the screen (room.js sets --ui-z from the window size) ---------- */
html.room-on.room-win #layer .window, #room-view .rv-bar, #room-view .rv-body > :is(.chat, .rail, .dk-deck) { zoom: var(--ui-z, 1); }
/* the specimen view: its words sized to the screen (the WebGL canvas is never zoomed) */
#room-view .rv-body > .rx-type > small { font-size: clamp(12px, .8vw, 24px) !important; }
#room-view .rv-body > .rx-type > p { font-size: clamp(13px, .9vw, 26px) !important; max-width: 40% !important; line-height: 1.35 !important; text-wrap: balance; }
@media (max-width: 760px) { #room-view .rv-body > .rx-type > p { max-width: 92% !important; } }
@media (min-width: 761px) {
#room-view .rv-body > .rx-type .sp-readouts { width: min(760px, 34%) !important; padding: clamp(10px, .8vw, 22px) clamp(12px, 1vw, 26px) !important; }
#room-view .rv-body > .rx-type .sp-readouts span { font-size: clamp(11px, .72vw, 20px) !important; }
#room-view .rv-body > .rx-type .sp-readouts b { font-size: clamp(18px, 1.6vw, 44px) !important; }
#room-view .rv-body > .rx-type h1 { font-size: clamp(42px, 4.6vw, 132px) !important; }
#room-view .rv-body > .rx-type h1.sp-len-m { font-size: clamp(30px, 3.4vw, 98px) !important; }
#room-view .rv-body > .rx-type h1.sp-len-l { font-size: clamp(24px, 2.7vw, 78px) !important; }
#room-view .rv-body > .rx-type h1.sp-len-xl { font-size: clamp(20px, 2.2vw, 62px) !important; }
}
@media (max-width: 760px) { #room-view .rv-body > .rx-type .sp-readouts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; left: 12px !important; right: 12px !important; width: auto !important; } }
#room-view .rv-body > .rx-type :is(.ins-right, .ins-read) { zoom: var(--ui-z, 1); }

/* the Live pulls view: a full-height list of tiles; newest first */
#room-view .rv-pulls { flex: 1 1 auto; min-height: 0; overflow: auto; padding: clamp(12px, 1.4vw, 28px); display: grid; align-content: start; gap: clamp(8px, .9vw, 16px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(300px, 26vw, 520px)), 1fr)); background: radial-gradient(120% 90% at 50% 0, #071220, #020306 70%); }
#room-view .rvp { display: grid; grid-template-columns: clamp(64px, 5vw, 150px) minmax(0, 1fr) auto; gap: clamp(10px, 1vw, 18px); align-items: center; min-width: 0;
  padding: clamp(8px, .7vw, 14px); background: #05080c; border: 1px solid #172230; border-radius: 4px; }
#room-view .rvp.fresh { animation: rvp-in .5s cubic-bezier(.2,.8,.3,1) both; }
@keyframes rvp-in { from { opacity: 0; transform: translateY(-10px); background: #1a1406; } }
#room-view .rvp-art { aspect-ratio: 63 / 88; display: block; background: #0a0c0e; border-radius: 3px; overflow: hidden; position: relative; box-shadow: 0 0 0 1px #000, 0 0 0 2px #2b3542; }
#room-view .rvp-art img { width: 100%; height: 100%; object-fit: cover; display: block; filter: none !important; }   /* full colour */
#room-view .rvp-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 2px, rgb(0 0 0 / .1) 2px 3px), linear-gradient(140deg, rgb(255 255 255 / .1), transparent 40%); }   /* a light glass touch */
#room-view .rvp.t1 .rvp-art { box-shadow: 0 0 0 1px #000, 0 0 0 2px #3fd8c8; } #room-view .rvp:is(.t2, .t3) .rvp-art { box-shadow: 0 0 0 1px #000, 0 0 0 2px #4a8cff; }
#room-view .rvp:is(.t4, .t5) .rvp-art { box-shadow: 0 0 0 1px #000, 0 0 0 2px #ff8a3a, 0 0 14px #ff6a2a88; }
#room-view .rvp-txt { min-width: 0; display: grid; gap: .3em; }
#room-view .rvp-txt b { font: 600 clamp(17px, 1.25vw, 36px)/1.1 'Barlow Condensed', KeyLegend, sans-serif !important; letter-spacing: .02em; color: #eef3ea; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
#room-view .rvp-tag { justify-self: start; font: 700 clamp(11px, .7vw, 19px)/1 KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .14em; padding: .35em .5em .25em; border-radius: 2px; color: #9fb0c2; border: 1px solid currentColor; }
#room-view .rvp.t1 .rvp-tag { color: #5ee0d2; } #room-view .rvp:is(.t2, .t3) .rvp-tag { color: #7ab4ff; } #room-view .rvp.t4 .rvp-tag { color: #ffb45a; } #room-view .rvp.t5 .rvp-tag { color: #ff8ad8; }
#room-view .rvp-txt small { font: clamp(14px, .95vw, 26px)/1.2 DecayReadout, VT323, monospace !important; color: #8fa9bf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#room-view .rvp-txt small i { font-style: normal; color: #cfe2ff; }
#room-view .rvp em { font: clamp(20px, 1.6vw, 46px)/1 DecayReadout, VT323, monospace !important; font-style: normal; color: #f0b25a; text-shadow: 0 0 8px rgb(240 170 80 / .5); white-space: nowrap; }
#room-view .rvp-empty { grid-column: 1 / -1; margin: auto; padding: 10vh 0; font: clamp(18px, 1.4vw, 28px) DecayReadout, monospace; color: #6f8aa6; letter-spacing: .1em; }
@media (prefers-reduced-motion: reduce) { #room-view .rvp.fresh { animation: none; } }
/* the arena's lobby and result panels scale with the screen like every window */
html.room-on #arena :is(.al-box, .ar-box) { zoom: var(--ui-z, 1); }

/* ---------- pictures are always in full colour (the owner, v144): GIFs, webcam photos, uploads, avatars, card art.
   They sit in a neat dark mount with at most a light scanline / glass touch, never tinted into the screen palette. ---------- */
:is(.chat, #room, #room-view, #room-dock, #room-sheet, .rail) :is(img, video):not(.ic):not(.room-plate) { filter: none !important; mix-blend-mode: normal !important; }
.chat .chat-imgs { position: relative; }
.chat .chat-imgs :is(img, video) { max-width: min(300px, 100%); max-height: 240px; object-fit: contain; border-radius: 3px !important; padding: 3px; background: #050706; border: 1px solid #22302a !important; box-shadow: 0 0 0 1px #000, 0 4px 12px #0008; }
#room .rp-gif img { padding: 2px; background: #050706; box-shadow: 0 0 0 1px #000 !important; }

/* ---------- the nameplate: lit letters in the badge on the main monitor (seven taps: the easter egg) ---------- */
#room .room-badge { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: size; display: grid; place-items: center; cursor: pointer; z-index: 2; border-radius: 3px; overflow: hidden; }
#room .room-badge span { font: 400 62cqh/1 'Anton', KeyLegend, 'Barlow Condensed', sans-serif !important; letter-spacing: .14em; color: #ffd9a0; white-space: nowrap;
  text-shadow: 0 0 2px #fff3dc, 0 0 6px rgb(255 190 110 / .9), 0 0 14px rgb(255 150 60 / .55); animation: badge-breathe 7s ease-in-out infinite; }
#room .room-badge::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(255 255 255 / .1), transparent 45%), repeating-linear-gradient(90deg, transparent 0 3px, rgb(0 0 0 / .18) 3px 4px); }
#room .room-badge.tap span { animation: badge-tap .25s steps(2) 1; }
@keyframes badge-breathe { 50% { color: #ffe6bf; text-shadow: 0 0 2px #fff6e6, 0 0 8px rgb(255 200 120 / .95), 0 0 20px rgb(255 160 70 / .6); } }
@keyframes badge-tap { 0% { opacity: .3; } 50% { opacity: 1; filter: brightness(1.6); } }

/* ---------- the slab display: your best slab, lit like a trophy (one very slow glint across the case) ---------- */
#room .room-slab { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: size; cursor: pointer; z-index: 2; }
#room .room-slab .rsl-case { position: absolute; inset: 0; border-radius: 4cqw; background: linear-gradient(160deg, #dfe6ea, #a9b4ba 60%, #8d989e); box-shadow: inset 0 0 0 1.5cqw rgb(255 255 255 / .35), 0 0 0 .6cqw rgb(0 0 0 / .5); overflow: hidden; }
#room .room-slab .rsl-label { position: absolute; left: 6cqw; right: 6cqw; top: 3.5cqh; height: 15cqh; display: flex; align-items: center; justify-content: space-between; padding: 0 4cqw; border-radius: 2cqw;
  background: #f1efe6; border-top: 2.4cqh solid #b8252b; box-shadow: inset 0 0 0 .4cqw rgb(0 0 0 / .15); }
#room .room-slab .rsl-label[data-co="bgs"] { border-top-color: #1f1f1f; } #room .room-slab .rsl-label[data-co="cgc"] { border-top-color: #2d5aa8; }
#room .room-slab .rsl-label span { font: 700 8cqh/1 'Barlow Condensed', sans-serif !important; color: #2a2620; letter-spacing: .04em; }
#room .room-slab .rsl-label b { font: 800 9cqh/1 'Barlow Condensed', sans-serif !important; color: #1a1712; }
#room .room-slab .rsl-card { position: absolute; left: 9cqw; right: 9cqw; top: 22cqh; bottom: 5cqh; background: #0b0c0d; border-radius: 2cqw; overflow: hidden; box-shadow: 0 0 0 .5cqw rgb(0 0 0 / .4); }
#room .room-slab .rsl-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
#room .room-slab .rsl-glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgb(255 255 255 / .28), transparent 34%, transparent 70%, rgb(255 255 255 / .1)); }
#room .room-slab .rsl-glint { position: absolute; inset: -20% -60%; pointer-events: none; background: linear-gradient(105deg, transparent 44%, rgb(255 250 235 / .55) 50%, transparent 56%); transform: translateX(-60%); mix-blend-mode: screen; }
#room.fx-on .room-slab .rsl-glint { animation: slab-glint 14s ease-in-out infinite; }
@keyframes slab-glint { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
#room .room-slab .rsl-empty { display: none; position: absolute; inset: auto 0 38% 0; text-align: center; font: 700 9cqw/1.1 'Barlow Condensed', sans-serif !important; letter-spacing: .12em; color: rgb(255 214 160 / .75); text-shadow: 0 0 6px rgb(255 170 80 / .5); }
#room .room-slab.empty .rsl-case { display: none; }
#room .room-slab.empty .rsl-empty { display: block; }
#room .room-slab:is(:hover, :focus-visible) { outline: none; filter: brightness(1.12) drop-shadow(0 0 6px rgb(255 190 110 / .6)); }
/* the display lamp's light on the slab and the desk around it */
#room .room-slab-light { position: absolute; width: 520px; height: 640px; margin: -60px 0 0 -260px; pointer-events: none; z-index: 1; mix-blend-mode: screen; opacity: .5;
  background: radial-gradient(42% 30% at 50% 18%, rgb(255 210 150 / .35), transparent 70%), radial-gradient(60% 18% at 50% 92%, rgb(255 190 110 / .22), transparent 75%); }
#room:not(.slab-lit) .room-slab-light { opacity: .22; }

/* ---------- the RAID note: the raid's status in marker; it flutters and its pin glints while a boss is up ---------- */
#room .room-note { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: size; pointer-events: none; z-index: 2; }   /* clicks go to the note itself below (its traced outline lights on hover) */
#room .room-note .rn-text { position: absolute; inset: 7% 5% 6%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; color: #1b120a; transform: rotate(-2deg); }
#room .room-note .rn-text { gap: 1cqh; color: #18203a; font: 400 19cqh/1.02 "Permanent Marker", "Barlow Condensed", sans-serif !important; text-align: center; text-shadow: 0 0 .5px rgb(24 32 58 / .6); }
#room .room-note .rn-text span { display: block; max-width: 100%; overflow-wrap: anywhere; font-family: "Permanent Marker", "Barlow Condensed", sans-serif !important; }
#room .room-note .rn-text span:first-child { font-size: 25cqh; letter-spacing: .02em; }
#room .room-note.live .rn-text span:first-child { text-decoration: underline 1.4cqh #b02a18; text-underline-offset: 2.4cqh; }
#room .room-note .rn-pin { position: absolute; left: 46%; top: 3%; width: 9cqw; height: 9cqw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a6a, #a8261a 60%, #4a0e08); box-shadow: 1px 2px 2px rgb(0 0 0 / .5); opacity: 0; }
#room .room-note.live .rn-pin { opacity: 1; }
#room.fx-on .room-note.live .rn-text { animation: note-flutter 3.2s ease-in-out infinite; }   /* the writing, not the note (its transform places it) */
#room.fx-on .room-note.live .rn-pin::after { content: ""; position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, transparent 45%); animation: pin-glint 2.4s ease-in-out infinite; }
#room .room-note .rn-curl { position: absolute; right: 0; bottom: 0; width: 22%; height: 22%; pointer-events: none; background: linear-gradient(135deg, transparent 50%, rgb(255 248 200 / .0) 50%); }
#room.fx-on .room-note .rn-curl { animation: note-curl 17s ease-in-out infinite; }
@keyframes note-flutter { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(-1deg) skewY(-1.4deg) translateY(-1%); } }
@keyframes pin-glint { 0%, 80%, 100% { opacity: 0; } 88% { opacity: 1; } }
@keyframes note-curl { 0%, 82%, 100% { background: linear-gradient(135deg, transparent 50%, rgb(255 248 200 / 0) 50%); } 88% { background: linear-gradient(135deg, transparent 50%, rgb(230 210 120 / .9) 50%, rgb(150 130 60 / .9)); } }

/* ---------- the desk things alive (room.js deskLive): canvases inside their slots ---------- */
#room .room-desk canvas.dl { position: absolute; pointer-events: none; }
#room .room-desk canvas.dl-steam { mix-blend-mode: screen; }
#room .dfx-caustic { border-radius: 50%; mix-blend-mode: screen; opacity: .16; filter: blur(2px); background: radial-gradient(closest-side, rgb(120 230 220 / .5), transparent), repeating-radial-gradient(circle at 40% 50%, rgb(150 240 230 / .35) 0 2px, transparent 2px 9px); background-size: 100% 100%, 140% 140%; }
#room.fx-on .dfx-caustic { animation: caustic 7s linear infinite; }
@keyframes caustic { 50% { background-position: 0 0, 30% 20%; opacity: .24; } 100% { background-position: 0 0, 0 0; } }
/* ivy sways a little (HI only) */
html[data-quality="high"] #room.fx-on .room-occ img:nth-child(odd) { transform-origin: 50% 0; animation: ivy-sway 9s ease-in-out infinite; }
html[data-quality="high"] #room.fx-on .room-occ img:nth-child(even) { transform-origin: 50% 0; animation: ivy-sway 13s ease-in-out -4s infinite; }
@keyframes ivy-sway { 50% { transform: rotate(.22deg) translateX(.6px); } }
@media (prefers-reduced-motion: reduce) { #room .room-note, #room .room-note *, #room .room-slab *, #room .room-badge span, #room .dfx-caustic, #room .room-occ img { animation: none !important; } }

/* the spare TV: your background or a YouTube video (the NO SIGNAL tape comes off) */
#room .room-dead .tv-s { image-rendering: pixelated; filter: brightness(.82) saturate(.9); opacity: 1; }
#room .room-dead .tv-yt { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: #000; }
#room .room-dead .tv-yt iframe { position: absolute; left: -12%; top: -12%; width: 124%; height: 124%; border: 0; filter: saturate(.9) contrast(1.05); }
#room .room-dead::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 2px, rgb(0 0 0 / .2) 2px 3px), radial-gradient(120% 120% at 50% 50%, transparent 55%, rgb(0 0 0 / .5)); }
#room.tv-live .room-occ img[data-scr="dead"] { display: none; }
#room:not(.tv-live) .room-occ img[data-scr="dead-ivy"] { display: none; }   /* a video on the spare TV: the tape goes, the ivy stays in front (render: main.js notape) */
#win-body .tv-menu { display: grid; gap: 16px; }
#win-body .tv-opts { display: flex; flex-wrap: wrap; gap: 10px; }
#win-body .tv-yt-in { display: grid; gap: 6px; }
#win-body .tv-yt-in span { display: flex; gap: 8px; } #win-body .tv-yt-in input { flex: 1; min-width: 0; }
#win-body .tv-snd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; cursor: pointer; } #win-body .tv-snd input { width: 18px; height: 18px; } #win-body .tv-snd small { flex-basis: 100%; opacity: .75; }

/* the site's own notices in chat (updating, back online): one dim line, gone after a minute */
.msg.notice { padding: 2px 10px !important; margin: 2px 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
.msg.notice .noticeline { margin: 0; font: 13px/1.2 DecayReadout, VT323, monospace; letter-spacing: .08em; color: #5f7a6a; opacity: .75; text-transform: uppercase; }

/* the arena is its own full-screen program: the room's chat dock, pager and pop-up stay out of it */
body.arena-open :is(#room-dock, #room-pager, #room-sheet) { display: none !important; }
/* toasts show over views and windows, and beside the docked chat rather than under it */
html.room-on .toasts { z-index: 1400; }
html.room-on.room-dock .toasts { right: 356px; }

/* coins: one amber readout everywhere (window chip, the shop's "You have", product pages) */
.coin-chip { display: inline-block; padding: 2px 8px 1px; border-radius: 1px; background: #040403; border: 1px solid #000; box-shadow: inset 0 1px 0 #000, 0 1px 0 #77756833;
  font: 400 18px/1.1 DecayReadout, VT323, monospace !important; color: #f0b44a !important; -webkit-text-fill-color: currentColor; text-shadow: 0 0 6px rgb(240 170 70 / .45); white-space: nowrap; }

/* smoothness: the room's ambient motion (ivy sway, drifting dust, tickers, the desk) sleeps while something covers it -
   a window in the main screen, a view, the 3D arena or the explore galaxy */
:is(html.room-win, html.room-in, html.sp-exploring) #room :is(*, *::before, *::after), body.arena-open #room :is(*, *::before, *::after) { animation-play-state: paused !important; }
/* the raid strip's pulse: a fading glow layer (opacity is cheap) instead of a box-shadow repainted every frame */
.raid-strip { position: relative; animation: none !important; }
.raid-strip.live::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 18px 2px rgb(229 57 53 / .35); opacity: 0; animation: raid-glow-o 2.4s ease-in-out infinite; }
@keyframes raid-glow-o { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .raid-strip.live::after { animation: none; opacity: .5; } }
html.room-on .chat.embedded .msgs { animation: none !important; }   /* the scanline band repainted the whole chat every frame; the room screens have their own glass */

/* round 2: layers, touch and keyboard */
html.room-on :is(.pmenu, .react-pick, .online-pop) { z-index: 1350; }   /* chat's menus open above the docked chat and the sheet they come from */
html.room-on .big-hit { z-index: 1450; }   /* a big moment (final blow, to the moon) shows over the window it happened in */
body:has(.stackrev, .god-take, .spot-card, .tour) :is(#room-dock, #room-pager, #room-sheet) { visibility: hidden; }   /* a reveal or the tour has the whole screen */
#room-sheet { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }   /* the phone keyboard never pushes it off the top */
#room .room-key:focus-visible { box-shadow: inset 0 0 0 2px rgb(240 169 74 / .85), inset 0 0 14px rgb(240 169 74 / .35); }   /* keyboard focus reads as a lit key */
@media (pointer: coarse) {   /* phones zoom the page into any box under 16 px: keep typing boxes at 16 */
  html.room-on :is(input:not([type=range]):not([type=checkbox]):not([type=radio]), textarea, select) { font-size: 16px !important; }
  html.th-signal body.rx-design .chat #chat-in#chat-in, html.th-signal body.rx-design .chat.embedded #chat-in#chat-in { font-size: 16px !important; }
}

/* ---------- looking round (room.js lookTo): the head turns left or right at the home view ---------- */
/* the turn (room.js drawLook): every frame room.js turns each picture about the eye with a 3D matrix and cross-fades the
   live room out over the middle. Layers, bottom to top: a still copy of the room picture (turns with the room), the side
   picture (solid), the live room (fading). So nothing ever shows the dark background. What's turning away dims (--dim). */
#room .room-under, #room .room-side { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; visibility: hidden; backface-visibility: hidden; }
#room .room-under img, #room .room-side img { display: block; width: 100%; height: 100%; }
#room .room-under::after, #room .room-side::after { content: ""; position: absolute; inset: 0; background: #020304; opacity: var(--dim, 0); }
/* while turning, each picture's side edges darken softly, so where one picture ends over the other there's no bright seam */
#room .room-stage::after, #room .room-side::before, #room .room-under::before { content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(2,3,4,.7), rgba(2,3,4,0) 7%, rgba(2,3,4,0) 93%, rgba(2,3,4,.7)); }
#room.look-turning .room-stage::after, #room.look-turning .room-side::before, #room.look-turning .room-under::before { opacity: 1; }
#room .room-under { z-index: -1; visibility: visible; }   /* always there behind the room (so it's painted and ready), above #room's background */
#room .room-side { z-index: 1; }
#room.look-turning .room-stage { z-index: 2; transition: none !important; will-change: transform, opacity; }   /* (beats the zoom's inline transition: room.js drives every frame) */
#room.look-turning :is(.room-under, .room-side) { will-change: transform; }
#room.look-turning[data-turn="left"] .room-side[data-side="left"][data-ready], #room.look-turning[data-turn="right"] .room-side[data-side="right"][data-ready] { visibility: visible; }   /* only the side being turned to / from */
#room[data-look] .room-stage, #room.look-turning .room-stage { pointer-events: none; }
#room[data-look="left"]:not(.look-turning) .room-side[data-side="left"][data-ready], #room[data-look="right"]:not(.look-turning) .room-side[data-side="right"][data-ready] { visibility: visible; }
#room[data-look]:not(.look-turning) .room-stage { visibility: hidden; opacity: 0; }
#room { touch-action: pan-y pinch-zoom; }   /* a sideways swipe is the head turning (room.js); no double-tap zoom delay either */
/* the two look keys: small graphite caps at the screen's edges, only at the home view */
#room .room-look { position: absolute; top: 50%; z-index: 6; translate: 0 -50%; width: 46px; height: 74px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #d8cfb2;
  background: linear-gradient(180deg, #4a4a43, #34342f 70%, #26261f); box-shadow: 0 4px 0 #15140f, 0 6px 12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12);
  opacity: .62; transition: opacity .2s, transform .08s; -webkit-tap-highlight-color: transparent; }
#room .room-look[data-dir="left"] { left: max(10px, calc(env(safe-area-inset-left, 0px) + 8px)); }
#room .room-look[data-dir="right"] { right: max(10px, calc(env(safe-area-inset-right, 0px) + 8px)); }
#room .room-look:is(:hover, :focus-visible) { opacity: 1; }
#room .room-look:focus-visible { outline: 2px solid #ffb84a; outline-offset: 3px; }
#room .room-look:active { transform: translateY(3px); box-shadow: 0 1px 0 #15140f, 0 2px 4px rgba(0,0,0,.6); }
#room .room-look .rlk-arrow { font: 22px/1 'Share Tech Mono', ui-monospace, monospace; color: #ffb84a; text-shadow: 0 0 6px rgba(255,170,60,.6); }
#room .room-look .rlk-label { font: 800 10px/1 'Barlow Condensed', sans-serif; letter-spacing: .14em; }
#room .room-look[hidden] { display: none; }
#room.look-turning .room-look { opacity: 0 !important; pointer-events: none !important; transition: opacity .12s; }   /* out of the way while the head turns */
html:is(.room-in, .room-win, .room-sheet) #room .room-look, body.arena-open #room .room-look, #room.room-flying .room-look, html:not(.room-ready) #room .room-look { display: none; }
@media (hover: none) { #room .room-look { opacity: .8; } }
@media (hover: hover) and (pointer: fine) {   /* a mouse: the keys hide until the pointer comes near that edge (room.js sets data-near) */
  #room .room-look { opacity: 0; pointer-events: none; transition: opacity .25s, transform .08s; }
  #room[data-near="left"] .room-look[data-dir="left"], #room[data-near="right"] .room-look[data-dir="right"], #room .room-look:focus-visible { opacity: .62; pointer-events: auto; }
  #room[data-near] .room-look:is(:hover, :focus-visible) { opacity: 1; }
}
#room[data-layout="phone"] .room-look { top: 33%; width: 36px; height: 58px; }   /* phones: up beside the big screen, clear of the marquee and the keys */
#room[data-layout="phone"] .room-look .rlk-arrow { font-size: 18px; }
#room[data-layout="phone"] .room-look .rlk-label { font-size: 9px; }
/* the koi tank on the desk end in the right-hand view (room.js readDesk): plate pixels, the koi drifting gently along the tank */
#room .room-side .side-desk { position: absolute; inset: 0; pointer-events: none; }
#room .room-side .side-desk img { position: absolute; display: block; }
#room .room-side .side-desk canvas.side-koi { position: absolute; display: block; pointer-events: none; }
#room.look-turning .room-side .side-desk img { animation-play-state: paused; }   /* still while the view turns */
@keyframes koi-drift { 0% { translate: -26px 9px; rotate: -2deg; } 30% { translate: 4px -2px; rotate: 1deg; } 55% { translate: 22px -9px; rotate: -1deg; } 80% { translate: 6px 0; rotate: 2deg; } 100% { translate: -14px 6px; rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { #room .room-side .side-desk img { animation: none !important; } }
/* ---------- end of looking round ---------- */
/* ---------- the window over the bed: what's outside (room.js "the window over the bed") ---------- */
#room .room-side .side-window { position: absolute; overflow: hidden; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; filter: brightness(.78) saturate(.92); }
#room .room-side .side-window[hidden] { display: none; }
#room .room-side .side-window canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; image-rendering: pixelated; }
#room .room-side .side-window-hit { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; border-radius: 4px; }
#room .room-side .side-window-hit:focus-visible { outline: 3px solid rgba(255, 200, 120, .7); outline-offset: 4px; }
.win-pick { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(760px, calc(100vw - 32px));
  padding: 10px 12px 12px; border-radius: 14px; background: rgba(12, 14, 16, .92); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); color: #d8d2c0; }
.win-pick .wp-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; }
.win-pick .wp-head b { letter-spacing: .12em; font-size: 13px; }
.win-pick .wp-head small { opacity: .65; font-size: 12px; }
.win-pick .wp-x { margin-left: auto; background: none; border: 0; color: inherit; font-size: 16px; cursor: pointer; padding: 2px 6px; }
.win-pick .wp-tiles { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.win-pick .wp-tile { flex: 0 0 auto; width: 132px; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); color: inherit; cursor: pointer; text-align: left; scroll-snap-align: start; }
.win-pick .wp-tile canvas, .win-pick .wp-tile img { width: 100%; aspect-ratio: 160 / 110; border-radius: 6px; image-rendering: pixelated; background: #000; display: block; }
.win-pick .wp-tile b { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-pick .wp-tile.on { border-color: #e0a64a; box-shadow: 0 0 0 1px #e0a64a; }
.win-pick .wp-tile:hover { border-color: rgba(224, 166, 74, .6); }
