/* ==========================================================================
   KUTAY OS — rooms (desktops 02–06: Brand Identity, Packaging, Digital & UX,
   3D, Motion). Markup: js/home/rooms.js. Colours come only from the per-realm
   --room-* variables set on body (css/home.css), so light/dark themes and
   every realm palette just work.

   Two layout modes, one breakpoint (keep in sync with roomFitQuery in
   rooms.js and #realmStage in home.css):
   - FIT  (min-width:1100px and min-height:640px): #realmStage is a fixed box;
     each room fills it exactly (min-height:100%, flexible middle row). If the
     box is too small the room's min-heights win and the stage scrolls.
   - FLOW (everything else): the stage is a vertical scroller; rooms take
     their natural height, single column on narrow screens.
   Class prefixes: rm- shared, idn-/jg- identity, pkg- packaging, ui- digital,
   vp- render room, mo- motion.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* Room frame + header                                                     */
/* ---------------------------------------------------------------------- */
.realm-room:not(#room-play) { width: 100%; max-width: 1360px; margin: 0 auto; gap: 16px; padding: 0 0 4px; min-height: 100%; font-family: var(--font-sans); }
.realm-room:not(#room-play) > .room-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 0 0 12px; border-bottom: 1px solid var(--room-line); flex: none; }
.realm-room:not(#room-play) > .room-heading > div { display: flex; align-items: center; gap: 12px; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; min-width: 0; }
.realm-room:not(#room-play) > .room-heading .room-number { font: 500 11px var(--font-mono); letter-spacing: .04em; color: var(--room-muted); }
.realm-room:not(#room-play) > .room-heading p { margin: 0; max-width: 46%; font-size: 12px; line-height: 1.45; color: var(--room-muted); text-align: right; }
.realm-room:not(#room-play) h2, .realm-room:not(#room-play) h3 { color: var(--room-ink); }

.rm-kicker { display: block; font: 600 10px/1.4 var(--font-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--room-muted); }
.rm-note { margin: 0; font: 500 11px/1.5 var(--font-mono); letter-spacing: .02em; color: var(--room-muted); flex: none; }
.rm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; flex: none; font: 500 10px/1.4 var(--font-mono); letter-spacing: .08em; color: var(--room-muted); }

/* ---------------------------------------------------------------------- */
/* Controls — every interactive element shows hover / focus / pressed      */
/* ---------------------------------------------------------------------- */
.rm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--room-line); border-radius: var(--r-pill); background: var(--room-soft); color: var(--room-ink); font: 500 12px/1.2 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.rm-btn svg { width: 17px; height: 17px; flex: none; }
.rm-btn:hover { border-color: color-mix(in srgb, var(--room-ink) 42%, transparent); background: color-mix(in srgb, var(--room-ink) 9%, transparent); }
.rm-btn:active { transform: scale(.97); }
.rm-btn:focus-visible, .rm-seg button:focus-visible, .rm-icon-btn:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }
.rm-btn.is-primary { background: var(--room-accent); border-color: var(--room-accent); color: var(--room-bg); font-weight: 600; }
.rm-btn.is-primary:hover { background: color-mix(in srgb, var(--room-accent) 86%, var(--room-ink)); box-shadow: 0 6px 18px color-mix(in srgb, var(--room-accent) 28%, transparent); }
.rm-btn.is-quiet { background: transparent; }
.rm-btn[aria-pressed="true"]:not(.is-primary) { border-color: var(--room-accent); color: var(--room-accent); }
.rm-arrow { display: inline-block; transition: translate var(--dur-fast); }
.rm-btn:hover .rm-arrow, a:hover > .rm-arrow { translate: 2px -2px; }
.rm-count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: color-mix(in srgb, var(--room-ink) 12%, transparent); font: 600 11px var(--font-mono); }
.has-saved .rm-count { background: var(--room-accent); color: var(--room-bg); }
.has-saved svg { fill: currentColor; }

.rm-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--room-line); border-radius: 22px; background: var(--room-soft); max-width: 100%; }
.rm-seg button { min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--room-muted); font: 500 12px/1.2 var(--font-sans); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast); }
.rm-seg button:hover { color: var(--room-ink); background: color-mix(in srgb, var(--room-ink) 8%, transparent); }
.rm-seg button:active { transform: scale(.96); }
.rm-seg button[aria-pressed="true"] { background: var(--room-accent); color: var(--room-bg); font-weight: 600; }

.rm-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font: 500 12px var(--font-sans); white-space: nowrap; color: var(--room-ink); }
.rm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rm-switch i { position: relative; width: 34px; height: 20px; border-radius: 10px; background: color-mix(in srgb, var(--room-ink) 18%, transparent); transition: background-color var(--dur-fast); flex: none; }
.rm-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--room-ink); transition: translate var(--dur-fast); }
.rm-switch:hover i { background: color-mix(in srgb, var(--room-ink) 28%, transparent); }
.rm-switch input:checked + i { background: var(--room-accent); }
.rm-switch input:checked + i::after { translate: 14px 0; background: var(--room-bg); }
.rm-switch input:focus-visible + i { outline: 2px solid var(--room-accent); outline-offset: 3px; }

