/* Room bar (layer/rooms/090), INV-02 Love Letters W2 (A2314): the Rooms part, one bar with two settings. --k-rooms-bar in the
   skin picks it: bubble (still icons, a drop of liquid, --k-rooms-drop) or drift (icons always travel left to right).
   Clear glass, dark words; white words inside the drop (owner 2026-10-31, A2332). The page stays one long scroll until the script runs, so a
   guest without it (Reduce Motion, a failed load) still sees all 12 sections. */
html.rm201-on { --rm201-h: 60px; --rm201-gap: 12px; --rm201-space: calc(var(--rm201-h) + var(--rm201-gap) + env(safe-area-inset-bottom)); }

/* The hero's words stay above the bar. They sit at the top of a fixed-height hero, so nothing shifts when this arrives. */
/* INV-21 (A2757): the hero's slab is centred in its screen, its words well above the bar, so the hero needs no padding here. */

.rm201 { position: fixed; z-index: 40; left: 0; right: 0; bottom: calc(var(--rm201-gap) + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 420px); height: var(--rm201-h); margin-inline: auto;
  border-radius: calc(var(--rm201-h) / 2); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  /* INV-21 W1.1 (A2773, owner: "too muddy ... more glass and cleaner"): bright clear glass. The wall at the bottom of a phone is
     nearly black, so brightness alone can't lift it and a white veil reads milky: contrast .45 first pulls the darks up toward
     the middle, then brightness 1.75 lights it (board W1.1 H, of eight). Saturate 1.7 had turned the browns to mud. A whisper of
     white, a crisp light rim and one soft sheen across the top. */
  background: linear-gradient(180deg, rgb(255 255 255 / .18) 0%, rgb(255 255 255 / .06) 58%, rgb(255 255 255 / .12) 100%);
  -webkit-backdrop-filter: blur(22px) contrast(.45) brightness(1.75) saturate(1.05); backdrop-filter: blur(22px) contrast(.45) brightness(1.75) saturate(1.05);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .92), inset 0 0 0 1px rgb(255 255 255 / .42), inset 0 -1px 0 rgb(255 255 255 / .34),
    0 0 0 .5px rgb(70 52 32 / .16), 0 14px 30px -12px rgb(40 28 16 / .34); animation: rm201-in .5s ease-out; }
.rm201::before { content: ""; position: absolute; top: 1px; left: 9%; right: 9%; height: 44%; border-radius: 999px 999px 50% 50% / 999px 999px 100% 100%;
  background: linear-gradient(180deg, rgb(255 255 255 / .36), rgb(255 255 255 / 0)); pointer-events: none; }
@keyframes rm201-in { from { opacity: 0; } }
.rm201__track { position: relative; display: flex; height: 100%; }
.rm201-cell { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--k-ink); font: 600 .71875rem/1 var(--k-font-body); text-shadow: 0 1px 0 rgb(255 255 255 / .6), 0 0 8px rgb(255 255 255 / .55); letter-spacing: .03em; -webkit-tap-highlight-color: transparent; transition: color .25s ease; }
.rm201-cell[hidden] { display: none; }
.rm201-cell svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2.5px rgb(255 255 255 / .75)); stroke-width: 1.7; } /* a soft halo, so dark words stay readable when a dark photo passes behind the glass */
.rm201-cell:focus-visible { outline: 2px solid var(--k-ink); outline-offset: -5px; border-radius: 16px; }
/* The same words in white, cut to the drop's own shape: they turn white exactly where the liquid reaches them */
.rm201__track--on { position: absolute; inset: 0; pointer-events: none; }
.rm201__track--on .rm201-cell { color: var(--ag-gold-1, var(--k-on-dark)); text-shadow: 0 1px 0 rgb(255 255 255 / .7); } /* W1.1: the clear lens's word in deep gold */
.rm201__track--on .rm201-cell svg { filter: none; }

/* Bubble bar: the liquid is drawn, and only while it moves */
.rm201__liquid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Drift bar */
.rm201[data-bar="drift"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.rm201[data-bar="drift"] .rm201__liquid { display: none; }
.rm201[data-bar="drift"] .rm201__track { position: absolute; inset: 0 auto 0 0; }
.rm201[data-bar="drift"] .rm201-cell { flex: 0 0 var(--rm201-cell, 70px); width: var(--rm201-cell, 70px); }

/* The end of a room: where next, in the design's own title device */
.rm201-end { display: grid; justify-items: center; gap: 22px; padding: calc(var(--k-section-pad) * .2) var(--k-gutter) calc(var(--k-section-pad) * .7 + var(--rm201-space)); text-align: center; }
.rm201-end--home { padding-top: var(--k-section-pad); }
/* INV-21 W1.1 (A2773, owner: "smaller and slim ... more clear glass like"): the way to the next room is one slim pill of
   clear glass: the bar's recipe with a lighter blur (8 px), so the wall shows through softened and lit, never milky; a crisp
   rim and a sheen; "next" in gold script, the room in caps, a small gold ring with the arrow. */
.rm201-next { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 7px 0 24px; border-radius: 999px;
  color: var(--ag-ink, var(--k-ink)); text-decoration: none; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, rgb(255 253 248 / .16) 0%, rgb(255 250 242 / .05) 60%, rgb(255 250 242 / .1) 100%);
  -webkit-backdrop-filter: blur(8px) contrast(.45) brightness(1.8) saturate(1.05); backdrop-filter: blur(8px) contrast(.45) brightness(1.8) saturate(1.05);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .92), inset 0 0 0 1px rgb(255 255 255 / .46), inset 0 -1px 0 rgb(255 255 255 / .32),
    0 0 0 .5px rgb(70 52 32 / .2), 0 12px 24px -12px rgb(40 28 16 / .5), 0 0 22px rgb(255 214 158 / .16); }
