/* Kofe Room
 *
 * A room you walk into. The wall takes the theme's colour, the floor and its
 * light come from the theme's photograph, and the things stand where things
 * stand: frames on the wall, books on the shelf, the question on the table.
 * Gold only for what you can touch. Motion is slow, or none.
 *
 * Order: page frame, the room (wall, floor, shelf, table, light), things,
 * the room's overlays (presence, tools, plate, music), sheets, below the room,
 * editing, first time, phone.
 */

/* ------------------------------------------------------------------ frame */
.rm-shell .main { padding-top: var(--s-4); }
.rm-page { display: grid; gap: var(--s-6); }
.rm-wait { padding: 4px 0; }
.rm-skel { aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.rm-empty { display: grid; gap: var(--s-3); justify-items: center; text-align: center; padding: 14vh var(--s-4); }
.rm-muted { color: var(--muted); font-size: var(--t-sm); }
.rm-k { font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; color: var(--door); }
html[lang="hy"] .rm-k { text-transform: none; letter-spacing: 0.03em; }

/* ------------------------------------------------------------------ the room */
.rm-stage { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #0b0908; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); isolation: isolate; }
.rm-scene { --wall-a: #3a2418; --wall-b: #1c120c; --trim: #6b4a2e; --split: 62%; position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; min-height: 420px; overflow: hidden; color: #f4eee2; container-type: inline-size; }
.rm-wall { position: absolute; inset: 0 0 calc(100% - var(--split)) 0; background:
    radial-gradient(ellipse 60% 70% at 50% 30%, rgba(255, 220, 170, 0.07), transparent 70%),
    linear-gradient(180deg, var(--wall-a), var(--wall-b)); }
.rm-wall::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: 0.55; mix-blend-mode: soft-light; }
/* a dado rail: panelled lower wall */
.rm-wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; border-top: 2px solid color-mix(in srgb, var(--trim) 70%, black); background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32)), repeating-linear-gradient(90deg, transparent 0 12%, rgba(0, 0, 0, 0.18) 12% 12.25%, transparent 12.25% 12.6%); }
.rm-sconce { position: absolute; top: 9%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 120, 0.22), transparent 62%); pointer-events: none; }
.rm-sconce.s1 { left: 2%; } .rm-sconce.s2 { right: 34%; }
.rm-ornament { position: absolute; left: 0; right: 0; top: 4%; height: 7%; opacity: 0.4; background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(214, 160, 90, 0.5) 18px 20px, transparent 20px 38px),
    linear-gradient(180deg, transparent 45%, rgba(214, 160, 90, 0.55) 45% 55%, transparent 55%);
  -webkit-mask: repeating-linear-gradient(45deg, #000 0 6px, transparent 6px 12px); mask: repeating-linear-gradient(45deg, #000 0 6px, transparent 6px 12px); }
.rm-floor { position: absolute; left: 0; right: 0; bottom: 0; top: var(--split); background: #120d0a center 60% / 112% auto no-repeat; filter: brightness(0.95) saturate(0.95); }
.rm-floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 28%, transparent 80%, rgba(0, 0, 0, 0.3)); }
.rm-backdrop { position: absolute; inset: 0; background: #0d0a08 50% var(--plate-y, 30%) / cover no-repeat; }
.rm-scene.has-plate .rm-wall, .rm-scene.has-plate .rm-floor, .rm-scene.has-plate .rm-skirting { display: none; }
.rm-skirting { position: absolute; left: 0; right: 0; top: calc(var(--split) - 1.6%); height: 2.2%; background: linear-gradient(180deg, color-mix(in srgb, var(--trim) 85%, white 6%), color-mix(in srgb, var(--trim) 60%, black)); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5); }
.rm-furn { position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: var(--z); padding: 0; margin: 0; border: 0; background: none; transform: translate(-50%, 0); pointer-events: none; -webkit-tap-highlight-color: transparent; }
.rm-furn img { display: block; width: 100%; height: auto; -webkit-user-drag: none; pointer-events: none; }
.rm-f-plant, .rm-f-chair { transform: translate(-50%, -100%); }
.rm-f-shelf img { transform: translateY(-18%); filter: drop-shadow(4px 14px 10px rgba(0, 0, 0, 0.55)) brightness(0.88); }
.rm-f-shelf.is-dark img { transform: translateY(-5%); }
.rm-f-table img { transform: translateY(-19%); filter: drop-shadow(6px 18px 16px rgba(0, 0, 0, 0.6)) brightness(0.9); }
.rm-f-rug img { filter: brightness(0.72) saturate(0.9); -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 92%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 92%, transparent 100%); }
.rm-f-plant img { filter: drop-shadow(6px 10px 10px rgba(0, 0, 0, 0.55)) brightness(0.78); }
.rm-f-chair img { transform: scaleX(-1); filter: blur(1.5px) brightness(0.6) drop-shadow(-10px 20px 20px rgba(0, 0, 0, 0.6)); }
.rm-scene.is-edit .rm-f-chair img { filter: brightness(0.6); }
.land-off { display: none; }
.land-dim { opacity: 0.3; }
.rm-scene.is-edit .rm-furn { pointer-events: auto; cursor: grab; touch-action: none; }
.rm-scene.is-edit .rm-furn.is-selected { outline: 2px solid #e3ad54; outline-offset: 4px; border-radius: 6px; }
.rm-things { pointer-events: none; }
.rm-things .rm-obj { pointer-events: auto; }
.rm-light { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; transition: background 1.2s var(--ease); background: radial-gradient(ellipse 70% 60% at 50% 60%, rgba(255, 190, 110, 0.35), transparent 70%); }
.rm-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6)); }
.light-golden .rm-light { background: radial-gradient(ellipse 80% 60% at 30% 40%, rgba(255, 170, 70, 0.55), transparent 70%); }
.light-candle .rm-light { background: radial-gradient(ellipse 50% 45% at 50% 70%, rgba(255, 160, 70, 0.5), transparent 70%); }
.light-candle .rm-wall, .light-dim .rm-wall { filter: brightness(0.75); }
.light-dim .rm-light { background: radial-gradient(ellipse 50% 40% at 50% 65%, rgba(255, 190, 110, 0.18), transparent 70%); }
.light-dim .rm-floor { filter: brightness(0.5) saturate(0.8); }
.light-cool .rm-light { background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(150, 190, 255, 0.28), transparent 70%); }
.lamp-off .rm-cone { opacity: 0 !important; }
.rm-rainfall { position: absolute; inset: 0; pointer-events: none; opacity: 0.18; background: repeating-linear-gradient(105deg, transparent 0 9px, rgba(200, 220, 255, 0.5) 9px 10px, transparent 10px 23px); background-size: 120px 120px; animation: rm-rain 0.9s linear infinite; mix-blend-mode: screen; -webkit-mask: linear-gradient(180deg, #000, transparent 60%); mask: linear-gradient(180deg, #000, transparent 60%); }

/* ------------------------------------------------------------------ things */
.rm-things { position: absolute; inset: 0; z-index: 2; }
.rm-obj { position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: var(--z); padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; transform: translate(-50%, -100%); transition: transform 0.35s var(--ease), filter 0.25s, opacity 0.3s; -webkit-tap-highlight-color: transparent; }
.rm-obj.on-wall { transform: translate(-50%, -50%); }
.rm-obj:hover { filter: brightness(1.12) drop-shadow(0 0 18px rgba(227, 173, 84, 0.25)); }
.rm-obj:focus-visible { outline: 2px solid #e3ad54; outline-offset: 4px; border-radius: 6px; }
.rm-obj.is-poke { animation: rm-poke 0.5s var(--ease); }
.rm-obj.is-hidden { opacity: 0.35; }
.rm-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55)); pointer-events: none; }