/* ---------------------------------------------------------------------- */
/* 02 — Brand Identity                                                     */
/* ---------------------------------------------------------------------- */
.idn-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; flex: none; }
.idn-title h2 { margin: 10px 0 0; font-size: clamp(38px, 4.3vw, 68px); line-height: 1.02; font-weight: 650; letter-spacing: -.055em; }
.idn-title h2 > * { display: block; }
.idn-title h2 em { font-style: normal; color: var(--room-accent); }
.idn-aside { padding-bottom: 6px; }
.idn-aside p { margin: 0 0 16px; max-width: 440px; font-size: 14px; line-height: 1.6; color: var(--room-muted); }
.jg { position: relative; flex: none; min-height: 120px; }
.jg-cell { position: absolute; }
.jg-tile { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--room-soft); color: #fff; cursor: zoom-in; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base); }
.jg-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease-out); }
.jg-cap { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 28px 12px 10px; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .66)); opacity: 0; translate: 0 6px; transition: opacity var(--dur-fast), translate var(--dur-fast); pointer-events: none; }
.jg-cap b { font-size: 13px; font-weight: 600; line-height: 1.25; }
.jg-cap small { font-size: 11px; line-height: 1.25; opacity: .85; text-align: right; }
.jg-tile:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, .28); }
.jg-tile:hover img { scale: 1.035; }
.jg-tile:hover .jg-cap, .jg-tile:focus-visible .jg-cap { opacity: 1; translate: 0 0; }
.jg-tile:active { transform: scale(.985); }
.jg-tile:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }
@media (hover: none) { .jg-cap { opacity: 1; translate: 0 0; padding-top: 20px; } .jg-cap small { display: none; } }

/* Lightbox (the shared dialog(), widened) */
.os-dialog.room-viewer { width: min(1180px, calc(100vw - 32px)); max-width: none; }
.room-viewer .dialog-content { position: relative; padding: 14px 18px 8px; }
.jg-view { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.jg-view-art { display: grid; place-items: center; min-height: 200px; border-radius: 10px; background: color-mix(in srgb, var(--room-ink) 5%, transparent); overflow: hidden; }
.jg-view-art img { display: block; max-width: 100%; max-height: min(68dvh, 760px); object-fit: contain; }
.jg-view figcaption { display: flex; justify-content: space-between; gap: 16px; font: 500 12px/1.4 var(--font-mono); color: var(--room-muted); }
.jg-nav { position: absolute; top: calc(50% - 30px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--room-line); background: color-mix(in srgb, var(--room-panel) 82%, transparent); color: var(--room-ink); font-size: 18px; cursor: pointer; backdrop-filter: blur(8px); transition: background-color var(--dur-fast), transform var(--dur-fast); }
.jg-nav.is-prev { left: 28px; }
.jg-nav.is-next { right: 28px; }
.jg-nav:hover { background: var(--room-accent); color: var(--room-bg); border-color: var(--room-accent); }
.jg-nav:active { transform: scale(.94); }
.jg-nav:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }

/* ---------------------------------------------------------------------- */
/* 03 — Packaging                                                          */
/* ---------------------------------------------------------------------- */
.pkg-specs { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr; gap: 10px; flex: none; }
.pkg-spec { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 100px; padding: 12px 14px; border: 1px solid var(--room-line); border-radius: 6px; background: var(--room-soft); overflow: hidden; }
.pkg-label { font: 600 9px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--room-muted); }
.pkg-line { font: 500 10px/1.35 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--room-ink); }
.pkg-facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; column-gap: 12px; }
.pkg-facts .pkg-label { grid-column: 1; }
.pkg-facts strong { grid-column: 2; grid-row: 1 / 3; font-size: 40px; line-height: .9; font-weight: 700; letter-spacing: -.06em; color: var(--room-accent); }
.pkg-facts .pkg-line { grid-column: 1; align-self: end; }
.pkg-foot { grid-column: 1 / -1; margin-top: 8px; padding-top: 6px; border-top: 2px solid currentColor; font: 500 9px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--room-muted); }
.pkg-production strong { font: 600 16px/1.2 var(--font-mono); letter-spacing: .02em; color: var(--room-ink); overflow-wrap: anywhere; }
.pkg-barcode { position: relative; margin-top: auto; width: 104px; height: 20px; background: repeating-linear-gradient(90deg, var(--room-ink) 0 1px, transparent 1px 3px, var(--room-ink) 3px 5px, transparent 5px 6px, var(--room-ink) 6px 7px, transparent 7px 10px); }
.pkg-barcode::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: 0; width: 1px; background: var(--room-accent); box-shadow: 0 0 6px var(--room-accent); animation: pkg-scan 3.8s ease-in-out infinite; }
@keyframes pkg-scan { 0%, 18% { left: 0; opacity: 0; } 30%, 70% { opacity: 1; } 82%, 100% { left: 100%; opacity: 0; } }
.pkg-material ul, .pkg-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: auto 0 0; padding: 0; list-style: none; }
.pkg-material li { display: flex; flex-direction: column; align-items: center; gap: 5px; font: 500 9px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--room-muted); }
.pkg-material i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--room-line); position: relative; overflow: hidden; }
.sw-fbb { background: #eee9dc; }
.sw-kraft { background: #b48655 radial-gradient(rgba(90, 59, 27, .3) .7px, transparent .8px) 0 0 / 4px 4px; }
.sw-foil { background: linear-gradient(120deg, #7d5e18, #f8e9a6 35%, #9b7621 58%, #fff5bd 76%, #6d5117); }
.sw-uv { background: #111; box-shadow: inset 8px 0 8px rgba(255, 255, 255, .18); }
.pkg-dieline svg { width: 100%; height: 46px; flex: 1 1 auto; min-height: 36px; }
.pkg-dieline .d-cut { stroke: var(--room-accent); stroke-width: 1.3; }
.pkg-dieline .d-crease { stroke: var(--room-muted); stroke-width: .8; stroke-dasharray: 3 3; }
.pkg-dieline .d-bleed { stroke: var(--room-muted); stroke-width: .6; stroke-dasharray: 1 2.5; opacity: .7; }
.pkg-legend { gap: 4px 12px; margin: 0; }
.pkg-legend li { display: inline-flex; align-items: center; gap: 5px; font: 500 9px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--room-muted); }
.pkg-legend i { width: 14px; border-top: 1.5px solid var(--room-accent); }
.pkg-legend .lg-crease i { border-top: 1.5px dashed var(--room-muted); }
.pkg-legend .lg-bleed i { border-top: 1.5px dotted var(--room-muted); }

.pkg-block { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 20px; border: 1px solid var(--room-line); border-radius: 8px; background: var(--room-soft); min-height: 0; }
.pkg-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 10px; flex: none; }
.pkg-head > div:first-child { margin-right: auto; }
.pkg-head h2 { margin: 0 0 8px; font-size: clamp(34px, 3.7vw, 58px); line-height: 1; font-weight: 650; letter-spacing: -.055em; }
.pkg-head p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--room-muted); }
.pkg-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: 24px; row-gap: 14px; min-height: 0; }
.pkg-family { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 14px; min-width: 0; min-height: 0; }
.pkg-family[hidden] { display: none; }
.pkg-media { position: relative; display: block; aspect-ratio: 16 / 11; border: 1px solid var(--room-line); border-radius: 8px; background: color-mix(in srgb, var(--room-ink) 4%, transparent); overflow: hidden; transition: border-color var(--dur-fast); }
.pkg-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: scale .5s var(--ease-out); }
.pkg-media:hover { border-color: color-mix(in srgb, var(--room-ink) 40%, transparent); }
.pkg-media:hover img { scale: 1.03; }
.pkg-media:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }
.pkg-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: end; min-width: 0; }
.pkg-copy > :not(.rm-btn) { grid-column: 1; }
.pkg-copy > .rm-btn { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
.pkg-index { font: 500 10px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--room-muted); }
.pkg-copy h3 { margin: 4px 0 6px; font-size: 24px; line-height: 1.15; font-weight: 550; letter-spacing: -.02em; }
.pkg-copy p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--room-muted); max-width: 560px; }
/* focus on one family: image left, story right */
.pkg-board:not([data-mode="compare"]) { grid-template-columns: minmax(0, 1fr); }
.pkg-board:not([data-mode="compare"]) { grid-template-rows: minmax(0, 1fr); }
.pkg-board:not([data-mode="compare"]) .pkg-family { grid-row: auto; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); grid-template-rows: minmax(0, 1fr); gap: 28px; }
.pkg-board:not([data-mode="compare"]) .pkg-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 4px; padding-bottom: 4px; }
.pkg-board:not([data-mode="compare"]) .pkg-copy h3 { font-size: 34px; }
.pkg-board:not([data-mode="compare"]) .pkg-copy p { font-size: 14px; margin-bottom: 14px; }

/* ---------------------------------------------------------------------- */
/* 04 — Digital & UX                                                       */
/* ---------------------------------------------------------------------- */
.ui-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.6fr); gap: 36px; min-height: 0; }
.ui-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; min-width: 0; }
.ui-copy h2 { margin: -4px 0 0; font-size: clamp(40px, 4.3vw, 68px); line-height: 1; font-weight: 650; letter-spacing: -.055em; }
.ui-copy > p { margin: 0; max-width: 400px; font-size: 14px; line-height: 1.6; color: var(--room-muted); }
.ui-principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 4px 0; padding: 0; list-style: none; }
.ui-principles li { padding: 12px 14px; border: 1px solid var(--room-line); border-radius: 10px; background: var(--room-soft); min-width: 0; }
.ui-principles span { font: 600 11px var(--font-mono); color: var(--room-accent); }
.ui-principles b { display: block; margin: 4px 0 2px; font-size: 14px; font-weight: 600; color: var(--room-ink); }
.ui-principles p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--room-muted); }
.ui-stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 24px; border: 1px solid var(--room-line); border-radius: 16px; background: radial-gradient(color-mix(in srgb, var(--room-ink) 16%, transparent) .8px, transparent .8px) 0 0 / 18px 18px; overflow: hidden; }
.ui-preview { width: min(100%, 440px); margin: 0; display: flex; flex-direction: column; padding: 10px; border: 1px solid var(--room-line); border-radius: 24px; background: var(--room-panel); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); transition: width .55s cubic-bezier(.2, .7, .2, 1), border-radius .55s; }
.ui-preview[data-ui-preview="wide"] { width: 100%; border-radius: 10px; }
.ui-bar { display: flex; align-items: center; gap: 10px; padding: 2px 6px 10px; font: 500 10px var(--font-mono); letter-spacing: .06em; color: var(--room-muted); }
.ui-bar .ui-size { margin-left: auto; white-space: nowrap; }
.ui-size output { color: var(--room-accent); font-variant-numeric: tabular-nums; }
.ui-dots { display: inline-flex; gap: 5px; }
.ui-dots i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--room-ink) 22%, transparent); }
.ui-art { display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #0c0c10; transition: border-radius .55s; }
.ui-preview[data-ui-preview="wide"] .ui-art { border-radius: 4px; }
.ui-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease-out); }
.ui-art:hover img { scale: 1.02; }
.ui-art:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }
.ui-preview > p { margin: 10px 6px 2px; font-size: 12px; line-height: 1.5; color: var(--room-muted); }