.rm201-next::before { content: ""; position: absolute; top: 2px; left: 16px; right: 16px; height: 44%; border-radius: 999px 999px 50% 50% / 999px 999px 100% 100%;
  background: linear-gradient(180deg, rgb(255 255 255 / .4), rgb(255 255 255 / 0)); pointer-events: none; }
.rm201-next > * { position: relative; }
.rm201-next__s { display: block; padding: 0 .16em .14em; font: 400 calc(23 * var(--ag-u, 1px))/1 var(--k-font-script); font-style: normal; white-space: nowrap;
  background: linear-gradient(100deg, var(--ag-gold-1, currentColor) 0%, var(--ag-gold-1, currentColor) 30%, var(--ag-gold-2, currentColor) 52%, var(--ag-gold-1, currentColor) 76%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.rm201-next__b { display: block; font: 600 calc(12.5 * var(--ag-u, 1px))/1 var(--k-font-display); letter-spacing: .26em; padding-left: .26em; text-transform: uppercase;
  text-shadow: 0 1px 0 rgb(255 255 255 / .6), 0 0 10px rgb(255 250 240 / .75); }
.rm201-next__go { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ag-gold-1, currentColor);
  background: rgb(255 255 255 / .3); box-shadow: inset 0 1px 0 rgb(255 255 255 / .8); }
/* W2.2 (A2802, "Next pill invites"): the gold ring is a drawn circle (it was an inset shadow), so it can draw itself once when
   the pill is first wholly on screen (is-seen, section.js); then the arrow eases forward 4 px and back. Only an armed pill
   (is-arm: the script runs with motion, not in lite) waits; any other pill simply has its ring. */
.rm201-next__go .rm201-next__ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; overflow: visible; fill: none; stroke: var(--ag-gold-2, currentColor); stroke-width: 1; }
.rm201-next__ring circle { stroke-dasharray: 1; stroke-dashoffset: 0; }
.rm201-next.is-arm:not(.is-seen) .rm201-next__ring circle { stroke-dashoffset: 1; }
.rm201-next.is-arm.is-seen .rm201-next__ring circle { transition: stroke-dashoffset 1.1s cubic-bezier(.45, 0, .25, 1) .15s; }
.rm201-next.is-arm.is-seen .rm201-next__go > svg:not(.rm201-next__ring) { animation: rm201-nudge 1.1s cubic-bezier(.45, 0, .3, 1) 1.1s both; }
@keyframes rm201-nudge { 0%, 100% { translate: 0 0; } 45% { translate: 4px 0; } }
.rm201-next__go svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rm201-next:active .rm201-next__go { background: rgb(255 255 255 / .5); }
.rm201-next:focus-visible { outline: 2px solid var(--ag-gold-1, var(--k-ink)); outline-offset: 4px; }

/* Changing room: two torn sheets meet, the room changes behind them, they part. Under the bar, which stays in view. */
.rm201-cover { position: fixed; inset: 0; z-index: 30; overflow: hidden; pointer-events: none; }
.rm201-cover__s { position: absolute; left: 0; right: 0; height: 50%; transition: transform .52s var(--k-ease); }
.rm201-cover__s--a { top: 0; transform: translateY(calc(-100% - var(--k-ll-strip, 1000px) * .16)); }
.rm201-cover__s--b { bottom: 0; transform: translateY(calc(100% + var(--k-ll-strip, 1000px) * .16)); }
.rm201-cover__s .k-ll-tear--dn { top: calc(100% - 1px); }
.rm201-cover__s .k-ll-tear--up { bottom: calc(100% - 1px); }
.rm201-cover.is-shut .rm201-cover__s { transform: none; transition: transform .28s cubic-bezier(.5, 0, .75, .4); }

/* INV-21 W2 (A2786, D-440 item 4): changing room through frost. One fixed layer, 100lvh from the top (AG-T348), the skin's
   frost (the wall's mist under the veil), under the bar; it mists over in 0.25 s, the room swaps under it, it clears in 0.4 s.
   Hidden between changes, so nothing rests on a layer on an iPhone. Opacity only. */
.rm201-frost { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: 30; pointer-events: none; opacity: 0;
  background: var(--ag-wall-base, #3A2C1E) var(--ag-mist, none) center / cover no-repeat; transition: opacity .4s ease-out; }
.rm201-frost::after { content: ""; position: absolute; inset: 0; background: rgb(var(--ag-veil-rgb, 255 251 245) / .35); }
.rm201-frost.is-shut { opacity: 1; transition: opacity .25s ease-in; }

html.rm201-on [data-kjy-section]:focus { outline: 0; }
html.rm201-on .kjy-footer { padding-bottom: calc(var(--rm201-space) + 14px); }