/* a frame on the wall */
.rm-frame { display: block; padding: 7%; background: linear-gradient(135deg, #8a6236, #4a2f17 55%, #7a5530); border-radius: 2px; box-shadow: 0 14px 26px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 220, 160, 0.25); }
.rm-mat { display: block; aspect-ratio: 4 / 5; padding: 6%; background: #efe6d4; box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.25); overflow: hidden; }
.rm-mat img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(0.08) contrast(1.02); }
.rm-blank { display: grid; place-items: center; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #ddd2bd 0 6px, #e7dcc8 6px 12px); color: #8a7a5e; font-style: normal; font-size: clamp(14px, 2.4cqi, 28px); font-weight: 300; }
.rm-poster { position: relative; display: grid; align-content: end; gap: 3px; aspect-ratio: 2 / 3; padding: 12% 10%; text-align: left; background: radial-gradient(circle at 70% 25%, hsl(var(--h) 60% 55% / 0.55), transparent 45%), linear-gradient(180deg, hsl(var(--h) 35% 30%), hsl(var(--h) 40% 10%)); outline: 4px solid #2a1d12; outline-offset: 0; box-shadow: 0 0 0 5px #8a6236, 0 16px 28px rgba(0, 0, 0, 0.6); overflow: hidden; }
.rm-poster::before { content: ""; position: absolute; left: 10%; right: 10%; top: 10%; height: 1px; background: rgba(244, 226, 180, 0.4); }
.rm-poster small { font-size: clamp(6px, 0.8cqi, 10px); letter-spacing: 0.24em; text-transform: uppercase; color: #cba660; font-weight: 800; }
.rm-poster b { font-family: var(--display); font-weight: 500; font-size: clamp(9px, 1.25cqi, 17px); line-height: 1.05; color: #fff7e6; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.rm-poster i { font-style: normal; font-size: clamp(6px, 0.8cqi, 10px); color: rgba(244, 238, 226, 0.6); }
.rm-note { position: relative; display: block; padding: 14% 11% 12%; background: #efe4cb; color: #2b2116; transform: rotate(-2deg); box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45); }
.rm-note q { display: block; font-family: var(--display); font-style: italic; font-size: clamp(7px, 1.05cqi, 14px); line-height: 1.25; quotes: '“' '”'; }
.rm-pin { position: absolute; top: 5%; left: 50%; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e57a62, #8a2a1c); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.rm-window { position: relative; display: block; aspect-ratio: 3 / 4; border: 5px solid #3b2a1c; border-radius: 40% 40% 3px 3px / 26% 26% 3px 3px; overflow: hidden; background: linear-gradient(180deg, #0d1626, #1d2a3d 70%, #26354a); box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7), 0 14px 24px rgba(0, 0, 0, 0.55); }
.rm-sky { position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(230, 236, 255, 0.35), transparent 18%), radial-gradient(ellipse at 50% 120%, rgba(255, 190, 120, 0.25), transparent 60%); }
.rm-rain { position: absolute; inset: -20% 0 0; background: repeating-linear-gradient(100deg, transparent 0 6px, rgba(200, 220, 255, 0.4) 6px 7px, transparent 7px 15px); background-size: 60px 60px; animation: rm-rain 0.7s linear infinite; }
.rm-sash { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 48%, #3b2a1c 48% 52%, transparent 52%), linear-gradient(180deg, transparent 55%, #3b2a1c 55% 58%, transparent 58%); }
/* books on a shelf */
.rm-spines { display: flex; align-items: flex-end; gap: 2%; height: clamp(40px, 9.5cqi, 130px); padding: 0 4%; }
.rm-spines i { position: relative; flex: 1; height: var(--hh); border-radius: 2px 2px 1px 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, black), var(--c) 30%, color-mix(in srgb, var(--c) 80%, white 8%) 55%, color-mix(in srgb, var(--c) 60%, black)); box-shadow: inset 0 6% 0 rgba(203, 166, 96, 0.4), inset 0 -8% 0 rgba(0, 0, 0, 0.25); }
.rm-spines i span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font-family: var(--display); font-size: clamp(5px, 0.7cqi, 10px); color: rgba(244, 226, 180, 0.85); max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
/* record player */
.rm-record { display: block; }
.rm-plinth { position: relative; display: block; aspect-ratio: 1.25; background: linear-gradient(135deg, #6b4526, #3a2412 60%, #54361c); border-radius: 6%; box-shadow: 0 14px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 220, 170, 0.3); transform: perspective(500px) rotateX(38deg); transform-origin: 50% 100%; }
.rm-vinyl { position: absolute; left: 7%; top: 8%; width: 66%; aspect-ratio: 1; border-radius: 50%; background: repeating-radial-gradient(circle, #111 0 1.4%, #1d1d1d 1.4% 2.6%), #111; box-shadow: 0 0 0 2px #0a0a0a, inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.rm-vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 20%, rgba(255, 255, 255, 0.1) 25%, transparent 32% 70%, rgba(255, 255, 255, 0.08) 75%, transparent 82%); }
.rm-label { position: absolute; left: 34%; top: 34%; width: 32%; height: 32%; border-radius: 50%; background: radial-gradient(circle, #111 0 9%, hsl(var(--h) 55% 45%) 10%); }
.rm-arm { position: absolute; right: 9%; top: 12%; width: 6%; height: 60%; border-radius: 3px; background: linear-gradient(90deg, #ccc, #8b8b8b); transform: rotate(18deg); transform-origin: 50% 8%; box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.5); transition: transform 0.8s var(--ease); }
.rm-record.is-on .rm-vinyl { animation: rm-spin 1.8s linear infinite; }
.rm-record.is-on .rm-arm { transform: rotate(30deg); }
/* lamp */
.rm-lamp { position: relative; display: block; aspect-ratio: 1 / 3.4; }
.rm-shade { position: absolute; top: 0; left: 8%; right: 8%; height: 20%; background: linear-gradient(180deg, #e9d6ae, #b8925c); clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.2); }
.rm-pole { position: absolute; left: 47%; width: 6%; top: 19%; bottom: 4%; background: linear-gradient(90deg, #6b5536, #2c2114); }
.rm-foot { position: absolute; left: 22%; right: 22%; bottom: 0; height: 4%; border-radius: 50%; background: #2c2114; box-shadow: 0 6px 10px rgba(0, 0, 0, 0.6); }
.rm-cone { position: absolute; left: -110%; right: -110%; top: 12%; height: 120%; background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(255, 210, 140, 0.45), transparent 70%); pointer-events: none; animation: rm-glow 6s ease-in-out infinite; transition: opacity 0.6s; }
/* candle flame flicker */
.rm-candle { position: relative; display: block; }
.rm-flame { position: absolute; left: 50%; top: 2%; width: 160%; aspect-ratio: 1; transform: translate(-50%, -40%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 120, 0.45), transparent 60%); animation: rm-flicker 2.4s ease-in-out infinite; pointer-events: none; }
/* cards on the table */
.rm-obj.on-wall .rm-card { transform: rotate(-2deg); }
.rm-card { display: grid; gap: 4%; padding: 10% 9%; text-align: left; background: #f1e7d2; color: #2b2116; border-radius: 4px; box-shadow: 0 12px 18px rgba(0, 0, 0, 0.55); transform: perspective(500px) rotateX(28deg) rotate(-3deg); transform-origin: 50% 100%; }
.rm-card small { font-size: clamp(5px, 0.75cqi, 10px); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; color: #9a6b2e; }
.rm-card b { font-family: var(--display); font-weight: 500; font-size: clamp(7px, 1cqi, 14px); line-height: 1.2; }
.rm-pcard i { display: block; height: 5px; border-radius: 3px; background: #d8c6a2; }
.rm-pcard i:first-of-type { width: 70%; background: #b98b47; }
.rm-deck { position: relative; display: block; aspect-ratio: 0.72; transform: perspective(500px) rotateX(30deg); transform-origin: 50% 100%; }
.rm-deck i { position: absolute; inset: 0; border-radius: 6px; background: #7a1f1a; border: 2px solid #f1e7d2; box-shadow: 0 8px 14px rgba(0, 0, 0, 0.55); }
.rm-deck i:nth-child(1) { transform: rotate(-9deg) translate(-6%, 2%); }
.rm-deck i:nth-child(2) { transform: rotate(5deg) translate(5%, 1%); background: #1f1a17; }
.rm-deck-top { display: grid; place-items: center; background: #f1e7d2 !important; border-color: #f1e7d2 !important; }
.rm-deck-top b { font-size: clamp(12px, 2cqi, 26px); color: #1a1410; font-family: var(--display); }
.rm-deck-sm { width: 56px; transform: none; }
/* empty things in my own room show where they could be */
.rm-obj.is-empty { opacity: 0.7; }
.rm-obj.is-empty:hover { opacity: 1; }


/* real things: frames, paper, window, books, lamp */
.rm-fr { position: relative; display: block; }
.rm-fr-img { position: relative; display: block; width: 100%; height: auto; pointer-events: none; }
.rm-fr-in { position: absolute; overflow: hidden; background: #1a140f; }
.rm-fr-in > img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(0.08) contrast(1.02) brightness(0.92); }
.rm-fr-in .rm-blank { height: 100%; }
.rm-fr .rm-poster { position: absolute; inset: 0; aspect-ratio: auto; outline: 0; box-shadow: none; }
.rm-obj.on-wall { filter: drop-shadow(5px 10px 9px rgba(0, 0, 0, 0.55)); }
.rm-obj.on-wall:hover { filter: drop-shadow(5px 10px 9px rgba(0, 0, 0, 0.55)) brightness(1.1); }
.rm-paper { position: relative; display: block; transform: rotate(-2deg); }
.rm-paper img { display: block; width: 100%; height: auto; filter: brightness(0.9); }
.rm-paper-t { position: absolute; left: 14%; right: 12%; top: 26%; bottom: 12%; display: grid; place-items: center; text-align: center; overflow: hidden; }
.rm-paper q { font-family: var(--display); font-style: italic; font-size: clamp(7px, 1.15cqi, 15px); line-height: 1.3; color: #2b2116; quotes: '“' '”'; overflow: hidden; }
.rm-win { position: relative; display: block; }
.rm-win > img { position: relative; display: block; width: 100%; height: auto; }
.rm-win-sky { position: absolute; left: 20%; right: 20%; top: 8%; bottom: 14%; overflow: hidden; background: linear-gradient(180deg, #0d1626, #1d2a3d 70%, #26354a); }
.rm-bookrow { position: relative; display: block; }
.rm-bookrow > span { position: absolute; top: 12%; bottom: 8%; transform: translateX(-50%); display: grid; place-items: center; overflow: hidden; pointer-events: none; }
.rm-bookrow b { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 100%; font-family: var(--display); font-weight: 500; font-size: clamp(5px, 0.72cqi, 11px); letter-spacing: 0.04em; color: rgba(240, 214, 150, 0.9); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); }
.rm-lamp.has-img { aspect-ratio: auto; }
.rm-lamp.has-img .rm-cone { left: -160%; right: -160%; top: 4%; height: 90%; z-index: -1; }
.rm-obj:not(.on-wall)::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: -2.5%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent); z-index: -1; pointer-events: none; }
.rm-obj.rm-t-lamp::after { left: 22%; right: 22%; height: 1.6%; bottom: -0.6%; }

/* the places, while arranging */
.rm-place { position: absolute; left: var(--x); top: var(--y); width: 7%; aspect-ratio: 1; border: 1.5px dashed rgba(227, 173, 84, 0.65); border-radius: 10px; transform: translate(-50%, -50%); pointer-events: none; animation: rm-pulse 1.6s ease-in-out infinite; }
.rm-place:not(.on-wall) { transform: translate(-50%, -100%); height: auto; aspect-ratio: 1.6; border-radius: 50% / 40%; }
.rm-scene.is-edit .rm-obj { cursor: grab; touch-action: none; }
.rm-scene.is-edit .rm-obj.is-selected { outline: 2px solid #e3ad54; outline-offset: 5px; border-radius: 6px; filter: drop-shadow(0 0 22px rgba(227, 173, 84, 0.35)); }
.rm-obj.is-dragging { cursor: grabbing; z-index: 999; transition: none; opacity: 0.92; }

/* ------------------------------------------------------------------ over the room */
.rm-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px; pointer-events: none; }
.rm-presence { position: absolute; left: 16px; top: 82px; }
.rm-hud > * { pointer-events: auto; }
.rm-here { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 99px; background: rgba(12, 10, 9, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; color: #f4eee2; animation: rm-in 0.5s var(--ease); }
.rm-here .mf-av, .rm-here .av { margin-left: -6px; box-shadow: 0 0 0 2px rgba(12, 10, 9, 0.8); }
.rm-live { width: 7px; height: 7px; border-radius: 50%; background: #e3ad54; box-shadow: 0 0 0 4px rgba(227, 173, 84, 0.2); margin-right: 6px; animation: rm-glow 2.4s ease-in-out infinite; }
.rm-tools { position: relative; display: flex; gap: 6px; margin-left: auto; }
.rm-tool { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 99px; border: 1px solid rgba(244, 238, 226, 0.16); background: rgba(12, 10, 9, 0.55); color: #f4eee2; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.rm-tool:hover { background: rgba(12, 10, 9, 0.8); }
.rm-tool svg { width: 18px; height: 18px; }
.rm-tool.is-text { padding: 0 14px; }
.rm-menu { position: absolute; right: 0; top: 46px; min-width: 180px; display: grid; padding: 6px; border-radius: 14px; background: #1d1814; border: 1px solid rgba(244, 238, 226, 0.12); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); }
.rm-menu a, .rm-menu button { display: block; padding: 10px 12px; border-radius: 9px; color: #f4eee2; text-decoration: none; text-align: left; background: none; border: 0; font: inherit; font-size: var(--t-sm); cursor: pointer; }
.rm-menu a:hover, .rm-menu button:hover { background: rgba(244, 238, 226, 0.08); }
.rm-plate { position: absolute; left: 16px; top: 16px; z-index: 6; display: flex; align-items: center; gap: 12px; max-width: min(60%, 420px); padding: 8px 16px 8px 8px; border-radius: 99px; background: rgba(12, 10, 9, 0.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #f4eee2; }
.rm-plate > div { display: grid; min-width: 0; line-height: 1.25; }
.rm-plate b { font-family: var(--display); font-weight: 500; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-plate small { color: #dcd3c3; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-mood { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #cba660; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-mood i { width: 6px; height: 6px; border-radius: 50%; background: #e3ad54; }
.rm-mini { position: absolute; right: 16px; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; max-width: min(46%, 320px); padding: 6px 6px 6px 8px; border-radius: 99px; border: 0; background: rgba(12, 10, 9, 0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #f4eee2; font: inherit; cursor: pointer; text-align: left; }
.rm-mini-disc { width: 30px; height: 30px; flex: none; border-radius: 50%; background: radial-gradient(circle, #e3ad54 0 16%, #111 17% 22%, #222 23%), repeating-radial-gradient(circle, #111 0 2px, #1d1d1d 2px 3px); box-shadow: 0 0 0 1px #000; }
.rm-mini.is-on .rm-mini-disc, .rm-mini-disc.is-spin { animation: rm-spin 2.2s linear infinite; }
.rm-mini-t { display: grid; min-width: 0; line-height: 1.2; }
.rm-mini-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-mini-t small { font-size: 11.5px; color: #a69d8f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-mini-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #e3ad54; color: #2a1c05; }
.rm-mini-btn svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ sheets */
#rm-layer { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; }
#rm-layer.is-on { display: grid; }
.rm-veil { position: absolute; inset: 0; background: rgba(6, 5, 4, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: rm-fade 0.3s ease; }
.rm-sheet { position: relative; width: min(560px, 100%); max-height: 86dvh; overflow: auto; padding: 28px; border-radius: 24px; background: #1d1814; color: #f4eee2; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); animation: rm-rise 0.45s var(--ease); }
.rm-sheet.is-player { width: min(480px, 100%); }
.rm-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(244, 238, 226, 0.06); color: #f4eee2; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.rm-x svg { width: 18px; height: 18px; }
.rm-sheet-in { display: grid; gap: 10px; }
.rm-line b { font-weight: 700; }
.rm-line small { color: #a69d8f; }
.rm-big { margin: 0; display: grid; gap: 12px; }
.rm-big img { width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 12px; background: #000; }
.rm-big figcaption { font-family: var(--display); font-style: italic; font-size: 20px; color: #dcd3c3; }
.rm-bigquote { margin: 0; padding: 12px 6px; }
.rm-bigquote p { font-family: var(--display); font-style: italic; font-size: clamp(24px, 4vw, 34px); line-height: 1.3; }
.rm-bigquote cite { font-style: normal; color: #cba660; font-weight: 700; }
.rm-player-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.rm-player-head .rm-mini-disc { width: 54px; height: 54px; }
.rm-player-head div { display: grid; }
.rm-player-head b { font-family: var(--display); font-size: 22px; font-weight: 500; }
.rm-player-head small { color: #a69d8f; }
.rm-embed { width: 100%; border: 0; border-radius: 12px; background: #000; }
.rm-open { color: #cba660; font-size: var(--t-sm); font-weight: 700; }
.rm-amb { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(244, 238, 226, 0.05); }
.rm-amb span { flex: 1; font-weight: 700; }
.rm-amb input { width: 120px; accent-color: #e3ad54; }

/* ------------------------------------------------------------------ under the room */
.rm-visit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: calc(var(--s-6) * -0.5); }
.rm-below { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-6) var(--s-7); align-items: start; }
.rm-sec { display: grid; gap: 12px; align-content: start; }
.rm-talk { grid-row: span 3; }
.rm-q { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; text-wrap: balance; }
.rm-answer { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 16px; border-radius: 99px; background: var(--raised); }
.rm-answer input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; min-height: 44px; outline: none; }
.rm-answer:focus-within { box-shadow: inset 0 0 0 1px var(--door); }
.rm-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lamp); color: var(--lamp-ink); display: grid; place-items: center; cursor: pointer; }
.rm-send svg { width: 18px; height: 18px; }
.rm-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rm-notes li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.rm-notes b { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rm-notes p { color: var(--ink); line-height: 1.45; }
.rm-poll { display: grid; gap: 10px; margin-top: 12px; padding: 18px; border-radius: 18px; background: var(--surface); }
.rm-poll-q { font-weight: 700; }
.rm-poll-o { display: grid; gap: 8px; }
.rm-poll-b { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.rm-poll-b:hover { border-color: var(--door); }
.rm-poll-r { position: relative; display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; overflow: hidden; isolation: isolate; }
.rm-poll-r::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--door-soft); z-index: -1; animation: rm-bar 0.8s var(--ease); }
.rm-poll-r.is-mine::before { background: rgba(227, 173, 84, 0.3); }
.rm-items { display: grid; gap: 18px; }
.rm-item { display: grid; gap: 2px; }
.rm-item-k { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.rm-item b { font-family: var(--display); font-weight: 500; font-size: 19px; }
.rm-item small { color: var(--muted); margin-bottom: 6px; }
.rm-quote { margin: 0; padding-left: 16px; border-left: 2px solid var(--door); }
.rm-quote p { font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.35; }
.rm-quote cite { font-style: normal; color: var(--muted); font-size: 13px; }
.rm-gamecard { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: var(--surface); }
.rm-gamecard b { font-weight: 700; }
.rm-gamecard p { color: var(--muted); font-size: var(--t-sm); margin: 2px 0 10px; }
.rm-faces { display: flex; flex-wrap: wrap; gap: 12px; }
.rm-faces a { display: grid; justify-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; }
.rm-faces small { font-size: 12px; }
.rm-hint { padding: 18px; border-radius: 18px; border: 1px dashed var(--line-2); }
.rm-hint p { color: var(--ink-2); }

/* ------------------------------------------------------------------ editing */
.rm-stage.is-edit { box-shadow: 0 0 0 2px rgba(227, 173, 84, 0.5), 0 30px 80px rgba(0, 0, 0, 0.45); }
.rm-edit-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; padding: 8px 16px; border-radius: 99px; background: rgba(12, 10, 9, 0.7); color: #f4eee2; font-size: 13px; white-space: nowrap; }
.rm-selbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 99px; background: rgba(20, 16, 13, 0.92); color: #f4eee2; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); max-width: calc(100% - 24px); overflow-x: auto; }
.rm-selbar > b { font-size: 13px; margin-right: 4px; white-space: nowrap; }
.rm-seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 99px; background: rgba(244, 238, 226, 0.06); }
.rm-seg button { min-width: 34px; height: 32px; padding: 0 10px; border-radius: 99px; border: 0; background: transparent; color: var(--muted, #a69d8f); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rm-seg button[aria-pressed="true"] { background: #e3ad54; color: #2a1c05; }
.rm-seg.is-wide { display: flex; flex-wrap: wrap; border-radius: 16px; }
.rm-chip { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid rgba(244, 238, 226, 0.16); background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rm-chip[aria-pressed="true"] { background: var(--door-soft); border-color: var(--door); color: var(--ink); }
.rm-chip.is-plain { border: 0; width: 34px; padding: 0; display: grid; place-items: center; }
.rm-chip.is-plain svg { width: 16px; height: 16px; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-panel { display: grid; gap: 16px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.rm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rm-tabs::-webkit-scrollbar { display: none; }
.rm-tabs button { flex: none; height: 38px; padding: 0 14px; border-radius: 99px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rm-tabs button[aria-selected="true"] { background: var(--raised); color: var(--ink); }
.rm-panel-in { display: grid; gap: 14px; }
.rm-panel-go { display: flex; justify-content: flex-end; gap: 8px; }
.rm-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.rm-theme { display: grid; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; text-align: left; }
.rm-theme-pic { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; background-size: cover; background-position: center 80%; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color 0.15s; }
.rm-theme-pic::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 58%; background: linear-gradient(180deg, var(--wall-a), var(--wall-b)); border-bottom: 2px solid rgba(0, 0, 0, 0.4); }
.rm-theme[aria-pressed="true"] .rm-theme-pic { outline-color: var(--door); }
.rm-theme small { font-size: 12.5px; font-weight: 600; }
.rm-addgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.rm-add { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.rm-add:hover { border-color: var(--door); }
.rm-add svg { width: 16px; height: 16px; color: var(--door); flex: none; }
.rm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.rm-ph { position: relative; display: grid; gap: 6px; }
.rm-ph img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.rm-ph input { min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; font-size: 13px; }
.rm-ph .rm-x { top: 6px; right: 6px; width: 32px; height: 32px; background: rgba(0, 0, 0, 0.6); }
.rm-add-ph { aspect-ratio: 4 / 5; flex-direction: column; justify-content: center; }
.rm-list { display: grid; gap: 6px; }
.rm-li { position: relative; display: grid; padding: 10px 48px 10px 14px; border-radius: 12px; background: var(--raised); }
.rm-li small { color: var(--muted); }
.rm-li .rm-x { top: 50%; transform: translateY(-50%); width: 34px; height: 34px; }
.rm-addrow { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; }
.rm-addrow input, .rm-panel input:not([type]), .rm-panel input[type="text"], .rm-onboard input:not([type]) { min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; font-size: 15px; }
.rm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-switch { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; cursor: pointer; }
.rm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rm-switch i { width: 44px; height: 26px; border-radius: 99px; background: var(--raised); position: relative; }
.rm-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform var(--med) var(--ease); }
.rm-switch input:checked + i { background: var(--door); }
.rm-switch input:checked + i::after { transform: translateX(18px); background: var(--door-ink); }
.rm-switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.rm-switch span { display: grid; }
.rm-switch small { color: var(--muted); }

/* ------------------------------------------------------------------ the first time */
.rm-onboard { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: var(--s-6); align-items: start; }
.rm-ob-preview { position: sticky; top: calc(var(--top-h) + 16px); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); pointer-events: none; }
.rm-ob-preview .rm-scene { min-height: 0; }
.rm-ob-form { display: grid; gap: 16px; }
.rm-ob-form h1, .rm-ready h1 { font-family: var(--display); font-weight: 500; font-size: var(--t-3xl); line-height: 1.04; }
.rm-lead { color: var(--ink-2); font-size: var(--t-md); }
.rm-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.rm-steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--raised); }
.rm-steps li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rm-steps li.is-done, .rm-steps li.is-on { background: var(--door); }
.rm-steps li.is-on { box-shadow: 0 0 0 3px var(--door-soft); }
.rm-themes.is-big { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.rm-qpick { display: grid; gap: 8px; }
.rm-qopt { min-height: 52px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-family: var(--display); font-size: 19px; text-align: left; cursor: pointer; }
.rm-qopt[aria-pressed="true"] { border-color: var(--door); background: var(--door-soft); }
.rm-ob-go { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }
.rm-ob-r { display: flex; gap: 6px; }
.rm-ready { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.rm-ready-scene { animation: rm-reveal 1.8s var(--ease) both; }
.rm-ready-t { position: absolute; inset: auto 0 0 0; display: grid; gap: 10px; justify-items: start; padding: clamp(20px, 4vw, 48px); background: linear-gradient(0deg, rgba(8, 6, 5, 0.92), transparent); color: #f4eee2; animation: rm-in 1s var(--ease) 1s backwards; }

/* ------------------------------------------------------------------ motion */
@keyframes rm-spin { to { transform: rotate(360deg); } }
@keyframes rm-glow { 50% { opacity: 0.75; } }
@keyframes rm-flicker { 0%, 100% { opacity: 1; transform: translate(-50%, -40%) scale(1); } 40% { opacity: 0.8; transform: translate(-50%, -42%) scale(0.94); } 70% { opacity: 0.95; transform: translate(-51%, -40%) scale(1.04); } }
@keyframes rm-rain { to { background-position: -30px 120px; } }
@keyframes rm-poke { 30% { transform: translate(-50%, -104%) scale(1.04); } }
@keyframes rm-pulse { 50% { opacity: 0.45; } }
@keyframes rm-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes rm-fade { from { opacity: 0; } }
@keyframes rm-rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
@keyframes rm-bar { from { width: 0; } }
@keyframes rm-reveal { from { filter: brightness(0) blur(6px); transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .rm-page *, #rm-layer * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1000px) {
  .rm-onboard { grid-template-columns: minmax(0, 1fr); }
  .rm-ob-preview { position: relative; top: 0; }
  .rm-below { grid-template-columns: minmax(0, 1fr); }
  .rm-talk { grid-row: auto; }
}
@media (max-width: 760px) {
  .rm-shell .main { padding-left: 0; padding-right: 0; padding-top: 0; }
  .rm-page { gap: var(--s-5); }
  .rm-stage { border-radius: 0 0 24px 24px; }
  /* the room stands up: a taller room, two rows of frames, the shelf across the middle */
  .rm-scene { aspect-ratio: 3 / 4.2; max-height: none; min-height: 0; --split: 64%; }
  .rm-obj { left: var(--px); top: var(--py); width: var(--pw); }
  .rm-place { left: var(--px); top: var(--py); width: 14%; }
  .rm-furn { left: var(--px); top: var(--py); width: var(--pw); z-index: var(--pz); }
  .rm-obj { z-index: var(--pz); }
  .land-off { display: block; }
  .land-dim { opacity: 1; }
  .port-dim { opacity: 0.3; }
  .port-off { display: none; }
  .rm-sconce.s2 { right: 4%; }
  .rm-backdrop { background-position: 24% 50%; }
  .rm-spines { height: clamp(40px, 18cqi, 90px); }
  .rm-poster b { font-size: clamp(9px, 2.6cqi, 15px); }
  .rm-poster small, .rm-poster i { font-size: clamp(6px, 1.6cqi, 9px); }
  .rm-note q { font-size: clamp(8px, 2.1cqi, 13px); }
  .rm-card b { font-size: clamp(8px, 2cqi, 13px); }
  .rm-card small { font-size: clamp(6px, 1.5cqi, 9px); }
  .rm-hud { padding: 10px; }
  .rm-tool.is-text span { display: none; }
  .rm-tool.is-text { padding: 0; width: 40px; }
  .rm-plate { left: 10px; top: 10px; max-width: calc(100% - 120px); padding: 5px 12px 5px 5px; }
  .rm-plate small, .rm-mood span { display: none; }
  .rm-plate .av { --size: 34px !important; }
  .rm-presence { left: 10px; top: 60px; }
  .rm-plate b { font-size: 16px; }
  .rm-mini { right: 10px; bottom: 10px; max-width: 64%; }
  .rm-visit { margin: 0 14px; position: sticky; bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom)); z-index: 20; padding: 8px; border-radius: 99px; background: rgba(27, 24, 21, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); justify-content: center; }
  .rm-below, .rm-panel, .rm-onboard, .rm-wait, .rm-empty { margin: 0 14px; }
  .rm-onboard { gap: var(--s-4); }
  .rm-ob-preview { border-radius: 20px; }
  .rm-addrow { grid-template-columns: 1fr 1fr; }
  .rm-addrow button { grid-column: 1 / -1; }
  .rm-grid2 { grid-template-columns: 1fr; }
  .rm-selbar { bottom: 10px; flex-wrap: wrap; justify-content: center; border-radius: 22px; width: calc(100% - 20px); overflow: visible; padding: 8px; }
  .rm-range input { width: 96px; }
  #rm-layer { place-items: end center; padding: 0; }
  .rm-sheet { border-radius: 24px 24px 0 0; width: 100%; max-height: 88dvh; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }
  .rm-ready-t { position: relative; background: none; padding: 20px 14px; color: var(--ink); }
}
.rm-ob-form, .rm-panel-in { min-width: 0; }
.rm-ob-form input, .rm-addrow input, .rm-panel input, .rm-panel textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.rm-panel textarea, .rm-onboard textarea { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
.rm-scene.is-edit, .rm-stage.is-edit { -webkit-user-select: none; user-select: none; }

/* free arranging: size slider, furniture picker */
.rm-range { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: var(--muted, #a69d8f); font-weight: 700; }
.rm-range input { width: 110px; accent-color: #e3ad54; }
.rm-sub { margin: 18px 0 8px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted, #a69d8f); }
.rm-add img { width: 100%; height: 44px; object-fit: contain; }
.rm-furn.is-dragging, .rm-obj.is-dragging { cursor: grabbing; z-index: 999 !important; transition: none; }

/* real record player: the record turns on the platter, seen at the player's angle */
.rm-player { position: relative; display: block; }
.rm-platter { position: absolute; left: 45.2%; top: 61.5%; width: 54%; height: 25%; transform: translate(-50%, -50%); pointer-events: none; }
.rm-disc { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 1; transform: translateY(-50%) scaleY(0.35); }
.rm-spinner { position: absolute; inset: 0; display: block; }
.rm-spinner img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.rm-spinner .rm-label { position: absolute; left: 33%; top: 33%; width: 34%; height: 34%; border-radius: 50%; background: radial-gradient(circle, transparent 0 7%, hsl(var(--h) 55% 42% / 0.75) 8%); mix-blend-mode: multiply; }
.rm-player.is-on .rm-spinner { animation: rm-spin 1.8s linear infinite; }
/* candle flame and coffee steam */
.rm-fire { position: absolute; left: 50%; top: -9%; width: 13%; aspect-ratio: 0.45; transform: translateX(-50%); border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%; background: radial-gradient(ellipse at 50% 75%, #fff6d6 0 25%, #ffc561 45%, rgba(255, 120, 30, 0.85) 70%, transparent 72%); filter: blur(0.4px); animation: rm-fire 1.6s ease-in-out infinite; transform-origin: 50% 100%; pointer-events: none; }
.rm-candle .rm-flame { top: -6%; }
@keyframes rm-fire { 0%, 100% { transform: translateX(-50%) scale(1, 1) rotate(-1deg); } 30% { transform: translateX(-50%) scale(0.92, 1.08) rotate(2deg); } 60% { transform: translateX(-50%) scale(1.05, 0.95) rotate(-2deg); } }
.rm-cup { position: relative; display: block; }
.rm-steam { position: absolute; left: 30%; top: -40%; width: 30%; height: 55%; background: radial-gradient(ellipse 30% 50% at 50% 70%, rgba(255, 255, 255, 0.22), transparent 70%); filter: blur(3px); animation: rm-steam 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes rm-steam { 0% { opacity: 0; transform: translateY(20%) scaleX(0.8); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40%) scaleX(1.3); } }
.rm-cards { position: relative; display: block; }
.rm-cards b { position: absolute; right: 6%; top: -6%; display: grid; place-items: center; width: 24%; aspect-ratio: 1; border-radius: 50%; background: #f1e7d2; color: #1a1410; font-family: var(--display); font-size: clamp(9px, 1.2cqi, 18px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); }
@media (prefers-reduced-motion: reduce) { .rm-fire, .rm-steam { animation: none; } }

/* ---------------------------------------------------------------- the candle, settled (polish 2026-10-15)
 * It stands on something: a soft contact shadow under the holder and a small warm pool of light on the
 * surface, with a quieter, tighter glow round the flame (no hard disc, no oversized halo). */
.rm-candle .rm-img { filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.4)); position: relative; z-index: 1; }
.rm-candle .rm-flame { width: 115%; top: -2%; background: radial-gradient(circle, rgba(255, 205, 130, 0.32) 0, rgba(255, 190, 110, 0.12) 38%, rgba(255, 190, 110, 0) 66%); z-index: 2; }
.rm-candle .rm-fire { z-index: 3; width: 11%; }
.rm-candle::after { content: ""; position: absolute; left: -70%; right: -70%; bottom: -7%; height: 20%; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(255, 196, 120, 0.3), rgba(255, 196, 120, 0.1) 55%, rgba(255, 196, 120, 0) 100%); }
.rm-candle::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: -1.5%; height: 5%; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }

/* ================================================================ the editor (polish 2026-10-15)
 * Wide screens: the room on the left stays in view; the editor on the right has a short list of sections
 * and the settings beside it, with Cancel / Save changes always at its foot. Narrow screens: the room,
 * then the editor, its sections wrapping onto as many rows as they need (nothing clipped), and the
 * Save bar kept in reach at the bottom of the screen. */
#rm-body.is-editing { display: grid; gap: var(--s-5); }
.rm-panel { padding: 0; gap: 0; overflow: hidden; display: flex; flex-direction: column; }
.rm-panel-h { padding: 16px 18px 0; }
.rm-panel-h h2 { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.15; margin: 0; }
.rm-panel > .rm-selcard, .rm-panel > .rm-selhint { margin: 12px 18px 0; }
.rm-panel-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin-top: 14px; border-top: 1px solid var(--line); min-height: 0; flex: 1; }
.rm-cats { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--line); overflow-y: auto; }
.rm-cats button { text-align: left; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 650; line-height: 1.25; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
.rm-cats button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rm-cats button[aria-selected="true"] { color: var(--ink); background: var(--raised); box-shadow: inset 3px 0 0 var(--door); }
.rm-cats button:focus-visible { outline: 2px solid var(--door); outline-offset: 1px; }
.rm-panel-in { padding: 16px 18px 22px; display: grid; gap: 14px; align-content: start; overflow-y: auto; min-width: 0; }
.rm-panel-t { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.2; margin: 0; }
.rm-panel-go { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.rm-panel-go .btn { min-height: 44px; }
/* while a film or book is being typed, its own Add is the strong button; Save steps back */
.rm-panel:has(.rm-addbox input[data-pend]:not(:placeholder-shown)) .rm-panel-go [data-rm="save"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }

@media (min-width: 1101px) {
  #rm-body.is-editing { grid-template-columns: minmax(0, 1fr) clamp(420px, 35vw, 540px); align-items: start; }
  #rm-body.is-editing .rm-stage { position: sticky; top: calc(var(--top-h) + 16px); }
  #rm-body.is-editing .rm-panel { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); max-height: calc(100dvh - var(--top-h) - 32px); }
}
@media (max-width: 1100px) {
  .rm-panel-grid { grid-template-columns: minmax(0, 1fr); }
  .rm-cats { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .rm-cats button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
  .rm-cats button[aria-selected="true"] { box-shadow: none; background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
  .rm-panel { overflow: visible; }
  .rm-panel-go { position: sticky; bottom: 0; z-index: 6; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 -10px 24px -18px rgba(0, 0, 0, 0.35); }
}
@media (max-width: 760px) {
  .rm-panel-go { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
  .rm-panel-go .btn { flex: 1 1 0; justify-content: center; }
  .rm-panel-h { padding: 14px 14px 0; }
  .rm-panel > .rm-selcard, .rm-panel > .rm-selhint { margin: 10px 14px 0; }
  .rm-panel-in { padding: 14px 14px 18px; }
}

/* ---------------------------------------------------------------- what is picked */
.rm-selhint { font-size: 13.5px; line-height: 1.45; color: var(--muted); padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-2); }
.rm-selcard { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--raised); border: 1px solid color-mix(in srgb, var(--door) 40%, var(--line)); }
.rm-selcard-h { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rm-selcard-pic { width: 44px; height: 44px; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; overflow: hidden; }
.rm-selcard-pic img, .rm-selcard-pic svg { max-width: 80%; max-height: 80%; object-fit: contain; }
.rm-selcard-n { display: grid; min-width: 0; }
.rm-selcard-n small { font-size: 12px; color: var(--muted); font-weight: 600; }
.rm-selcard-n b { font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.rm-iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; font: inherit; }
.rm-iconbtn:hover { border-color: var(--line-2); }
.rm-iconbtn svg { width: 16px; height: 16px; }
.rm-iconbtn b { font-size: 18px; line-height: 1; font-weight: 600; }
.rm-iconbtn:focus-visible, .rm-act:focus-visible, .rm-lib:focus-visible, .rm-thc:focus-visible, .rm-li-btn:focus-visible { outline: 2px solid var(--door); outline-offset: 2px; }
.rm-size { display: grid; grid-template-columns: auto 36px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.rm-size > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.rm-size input[type=range] { width: 100%; accent-color: var(--door); }
.rm-selacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 124px), 1fr)); gap: 6px; }
.rm-act { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; text-align: left; cursor: pointer; min-width: 0; }
.rm-act span { overflow-wrap: anywhere; }
.rm-act svg { width: 16px; height: 16px; flex: none; }
.rm-act:hover { border-color: var(--line-2); }
.rm-act[aria-pressed="true"] { background: var(--door-soft); border-color: var(--door); }
.rm-act.is-danger { color: var(--danger); }

/* ---------------------------------------------------------------- rooms to choose */
.rm-thgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px; }
.rm-thc { position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--raised); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--fast) ease, box-shadow var(--fast) ease; min-width: 0; }
.rm-thc:hover { border-color: var(--line-2); }
.rm-thc[aria-checked="true"] { border-color: var(--door); box-shadow: 0 8px 20px -12px rgba(60, 40, 10, 0.55); }
.rm-thc-pic { display: block; aspect-ratio: 16 / 10; background: center / cover no-repeat #1a1410; }
.rm-thc-t { display: grid; gap: 3px; padding: 9px 11px 11px; align-content: start; }
.rm-thc-t b { font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.rm-thc-t small { font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.rm-thc-on { position: absolute; top: 7px; right: 7px; display: none; align-items: center; gap: 4px; height: 25px; padding: 0 9px 0 6px; border-radius: 99px; background: var(--btn); color: var(--btn-ink); font-size: 11.5px; font-weight: 700; }
.rm-thc-on svg { width: 14px; height: 14px; }
.rm-thc[aria-checked="true"] .rm-thc-on { display: inline-flex; }

/* ---------------------------------------------------------------- the object library */
.rm-libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 126px), 1fr)); gap: 12px; }
.rm-lib { display: grid; grid-template-rows: auto 1fr auto; gap: 7px; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: border-color var(--fast) ease, transform var(--fast) ease; }
.rm-lib:hover { border-color: var(--door); }
.rm-lib:active { transform: scale(0.98); }
.rm-lib-pic { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: radial-gradient(80% 70% at 50% 40%, color-mix(in srgb, var(--surface) 70%, #fff 0%), var(--sunk)); }
:root:not([data-theme="light"]) .rm-lib-pic { background: radial-gradient(80% 70% at 50% 40%, #3a3129, #241e19); }
.rm-lib-pic img, .rm-lib-pic svg { max-width: 82%; max-height: 82%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25)); }
.rm-lib-svg { width: 60%; }
.rm-lib-t { display: grid; gap: 2px; min-width: 0; }
.rm-lib-t b { font-size: 13.5px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.rm-lib-t small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--door); line-height: 1.25; }
.rm-lib-t small svg { width: 12px; height: 12px; flex: none; }
.rm-lib-go { justify-self: start; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 30px; padding: 4px 11px; border-radius: 99px; background: var(--btn); color: var(--btn-ink); font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.rm-lib-go svg { width: 14px; height: 14px; flex: none; }
.rm-lib-go span { overflow-wrap: anywhere; }
.rm-lib.is-in { border-color: color-mix(in srgb, var(--door) 45%, var(--line)); }
.rm-lib.is-in .rm-lib-go { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.rm-sub { margin: 6px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
html[lang="hy"] .rm-sub { text-transform: none; letter-spacing: 0.01em; }

/* ---------------------------------------------------------------- films and books */
.rm-list { display: grid; gap: 8px; }
.rm-li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); position: static; }
.rm-li-t { display: grid; min-width: 0; }
.rm-li-t b { overflow-wrap: anywhere; }
.rm-li-acts { display: flex; gap: 6px; align-items: center; }
.rm-li-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rm-li-btn svg { width: 15px; height: 15px; }
.rm-li.is-editing { grid-template-columns: minmax(0, 1fr); border-color: var(--door); }
.rm-li-f { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.rm-li-go { display: flex; justify-content: flex-end; gap: 6px; }
.rm-empty-list { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); }
.rm-addrow.rm-addbox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--line); }
.rm-addbox .rm-k { margin: 0; }
.rm-addrow-f { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.rm-addbox input { background: var(--surface); }
.rm-addbtn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 18px; }
.rm-addbtn svg { width: 16px; height: 16px; }
.rm-err { margin: 0; color: var(--danger); font-size: 13.5px; font-weight: 600; }
.rm-err:empty { display: none; }
.rm-page input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
@media (max-width: 760px) {
  .rm-addrow.rm-addbox { grid-template-columns: minmax(0, 1fr); }
  .rm-addbox button { grid-column: auto; }
  .rm-addrow-f { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rm-addrow-f .rm-addbtn { grid-column: 1 / -1; }
  .rm-li-f { grid-template-columns: minmax(0, 1fr); }
  .rm-li-btn span { display: none; }
  .rm-li-btn { width: 36px; padding: 0; justify-content: center; }
}

/* ---------------------------------------------------------------- flip, and the discard question */
.rm-obj.is-flip img, .rm-furn.is-flip > img { transform: scaleX(-1); }
.rm-confirm { display: grid; gap: 10px; max-width: 380px; }
.rm-confirm h3 { font-family: var(--display); font-weight: 500; font-size: 24px; line-height: 1.15; margin: 0; padding-right: 36px; }
.rm-confirm-go { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
/* the editor takes a little more of a wide screen, so the room stays the larger of the two */
.rm-shell .main:has(#rm-body.is-editing) { max-width: 1480px; }
@media (min-width: 1101px) { #rm-body.is-editing { grid-template-columns: minmax(0, 1fr) clamp(400px, 31vw, 480px); } }
/* the add row: the title on its own line, then the second field and Add */
.rm-addrow-f { grid-template-columns: minmax(0, 1fr) auto; }
.rm-addrow-f input[name="a"] { grid-column: 1 / -1; }
@media (max-width: 760px) { .rm-addrow-f { grid-template-columns: minmax(0, 1fr) auto; } .rm-addrow-f .rm-addbtn { grid-column: auto; } }
/* Armenian and Russian section names are long: a wider column, and words break only between words */
@media (min-width: 1101px) {
  #rm-body.is-editing { grid-template-columns: minmax(0, 1fr) clamp(430px, 34vw, 530px); }
  .rm-panel-grid { grid-template-columns: 176px minmax(0, 1fr); }
}
.rm-cats button { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
/* film and book rows: the title gets the room, the two actions are compact icon buttons with names for screen readers */
.rm-li-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rm-li-btn { width: 36px; padding: 0; justify-content: center; position: relative; }
.rm-li-t b { overflow-wrap: break-word; word-break: normal; }
#rm-body.is-editing { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1101px) { #rm-body.is-editing { grid-template-columns: minmax(0, 1fr) clamp(430px, 34vw, 530px); } }

/* room and the words under it keep apart (the heading used to touch the room's rounded edge on phones) */
#rm-body:not(.is-editing) { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 3vw, 40px); }

/* rain falls only behind the glass: the layer is masked to the window of the rainy room's photograph,
   sized and placed exactly like the photograph itself */
.rm-rainfall { opacity: 0.32; mix-blend-mode: screen;
  -webkit-mask: url(../art/room/mask-rain.png) 50% var(--plate-y, 30%) / cover no-repeat; mask: url(../art/room/mask-rain.png) 50% var(--plate-y, 30%) / cover no-repeat; }
@media (max-width: 760px) { .rm-rainfall { -webkit-mask-position: 24% 50%; mask-position: 24% 50%; } }
@media (prefers-reduced-motion: reduce) { .rm-rainfall, .rm-rain { animation: none; } }

/* ================================================================ the room page, polished
 * One container, one spacing scale (8 / 12 / 16 / 24 / 32 / 40), quiet controls on the room. */
.rm-shell .main { max-width: calc(1200px + 2 * var(--gutter)); padding-top: 24px; }
.rm-page { gap: 40px; }
#rm-body:not(.is-editing) { gap: 40px; }
.rm-stage { border-radius: 24px; box-shadow: 0 1px 2px rgba(40, 25, 8, 0.08), 0 18px 40px -24px rgba(40, 25, 8, 0.42); }
:root[data-theme="dark"] .rm-stage { box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.06), 0 18px 40px -24px rgba(0, 0, 0, 0.7); }
.rm-stage.is-edit { box-shadow: 0 0 0 2px rgba(227, 173, 84, 0.55), 0 18px 40px -24px rgba(40, 25, 8, 0.42); }

/* controls on the room: one surface, one height, one weight */
.rm-hud { padding: 16px; }
.rm-tools { gap: 8px; }
.rm-tool, .rm-plate, .rm-mini, .rm-here { background: rgba(20, 16, 12, 0.58); border: 1px solid rgba(255, 248, 235, 0.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rm-tool { position: relative; height: 44px; min-width: 44px; padding: 0 12px; color: #f6efe2; font-size: 14px; font-weight: 600; transition: background-color 0.16s ease, transform 0.16s ease, border-color 0.16s ease; }
.rm-tool.is-text { padding: 0 16px 0 14px; }
.rm-tool:hover { background: rgba(20, 16, 12, 0.76); border-color: rgba(255, 248, 235, 0.24); }
.rm-tool:active { transform: scale(0.97); }
.rm-tool:focus-visible, .rm-mini:focus-visible { outline: 2px solid #e9c27a; outline-offset: 2px; }
.rm-tool svg { width: 18px; height: 18px; }
.rm-tool[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  background: #1f1912; color: #f6efe2; font-size: 12.5px; font-weight: 600; line-height: 1.2; pointer-events: none; opacity: 0; transform: translateY(-2px); transition: opacity 0.16s ease, transform 0.16s ease; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); z-index: 2; }
.rm-tool[data-tip]:hover::after, .rm-tool[data-tip]:focus-visible::after { opacity: 1; transform: none; }
.rm-tools > .rm-tool:last-of-type[data-tip]::after { left: auto; right: 0; translate: 0 0; }
.rm-tool[aria-expanded="true"][data-tip]::after { opacity: 0; }
.rm-plate { left: 16px; top: 16px; gap: 10px; padding: 6px 16px 6px 6px; max-width: min(56%, 400px); }
.rm-plate b { font-size: 17px; }
.rm-plate small { font-size: 12.5px; color: #e2d9c9; }
.rm-presence { top: 76px; }
.rm-mini { right: 16px; bottom: 16px; }
.rm-menu { top: 52px; background: #1f1912; border-color: rgba(255, 248, 235, 0.12); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35); }

/* under the room: the question on the left, the people on the right */
.rm-below { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.rm-below:not(:has(.rm-col-side)) { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.rm-col { display: grid; gap: 40px; align-content: start; min-width: 0; }
.rm-sec { gap: 12px; }
.rm-talk { grid-row: auto; }
.rm-k, html[lang="hy"] .rm-k { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--muted); }
.rm-q { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.28; letter-spacing: -0.005em; max-width: 30ch; color: var(--ink); }
html[lang="hy"] .rm-q { line-height: 1.38; }
.rm-muted { font-size: 15px; line-height: 1.55; color: var(--muted); }
.rm-empty-q { display: grid; gap: 8px; justify-items: start; }
.rm-link { border: 0; background: none; padding: 10px 0; min-height: 44px; font: inherit; font-size: 15px; font-weight: 650; color: var(--door); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--door) 35%, transparent); text-underline-offset: 4px; transition: text-decoration-color 0.16s ease; }
.rm-link:hover { text-decoration-color: currentColor; }
.rm-link:focus-visible { outline: 2px solid var(--door); outline-offset: 2px; border-radius: 4px; }
.rm-col-side { padding-left: 32px; border-left: 1px solid var(--line); }
.rm-faces { gap: 16px; }
.rm-faces a { gap: 6px; transition: transform 0.16s ease; }
.rm-faces a:hover { transform: translateY(-1px); }
.rm-faces small { font-size: 12.5px; color: var(--ink-2); }
.rm-hello .rm-visit { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; position: static; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.rm-hello .rm-visit .btn { min-height: 44px; }
.rm-hint { display: none; }

@media (max-width: 1000px) {
  .rm-below { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rm-col-side { padding-left: 0; border-left: 0; padding-top: 32px; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .rm-shell .main { padding-top: 0; }
  .rm-page, #rm-body:not(.is-editing) { gap: 32px; }
  .rm-stage { border-radius: 0 0 20px 20px; }
  .rm-hud { padding: 12px; }
  .rm-tools { gap: 6px; }
  .rm-tool { height: 44px; min-width: 44px; }
  .rm-tool.is-text { width: 44px; padding: 0; }
  .rm-tool[data-tip]::after { display: none; }
  .rm-plate { left: 12px; top: 12px; max-width: calc(100% - 220px); min-width: 0; padding: 4px 12px 4px 4px; }
  .rm-mini { right: 12px; bottom: 12px; }
  .rm-below { margin: 0 16px; }
  .rm-q { font-size: clamp(22px, 6vw, 26px); }
}
@media (max-width: 420px) { .rm-plate { max-width: calc(100% - 196px); } .rm-tools { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .rm-tool, .rm-tool::after, .rm-link, .rm-faces a { transition: none; } }
.rm-items { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 24px 32px; }
.rm-item b { font-size: 18px; line-height: 1.3; }
.rm-item small { font-size: 13.5px; }
.rm-item-k { font-size: 12.5px; font-weight: 600; color: var(--faint); margin-bottom: 4px; }
.rm-quote { grid-column: 1 / -1; }
.rm-item { align-content: start; }