/* ---------------------------------------------------------------------- */
/* 05 — 3D: the render room (a dark "software" viewport in every theme)    */
/* ---------------------------------------------------------------------- */
.vp-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex: none; }
.vp-head h2 { margin: 8px 0 0; font-size: clamp(34px, 3.6vw, 56px); line-height: 1; font-weight: 650; letter-spacing: -.055em; }
.vp { --room-ink: #eceef3; --room-muted: #9a9ea8; --room-line: #33363e; --room-soft: rgba(255, 255, 255, .05); --room-accent: #ffb14a; --room-bg: #16171b; --room-panel: #1f2126;
  display: flex; flex-direction: column; min-height: 0; border: 1px solid #2c2f36; border-radius: 18px; background: #16171b; color: var(--room-ink); overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.vp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; background: #1f2126; border-bottom: 1px solid #2c2f36; flex: none; }
.vp-group { display: flex; padding: 2px; border-radius: 10px; background: #131418; }
.vp-group button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #a8abb4; font: 600 12px var(--font-sans); cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast); }
.vp-group button:hover { color: #fff; background: #2a2c33; }
.vp-group button[aria-pressed="true"] { background: #3a3d46; color: #fff; }
.vp button:focus-visible, .vp a:focus-visible { outline: 2px solid #8fb3ff; outline-offset: 2px; }
.vp-spec { margin-left: auto; font: 500 11px var(--font-mono); color: #7d808a; }
.vp-main { display: grid; grid-template-columns: minmax(0, 1fr) 290px; min-height: 0; }
.vp-view { position: relative; display: grid; place-items: center; min-width: 0; padding: 44px 32px 64px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #33353c, #17181c 70%); }
.vp-floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 48px 48px; transform: perspective(500px) rotateX(62deg); transform-origin: 50% 100%; mask-image: linear-gradient(transparent, #000 60%); pointer-events: none; }
.vp-cam, .vp-status { position: absolute; z-index: 2; font: 500 11px var(--font-mono); }
.vp-cam { top: 14px; left: 16px; color: #9da0a8; }
.vp-status { bottom: 22px; left: 16px; color: #ffce50; }
.vp-gizmo { position: absolute; top: 10px; right: 12px; z-index: 2; width: 54px; height: 54px; }
.vp-defs { position: absolute; }
.vp-render { position: relative; z-index: 1; width: 100%; aspect-ratio: 16 / 10; margin: 0; border-radius: 10px; overflow: hidden; background: #0e0f12; box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 170, 60, .55); }
.vp-render::before, .vp-render::after { content: ""; position: absolute; z-index: 3; width: 16px; height: 16px; border: 2px solid #ffaa3c; pointer-events: none; }
.vp-render::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.vp-render::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.vp-img, .vp-video { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .35s; }
.vp-img[hidden], .vp-video[hidden] { display: none; }
.vp-render[data-shade="clay"] .vp-img { filter: grayscale(1) sepia(.18) contrast(1.12) brightness(1.08); }
.vp-render[data-shade="wire"] { background: #0b0c10; }
.vp-render[data-shade="wire"] .vp-img { filter: url(#vpWire); opacity: .95; }
.vp-render[data-light="warm"] .vp-img { filter: sepia(.28) saturate(1.15) hue-rotate(-8deg) brightness(1.03); }
.vp-render[data-light="cool"] .vp-img { filter: saturate(.9) hue-rotate(12deg) brightness(1.04) contrast(1.05); }
.vp-render[data-shade="clay"][data-light="warm"] .vp-img { filter: grayscale(1) sepia(.45) contrast(1.1) brightness(1.08); }
.vp-render[data-shade="clay"][data-light="cool"] .vp-img { filter: grayscale(1) sepia(.1) hue-rotate(180deg) contrast(1.1) brightness(1.1); }
.vp-render[data-shade="wire"][data-light] .vp-img { filter: url(#vpWire); }
.vp-buckets { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(6, 1fr); pointer-events: none; }
.vp-buckets i { background: #0e0f12; border: 1px solid rgba(255, 170, 60, .25); transition: opacity .12s; }
.vp-buckets i.done { opacity: 0; }
.vp-pager { position: absolute; z-index: 2; bottom: 14px; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #33363e; border-radius: var(--r-pill); background: rgba(22, 23, 27, .86); backdrop-filter: blur(8px); font: 500 11px var(--font-mono); color: #c4c7cf; }
.vp-pager span { min-width: 58px; text-align: center; }
.vp-pager button, .vp-angle { border: 0; border-radius: var(--r-pill); background: transparent; color: #eceef3; cursor: pointer; transition: background-color var(--dur-fast), transform var(--dur-fast); }
.vp-pager button { width: 34px; height: 34px; font-size: 15px; }
.vp-pager button:hover, .vp-angle:hover { background: #3a3d46; }
.vp-pager button:active, .vp-angle:active { transform: scale(.94); }
.vp-angle { position: absolute; z-index: 2; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid #33363e; background: rgba(22, 23, 27, .86); backdrop-filter: blur(8px); font: 500 12px var(--font-sans); }
.vp-angle[hidden] { display: none; }
.vp-side { display: flex; flex-direction: column; min-height: 0; background: #1b1c21; border-left: 1px solid #2c2f36; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3d46 transparent; }
.vp-panel { padding: 12px; border-bottom: 1px solid #2c2f36; }
.vp-panel h3 { margin: 0 0 8px; font: 600 10.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #8b8e97; }
.vp-list { display: flex; flex-direction: column; gap: 3px; }
.vp-obj { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 5px; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-fast); }
.vp-obj:hover { background: #262830; }
.vp-obj[aria-pressed="true"] { background: #2e4a7a; }
.vp-thumb { width: 44px; height: 32px; border-radius: 5px; overflow: hidden; background: #0e0f12; }
.vp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vp-obj-text { min-width: 0; }
.vp-obj b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-obj small { display: block; font-size: 11px; line-height: 1.3; color: #8b8e97; }
.vp-obj[aria-pressed="true"] small { color: #c3cde0; }
.vp-badge { font-style: normal; font-size: 10px; color: #ffce50; padding-right: 4px; }
.vp-props dl { margin: 0 0 12px; font-size: 12px; }
.vp-props dl div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #2a2c32; }
.vp-props dt { color: #8b8e97; }
.vp-props dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.vp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-actions .rm-btn { min-height: 38px; padding: 0 14px; }
.rm-save[aria-pressed="true"] svg { fill: currentColor; }

/* Saved projects dialog */
.os-dialog.room-saved-dialog { width: min(480px, calc(100vw - 32px)); }
.rm-dialog-note { margin: 0 0 12px; font-size: 12px !important; color: var(--room-muted); }
.rm-saved { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rm-saved li { display: flex; align-items: center; gap: 6px; }
.rm-saved a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--room-line); border-radius: 10px; color: var(--room-ink); text-decoration: none; transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.rm-saved a:hover { background: var(--room-soft); border-color: color-mix(in srgb, var(--room-ink) 35%, transparent); }
.rm-saved a:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 2px; }
.rm-saved img { width: 64px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.rm-saved span { min-width: 0; }
.rm-saved b { display: block; font-size: 14px; }
.rm-saved small { display: block; font-size: 12px; color: var(--room-muted); }
.rm-icon-btn { width: 40px; height: 40px; flex: none; border: 1px solid var(--room-line); border-radius: 50%; background: transparent; color: var(--room-ink); font-size: 18px; cursor: pointer; transition: background-color var(--dur-fast), transform var(--dur-fast); }
.rm-icon-btn:hover { background: var(--room-soft); border-color: var(--room-accent); }
.rm-icon-btn:active { transform: scale(.94); }
.rm-empty { margin: 8px 0; padding: 22px; border: 1px dashed var(--room-line); border-radius: 10px; text-align: center; color: var(--room-muted); }

/* ---------------------------------------------------------------------- */
/* 06 — Motion                                                             */
/* ---------------------------------------------------------------------- */
.mo-layout { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.45fr); gap: 36px; min-height: 0; }
.mo-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 18px; min-width: 0; }
.mo-copy h2 { margin: 0; font-size: clamp(56px, 6.2vw, 100px); line-height: .95; font-weight: 650; letter-spacing: -.06em; }
.mo-copy h2 > * { display: block; }
.mo-copy h2 em { font: italic 400 1em Georgia, "Times New Roman", serif; letter-spacing: -.045em; color: var(--room-accent); }
.mo-copy > p:not(.rm-note) { margin: 0; max-width: 270px; font-size: 14px; line-height: 1.6; color: var(--room-muted); }
.mo-hint { font-size: 10px; }
.mo-canvas { position: relative; min-height: 360px; border: 1px solid color-mix(in srgb, var(--room-accent) 16%, transparent); border-radius: 24px; background: radial-gradient(color-mix(in srgb, var(--room-accent) 16%, transparent) 1px, transparent 1px) 0 0 / 18px 18px; overflow: hidden; isolation: isolate; }
.mo-note { position: absolute; left: 24px; top: 22px; rotate: -9deg; font: 10px/1.6 var(--font-mono); color: #df9aa7; pointer-events: none; }
.mo-note span { display: block; font-size: 44px; line-height: 1; }
.mo-frame { position: absolute; z-index: 2; width: min(68%, 560px); rotate: var(--object-turn, -3deg); border: 1px solid var(--room-accent); background: #08080b; box-shadow: 0 15px 50px rgba(0, 0, 0, .45); transition: box-shadow var(--dur-base); }
.mo-frame.object-dragging { box-shadow: 0 28px 70px rgba(0, 0, 0, .55); z-index: 4; }
.mo-handle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; padding: 0 10px; border: 0; background: var(--room-accent); color: #16101c; font: 500 10px var(--font-mono); cursor: grab; }
.mo-handle:hover { background: color-mix(in srgb, var(--room-accent) 88%, #fff); }
.mo-handle:active, .object-dragging .mo-handle { cursor: grabbing; }
.mo-handle:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.mo-video { position: relative; cursor: pointer; }
.mo-video video { display: block; width: 100%; aspect-ratio: 1.48; object-fit: contain; background: #08080b; }
.mo-big-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 62px; height: 62px; display: grid; place-items: center; padding-left: 4px; border-radius: 50%; background: color-mix(in srgb, var(--room-accent) 90%, transparent); color: #16101c; font-size: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity var(--dur-fast), scale var(--dur-fast); pointer-events: none; }
.mo-video:hover .mo-big-play { scale: 1.08; }
.mo-video.is-playing .mo-big-play { opacity: 0; scale: .8; }
.mo-video.is-playing:hover .mo-big-play { opacity: .9; scale: 1; }
.mo-video.is-playing .mo-big-play::before { content: "❚❚"; font-size: 16px; }
.mo-video.is-playing .mo-big-play { font-size: 0; padding-left: 0; }
.mo-corner { position: absolute; width: 8px; height: 8px; background: #fff; border: 1px solid #9383b4; pointer-events: none; }
.mo-corner.a { left: -4px; top: -4px; } .mo-corner.b { right: -4px; top: -4px; } .mo-corner.c { left: -4px; bottom: -4px; } .mo-corner.d { right: -4px; bottom: -4px; }
.mo-chip { position: absolute; z-index: 3; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--r-pill); background: #e6b1f0; color: #22142a; font: 500 12px var(--font-sans); text-decoration: none; rotate: 4deg; transition: rotate var(--dur-base), scale var(--dur-fast), box-shadow var(--dur-fast); }
.mo-chip svg { width: 20px; height: 20px; }
.mo-chip:hover { rotate: 0deg; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.mo-chip:active { scale: .96; }
.mo-chip:focus-visible { outline: 2px solid var(--room-ink); outline-offset: 3px; }
.mo-transport { display: flex; align-items: center; gap: 10px 16px; padding: 8px 10px 8px 18px; border: 1px solid var(--room-line); border-radius: 18px; background: var(--room-soft); font: 500 11px var(--font-mono); color: var(--room-muted); flex: none; }
.mo-frames { min-width: 48px; color: var(--room-accent); }
.mo-time { white-space: nowrap; min-width: 92px; }
.mo-transport input[type="range"] { --fill: 0%; flex: 1; min-width: 80px; height: 24px; margin: 0; background: transparent; appearance: none; cursor: pointer; }
.mo-transport input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--room-accent) var(--fill), color-mix(in srgb, var(--room-ink) 18%, transparent) var(--fill)); }
.mo-transport input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--room-accent) var(--fill), color-mix(in srgb, var(--room-ink) 18%, transparent) var(--fill)); }
.mo-transport input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--room-ink); border: 3px solid var(--room-accent); transition: scale var(--dur-fast); }
.mo-transport input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--room-ink); border: 3px solid var(--room-accent); }
.mo-transport input[type="range"]:hover::-webkit-slider-thumb { scale: 1.2; }
.mo-transport input[type="range"]:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 4px; border-radius: 4px; }
.mo-transport input[type="range"]:disabled { cursor: default; opacity: .45; }
.mo-error { margin: 0; font-size: 12px; color: #e6b1f0; flex: none; }
.mo-error:empty { display: none; }

/* ---------------------------------------------------------------------- */
/* FIT mode — rooms fill the fixed stage box                               */
/* ---------------------------------------------------------------------- */
@media (min-width: 1100px) and (min-height: 640px) {
  .room-field .jg { flex: 1 1 0; min-height: 280px; }
  .room-stickers .pkg-block { flex: 1 1 auto; min-height: 390px; }
  .room-stickers .pkg-board { flex: 1 1 0; }
  .room-stickers .pkg-board[data-mode="compare"] { grid-template-rows: minmax(0, 1fr) auto; }
  .room-stickers .pkg-media { aspect-ratio: auto; min-height: 170px; }
  .room-type .ui-layout, .room-motion .mo-layout { flex: 1 1 auto; }
  .room-type .ui-layout { min-height: 470px; }
  .room-type .ui-stage { container-type: size; }
  .room-type .ui-preview { width: min(100%, 460px, (100cqh - 124px) * 1.5); }
  .room-type .ui-preview[data-ui-preview="wide"] { width: min(100%, (100cqh - 124px) * 1.5); }
  .room-gallery .vp { flex: 1 1 auto; }
  .room-gallery .vp-main { flex: 1 1 0; min-height: 440px; }
  .room-gallery .vp-view { container-type: size; }
  .room-gallery .vp-render { width: min(100%, 880px, (100cqh - 112px) * 1.6); }
  .room-motion .mo-layout { min-height: 420px; }
  .room-motion .mo-canvas { container-type: size; }
  .room-motion .mo-frame { width: min(68%, 600px, (100cqh - 84px) * 1.48); }
  .room-motion .mo-copy { gap: 20px; }
}
/* short large screens (e.g. 1280×720): tighten type so less scrolls */
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 800px) {
  .realm-room:not(#room-play) { gap: 10px; }
  .vp-head .rm-kicker { display: none; }
  .room-gallery .vp-main { min-height: 400px; }
  .vp-view { padding: 40px 24px 60px; }
  .vp-obj { min-height: 40px; padding: 4px 5px; }
  .vp-panel { padding: 10px 12px; }
  .realm-room:not(#room-play) > .room-heading { padding-bottom: 9px; }
  .idn-title h2 { font-size: clamp(36px, 3.6vw, 52px); }
  .idn-aside p { margin-bottom: 12px; font-size: 13px; }
  .pkg-spec { min-height: 88px; padding: 10px 12px; }
  .pkg-facts strong { font-size: 34px; }
  .pkg-block { padding: 14px 16px 16px; gap: 12px; }
  .pkg-head h2 { font-size: clamp(32px, 3vw, 44px); margin-bottom: 4px; }
  .pkg-copy h3 { font-size: 20px; margin: 2px 0 4px; }
  .pkg-copy p { font-size: 12px; }
  .ui-copy { gap: 12px; }
  .ui-copy h2 { font-size: clamp(38px, 3.6vw, 54px); }
  .ui-principles li { padding: 9px 12px; }
  .vp-head h2 { font-size: clamp(32px, 3vw, 44px); }
  .mo-copy h2 { font-size: clamp(52px, 5.2vw, 80px); }
}

/* ---------------------------------------------------------------------- */
/* FLOW mode — tablets and phones                                          */
/* ---------------------------------------------------------------------- */
@media (max-width: 1099px), (max-height: 639px) {
  .realm-room:not(#room-play) { min-height: 0; gap: 18px; padding-bottom: 12px; }
  .room-type .ui-layout, .room-motion .mo-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 24px; }
  .mo-canvas { height: 420px; }
  .vp-render { max-width: 820px; }
}
@media (max-width: 900px) {
  .idn-top { grid-template-columns: 1fr; gap: 14px; }
  .idn-aside p { max-width: 560px; }
  .pkg-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pkg-board:not([data-mode="compare"]) .pkg-family { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 14px; }
  .pkg-board:not([data-mode="compare"]) .pkg-copy h3 { font-size: 26px; }
  .room-type .ui-layout, .room-motion .mo-layout { grid-template-columns: 1fr; }
  .ui-copy h2 { margin: 0; }
  .ui-stage { padding: 16px; }
  .vp-main { grid-template-columns: 1fr; }
  .vp-side { border-left: 0; border-top: 1px solid #2c2f36; overflow: visible; }
  .vp-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .vp-view { padding: 44px 16px 64px; }
  .vp-status { top: 34px; bottom: auto; }
  .mo-copy { gap: 14px; }
  .mo-canvas { height: clamp(300px, 64vw, 440px); min-height: 0; }
}
@media (max-width: 760px) {
  .realm-room:not(#room-play) > .room-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .realm-room:not(#room-play) > .room-heading p { max-width: none; text-align: left; font-size: 11px; }
  .pkg-board { grid-template-columns: 1fr; gap: 24px; }
  .pkg-block { padding: 14px; }
  .pkg-copy { grid-template-columns: 1fr; }
  .pkg-copy > .rm-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 12px; }
  .pkg-media { aspect-ratio: 4 / 3; }
  .vp-toolbar { gap: 6px; }
  .vp-spec { display: none; }
  .vp-group button { padding: 0 10px; min-height: 36px; }
  .mo-transport { flex-wrap: wrap; padding: 10px 12px; }
  .mo-transport input[type="range"] { order: -1; flex: 1 0 100%; }
  .mo-transport .rm-btn { margin-left: auto; }
  .jg-nav { top: auto; bottom: 64px; }
  .jg-nav.is-prev { left: 24px; } .jg-nav.is-next { right: 24px; }
  .room-viewer .dialog-content { padding: 12px 12px 72px; }
}
@media (max-width: 600px) {
  .idn-title h2 { font-size: clamp(34px, 10vw, 46px); }
  .pkg-specs { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .pkg-spec { flex: 0 0 min(72vw, 250px); scroll-snap-align: start; }
  .pkg-head h2 { font-size: 36px; }
  .ui-principles li { padding: 10px 12px; }
  .ui-preview { width: min(100%, 300px); }
  .vp-head h2, .ui-copy h2 { font-size: 36px; }
  .vp-list { grid-template-columns: 1fr; }
  .vp-angle span { display: none; }
  .vp-angle { width: 40px; padding: 0; justify-content: center; }
  .vp-view { padding: 40px 12px 62px; }
  .mo-copy h2 { font-size: clamp(48px, 15vw, 64px); }
  .mo-frame { width: 82%; }
  .mo-note { display: none; }
  .mo-chip { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .pkg-barcode::after { animation: none; left: 55%; opacity: .8; }
  .ui-preview, .ui-art, .jg-tile img, .pkg-media img, .ui-art img { transition: none; }
}

/* ---------------------------------------------------------------------- */
/* Motion layer — purposeful, transform/opacity only (no layout shift).    */
/* Entrances: switchRealm() staggers .shape-tile/.field-card/.gallery-card; */
/* CSS animations below replay because hidden rooms are display:none.      */
/* Parallax reads --look-x/--look-y, set on #realmStage by realms.js only  */
/* when motion is allowed. Tilt uses the stage's [data-tilt] mechanism.    */
/* ---------------------------------------------------------------------- */
.pkg-family[data-pack-project="sensovisc"] { view-transition-name: pkg-sensovisc; }
.pkg-family[data-pack-project="artrosupp"] { view-transition-name: pkg-artrosupp; }
::view-transition-group(pkg-sensovisc), ::view-transition-group(pkg-artrosupp) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .75, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
.sw-foil::after { content: ""; position: absolute; inset: -100%; background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .9) 49%, transparent 56%); translate: -30% 0; transition: translate .7s var(--ease-out); }
.pkg-material:hover .sw-foil::after { translate: 30% 0; }

@media (prefers-reduced-motion: no-preference) {
  body:not(.reduce-motion) .jg-tile:hover, body:not(.reduce-motion) .pkg-media:hover, body:not(.reduce-motion) .ui-art:hover { transform: translateY(-4px); }
  body:not(.reduce-motion) .pkg-media, body:not(.reduce-motion) .ui-art { transition: transform .35s var(--ease-out), box-shadow .35s, border-color var(--dur-fast), border-radius .55s; }
  body:not(.reduce-motion) [data-tilt].is-tilted { transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px); box-shadow: 0 18px 36px rgba(0, 0, 0, .28); }
  body:not(.reduce-motion) :is(.pkg-spec, .ui-principles li) { transition: translate var(--dur-base) var(--ease-out), border-color var(--dur-fast), background-color var(--dur-fast); }
  body:not(.reduce-motion) :is(.pkg-spec, .ui-principles li):hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--room-accent) 55%, var(--room-line)); }
  body:not(.reduce-motion) .vp-thumb img { transition: scale .4s var(--ease-out); }
  body:not(.reduce-motion) .vp-obj:hover .vp-thumb img { scale: 1.14; }
  /* parallax on decorative layers only */
  body:not(.reduce-motion) :is(.mo-canvas, .ui-stage) { background-position: calc(var(--look-x, 0px) * -1.5) calc(var(--look-y, 0px) * -1.5); transition: background-position .4s var(--ease-out), border-color var(--dur-fast); }
  body:not(.reduce-motion) .mo-note { translate: calc(var(--look-x, 0px) * -2.5) calc(var(--look-y, 0px) * -2.5); transition: translate .4s var(--ease-out); }
  body:not(.reduce-motion) .vp-floor { translate: calc(var(--look-x, 0px) * -4) 0; transition: translate .4s var(--ease-out); }
  body:not(.reduce-motion) .mo-chip { translate: calc(var(--look-x, 0px) * 1.5) calc(var(--look-y, 0px) * 1.5); }
  /* the clip idles on the canvas until you grab it */
  body:not(.reduce-motion) .mo-frame:not(.object-dragging) .mo-video { animation: mo-float 6s ease-in-out infinite; }
  @keyframes mo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
  /* reveals that replay on every room entry */
  body:not(.reduce-motion) .pkg-dieline .d-cut { stroke-dasharray: 420; animation: pkg-draw 1.6s .35s cubic-bezier(.4, 0, .2, 1) both; }
  @keyframes pkg-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
  body:not(.reduce-motion) .pkg-material li i { animation: pkg-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
  body:not(.reduce-motion) .pkg-material li:nth-child(2) i { animation-delay: .08s; } body:not(.reduce-motion) .pkg-material li:nth-child(3) i { animation-delay: .16s; } body:not(.reduce-motion) .pkg-material li:nth-child(4) i { animation-delay: .24s; }
  @keyframes pkg-pop { from { scale: .3; opacity: 0; } }
  body:not(.reduce-motion) :is(.idn-title h2, .mo-copy h2) > * { animation: rm-rise .7s cubic-bezier(.2, .75, .2, 1) both; }
  body:not(.reduce-motion) :is(.idn-title h2, .mo-copy h2) > :nth-child(2) { animation-delay: .12s; }
  @keyframes rm-rise { from { opacity: 0; translate: 0 .35em; clip-path: inset(0 0 100% 0); } to { clip-path: inset(-30% -15% -30% -15%); } }
}
.rm-num { font-variant-numeric: tabular-nums; }

/* Actions in the two room dialogs follow the realm palette (shell .btn is
   not realm-aware inside dialogs — reported to the coordinator). */
:is(.room-viewer, .room-saved-dialog) .dialog-actions .btn { min-height: 40px; padding: 0 16px; border: 1px solid var(--room-line); border-radius: var(--r-pill); background: var(--room-soft); color: var(--room-ink); font: 500 13px var(--font-sans); cursor: pointer; transition: background-color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast); }
:is(.room-viewer, .room-saved-dialog) .dialog-actions .btn:hover { border-color: color-mix(in srgb, var(--room-ink) 42%, transparent); background: color-mix(in srgb, var(--room-ink) 9%, transparent); }
:is(.room-viewer, .room-saved-dialog) .dialog-actions .btn.primary { background: var(--room-accent); border-color: var(--room-accent); color: var(--room-bg); font-weight: 600; }
:is(.room-viewer, .room-saved-dialog) .dialog-actions .btn.primary:hover { background: color-mix(in srgb, var(--room-accent) 86%, var(--room-ink)); }
:is(.room-viewer, .room-saved-dialog) .dialog-actions .btn:active { transform: scale(.97); }
:is(.room-viewer, .room-saved-dialog) .dialog-actions .btn:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }

/* Brand Identity: client names on a loop (rooms.js › brandMarquee). */
.idn-marquee { position: relative; flex: none; margin: clamp(8px, 1.6vh, 18px) 0 4px; padding: clamp(12px, 1.8vh, 18px) 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.idn-marquee::before, .idn-marquee::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: repeating-conic-gradient(var(--room-ink) 0 25%, transparent 0 50%) 0 0 / 8px 8px; opacity: .85; }
.idn-marquee::before { top: 0; } .idn-marquee::after { bottom: 0; }
.idn-marquee-track { display: flex; align-items: center; gap: 30px; width: max-content; animation: idnMarquee 48s linear infinite; }
.idn-marquee:hover .idn-marquee-track, .idn-marquee:focus-within .idn-marquee-track { animation-play-state: paused; }
.idn-marquee a { font-size: clamp(26px, min(4vw, 6.2vh), 60px); font-weight: 750; letter-spacing: -.04em; line-height: 1.05; color: var(--room-ink); white-space: nowrap; transition: color .2s, opacity .2s; }
.idn-marquee:hover a { opacity: .35; }
.idn-marquee a:hover, .idn-marquee a:focus-visible { opacity: 1; }
.idn-marquee i { flex: none; width: 18px; height: 18px; border-radius: 2px; background: repeating-conic-gradient(var(--room-ink) 0 25%, transparent 0 50%) 0 0 / 9px 9px; }
@keyframes idnMarquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .idn-marquee-track { animation: none; } .idn-marquee { overflow-x: auto; } }
