:root {
  color-scheme: dark;
  --ink: #ece7db;
  --dim: #aaa99e;
  --faint: #6f746e;
  --black: #10110e;
  --panel: rgba(27, 29, 25, 0.82);
  --line: rgba(228, 224, 205, 0.13);
  --green: #8aa79a;
  --studio-map-working-color: rgba(132, 159, 139, 0.76);
  --studio-map-unused-color: rgba(174, 116, 112, 0.72);
  --blue: #7e9fad;
  --pool: #a8c7bd;
  --bruise: #8d8592;
  --dream: #7566b5;
  --dream-dim: #5a536f;
  --radius: 20px;
  --panel: rgba(24, 24, 26, 0.42);
  --line: rgba(238, 231, 214, 0.095);
  --soft-depth: 0 20px 70px rgba(0, 0, 0, 0.34), 0 0 32px rgba(126, 116, 166, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  --soft-depth-small: 0 12px 34px rgba(0, 0, 0, 0.26), 0 0 22px rgba(145, 128, 184, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  --depth-near: 0 24px 78px rgba(0, 0, 0, 0.36), 0 0 42px rgba(166, 151, 207, 0.085), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --depth-mid: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 24px rgba(118, 137, 140, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --depth-far: 0 9px 30px rgba(0, 0, 0, 0.22), 0 0 18px rgba(126, 112, 160, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --warning: #d5c7a0;
  --main-scene-image: url("./assets/main-sea-dream.webp");
  --waitlist-scene-image: url("./assets/waitlist-background.webp");
  --scenery-day-image: url("./assets/main-sea-dream.webp");
  --scenery-night-image: url("./assets/main-night-dream.webp");
  --main-scene-color: #103832;
  --main-scene-haze: #1b6a5f;
  --main-scene-deep: #071513;
  --main-scene-panel-mid: #0f3a36;
  --main-scene-panel-low: #0b2b27;
  --main-scene-rgb: 16, 56, 50;
  --main-scene-glow-rgb: 61, 116, 99;
  --main-scene-warm-rgb: 84, 61, 40;
  --more-scene-image: url("./assets/settings-door-bg.webp");
  --font-title: "Cormorant Dream", "Times New Roman", Georgia, serif;
  --font-ui: "Zalando Sans", Arial, sans-serif;
  --font-display: var(--font-ui);
  --font-serif: var(--font-ui);
  --app-vw: 100vw;
  --app-vh: 100dvh;
  --app-frame-padding: 8px;
  --app-frame-width: min(calc(var(--app-vw) - (var(--app-frame-padding) * 2)), 430px);
  --app-frame-height: min(calc(var(--app-vh) - (var(--app-frame-padding) * 2)), 980px);
  --desktop-content-max: 1120px;
  --desktop-reading-max: 680px;
  --desktop-control-max: 360px;
  --desktop-nav-height: 80px;
  --app-safe-top: env(safe-area-inset-top);
  --app-safe-bottom: env(safe-area-inset-bottom);
  --app-content-top: max(24px, calc(var(--app-safe-top) + 18px));
  --app-content-bottom: max(106px, calc(var(--app-safe-bottom) + 88px));
  --onboarding-panel-top: max(38px, calc(var(--app-safe-top) + 28px));
  --onboarding-panel-bottom: max(118px, calc(var(--app-safe-bottom) + 104px));
  --onboarding-control-bottom: max(30px, calc(var(--app-safe-bottom) + 24px));
  --onboarding-nav-bottom: max(38px, calc(var(--app-safe-bottom) + 28px));
  --app-bottom-scroll-zone: max(154px, calc(env(safe-area-inset-bottom) + 124px));
  --app-sheet-bottom-scroll-zone: max(176px, calc(env(safe-area-inset-bottom) + 146px));
  font-family: var(--font-ui);
}

:root[data-main-scene-time="night"] {
  --panel: rgba(8, 18, 29, 0.5);
  --line: rgba(178, 215, 238, 0.11);
  --dim: #9caeba;
  --faint: #5f7683;
  --soft-depth: 0 22px 76px rgba(0, 0, 0, 0.42), 0 0 38px rgba(31, 104, 154, 0.075), inset 0 1px 0 rgba(202, 229, 255, 0.045);
  --soft-depth-small: 0 14px 38px rgba(0, 0, 0, 0.34), 0 0 24px rgba(38, 111, 154, 0.052), inset 0 1px 0 rgba(202, 229, 255, 0.045);
  --depth-near: 0 26px 82px rgba(0, 0, 0, 0.45), 0 0 46px rgba(36, 116, 176, 0.095), inset 0 1px 0 rgba(202, 229, 255, 0.06);
  --depth-mid: 0 16px 50px rgba(0, 0, 0, 0.36), 0 0 26px rgba(32, 96, 135, 0.06), inset 0 1px 0 rgba(202, 229, 255, 0.038);
  --depth-far: 0 9px 30px rgba(0, 0, 0, 0.28), 0 0 18px rgba(24, 76, 116, 0.04), inset 0 1px 0 rgba(202, 229, 255, 0.026);
}

@font-face {
  font-family: "Cormorant Dream";
  src: url("./assets/cormorant-garamond-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Zalando Sans";
  src: url("./assets/zalando-sans-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Zalando Sans";
  src: url("./assets/zalando-sans-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  background: #071513;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

.studio-perf-report {
  position: fixed;
  right: 10px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 3000;
  width: min(340px, calc(100vw - 20px));
  max-height: 44vh;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid rgba(236, 231, 219, 0.16);
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.72);
  color: rgba(246, 241, 230, 0.92);
  font: 11px/1.35 ui-monospace, "SFMono-Regular", Consolas, monospace;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
}

.studio-perf-report strong,
.studio-perf-report span {
  display: block;
}

.studio-perf-report strong {
  margin-bottom: 5px;
  color: #fffaf0;
}

.skeleton-image,
.skeleton-block {
  background:
    linear-gradient(105deg,
      rgba(236, 231, 219, 0.035) 24%,
      rgba(236, 231, 219, 0.105) 42%,
      rgba(236, 231, 219, 0.035) 60%) 0 0 / 240% 100%,
    rgba(236, 231, 219, 0.035);
  animation: skeleton-drift 1.65s ease-in-out infinite;
}

img.skeleton-image.is-loaded {
  background: transparent;
  animation: none;
}

img.skeleton-image.is-error {
  animation: none;
  background:
    linear-gradient(135deg, rgba(236, 231, 219, 0.035), rgba(236, 231, 219, 0.075));
}

.studio-room-skeleton {
  position: relative;
  min-width: 0;
  aspect-ratio: 7 / 10;
  display: grid;
  align-content: end;
  gap: 9px;
  padding: 8px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 214, 0.055);
  background: rgba(13, 15, 15, 0.3);
}

.saved-card-skeleton {
  min-height: 86px;
  align-content: center;
  gap: 12px;
  pointer-events: none;
}

.saved-skeleton-title,
.saved-skeleton-line {
  display: block;
  border-radius: 999px;
}

.saved-skeleton-title {
  width: 62%;
  height: 18px;
}

.saved-skeleton-line {
  width: 82%;
  height: 12px;
}

.skeleton-card-media {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.skeleton-card-line {
  position: relative;
  z-index: 1;
  width: 68%;
  height: 8px;
  margin: 0 4px 4px;
  border-radius: 999px;
}

@keyframes skeleton-drift {
  from { background-position: 112% 0, 0 0; }
  to { background-position: -42% 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-image,
  .skeleton-block {
    animation: none;
  }
}

body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--app-vh, 100dvh);
  background:
    radial-gradient(circle at 42% 8%, rgba(124, 123, 177, 0.18), transparent 35rem),
    radial-gradient(circle at 78% 28%, rgba(84, 106, 116, 0.11), transparent 29rem),
    radial-gradient(circle at 18% 83%, rgba(148, 109, 63, 0.16), transparent 31rem),
    linear-gradient(128deg, #13120f, #17130f 42%, #0d1115);
  color: var(--ink);
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  touch-action: manipulation;
  font-family: var(--font-ui);
}

button,
input,
textarea,
select {
  font-family: var(--font-ui);
}

select {
  color-scheme: dark;
  background-color: rgba(30, 28, 38, 0.72);
  color: rgba(255, 252, 244, 0.94);
}

select option,
select optgroup {
  background-color: #171819;
  color: rgba(255, 252, 244, 0.94);
}

select option:disabled {
  color: rgba(255, 252, 244, 0.42);
}

:root[data-main-scene-time="night"] body {
  background:
    radial-gradient(circle at 44% 8%, rgba(33, 105, 162, 0.17), transparent 35rem),
    radial-gradient(circle at 76% 30%, rgba(20, 70, 108, 0.14), transparent 29rem),
    radial-gradient(circle at 18% 83%, rgba(6, 27, 43, 0.22), transparent 31rem),
    linear-gradient(128deg, #040910, #07131f 45%, #02070d);
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  height: var(--app-vh, 100dvh);
  min-height: var(--app-vh, 100dvh);
  width: 100%;
  max-width: 100vw;
  display: grid;
  place-items: center;
  padding: var(--app-frame-padding);
  overflow: hidden;
  overflow-x: hidden;
}

.phone {
  position: relative;
  width: var(--app-frame-width);
  max-width: calc(100vw - (var(--app-frame-padding) * 2));
  height: min(100vh, 980px);
  height: min(100dvh, 980px);
  height: var(--app-frame-height);
  max-height: calc(var(--app-vh, 100dvh) - (var(--app-frame-padding) * 2));
  min-height: min(100%, var(--app-frame-height));
  overflow: hidden;
  overflow-x: hidden;
  border: 1px solid rgba(238, 235, 219, 0.075);
  border-radius: 28px;
  background:
    radial-gradient(circle at 38% -8%, rgba(46, 116, 97, 0.19), transparent 18rem),
    radial-gradient(circle at 86% 58%, rgba(44, 83, 74, 0.18), transparent 22rem),
    radial-gradient(circle at 8% 82%, rgba(87, 68, 48, 0.12), transparent 18rem),
    linear-gradient(180deg, rgba(9, 21, 19, 0.72), rgba(7, 16, 14, 0.94)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 7px);
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.64),
    0 0 92px rgba(47, 104, 89, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  isolation: isolate;
  animation: phone-breathing 24s ease-in-out infinite alternate;
}

:root[data-main-scene-time="night"] .phone {
  background:
    radial-gradient(circle at 38% -8%, rgba(16, 86, 130, 0.2), transparent 18rem),
    radial-gradient(circle at 86% 58%, rgba(10, 45, 76, 0.2), transparent 22rem),
    radial-gradient(circle at 8% 82%, rgba(5, 26, 43, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(4, 16, 28, 0.76), rgba(2, 8, 14, 0.96)),
    repeating-linear-gradient(90deg, rgba(210, 235, 255, 0.01) 0 1px, transparent 1px 7px);
  box-shadow:
    0 36px 112px rgba(0, 0, 0, 0.68),
    0 0 92px rgba(22, 84, 126, 0.16),
    inset 0 1px 0 rgba(202, 229, 255, 0.04);
}

body.layout-desktop {
  --app-frame-padding: 0px;
  --app-frame-width: var(--app-vw, 100vw);
  --app-frame-height: var(--app-vh, 100dvh);
  --app-content-top: max(30px, calc(var(--app-safe-top) + 24px));
  --app-content-bottom: max(112px, calc(var(--app-safe-bottom) + 92px));
  --onboarding-panel-top: max(42px, calc(var(--app-safe-top) + 32px));
  --onboarding-panel-bottom: max(124px, calc(var(--app-safe-bottom) + 108px));
  --onboarding-control-bottom: max(34px, calc(var(--app-safe-bottom) + 28px));
  --onboarding-nav-bottom: max(42px, calc(var(--app-safe-bottom) + 32px));
}

body.layout-desktop .shell {
  width: var(--app-vw, 100vw);
  height: var(--app-vh, 100dvh);
  min-height: 0;
  padding: 0;
  place-items: stretch;
}

body.layout-desktop .phone {
  width: var(--app-vw, 100vw);
  max-width: none;
  height: var(--app-vh, 100dvh);
  max-height: none;
  min-height: 0;
  border: 0;
  border-radius: 0;
  animation: none;
}

body.layout-desktop .screen {
  width: 100%;
  max-width: none;
  padding-top: calc(var(--desktop-nav-height) + 28px);
  padding-left: max(28px, calc((100% - var(--desktop-content-max)) / 2 + 28px));
  padding-right: max(28px, calc((100% - var(--desktop-content-max)) / 2 + 28px));
}

body.layout-desktop #onboarding-screen,
body.layout-desktop #waitlist-screen,
body.layout-desktop #room-screen {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

body.layout-desktop #room-screen {
  --room-desktop-media-height: min(calc(var(--app-vh, 100dvh) - 96px), 780px);
  --room-desktop-media-width: min(52vw, calc(var(--room-desktop-media-height) * 2 / 3), 560px);
  --room-desktop-rail-gap: clamp(18px, 2.1vw, 34px);
  --room-desktop-shell-width: calc(var(--room-desktop-media-width) + 76px + var(--room-desktop-rail-gap));
}

body.layout-desktop #room-screen .room-immersive {
  display: grid;
  place-items: center;
  padding: 48px clamp(34px, 6vw, 96px);
}

body.layout-desktop #room-screen .room-media-backdrop {
  inset: -10%;
  filter: blur(42px) saturate(0.72) brightness(0.38);
  transform: scale(1.04);
}

body.layout-desktop #room-screen .room-media-veil {
  background:
    linear-gradient(90deg, rgba(3, 4, 4, 0.78), rgba(3, 4, 4, 0.24) 28%, rgba(3, 4, 4, 0.18) 66%, rgba(3, 4, 4, 0.74)),
    radial-gradient(ellipse at 50% 48%, transparent 38%, rgba(2, 3, 3, 0.46) 100%);
}

body.layout-desktop #room-screen .scene-large {
  position: relative;
  inset: auto;
  width: var(--room-desktop-media-width);
  height: var(--room-desktop-media-height);
  aspect-ratio: 2 / 3;
  max-width: calc(100vw - 220px);
  max-height: calc(var(--app-vh, 100dvh) - 96px);
  border: 1px solid rgba(246, 241, 230, 0.1);
  border-radius: clamp(20px, 2vw, 34px);
  background: rgba(6, 8, 8, 0.46);
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.46),
    0 0 70px rgba(236, 231, 219, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(8px) saturate(0.9);
}

body.layout-desktop #room-screen .room-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.92) contrast(0.98) brightness(0.9);
}

body.layout-desktop #room-screen .room-side-actions {
  top: 50%;
  right: max(
    34px,
    calc((100% - var(--room-desktop-shell-width)) / 2)
  );
  bottom: auto;
  transform: translateY(-50%);
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(246, 241, 230, 0.08);
  border-radius: 999px;
  background: rgba(7, 9, 9, 0.28);
  backdrop-filter: blur(18px) saturate(0.9);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.layout-desktop #room-screen .room-side-actions .room-edge-button,
body.layout-desktop #room-screen .room-more-button,
body.layout-desktop #room-screen .room-connected-button,
body.layout-desktop #room-screen .room-close-button {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  background: rgba(6, 8, 8, 0.36);
}

body.layout-desktop #room-screen .room-connected-button {
  width: auto;
  min-width: 76px;
  padding: 0 16px;
}

body.layout-desktop #room-screen .room-more-button {
  top: 48px;
  left: max(
    34px,
    calc((100% - var(--room-desktop-shell-width)) / 2)
  );
}

body.layout-desktop #room-screen .room-close-button {
  top: 48px;
  right: max(
    34px,
    calc((100% - var(--room-desktop-shell-width)) / 2)
  );
}

body.layout-desktop #room-screen .room-connected-button {
  left: max(
    34px,
    calc((100% - var(--room-desktop-shell-width)) / 2)
  );
  bottom: 44px;
}

body.layout-desktop #room-screen .room-image-controls {
  bottom: 24px;
  padding: 7px 10px;
  background: rgba(7, 9, 9, 0.42);
}

body.layout-desktop .app-sheet-backdrop {
  position: fixed;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vh, 64px) clamp(24px, 5vw, 72px);
}

body.layout-desktop .app-sheet-backdrop.open {
  background: rgba(3, 4, 4, 0.58);
  backdrop-filter: blur(12px) saturate(0.86);
}

body.layout-desktop .app-bottom-sheet {
  width: min(520px, calc(100vw - 56px));
  max-height: min(760px, calc(var(--app-vh, 100dvh) - 88px));
  padding: 54px clamp(26px, 3vw, 36px) 34px;
  border-radius: 28px;
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.52),
    0 0 72px rgba(236, 231, 219, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transform: translateY(8px) scale(0.985);
  transition: transform 190ms ease, opacity 190ms ease;
  touch-action: auto;
}

body.layout-desktop .app-bottom-sheet::before {
  display: none;
}

body.layout-desktop .app-sheet-backdrop.open .app-bottom-sheet {
  transform: translateY(0) scale(1);
}

body.layout-desktop .storage-sheet-close {
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.075);
}

body.layout-desktop .studio-storage-sheet,
body.layout-desktop .room-note-sheet,
body.layout-desktop .room-detail-sheet,
body.layout-desktop .connected-room-sheet,
body.layout-desktop .scenery-fixed-sheet,
body.layout-desktop .studio-login-sheet {
  width: min(560px, calc(100vw - 64px));
}

body.layout-desktop .connected-room-sheet {
  width: min(480px, calc(100vw - 64px));
}

body.layout-desktop .backpack-sheet-backdrop {
  padding: clamp(28px, 5vh, 64px) clamp(24px, 5vw, 72px);
}

body.layout-desktop .backpack-sheet {
  width: min(560px, calc(100vw - 64px));
  height: auto;
  max-height: min(760px, calc(var(--app-vh, 100dvh) - 88px));
  padding: 0;
  border-radius: 28px;
}

body.layout-desktop .backpack-scroll {
  padding: 58px 30px 34px;
}

body.layout-desktop .backpack-scroll h2 {
  margin-bottom: 24px;
  font-size: clamp(34px, 3vw, 42px);
}

@media (max-width: 1120px) {
  body.layout-desktop #room-screen {
    --room-desktop-media-height: min(calc(var(--app-vh, 100dvh) - 96px), 720px);
    --room-desktop-media-width: min(58vw, calc(var(--room-desktop-media-height) * 2 / 3), 480px);
    --room-desktop-rail-gap: 18px;
  }

  body.layout-desktop #room-screen .scene-large {
    max-width: calc(100vw - 170px);
  }
}

body.layout-desktop #global-tabbar,
body.layout-desktop .main-scene-picker,
body.layout-desktop .main-storage-button,
body.layout-desktop .main-wordmark {
  display: none !important;
}

body:not(.layout-desktop) .desktop-web-nav,
body.desktop-nav-hidden .desktop-web-nav,
.desktop-web-nav[hidden] {
  display: none !important;
}

.desktop-web-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 140;
  min-height: var(--desktop-nav-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(560px);
  align-items: center;
  gap: 28px;
  padding: 18px clamp(34px, 4vw, 72px);
  color: rgba(246, 241, 230, 0.9);
  background:
    linear-gradient(180deg, rgba(7, 13, 12, 0.92), rgba(7, 13, 12, 0.72) 70%, rgba(7, 13, 12, 0));
  pointer-events: auto;
}

.desktop-nav-left {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 30px;
  min-width: 0;
}

.desktop-brand,
.desktop-web-nav button {
  width: fit-content;
  max-width: 180px;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  padding: 0 12px;
  color: rgba(236, 231, 219, 0.56);
  background: transparent;
  font: 720 15px/1 var(--font-ui);
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color 140ms ease, opacity 140ms ease;
}

.desktop-brand {
  max-width: none;
  padding-left: 0;
  padding-right: 4px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-title);
  font-weight: 520;
  font-style: italic;
  font-size: 28px;
  text-transform: lowercase;
  cursor: default;
}

.desktop-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.desktop-brand-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.desktop-nav-links,
.desktop-nav-utils {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.desktop-nav-links {
  justify-content: flex-start;
}

.desktop-nav-utils {
  justify-content: flex-end;
  justify-self: end;
}

.desktop-web-nav button:hover,
.desktop-web-nav button:focus-visible,
.desktop-web-nav button.active {
  color: rgba(255, 252, 241, 0.98);
  border-color: transparent;
  background: transparent;
  outline: none;
}

.desktop-nav-menu {
  display: none;
  position: relative;
  justify-self: start;
}

.desktop-menu-list,
.desktop-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  width: 180px;
  display: none;
  padding: 8px;
  border: 1px solid rgba(236, 231, 219, 0.11);
  border-radius: 14px;
  background: rgba(11, 16, 15, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  z-index: 2;
}

.desktop-menu-list {
  left: 0;
}

.desktop-more-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.desktop-more-dropdown::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 14px;
}

.desktop-more-menu {
  right: 0;
  width: 210px;
}

.desktop-web-nav.menu-open .desktop-menu-list,
.desktop-more-dropdown:hover .desktop-more-menu,
.desktop-web-nav.more-open .desktop-more-menu {
  display: grid;
  gap: 4px;
}

.desktop-menu-list button,
.desktop-more-menu button {
  width: 100%;
  max-width: none;
  justify-items: start;
  text-align: left;
}

.desktop-more-toggle {
  max-width: 52px;
  padding-inline: 8px;
}

.desktop-chevron {
  width: 22px;
  height: 22px;
}

.desktop-chevron-up {
  display: none;
}

.desktop-more-dropdown:hover .desktop-chevron-down,
.desktop-web-nav.more-open .desktop-chevron-down {
  display: none;
}

.desktop-more-dropdown:hover .desktop-chevron-up,
.desktop-web-nav.more-open .desktop-chevron-up {
  display: block;
}

@media (max-width: 1120px) {
  .desktop-web-nav {
    grid-template-columns: minmax(0, 1fr) fit-content(520px);
  }

  .desktop-nav-links {
    display: none;
  }

  .desktop-nav-menu {
    display: block;
  }
}

@media (max-width: 760px) {
  .desktop-web-nav {
    grid-template-columns: minmax(0, 1fr) fit-content(320px);
    gap: 12px;
    padding-inline: 18px;
  }

  .desktop-nav-left {
    gap: 10px;
  }

  .desktop-brand {
    font-size: 22px;
  }

  .desktop-nav-utils {
    gap: 4px;
  }

  .desktop-nav-utils button {
    max-width: 82px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .desktop-more-toggle {
    max-width: 44px;
    padding-inline: 6px;
  }
}

body.layout-desktop .onboarding-panel,
body.layout-desktop .onboarding-tour-panel {
  padding-left: max(28px, calc((100% - var(--desktop-content-max)) / 2 + 28px));
  padding-right: max(28px, calc((100% - var(--desktop-content-max)) / 2 + 28px));
}

body.layout-desktop .onboarding-tour-panel > p {
  max-width: var(--desktop-reading-max);
}

body.layout-desktop .onboarding-actions {
  width: min(var(--desktop-control-max), calc(100% - 48px));
}

body.layout-desktop .onboarding-button,
body.layout-desktop .onboarding-continue,
body.layout-desktop .tour-hold-enter,
body.layout-desktop .primary-action,
body.layout-desktop .secondary-action,
body.layout-desktop .pill-action {
  max-width: var(--desktop-control-max);
}

body.layout-desktop .tabbar {
  position: fixed;
  width: 212px;
  max-width: calc(100vw - 96px);
}

body.layout-desktop .room-card,
body.layout-desktop .studio-room-card,
body.layout-desktop .saved-room-card,
body.layout-desktop .tour-build-photo,
body.layout-desktop .tour-build-card,
body.layout-desktop .swipe-card {
  min-width: 0;
}

body.layout-desktop img,
body.layout-desktop .room-card-image,
body.layout-desktop .studio-card-media img,
body.layout-desktop .tour-build-photo img,
body.layout-desktop .swipe-card img {
  object-fit: cover;
}

body.layout-desktop #account-screen,
body.layout-desktop #saved-screen,
body.layout-desktop #notes-screen,
body.layout-desktop #settings-screen,
body.layout-desktop #access-screen,
body.layout-desktop #scenery-screen,
body.layout-desktop #credits-screen {
  padding-top: calc(var(--desktop-nav-height) + 24px);
  padding-left: max(34px, calc((100% - var(--desktop-content-max)) / 2 + 34px));
  padding-right: max(34px, calc((100% - var(--desktop-content-max)) / 2 + 34px));
}

body.layout-desktop #account-screen .topbar.compact,
body.layout-desktop #saved-screen .topbar.compact,
body.layout-desktop #notes-screen .topbar.compact,
body.layout-desktop #settings-screen .topbar.compact,
body.layout-desktop #access-screen .topbar.compact,
body.layout-desktop #scenery-screen .topbar.compact,
body.layout-desktop #credits-screen .topbar.compact {
  min-height: 0;
  margin-bottom: 28px;
  padding: 0;
  align-items: start;
}

body.layout-desktop #account-screen .topbar.compact > div,
body.layout-desktop #saved-screen .topbar.compact > div,
body.layout-desktop #notes-screen .topbar.compact > div,
body.layout-desktop #settings-screen .topbar.compact > div,
body.layout-desktop #access-screen .topbar.compact > div,
body.layout-desktop #scenery-screen .topbar.compact > div,
body.layout-desktop #credits-screen .topbar.compact > div {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  display: block;
  flex: 0 0 auto;
  justify-content: flex-start;
  text-align: left;
  pointer-events: auto;
}

body.layout-desktop #account-screen .topbar.compact .more-back-button,
body.layout-desktop #saved-screen .topbar.compact .more-back-button,
body.layout-desktop #notes-screen .topbar.compact .more-back-button,
body.layout-desktop #settings-screen .topbar.compact .more-back-button,
body.layout-desktop #access-screen .topbar.compact .more-back-button,
body.layout-desktop #scenery-screen .topbar.compact .more-back-button,
body.layout-desktop #credits-screen .topbar.compact .more-back-button {
  display: none !important;
}

body.layout-desktop #saved-screen .topbar.compact.split {
  display: flex;
}

body.layout-desktop #saved-screen .topbar.compact .settings-button {
  position: static;
  margin-left: auto;
}

body.layout-desktop #account-screen .topbar.compact h2,
body.layout-desktop #saved-screen .topbar.compact h2,
body.layout-desktop #notes-screen .topbar.compact h2,
body.layout-desktop #settings-screen .topbar.compact h2,
body.layout-desktop #access-screen .topbar.compact h2,
body.layout-desktop #scenery-screen .topbar.compact h2,
body.layout-desktop #credits-screen .topbar.compact h2 {
  font-size: clamp(40px, 4.3vw, 62px);
  line-height: 0.95;
  text-align: left;
}

body.layout-desktop .scenery-page,
body.layout-desktop #account-screen .more-list,
body.layout-desktop #saved-screen .saved-list,
body.layout-desktop #saved-screen .local-upload,
body.layout-desktop #notes-screen .notes-list,
body.layout-desktop #credits-screen .more-list,
body.layout-desktop #settings-screen .settings-list,
body.layout-desktop #access-screen .settings-list {
  padding-left: 0;
  padding-right: 0;
}

body.layout-desktop .desktop-home-panel {
  display: none;
}

body.layout-desktop .desktop-home-canvas {
  display: none;
}

body.layout-desktop .desktop-routes-panel {
  display: none;
}

body.layout-desktop #studio-screen {
  --studio-desktop-card-min: clamp(162px, 13.5vw, 206px);
  --studio-desktop-card-max: 226px;
  --studio-desktop-grid-gap: clamp(16px, 1.6vw, 24px);
  padding-top: calc(var(--desktop-nav-height) + clamp(26px, 4vh, 52px));
  padding-left: max(34px, calc((100% - 1480px) / 2 + 34px));
  padding-right: max(34px, calc((100% - 1480px) / 2 + 34px));
}

body.layout-desktop #studio-screen .studio-header {
  max-width: 1480px;
  margin: 0 auto clamp(18px, 2.2vw, 32px);
  padding: 0;
}

body.layout-desktop #studio-screen .studio-header h2 {
  font-size: clamp(34px, 3.2vw, 52px);
  line-height: 0.95;
}

body.layout-desktop #studio-screen .studio-browse {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding-bottom: 96px;
}

body.layout-desktop #studio-screen .studio-room-controls {
  align-items: center;
  justify-content: flex-end;
  margin: calc(clamp(18px, 2.2vw, 32px) * -1) 0 clamp(12px, 1.4vw, 20px);
  padding-right: clamp(214px, 18vw, 296px);
  gap: clamp(16px, 1.6vw, 24px);
}

body.layout-desktop #studio-screen .studio-room-search {
  flex: 0 1 clamp(260px, 20vw, 320px);
  max-width: clamp(260px, 20vw, 320px);
}

body.layout-desktop #studio-screen .studio-room-search input {
  height: 36px;
  border-color: rgba(246, 241, 230, 0.12);
  background: rgba(12, 14, 14, 0.28);
  color: rgba(246, 241, 230, 0.86);
  font-size: 13px;
  line-height: 1.2;
}

body.layout-desktop #studio-screen .studio-room-search input::placeholder {
  color: rgba(246, 241, 230, 0.48);
}

body.layout-desktop #studio-screen .studio-filter-trigger {
  height: 36px;
  width: auto;
  min-width: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(246, 241, 230, 0.72);
  box-shadow: none;
  font-size: 13px;
  line-height: 1.2;
}

body.layout-desktop #studio-screen .studio-filter-trigger:hover,
body.layout-desktop #studio-screen .studio-filter-trigger:focus-visible,
body.layout-desktop #studio-screen .studio-filter-trigger.active {
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
}

body.layout-desktop #studio-screen .studio-filter-icon {
  display: none;
}

body.layout-desktop #studio-screen .studio-filter-text {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

body.layout-desktop #studio-screen .studio-room-list {
  grid-template-columns: repeat(auto-fill, minmax(var(--studio-desktop-card-min), var(--studio-desktop-card-max)));
  justify-content: center;
  align-items: start;
  gap: var(--studio-desktop-grid-gap);
}

body.layout-desktop #studio-screen .studio-route-list {
  grid-template-columns: repeat(auto-fill, minmax(var(--studio-desktop-card-min), var(--studio-desktop-card-max)));
  justify-content: center;
  align-items: start;
  gap: var(--studio-desktop-grid-gap);
}

body.layout-desktop #studio-screen .studio-room-list .studio-room-card,
body.layout-desktop #studio-screen .studio-route-card {
  aspect-ratio: 2 / 3;
  min-height: 0;
  padding: clamp(14px, 1.1vw, 18px);
  border-radius: 20px;
}

body.layout-desktop #studio-screen .studio-card-copy {
  min-height: 100px;
}

body.layout-desktop #studio-screen .studio-card-copy strong {
  margin-bottom: 6px;
  font-size: clamp(18px, 1.15vw, 24px);
  line-height: 1.05;
}

body.layout-desktop #studio-screen .studio-card-copy span {
  font-size: clamp(12px, 0.82vw, 15px);
  line-height: 1.25;
  -webkit-line-clamp: 1;
}

body.layout-desktop #studio-screen .studio-card-status {
  top: clamp(10px, 0.9vw, 14px);
  right: auto;
  left: clamp(10px, 0.9vw, 14px);
  max-width: calc(100% - 24px);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(8, 10, 10, 0.42);
  color: rgba(246, 241, 230, 0.74);
  font-size: clamp(10px, 0.68vw, 12px);
  line-height: 1.2;
}

body.layout-desktop #studio-screen .studio-card-status.studio-card-privacy {
  top: clamp(10px, 0.9vw, 14px);
  left: clamp(10px, 0.9vw, 14px);
  width: 26px;
  height: 26px;
  max-width: none;
  padding: 0;
  border-radius: 50%;
  background: rgba(13, 20, 23, 0.52);
  font-size: 0;
}

body.layout-desktop #studio-screen .studio-card-privacy svg {
  width: 20px;
  height: 20px;
}

body.layout-desktop #studio-screen .studio-route-draft-status {
  top: calc(clamp(10px, 0.9vw, 14px) + 32px);
  right: clamp(10px, 0.9vw, 14px);
  left: auto;
  text-align: right;
}

body.layout-desktop #studio-screen .studio-tools {
  top: calc(var(--desktop-nav-height) + clamp(70px, 8vh, 108px) + 19px);
  right: max(
    34px,
    calc(
      (100% - 1480px) / 2 +
      (1480px - ((5 * var(--studio-desktop-card-max)) + (4 * var(--studio-desktop-grid-gap)))) / 2
    )
  );
  z-index: 24;
}

body.layout-desktop #studio-screen .studio-command-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.2vw, 18px);
  min-height: 36px;
  flex-wrap: nowrap;
}

body.layout-desktop #studio-screen .studio-route-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 48px);
  min-height: 36px;
}

body.layout-desktop #studio-screen .studio-route-toolbar-row > h3 {
  order: 1;
  flex: 0 0 auto;
}

body.layout-desktop #studio-screen .studio-route-toolbar-row .studio-command-bar {
  order: 2;
  flex: 0 0 auto;
  min-width: 0;
}

body.layout-desktop #studio-screen .studio-room-controls {
  flex: 0 0 auto;
  justify-content: flex-start;
  width: auto;
  min-width: 0;
  margin: 0;
  padding-right: 0;
  gap: clamp(12px, 1.2vw, 18px);
}

body.layout-desktop #studio-screen .studio-room-search {
  flex: 0 0 clamp(260px, 20vw, 320px);
  max-width: clamp(260px, 20vw, 320px);
}

body.layout-desktop #studio-screen .studio-tools {
  position: relative;
  top: auto;
  right: auto;
  z-index: 24;
  flex: 0 0 auto;
  margin-left: 0;
}

body.layout-desktop #studio-screen .studio-tools .studio-tool-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 1.6vw, 24px);
}

body.layout-desktop #studio-screen .studio-tools .studio-tool-tab {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(246, 241, 230, 0.72);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 650;
  text-transform: lowercase;
}

body.layout-desktop #studio-screen .studio-tools .studio-tool-tab svg {
  display: none;
}

body.layout-desktop #studio-screen .studio-tools .studio-tool-tab span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

body.layout-desktop #studio-screen .studio-tools .studio-tool-tab:hover,
body.layout-desktop #studio-screen .studio-tools .studio-tool-tab:focus-visible,
body.layout-desktop #studio-screen .studio-tools .studio-tool-tab.active {
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  box-shadow: none;
}

body.layout-desktop #studio-screen .studio-tools .studio-tool-tab:active {
  transform: translateY(1px);
}

body.layout-desktop #home-screen {
  isolation: isolate;
  padding: calc(var(--desktop-nav-height) + clamp(42px, 7vh, 76px)) clamp(34px, 7vw, 96px) 96px;
  background: var(--main-scene-deep);
}

body.layout-desktop #home-screen::before,
body.layout-desktop #home-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.layout-desktop #home-screen::before {
  z-index: 0;
  background: var(--main-scene-image) center center / cover no-repeat;
  opacity: 0.62;
}

body.layout-desktop #home-screen::after {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(var(--main-scene-glow-rgb), 0.12), transparent 30rem),
    linear-gradient(180deg, rgba(2, 4, 4, 0.22) 0%, rgba(2, 4, 4, 0.38) 62%, rgba(2, 4, 4, 0.52) 100%);
}

:root[data-main-scene-time="night"] body.layout-desktop #home-screen::before {
  opacity: 0.52;
}

body.layout-desktop #home-screen > * {
  position: relative;
  z-index: 1;
}

body.layout-desktop #home-screen .main-hero {
  display: none;
}

body.layout-desktop .desktop-home-canvas {
  --desktop-main-label-offset: 0px;
  --desktop-main-search-width: 700px;
  width: min(980px, calc(100vw - 72px));
  min-height: clamp(470px, 58vh, 600px);
  display: grid;
  grid-template-columns: minmax(0, 700px) 240px;
  grid-template-rows: auto auto auto;
  column-gap: 40px;
  row-gap: 16px;
  align-items: start;
  justify-content: start;
  margin: clamp(34px, 6.5vh, 66px) auto 80px;
  color: rgba(255, 252, 244, 0.96);
  text-align: left;
}

body.layout-desktop .desktop-home-panel {
  display: contents;
}

body.layout-desktop .desktop-home-kicker {
  display: none;
  color: rgba(236, 231, 219, 0.52);
  font: 720 13px/1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

body.layout-desktop .desktop-home-intro {
  display: none;
  gap: 0;
  max-width: 720px;
  justify-items: center;
}

body.layout-desktop .desktop-home-intro h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(86px, 11vw, 156px);
  font-weight: 520;
  font-style: italic;
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

body.layout-desktop .desktop-home-intro p {
  display: none;
  max-width: 560px;
  margin: 0;
  color: rgba(236, 231, 219, 0.66);
  font: 560 clamp(17px, 1.45vw, 21px)/1.45 var(--font-ui);
}

body.layout-desktop .desktop-home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

body.layout-desktop .desktop-home-actions button {
  width: fit-content;
  min-width: 0;
  min-height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(236, 231, 219, 0.2);
  padding: 0 28px;
  font: 760 17px/1 var(--font-ui);
  letter-spacing: 0;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.layout-desktop .desktop-drift-action {
  color: rgba(8, 10, 9, 0.94);
  background: rgba(246, 241, 230, 0.92);
}

body.layout-desktop .desktop-drift-action:hover,
body.layout-desktop .desktop-drift-action:focus-visible {
  color: rgba(0, 0, 0, 0.98);
  background: rgba(255, 252, 244, 0.98);
  outline: none;
}

body.layout-desktop .desktop-archive-action {
  color: rgba(246, 241, 230, 0.72);
  background: rgba(246, 241, 230, 0.07);
}

body.layout-desktop .desktop-archive-action:hover,
body.layout-desktop .desktop-archive-action:focus-visible {
  color: rgba(255, 252, 244, 0.96);
  border-color: rgba(236, 231, 219, 0.32);
  background: rgba(246, 241, 230, 0.11);
  outline: none;
}

body.layout-desktop .desktop-drift-panel,
body.layout-desktop .desktop-return-panel {
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 18px;
  background: rgba(7, 11, 10, 0.18);
}

body.layout-desktop .desktop-drift-panel {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: var(--desktop-main-search-width);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas:
    "label label"
    "image copy";
  align-items: center;
  gap: 12px 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.layout-desktop .desktop-panel-label {
  color: rgba(255, 252, 244, 0.92);
  font: 760 28px/1.05 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.26);
}

body.layout-desktop .desktop-drift-panel > .desktop-panel-label {
  grid-area: label;
}

body.layout-desktop .desktop-drift-decor {
  grid-area: image;
  width: 240px;
  aspect-ratio: 1.52 / 1;
  align-self: center;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 10, 9, 0.04), rgba(7, 10, 9, 0.18)),
    url("./assets/desktop-drift-decor.webp") center center / cover no-repeat;
  pointer-events: none;
}

body.layout-desktop .desktop-drift-copy {
  grid-area: copy;
  display: grid;
  gap: 12px;
  justify-items: start;
}

body.layout-desktop .desktop-drift-line {
  color: rgba(255, 252, 244, 0.94);
  font: 780 28px/1.1 var(--font-ui);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.28);
}

body.layout-desktop .desktop-drift-line em {
  font-style: italic;
}

body.layout-desktop .desktop-drift-action {
  justify-self: start;
  min-height: 46px;
  padding: 10px 22px;
  font-size: 17px;
  font-weight: 760;
  background:
    radial-gradient(circle at 30% 0%, rgba(238, 231, 214, 0.1), transparent 48%),
    linear-gradient(145deg, rgba(62, 55, 72, 0.58), rgba(23, 30, 28, 0.48));
}

body.layout-desktop #home-screen .desktop-drift-action.soft-button,
body.layout-desktop #home-screen .desktop-drift-action.soft-button:hover,
body.layout-desktop #home-screen .desktop-drift-action.soft-button:focus-visible,
body.layout-desktop #home-screen .desktop-drift-action.soft-button:active {
  color: rgba(255, 252, 244, 0.96);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.32);
}

body.layout-desktop #home-screen .desktop-drift-action.soft-button:hover,
body.layout-desktop #home-screen .desktop-drift-action.soft-button:focus-visible {
  border-color: rgba(255, 252, 244, 0.26);
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 252, 244, 0.12), transparent 48%),
    linear-gradient(145deg, rgba(74, 67, 86, 0.68), rgba(28, 36, 34, 0.58));
}

body.layout-desktop .desktop-return-panel {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  width: 240px;
  height: 266px;
  min-height: 178px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 12px;
  padding: 14px;
}

body.layout-desktop .desktop-return-panel[hidden] {
  display: none;
}

body.layout-desktop .desktop-return-action,
body.layout-desktop .desktop-abandon-action {
  width: fit-content;
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  font: 560 16px/1 var(--font-ui);
}

body.layout-desktop .desktop-return-action {
  color: rgba(255, 252, 244, 0.92);
}

body.layout-desktop .desktop-abandon-action {
  color: rgba(255, 252, 244, 0.74);
}

body.layout-desktop .desktop-return-preview {
  width: 120px;
  height: 150px;
  min-height: 0;
  justify-self: center;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 10px;
  background: rgba(8, 12, 11, 0.28);
  color: rgba(255, 252, 244, 0.86);
  font: 660 16px/1.25 var(--font-ui);
  text-align: center;
}

body.layout-desktop .desktop-return-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.layout-desktop .desktop-return-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

body.layout-desktop .desktop-return-panel.is-empty .desktop-return-actions {
  visibility: hidden;
}

body.layout-desktop .desktop-home-status {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  justify-self: start;
  width: var(--desktop-main-search-width);
  margin-left: var(--desktop-main-label-offset);
  margin-top: 0;
  margin-bottom: 0;
  color: rgba(255, 252, 244, 0.82);
  font: 620 14px/1.4 var(--font-ui);
  text-align: center;
}

body.layout-desktop .desktop-routes-panel {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
  width: var(--desktop-main-search-width);
  margin-left: var(--desktop-main-label-offset);
  display: grid;
  grid-template-columns: 122px 1fr;
  grid-template-areas:
    "label label"
    "visual note";
  align-items: center;
  gap: 12px 34px;
  min-height: 110px;
  padding: 0;
  background: transparent;
  border: 0;
}

body.layout-desktop .desktop-routes-panel .desktop-panel-label {
  grid-area: label;
}

body.layout-desktop .desktop-routes-visual {
  grid-area: visual;
  position: relative;
  width: 76px;
  height: 92px;
  border: 1px solid rgba(236, 231, 219, 0.28);
  border-radius: 8px;
  background: rgba(236, 231, 219, 0.05);
}

body.layout-desktop .desktop-routes-visual::before,
body.layout-desktop .desktop-routes-visual::after {
  content: "";
  position: absolute;
  inset: 5px -7px -5px 7px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 8px;
}

body.layout-desktop .desktop-routes-visual::after {
  inset: 10px -13px -10px 13px;
  opacity: 0.62;
}

body.layout-desktop .desktop-routes-note {
  grid-area: note;
  color: rgba(255, 252, 244, 0.78);
  font: 660 24px/1 var(--font-ui);
}

body.layout-desktop .desktop-home-section-grid {
  display: none;
  width: min(840px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

body.layout-desktop .desktop-home-section-grid section {
  min-height: 118px;
  display: grid;
  align-content: end;
  gap: 10px;
  border: 1px solid rgba(236, 231, 219, 0.13);
  border-radius: 22px;
  padding: 18px;
  background: rgba(8, 12, 11, 0.36);
}

body.layout-desktop .desktop-home-section-grid span {
  color: rgba(255, 252, 244, 0.88);
  font: 760 16px/1.1 var(--font-ui);
}

body.layout-desktop .desktop-home-section-grid p {
  margin: 0;
  color: rgba(236, 231, 219, 0.54);
  font: 560 13px/1.35 var(--font-ui);
}

body.layout-desktop #home-screen .main-dream-panel {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  width: var(--desktop-main-search-width);
  margin-left: var(--desktop-main-label-offset);
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.layout-desktop #home-screen .feeling-search {
  width: 100%;
  gap: 8px;
  justify-items: stretch;
}

body.layout-desktop #home-screen .feeling-search form {
  width: 100%;
  justify-self: stretch;
}

body.layout-desktop #home-screen .feeling-search label {
  justify-self: start;
  width: 100%;
  color: rgba(255, 252, 244, 0.92);
  font-size: 0;
  line-height: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.26);
}

body.layout-desktop #home-screen .feeling-search label::before {
  content: "search.";
  font: 760 28px/1.05 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

body.layout-desktop #home-screen .feeling-search-row {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 252, 244, 0.2);
  background: rgba(8, 12, 11, 0.28);
}

body.layout-desktop #home-screen .feeling-search-row input {
  font-size: 17px;
}

body.layout-desktop #home-screen .feeling-send-button {
  min-width: 88px;
}

body.layout-desktop #home-screen .equipped-object {
  display: none;
}

@media (max-width: 900px) {
  body.layout-desktop #home-screen {
    padding-left: 28px;
    padding-right: 28px;
  }

  body.layout-desktop .desktop-home-canvas {
    --desktop-main-label-offset: 0px;
    --desktop-main-search-width: min(460px, 100%);
    width: min(620px, 100%);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    row-gap: 12px;
    min-height: 0;
    margin-top: 34px;
    transform: none;
  }

  body.layout-desktop .desktop-drift-panel,
  body.layout-desktop #home-screen .main-dream-panel,
  body.layout-desktop .desktop-routes-panel,
  body.layout-desktop .desktop-return-panel {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    width: min(460px, 100%);
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  body.layout-desktop .desktop-drift-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "image"
      "copy";
  }

  body.layout-desktop .desktop-drift-decor {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

@media (max-height: 720px) {
  body.layout-desktop #home-screen {
    padding-top: calc(var(--desktop-nav-height) + 28px);
  }

  body.layout-desktop .desktop-home-panel {
    margin-top: 18px;
    gap: 18px;
  }

  body.layout-desktop .desktop-home-section-grid section {
    min-height: 96px;
  }
}

body.device-mobile {
  --app-frame-padding: 0px;
  --app-frame-width: var(--app-vw, 100vw);
  --app-frame-height: var(--app-vh, 100dvh);
  --app-content-top: max(18px, calc(var(--app-safe-top) + 14px));
  --app-content-bottom: max(118px, calc(var(--app-safe-bottom) + 100px));
  position: fixed;
  inset: 0;
  width: var(--app-vw, 100vw);
  height: var(--app-vh, 100dvh);
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  touch-action: manipulation;
  overscroll-behavior-x: none;
}

body.device-mobile .shell {
  width: var(--app-vw, 100vw);
  height: var(--app-vh, 100dvh);
  min-height: 0;
  padding: 0;
  place-items: stretch;
  overflow: hidden;
  overflow-x: hidden;
}

body.device-mobile .phone {
  width: var(--app-vw, 100vw);
  height: var(--app-vh, 100dvh);
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  overflow-x: hidden;
}

body.device-mobile .screen {
  width: 100%;
  max-width: 100vw;
  padding-left: max(20px, calc((100% - 430px) / 2 + 20px));
  padding-right: max(20px, calc((100% - 430px) / 2 + 20px));
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

body.device-mobile .scene-large {
  margin-left: calc(-1 * max(20px, calc((100% - 430px) / 2 + 20px)));
  margin-right: calc(-1 * max(20px, calc((100% - 430px) / 2 + 20px)));
}

body.device-android {
  background:
    radial-gradient(circle at 50% 30%, rgba(44, 39, 36, 0.72), transparent 34rem),
    linear-gradient(180deg, #11110f 0%, #070807 100%);
}

body.device-android #home-screen.active:not(.search-found):not(.search-quiet):not(.search-cycling):not(.search-ritual) {
  align-content: center;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
}

body.device-android #home-screen.active:not(.search-found):not(.search-quiet):not(.search-cycling):not(.search-ritual) .feeling-search {
  width: min(94vw, 560px);
  justify-self: center;
  transform: translateY(-2vh);
}

body.device-android .feeling-search-row {
  min-height: 66px;
}

body.device-android .feeling-search input {
  font-size: 18px;
  padding: 19px 19px 19px 22px;
}

body.device-android .feeling-search-row .soft-button {
  min-height: 66px;
  padding: 0 24px;
  font-size: 17px;
}

body.device-android .equipped-object {
  margin-top: 3px;
  margin-left: 22px;
  font-size: 14px;
}

body.device-android .equipped-object-icon {
  width: 31px;
  height: 31px;
}

body.device-android .equipped-object-icon svg {
  width: 19px;
  height: 19px;
}

body.device-android .tabbar {
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 30px));
  width: 212px;
  height: 48px;
}

body.device-mobile .tabbar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 30px));
  z-index: 70;
  width: min(212px, calc(100vw - 116px));
  transform: translateX(-50%);
  will-change: transform;
}

.phone::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 60;
  opacity: 0;
  background: #000;
  transition: opacity 900ms ease;
}

.phone.entering-archive::after {
  opacity: 1;
}

.phone::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 58;
  opacity: 0;
  background: rgba(0, 0, 0, 0.16);
}

.phone:has(#more-screen.active, #more-screen.tab-slide-current, #more-screen.tab-slide-next, #more-screen.screen-entering)::before,
.phone:has(#account-screen.active, #account-screen.tab-slide-current, #account-screen.tab-slide-next, #account-screen.screen-entering)::before,
.phone:has(#saved-screen.active, #saved-screen.tab-slide-current, #saved-screen.tab-slide-next, #saved-screen.screen-entering)::before,
.phone:has(#notes-screen.active, #notes-screen.tab-slide-current, #notes-screen.tab-slide-next, #notes-screen.screen-entering)::before,
.phone:has(#settings-screen.active, #settings-screen.tab-slide-current, #settings-screen.tab-slide-next, #settings-screen.screen-entering)::before,
.phone:has(#access-screen.active, #access-screen.tab-slide-current, #access-screen.tab-slide-next, #access-screen.screen-entering)::before,
.phone:has(#credits-screen.active, #credits-screen.tab-slide-current, #credits-screen.tab-slide-next, #credits-screen.screen-entering)::before {
  z-index: 0;
  opacity: 1;
  background:
    radial-gradient(circle at 18% 20%, rgba(220, 190, 70, 0.12), transparent 35%),
    radial-gradient(circle at 90% 74%, rgba(208, 80, 28, 0.15), transparent 42%),
    radial-gradient(circle at 42% 22%, transparent 0 34%, rgba(0, 0, 0, 0.32) 74%),
    linear-gradient(180deg, rgba(4, 7, 6, 0.04), rgba(4, 7, 6, 0.66)),
    var(--more-scene-image) 86% 88% / cover no-repeat,
    #07100d;
}

.phone:has(#scenery-screen.active, #scenery-screen.tab-slide-current, #scenery-screen.tab-slide-next, #scenery-screen.screen-entering)::before {
  z-index: 0;
  opacity: 1;
  background: #07100d;
}

.grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  opacity: 0.25;
  background-image:
    radial-gradient(circle at 50% 42%, transparent 38%, rgba(0, 0, 0, 0.44) 100%),
    radial-gradient(circle at 18% 16%, rgba(151, 143, 199, 0.12), transparent 36%),
    radial-gradient(circle at 74% 20%, rgba(236, 231, 219, 0.032), transparent 28%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 3px 3px, 5px 5px, 9px 9px;
  mix-blend-mode: screen;
  animation: memory-haze 16s ease-in-out infinite alternate;
}

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #000;
  color: var(--dim);
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 1;
  transition: opacity 800ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.that-dream-loader {
  --loader-size: clamp(120px, 18vw, 170px);
  --loader-glow-size: calc(var(--loader-size) * 1.28);
  --loader-glow-opacity-low: 0.07;
  --loader-glow-opacity-high: 0.15;
  --loader-highlight-opacity: 0.055;
  --loader-complete-scale: 1;
  --loader-complete-opacity: 1;
}

.that-dream-loader__stage {
  position: relative;
  z-index: 1;
  width: var(--loader-size);
  height: var(--loader-size);
  display: grid;
  place-items: center;
  opacity: var(--loader-complete-opacity);
  transform: scale(var(--loader-complete-scale));
  overflow: hidden;
  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.that-dream-loader__crescent,
.that-dream-loader__star {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.that-dream-loader__crescent {
  clip-path: ellipse(0% 0% at 49% 49%);
  animation: that-dream-crescent-reveal 700ms 165ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.that-dream-loader__star-wrap {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.98);
  clip-path: circle(24% at 49% 50%);
  animation:
    that-dream-star-reveal 300ms 615ms cubic-bezier(0.22, 1, 0.36, 1) forwards,
    that-dream-star-breathe 2s 915ms ease-in-out infinite;
  pointer-events: none;
}

.that-dream-loader__glow {
  position: absolute;
  width: var(--loader-glow-size);
  height: var(--loader-glow-size);
  left: calc(49% - var(--loader-glow-size) / 2);
  top: calc(50% - var(--loader-glow-size) / 2);
  border-radius: 999px;
  background: #f4a044;
  opacity: 0;
  filter: blur(calc(var(--loader-size) * 0.13));
  animation: that-dream-glow-breathe 2s 915ms ease-in-out infinite;
}

.that-dream-loader__highlight {
  position: absolute;
  inset: 0;
  opacity: var(--loader-highlight-opacity);
  background: linear-gradient(108deg, transparent -8%, rgba(255, 255, 255, 0.9) 0%, transparent 8%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: that-dream-highlight-sweep 2.8s linear infinite;
}

.that-dream-loader--panel {
  --loader-size: 76px;
  --loader-glow-size: 92px;
  --loader-glow-opacity-low: 0.04;
  --loader-glow-opacity-high: 0.09;
  --loader-highlight-opacity: 0.035;
}

.that-dream-loader--inline {
  --loader-size: 22px;
  --loader-glow-size: 0px;
  --loader-glow-opacity-low: 0;
  --loader-glow-opacity-high: 0;
  --loader-highlight-opacity: 0;
  width: var(--loader-size);
  height: var(--loader-size);
  display: inline-grid;
  place-items: center;
  line-height: 0;
}

.that-dream-loader--inline .that-dream-loader__stage {
  width: var(--loader-size);
  height: var(--loader-size);
}

.that-dream-loader--inline .that-dream-loader__glow,
.that-dream-loader--inline .that-dream-loader__highlight {
  display: none;
}

.that-dream-loader.is-complete {
  --loader-complete-scale: 1;
  --loader-complete-opacity: 0;
}

.that-dream-loader.is-complete .that-dream-loader__stage {
  transform: scale(1);
}

.that-dream-loader.is-completing .that-dream-loader__stage {
  transform: scale(0.985);
}

.that-dream-loader.is-completing.is-complete .that-dream-loader__stage {
  transform: scale(1);
}

@keyframes that-dream-crescent-reveal {
  from { clip-path: ellipse(0% 0% at 49% 49%); }
  to { clip-path: ellipse(76% 76% at 49% 49%); }
}

@keyframes that-dream-star-reveal {
  from {
    opacity: 0;
    filter: blur(8px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes that-dream-star-breathe {
  0%,
  100% {
    opacity: 0.92;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.025);
  }
}

@keyframes that-dream-glow-breathe {
  0%,
  100% { opacity: var(--loader-glow-opacity-low); }
  50% { opacity: var(--loader-glow-opacity-high); }
}

@keyframes that-dream-highlight-sweep {
  from {
    background: linear-gradient(108deg, transparent -8%, rgba(255, 255, 255, 0.9) 0%, transparent 8%);
  }

  to {
    background: linear-gradient(108deg, transparent 132%, rgba(255, 255, 255, 0.9) 140%, transparent 148%);
  }
}

.loading-internet-note {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(76px, calc(env(safe-area-inset-bottom) + 70px));
  width: min(260px, calc(100% - 44px));
  margin: 0;
  color: rgba(236, 231, 219, 0.54);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 900ms ease, transform 900ms ease;
}

.loading-screen.slow .loading-internet-note {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-screen.fading {
  opacity: 0;
  pointer-events: none;
}

.loading-screen[hidden] {
  display: none;
}

.studio-wait-overlay {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(3, 5, 6, 0);
  backdrop-filter: blur(0);
  pointer-events: none;
  transition: opacity 240ms ease, background 320ms ease, backdrop-filter 320ms ease;
}

.studio-wait-overlay[hidden] {
  display: none;
}

.studio-wait-overlay.open {
  opacity: 1;
  background: rgba(3, 5, 6, 0.7);
  backdrop-filter: blur(9px) saturate(0.78);
  pointer-events: auto;
}

.studio-wait-copy {
  position: absolute;
  top: calc(50% + 68px);
  left: 50%;
  display: grid;
  gap: 7px;
  width: min(300px, calc(100% - 48px));
  color: rgba(246, 241, 230, 0.9);
  text-align: center;
  transform: translateX(-50%);
}

.studio-wait-copy strong {
  font: 600 16px/1.2 var(--font-display);
}

.studio-wait-stage {
  min-height: 17px;
  color: rgba(236, 231, 219, 0.6);
  font: 500 12px/1.4 var(--font-ui);
  letter-spacing: 0.02em;
}

.studio-wait-progress {
  position: relative;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(236, 231, 219, 0.12);
}

.studio-wait-progress::after,
.studio-wait-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: var(--studio-wait-progress, 0%);
  border-radius: inherit;
  background: rgba(236, 231, 219, 0.76);
  transition: width 260ms ease;
  z-index: 1;
}

.studio-wait-progress::after {
  content: "";
  display: none;
}

.studio-wait-progress.is-indeterminate::after {
  display: block;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(236, 231, 219, 0.84), transparent);
  animation: studio-wait-progress-sweep 1.45s ease-in-out infinite;
  z-index: 2;
}

.studio-wait-percent {
  min-height: 14px;
  color: rgba(236, 231, 219, 0.46);
  font: 600 10px/1 var(--font-ui);
}

@keyframes studio-wait-progress-sweep {
  from { transform: translateX(-115%); }
  to { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .that-dream-loader__crescent,
  .that-dream-loader__star-wrap,
  .that-dream-loader__glow,
  .that-dream-loader__highlight {
    animation: none !important;
  }

  .studio-wait-progress.is-indeterminate::after {
    animation: none;
    left: 29%;
  }

  .that-dream-loader__crescent {
    clip-path: ellipse(76% 76% at 49% 49%);
  }

  .that-dream-loader__star-wrap {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .that-dream-loader__glow {
    opacity: 0.08;
  }

  .that-dream-loader__highlight {
    opacity: 0;
  }
}

.track-credit {
  pointer-events: none;
  position: absolute;
  right: 14px;
  bottom: 88px;
  z-index: 45;
  max-width: min(260px, calc(100% - 28px));
  border: 1px solid rgba(236, 231, 219, 0.12);
  background: rgba(0, 0, 0, 0.82);
  color: rgba(236, 231, 219, 0.74);
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.track-credit.visible {
  opacity: 1;
  transform: translateY(0);
}

.track-credit[hidden] {
  display: none;
}

.dream-console-overlay {
  position: absolute;
  inset: 0;
  z-index: 66;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  opacity: 1;
  pointer-events: auto;
  transition: background 500ms ease, backdrop-filter 500ms ease, opacity 500ms ease;
}

.dream-console-overlay[hidden] {
  display: none;
}

.dream-console-overlay.active {
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(5px) saturate(0.8);
}

.dream-console-overlay.closing {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px) saturate(0.8);
}

.dream-console-stage {
  width: min(340px, 86vw);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  padding: 42px 26px;
  transform: translateY(-3vh);
}

.dream-console-overlay.closing .dream-console-stage {
  opacity: 0;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 360ms ease;
}

.dream-console-overlay.results .dream-console-stage {
  display: none;
}

.dream-console-results {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 0;
  transform: none;
}

.dream-console-results[hidden] {
  display: none;
}

.dream-console-results .dream-room-deck {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

.dream-console-results .dream-result-actions {
  margin-top: -8px;
}

.dream-console-empty {
  width: min(100%, 340px);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 24px 20px var(--app-bottom-scroll-zone);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-padding-bottom: var(--app-bottom-scroll-zone);
  scrollbar-width: none;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  background:
    radial-gradient(circle at 24% 8%, rgba(var(--main-scene-glow-rgb), 0.08), transparent 23rem),
    radial-gradient(circle at 86% 72%, rgba(var(--main-scene-warm-rgb), 0.055), transparent 21rem),
    linear-gradient(180deg, color-mix(in srgb, var(--main-scene-deep) 58%, transparent), color-mix(in srgb, var(--main-scene-panel-mid) 72%, transparent) 46%, color-mix(in srgb, var(--main-scene-panel-low) 84%, transparent));
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
  z-index: 2;
}

.screen.screen-entering {
  animation: dream-screen-in 520ms ease both;
}

.screen.tab-slide-current,
.screen.tab-slide-next {
  display: block;
  overflow-y: hidden;
  opacity: 1;
  filter: blur(0);
  will-change: opacity, filter, transform;
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.25, 0.1, 0.18, 1);
  animation-fill-mode: both;
}

.screen.tab-slide-current {
  z-index: 3;
}

.screen.tab-slide-next {
  z-index: 4;
}

.screen.tab-slide-out-left {
  animation-name: tab-out-left;
}

.screen.tab-slide-out-right {
  animation-name: tab-out-right;
}

.screen.tab-slide-in-right {
  animation-name: tab-in-right;
}

.screen.tab-slide-in-left {
  animation-name: tab-in-left;
}

#waitlist-screen {
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  color: rgba(255, 255, 255, 0.92);
  background-color: #0a100e;
  background:
    linear-gradient(rgba(5, 10, 8, 0.82), rgba(5, 10, 8, 0.78)),
    linear-gradient(180deg, transparent 0%, rgba(7, 13, 11, 0.18) 36%, rgba(7, 13, 11, 0.46) 54%, rgba(7, 13, 11, 0.18) 72%, transparent 100%),
    radial-gradient(circle at 16% 18%, rgba(20, 60, 48, 0.55), transparent 28rem),
    radial-gradient(circle at 88% 38%, rgba(10, 30, 25, 0.6), transparent 30rem),
    radial-gradient(circle at 52% 88%, rgba(15, 40, 35, 0.4), transparent 26rem),
    var(--waitlist-scene-image) center / cover no-repeat,
    #0a100e;
}

#waitlist-screen.active {
  display: block;
}

#waitlist-screen::before,
#waitlist-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#waitlist-screen::before {
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.95'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: screen;
}

#waitlist-screen::after {
  background: radial-gradient(circle at 50% 48%, transparent 42%, rgba(5, 10, 8, 0.7) 100%);
}

.waitlist-landing {
  position: relative;
  min-height: 100%;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 0;
  width: min(100%, 396px);
  margin: 0 auto;
  padding: 48px 28px var(--app-bottom-scroll-zone);
  text-align: left;
}

.waitlist-wordmark {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-ui);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  text-shadow: none;
  white-space: nowrap;
  margin-bottom: 40px;
}

.waitlist-copy,
.waitlist-dream-fields,
.waitlist-context,
.waitlist-form,
.waitlist-key,
.waitlist-rule,
.waitlist-success {
  position: relative;
  z-index: 1;
  width: 100%;
}

.waitlist-copy {
  display: grid;
  gap: 20px;
  justify-items: start;
  transition: opacity 400ms ease;
}

.waitlist-copy h1 {
  max-width: 340px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 42px;
  line-height: 1.15;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0;
}

.waitlist-copy p:not(.time-tag) {
  max-width: 318px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 40px;
}

.waitlist-dream-fields {
  min-height: 780px;
  margin: 0 0 22px;
  isolation: isolate;
  overflow: visible;
}

.waitlist-dream-image,
.waitlist-dream-note,
.waitlist-dream-text {
  position: absolute;
  z-index: 1;
  will-change: transform, opacity, filter;
}

.waitlist-dream-image {
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 82px rgba(0, 0, 0, 0.36);
  filter: saturate(0.62) brightness(0.45) contrast(0.92);
  opacity: 0.68;
  animation: waitlist-float 8.5s ease-in-out infinite alternate;
}

.waitlist-dream-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, transparent 34%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(6, 9, 8, 0.24), rgba(6, 9, 8, 0.66));
}

.waitlist-dream-image-cabin {
  --waitlist-rotate-from: -6deg;
  --waitlist-rotate-to: -3deg;
  top: 26px;
  left: -6px;
  width: 116px;
  height: 154px;
  background-image: url("./assets/waitlist-cabin-dream.webp");
  transform: rotate(-6deg);
}

.waitlist-dream-image-underpass {
  --waitlist-rotate-from: 4deg;
  --waitlist-rotate-to: 7deg;
  top: 270px;
  right: -14px;
  width: 112px;
  height: 142px;
  border-radius: 22px;
  background-image: url("./assets/waitlist-underpass-dream.webp");
  animation-delay: -2.4s;
  transform: rotate(4deg);
}

.waitlist-dream-image-tower {
  --waitlist-rotate-from: -2deg;
  --waitlist-rotate-to: 2deg;
  top: 540px;
  left: 16px;
  width: 106px;
  height: 164px;
  border-radius: 26px;
  background-image: url("./assets/waitlist-tower-dream.webp");
  animation-delay: -4.8s;
  transform: rotate(-2deg);
}

.waitlist-dream-note {
  top: 42px;
  right: 0;
  width: 198px;
  display: grid;
  gap: 5px;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.01em;
  animation: waitlist-float-soft 9s ease-in-out infinite alternate;
}

.waitlist-dream-note p {
  margin: 0;
}

.waitlist-dream-kicker {
  width: max-content;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-ui);
  font-style: italic;
  font-size: 18px;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 5px;
}

.waitlist-dream-text {
  z-index: 3;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 300;
  line-height: 1.05;
  text-shadow: 0 0 22px rgba(214, 232, 210, 0.2), 0 2px 12px rgba(0, 0, 0, 0.38);
  animation: waitlist-text-drift 10s ease-in-out infinite alternate;
}

.waitlist-dream-text span {
  font-family: var(--font-ui);
  font-style: italic;
  font-weight: 400;
}

.waitlist-dream-text-sublimity {
  top: 218px;
  left: 18px;
  font-size: 23px;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 5px;
}

.waitlist-dream-text-eternal {
  --waitlist-text-rotate-from: -13deg;
  --waitlist-text-rotate-to: -10deg;
  top: 492px;
  left: 0;
  font-size: 23px;
  color: rgba(255, 255, 255, 0.66);
  transform: rotate(-12deg);
  animation-delay: -1.8s;
}

.waitlist-dream-text-world {
  top: 394px;
  left: 14px;
  width: 314px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 35px;
  font-weight: 400;
  line-height: 1.02;
  text-align: center;
  text-shadow: 0 0 28px rgba(236, 231, 219, 0.22), 0 4px 22px rgba(0, 0, 0, 0.46);
}

.waitlist-dream-text-memory {
  top: 552px;
  left: 162px;
  width: 118px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1.18;
  animation-delay: -4s;
}

.waitlist-dream-text-time {
  --waitlist-text-rotate-from: 6deg;
  --waitlist-text-rotate-to: 9deg;
  top: 608px;
  right: -2px;
  width: 102px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
  line-height: 1.15;
  transform: rotate(7deg);
  animation-delay: -2.7s;
}

.waitlist-dream-text-utopia {
  --waitlist-text-rotate-from: -9deg;
  --waitlist-text-rotate-to: -6deg;
  top: 684px;
  right: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 24px;
  transform: rotate(-8deg);
  animation-delay: -5.2s;
}

.waitlist-dream-text-next {
  bottom: 6px;
  left: 2px;
  width: 330px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.06;
  text-align: center;
  text-shadow: 0 0 28px rgba(236, 231, 219, 0.2), 0 4px 22px rgba(0, 0, 0, 0.46);
  animation-delay: -6s;
}

.waitlist-rule {
  display: none;
}

.waitlist-context {
  display: grid;
  gap: 24px;
  max-width: 334px;
  margin: 4px 0 30px;
  padding: 0;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.45;
  text-align: left;
  animation: waitlist-context-breathe 8s ease-in-out infinite alternate;
}

.waitlist-context-kicker {
  width: max-content;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-ui);
  font-size: 18px;
  font-style: italic;
  line-height: 1;
}

.waitlist-context h2 {
  max-width: 332px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-ui);
  font-size: 39px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 28px rgba(236, 231, 219, 0.16);
}

.waitlist-context p {
  margin: 0;
}

.waitlist-context-lines {
  display: grid;
  gap: 18px;
  margin: 0;
}

.waitlist-context-lines p {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: baseline;
  min-height: 38px;
  padding: 0;
  border-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.35;
}

.waitlist-context-lines span {
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-ui);
  font-size: 25px;
  font-style: italic;
  line-height: 0.95;
  text-shadow: 0 0 18px rgba(236, 231, 219, 0.14);
}

.waitlist-launch-note {
  max-width: 314px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
  line-height: 1.6;
}

.waitlist-form {
  display: grid;
  gap: 0;
  transition: opacity 400ms ease;
}

.waitlist-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.35;
  text-align: left;
}

.waitlist-consent input {
  width: 14px;
  height: 14px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.waitlist-consent input::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transform: scale(0);
  transition: transform 140ms ease;
}

.waitlist-consent input:checked {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.waitlist-consent input:checked::after {
  transform: scale(1);
}

.waitlist-consent a {
  color: rgba(255, 255, 255, 0.4);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

#waitlist-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.waitlist-key label {
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
}

.waitlist-row {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  margin-bottom: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  transition: border-color 180ms ease;
}

.waitlist-row:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
}

.waitlist-row.invalid {
  animation: waitlist-input-flash 1.2s ease;
}

.waitlist-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 15px 18px;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 300;
}

.waitlist-row input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.waitlist-row .soft-button {
  min-width: 82px;
  min-height: 52px;
  border-width: 0 0 0 0.5px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  transition: background 180ms ease, color 180ms ease;
}

.waitlist-row .soft-button:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.16);
}

.waitlist-row .soft-button:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
}

.waitlist-status {
  min-height: 17px;
  margin: -4px 0 16px;
  color: rgba(255, 180, 160, 0.6);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
}

.waitlist-key {
  display: grid;
  gap: 0;
  margin-top: 0;
  justify-items: center;
  transition: opacity 400ms ease;
}

.waitlist-key > button {
  justify-self: center;
  border: 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  padding: 0 0 2px;
  color: rgba(255, 255, 255, 0.2);
  background: transparent;
  font-family: var(--font-ui);
  font-style: italic;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: color 180ms ease;
}

.waitlist-key > button:hover {
  color: rgba(255, 255, 255, 0.45);
}

.waitlist-success {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.waitlist-success[hidden] {
  display: none;
}

.waitlist-success h2 {
  max-width: 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-ui);
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
}

.waitlist-success p {
  margin: 0;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 300;
}

.waitlist-landing.success .waitlist-copy,
.waitlist-landing.success .waitlist-dream-fields,
.waitlist-landing.success .waitlist-context,
.waitlist-landing.success .waitlist-rule,
.waitlist-landing.success .waitlist-form,
.waitlist-landing.success .waitlist-key {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.waitlist-landing.success .waitlist-success {
  opacity: 1;
  pointer-events: auto;
}

.waitlist-key-modal {
  z-index: 170;
}

.waitlist-key-card.app-bottom-sheet {
  position: relative;
  width: min(100%, 390px);
  display: grid;
  gap: 16px;
  padding: 58px 22px max(24px, calc(env(safe-area-inset-bottom) + 18px));
  border-radius: 30px 30px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -22px 72px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(0.78);
}

.waitlist-key-card h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font: 700 28px/1.02 var(--font-ui);
  letter-spacing: 0;
}

.waitlist-key-card form {
  display: grid;
  gap: 10px;
}

.waitlist-key-card .waitlist-row {
  margin-bottom: 2px;
}

.waitlist-key-close {
  top: 18px;
  right: 18px;
}

@keyframes waitlist-input-flash {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.1);
  }
  18%, 72% {
    border-color: rgba(255, 120, 100, 0.4);
  }
}

@keyframes waitlist-float {
  from {
    transform: translate3d(0, -7px, 0) rotate(var(--waitlist-rotate-from, -4deg));
  }
  to {
    transform: translate3d(0, 9px, 0) rotate(var(--waitlist-rotate-to, 3deg));
  }
}

@keyframes waitlist-float-soft {
  from {
    transform: translate3d(0, 8px, 0);
    filter: blur(0);
  }
  to {
    transform: translate3d(0, -8px, 0);
    filter: blur(0.2px);
  }
}

@keyframes waitlist-text-drift {
  from {
    transform: translate3d(-2px, 8px, 0) rotate(var(--waitlist-text-rotate-from, -1deg));
    opacity: 0.82;
    filter: blur(0.1px);
  }
  to {
    transform: translate3d(3px, -7px, 0) rotate(var(--waitlist-text-rotate-to, 1.5deg));
    opacity: 0.98;
    filter: blur(0);
  }
}

@keyframes waitlist-scroll-arrive {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(0, 30px, 0) scale(0.99);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes waitlist-context-breathe {
  from {
    opacity: 0.88;
    transform: translate3d(0, 4px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, -2px, 0);
  }
}

@supports (animation-timeline: view()) {
  .waitlist-dream-fields,
  .waitlist-rule {
    animation: waitlist-scroll-arrive both;
    animation-timeline: view();
    animation-range: entry 0% cover 44%;
  }
}

@keyframes tab-out-left {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(-4%, 0, 0) scale(1.01);
  }
}

@keyframes tab-out-right {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(4%, 0, 0) scale(1.01);
  }
}

@keyframes tab-in-right {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(3%, 0, 0) scale(0.992);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes tab-in-left {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(-3%, 0, 0) scale(0.992);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen.tab-slide-current,
  .screen.tab-slide-next {
    transition: none;
    animation: none;
  }
}

#room-screen .resonance-button {
  display: grid;
  gap: 0;
}

#room-screen .resonance-button.active,
#room-screen #save-room-button.active,
#room-screen #room-note-button.active {
  color: rgba(255, 248, 213, 0.96);
  background: rgba(14, 15, 13, 0.38);
}

#room-screen .resonance-button[aria-disabled="true"] {
  opacity: 0.78;
}

#onboarding-screen {
  display: none;
  padding: 0;
  overflow: hidden;
  background: #000;
  height: 100%;
  min-height: 0;
}

#onboarding-screen.active {
  display: block;
}

.onboarding-entry {
  position: relative;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: var(--app-content-top) 24px max(30px, calc(var(--app-safe-bottom) + 20px));
  isolation: isolate;
  background: #000;
}

.onboarding-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("./assets/onboarding-escape.webp") center / cover no-repeat;
  filter: saturate(0.72) contrast(0.94) brightness(0.78);
  transform: scale(1.03);
}

.onboarding-entry::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 48% 45%, rgba(236, 231, 219, 0.02), transparent 26%),
    linear-gradient(180deg, rgba(5, 9, 8, 0.18), rgba(5, 9, 8, 0.18) 48%, rgba(5, 9, 8, 0.7) 100%);
}

.onboarding-panel {
  position: absolute;
  inset: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: var(--onboarding-panel-top) 24px var(--onboarding-panel-bottom);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.onboarding-tour-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 18px;
  padding: var(--onboarding-panel-top) 22px var(--onboarding-panel-bottom);
  background: #000;
}

.onboarding-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.onboarding-mark {
  color: rgba(255, 255, 255, 0.88);
  font: 600 42px/0.9 var(--font-title);
  letter-spacing: 0;
  text-transform: lowercase;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.onboarding-panel p {
  width: min(100%, 320px);
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font: 600 34px/1.08 var(--font-ui);
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 20px 54px rgba(0, 0, 0, 0.44);
}

.onboarding-tour-panel > p {
  align-self: end;
  width: min(100%, 342px);
  margin: 0 auto 96px;
  font-size: clamp(27px, 7.2vw, 38px);
  line-height: 1.08;
  text-align: left;
}

.onboarding-tour-panel > p em {
  font-style: italic;
}

.onboarding-actions {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: var(--onboarding-control-bottom);
  display: grid;
  gap: 12px;
}

.onboarding-gate-message {
  width: min(100%, 340px);
  justify-self: center;
  color: rgba(255, 255, 255, 0.62);
  font: 600 13px/1.35 var(--font-ui);
  text-align: center;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.onboarding-panel:not([data-onboarding-panel="0"]) .onboarding-button {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: var(--onboarding-control-bottom);
  width: auto;
}

.onboarding-button {
  min-height: 58px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 20px;
  font: 600 20px/1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
  cursor: pointer;
}

.onboarding-button.light {
  color: rgba(8, 8, 7, 0.94);
  background: rgba(255, 255, 255, 0.96);
}

.onboarding-button.dark {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(0, 0, 0, 0.92);
}

.onboarding-back {
  position: absolute;
  left: 22px;
  bottom: var(--onboarding-nav-bottom);
  z-index: 8;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
}

.onboarding-back svg {
  width: 34px;
  height: 34px;
}

.onboarding-nav {
  position: absolute;
  right: 22px;
  bottom: var(--onboarding-nav-bottom);
  z-index: 8;
  width: min(220px, calc(100% - 118px));
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(238, 231, 214, 0.07);
  border-radius: 999px;
  background: rgba(9, 10, 9, 0.52);
  backdrop-filter: blur(18px) saturate(1.04);
  box-shadow: var(--soft-depth-small);
}

.onboarding-continue {
  min-height: 54px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 50% 24%, rgba(236, 231, 219, 0.16), transparent 54%),
    rgba(236, 231, 219, 0.12);
  font: 800 18px/1 var(--font-ui);
}

.tour-collage {
  position: relative;
  align-self: start;
  width: min(100%, 370px);
  height: min(calc(var(--app-vh, 100dvh) * 0.53), 460px);
  margin: 6px auto 0;
}

.tour-collage figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.tour-collage img,
.tour-search-scene img,
.tour-build-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tour-collage figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.76);
  font: 600 12px/1 var(--font-ui);
  text-transform: lowercase;
}

.tour-room-strip {
  width: 74%;
  height: 34%;
  border-radius: 28px;
}

.strip-one {
  top: 0;
  right: 0;
}

.strip-two {
  top: 28%;
  left: 0;
}

.tour-room-card {
  right: 18px;
  bottom: 0;
  width: 48%;
  height: 34%;
  border-radius: 24px;
}

.tour-search-scene {
  position: relative;
  align-self: start;
  width: min(100%, 356px);
  height: min(calc(var(--app-vh, 100dvh) * 0.54), 470px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 34px;
  background: #111;
  box-shadow: 0 30px 92px rgba(0, 0, 0, 0.55);
}

.tour-search-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.5));
}

.tour-search-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 24px;
  z-index: 2;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px 0 22px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(6, 8, 8, 0.58);
  backdrop-filter: blur(18px);
}

.tour-search-bar svg {
  width: 24px;
  height: 24px;
}

.tour-build-row {
  align-self: start;
  width: min(100%, 390px);
  min-height: min(calc(var(--app-vh, 100dvh) * 0.48), 390px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "photo card"
    "photo seal";
  gap: 14px;
  margin: 4px auto 0;
  align-items: stretch;
}

.tour-build-photo,
.tour-build-card,
.tour-seal-button {
  margin: 0;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 78px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.tour-build-photo {
  grid-area: photo;
}

.tour-build-card {
  grid-area: card;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
}

.tour-build-card span,
.tour-build-card small {
  color: rgba(255, 255, 255, 0.44);
}

.tour-build-card strong {
  font: 700 25px/1 var(--font-ui);
}

.tour-seal-button {
  grid-area: seal;
  min-height: 88px;
  color: rgba(255, 255, 255, 0.92);
  font: 800 18px/1 var(--font-ui);
}

.tour-quiet-panel {
  place-items: center;
}

.tour-quiet-panel > p {
  align-self: center;
  margin-bottom: 90px;
  text-align: center;
}

.onboarding-swipe-deck {
  position: relative;
  align-self: center;
  width: min(76vw, 286px);
  aspect-ratio: 0.72;
  margin: 4px auto 0;
}

.swipe-card {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 24px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at 44% 22%, rgba(120, 165, 174, 0.22), transparent 34%),
    radial-gradient(circle at 72% 80%, rgba(151, 102, 72, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(23, 28, 31, 0.92), rgba(7, 8, 8, 0.96));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
  touch-action: pan-y;
}

.swipe-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.swipe-card span {
  font: 800 28px/1 var(--font-ui);
}

.swipe-card small {
  color: rgba(255, 255, 255, 0.46);
}

.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 106px;
}

.swipe-actions button,
.tour-chip-cloud button {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.swipe-actions button {
  min-height: 46px;
  padding: 0 18px;
  font: 700 14px/1 var(--font-ui);
}

.onboarding-skip {
  position: absolute;
  right: 24px;
  bottom: max(44px, calc(env(safe-area-inset-bottom) + 34px));
  z-index: 9;
  border: 0;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  font: 600 14px/1 var(--font-ui);
}

.tour-purpose-panel .onboarding-skip,
.tour-name-panel .onboarding-skip {
  bottom: max(112px, calc(var(--app-safe-bottom) + 102px));
}

.tour-purpose-panel .onboarding-skip {
  bottom: max(124px, calc(var(--app-safe-bottom) + 114px));
}

.tour-purpose-panel > p,
.tour-name-panel > p,
.tour-swipe-panel > p {
  align-self: start;
  margin-top: min(calc(var(--app-vh, 100dvh) * 0.13), 112px);
  margin-bottom: 0;
}

.tour-purpose-panel > p {
  margin-top: min(calc(var(--app-vh, 100dvh) * 0.12), 104px);
}

.tour-chip-cloud {
  align-self: center;
  width: min(100%, 360px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 88px;
}

.tour-purpose-panel .tour-chip-cloud {
  transform: translateY(calc(var(--app-vh, 100dvh) * -0.07));
  margin-bottom: 0;
}

.tour-chip-cloud button {
  min-height: 52px;
  padding: 0 20px;
  font: 700 18px/1 var(--font-ui);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.tour-chip-cloud button.selected {
  color: rgba(5, 7, 7, 0.92);
  background: rgba(255, 255, 255, 0.9);
}

.tour-name-form {
  align-self: center;
  width: min(100%, 340px);
  display: grid;
  gap: 14px;
  margin-bottom: 92px;
}

.tour-name-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.52);
  font: 700 13px/1 var(--font-ui);
}

.tour-name-form input {
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.075);
  font: 700 20px/1 var(--font-ui);
  outline: none;
}

.tour-handle-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.075);
}

.tour-handle-input input {
  min-height: 60px;
  border: 0;
  background: transparent;
  padding-left: 4px;
}

.tour-name-status {
  min-height: 16px;
  color: rgba(255, 255, 255, 0.48);
  font: 600 12px/1.25 var(--font-ui);
}

.tour-token-panel,
.tour-enter-panel {
  place-items: center;
}

.tour-enter-panel::after {
  content: "tap to continue";
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(118px, calc(env(safe-area-inset-bottom) + 108px));
  color: rgba(255, 255, 255, 0.38);
  font: 700 13px/1 var(--font-ui);
  text-align: center;
  opacity: 1;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.tour-enter-panel.actions-revealed::after {
  opacity: 0;
}

.tour-token-panel {
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: center;
  gap: 28px;
}

.tour-token-panel > p {
  align-self: center;
  margin: 0;
  text-align: center;
}

.tour-token-button {
  width: min(220px, 72vw);
  min-height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.44);
  font: 800 30px/1 var(--font-ui);
}

.tour-retriever-card {
  width: min(78vw, 310px);
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 28px 22px 30px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.tour-retriever-card img {
  width: 92px;
  height: 92px;
}

.tour-retriever-card p {
  width: 100%;
  display: grid;
  gap: 8px;
  font-size: 17px;
  line-height: 1.25;
  text-align: center;
}

.tour-retriever-card strong {
  display: block;
  font-size: 24px;
}

.tour-retriever-card span {
  color: rgba(255, 255, 255, 0.56);
}

.tour-final-account {
  width: min(calc(100% - 48px), 360px);
  display: grid;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 92px;
  filter: blur(10px);
  opacity: 0.28;
  pointer-events: none;
  transition: filter 320ms ease, opacity 320ms ease;
}

.tour-enter-panel.actions-revealed .tour-final-account {
  filter: blur(0);
  opacity: 1;
  pointer-events: auto;
}

.tour-google-button {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  color: rgba(6, 7, 7, 0.94);
  background: rgba(255, 255, 255, 0.94);
  font: 800 18px/1 var(--font-ui);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
}

.tour-google-button[hidden] {
  display: none;
}

.tour-final-account p {
  width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font: 600 13px/1.35 var(--font-ui);
  text-align: center;
  text-shadow: none;
}

.tour-hold-enter {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: max(40px, calc(env(safe-area-inset-bottom) + 30px));
  min-height: 64px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.07);
  font: 800 20px/1 var(--font-ui);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.44);
  filter: blur(10px);
  opacity: 0.28;
  pointer-events: none;
  transition: filter 320ms ease, opacity 320ms ease;
}

.tour-enter-panel.actions-revealed .tour-hold-enter {
  filter: blur(0);
  opacity: 1;
  pointer-events: auto;
}

.tour-hold-enter:disabled,
.tour-hold-enter.locked {
  cursor: not-allowed;
  opacity: 0.48;
  color: rgba(255, 255, 255, 0.56);
}

.tour-hold-enter:not(:disabled) {
  animation: tour-hold-pulse 1.9s ease-in-out infinite;
}

.tour-hold-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--hold-progress, 0%);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.28);
  transition: width 90ms linear;
}

.tour-hold-label {
  position: relative;
  z-index: 1;
}

@keyframes tour-hold-pulse {
  0%, 100% {
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.44), inset 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 22px 78px rgba(0, 0, 0, 0.5), inset 0 0 28px rgba(255, 255, 255, 0.08);
  }
}

.onboarding-dimming {
  animation: onboarding-dim-out 900ms ease forwards;
}

@keyframes onboarding-dim-out {
  to {
    opacity: 0;
    filter: brightness(0);
  }
}

@media (max-height: 780px) and (min-width: 700px) {
  .onboarding-tour-panel {
    grid-template-rows: auto auto;
    align-content: start;
    gap: clamp(10px, calc(var(--app-vh, 100dvh) * 0.02), 16px);
    padding-top: max(24px, calc(var(--app-safe-top) + 18px));
    padding-bottom: max(116px, calc(var(--app-safe-bottom) + 104px));
  }

  .onboarding-tour-panel > p {
    align-self: start;
    width: min(100%, 440px);
    margin: 0 auto;
    font-size: clamp(22px, 3.1vw, 30px);
    line-height: 1.08;
  }

  .tour-collage {
    width: min(100%, 350px);
    height: clamp(224px, calc(var(--app-vh, 100dvh) * 0.35), 292px);
    margin-top: 0;
  }

  .tour-collage figure {
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.36);
  }

  .tour-room-strip {
    height: 31%;
  }

  .strip-two {
    top: 25%;
  }

  .tour-room-card {
    height: 31%;
  }

  .tour-search-scene {
    width: min(100%, 332px);
    height: clamp(246px, calc(var(--app-vh, 100dvh) * 0.38), 304px);
    border-radius: 30px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  }

  .tour-search-bar {
    min-height: 50px;
    bottom: 18px;
  }

  .tour-build-row {
    width: min(100%, 368px);
    min-height: 0;
    height: clamp(214px, calc(var(--app-vh, 100dvh) * 0.34), 270px);
    gap: 12px;
    margin-top: 0;
  }

  .tour-build-photo,
  .tour-build-card,
  .tour-seal-button {
    border-radius: 24px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
  }

  .tour-build-card {
    padding: 14px;
    gap: 7px;
  }

  .tour-build-card strong {
    font-size: 22px;
  }

  .tour-seal-button {
    min-height: 70px;
    font-size: 16px;
  }

  .onboarding-swipe-deck {
    width: min(calc(var(--app-vh, 100dvh) * 0.58), 250px);
  }

  .swipe-actions {
    margin-bottom: 92px;
  }
}

@media (max-height: 700px) and (min-width: 700px) {
  .onboarding-tour-panel {
    gap: 10px;
    padding-top: 24px;
    padding-bottom: 106px;
  }

  .onboarding-tour-panel > p {
    width: min(100%, 460px);
    font-size: clamp(21px, 2.8vw, 27px);
    line-height: 1.06;
  }

  .tour-collage {
    height: clamp(202px, calc(var(--app-vh, 100dvh) * 0.32), 240px);
  }

  .tour-search-scene {
    height: clamp(220px, calc(var(--app-vh, 100dvh) * 0.35), 252px);
  }

  .tour-build-row {
    height: clamp(190px, calc(var(--app-vh, 100dvh) * 0.30), 224px);
  }

  .tour-build-card span,
  .tour-build-card small,
  .tour-collage figcaption {
    font-size: 11px;
  }
}

@media (max-width: 760px) and (max-height: 760px) {
  .onboarding-tour-panel {
    gap: 12px;
    padding-top: max(22px, calc(var(--app-safe-top) + 16px));
    padding-bottom: max(112px, calc(var(--app-safe-bottom) + 102px));
  }

  .onboarding-tour-panel > p {
    width: min(100%, 340px);
    margin: 0 auto;
    font-size: clamp(24px, 7vw, 30px);
  }

  .tour-collage {
    height: min(calc(var(--app-vh, 100dvh) * 0.39), 300px);
  }

  .tour-build-row {
    min-height: 0;
    height: min(calc(var(--app-vh, 100dvh) * 0.34), 260px);
  }
}

.status-line,
.chat-header,
.topbar,
.room-actions,
.choice-row,
.tabbar {
  display: flex;
  align-items: center;
}

.chat-header {
  position: relative;
  z-index: 3;
  gap: 10px;
  height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(236, 231, 219, 0.12);
  background: rgba(18, 17, 22, 0.54);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.chat-header strong {
  flex: 1;
  font-weight: 400;
  font-size: 18px;
}

.chat-header span:last-child {
  color: var(--dim);
  font-size: 12px;
}

.chat-avatar {
  width: 29px;
  height: 29px;
  border: 1px solid rgba(236, 231, 219, 0.35);
  border-radius: 999px;
  background:
    radial-gradient(circle at 55% 36%, rgba(236, 231, 219, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(236, 231, 219, 0.08), rgba(236, 231, 219, 0.02));
}

.status-line {
  justify-content: space-between;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.onboarding {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px 16px;
}

.kicker,
.time-tag {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.chat-log {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 10px;
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-log::-webkit-scrollbar {
  display: none;
}

.bubble {
  width: fit-content;
  max-width: 84%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) var(--radius) 3px;
  background: linear-gradient(145deg, rgba(35, 34, 42, 0.78), rgba(20, 22, 20, 0.76));
  box-shadow: var(--soft-depth-small);
  color: var(--ink);
  line-height: 1.34;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.bubble.user {
  justify-self: end;
  align-self: flex-end;
  color: #d7e0d4;
  border-radius: var(--radius) var(--radius) 3px var(--radius);
  background: linear-gradient(145deg, rgba(101, 95, 134, 0.42), rgba(70, 91, 79, 0.25));
}

.bubble.typing {
  display: inline-flex;
  gap: 5px;
  padding: 12px 13px;
}

.bubble.typing span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(236, 231, 219, 0.62);
  animation: typing-dot 900ms ease-in-out infinite;
}

.bubble.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.bubble.typing span:nth-child(3) {
  animation-delay: 240ms;
}

.choice-row {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
}

.choice-row[hidden] {
  display: none;
}

.name-form {
  width: min(100%, 310px);
  margin-left: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.name-form input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 31, 0.54);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.name-form button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(94, 86, 136, 0.46), rgba(71, 91, 78, 0.24));
  color: var(--ink);
  padding: 0 13px;
  font: inherit;
  cursor: pointer;
}

.chat-input-bar {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(236, 231, 219, 0.1);
}

.chat-input-bar span {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 12, 10, 0.34);
}

.chat-input-bar button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(26, 29, 24, 0.78);
  color: var(--ink);
  font-size: 24px;
}

.soft-button,
.choice-button,
.icon-button,
.tab {
  border: 1px solid rgba(238, 231, 214, 0.085);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0%, rgba(238, 231, 214, 0.075), transparent 48%),
    linear-gradient(145deg, rgba(48, 43, 58, 0.5), rgba(20, 25, 24, 0.38));
  backdrop-filter: blur(16px) saturate(1.08);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--soft-depth-small);
  transition: transform 360ms cubic-bezier(0.2, 0.85, 0.16, 1), border-color 360ms ease, background 360ms ease, box-shadow 420ms ease, opacity 360ms ease;
}

.soft-button:hover,
.choice-button:hover,
.icon-button:hover,
.tab:hover {
  border-color: rgba(226, 220, 245, 0.2);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.24), 0 0 24px rgba(156, 144, 198, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.soft-button:active,
.choice-button:active,
.icon-button:active,
.tab:active,
.feeling-card:active,
.room-card:active {
  transform: translateY(2px) scale(0.982);
  transition-duration: 520ms;
}

.choice-button,
.soft-button {
  min-height: 42px;
  padding: 10px 13px;
  font-size: 15px;
}

.topbar {
  gap: 14px;
  margin-bottom: 26px;
  animation: soft-reveal 520ms ease-out both;
}

.topbar.split {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
}

.topbar.compact {
  margin-bottom: 18px;
}

.topbar.compact > div {
  flex: 1;
  text-align: center;
}

.topbar.compact:not(.split) > .icon-button + div {
  margin-right: 44px;
}

.topbar.overlay {
  position: relative;
  z-index: 3;
  margin-bottom: -62px;
  padding-top: 4px;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
}

h3,
.feeling-search label,
.card-copy strong,
.menu-card strong,
.room-line strong,
.chat-bubble {
  font-family: var(--font-display);
  font-weight: 500;
}

h1 {
  max-width: 280px;
  font-size: clamp(31px, 9.5vw, 43px);
}

h2 {
  font-size: 31px;
}

.icon-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 26px;
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.settings-button {
  justify-self: end;
  font-size: 22px;
}

#saved-screen .settings-button {
  position: absolute;
  top: max(26px, calc(env(safe-area-inset-top) + 20px));
  right: 22px;
  left: auto;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 18, 17, 0.48);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px) saturate(0.82);
}

#saved-screen .settings-button svg {
  width: 28px;
  height: 28px;
}

.settings-button.editing {
  color: var(--ink);
  background: rgba(117, 102, 181, 0.18);
  border-color: rgba(236, 231, 219, 0.24);
}

.feeling-list,
.room-list,
.saved-list,
.notes-list,
.more-list,
.developer-list {
  display: grid;
  gap: 12px;
}

.feeling-search {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

#home-screen {
  padding: 0 0 var(--app-bottom-scroll-zone);
  scroll-padding-bottom: var(--app-bottom-scroll-zone);
  background:
    radial-gradient(circle at 50% 44%, rgba(var(--main-scene-glow-rgb), 0.34), transparent 22rem),
    radial-gradient(circle at 14% 78%, rgba(var(--main-scene-warm-rgb), 0.16), transparent 20rem),
    linear-gradient(180deg, var(--main-scene-deep) 0%, var(--main-scene-panel-low) 40%, var(--main-scene-color) 62%, var(--main-scene-panel-mid) 84%, var(--main-scene-deep) 100%);
}

#home-screen.active {
  display: block;
}

.main-hero {
  position: relative;
  min-height: min(40dvh, 380px);
  isolation: isolate;
  overflow: hidden;
  background: var(--main-scene-color);
}

.main-hero::before {
  content: "";
  position: absolute;
  inset: -3% -2%;
  z-index: 0;
  background: var(--main-scene-image) center top / cover no-repeat;
  filter: saturate(1.12) contrast(1.08) brightness(1.22);
  transform: scale(1.01);
  animation: main-scene-drift 26s ease-in-out infinite alternate;
}

.main-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 46%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(var(--main-scene-rgb), 0.04) 18%, rgba(var(--main-scene-rgb), 0.2) 48%, rgba(var(--main-scene-rgb), 0.72) 82%, var(--main-scene-color) 100%),
    radial-gradient(ellipse at 50% 26%, rgba(236, 231, 219, 0.035), transparent 68%);
  pointer-events: none;
}

:root[data-main-scene-time="night"] .main-hero::before {
  filter: saturate(1.08) contrast(1.12) brightness(0.92);
}

.main-scene-picker,
.main-storage-button {
  position: absolute;
  top: max(48px, calc(env(safe-area-inset-top) + 38px));
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 231, 219, 0.1);
  border-radius: 999px;
  color: rgba(236, 231, 219, 0.88);
  background:
    radial-gradient(circle at 42% 26%, rgba(236, 231, 219, 0.12), transparent 54%),
    rgba(9, 38, 48, 0.54);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.08);
}

.main-scene-picker {
  left: max(22px, calc(env(safe-area-inset-left) + 22px));
}

.main-storage-button {
  right: max(22px, calc(env(safe-area-inset-right) + 22px));
}

.main-scene-picker svg,
.main-storage-button svg {
  width: 22px;
  height: 22px;
}

.main-wordmark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: max(48px, calc(env(safe-area-inset-top) + 38px));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-title);
  font-weight: 520;
  font-size: 28px;
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 0 26px rgba(6, 10, 12, 0.42);
  transform: translateX(-50%);
  white-space: nowrap;
}

.main-brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 420px) {
  .main-wordmark {
    gap: 8px;
  }

  .main-brand-mark {
    width: 28px;
    height: 28px;
  }
}

.main-dream-panel {
  position: relative;
  z-index: 1;
  min-height: max(64dvh, 620px);
  margin-top: 0;
  padding: 88px 22px 150px;
  background:
    radial-gradient(circle at 78% 42%, rgba(var(--main-scene-glow-rgb), 0.18), transparent 20rem),
    radial-gradient(circle at 22% 94%, rgba(var(--main-scene-warm-rgb), 0.12), transparent 20rem),
    linear-gradient(180deg, var(--main-scene-color) 0%, var(--main-scene-panel-mid) 44%, var(--main-scene-panel-low) 76%, var(--main-scene-deep) 100%);
}

.main-dream-panel::before {
  display: none;
}

.main-dream-panel::after {
  display: none;
}

.returning-panel {
  width: min(100%, 300px);
  margin: 0 auto 30px;
  display: grid;
  justify-items: center;
  gap: 14px;
  color: rgba(255, 252, 244, 0.86);
}

.returning-panel[hidden] {
  display: none;
}

.returning-panel.is-empty .returning-panel__actions {
  visibility: hidden;
}

.returning-panel__title {
  width: 100%;
  color: rgba(255, 252, 244, 0.82);
  font: 700 15px/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: lowercase;
}

.returning-panel__preview {
  width: 132px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 252, 244, 0.12);
  border-radius: 18px;
  background: rgba(8, 12, 11, 0.28);
}

.returning-panel__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.returning-panel__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.returning-panel__actions button {
  min-height: 38px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: rgba(255, 252, 244, 0.68);
  font: 520 13px/1 var(--font-ui);
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.returning-panel__enter {
  color: rgba(255, 252, 244, 0.92) !important;
}

.returning-panel__actions button:hover,
.returning-panel__actions button:focus-visible {
  color: rgba(255, 252, 244, 1);
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.layout-desktop #home-screen .returning-panel {
  margin: 0 0 28px;
}

#home-screen .feeling-search {
  position: relative;
  z-index: 1;
  margin: 0;
  transform: none;
}

#home-screen .feeling-list {
  position: relative;
  z-index: 1;
  transform: none;
  margin-top: 24px;
}

#home-screen.search-found .feeling-list,
#home-screen.search-cycling .feeling-list {
  position: absolute;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  margin: 0;
  padding: max(46px, calc(env(safe-area-inset-top) + 32px)) 22px var(--app-bottom-scroll-zone);
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--main-scene-glow-rgb), 0.15), transparent 22rem),
    rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(7px) saturate(0.82);
  animation: dream-answer-veil 420ms ease both;
}

#home-screen.search-found,
#home-screen.search-quiet,
#home-screen.search-cycling,
#home-screen.search-ritual {
  padding-top: 0;
}

.feeling-search form {
  display: grid;
  gap: 9px;
}

.feeling-search label {
  color: var(--ink);
  width: 100%;
  font-size: clamp(30px, 7.35vw, 38px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 26px rgba(236, 231, 219, 0.08);
  animation: soft-reveal 620ms ease-out both;
  transform-origin: left center;
}

.feeling-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  border: 1px solid rgba(238, 231, 214, 0.07);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 0%, rgba(154, 145, 199, 0.08), transparent 56%),
    rgba(20, 20, 22, 0.34);
  backdrop-filter: blur(20px) saturate(1.05);
  box-shadow: var(--depth-far);
  overflow: hidden;
}

.feeling-search input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 13px 15px 13px 16px;
  outline: none;
  box-shadow: none;
}

.feeling-search input::placeholder {
  color: rgba(170, 169, 158, 0.38);
  transition: color 420ms ease, opacity 420ms ease;
}

.feeling-search input.placeholder-fading::placeholder {
  color: rgba(170, 169, 158, 0.02);
  opacity: 0.08;
}

.feeling-search-row .soft-button {
  min-height: 46px;
  min-width: 64px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid rgba(238, 231, 214, 0.055);
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(238, 231, 214, 0.06), transparent 52%),
    rgba(34, 33, 38, 0.34);
  box-shadow: none;
}

.feeling-send-button {
  display: grid;
  place-items: center;
  color: rgba(236, 231, 219, 0.86);
}

.feeling-send-button svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 12px rgba(236, 231, 219, 0.08));
}

.equipped-object {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(170, 169, 158, 0.56);
  font-size: 12px;
  letter-spacing: 0.02em;
  margin: -3px 0 0 16px;
  animation: soft-reveal 760ms ease-out both;
}

.equipped-object-icon {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  color: rgba(236, 231, 219, 0.78);
  border: 1px solid rgba(236, 231, 219, 0.08);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 28%, rgba(236, 231, 219, 0.1), transparent 54%),
    rgba(22, 22, 22, 0.34);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24), 0 0 24px rgba(202, 184, 130, 0.05);
}

.equipped-object-icon svg {
  width: 17px;
  height: 17px;
}

.feeling-search-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 13px;
}

.feeling-search-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.feeling-search-state button {
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  padding: 4px 0;
}

.feeling-result-card {
  max-width: 100%;
  animation: dream-result-surface 760ms cubic-bezier(0.2, 0.78, 0.14, 1) both;
}

.search-cycling .feeling-result-card {
  animation: none;
}

.dream-room-deck {
  --dream-card-width: clamp(210px, calc(100vw - 148px), 312px);
  --dream-arrow-gap: clamp(24px, 6vw, 38px);
  position: relative;
  width: 100%;
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  perspective: 1100px;
  animation: none;
  isolation: isolate;
}

.search-cycling .dream-room-deck {
  animation: none;
}

.dream-room-deck-card {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: var(--dream-card-width);
  aspect-ratio: 7 / 10;
  min-height: 0;
  height: auto;
  border: 1px solid rgba(238, 231, 214, 0.08);
  border-radius: 38px;
  overflow: hidden;
  clip-path: inset(0 round 38px);
  -webkit-mask: -webkit-radial-gradient(white, black);
  contain: paint;
  isolation: isolate;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background:
    radial-gradient(circle at 28% 0%, rgba(236, 231, 219, 0.08), transparent 48%),
    rgba(12, 12, 13, 0.56);
  box-shadow:
    0 56px 108px rgba(0, 0, 0, 0.52),
    0 18px 48px rgba(236, 231, 219, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.04);
  transform-style: preserve-3d;
  transform-origin: center center;
  transition:
    transform 260ms cubic-bezier(0.22, 0.76, 0.18, 1),
    filter 260ms ease,
    opacity 260ms ease;
}

.dream-route-deck-card {
  border-color: rgba(157, 190, 179, 0.26);
}

.dream-route-deck-card .dream-room-deck-topline em:first-child {
  color: rgba(190, 220, 208, 0.9);
}

:root[data-main-scene-time="night"] #studio-screen {
  background:
    radial-gradient(circle at 24% 8%, rgba(var(--main-scene-glow-rgb), 0.08), transparent 23rem),
    linear-gradient(180deg, var(--main-scene-deep) 0%, var(--main-scene-panel-low) 40%, var(--main-scene-color) 62%, var(--main-scene-panel-mid) 84%, var(--main-scene-deep) 100%);
}

.dream-room-deck-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--scene);
  filter: saturate(0.72) contrast(0.92) brightness(0.68) blur(0.35px);
  transform: scale(1.03);
  animation: slow-memory-drift 22s ease-in-out infinite alternate;
}

.dream-room-deck-card:has(.room-card-image)::before {
  opacity: 0;
}

.dream-room-deck-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.18) 34%, rgba(0, 0, 0, 0.8) 100%),
    radial-gradient(circle at 50% 0%, rgba(236, 231, 219, 0.11), transparent 46%);
}

.dream-room-card-glare {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background:
    radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 34%),
      rgba(255, 255, 255, 0.54) 0%,
      rgba(255, 255, 255, 0.18) 18%,
      transparent 62%);
  transition: opacity 240ms ease, background 160ms ease;
}

.dream-room-deck-card .room-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  filter: saturate(0.78) contrast(0.92) brightness(0.72) blur(0.2px);
  transform: scale(1.02);
  animation: slow-memory-drift 22s ease-in-out infinite alternate;
}

.dream-room-deck-card.active {
  z-index: 3;
  opacity: 1;
  filter: none;
  transform: translate3d(0, 0, var(--tilt-z, 0px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1);
}

.dream-room-deck-card.incoming {
  z-index: 2;
  opacity: 1;
  pointer-events: none;
  filter: none;
}

.dream-room-deck-card.incoming.from-left {
  transform: translate3d(-112%, 0, -90px) rotateY(-16deg) scale(0.92);
}

.dream-room-deck-card.incoming.from-right {
  transform: translate3d(112%, 0, -90px) rotateY(16deg) scale(0.92);
}

.dream-room-deck.switching-left .dream-room-deck-card.active {
  opacity: 1;
  filter: none;
  transform: translate3d(-112%, 0, -90px) rotateY(-16deg) scale(0.92);
}

.dream-room-deck.switching-right .dream-room-deck-card.active {
  opacity: 1;
  filter: none;
  transform: translate3d(112%, 0, -90px) rotateY(16deg) scale(0.92);
}

.dream-room-deck.switching-left .dream-room-deck-card.incoming.from-right,
.dream-room-deck.switching-right .dream-room-deck-card.incoming.from-left {
  transform: translate3d(0, 0, 0) rotateY(0deg) scale(1);
}

.dream-room-deck-card:active {
  translate: -50% -50%;
  transform: translate3d(0, 2px, var(--tilt-z, 0px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(0.986);
}

.dream-room-arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  width: 34px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: rgba(236, 231, 219, 0.78);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateY(-50%);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.62));
  transition: transform 180ms ease, opacity 180ms ease, color 180ms ease, filter 180ms ease;
}

.dream-room-arrow.previous {
  left: max(10px, calc(50% - (var(--dream-card-width) / 2) - var(--dream-arrow-gap) - 34px));
}

.dream-room-arrow.next {
  right: max(10px, calc(50% - (var(--dream-card-width) / 2) - var(--dream-arrow-gap) - 34px));
}

.dream-room-arrow svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dream-room-arrow:active {
  transform: translateY(-50%) scale(0.94);
  color: rgba(255, 252, 242, 0.92);
  filter: drop-shadow(0 10px 22px rgba(236, 231, 219, 0.18));
}

.dream-room-deck-topline {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(236, 231, 219, 0.58);
  font-size: 12px;
  line-height: 1.2;
}

.dream-room-deck-topline em {
  font-style: normal;
}

.dream-room-deck-copy {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 24px;
  display: grid;
  gap: 8px;
}

.dream-room-deck-copy strong {
  font-size: clamp(28px, 7.4vw, 40px);
  line-height: 0.96;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dream-room-deck-copy span {
  color: rgba(236, 231, 219, 0.68);
  font-size: 14px;
  line-height: 1.35;
}

.dream-result-meta {
  margin: -2px 0 0;
  color: rgba(170, 169, 158, 0.56);
  font-size: 13px;
  text-align: center;
  animation: soft-reveal 680ms ease-out both;
}

.dream-result-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: -2px;
  animation: soft-reveal 680ms ease-out both;
}

.dream-result-actions button {
  border: 0;
  background: transparent;
  color: rgba(236, 231, 219, 0.68);
  cursor: pointer;
  padding: 4px 0;
  text-shadow: 0 0 18px rgba(236, 231, 219, 0.1);
}

.dream-result-actions button:active {
  transform: translateY(1px);
}

@keyframes dream-deck-shuffle {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0.32;
    filter: blur(10px);
    transform: translateY(16px) scale(0.96);
  }
}

@keyframes dream-answer-veil {
  from {
    opacity: 0;
    backdrop-filter: blur(0) saturate(1);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(7px) saturate(0.82);
  }
}

.quiet-search-state p {
  margin: 0;
  color: rgba(170, 169, 158, 0.58);
  font-size: 13px;
}

.quiet-search-state {
  display: grid;
  justify-items: center;
  gap: 0;
}

.quiet-search-state .empty-state {
  min-height: 250px;
}

.dream-retriever-device {
  width: min(330px, 80vw);
  aspect-ratio: 429 / 324;
  display: block;
  background: var(--dream-retriever-closed-url, url("./assets/dream-retriever-closed.webp")) center / contain no-repeat;
  max-width: 100%;
  filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 28px rgba(194, 165, 255, 0.12));
  animation: none;
  pointer-events: none;
}

.dream-console-overlay.open .dream-retriever-device,
.dream-console-overlay.ready .dream-retriever-device {
  aspect-ratio: 439 / 342;
  background-image: var(--dream-retriever-open-url, url("./assets/dream-retriever-open.webp"));
}

.dream-console-overlay.open .dream-retriever-device {
  animation: none;
}

.dream-retriever-device.console-dropping {
  animation: dream-console-drop 560ms cubic-bezier(0.18, 0.82, 0.14, 1) 500ms both;
}

.dream-disc-button {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  justify-items: center;
  animation: dream-disc-surface 760ms ease-out both, dream-disc-flash 1500ms ease-in-out 760ms infinite;
}

.dream-disc-button[hidden] {
  display: none;
}

.dream-disc-image {
  width: min(128px, 32vw);
  aspect-ratio: 393 / 313;
  display: block;
  background: var(--dream-disc-url, url("./assets/dream-disc.webp")) center / contain no-repeat;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 30px rgba(214, 182, 255, 0.16));
  transform-origin: center;
  transition: transform 260ms ease, filter 260ms ease;
}

.dream-disc-button:active .dream-disc-image {
  transform: translateY(2px) scale(0.96);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 18px rgba(214, 182, 255, 0.12));
}

.theme-detail {
  display: grid;
  gap: 12px;
  margin: -8px 0 18px;
}

.theme-detail[hidden] {
  display: none;
}

.theme-detail-image {
  width: 100%;
  max-height: 360px;
  min-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(8, 10, 9, 0.24);
  filter: saturate(0.72) contrast(0.9) brightness(0.82) blur(0.25px);
  box-shadow: var(--soft-depth);
  animation: slow-memory-drift 18s ease-in-out infinite alternate;
}

.theme-detail-placeholder {
  background:
    linear-gradient(180deg, rgba(18, 18, 21, 0.16), rgba(9, 10, 9, 0.78)),
    var(--scene);
}

.theme-detail-copy {
  padding: 2px 0 0;
}

.theme-detail-copy h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(236, 231, 219, 0.08);
}

.theme-description {
  border-left: 1px solid var(--line);
  padding: 2px 0 2px 13px;
}

.theme-description p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.45;
}

.theme-rooms-label {
  margin: 6px 0 -2px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.feeling-card,
.room-card,
.saved-card,
.note-card {
  position: relative;
  width: 100%;
  border: 1px solid rgba(238, 231, 214, 0.075);
  border-radius: 26px;
  background:
    radial-gradient(circle at 24% 0%, rgba(168, 156, 218, 0.07), transparent 56%),
    linear-gradient(145deg, rgba(34, 34, 38, 0.38), rgba(14, 17, 16, 0.42));
  backdrop-filter: blur(18px) saturate(1.04);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--depth-mid);
  transition: transform 520ms cubic-bezier(0.2, 0.85, 0.16, 1), border-color 420ms ease, box-shadow 520ms ease, filter 520ms ease;
}

.feeling-card,
.room-card {
  min-height: 132px;
  padding: 16px;
  overflow: hidden;
  cursor: pointer;
  animation: card-dream-in 620ms ease-out both;
}

.room-card {
  padding: 16px;
  min-height: 132px;
}

.route-discovery-section {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.route-discovery-section h3 {
  margin: 2px 0 0;
  color: rgba(255, 252, 244, 0.82);
  font: 700 15px/1 var(--font-ui);
  letter-spacing: 0.04em;
}

.route-discovery-list {
  display: grid;
  gap: 12px;
}

#rooms-screen .route-discovery-card {
  border-color: rgba(157, 190, 179, 0.2);
  background:
    radial-gradient(circle at 18% -8%, rgba(157, 190, 179, 0.12), transparent 56%),
    linear-gradient(145deg, rgba(29, 44, 40, 0.48), rgba(10, 18, 17, 0.46));
}

.route-discovery-kind {
  position: relative;
  z-index: 1;
  color: rgba(190, 220, 208, 0.86);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.feeling-card:nth-child(3n + 1),
.room-card:nth-child(3n + 1) {
  border-color: rgba(238, 231, 214, 0.095);
  background:
    radial-gradient(circle at 18% -8%, rgba(180, 165, 224, 0.088), transparent 56%),
    linear-gradient(145deg, rgba(37, 36, 41, 0.44), rgba(14, 17, 16, 0.4));
  box-shadow: var(--depth-near);
}

.feeling-card:nth-child(3n + 2),
.room-card:nth-child(3n + 2) {
  margin-top: 4px;
  border-color: rgba(238, 231, 214, 0.058);
  background:
    radial-gradient(circle at 76% 4%, rgba(111, 133, 136, 0.07), transparent 54%),
    linear-gradient(145deg, rgba(29, 31, 33, 0.34), rgba(12, 15, 14, 0.38));
  box-shadow: var(--depth-far);
}

.feeling-card:nth-child(3n),
.room-card:nth-child(3n) {
  margin-top: -2px;
  transform: translateX(2px);
  background:
    radial-gradient(circle at 32% 0%, rgba(154, 137, 188, 0.062), transparent 52%),
    linear-gradient(145deg, rgba(35, 32, 34, 0.38), rgba(14, 17, 16, 0.43));
}

.feeling-card::before,
.room-card::before,
.scene-large::before,
.local-image-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: var(--scene);
  filter: saturate(0.68) contrast(0.92) brightness(0.78) blur(0.35px);
  transform: scale(1.02);
  animation: slow-memory-drift 20s ease-in-out infinite alternate;
}

.room-card:has(.room-card-image)::before {
  opacity: 0;
}

.feeling-card:has(.feeling-card-image)::before {
  opacity: 0;
}

.feeling-card::after,
.room-card::after,
.scene-large::after,
.local-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 0%, rgba(165, 151, 214, 0.16), transparent 48%),
    radial-gradient(circle at 82% 88%, rgba(105, 121, 121, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(16, 17, 18, 0.1), rgba(11, 12, 12, 0.76)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 7px);
  border-radius: inherit;
  pointer-events: none;
}

#studio-screen .studio-room-card::after {
  background: linear-gradient(180deg, transparent 48%, rgba(11, 12, 12, 0.76) 100%);
}

#studio-screen .studio-room-card .room-card-image {
  filter: none;
}

.card-copy {
  position: relative;
  z-index: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.room-card .card-copy {
  min-height: 100px;
  padding: 0;
  background: transparent;
}

.studio-room-card-main {
  position: absolute;
  inset: 0;
  z-index: auto;
  width: 100%;
  height: 100%;
  padding: inherit;
  border: 0;
  border-radius: inherit;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.studio-room-card-main:focus-visible {
  outline: 2px solid rgba(246, 241, 230, 0.72);
  outline-offset: 4px;
}

.studio-card-copy {
  z-index: 4;
  padding-right: 48px;
}

.room-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.66) contrast(0.9) brightness(0.72) blur(0.28px);
  transform: scale(1.015);
  animation: slow-memory-drift 19s ease-in-out infinite alternate;
}

.feeling-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.64) contrast(0.88) brightness(0.7) blur(0.28px);
  transform: scale(1.015);
  animation: slow-memory-drift 21s ease-in-out infinite alternate;
}

.card-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(236, 231, 219, 0.08);
}

.card-copy span {
  color: rgba(219, 215, 202, 0.67);
  font-size: 14px;
  line-height: 1.35;
}

.room-tag {
  display: block;
  margin-bottom: 7px;
  color: rgba(236, 231, 219, 0.42);
  font-family: var(--font-ui);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.tabbar {
  position: absolute;
  left: 50%;
  bottom: 46px;
  z-index: 4;
  width: min(198px, calc(100% - 178px));
  height: 46px;
  gap: 0;
  padding: 0 13px;
  border: 1px solid rgba(236, 231, 219, 0.045);
  border-radius: 999px;
  background: rgba(25, 27, 26, 0.68);
  backdrop-filter: blur(30px) saturate(1.04);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.32),
    0 0 38px rgba(138, 128, 176, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transform: translateX(-50%);
  overflow: hidden;
}

.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 0%, rgba(236, 231, 219, 0.05), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.08));
}

.tabbar[hidden] {
  display: none;
}

body.onboarding-locked #global-tabbar {
  display: none !important;
}

.tab {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: rgba(236, 231, 219, 0.48);
  font-size: 11px;
  line-height: 1.1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  backdrop-filter: none;
  box-shadow: none;
  filter: none;
  transition: transform 320ms cubic-bezier(0.2, 0.85, 0.16, 1), color 260ms ease, opacity 260ms ease;
}

.tab-icon {
  width: 23px;
  height: 23px;
  display: block;
  opacity: 0.64;
  filter: none;
  transition: none;
}

.tab-icon-active {
  display: none;
}

.tab.active {
  color: rgba(255, 255, 255, 0.88);
  background: transparent !important;
  box-shadow: none;
  filter: none;
}

.tab.active .tab-icon-idle {
  display: none;
}

.tab.active .tab-icon-active {
  display: block;
  opacity: 0.92;
  filter: drop-shadow(0 0 6px rgba(236, 231, 219, 0.14));
  animation: none;
}

.room-view {
  display: grid;
  gap: 14px;
}

.scene-large {
  position: relative;
  height: 430px;
  margin: -24px -20px 0;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
  background: #1d221e;
  box-shadow:
    0 26px 82px rgba(0, 0, 0, 0.34),
    0 0 52px rgba(128, 120, 170, 0.075),
    inset 0 -34px 64px rgba(8, 9, 8, 0.38);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, rgba(0, 0, 0, 0.74) 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, rgba(0, 0, 0, 0.74) 88%, transparent 100%);
}

.scene-large:has(.room-image)::before {
  opacity: 0;
}

.room-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.68) contrast(0.9) brightness(0.8) blur(0.22px);
  transform: scale(1.015);
  animation: slow-memory-drift 22s ease-in-out infinite alternate;
  cursor: zoom-in;
}

.image-viewer {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #000;
  color: var(--ink);
  touch-action: none;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  color: rgba(236, 231, 219, 0.62);
  font-size: 12px;
}

.image-viewer-close {
  border: 1px solid rgba(236, 231, 219, 0.16);
  border-radius: var(--radius);
  background: rgba(20, 22, 20, 0.46);
  color: rgba(236, 231, 219, 0.72);
  padding: 8px 10px;
  cursor: pointer;
}

.image-viewer-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.image-viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 120ms ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.image-viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 58px;
  border: 1px solid rgba(236, 231, 219, 0.18);
  border-radius: var(--radius);
  background: rgba(9, 10, 9, 0.54);
  color: rgba(236, 231, 219, 0.76);
  font-size: 26px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.72;
}

.image-viewer-arrow:hover,
.image-viewer-arrow:focus-visible {
  opacity: 1;
  background: rgba(28, 31, 28, 0.72);
}

.image-viewer-arrow[hidden] {
  display: none;
}

.image-viewer-prev {
  left: 14px;
}

.image-viewer-next {
  right: 14px;
}

.studio-cropper {
  position: absolute;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(3, 4, 5, 0.94);
  backdrop-filter: blur(18px);
}

.studio-cropper[hidden] {
  display: none;
}

.studio-cropper-panel {
  width: min(100%, 430px);
  display: grid;
  gap: 18px;
}

.studio-cropper-header {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 8px;
}

.studio-cropper-header h2 {
  margin: 0;
  color: rgba(248, 244, 233, 0.92);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  text-align: center;
}

.studio-cropper-text-button {
  border: 0;
  padding: 10px 0;
  color: rgba(248, 244, 233, 0.68);
  background: transparent;
  font: 500 14px/1 var(--font-ui);
}

.studio-cropper-text-button:last-child {
  color: rgba(248, 244, 233, 0.96);
}

.studio-cropper-stage {
  position: relative;
  width: min(72vw, 294px);
  aspect-ratio: 7 / 10;
  justify-self: center;
  overflow: hidden;
  border-radius: 32px;
  background: #08090a;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6), 0 0 50px rgba(128, 110, 191, 0.12);
  touch-action: none;
  cursor: grab;
}

.studio-cropper-stage:active {
  cursor: grabbing;
}

.studio-cropper-stage > img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  user-select: none;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
}

.studio-cropper-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 33.2%, rgba(255,255,255,0.13) 33.3%, rgba(255,255,255,0.13) 33.6%, transparent 33.7%, transparent 66.4%, rgba(255,255,255,0.13) 66.5%, rgba(255,255,255,0.13) 66.8%, transparent 66.9%),
    linear-gradient(180deg, transparent 33.2%, rgba(255,255,255,0.13) 33.3%, rgba(255,255,255,0.13) 33.6%, transparent 33.7%, transparent 66.4%, rgba(255,255,255,0.13) 66.5%, rgba(255,255,255,0.13) 66.8%, transparent 66.9%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.studio-cropper-zoom {
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  align-items: center;
  gap: 12px;
  width: min(82vw, 340px);
  justify-self: center;
  color: rgba(248, 244, 233, 0.48);
  font: 400 18px/1 var(--font-ui);
}

.studio-cropper-zoom input {
  width: 100%;
  accent-color: rgba(236, 231, 219, 0.88);
}

body.studio-cropper-open #global-tabbar {
  display: none !important;
}

.room-copy,
.field-panel,
.saved-card,
.note-card,
.menu-card,
.more-panel,
.developer-item,
.local-upload {
  border: 1px solid rgba(238, 231, 214, 0.075);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(154, 143, 204, 0.095), transparent 58%),
    linear-gradient(145deg, rgba(27, 28, 32, 0.42), rgba(16, 18, 17, 0.46));
  backdrop-filter: blur(18px) saturate(1.06);
  padding: 15px;
  box-shadow: var(--soft-depth);
}

.room-copy,
.more-panel,
.field-panel {
  box-shadow: var(--depth-near);
}

.saved-card,
.note-card {
  opacity: 0.92;
  box-shadow: var(--depth-mid);
}

.menu-card:nth-child(odd) {
  transform: translateX(-2px);
}

.menu-card:nth-child(even) {
  transform: translateX(3px);
  opacity: 0.88;
}

.room-copy {
  position: relative;
  padding-right: 48px;
}

.menu-card {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border-color: transparent;
  background:
    radial-gradient(circle at 30% 0%, rgba(236, 231, 219, 0.035), transparent 54%),
    rgba(20, 21, 22, 0.14);
  box-shadow: var(--depth-far);
  padding: 4px;
  backdrop-filter: blur(12px);
}

.menu-card strong {
  font-size: 25px;
  font-weight: 400;
  color: rgba(236, 231, 219, 0.88);
  text-shadow: 0 0 14px rgba(236, 231, 219, 0.05);
}

.menu-card span {
  display: none;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.35;
}

.studio-tabs,
.studio-tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 4px 0 14px;
}

.studio-tab,
.studio-tool-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(39, 37, 49, 0.68), rgba(20, 23, 20, 0.58));
  color: var(--dim);
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--soft-depth-small);
}

.studio-tab.active,
.studio-tool-tab.active {
  color: var(--ink);
  background: linear-gradient(145deg, rgba(117, 102, 181, 0.28), rgba(116, 137, 126, 0.15));
}

.studio-status-line {
  display: none;
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 14px;
}

.studio-status-line:not(:empty) {
  display: block;
}

.studio-panel,
.studio-tool-panel {
  display: none;
}

.studio-panel.active,
.studio-tool-panel.active {
  display: grid;
  gap: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.studio-header {
  position: relative;
  align-items: center;
}

.topbar.split.studio-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.topbar.compact.studio-header > div {
  text-align: left;
}

.studio-header h2 {
  margin: 0;
}

.studio-header #studio-back-button {
  position: absolute;
  top: 0;
  left: 0;
}

.studio-header #studio-back-button:not([hidden]) + div {
  padding-left: 56px;
}

.studio-browse,
.studio-tool-body,
.studio-fragment-list,
.studio-room-list,
.studio-route-list {
  display: grid;
  gap: 12px;
}

.studio-browse {
  padding-bottom: var(--app-bottom-scroll-zone);
  scroll-padding-bottom: var(--app-bottom-scroll-zone);
}

.studio-command-bar {
  display: block;
  min-width: 0;
}

.studio-route-toolbar-row {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.studio-route-toolbar-row > h3 {
  order: 2;
  margin: 0;
}

.studio-section-title {
  margin: 0;
  color: rgba(246, 241, 230, 0.82);
  font: 650 17px/1.1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-toolbar-row .studio-command-bar {
  order: 1;
}

.studio-content-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.studio-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
}

.studio-section-eyebrow {
  color: rgba(236, 231, 219, 0.42);
  font: 650 10px/1.1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-room-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.studio-room-controls[hidden],
.studio-filter-field[hidden],
.studio-filter-clear[hidden],
.studio-filter-count[hidden] {
  display: none;
}

.studio-filter-modal {
  display: none;
}

#studio-screen.studio-filter-open .studio-filter-modal {
  display: grid;
}

.studio-room-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.studio-search-placeholder-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  display: grid;
  width: 18px;
  height: 18px;
  color: rgba(170, 169, 158, 0.46);
  pointer-events: none;
  transform: translateY(-50%);
}

.studio-search-placeholder-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.studio-room-search input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 43px;
  border: 1px solid rgba(238, 231, 214, 0.07);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 0%, rgba(154, 145, 199, 0.08), transparent 56%),
    rgba(20, 20, 22, 0.34);
  color: var(--ink);
  font: 600 13px var(--font-ui);
  letter-spacing: 0;
  outline: 0;
  box-shadow: var(--depth-far);
  backdrop-filter: blur(20px) saturate(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
}

.studio-room-search input::placeholder {
  color: rgba(170, 169, 158, 0.46);
}

.studio-room-search:has(input:not(:placeholder-shown)) .studio-search-placeholder-icon {
  display: none;
}

.studio-filter-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 40px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(236, 231, 219, 0.76);
  font: 700 12px var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
  cursor: pointer;
  box-shadow: none;
}

.studio-filter-trigger.active {
  color: rgba(236, 231, 219, 0.96);
  background: transparent;
}

.studio-filter-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.studio-filter-icon svg,
.studio-filter-close svg {
  display: block;
  width: 100%;
  height: 100%;
}

.studio-filter-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: rgba(35, 31, 27, 0.88);
  color: rgba(252, 248, 239, 0.96);
  font-size: 10px;
  line-height: 1;
}

body:not(.layout-desktop) #studio-screen .studio-filter-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body:not(.layout-desktop) #studio-screen .studio-filter-trigger {
  width: 46px;
  padding: 0;
}

body:not(.layout-desktop) #studio-screen .studio-filter-count {
  position: absolute;
  top: 5px;
  right: 4px;
  z-index: 4;
}

#studio-screen .studio-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(5, 6, 7, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.studio-filter-modal-panel {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(100%, 420px);
  max-height: min(680px, calc(100vh - 36px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(247, 239, 222, 0.16);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(31, 32, 31, 0.96), rgba(15, 17, 18, 0.96));
  color: rgba(247, 239, 222, 0.9);
  color-scheme: dark;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.studio-filter-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.studio-filter-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.studio-filter-modal-head h3 {
  margin: 0;
  font: 500 24px/1 var(--font-display);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-filter-close {
  text-decoration: none;
}

.studio-filter-modal-body {
  display: grid;
  gap: 12px;
}

.studio-filter-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: rgba(247, 239, 222, 0.68);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(247, 239, 222, 0.14);
  border-radius: 14px;
  background: rgba(247, 239, 222, 0.08);
  color: rgba(247, 239, 222, 0.92);
  font: 650 13px var(--font-ui);
  letter-spacing: 0;
  color-scheme: dark;
}

.studio-filter-field select option {
  background: #171819;
  color: rgba(247, 239, 222, 0.94);
}

.studio-filter-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(247, 239, 222, 0.58);
  font: 500 17px/1 var(--font-display);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-filter-clear:disabled {
  opacity: 0.38;
}

.studio-filter-apply {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid rgba(247, 239, 222, 0.22);
  border-radius: 999px;
  background: rgba(247, 239, 222, 0.9);
  color: #171513;
  font: 800 13px var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
  cursor: pointer;
}

.room-color-suggestions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 26px;
  color: rgba(247, 239, 222, 0.52);
  font: 650 11px var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.room-color-suggestions[hidden] {
  display: none;
}

.room-color-suggestions button {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(247, 239, 222, 0.16);
  border-radius: 999px;
  background: rgba(247, 239, 222, 0.07);
  color: rgba(247, 239, 222, 0.74);
  font: 750 11px var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-room-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px 10px;
}

.studio-room-list > .empty-state,
.studio-room-list > .more-panel,
.studio-route-list > .studio-route-empty,
.studio-route-list > .studio-route-status {
  grid-column: 1 / -1;
}

.studio-route-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px 10px;
}

.studio-route-empty,
.studio-route-status {
  margin: 0;
  padding: 2px 0 4px;
  color: rgba(236, 231, 219, 0.46);
  font: 550 12px/1.3 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-card {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 2 / 3;
  padding: 10px;
  overflow: visible;
  border-radius: 22px;
}

#studio-screen .studio-room-card,
#studio-screen .studio-route-card {
  animation: none;
}

#studio-screen .studio-room-card.studio-card-enter,
#studio-screen .studio-route-card.studio-card-enter {
  animation: card-dream-in 620ms ease-out both;
}

#studio-screen .studio-room-card::before,
#studio-screen .studio-route-stack-card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgba(8, 10, 11, 0.46);
  opacity: 0;
  filter: none;
  transform: none;
  animation: none;
  pointer-events: none;
  transition: opacity 120ms ease-out;
}

.studio-route-card-preview-only,
.studio-route-card-preview-only .studio-route-card-main {
  cursor: default;
  animation: none !important;
}

#studio-screen .studio-route-card-preview-only .studio-route-stack-card-front::before {
  opacity: 0;
  transition: none;
}

@media (hover: hover) {
  #studio-screen .studio-room-card:hover::before,
  #studio-screen .studio-room-card:focus-within::before,
  #studio-screen .studio-route-card:not(.studio-route-card-preview-only):hover .studio-route-stack-card-front::before,
  #studio-screen .studio-route-card:not(.studio-route-card-preview-only):focus-within .studio-route-stack-card-front::before {
    opacity: 1;
  }
}

.studio-route-card-visual,
.studio-route-stack-card {
  position: absolute;
  inset: 0;
  border-radius: 22px;
}

.studio-route-card-visual {
  overflow: visible;
  pointer-events: none;
}

.studio-route-card-main {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  border-radius: inherit;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: visible;
}

.studio-route-card-main:focus-visible {
  outline: 2px solid rgba(246, 241, 230, 0.72);
  outline-offset: 4px;
}

.studio-route-stack-card {
  z-index: 1;
  border: 1px solid rgba(238, 231, 214, 0.1);
  background: rgba(22, 37, 42, 0.78);
}

.studio-route-stack-card-back-one {
  inset: 0;
  border-color: rgba(238, 231, 214, 0.24);
  background: rgba(112, 132, 132, 0.42);
  transform: translate(8px, 8px);
}

.studio-route-stack-card-back-two {
  inset: 0;
  border-color: rgba(238, 231, 214, 0.2);
  background: rgba(25, 55, 66, 0.92);
  transform: translate(4px, 4px);
}

.studio-route-stack-card-front {
  z-index: 3;
  overflow: hidden;
  border-color: rgba(238, 231, 214, 0.16);
  background: rgba(13, 20, 23, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.studio-route-stack-card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(11, 12, 12, 0.76) 100%);
}

.studio-route-stack-card-front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transform: scale(1.015);
  animation: slow-memory-drift 19s ease-in-out infinite alternate;
}

.studio-route-stack-card-front .studio-route-card-generated-preview {
  position: absolute;
  inset: 0;
  min-height: 0;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  animation: none;
}

.studio-route-stack-card-front .studio-route-card-generated-preview::after {
  display: none;
}

.studio-card-actions {
  position: absolute;
  right: 10px;
  bottom: 12px;
  z-index: 5;
  display: grid;
  gap: 2px;
  justify-items: center;
  opacity: 0;
  transition: opacity 160ms ease;
}

.studio-room-card:hover .studio-card-actions,
.studio-room-card:focus-within .studio-card-actions,
.studio-route-card:hover .studio-route-card-actions,
.studio-route-card:focus-within .studio-route-card-actions {
  opacity: 1;
}

.studio-card-action,
.studio-route-card-action {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(246, 241, 230, 0.78);
  display: grid;
  place-items: center;
  font: inherit;
  cursor: pointer;
}

.studio-card-action svg,
.studio-route-card-action svg {
  display: block;
  width: 22px;
  height: 22px;
}

.studio-card-action:hover,
.studio-card-action:focus-visible,
.studio-route-card-action:hover,
.studio-route-card-action:focus-visible {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
}

.studio-card-action:focus-visible,
.studio-route-card-action:focus-visible {
  outline: 2px solid rgba(246, 241, 230, 0.72);
  outline-offset: 2px;
}

.studio-card-menu,
.studio-route-card-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  display: grid;
  min-width: 150px;
  padding: 5px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 12px;
  background: rgba(11, 16, 15, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.studio-card-menu[hidden],
.studio-route-card-menu[hidden] {
  display: none;
}

.studio-card-menu button,
.studio-route-card-menu button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(246, 241, 230, 0.78);
  font: 700 11px/1 var(--font-ui);
  letter-spacing: 0;
  text-align: left;
  text-transform: lowercase;
}

.studio-card-menu button:hover,
.studio-card-menu button:focus-visible,
.studio-route-card-menu button:hover,
.studio-route-card-menu button:focus-visible {
  background: rgba(246, 241, 230, 0.1);
  color: rgba(255, 255, 255, 0.96);
  outline: none;
}

.studio-route-card-menu {
  min-width: 102px;
}

.studio-route-editor[hidden] {
  display: none;
}

.studio-route-editor {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 4px 0 var(--app-bottom-scroll-zone);
}

.studio-route-editor-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 42px);
}

.studio-route-editor-preview-column {
  position: sticky;
  top: 22px;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.studio-route-editor-card-preview {
  width: min(100%, 250px);
  margin: 0 auto;
}

.studio-route-editor-card-preview .studio-route-card-preview-only {
  pointer-events: none;
}

.studio-route-editor-card-preview .studio-route-card-preview-only .studio-route-card-main {
  pointer-events: none;
}

.studio-route-editor-form {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.studio-route-editor-tabs {
  display: flex;
  align-items: flex-end;
  gap: clamp(16px, 3vw, 28px);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-route-editor-tabs::-webkit-scrollbar {
  display: none;
}

.studio-route-editor-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 0 9px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: rgba(236, 231, 219, 0.52);
  background: transparent;
  font: 700 12px/1.1 var(--font-ui);
  letter-spacing: 0;
  cursor: pointer;
}

.studio-route-editor-tab:hover,
.studio-route-editor-tab:focus-visible,
.studio-route-editor-tab[aria-selected="true"] {
  color: rgba(247, 243, 232, 0.92);
  outline: none;
}

.studio-route-editor-tab[aria-selected="true"] {
  border-bottom-color: rgba(247, 243, 232, 0.86);
}

.studio-route-editor-panel[hidden] {
  display: none;
}

.studio-route-editor-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(236, 231, 219, 0.11);
  border-radius: 18px;
  background: rgba(18, 25, 27, 0.52);
}

.studio-route-editor-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.studio-route-editor-section-head > div {
  min-width: 0;
}

.studio-route-editor-section-head .studio-section-eyebrow {
  margin: 0 0 4px;
}

.studio-route-editor-section h3 {
  margin: 0;
  color: rgba(247, 243, 232, 0.9);
  font: 750 17px/1.1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-editor-helper {
  margin: -3px 0 0;
  color: rgba(236, 231, 219, 0.52);
  font: 550 12px/1.4 var(--font-ui);
  letter-spacing: 0;
}

.studio-route-visibility-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.studio-route-visibility-option {
  display: grid;
  grid-template-columns: 20px 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(236, 231, 219, 0.11);
  border-radius: 14px;
  color: rgba(236, 231, 219, 0.7);
  background: rgba(4, 7, 9, 0.22);
  cursor: pointer;
}

.studio-route-visibility-option:hover {
  border-color: rgba(236, 231, 219, 0.22);
  background: rgba(236, 231, 219, 0.06);
}

.studio-route-visibility-option.selected {
  border-color: rgba(247, 243, 232, 0.36);
  background: rgba(236, 231, 219, 0.08);
}

.studio-route-visibility-option.disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.studio-route-visibility-radio {
  appearance: none;
  width: 19px;
  height: 19px;
  margin: 0;
  border: 1.5px solid rgba(236, 231, 219, 0.52);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.studio-route-visibility-radio:checked {
  border-color: rgba(247, 243, 232, 0.94);
  background: radial-gradient(circle, rgba(247, 243, 232, 0.94) 0 4px, transparent 4.5px);
}

.studio-route-visibility-radio:focus-visible {
  outline: 2px solid rgba(247, 243, 232, 0.76);
  outline-offset: 3px;
}

.studio-route-visibility-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 243, 232, 0.72);
}

.studio-route-visibility-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.studio-route-visibility-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.studio-route-visibility-copy strong {
  color: rgba(247, 243, 232, 0.9);
  font: 700 12px/1.2 var(--font-ui);
}

.studio-route-visibility-copy span {
  color: rgba(236, 231, 219, 0.54);
  font: 550 11px/1.35 var(--font-ui);
}

.studio-route-editor-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: rgba(236, 231, 219, 0.6);
  font: 700 10px/1.1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-editor-field small {
  color: rgba(236, 231, 219, 0.42);
  font-size: inherit;
  font-weight: 600;
}

.studio-route-editor-field input,
.studio-route-editor-field textarea {
  width: 100%;
  min-width: 0;
  border-color: rgba(236, 231, 219, 0.14);
  color: rgba(247, 243, 232, 0.92);
  background: rgba(4, 7, 9, 0.38);
  font: 600 13px/1.35 var(--font-ui);
}

.studio-route-editor-field input {
  height: 42px;
}

.studio-route-editor-field textarea {
  min-height: 96px;
  padding: 12px 14px;
  border-radius: 16px;
  resize: vertical;
}

.studio-route-editor-field input:focus-visible,
.studio-route-editor-field textarea:focus-visible {
  border-color: rgba(247, 243, 232, 0.42);
  outline: none;
}

.studio-route-editor-room-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.studio-route-editor-room-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(236, 231, 219, 0.08);
}

.studio-route-editor-room-row:last-child {
  border-bottom: 0;
}

.studio-route-editor-room-row > img,
.studio-route-editor-room-placeholder {
  width: 42px;
  height: 54px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(236, 231, 219, 0.08);
}

.studio-route-editor-room-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.studio-route-editor-room-copy strong,
.studio-route-editor-room-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-route-editor-room-copy strong {
  color: rgba(246, 241, 230, 0.82);
  font: 700 12px/1.2 var(--font-ui);
}

.studio-route-editor-room-copy span {
  color: rgba(236, 231, 219, 0.46);
  font: 550 10px/1.2 var(--font-ui);
}

.studio-route-editor-room-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.studio-route-editor-map-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}

.studio-route-editor-map-button svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.studio-route-editor-rooms-actions {
  position: relative;
  justify-self: start;
}

.studio-route-editor-rooms-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 3px;
  width: max-content;
  min-width: 166px;
  max-width: min(260px, calc(100vw - 32px));
  padding: 5px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 12px;
  background: rgba(15, 22, 24, 0.98);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.studio-route-editor-rooms-menu[hidden] {
  display: none;
}

.studio-route-editor-rooms-menu button {
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(246, 241, 230, 0.76);
  background: transparent;
  font: 650 11px/1.2 var(--font-ui);
  text-align: left;
  cursor: pointer;
}

.studio-route-editor-rooms-menu button:hover,
.studio-route-editor-rooms-menu button:focus-visible {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(246, 241, 230, 0.1);
  outline: none;
}

.studio-route-editor-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-route-editor-connections span {
  padding: 6px 9px;
  border: 1px solid rgba(236, 231, 219, 0.1);
  border-radius: 999px;
  color: rgba(246, 241, 230, 0.66);
  background: rgba(4, 7, 9, 0.24);
  font: 650 10px/1.1 var(--font-ui);
}

.studio-route-editor-validation {
  display: grid;
  gap: 6px;
  min-height: 20px;
  color: rgba(236, 231, 219, 0.58);
  font: 600 11px/1.35 var(--font-ui);
}

.studio-route-editor-validation p,
.studio-route-editor-validation ul {
  margin: 0;
}

.studio-route-editor-validation ul {
  display: grid;
  gap: 4px;
  padding-left: 16px;
}

.studio-route-editor-warning {
  color: rgba(230, 207, 157, 0.72);
}

.studio-route-editor-valid {
  color: rgba(190, 216, 197, 0.8);
}

.studio-route-editor-footer {
  display: flex;
  justify-content: flex-end;
  padding: 2px 0 22px;
}

@media (max-width: 820px), (pointer: coarse) {
  .studio-route-editor {
    padding-top: 0;
  }

  .studio-route-editor-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .studio-route-editor-preview-column {
    position: static;
  }

  .studio-route-editor-card-preview {
    width: min(220px, 58vw);
  }

  .studio-route-editor-section {
    padding: 15px;
    border-radius: 16px;
  }

  .studio-route-visibility-option {
    align-items: flex-start;
    padding: 11px;
  }

  .studio-route-visibility-copy span {
    white-space: normal;
  }

  .studio-route-editor-tabs {
    gap: 18px;
  }

  .studio-route-editor-room-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .studio-route-editor-room-row > img,
  .studio-route-editor-room-placeholder {
    width: 38px;
    height: 50px;
  }

  .studio-route-editor-room-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.studio-room-editor-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(3, 4, 4, 0);
  backdrop-filter: none;
}

.studio-room-editor-overlay.open {
  background: rgba(3, 4, 4, 0.58);
  backdrop-filter: blur(10px) saturate(0.86);
}

.studio-room-editor-panel {
  width: min(520px, 36vw);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid rgba(236, 231, 219, 0.12);
  background:
    radial-gradient(circle at 10% 0%, rgba(124, 123, 177, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(21, 23, 25, 0.98), rgba(11, 14, 15, 0.98));
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.34), inset 1px 0 0 rgba(255, 255, 255, 0.035);
  transform: translateX(100%);
  transition: transform 190ms ease;
}

.studio-room-editor-overlay.open .studio-room-editor-panel {
  transform: translateX(0);
}

.studio-room-editor-header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  min-height: 76px;
  padding: max(14px, env(safe-area-inset-top)) 24px 12px;
  border-bottom: 1px solid rgba(236, 231, 219, 0.11);
}

.studio-room-editor-header h2 {
  margin: 0;
  color: rgba(247, 243, 232, 0.94);
  font: 750 22px/1 var(--font-ui);
  text-align: center;
}

.studio-room-editor-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(247, 243, 232, 0.84);
  box-shadow: none;
}

.studio-room-editor-close svg {
  width: 24px;
  height: 24px;
}

.studio-room-editor-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 231, 219, 0.28) transparent;
  padding: 24px 26px 34px;
}

.studio-room-editor-form > #studio-room-form {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 0;
}

.studio-room-editor-form > #studio-room-form > .room-ritual-head,
.studio-room-editor-form > #studio-room-form > .room-ritual-preview {
  display: none;
}

.studio-room-editor-form > #studio-room-form .room-ritual-step:not([hidden]) {
  display: grid;
  animation: none;
}

.studio-room-editor-form > #studio-room-form .room-ritual-step h3 {
  color: rgba(247, 243, 232, 0.9);
  font: 750 17px/1.1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-room-editor-form > #studio-room-form .room-ritual-copy {
  color: rgba(236, 231, 219, 0.52);
  font: 550 12px/1.4 var(--font-ui);
}

.studio-room-editor-form > #studio-room-form .room-ritual-actions,
.studio-room-editor-form > #studio-room-form #room-ritual-next-button,
.studio-room-editor-form > #studio-room-form #room-ritual-back-button,
.studio-room-editor-form > #studio-room-form #studio-submit-room-button,
.studio-room-editor-form > #studio-room-form #studio-reset-room-button {
  display: none !important;
}

.studio-room-editor-form > #studio-room-form .studio-submission-list,
.studio-room-editor-form > #studio-room-form .room-ritual-step:not(.studio-room-editor-field-panel) {
  display: none !important;
}

.studio-room-editor-form > #studio-room-form .studio-room-editor-field-panel {
  border-radius: 18px;
}

.studio-room-editor-more-options {
  margin-top: 24px;
  border-top: 1px solid rgba(236, 231, 219, 0.1);
  border-bottom: 1px solid rgba(236, 231, 219, 0.1);
}

.studio-room-editor-more-options-toggle {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 252, 244, 0.72);
  font: 800 11px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: lowercase;
}

.studio-room-editor-more-options.open .room-mood-chevron {
  transform: rotate(225deg);
}

.studio-room-editor-more-options-toggle:focus-visible {
  outline: 2px solid rgba(255, 252, 244, 0.68);
  outline-offset: 3px;
  border-radius: 8px;
}

.studio-room-editor-more-options-body {
  display: grid;
  gap: 14px;
  padding: 0 0 18px;
}

.studio-room-editor-more-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  color: rgba(255, 252, 244, 0.5);
  font: 800 11px/1.1 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.studio-room-editor-more-options-body .room-mood-axis-list {
  gap: 12px;
}

.studio-room-editor-more-options-body .room-mood-axis {
  gap: 5px;
  padding-bottom: 10px;
}

.studio-room-editor-more-options-body .room-mood-axis-top span {
  font-size: 12px;
}

.studio-room-editor-more-options-body .room-mood-axis input[type="range"] {
  width: min(100%, 250px);
  height: 30px;
}

.studio-room-editor-actions {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 26px max(18px, calc(env(safe-area-inset-bottom) + 10px));
  border-top: 1px solid rgba(236, 231, 219, 0.11);
  background: rgba(9, 11, 12, 0.88);
}

.studio-room-editor-actions .soft-button {
  min-width: 96px;
}

.studio-room-release-panel {
  width: min(520px, calc(100vw - 56px));
}

.studio-room-release-panel h2 {
  margin: 0;
}

body.device-mobile:not(.layout-desktop) .studio-room-editor-panel,
body.layout-phone-preview:not(.layout-desktop) .studio-room-editor-panel {
  width: 100%;
  border-left: 0;
  box-shadow: none;
}

body.device-mobile:not(.layout-desktop) .studio-room-editor-header,
body.layout-phone-preview:not(.layout-desktop) .studio-room-editor-header {
  min-height: 68px;
  padding-right: 18px;
  padding-left: 18px;
}

body.device-mobile:not(.layout-desktop) .studio-room-editor-scroll,
body.layout-phone-preview:not(.layout-desktop) .studio-room-editor-scroll {
  padding: 18px 18px 26px;
}

body.device-mobile:not(.layout-desktop) .studio-room-editor-actions,
body.layout-phone-preview:not(.layout-desktop) .studio-room-editor-actions {
  padding-right: 18px;
  padding-left: 18px;
}

.studio-panel-title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 400;
  text-align: center;
}

.studio-tools {
  position: absolute;
  top: 24px;
  right: 20px;
  z-index: 20;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  filter: none;
}

.studio-tool-body[hidden] {
  display: none;
}

.studio-tools[hidden] {
  display: none;
}

.studio-tools .studio-tool-tabs {
  grid-template-columns: repeat(3, 42px);
  margin: 0;
  gap: 10px;
}

.studio-tools .studio-tool-tab {
  width: 42px;
  min-height: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(236, 231, 219, 0.1);
  color: rgba(236, 231, 219, 0.88);
  background:
    radial-gradient(circle at 42% 26%, rgba(236, 231, 219, 0.12), transparent 54%),
    rgba(9, 38, 48, 0.54);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.08);
  transition: transform 220ms ease, color 220ms ease, background 260ms ease, box-shadow 260ms ease;
}

.studio-tools .studio-tool-tab svg {
  width: 22px;
  height: 22px;
}

.studio-tools .studio-tool-tab span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.studio-tools .studio-tool-tab:hover,
.studio-tools .studio-tool-tab:focus-visible,
.studio-tools .studio-tool-tab.active {
  color: rgba(255, 255, 255, 0.94);
  background:
    radial-gradient(circle at 42% 26%, rgba(236, 231, 219, 0.16), transparent 54%),
    rgba(12, 44, 54, 0.6);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28), 0 0 18px rgba(236, 231, 219, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.studio-tools .studio-tool-tab:active {
  transform: translateY(1px) scale(0.97);
}

.studio-add-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 42;
  width: min(190px, calc(100vw - 28px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 16px;
  background: rgba(11, 16, 15, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.studio-add-menu[hidden] {
  display: none;
}

.studio-add-menu button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: rgba(246, 241, 230, 0.82);
  background: transparent;
  font: 700 13px/1 var(--font-ui);
  letter-spacing: 0;
  text-align: left;
  text-transform: lowercase;
}

.studio-add-menu button:hover,
.studio-add-menu button:focus-visible {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(246, 241, 230, 0.1);
  outline: none;
}

body.layout-desktop #studio-screen .studio-tools #studio-add-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
}

body.layout-desktop #studio-screen .studio-tools #studio-add-button svg {
  display: block;
  width: 16px;
  height: 16px;
}

body.layout-desktop #studio-screen .studio-tools #studio-add-button span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.studio-route-creation-panel {
  position: absolute;
  top: max(88px, calc(env(safe-area-inset-top) + 72px));
  right: max(16px, env(safe-area-inset-right));
  z-index: 12;
  width: min(310px, calc(100% - 32px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(236, 231, 219, 0.16);
  border-radius: 24px;
  color: rgba(246, 243, 232, 0.9);
  background:
    linear-gradient(180deg, rgba(32, 37, 43, 0.96), rgba(9, 14, 18, 0.96)),
    rgba(9, 14, 18, 0.96);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  pointer-events: auto;
}

.studio-route-creation-panel[hidden] {
  display: none;
}

.studio-route-creation-head,
.studio-route-creation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.studio-route-creation-head h3 {
  margin: 0;
  color: rgba(247, 243, 232, 0.9);
  font: 800 18px/1.08 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-creation-copy,
.studio-route-creation-count,
.studio-route-creation-status,
.studio-route-creation-hint {
  margin: 0;
  color: rgba(236, 231, 219, 0.58);
  font: 650 12px/1.35 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-creation-count {
  color: rgba(246, 243, 232, 0.82);
}

.studio-route-creation-methods,
.studio-route-creation-images,
#studio-route-creation-form {
  display: grid;
  gap: 10px;
}

.studio-route-creation-methods button {
  width: 100%;
  text-align: left;
}

.studio-route-creation-methods button[aria-pressed="true"] {
  color: rgba(255, 250, 240, 0.96);
  background: rgba(236, 231, 219, 0.14);
}

.studio-route-creation-images[hidden],
.studio-route-creation-hint[hidden] {
  display: none;
}

#studio-route-images {
  display: none;
}

#studio-route-image-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 2px 5px;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

#studio-route-image-list[hidden] {
  display: none;
}

.studio-route-image-card-shell {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  min-width: 64px;
  height: 88px;
}

.studio-route-image-card {
  display: block;
  width: 64px;
  height: 88px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 214, 0.075);
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 0%, rgba(154, 143, 204, 0.08), transparent 54%),
    rgba(24, 27, 25, 0.44);
  backdrop-filter: blur(16px) saturate(1.04);
  box-shadow: var(--soft-depth-small);
  cursor: pointer;
}

.studio-route-image-card.active {
  border-color: rgba(236, 231, 219, 0.64);
  box-shadow: 0 0 0 2px rgba(236, 231, 219, 0.12), var(--soft-depth-small);
}

.studio-route-image-card:focus-visible {
  outline: 1px solid rgba(236, 231, 219, 0.72);
  outline-offset: 3px;
}

.studio-route-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  filter: saturate(0.7) contrast(0.9) brightness(0.82) blur(0.2px);
}

.studio-route-image-delete {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 1;
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
}

.studio-route-image-card-shell .studio-card-menu {
  top: 6px;
  right: 4px;
  bottom: auto;
  z-index: 4;
  min-width: 106px;
}

.studio-route-creation-status {
  min-height: 16px;
  color: rgba(236, 231, 219, 0.52);
}

.studio-route-creation-field {
  display: grid;
  gap: 6px;
  color: rgba(236, 231, 219, 0.54);
  font: 700 10px/1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.studio-route-creation-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 999px;
  color: rgba(247, 243, 232, 0.92);
  background: rgba(4, 7, 9, 0.42);
  font: 650 13px/1 var(--font-ui);
  letter-spacing: 0;
  outline: 0;
}

.studio-route-creation-field input:focus-visible {
  border-color: rgba(247, 243, 232, 0.44);
}

.studio-route-creation-field input::placeholder {
  color: rgba(236, 231, 219, 0.32);
}

.studio-route-creation-actions {
  justify-content: flex-end;
}

.studio-route-creation-submit:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.studio-route-method-sheet,
.studio-route-batch-sheet {
  width: min(100%, 520px);
}

.studio-route-method-sheet {
  gap: 14px;
}

.studio-route-method-sheet h2,
.studio-route-batch-head h2,
.studio-route-batch-step h3 {
  margin: 0;
  color: rgba(255, 252, 244, 0.94);
  font: 700 24px/1.05 var(--font-ui);
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.studio-route-method-sheet p,
.studio-route-batch-head p,
.studio-route-batch-helper {
  margin: 0;
  color: rgba(236, 231, 219, 0.54);
  font: 500 13px/1.35 var(--font-ui);
}

.studio-route-method-options,
.studio-route-batch-step,
.studio-route-batch-form,
.studio-route-batch-head {
  display: grid;
  gap: 12px;
}

.studio-route-method-options .soft-button {
  width: 100%;
  min-height: 44px;
  text-align: left;
}

.studio-route-batch-sheet {
  gap: 16px;
}

#studio-route-batch-sheet.connections-active {
  width: auto;
}

#studio-route-batch-sheet.connections-active .studio-route-batch-sheet {
  width: min(780px, calc(100vw - 56px));
}

.studio-route-batch-backdrop {
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 5vh, 56px) clamp(18px, 5vw, 72px);
}

.studio-route-batch-backdrop.open {
  background: rgba(3, 4, 4, 0.58);
  backdrop-filter: blur(12px) saturate(0.86);
}

.studio-route-batch-backdrop .app-bottom-sheet {
  width: min(520px, calc(100vw - 36px));
  max-height: min(760px, calc(var(--app-vh, 100dvh) - 56px));
  padding: 54px clamp(22px, 3vw, 36px) 34px;
  border-radius: 28px;
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.52),
    0 0 72px rgba(236, 231, 219, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transform: translateY(8px) scale(0.985);
  transition: transform 190ms ease, opacity 190ms ease;
  touch-action: auto;
}

.studio-route-batch-backdrop.open .app-bottom-sheet {
  transform: translateY(0) scale(1);
}

body.layout-desktop .studio-route-batch-backdrop,
body:not(.layout-desktop) .studio-route-batch-backdrop {
  position: fixed;
  align-items: center;
  justify-content: center;
}

body.layout-desktop .studio-route-batch-backdrop.open,
body:not(.layout-desktop) .studio-route-batch-backdrop.open {
  background: rgba(3, 4, 4, 0.58);
  backdrop-filter: blur(12px) saturate(0.86);
}

.studio-route-batch-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.studio-route-batch-head-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.studio-route-batch-upload-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

.studio-route-batch-upload-button svg {
  width: 20px;
  height: 20px;
}

.studio-route-batch-step[hidden],
.studio-route-batch-actions [hidden] {
  display: none;
}

.upload-box.studio-route-dropzone {
  min-height: 150px;
  gap: 7px;
  padding: 24px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.studio-route-upload-icon {
  width: 26px;
  height: 26px;
  color: currentColor;
}

.studio-route-dropzone span {
  color: rgba(255, 252, 244, 0.88);
  font: 700 15px/1.2 var(--font-ui);
}

.studio-route-dropzone small {
  max-width: 40ch;
  color: rgba(236, 231, 219, 0.48);
  font: 500 11px/1.35 var(--font-ui);
}

.studio-route-browse-files {
  margin-top: 4px;
}

.studio-route-dropzone.drag-over {
  border-color: rgba(236, 231, 219, 0.7);
  background: rgba(236, 231, 219, 0.12);
  box-shadow: 0 0 0 3px rgba(236, 231, 219, 0.08);
}

.studio-route-batch-count,
.studio-route-batch-status {
  min-height: 16px;
  margin: 0;
  color: rgba(236, 231, 219, 0.58);
  font: 650 12px/1.35 var(--font-ui);
  text-transform: lowercase;
}

.studio-route-batch-count {
  color: rgba(246, 243, 232, 0.82);
}

.studio-route-batch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .studio-route-method-sheet,
  .studio-route-batch-sheet {
    width: 100%;
  }

  .studio-route-batch-backdrop {
    padding: max(18px, calc(env(safe-area-inset-top) + 18px)) 18px max(18px, calc(env(safe-area-inset-bottom) + 18px));
  }

  .studio-route-batch-backdrop .app-bottom-sheet {
    width: min(100%, calc(100vw - 36px));
    max-height: calc(100dvh - max(36px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 36px));
  }
}

.studio-route-batch-map {
  position: relative;
  width: 100%;
  min-height: 300px;
  height: min(var(--studio-route-batch-map-height, 460px), calc(var(--app-vh, 100dvh) - 300px));
  overflow: hidden;
  border: 1px solid rgba(236, 231, 219, 0.08);
  border-radius: 16px;
  outline: none;
  background:
    radial-gradient(circle at 22% 16%, rgba(143, 127, 202, 0.16), transparent 22rem),
    radial-gradient(circle at 74% 68%, rgba(70, 125, 112, 0.12), transparent 24rem),
    radial-gradient(circle at 48% 44%, rgba(236, 231, 219, 0.055), transparent 18rem),
    linear-gradient(180deg, rgba(4, 6, 9, 0.98), rgba(10, 15, 18, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.24);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.studio-route-batch-map:active {
  cursor: grabbing;
}

.studio-route-batch-map * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.studio-route-batch-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, transparent 44%, rgba(0, 0, 0, 0.46));
  background-size: 19px 19px, 23px 23px, 100% 100%;
  opacity: 0.12;
  mix-blend-mode: screen;
}

.studio-route-batch-map:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 250, 240, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.24);
}

.studio-route-batch-map-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 640px;
  transform-origin: 0 0;
}

.studio-route-batch-map .studio-map-links,
.studio-route-batch-map .studio-map-nodes {
  width: 960px;
  height: 640px;
}

.studio-route-batch-map .studio-map-link.selected {
  stroke: rgba(255, 250, 240, 0.92);
  stroke-width: 18px;
}

.studio-route-batch-map-controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.studio-route-batch-map-controls .studio-map-tool {
  flex: 0 0 auto;
}

#room-note-button .room-action-outline,
#room-note-button .room-action-solid {
  display: none;
}

#room-note-button .room-action-clipboard {
  display: block;
}

.studio-map-editor.route-selection-active .studio-map-tools {
  pointer-events: none;
  opacity: 0.35;
}

.studio-map-editor.route-selection-active .studio-map-search-button {
  display: none;
}

.studio-map-editor {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: max(74px, calc(env(safe-area-inset-top) + 58px)) minmax(0, 1fr) max(70px, calc(env(safe-area-inset-bottom) + 52px));
  overflow: hidden;
  color: rgba(246, 243, 232, 0.92);
  background:
    radial-gradient(circle at 22% 16%, rgba(143, 127, 202, 0.16), transparent 22rem),
    radial-gradient(circle at 74% 68%, rgba(70, 125, 112, 0.12), transparent 24rem),
    radial-gradient(circle at 48% 44%, rgba(236, 231, 219, 0.055), transparent 18rem),
    linear-gradient(180deg, rgba(4, 6, 9, 0.98), rgba(10, 15, 18, 0.98));
}

.studio-map-editor[hidden] {
  display: none;
  pointer-events: none;
}

.studio-browse[hidden],
.studio-tools[hidden],
.studio-tool-body[hidden],
.studio-map-search-panel[hidden] {
  pointer-events: none;
}

.studio-map-editor::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, transparent 44%, rgba(0, 0, 0, 0.46));
  background-size: 19px 19px, 23px 23px, 100% 100%;
  opacity: 0.12;
  mix-blend-mode: screen;
}

.studio-map-editor::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.55px, transparent 0.55px);
  background-size: 5px 5px;
  opacity: 0.05;
}

.studio-map-bar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-color: rgba(236, 231, 219, 0.08);
  background: rgba(5, 8, 11, 0.58);
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.26);
}

.studio-map-topbar {
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(236, 231, 219, 0.08);
}

.studio-map-bottombar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(236, 231, 219, 0.08);
}

.studio-map-pathway-backdrop {
  z-index: 82;
  align-items: center;
  padding:
    max(22px, env(safe-area-inset-top))
    20px
    max(22px, env(safe-area-inset-bottom));
}

.studio-map-pathway-backdrop.open {
  background: rgba(3, 4, 4, 0.54);
  backdrop-filter: blur(10px) saturate(0.88);
}

.studio-map-pathway-editor.app-bottom-sheet {
  width: min(420px, calc(100vw - 40px));
  max-height: min(520px, calc(var(--app-vh, 100dvh) - max(44px, env(safe-area-inset-top)) - max(44px, env(safe-area-inset-bottom))));
  gap: 14px;
  padding: 54px 24px 24px;
  border-radius: 28px;
  overflow-y: auto;
  scroll-padding-bottom: 24px;
}

.studio-map-pathway-editor.app-bottom-sheet::before {
  display: none;
}

body.layout-desktop .studio-map-pathway-editor.app-bottom-sheet {
  width: min(420px, calc(100vw - 56px));
}

.studio-map-pathway-editor-head,
.studio-map-pathway-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.studio-map-pathway-editor-head h3 {
  margin: 0;
  overflow: hidden;
  color: rgba(247, 243, 232, 0.84);
  font: 800 18px/1.08 var(--font-ui);
  text-overflow: ellipsis;
  text-transform: lowercase;
  white-space: nowrap;
}

.studio-map-pathway-editor p {
  margin: 0;
  overflow: hidden;
  color: rgba(236, 231, 219, 0.58);
  font: 700 12px/1.3 var(--font-ui);
  text-overflow: ellipsis;
  text-transform: lowercase;
  white-space: nowrap;
}

.studio-map-pathway-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.studio-map-pathway-field span {
  overflow: hidden;
  color: rgba(236, 231, 219, 0.52);
  font: 700 9px/1 var(--font-ui);
  text-overflow: ellipsis;
  text-transform: lowercase;
  white-space: nowrap;
}

.studio-map-pathway-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 999px;
  color: rgba(247, 243, 232, 0.9);
  background: rgba(4, 7, 9, 0.42);
  font: 600 14px/1 var(--font-ui);
}

.studio-map-pathway-field input::placeholder {
  color: rgba(236, 231, 219, 0.34);
}

.studio-map-pathway-actions {
  justify-content: flex-end;
}

.studio-map-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-map-tool,
.studio-map-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 50%;
  color: rgba(236, 231, 219, 0.8);
  background:
    radial-gradient(circle at 42% 24%, rgba(236, 231, 219, 0.13), transparent 58%),
    rgba(20, 27, 35, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.studio-map-tool svg,
.studio-map-icon-button svg {
  display: block;
  width: 21px;
  height: 21px;
}

.studio-map-tool[data-map-mode="edit"] svg {
  transform: translateX(1px);
}

.studio-map-tool.active {
  color: #fffaf0;
  border-color: rgba(255, 250, 240, 0.34);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 250, 240, 0.22), transparent 62%),
    rgba(54, 59, 82, 0.78);
  box-shadow: 0 0 28px rgba(236, 231, 219, 0.12), 0 20px 52px rgba(0, 0, 0, 0.32);
}

@media (max-width: 620px) {
  .studio-map-pathway-editor.app-bottom-sheet {
    width: min(100%, 420px);
    max-height: calc(var(--app-vh, 100dvh) - max(34px, env(safe-area-inset-top)) - max(34px, env(safe-area-inset-bottom)));
    padding: 54px 22px max(24px, calc(env(safe-area-inset-bottom) + 18px));
  }
}

.studio-map-canvas {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.studio-map-canvas *,
.studio-map-world *,
.studio-map-node * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.studio-map-pull-refresh {
  position: absolute;
  top: -58px;
  left: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  opacity: 0;
  border-radius: 50%;
  background: rgba(7, 9, 11, 0.42);
  box-shadow: inset 0 0 0 1px rgba(246, 243, 232, 0.08), 0 18px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.studio-map-pull-refresh.visible {
  opacity: 1;
}

.app-pull-refresh {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  z-index: 155;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(8, 10, 10, 0.42);
  backdrop-filter: blur(14px) saturate(0.88);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translate(-50%, 0);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.app-pull-refresh.visible {
  opacity: 1;
}

.studio-map-pull-refresh .that-dream-loader,
.app-pull-refresh .that-dream-loader {
  opacity: 0.7;
  transform: scale(0.9);
  transition: opacity 160ms ease, transform 160ms ease;
}

.studio-map-pull-refresh.ready .that-dream-loader,
.studio-map-pull-refresh.refreshing .that-dream-loader,
.app-pull-refresh.ready .that-dream-loader,
.app-pull-refresh.refreshing .that-dream-loader {
  opacity: 1;
  transform: scale(1);
}

.studio-map-canvas:active {
  cursor: grabbing;
}

.studio-map-search-button {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 76px));
  z-index: 6;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 999px;
  color: rgba(246, 243, 232, 0.84);
  background:
    radial-gradient(circle at 42% 24%, rgba(236, 231, 219, 0.16), transparent 58%),
    rgba(13, 19, 24, 0.74);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.08);
}

.studio-map-search-button svg {
  width: 22px;
  height: 22px;
}

.studio-map-search-panel {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: max(34px, calc(env(safe-area-inset-top) + 28px)) 18px 18px;
  background:
    linear-gradient(180deg, rgba(2, 4, 6, 0.76), rgba(2, 4, 6, 0.2) 52%, transparent),
    rgba(2, 4, 6, 0.18);
  backdrop-filter: blur(6px);
}

.studio-map-search-shell {
  width: min(100%, 430px);
  max-height: min(58dvh, 520px);
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(246, 243, 232, 0.08), rgba(8, 11, 14, 0.78)),
    rgba(8, 11, 14, 0.76);
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.05);
}

.studio-map-search-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.studio-map-search-row input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: rgba(255, 252, 244, 0.9);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 15px;
}

.studio-map-search-row input::placeholder {
  color: rgba(255, 252, 244, 0.34);
}

.studio-map-search-row button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 252, 244, 0.72);
  background: rgba(5, 7, 8, 0.36);
  font-size: 25px;
  line-height: 1;
}

.studio-map-search-results {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.studio-map-search-result {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 13px 14px;
  border: 0;
  border-radius: 20px;
  color: rgba(255, 252, 244, 0.86);
  background: rgba(255, 255, 255, 0.052);
  text-align: left;
}

.studio-map-search-result strong {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.studio-map-search-result span,
.studio-map-search-empty {
  color: rgba(255, 252, 244, 0.48);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.35;
}

.studio-map-search-empty {
  padding: 18px 6px 10px;
  text-align: center;
}

.studio-map-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 2600px;
  height: 2600px;
  transform-origin: 0 0;
}

.studio-map-links,
.studio-map-nodes {
  position: absolute;
  inset: 0;
  width: 2600px;
  height: 2600px;
  overflow: visible;
}

.studio-map-link {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  pointer-events: stroke;
}

.studio-map-link.two-way {
  stroke-width: 13px;
  filter: drop-shadow(0 0 18px rgba(236, 231, 219, 0.08));
}

.studio-map-link.working-route {
  stroke: var(--studio-map-working-color);
}

.studio-map-link.unused {
  stroke: var(--studio-map-unused-color);
}

.room-release-section {
  margin-top: 16px;
}

.room-release-section p,
.room-release-section ul {
  margin: 0;
  color: rgba(236, 231, 219, 0.62);
  font: 550 12px/1.45 var(--font-ui);
}

.room-release-section ul {
  padding-left: 18px;
}

.studio-map-node {
  --studio-map-node-padding: 8px;
  --studio-map-thumbnail-radius: 8px;
  position: absolute;
  width: 114px;
  height: 149px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: var(--studio-map-node-padding);
  border: 1px solid rgba(236, 231, 219, 0.22);
  border-radius: calc(var(--studio-map-thumbnail-radius) + var(--studio-map-node-padding));
  color: rgba(255, 252, 244, 0.92);
  background:
    linear-gradient(180deg, rgba(33, 37, 48, 0.84), rgba(11, 15, 19, 0.82)),
    radial-gradient(circle at 44% 24%, rgba(236, 231, 219, 0.16), transparent 64%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  cursor: grab;
  touch-action: none;
}

.studio-map-node-thumbnail {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: var(--studio-map-thumbnail-radius);
  background: rgba(8, 11, 14, 0.72);
  pointer-events: none;
}

.studio-map-node-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.studio-map-node-title {
  display: -webkit-box;
  min-width: 0;
  max-width: 100%;
  max-height: 28px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 14px;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.studio-map-node.selected,
.studio-map-node.pending {
  border-color: rgba(255, 250, 240, 0.54);
  box-shadow: 0 0 34px rgba(236, 231, 219, 0.2), 0 28px 72px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.studio-map-node.pending {
  outline: 1px solid rgba(255, 250, 240, 0.36);
  outline-offset: 5px;
}

.studio-map-node.route-selected {
  border-color: rgba(255, 250, 240, 0.78);
  background:
    linear-gradient(180deg, rgba(75, 83, 101, 0.9), rgba(20, 28, 35, 0.9)),
    radial-gradient(circle at 44% 24%, rgba(255, 250, 240, 0.2), transparent 64%);
  box-shadow: 0 0 0 3px rgba(255, 250, 240, 0.18), 0 26px 62px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.studio-map-node.route-unavailable {
  cursor: not-allowed;
  opacity: 0.38;
}

.studio-map-node-check {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.64);
  border-radius: 999px;
  color: #121719;
  background: rgba(255, 250, 240, 0.92);
  font: 800 11px/1 var(--font-ui);
}

.studio-map-text-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 999px;
  color: rgba(246, 243, 232, 0.86);
  background: rgba(21, 27, 34, 0.72);
}

#studio-map-status {
  min-width: 0;
  overflow: hidden;
  color: rgba(236, 231, 219, 0.6);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#studio-map-status:empty {
  opacity: 0;
}

body.studio-map-active .studio-header,
body.studio-map-active .studio-tools,
body.studio-map-active .studio-browse {
  display: none;
}

.app-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px 20px max(18px, env(safe-area-inset-bottom));
  background: rgba(3, 4, 4, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, background 180ms ease;
}

.app-sheet-backdrop[hidden] {
  display: none;
}

.app-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(3, 4, 4, 0.48);
  backdrop-filter: blur(8px);
}

.app-bottom-sheet {
  position: relative;
  width: min(100%, 440px);
  display: grid;
  gap: 18px;
  max-height: calc(100% - max(22px, env(safe-area-inset-top)));
  padding: 52px 28px max(42px, calc(env(safe-area-inset-bottom) + 30px));
  overflow-y: auto;
  scroll-padding-bottom: max(42px, calc(env(safe-area-inset-bottom) + 30px));
  border-radius: 34px 34px 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(255, 252, 244, 0.88);
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -22px 72px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(0.78);
  transform: translateY(18px);
  transition: transform 220ms ease;
  touch-action: pan-y;
  will-change: transform;
}

.app-bottom-sheet::-webkit-scrollbar {
  display: none;
}

.app-bottom-sheet::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 118px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transform: translateX(-50%);
  pointer-events: none;
}

.app-sheet-backdrop.open .app-bottom-sheet {
  transform: translateY(0);
}

body.app-sheet-open #global-tabbar {
  display: none !important;
}

#studio-room-editor.studio-room-editor-overlay {
  z-index: 170;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(3, 4, 4, 0);
  backdrop-filter: none;
}

#studio-room-editor.studio-room-editor-overlay.open {
  background: rgba(3, 4, 4, 0.58);
  backdrop-filter: blur(10px) saturate(0.86);
}

#studio-room-editor .studio-room-editor-panel {
  width: min(520px, 36vw);
  height: 100%;
  max-height: none;
  border-radius: 0;
  transform: translateX(100%);
  transition: transform 190ms ease;
}

#studio-room-editor.open .studio-room-editor-panel {
  transform: translateX(0);
}

#studio-room-editor .studio-room-editor-form .room-metadata-fields {
  display: grid;
  gap: 10px;
  width: 100%;
}

#studio-room-editor .studio-room-editor-form .studio-form label {
  color: rgba(236, 231, 219, 0.48);
  font: 550 12px/1.3 var(--font-ui);
  letter-spacing: 0.04em;
}

#studio-room-editor .studio-room-editor-form .dev-input {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 36, 55, 0.68), rgba(18, 18, 25, 0.68));
  color: rgba(255, 252, 244, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 18px 48px rgba(0, 0, 0, 0.22);
}

#studio-room-editor .studio-room-editor-form .room-color-suggestions {
  margin-top: 2px;
}

#studio-room-editor .studio-room-editor-form .dev-input:focus-visible {
  outline: 2px solid rgba(255, 252, 244, 0.64);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  #studio-room-editor .studio-room-editor-panel {
    width: 100%;
    border-left: 0;
    box-shadow: none;
  }
}

body.studio-room-editor-active #room-screen {
  pointer-events: none;
}

body.studio-room-editor-active #studio-room-editor.studio-room-editor-overlay {
  pointer-events: none;
}

body.studio-room-editor-active #studio-room-editor .studio-room-editor-panel {
  pointer-events: auto;
}

body.studio-room-editor-active #room-screen .room-image {
  cursor: default;
}

body.studio-room-editor-active #room-screen .room-image-controls,
body.studio-room-editor-active #room-screen .room-more-button,
body.studio-room-editor-active #room-screen .room-connected-button,
body.studio-room-editor-active #room-screen .room-side-actions,
body.studio-room-editor-active #room-screen .room-close-button {
  display: none;
}

body.studio-room-editor-active #studio-room-editor.studio-room-editor-overlay.open {
  background: rgba(3, 4, 4, 0.12);
  backdrop-filter: none;
}

body.layout-desktop.studio-room-editor-active #room-screen {
  --room-desktop-media-width: min(
    52vw,
    calc(100vw - var(--studio-room-editor-width) - (2 * clamp(34px, 6vw, 96px))),
    calc(var(--room-desktop-media-height) * 2 / 3),
    560px
  );
}

body.layout-desktop.studio-room-editor-active {
  --studio-room-editor-width: min(520px, 36vw);
}

body.layout-desktop.studio-room-editor-active #room-screen .room-immersive {
  padding-right: calc(var(--studio-room-editor-width) + clamp(34px, 6vw, 96px));
}

body.layout-desktop.studio-room-editor-active #room-screen .room-media-backdrop {
  filter: saturate(0.72) brightness(0.48);
  transform: scale(1.02);
}

body.layout-desktop.studio-room-editor-active #room-screen .room-media-veil {
  background:
    linear-gradient(90deg, rgba(3, 4, 4, 0.18), rgba(3, 4, 4, 0.04) 58%, rgba(3, 4, 4, 0.26)),
    radial-gradient(ellipse at 50% 48%, transparent 56%, rgba(2, 3, 3, 0.2) 100%);
}

body.layout-desktop.studio-room-editor-active #studio-room-editor .studio-room-editor-panel {
  width: var(--studio-room-editor-width);
}

@media (min-width: 701px) {
  body.studio-room-editor-active .shell {
    width: var(--app-vw, 100vw);
    height: var(--app-vh, 100dvh);
    min-height: 0;
    padding: 0;
    place-items: stretch;
  }

  body.studio-room-editor-active .phone {
    width: var(--app-vw, 100vw);
    max-width: none;
    height: var(--app-vh, 100dvh);
    max-height: none;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  body.studio-room-editor-active .screen {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  body.studio-room-editor-active {
    --studio-room-editor-width: min(520px, 36vw);
  }

  body.studio-room-editor-active #room-screen {
    --room-desktop-media-height: min(calc(var(--app-vh, 100dvh) - 96px), 720px);
    --room-desktop-media-width: min(
      52vw,
      calc(100vw - var(--studio-room-editor-width) - (2 * clamp(34px, 6vw, 96px))),
      calc(var(--room-desktop-media-height) * 2 / 3),
      560px
    );
    --room-desktop-rail-gap: clamp(18px, 2.1vw, 34px);
  }

  body.studio-room-editor-active #room-screen .room-immersive {
    display: grid;
    place-items: center;
    padding: 48px calc(var(--studio-room-editor-width) + clamp(34px, 6vw, 96px)) 48px clamp(34px, 6vw, 96px);
  }

  body.studio-room-editor-active #room-screen .scene-large {
    position: relative;
    inset: auto;
    width: var(--room-desktop-media-width);
    height: var(--room-desktop-media-height);
    aspect-ratio: 2 / 3;
    max-width: calc(100vw - var(--studio-room-editor-width) - 2 * clamp(34px, 6vw, 96px));
    max-height: calc(var(--app-vh, 100dvh) - 96px);
    border: 1px solid rgba(246, 241, 230, 0.1);
    border-radius: clamp(20px, 2vw, 34px);
    background: rgba(6, 8, 8, 0.46);
    box-shadow:
      0 32px 110px rgba(0, 0, 0, 0.46),
      0 0 70px rgba(236, 231, 219, 0.045),
      inset 0 1px 0 rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(8px) saturate(0.9);
  }

  body.studio-room-editor-active #room-screen .room-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(0.92) contrast(0.98) brightness(0.9);
  }

  body.studio-room-editor-active #studio-room-editor .studio-room-editor-panel {
    width: var(--studio-room-editor-width);
  }
}

.room-overlay-authoring {
  position: absolute;
  z-index: 23;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

body.studio-room-editor-active .room-overlay-authoring {
  pointer-events: auto;
}

.room-overlay-tools {
  position: absolute;
  z-index: 25;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

.room-signal-viewer-layer {
  position: absolute;
  z-index: 21;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

body.studio-room-editor-active .room-overlay-add-tools {
  top: auto;
  right: 12px;
  bottom: 12px;
  left: auto;
  z-index: 25;
  pointer-events: auto;
}

body.studio-room-editor-active .room-overlay-add-tools .studio-tool-tab {
  margin: 0;
}

body.studio-room-editor-active .room-overlay-add-menu {
  top: auto;
  bottom: calc(100% + 10px);
  right: 0;
}

.room-signal-control {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, -100%);
}

.room-signal-marker {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

body.studio-room-editor-active .room-signal-control {
  z-index: 23;
}

.room-signal-viewer-control {
  z-index: 21;
}

body.studio-room-editor-active .room-signal-control.drag-armed .room-signal-marker {
  cursor: grab;
}

.room-signal-viewer-marker {
  cursor: pointer;
}

body.studio-room-editor-active .room-signal-marker:active,
body.studio-room-editor-active .room-signal-control.drag-armed .room-signal-marker:active {
  cursor: grabbing;
}

body.studio-room-editor-active .room-signal-marker:focus-visible {
  outline: 2px solid rgba(255, 252, 244, 0.82);
  outline-offset: 3px;
}

.room-signal-star {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.room-signal-star img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 44px;
  height: 44px;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: filter 120ms ease-out;
}

.room-signal-viewer-marker:hover .room-signal-star img,
.room-signal-viewer-marker:focus-visible .room-signal-star img,
body.studio-room-editor-active .room-signal-control.selected .room-signal-star img {
  filter: brightness(1.08) drop-shadow(0 0 5px rgba(255, 226, 173, 0.3));
}

.room-signal-viewer-marker.signal-activated .room-signal-star img {
  filter: brightness(1.18) drop-shadow(0 0 9px rgba(255, 226, 173, 0.52));
}

.sheet-drag-handle {
  display: none;
}

.backpack-sheet-backdrop {
  z-index: 165;
  padding: max(28px, calc(env(safe-area-inset-top) + 18px)) 0 0;
}

.backpack-sheet-backdrop.open {
  background: rgba(2, 3, 3, 0.54);
  backdrop-filter: blur(10px);
}

.backpack-sheet {
  width: 100%;
  height: min(88dvh, 780px);
  max-height: calc(100dvh - max(30px, env(safe-area-inset-top)));
  padding: 0;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
}

.backpack-close {
  top: 36px;
  right: 28px;
}

.backpack-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 88px 28px var(--app-sheet-bottom-scroll-zone);
  scroll-padding-bottom: var(--app-sheet-bottom-scroll-zone);
  scrollbar-width: none;
}

.backpack-scroll::-webkit-scrollbar {
  display: none;
}

.backpack-scroll h2 {
  margin: 0 0 34px;
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-ui);
  font-size: 42px;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.backpack-items {
  display: grid;
  gap: 14px;
}

.backpack-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 72px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(0.78);
}

.backpack-item-sprite {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(circle at 50% 36%, rgba(236, 231, 219, 0.16), transparent 58%),
    rgba(7, 8, 8, 0.26);
}

.backpack-item-sprite svg {
  width: 48px;
  height: 48px;
}

.backpack-item-copy {
  display: grid;
  gap: 5px;
}

.backpack-item-copy strong {
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-ui);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.backpack-item-copy span {
  color: rgba(255, 255, 255, 0.48);
  font: 500 12px/1 var(--font-ui);
  text-transform: lowercase;
}

.backpack-adjust-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  justify-self: end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 252, 244, 0.62);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.backpack-adjust-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

.backpack-adjust-button:hover {
  color: rgba(255, 252, 244, 0.84);
}

.backpack-adjust-button:focus-visible {
  outline: 1.5px solid rgba(255, 252, 244, 0.58);
  outline-offset: 2px;
}

.dream-retriever-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(2, 3, 3, 0.58);
  backdrop-filter: blur(12px);
}

.dream-retriever-editor-overlay[hidden] {
  display: none;
}

.dream-retriever-editor-panel {
  position: relative;
  width: min(calc(100vw - 32px), 440px);
  max-height: min(760px, calc(100dvh - max(32px, env(safe-area-inset-top)) - max(32px, env(safe-area-inset-bottom))));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.058), rgba(238, 231, 214, 0.018)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.22), rgba(18, 20, 17, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 28px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(24px) saturate(0.82);
}

.dream-retriever-editor-close {
  top: 18px;
  right: 18px;
}

.dream-retriever-editor-scroll {
  max-height: inherit;
  display: grid;
  gap: 18px;
  overflow-y: auto;
  padding: 32px 22px 22px;
  scroll-padding-bottom: 22px;
  scrollbar-width: none;
}

.dream-retriever-editor-scroll::-webkit-scrollbar {
  display: none;
}

.dream-retriever-editor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-right: 38px;
}

.dream-retriever-editor-head h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: lowercase;
}

.dream-retriever-editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 2px;
}

.privacy-policy-backdrop {
  position: fixed;
  z-index: 180;
}

.privacy-policy-backdrop.open {
  background: rgba(2, 3, 3, 0.78);
  backdrop-filter: blur(12px);
}

.privacy-policy-sheet {
  height: min(84dvh, 760px);
  max-height: calc(100dvh - max(34px, env(safe-area-inset-top)));
  padding: 0;
  overflow: hidden;
  border-radius: 34px 34px 0 0;
}

.privacy-policy-sheet .storage-sheet-close {
  z-index: 3;
}

.privacy-policy-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 54px 28px max(42px, calc(env(safe-area-inset-bottom) + 26px));
  scrollbar-width: none;
}

.privacy-policy-scroll::-webkit-scrollbar {
  display: none;
}

.privacy-policy-scroll h2 {
  max-width: 11ch;
  margin: 0 0 8px;
  color: rgba(255, 250, 240, 0.94);
  font-size: clamp(36px, 10vw, 52px);
  line-height: 0.98;
  font-weight: 400;
}

.privacy-policy-scroll h3 {
  margin: 34px 0 10px;
  color: rgba(255, 250, 240, 0.88);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 400;
}

.privacy-policy-scroll p,
.privacy-policy-scroll li {
  color: rgba(236, 231, 219, 0.66);
  font-size: 16px;
  line-height: 1.62;
}

.privacy-policy-scroll p {
  margin: 0 0 16px;
}

.privacy-policy-scroll ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.privacy-policy-scroll a {
  color: rgba(238, 215, 177, 0.82);
  text-decoration-color: rgba(238, 215, 177, 0.34);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.privacy-policy-scroll .privacy-effective,
.privacy-policy-scroll .privacy-updated {
  color: rgba(236, 231, 219, 0.4);
  font-size: 14px;
}

.studio-storage-sheet h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
}

.studio-storage-lines {
  display: grid;
  gap: 10px;
}

.studio-storage-lines p {
  margin: 0;
  color: rgba(236, 231, 219, 0.58);
  font-size: 15px;
  line-height: 1.4;
}

.studio-login-sheet-backdrop {
  z-index: 166;
}

.studio-login-sheet {
  width: min(100%, 410px);
  gap: 14px;
  padding: 58px 24px max(24px, calc(env(safe-area-inset-bottom) + 18px));
}

.studio-login-sheet h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font: 700 31px/1.02 var(--font-ui);
  letter-spacing: 0;
}

.studio-login-sheet p {
  max-width: 29ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font: 400 14px/1.45 var(--font-ui);
}

.studio-login-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.studio-login-actions .soft-button {
  min-height: 52px;
  box-shadow: none;
}

.storage-sheet-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(255, 252, 244, 0.74);
  background: rgba(255, 255, 255, 0.08);
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
}

/* immersive room */
#room-screen {
  padding: 0;
  overflow: hidden;
  background: #050706;
}

#room-screen.screen-entering {
  animation: room-memory-in 520ms ease both;
}

.room-immersive {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #050706;
  z-index: 1;
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.room-feed-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.room-feed-layer.room-feed-roll-up {
  transform: translateY(-100%);
}

.room-feed-layer.room-feed-roll-down {
  transform: translateY(100%);
}

.room-immersive.room-feed-prep-below {
  transition: none;
  transform: translateY(100%);
}

.room-immersive.room-feed-prep-above {
  transition: none;
  transform: translateY(-100%);
}

.room-media-backdrop,
.room-media-veil {
  position: absolute;
  inset: -7%;
  pointer-events: none;
}

.room-media-backdrop {
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(34px) saturate(0.72) brightness(0.48);
  transform: scale(1.12);
}

.room-media-backdrop:not(.has-room-image) {
  filter: blur(12px) saturate(0.72) brightness(0.46);
}

.room-media-veil {
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 4, 4, 0.34), transparent 25%, transparent 68%, rgba(3, 4, 4, 0.42)),
    radial-gradient(ellipse at 50% 44%, transparent 48%, rgba(2, 3, 3, 0.34) 100%);
}

#room-screen .scene-large,
body.device-mobile #room-screen .scene-large {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}

#room-screen .scene-large::before,
#room-screen .scene-large::after {
  display: none;
}

#room-screen .room-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.9) contrast(0.96) brightness(0.86);
  transform: none;
  animation: none;
  cursor: zoom-in;
}

.room-analog-panel {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: max(112px, calc(env(safe-area-inset-bottom) + 88px));
  width: min(82vw, 350px);
  min-height: 168px;
  display: grid;
  align-content: center;
  gap: 15px;
  padding: 30px 28px 28px;
  border: 1px solid rgba(255, 252, 244, 0.18);
  border-radius: 38px;
  text-align: center;
  color: rgba(255, 252, 244, 0.92);
  background:
    linear-gradient(135deg, rgba(245, 232, 190, 0.32), rgba(121, 124, 104, 0.2) 45%, rgba(31, 30, 33, 0.54)),
    rgba(78, 73, 62, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -38px 80px rgba(34, 29, 23, 0.24),
    0 28px 88px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(26px) saturate(1.14);
  transform: translateX(-50%);
  pointer-events: auto;
}

.room-analog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(255, 252, 244, 0.8);
  background: rgba(18, 16, 12, 0.42);
  font-size: 25px;
  line-height: 1;
  backdrop-filter: blur(14px);
}

.room-analog-panel strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: clamp(25px, 6.4vw, 34px);
  line-height: 1.08;
  font-weight: 500;
}

.room-analog-panel span {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.32;
  font-weight: 650;
  color: rgba(255, 252, 244, 0.72);
}

.room-image-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 18px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(247, 243, 232, 0.74);
  background: rgba(4, 6, 6, 0.28);
  backdrop-filter: blur(14px) saturate(0.9);
  transform: translateX(-50%);
}

.room-image-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  font: 28px/1 var(--font-display);
}

.room-image-controls span {
  min-width: 34px;
  font: 500 11px/1 var(--font-ui);
  text-align: center;
}

.room-edge-button {
  position: absolute;
  z-index: 6;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(247, 243, 232, 0.86);
  background: rgba(4, 6, 6, 0.24);
  backdrop-filter: blur(14px) saturate(0.9);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.room-edge-button:active {
  transform: scale(0.95);
}

.room-edge-button svg {
  width: 25px;
  height: 25px;
}

.room-more-button {
  top: max(24px, calc(env(safe-area-inset-top) + 14px));
  left: 22px;
}

.room-close-button {
  z-index: 8;
  top: max(24px, calc(env(safe-area-inset-top) + 14px));
  right: 22px;
}

.room-connected-button {
  left: 22px;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  width: auto;
  min-width: 74px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  font: 700 11px/1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.room-connected-button svg {
  width: 18px;
  height: 18px;
}

.room-exits-label {
  transform: translateY(-0.5px);
}

.room-display-switch-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 2px 2px;
}

.room-display-switch-row > span:first-child {
  display: grid;
  gap: 2px;
}

.room-display-switch-row strong {
  color: rgba(236, 231, 219, 0.8);
  font-size: 14px;
  font-weight: 500;
}

.room-display-switch-row small {
  color: rgba(236, 231, 219, 0.42);
  font-size: 11px;
}

.room-display-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slim-switch {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 24px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 999px;
  background: rgba(7, 9, 9, 0.38);
  transition: background 180ms ease, border-color 180ms ease;
}

.slim-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(236, 231, 219, 0.7);
  transition: transform 180ms ease, background 180ms ease;
}

.room-display-switch-row input:checked + .slim-switch {
  border-color: rgba(188, 204, 215, 0.28);
  background: rgba(92, 112, 128, 0.48);
}

.scenery-option-row input:checked + .slim-switch {
  border-color: rgba(188, 204, 215, 0.28);
  background: rgba(92, 112, 128, 0.48);
}

.room-display-switch-row input:checked + .slim-switch::after {
  background: rgba(250, 248, 241, 0.94);
  transform: translateX(22px);
}

.scenery-option-row input:checked + .slim-switch::after {
  background: rgba(250, 248, 241, 0.94);
  transform: translateX(22px);
}

.room-side-actions {
  position: absolute;
  z-index: 6;
  right: 20px;
  bottom: max(30px, calc(env(safe-area-inset-bottom) + 20px));
  display: grid;
  gap: 8px;
}

.room-side-actions .room-edge-button {
  position: relative;
  inset: auto;
}

.room-action-solid {
  display: none;
}

.room-edge-button.active .room-action-outline {
  display: none;
}

.room-edge-button.active .room-action-solid {
  display: block;
}

.room-edge-button.active {
  color: rgba(255, 248, 213, 0.96);
  background: rgba(14, 15, 13, 0.38);
}

.room-action-count {
  position: absolute;
  right: -2px;
  bottom: -3px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(247, 243, 232, 0.86);
  background: rgba(4, 6, 6, 0.68);
  font: 500 10px/1 var(--font-ui);
}

.room-sheet-backdrop {
  position: absolute;
  z-index: 150;
  padding: 0;
}

.room-sheet-backdrop.open {
  background: rgba(2, 3, 3, 0.62);
  backdrop-filter: blur(10px);
}

.room-detail-sheet,
.room-note-sheet,
.connected-room-sheet {
  width: 100%;
  height: min(76dvh, 710px);
  max-height: calc(100dvh - max(42px, env(safe-area-inset-top)));
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 58px 26px max(26px, calc(env(safe-area-inset-bottom) + 20px));
  overflow: hidden;
  border-radius: 32px 32px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -22px 72px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(0.78);
}

.room-note-sheet {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.room-detail-sheet h2,
.room-note-sheet h2,
.connected-room-sheet h2 {
  margin: 0;
  padding-right: 42px;
  font-size: 34px;
  font-weight: 500;
}

.room-sheet-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.room-sheet-scroll::-webkit-scrollbar {
  display: none;
}

.room-detail-sheet .room-info-list {
  gap: 0;
  margin: 0;
  padding-bottom: 20px;
}

.room-detail-sheet .room-info-list section {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(236, 231, 219, 0.08);
  border-radius: 0;
  background: transparent;
}

.room-detail-sheet .room-info-list span,
.room-detail-sheet .room-info-list p {
  margin: 0;
}

.room-detail-sheet .room-info-list span {
  color: rgba(236, 231, 219, 0.42);
  font: 400 12px/1.4 var(--font-ui);
  letter-spacing: 0;
}

.room-detail-sheet .room-info-list p {
  color: rgba(247, 243, 232, 0.82);
  font: 400 17px/1.45 var(--font-display);
}

.room-info-additional p + p {
  margin-top: 7px !important;
  color: rgba(236, 231, 219, 0.55) !important;
  font-size: 14px !important;
}

.room-info-additional p {
  grid-column: 2;
}

.room-note-sheet textarea {
  min-height: 0;
  height: 100%;
  resize: none;
  padding: 18px;
  border: 1px solid rgba(236, 231, 219, 0.08);
  border-radius: 22px;
  color: rgba(247, 243, 232, 0.88);
  background: rgba(2, 4, 4, 0.3);
  font: 400 18px/1.55 var(--font-display);
}

.room-note-sheet textarea::placeholder {
  color: rgba(236, 231, 219, 0.28);
}

.room-sheet-action {
  justify-self: stretch;
  min-height: 52px;
}

.connected-room-sheet .connected-rooms {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  min-height: 0;
  height: 100%;
  gap: 0;
  margin: 0;
  padding: 2px 0 0;
  overflow: hidden;
}

.connected-room-card {
  position: relative;
  min-height: 88px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(236, 231, 219, 0.09);
  border-radius: 18px;
  color: rgba(247, 243, 232, 0.9);
  background: rgba(10, 12, 12, 0.42);
  text-align: left;
  cursor: pointer;
}

.connected-room-card:active {
  transform: scale(0.985);
}

.connected-room-card:disabled {
  cursor: default;
  opacity: 0.68;
  transform: none;
}

.room-exit-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.connected-room-card img,
.connected-room-pattern {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.connected-room-pattern {
  background: var(--scene);
}

.room-exit-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.room-exit-title {
  overflow: hidden;
  color: rgba(247, 243, 232, 0.94);
  font: 500 21px/1.05 var(--font-display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-exit-card.has-pathway-label .room-exit-title {
  font-style: italic;
}

.room-exit-destination {
  overflow: hidden;
  color: rgba(236, 231, 219, 0.66);
  font: 700 12px/1.2 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-exit-line {
  overflow: hidden;
  color: rgba(236, 231, 219, 0.54);
  font: 500 12px/1.25 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-exit-mode {
  justify-self: start;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(236, 231, 219, 0.12);
  border-radius: 999px;
  color: rgba(236, 231, 219, 0.64);
  background: rgba(255, 255, 255, 0.045);
  font: 700 10px/1 var(--font-ui);
  text-transform: lowercase;
}

.room-exits-empty {
  margin: 8px 0 0;
  color: rgba(236, 231, 219, 0.52);
  font: 500 14px/1.4 var(--font-ui);
}

@keyframes room-memory-in {
  from { opacity: 0; filter: blur(5px); }
  to { opacity: 1; filter: blur(0); }
}

@media (max-width: 360px) {
  .room-more-button,
  .room-connected-button { left: 14px; }
  .room-close-button,
  .room-side-actions { right: 14px; }
  .connected-room-sheet .connected-rooms { gap: 9px; }
}

.studio-fragment-card,
.studio-room-card {
  min-height: 132px;
}

.studio-room-list .studio-room-card {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 2 / 3;
  margin: 0;
  padding: 10px;
  border-radius: 22px;
  transform: none;
}

.studio-room-list .studio-room-card:nth-child(n) {
  margin-top: 0;
  transform: none;
}

.studio-card-copy {
  min-height: 100px;
}

.studio-card-copy strong {
  display: -webkit-box;
  margin: 0 0 3px;
  overflow: hidden;
  font-size: clamp(14px, 3.8vw, 17px);
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-card-copy span {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-room-list .studio-card-status {
  top: 9px;
  right: auto;
  left: 9px;
  max-width: calc(100% - 18px);
  font-size: 9px;
}

.studio-card-status {
  position: absolute;
  top: 9px;
  right: auto;
  left: 9px;
  z-index: 2;
  max-width: 44%;
  color: rgba(236, 231, 219, 0.55);
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
}

.studio-card-status.studio-card-privacy {
  pointer-events: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  max-width: none;
  padding: 0;
  border-radius: 50%;
  background: rgba(13, 20, 23, 0.52);
  color: rgba(236, 231, 219, 0.72);
  font-size: 0;
  line-height: 1;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.studio-card-privacy svg {
  display: block;
  width: 20px;
  height: 20px;
}

.studio-route-draft-status {
  top: 42px;
  right: 9px;
  left: auto;
  text-align: right;
}

.studio-text-card {
  background:
    linear-gradient(180deg, rgba(28, 31, 33, 0.82), rgba(15, 17, 18, 0.82)) !important;
}

.studio-debug-panel {
  margin: 0;
  padding: 22px;
}

.studio-no-heavy-css .studio-room-card,
.studio-no-heavy-css .studio-fragment-card,
.studio-no-heavy-css .studio-tool-tab,
.studio-no-heavy-css .studio-map-editor,
.studio-no-heavy-css .studio-map-bar,
.studio-no-heavy-css .studio-map-node,
.studio-no-heavy-css .studio-map-search-panel,
.studio-no-heavy-css .studio-map-search-shell,
.studio-no-heavy-css .studio-debug-panel,
.studio-no-heavy-css #studio-tool-body,
.studio-no-heavy-css #studio-browse-view,
.studio-no-heavy-css #studio-tools-view,
.studio-no-heavy-css .more-panel.studio-card,
.studio-no-heavy-css .app-bottom-sheet {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.studio-no-heavy-css .studio-room-card::before,
.studio-no-heavy-css .studio-room-card::after,
.studio-no-heavy-css .studio-map-editor::before,
.studio-no-heavy-css .studio-map-editor::after,
.studio-no-heavy-css .studio-tool-tab::before,
.studio-no-heavy-css .studio-tool-tab::after {
  display: none !important;
}

@media (max-width: 768px), (pointer: coarse) {
  #studio-screen .studio-room-list {
    contain: layout paint style;
  }

  #studio-screen .studio-room-list .studio-room-card {
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 180px 270px;
    border-color: rgba(238, 231, 214, 0.075);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
    mix-blend-mode: normal;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 10px 24px rgba(0, 0, 0, 0.24);
    transition: transform 120ms ease, border-color 160ms ease, background 180ms ease;
    animation: none;
  }

  #studio-screen .studio-room-list .studio-room-card:nth-child(n) {
    margin-top: 0;
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 10px 24px rgba(0, 0, 0, 0.24);
  }

  #studio-screen .studio-room-list .studio-room-card:active {
    transform: translateY(1px) scale(0.99);
  }

  #studio-screen .studio-room-list .studio-room-card::before {
    display: none;
  }

  #studio-screen .studio-room-list .studio-room-card::after {
    background: linear-gradient(180deg, transparent 48%, rgba(11, 12, 12, 0.76) 100%);
  }

  #studio-screen .studio-room-list .studio-room-card .room-card-image {
    filter: none;
    transform: none;
    animation: none;
  }

  #studio-screen .studio-route-stack-card-front img {
    filter: none;
    transform: none;
    animation: none;
  }

  #studio-screen .studio-route-card {
    animation: none;
  }

  #studio-screen .studio-card-status,
  #studio-screen .studio-room-list .studio-room-card .card-copy {
    text-shadow: none;
  }

  #studio-screen .studio-route-list {
    contain: layout paint style;
  }

  #studio-screen .studio-route-card {
    contain: layout paint style;
  }

  #studio-screen .studio-card-actions {
    opacity: 1;
  }

  #studio-screen .studio-card-action,
  #studio-screen .studio-route-card-action {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #studio-screen .studio-tools .studio-tool-tab,
  #studio-screen .studio-map-tool,
  #studio-screen .studio-map-icon-button,
  #studio-screen .studio-map-search-button,
  #studio-screen .studio-map-text-button {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
    mix-blend-mode: normal;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055), 0 8px 22px rgba(0, 0, 0, 0.24);
    transition: transform 120ms ease, background 160ms ease, color 160ms ease;
  }

  #studio-screen .studio-tools .studio-tool-tab:hover,
  #studio-screen .studio-tools .studio-tool-tab:focus-visible,
  #studio-screen .studio-tools .studio-tool-tab.active,
  #studio-screen .studio-map-tool.active {
    box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.12), 0 8px 22px rgba(0, 0, 0, 0.24);
  }

  #studio-screen .studio-map-bar,
  #studio-screen .studio-map-pull-refresh,
  #studio-screen .studio-map-search-panel,
  #studio-screen .studio-map-search-shell,
  #studio-screen .studio-map-node {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
    mix-blend-mode: normal;
    box-shadow: none;
  }

  #studio-screen .studio-map-editor::before,
  #studio-screen .studio-map-editor::after {
    display: none;
  }

  #studio-screen .studio-map-link {
    filter: none;
  }
}

.studio-card {
  display: grid;
  gap: 10px;
}

.studio-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.studio-card p {
  margin: 0;
  color: var(--dim);
  line-height: 1.42;
}

.studio-form {
  padding-bottom: var(--app-bottom-scroll-zone);
  scroll-padding-bottom: var(--app-bottom-scroll-zone);
}

.room-ritual-head {
  display: grid;
  gap: 9px;
  color: rgba(236, 231, 219, 0.46);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.room-ritual-progress {
  position: relative;
  display: block;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(236, 231, 219, 0.12);
  box-shadow: inset 0 0 0 1px rgba(236, 231, 219, 0.035);
}

.room-ritual-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
}

.room-ritual-fill {
  display: block;
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.24);
  transition: width 320ms ease;
}

.room-ritual-preview {
  position: relative;
  min-height: 176px;
}

.room-ritual-preview-card {
  position: relative;
  min-height: 176px;
  border: 1px solid rgba(238, 231, 214, 0.075);
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 13, 12, 0.1), rgba(7, 8, 7, 0.78)),
    var(--scene);
  box-shadow: var(--depth-mid);
  animation: ritual-preview-form 520ms ease both;
}

.room-ritual-preview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(0.9) brightness(0.78) blur(0.15px);
  transform: scale(1.018);
}

.room-ritual-preview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(236, 231, 219, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.72));
}

.room-ritual-preview-copy {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 5px;
}

.room-ritual-preview-copy strong {
  font-size: 30px;
  line-height: 0.98;
  font-weight: 500;
  text-shadow: 0 0 26px rgba(0, 0, 0, 0.34);
}

.room-ritual-preview-copy em {
  color: rgba(236, 231, 219, 0.66);
  font-style: normal;
  font-size: 14px;
  line-height: 1.35;
}

.room-ritual-step {
  display: none;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(238, 231, 214, 0.075);
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 0%, rgba(154, 143, 204, 0.07), transparent 52%),
    rgba(17, 19, 18, 0.36);
  box-shadow: var(--depth-far);
  backdrop-filter: blur(15px) saturate(1.02);
}

.room-ritual-step.active {
  display: grid;
  animation: ritual-step-soft-in 220ms ease-out both;
}

.room-ritual-step h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
}

.room-ritual-kicker {
  margin: 0;
  color: rgba(236, 231, 219, 0.44);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.room-ritual-copy {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.4;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-row .mini-button {
  min-height: 42px;
  border-radius: 999px;
}

.choice-row .mini-button.active {
  color: var(--ink);
  border-color: rgba(236, 231, 219, 0.18);
  background: linear-gradient(145deg, rgba(92, 79, 55, 0.38), rgba(28, 31, 28, 0.44));
  box-shadow: 0 0 28px rgba(210, 181, 122, 0.08);
}

.room-connection-picker {
  animation: ritual-step-in 320ms ease both;
}

.room-ritual-summary {
  display: grid;
  gap: 9px;
}

.room-ritual-summary p {
  margin: 0;
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(238, 231, 214, 0.055);
}

.room-ritual-summary span {
  color: rgba(236, 231, 219, 0.42);
  font-size: 12px;
}

.room-ritual-summary strong {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
  color: rgba(236, 231, 219, 0.78);
}

.room-ritual-actions {
  position: sticky;
  bottom: 80px;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(238, 231, 214, 0.07);
  border-radius: 999px;
  background: rgba(9, 10, 9, 0.52);
  backdrop-filter: blur(18px) saturate(1.04);
  box-shadow: var(--soft-depth-small);
}

.room-ritual-actions .soft-button {
  min-height: 40px;
  border-radius: 999px;
}

#room-ritual-next-button {
  flex: 1;
}

.ghost-button {
  color: rgba(236, 231, 219, 0.58);
  background: transparent;
}

.seal-button {
  min-height: 48px;
  box-shadow: 0 0 36px rgba(210, 181, 122, 0.1);
}

.studio-form.sealing .room-ritual-preview-card,
.studio-form.sealing .seal-button {
  animation: ritual-seal 880ms ease-in-out infinite alternate;
}

body.studio-room-ritual-active .phone {
  background:
    radial-gradient(circle at 50% 12%, rgba(118, 108, 190, 0.24), transparent 20rem),
    radial-gradient(circle at 18% 58%, rgba(25, 91, 82, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 76%, rgba(37, 54, 74, 0.2), transparent 24rem),
    linear-gradient(180deg, #050606 0%, #101118 45%, #080b0b 100%);
}

body.studio-room-ritual-active #studio-screen {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 4, 6, 0.68), rgba(4, 6, 7, 0.86)),
    url("./assets/room-ritual-bg.webp") center / cover no-repeat,
    linear-gradient(150deg, rgba(6, 7, 9, 0.98), rgba(19, 21, 31, 0.96) 48%, rgba(5, 8, 8, 0.98));
}

body.studio-room-ritual-active #studio-screen::before,
body.studio-room-ritual-active #studio-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.studio-room-ritual-active #studio-screen::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58)),
    radial-gradient(circle at 62% 22%, rgba(236, 231, 219, 0.06), transparent 16rem),
    radial-gradient(circle at 42% 92%, rgba(127, 111, 209, 0.1), transparent 21rem);
  filter: blur(6px);
  opacity: 0.95;
}

body.studio-room-ritual-active #studio-screen::after {
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, transparent 44%, rgba(0, 0, 0, 0.42));
  background-size: 5px 5px, 7px 7px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.17;
}

body.studio-room-ritual-active .studio-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  min-height: 72px;
  padding: max(18px, env(safe-area-inset-top)) 20px 0;
  background: transparent;
  pointer-events: none;
}

body.studio-room-ritual-active .studio-header > div,
body.studio-room-ritual-active .studio-header #studio-add-button {
  display: none;
}

body.studio-room-ritual-active .studio-header #studio-back-button {
  pointer-events: auto;
  position: static;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(7, 8, 10, 0.52);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.studio-room-ritual-active .studio-tool-body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
}

body.studio-room-ritual-active #studio-room-form {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: max(48px, calc(env(safe-area-inset-top) + 36px)) 26px max(250px, calc(env(safe-area-inset-bottom) + 222px)) 26px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: max(250px, calc(env(safe-area-inset-bottom) + 222px));
  background:
    radial-gradient(circle at 72% 14%, rgba(119, 106, 197, 0.11), transparent 17rem),
    radial-gradient(circle at 34% 60%, rgba(43, 101, 91, 0.08), transparent 21rem),
    linear-gradient(180deg, rgba(3, 4, 5, 0.1), rgba(0, 0, 0, 0.18));
  scrollbar-width: none;
}

body.layout-desktop.studio-room-ritual-active #studio-room-form {
  align-items: center;
  padding-left: max(34px, calc((100% - 1480px) / 2 + 34px));
  padding-right: max(34px, calc((100% - 1480px) / 2 + 34px));
}

body.layout-desktop.studio-room-ritual-active .room-ritual-head,
body.layout-desktop.studio-room-ritual-active .room-ritual-step,
body.layout-desktop.studio-room-ritual-active .room-ritual-actions,
body.layout-desktop.studio-room-ritual-active .room-ritual-summary {
  align-self: center;
}

body.studio-room-ritual-active #studio-room-form.final-step {
  padding-bottom: max(230px, calc(env(safe-area-inset-bottom) + 206px));
}

body.studio-room-ritual-active #studio-room-form.final-step .room-ritual-step.active::after {
  content: "";
  display: block;
  width: 100%;
  height: max(112px, calc(env(safe-area-inset-bottom) + 92px));
}

body.studio-room-ritual-active #studio-room-form.final-step .room-ritual-summary {
  margin-bottom: 12px;
}

body.studio-room-ritual-active #studio-room-form.step-changing .room-ritual-step.active {
  animation: ritual-step-soft-out 110ms ease-in both;
}

body.studio-room-ritual-active #studio-room-form::-webkit-scrollbar {
  display: none;
}

body.studio-room-ritual-active .studio-submission-list {
  display: none;
}

body.studio-room-ritual-active .room-ritual-head {
  flex: 0 0 26px;
  width: min(100%, 420px);
  height: 26px;
  justify-self: center;
  align-self: start;
  display: grid;
  place-items: center;
  gap: 0;
  opacity: 0.86;
}

body.studio-room-ritual-active .room-ritual-head > span {
  display: none;
}

body.studio-room-ritual-active .room-ritual-progress {
  width: min(198px, 48vw);
  height: 5px;
  justify-self: center;
  align-self: center;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 18px rgba(236, 231, 219, 0.045), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.studio-room-ritual-active .room-ritual-fill {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.28);
}

body.studio-room-ritual-active .room-ritual-preview {
  flex: 0 0 auto;
  width: min(46vw, 188px);
  aspect-ratio: 7 / 10;
  min-height: 0;
  justify-self: center;
  perspective: 700px;
  margin-top: 0;
  margin-bottom: 6px;
  transition: width 180ms ease, opacity 180ms ease, transform 180ms ease;
}

body.studio-room-ritual-active .room-ritual-preview-card {
  min-height: 0;
  height: 100%;
  aspect-ratio: 7 / 10;
  border: 0;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 34%, rgba(236, 231, 219, 0.1), transparent 34%),
    radial-gradient(circle at 28% 16%, rgba(135, 124, 222, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.22)),
    var(--scene);
  box-shadow: 0 30px 78px rgba(0, 0, 0, 0.48), 0 0 52px rgba(118, 103, 205, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transform: rotateX(1.2deg) translateY(0);
  animation: none;
  transition: border-radius 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.studio-room-ritual-active #studio-room-form.preview-pinned .room-ritual-preview {
  position: sticky;
  top: max(58px, calc(env(safe-area-inset-top) + 42px));
  align-self: flex-end;
  z-index: 95;
  width: min(46vw, 188px);
  margin-top: 0;
  margin-bottom: 6px;
  opacity: 0.78;
  pointer-events: none;
  transform: scale(0.43);
  transform-origin: top right;
}

body.studio-room-ritual-active #studio-room-form.preview-pinned .room-ritual-preview-card {
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42), 0 0 30px rgba(236, 231, 219, 0.06);
}

body.studio-room-ritual-active #studio-room-form.preview-pinned .room-ritual-preview-copy {
  left: 7px;
  right: 7px;
  bottom: 7px;
}

body.studio-room-ritual-active #studio-room-form.preview-pinned .room-ritual-preview-copy strong {
  font-size: 10px;
}

body.studio-room-ritual-active #studio-room-form.preview-pinned .room-ritual-preview-copy em {
  display: none;
}

body.studio-room-ritual-active .room-ritual-preview-card.has-image {
  box-shadow: 0 34px 96px rgba(0, 0, 0, 0.54), 0 0 68px rgba(81, 102, 89, 0.22);
}

body.studio-room-ritual-active .room-ritual-preview-card img {
  filter: saturate(0.8) contrast(0.9) brightness(0.7) blur(0.08px);
  transform: scale(1.04);
}

body.studio-room-ritual-active .room-ritual-preview-card::after {
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.76));
}

body.studio-room-ritual-active .room-ritual-preview-copy {
  left: 14px;
  right: 14px;
  bottom: 14px;
}

body.studio-room-ritual-active .room-ritual-preview-copy strong {
  font-size: clamp(17px, 4.4vw, 23px);
  line-height: 1;
  color: #fffaf0;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.55);
}

body.studio-room-ritual-active .room-ritual-preview-copy em {
  max-width: 82%;
  color: rgba(246, 243, 232, 0.62);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.studio-room-ritual-active .room-ritual-step {
  flex: 0 0 auto;
  align-self: start;
  width: min(100%, 430px);
  justify-self: center;
  gap: 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.studio-room-ritual-active .room-ritual-step.active {
  animation: ritual-step-soft-in 220ms ease-out both;
}

body.studio-room-ritual-active .room-ritual-step.active::after {
  content: "";
  display: block;
  width: 100%;
  height: clamp(88px, 14dvh, 124px);
}

body.studio-room-ritual-active .room-ritual-kicker {
  display: none;
}

body.studio-room-ritual-active .room-ritual-step h3 {
  max-width: 14ch;
  color: #fffaf0;
  font-family: var(--font-display);
  font-size: clamp(24px, 6.2vw, 34px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.1), 0 14px 42px rgba(0, 0, 0, 0.48);
}

body.studio-room-ritual-active .room-ritual-copy {
  max-width: 31ch;
  color: rgba(236, 231, 219, 0.46);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.38;
  margin-bottom: 4px;
}

body.studio-room-ritual-active .studio-form label {
  color: rgba(236, 231, 219, 0.48);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  gap: 10px;
}

body.studio-room-ritual-active .studio-form .dev-input,
body.studio-room-ritual-active .upload-box {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(38, 36, 55, 0.68), rgba(18, 18, 25, 0.68));
  color: rgba(255, 252, 244, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 18px 48px rgba(0, 0, 0, 0.22);
}

body.studio-room-ritual-active .studio-form textarea.dev-input {
  min-height: 96px;
  border-radius: 30px;
  resize: vertical;
}

body.studio-room-ritual-active .room-metadata-fields {
  display: grid;
  gap: 10px;
  width: 100%;
}

.room-display-switches {
  display: grid;
  gap: 10px;
}

body.studio-room-ritual-active #studio-room-form.matte-step-active {
  padding-top: max(34px, calc(env(safe-area-inset-top) + 22px));
}

body.studio-room-ritual-active #studio-room-form.matte-step-active .room-ritual-preview {
  display: none;
}

body.studio-room-ritual-active .matte-room-step {
  padding: 0 0 18px;
  min-height: min(640px, calc(100dvh - 196px));
}

body.studio-room-ritual-active .matte-room-step.active {
  display: grid;
  gap: 14px;
  align-content: start;
}

body.studio-room-ritual-active .matte-room-step h3 {
  max-width: 16ch;
  margin: 0;
}

body.studio-room-ritual-active .matte-room-step .room-ritual-copy {
  margin: 0 0 6px;
}

.matte-room-stage {
  position: relative;
  min-height: min(560px, calc(100dvh - 272px));
  width: 100%;
  overflow: hidden;
  border-radius: 34px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(4, 5, 6, 0.18), rgba(4, 5, 6, 0.78)),
    var(--scene, linear-gradient(135deg, rgba(40, 43, 50, 0.8), rgba(16, 16, 20, 0.95)));
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.34);
}

.matte-room-stage.has-image {
  background-image:
    linear-gradient(180deg, rgba(3, 4, 5, 0.22), rgba(3, 4, 5, 0.7)),
    var(--matte-image);
  background-size: cover;
  background-position: center;
}

.matte-room-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 42%, transparent 38%, rgba(0, 0, 0, 0.22) 100%),
    rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.matte-room-stage-fallback {
  position: absolute;
  inset: 0;
  background: var(--scene, linear-gradient(135deg, rgba(54, 52, 46, 0.52), rgba(14, 15, 18, 0.9)));
}

.matte-room-stage.has-image .matte-room-stage-fallback {
  display: none;
}

.matte-panel-editor {
  z-index: 24;
  pointer-events: auto;
}

body.studio-room-editor-active .room-signal-inspector {
  z-index: 27;
  bottom: 0;
  width: min(68vw, 286px);
  min-height: 0;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 22px;
}

body.studio-room-editor-active .room-signal-inspector.move-armed {
  pointer-events: none;
}

body.studio-room-editor-active .room-signal-move-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(58vw, 220px);
  min-height: 0;
  padding: 10px 12px 10px 14px;
}

.room-signal-move-cancel {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 252, 244, 0.14);
  border-radius: 999px;
  color: rgba(255, 252, 244, 0.78);
  background: rgba(255, 252, 244, 0.08);
  font: 500 20px/1 var(--font-ui);
  cursor: pointer;
}

.room-signal-move-cancel:hover,
.room-signal-move-cancel:focus-visible {
  color: rgba(255, 252, 244, 0.98);
  background: rgba(255, 252, 244, 0.14);
}

body.studio-room-signal-move-mode #studio-room-editor-form-host,
body.studio-room-signal-move-mode #studio-room-editor-more-options,
body.studio-room-signal-move-mode .studio-room-editor-actions {
  opacity: 0.52;
  pointer-events: none;
  user-select: none;
}

.room-signal-inspector > strong,
.room-signal-picker-heading {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: left;
}

.room-signal-destination-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 252, 244, 0.14);
  border-radius: 15px;
  color: rgba(255, 252, 244, 0.76);
  background: rgba(8, 10, 10, 0.2);
  text-align: left;
}

.room-signal-destination-row > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
  overflow: hidden;
  color: rgba(255, 252, 244, 0.82);
}

.room-signal-destination-row .room-signal-destination-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.room-signal-destination-row .room-signal-destination-copy strong,
.room-signal-destination-row .room-signal-destination-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.room-signal-destination-row .room-signal-destination-copy strong {
  font: 750 12px/1.12 var(--font-ui);
}

.room-signal-destination-row .room-signal-destination-copy small {
  color: rgba(255, 252, 244, 0.54);
  font: 600 10px/1.1 var(--font-ui);
}

.room-signal-chevron {
  color: rgba(255, 252, 244, 0.78);
  font-size: 20px;
  line-height: 0.7;
}

.room-signal-inspector-actions {
  display: flex;
  gap: 8px;
}

.room-signal-inspector-actions .soft-button {
  min-height: 30px;
  flex: 1;
  padding: 0 12px;
  font-size: 12px;
}

body.studio-room-editor-active .room-signal-destination-picker {
  z-index: 28;
  right: 12px;
  bottom: 12px;
  width: min(82vw, 360px);
  max-height: min(66vh, 520px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 10px;
  padding: 12px 14px;
  overflow: hidden;
  border-radius: 22px;
}

.room-signal-picker-heading {
  margin: 0;
  color: rgba(255, 252, 244, 0.94);
  line-height: 1.08;
  text-transform: lowercase;
}

.room-signal-destination-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.room-signal-destination-option {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border: 0;
  border-top: 1px solid rgba(255, 252, 244, 0.12);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.room-signal-destination-option:first-child {
  border-top: 0;
}

.room-signal-destination-option:hover,
.room-signal-destination-option:focus-visible {
  color: rgba(255, 252, 244, 0.98);
  background: rgba(255, 252, 244, 0.06);
}

.room-signal-destination-thumb {
  width: 46px;
  height: 46px;
  display: block;
  border-radius: 12px;
  background-color: rgba(255, 252, 244, 0.08);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 244, 0.12);
}

.room-signal-destination-thumb.is-empty {
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.14), transparent 48%),
    rgba(255, 252, 244, 0.08);
}

.room-signal-destination-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.room-signal-destination-copy strong,
.room-signal-destination-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.room-signal-destination-copy strong {
  color: rgba(255, 252, 244, 0.92);
  font: 750 14px/1.1 var(--font-ui);
}

.room-signal-destination-copy small {
  color: rgba(255, 252, 244, 0.54);
  font: 600 11px/1.1 var(--font-ui);
}

.room-signal-destination-empty {
  margin: 0;
  color: rgba(255, 252, 244, 0.58);
  font: 600 12px/1.35 var(--font-ui);
}

.room-signal-picker-cancel {
  width: 100%;
  min-height: 38px;
  align-self: stretch;
  padding: 0 14px;
  font-size: 13px;
}

@media (max-width: 520px) {
  body.studio-room-editor-active .room-signal-destination-picker {
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: min(72vh, 520px);
    transform: none;
  }

  body.studio-room-editor-active .room-signal-inspector {
    width: min(82vw, 286px);
  }
}

.matte-panel-editor input,
.matte-panel-editor textarea {
  width: 100%;
  border: 0;
  padding: 0;
  text-align: center;
  color: inherit;
  background: transparent;
  outline: none;
}

.matte-panel-editor input {
  font-family: var(--font-serif);
  font-size: clamp(25px, 6.4vw, 34px);
  line-height: 1.08;
  font-weight: 500;
}

.matte-panel-editor textarea {
  min-height: 78px;
  resize: none;
  font: 650 15px/1.32 var(--font-ui);
  color: rgba(255, 252, 244, 0.72);
}

.matte-panel-editor input::placeholder,
.matte-panel-editor textarea::placeholder {
  color: rgba(255, 252, 244, 0.42);
}

body.studio-room-ritual-active #studio-room-title,
body.studio-room-ritual-active #studio-room-line {
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  resize: none;
}

body.studio-room-ritual-active .studio-form .dev-input::placeholder {
  color: rgba(236, 231, 219, 0.28);
}

.metadata-field-label {
  display: block;
  margin: 0 0 7px;
  color: rgba(255, 252, 244, 0.56);
  font: 800 11px/1.1 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

.metadata-field-help {
  display: block;
  margin: 7px 0 0;
  color: rgba(255, 252, 244, 0.38);
  font: 650 11px/1.25 var(--font-ui);
}

body.studio-room-ritual-active .upload-box {
  align-content: center;
  padding: 15px 22px;
}

body.studio-room-ritual-active .upload-box span {
  color: rgba(255, 252, 244, 0.86);
}

body.studio-room-ritual-active .upload-box small {
  display: none;
}

.room-mood-editor {
  display: grid;
  gap: 18px;
  padding: 4px 0 0;
}

.room-mood-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-mood-head h4 {
  margin: 0;
  font: 800 11px/1.1 var(--font-ui);
  color: rgba(255, 252, 244, 0.52);
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.room-mood-reset-all {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(205, 112, 104, 0.72);
  font: 750 11px/1 var(--font-ui);
  cursor: pointer;
}

.room-mood-reset-all:hover {
  color: rgba(229, 139, 130, 0.9);
}

.room-mood-reset-all:focus-visible {
  outline: 2px solid rgba(229, 139, 130, 0.72);
  outline-offset: 3px;
  border-radius: 4px;
}

.room-mood-head p {
  margin: 0;
  font: 650 11px/1.25 var(--font-ui);
  color: rgba(255, 252, 244, 0.46);
}

.room-mood-axis small {
  margin: 0;
  font: 650 11px/1.25 var(--font-ui);
  color: rgba(255, 252, 244, 0.56);
}

.room-mood-axis-list {
  display: grid;
  gap: 18px;
}

.room-mood-axis {
  display: grid;
  gap: 8px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255, 252, 244, 0.07);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.room-mood-axis-top,
.room-mood-range-row,
.room-mood-status-row {
  display: grid;
  align-items: center;
}

.room-mood-axis-top {
  grid-template-columns: 1fr;
}

.room-mood-axis-top span {
  font: 800 14px/1.12 var(--font-ui);
  color: rgba(255, 252, 244, 0.86);
}

.room-mood-clear {
  min-height: 30px;
  padding: 0 2px 0 12px;
  border: 0;
  background: transparent;
  color: rgba(205, 112, 104, 0.72);
  font: 750 11px/1 var(--font-ui);
  cursor: pointer;
}

.room-mood-clear:hover {
  color: rgba(229, 139, 130, 0.9);
}

.room-mood-clear:focus-visible {
  outline: 2px solid rgba(229, 139, 130, 0.72);
  outline-offset: 2px;
}

.room-mood-range-row {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.room-mood-range-row span {
  color: rgba(255, 252, 244, 0.42);
  font: 650 10px/1.1 var(--font-ui);
  white-space: nowrap;
}

.room-mood-range-row span:last-child {
  text-align: right;
}

.room-mood-axis input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  accent-color: rgba(236, 231, 219, 0.8);
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.room-mood-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
}

.room-mood-status-row small {
  color: rgba(255, 252, 244, 0.56);
}

.room-mood-axis.is-active .room-mood-status-row small {
  color: rgba(255, 252, 244, 0.92);
  font-weight: 650;
}

.room-mood-axis input[type="range"]:focus-visible {
  outline: 2px solid rgba(255, 252, 244, 0.66);
  outline-offset: 3px;
  border-radius: 999px;
}

.room-mood-axis input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.16);
}

.room-mood-axis.is-active input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(255, 252, 244, 0.32);
}

.room-mood-axis input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7.5px;
  border: 1px solid rgba(255, 252, 244, 0.52);
  border-radius: 50%;
  background: rgba(18, 22, 22, 0.96);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
}

.room-mood-axis.is-unset input[type="range"] {
  opacity: 0.55;
}

.room-mood-expanded {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 252, 244, 0.08);
  border-bottom: 1px solid rgba(255, 252, 244, 0.08);
}

.room-mood-expanded summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 252, 244, 0.62);
  font: 800 11px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  cursor: pointer;
}

.room-mood-expanded summary::-webkit-details-marker {
  display: none;
}

.room-mood-chevron {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 120ms ease;
}

.room-mood-expanded[open] .room-mood-chevron {
  transform: rotate(225deg);
}

.room-mood-expanded summary:focus-visible {
  outline: 2px solid rgba(255, 252, 244, 0.68);
  outline-offset: 3px;
  border-radius: 8px;
}

.room-mood-expanded[open] summary {
  margin-bottom: 2px;
}

@media (max-width: 520px) {
  .room-mood-range-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .room-mood-range-row span {
    font-size: 10px;
  }
}

body.studio-room-ritual-active .choice-row {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.studio-room-ritual-active .choice-row .mini-button {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 18px;
  background: rgba(26, 24, 39, 0.66);
  color: rgba(236, 231, 219, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 20px 52px rgba(0, 0, 0, 0.22);
}

body.studio-room-ritual-active .choice-row .mini-button.active {
  color: #171717;
  background: rgba(255, 252, 244, 0.94);
  box-shadow: 0 0 34px rgba(255, 255, 255, 0.2), 0 18px 56px rgba(0, 0, 0, 0.28);
}

body.studio-room-ritual-active .room-connection-picker {
  padding-top: 4px;
}

body.studio-room-ritual-active .room-ritual-summary {
  gap: 7px;
  padding: 18px;
  border-radius: 30px;
  background: rgba(15, 16, 18, 0.5);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 56px rgba(0, 0, 0, 0.25);
}

body.studio-room-ritual-active .room-ritual-summary p {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 8px 0;
}

body.studio-room-ritual-active .room-ritual-summary strong {
  color: rgba(255, 252, 244, 0.82);
}

body.studio-room-ritual-active .room-ritual-actions {
  position: fixed;
  left: 50%;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 16px));
  transform: translateX(-50%);
  z-index: 120;
  width: min(calc(100vw - 52px), 430px);
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

body.studio-room-ritual-active #studio-room-form.final-step .room-ritual-actions {
  z-index: 10;
  margin-top: 18px;
}

body.studio-room-ritual-active .room-ritual-actions .soft-button,
body.studio-room-ritual-active .seal-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 800;
}

body.studio-room-ritual-active #room-ritual-next-button,
body.studio-room-ritual-active .seal-button {
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.36), transparent 58%),
    linear-gradient(180deg, rgba(96, 87, 136, 0.76), rgba(29, 25, 45, 0.8));
  box-shadow: 0 0 38px rgba(236, 231, 219, 0.22), 0 0 72px rgba(142, 119, 255, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body.studio-room-ritual-active #studio-submit-room-button {
  flex: 1;
  width: auto;
}

body.studio-room-ritual-active #studio-submit-room-button[hidden],
body.studio-room-ritual-active #room-ritual-next-button[hidden],
body.studio-room-ritual-active #room-ritual-back-button[hidden],
body.studio-room-ritual-active #studio-reset-room-button[hidden] {
  display: none !important;
}

body.studio-room-ritual-active #room-ritual-next-button:disabled {
  opacity: 0.42;
  color: rgba(236, 231, 219, 0.42);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(48, 45, 65, 0.5), rgba(16, 16, 22, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  filter: saturate(0.65);
}

body.studio-room-ritual-active .ghost-button {
  color: rgba(236, 231, 219, 0.44);
  background: rgba(16, 16, 20, 0.46);
}

body.studio-room-ritual-active .seal-button {
  width: 100%;
  margin-top: 0;
}

body.studio-room-ritual-active .room-ritual-actions .seal-button {
  margin-top: 0;
}

body.studio-room-ritual-active #studio-room-form.final-step #studio-reset-room-button {
  display: none !important;
}

body.studio-room-ritual-active .studio-image-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 26px;
  background: rgba(10, 11, 12, 0.42);
  backdrop-filter: blur(12px);
}

body.studio-room-ritual-active .studio-image-card.thumbnail-selected {
  border: 1px solid rgba(236, 231, 219, 0.22);
  box-shadow: inset 0 0 0 1px rgba(236, 231, 219, 0.04), 0 0 26px rgba(210, 181, 122, 0.08);
}

.thumbnail-button {
  white-space: nowrap;
}

.studio-image-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
}

body.studio-room-ritual-active .studio-image-list {
  max-height: min(30dvh, 230px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

body.studio-room-ritual-active .studio-image-card img {
  width: 76px;
  height: 76px;
  aspect-ratio: 1;
  border-radius: 18px;
}

body.studio-room-ritual-active .studio-image-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.studio-room-ritual-active #global-tabbar,
body.studio-room-ritual-active .tabbar {
  display: none !important;
}

.studio-form label {
  display: grid;
  gap: 8px;
  color: var(--dim);
  font-size: 13px;
}

.studio-image-list,
.studio-submission-list {
  display: grid;
  gap: 10px;
}

.studio-image-card,
.studio-submission-card {
  border: 1px solid rgba(238, 231, 214, 0.075);
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 0%, rgba(154, 143, 204, 0.08), transparent 54%),
    rgba(24, 27, 25, 0.44);
  backdrop-filter: blur(16px) saturate(1.04);
  padding: 12px;
  display: grid;
  gap: 8px;
  box-shadow: var(--soft-depth-small);
}

.studio-image-card img {
  width: 100%;
  aspect-ratio: 1.25;
  object-fit: cover;
  border-radius: 18px;
  filter: saturate(0.7) contrast(0.9) brightness(0.82) blur(0.2px);
}

.studio-image-card span,
.studio-submission-card span {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.35;
}

.studio-submission-card strong {
  font-size: 20px;
}

@keyframes ritual-step-in {
  from {
    opacity: 0;
    filter: blur(4px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes ritual-step-soft-in {
  from {
    opacity: 0;
    filter: blur(3px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes ritual-step-soft-out {
  from {
    opacity: 1;
    filter: blur(0);
  }

  to {
    opacity: 0;
    filter: blur(3px);
  }
}

@keyframes ritual-step-cinema {
  from {
    opacity: 0;
    filter: blur(3px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes ritual-preview-form {
  from {
    opacity: 0.88;
    filter: blur(1px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes ritual-seal {
  from {
    filter: brightness(1) saturate(1);
    box-shadow: var(--depth-mid);
  }

  to {
    filter: brightness(1.08) saturate(1.04);
    box-shadow:
      var(--depth-mid),
      0 0 42px rgba(210, 181, 122, 0.16);
  }
}

#saved-screen.editing-saves::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.12;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 14px,
    rgba(218, 220, 214, 0.9) 14px 17px,
    transparent 17px 31px
  );
  animation: drift-stripes 9s linear infinite;
}

#saved-screen.editing-saves > * {
  position: relative;
  z-index: 1;
}

@keyframes drift-stripes {
  from {
    transform: translate3d(-28px, 0, 0);
  }

  to {
    transform: translate3d(28px, 0, 0);
  }
}

@keyframes dream-screen-in {
  from {
    opacity: 0;
    filter: blur(4px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes dream-result-surface {
  from {
    opacity: 0;
    filter: blur(12px) saturate(0.72);
    transform: translate3d(0, 18px, 0) scale(0.978);
  }

  58% {
    opacity: 1;
    filter: blur(2px) saturate(0.86);
  }

  to {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes dream-result-dissolve {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    opacity: 0;
    filter: blur(9px);
    transform: translate3d(-8px, -2px, 0) scale(1.006);
  }
}

@keyframes dream-console-drop {
  from {
    opacity: 1;
    filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 28px rgba(194, 165, 255, 0.12));
    transform: translateY(-82px) scale(1.04);
  }

  76% {
    transform: translateY(5px) scale(0.995);
  }

  to {
    opacity: 1;
    filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 28px rgba(194, 165, 255, 0.12));
    transform: translateY(0) scale(1);
  }
}

@keyframes dream-retriever-arrive {
  from {
    opacity: 0;
    filter: blur(14px) saturate(0.74) drop-shadow(0 22px 36px rgba(0, 0, 0, 0.22));
    transform: translateY(16px) scale(0.92);
  }

  64% {
    opacity: 1;
    filter: blur(2px) saturate(0.9) drop-shadow(0 28px 46px rgba(0, 0, 0, 0.34));
  }

  to {
    opacity: 1;
    filter: blur(0) saturate(1) drop-shadow(0 28px 46px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 28px rgba(194, 165, 255, 0.12));
    transform: translateY(0) scale(1);
  }
}

@keyframes dream-retriever-open {
  from {
    opacity: 0.72;
    filter: blur(9px) saturate(0.82) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
    transform: translateY(8px) scale(0.96);
  }

  to {
    opacity: 1;
    filter: blur(0) saturate(1) drop-shadow(0 28px 46px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 32px rgba(194, 165, 255, 0.16));
    transform: translateY(0) scale(1);
  }
}

@keyframes dream-disc-surface {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-18px) scale(0.82) rotate(-5deg);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes dream-disc-flash {
  0%,
  100% {
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 26px rgba(214, 182, 255, 0.14));
    transform: translateY(0) scale(1);
  }

  48% {
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 42px rgba(232, 214, 255, 0.34));
    transform: translateY(-1px) scale(1.035);
  }
}

@keyframes soft-reveal {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes card-dream-in {
  from {
    opacity: 0;
    filter: blur(9px);
    transform: translateY(14px) scale(0.982);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes phone-breathing {
  from {
    background-position: 48% 0%, 90% 60%, 0 0, 0 0;
  }

  to {
    background-position: 52% 2%, 86% 64%, 0 0, 5px 0;
  }
}

@keyframes slow-memory-drift {
  from {
    transform: scale(1.018) translate3d(-0.65%, -0.42%, 0);
  }

  to {
    transform: scale(1.038) translate3d(0.7%, 0.52%, 0);
  }
}

@keyframes main-scene-drift {
  from {
    transform: scale(1.03) translate3d(-0.8%, -0.35%, 0);
  }

  to {
    transform: scale(1.07) translate3d(0.8%, 0.45%, 0);
  }
}

@keyframes memory-haze {
  from {
    opacity: 0.16;
    transform: translate3d(-0.6%, -0.4%, 0) scale(1.01);
  }

  to {
    opacity: 0.26;
    transform: translate3d(0.6%, 0.5%, 0) scale(1.02);
  }
}

@keyframes screen-veil {
  0% {
    opacity: 0;
  }

  28% {
    opacity: 0.16;
  }

  100% {
    opacity: 0;
  }
}

@keyframes typing-dot {
  0%,
  80%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  40% {
    opacity: 0.9;
    transform: translateY(-3px);
  }
}

.room-line {
  margin: 0 0 15px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.22;
}

.room-line strong {
  display: block;
  font-weight: 400;
}

.room-line .room-tag {
  margin-bottom: 9px;
}

.room-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.connected-rooms {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.connected-rooms > span {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.connected-rooms > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.connected-room-sheet .route-exit-normal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  min-height: 0;
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  padding: 0 0 12px;
  scrollbar-width: none;
}

.connected-room-sheet .route-exit-normal-list .connected-room-card {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  gap: 8px;
  padding: 7px;
  border-radius: 17px;
}

.connected-room-sheet .route-exit-normal-list .room-exit-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 10;
  border-radius: 12px;
}

.connected-room-sheet .route-exit-normal-list .room-exit-copy {
  gap: 3px;
  padding: 0 3px 2px;
}

.connected-room-sheet .route-exit-normal-list .room-exit-title {
  font: 650 14px/1.15 var(--font-ui);
}

.connected-room-sheet .route-exit-normal-list .room-exit-destination {
  font: 600 11px/1.2 var(--font-ui);
}

.connected-room-sheet .route-exit-normal-list::-webkit-scrollbar {
  display: none;
}

.connected-room-sheet .connected-rooms.has-previous-exit {
  grid-template-rows: minmax(0, 1fr) auto;
}

.connected-room-sheet .route-exit-previous-list {
  display: grid;
  min-width: 0;
  min-height: 108px;
  align-content: end;
  justify-items: center;
  gap: 10px;
  padding: 18px 0 20px;
}

.connected-room-sheet .route-exit-previous-list {
  margin-top: 0;
}

.connected-room-sheet .route-exit-previous-list .room-exit-card {
  width: min(100%, 420px);
}

.connected-rooms[hidden] {
  display: none;
}

.resonance-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.resonance-button img {
  width: 18px;
  height: 18px;
  filter: invert(88%) sepia(10%) saturate(270%) hue-rotate(350deg);
  opacity: 0.72;
}

.resonance-button.active {
  background: rgba(54, 63, 55, 0.86);
}

.resonance-button[aria-disabled="true"] {
  cursor: pointer;
  opacity: 0.62;
}

.room-audio-status {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.signal-pill {
  display: block;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 31, 0.38);
  color: var(--dim);
  font-size: 15px;
  line-height: 1.35;
}

.field-panel {
  display: grid;
  gap: 9px;
}

.field-panel label {
  color: var(--faint);
  font-size: 12px;
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 28, 38, 0.52);
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea::placeholder {
  color: var(--faint);
}

.empty-state {
  min-height: 310px;
  padding: 52px 18px;
  color: var(--dim);
  line-height: 1.45;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.empty-state img {
  width: min(150px, 46%);
  opacity: 0.78;
  filter: none;
  mix-blend-mode: normal;
  -webkit-mask-image: none;
  mask-image: none;
  border-radius: 18px;
}

.empty-state span {
  max-width: 260px;
}

#saved-screen .saved-list {
  min-height: clamp(320px, 58dvh, 620px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  gap: 12px 10px;
}

#saved-screen .empty-state {
  grid-column: 1 / -1;
  min-height: 100%;
}

#saved-screen .saved-card-skeleton {
  aspect-ratio: 2 / 3;
  min-height: 0;
}

#saved-screen .saved-room-card,
#saved-screen .saved-image-card {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 2 / 3;
  margin: 0;
  padding: 10px;
  border-radius: 22px;
  transform: none;
}

#saved-screen .saved-room-card:nth-child(n) {
  margin-top: 0;
  transform: none;
}

#saved-screen .saved-room-card .card-copy {
  min-height: 0;
}

#saved-screen .saved-room-card .card-copy strong {
  display: -webkit-box;
  margin: 0 0 3px;
  overflow: hidden;
  font-size: clamp(14px, 3.8vw, 17px);
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#saved-screen .saved-room-card .card-copy span {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#saved-screen .saved-room-card .edit-controls,
#saved-screen .saved-image-card .edit-controls {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  margin: 0;
}

#saved-screen .saved-room-card .mini-button,
#saved-screen .saved-image-card .mini-button {
  min-height: 26px;
  padding: 5px 7px;
  font-size: 10px;
}

.saved-card,
.note-card,
.developer-item {
  display: grid;
  gap: 8px;
}

.saved-card.editing {
  cursor: default;
}

.saved-card strong,
.note-card strong,
.developer-item strong {
  font-weight: 400;
  font-size: 19px;
}

.saved-card span,
.note-card span,
.developer-item span {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.4;
}

.setting-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  color: var(--ink);
}

.setting-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.settings-key-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.settings-key-form input {
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(238, 231, 214, 0.1);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.24);
  font: 400 13px/1 var(--font-ui);
}

.settings-key-form .soft-button {
  min-height: 44px;
  padding-inline: 15px;
}

.settings-key-status {
  min-height: 18px;
  margin: 9px 2px 0;
  color: var(--dim);
  font: 400 12px/1.45 var(--font-ui);
}

.credit-panel {
  display: grid;
  gap: 8px;
}

.credit-panel h3,
.credit-panel p {
  margin: 0;
}

.credit-panel h3 {
  font-size: 21px;
  font-weight: 400;
}

.credit-panel p,
.credit-panel a {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.credit-panel a {
  text-decoration: none;
  border-bottom: 1px solid rgba(236, 231, 219, 0.18);
}

.developer-panel h3 {
  margin: 18px 0 8px;
  font-size: 20px;
  font-weight: 400;
}

.dev-input,
.dev-textarea {
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 28, 38, 0.52);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.dev-textarea {
  min-height: 74px;
  resize: vertical;
}

.dev-input::placeholder,
.dev-textarea::placeholder {
  color: var(--faint);
}

.account-panel {
  display: grid;
  gap: 10px;
}

#account-status-panel {
  justify-items: center;
  text-align: center;
}

.account-panel h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.account-panel p:not(.time-tag) {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.4;
}

.profile-field {
  display: grid;
  gap: 6px;
  color: var(--dim);
  font-size: 13px;
}

.profile-prompt-card {
  text-align: center;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.onboarding-auth {
  min-height: calc(100% - 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 28px 24px 34px;
  background:
    linear-gradient(rgba(20, 18, 25, 0.48), rgba(14, 15, 13, 0.9)),
    radial-gradient(circle at 50% 24%, rgba(134, 119, 193, 0.22), transparent 15rem),
    radial-gradient(circle at 12% 74%, rgba(124, 145, 132, 0.13), transparent 14rem);
}

.onboarding-auth::before {
  content: "";
  min-height: 180px;
  border: 1px solid rgba(236, 231, 219, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(101, 88, 163, 0.36), rgba(11, 10, 14, 0.58)),
    radial-gradient(circle at 48% 36%, rgba(237, 232, 224, 0.2), transparent 16%),
    linear-gradient(145deg, #4f4771, #17151d 64%, #0d0d0d);
  box-shadow: var(--soft-depth);
  filter: saturate(0.88);
}

.onboarding-auth-copy {
  display: grid;
  gap: 10px;
}

.onboarding-auth-copy h2 {
  margin: 0;
  max-width: 8.5em;
  font-size: 34px;
  line-height: 1.02;
  font-weight: 400;
}

.onboarding-auth-copy p:not(.time-tag) {
  margin: 0;
  max-width: 22em;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.45;
}

.onboarding-auth-actions {
  display: grid;
  gap: 9px;
}

.provider-auth-panel {
  display: grid;
  gap: 9px;
}

.onboarding-auth-status {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.app-toast-stack {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(92vw, 520px);
  pointer-events: none;
}

.app-toast-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 11px 12px 11px 14px;
  border: 1px solid rgba(236, 231, 219, 0.14);
  border-radius: 20px;
  background: rgba(26, 26, 29, 0.92);
  backdrop-filter: blur(22px) saturate(1.08);
  color: var(--ink);
  font-family: var(--font-ui);
  text-align: left;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
  transition: opacity 190ms ease, transform 220ms ease;
}

.app-toast-card.is-entering {
  animation: app-toast-enter 220ms ease both;
}

.app-toast-card.is-exiting {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  animation: app-toast-exit 190ms ease both;
}

@keyframes app-toast-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes app-toast-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.app-toast-information {
  background: linear-gradient(135deg, rgba(45, 45, 49, 0.94), rgba(25, 26, 29, 0.9));
}

.app-toast-error {
  border-color: rgba(255, 116, 121, 0.18);
  background: linear-gradient(135deg, rgba(78, 38, 42, 0.9), rgba(35, 25, 28, 0.94));
}

.app-toast-success {
  border-color: rgba(152, 220, 126, 0.16);
  background: linear-gradient(135deg, rgba(47, 68, 43, 0.9), rgba(27, 34, 28, 0.94));
}

.app-toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: rgba(245, 244, 240, 0.94);
  background: rgba(255, 255, 255, 0.08);
}

.app-toast-icon svg {
  width: 22px;
  height: 22px;
}

.app-toast-error .app-toast-icon {
  color: #ff5962;
  background: rgba(255, 72, 82, 0.12);
}

.app-toast-success .app-toast-icon {
  color: #a7ed88;
  background: rgba(132, 220, 104, 0.13);
}

.app-toast-copy {
  min-width: 0;
}

.app-toast-title,
.app-toast-description {
  display: block;
  overflow-wrap: anywhere;
}

.app-toast-title {
  color: rgba(255, 255, 252, 0.94);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.app-toast-description {
  margin: 4px 0 0;
  color: rgba(238, 237, 233, 0.66);
  font-size: 13px;
  line-height: 1.32;
}

.app-toast-action,
.app-toast-dismiss {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.app-toast-action {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  color: rgba(255, 255, 252, 0.94);
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.app-toast-action:hover,
.app-toast-action:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.app-toast-dismiss {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 10px;
  color: rgba(255, 255, 252, 0.56);
  background: transparent;
  font-size: 20px;
  line-height: 1;
}

.app-toast-dismiss:hover,
.app-toast-dismiss:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 620px) {
  .app-toast-stack {
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }

  .app-toast-card {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 64px;
    padding: 10px 10px 10px 12px;
    border-radius: 18px;
  }

  .app-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .app-toast-icon svg {
    width: 20px;
    height: 20px;
  }

  .app-toast-title {
    font-size: 13px;
  }

  .app-toast-description {
    font-size: 12px;
  }

  .app-toast-action {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 12px;
  }

  .app-toast-dismiss {
    width: 26px;
    height: 26px;
    font-size: 18px;
  }
}

.ghost-button {
  color: var(--dim);
  background: rgba(18, 17, 23, 0.34);
}

.developer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.local-upload {
  margin-top: 14px;
}

.upload-box {
  display: grid;
  gap: 5px;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(236, 231, 219, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(39, 37, 49, 0.52), rgba(14, 16, 14, 0.32));
  color: var(--ink);
  cursor: pointer;
}

.upload-box small {
  color: var(--faint);
}

#image-upload,
#studio-room-images,
#studio-fragment-image {
  display: none;
}

#dev-room-images,
#dev-feeling-images {
  display: none;
}

.dev-upload {
  margin: 0 0 10px;
}

.room-image-preview-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.room-image-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 9, 0.28);
  padding: 10px;
}

.room-image-preview img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: saturate(0.78) contrast(0.96) brightness(0.82);
}

.local-image-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #161814;
  box-shadow: var(--soft-depth);
}

.local-image-card.editing {
  min-height: 230px;
}

.local-image-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.68) contrast(0.9) brightness(0.76) blur(0.25px);
  transform: scale(1.015);
  animation: slow-memory-drift 22s ease-in-out infinite alternate;
}

.edit-controls {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-self: end;
  margin-top: 10px;
}

.local-image-card .edit-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
}

.mini-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(238, 231, 214, 0.08);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0%, rgba(238, 231, 214, 0.06), transparent 50%),
    rgba(24, 23, 31, 0.48);
  backdrop-filter: blur(14px);
  color: var(--dim);
  cursor: pointer;
}

.mini-button:disabled {
  cursor: default;
  opacity: 0.36;
}

.mini-button.danger {
  color: #d6b7ad;
}

.danger-button {
  color: #d6b7ad;
}

.danger-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 4, 4, 0.48);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.confirm-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  padding: 18px;
  backdrop-filter: blur(22px) saturate(0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 72px rgba(0, 0, 0, 0.28);
  animation: card-dream-in 420ms ease-out both;
}

#confirm-modal {
  padding: 16px;
}

#confirm-modal .confirm-card {
  box-sizing: border-box;
  width: min(calc(100vw - 32px), 390px);
}

.confirm-card h2 {
  margin-bottom: 10px;
}

.confirm-card p {
  color: var(--dim);
  line-height: 1.4;
}

.confirm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--ink);
}

.confirm-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.confirm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.room-info-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(236, 231, 219, 0.58);
}

.room-info-button .info-icon {
  width: 15px;
  height: 15px;
}

.room-info-button .info-icon-filled {
  display: none;
}

.room-info-button.active .info-icon-outline {
  display: none;
}

.room-info-button.active .info-icon-filled {
  display: block;
}

.room-info-card {
  max-width: 360px;
}

.room-info-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.room-info-list section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 10, 9, 0.28);
  padding: 12px;
}

.room-info-list span {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.room-info-list p {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
}

.label-with-info > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.inline-info-button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 231, 219, 0.12);
  color: rgba(236, 231, 219, 0.72);
  font-size: 11px;
  line-height: 18px;
  padding: 0;
}

.ritual-hint-wrap {
  position: relative;
}

.ritual-hint-bubble {
  width: min(100%, 280px);
  justify-self: start;
  margin-top: -2px;
  padding: 10px 13px;
  border: 1px solid rgba(236, 231, 219, 0.1);
  border-radius: 18px 18px 18px 6px;
  background:
    radial-gradient(circle at 10% 0%, rgba(236, 231, 219, 0.1), transparent 48%),
    rgba(9, 10, 10, 0.62);
  color: rgba(236, 231, 219, 0.68);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1.35;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  animation: ritual-hint-in 180ms ease both;
}

body.studio-room-ritual-active .ritual-hint-wrap {
  position: relative;
}

body.studio-room-ritual-active .ritual-hint-bubble {
  position: absolute;
  left: 67px;
  top: -10px;
  z-index: 8;
  width: min(230px, calc(100vw - 150px));
  margin: 0;
  border-radius: 999px;
  padding: 10px 15px;
  background:
    radial-gradient(circle at 8% 50%, rgba(236, 231, 219, 0.11), transparent 54%),
    rgba(9, 10, 10, 0.7);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32), 0 0 24px rgba(236, 231, 219, 0.045);
}

body.studio-room-ritual-active .ritual-hint-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(236, 231, 219, 0.1);
  border-bottom: 1px solid rgba(236, 231, 219, 0.1);
  background: rgba(9, 10, 10, 0.7);
  transform: translateY(-50%) rotate(45deg);
  backdrop-filter: blur(16px);
}

@keyframes ritual-hint-in {
  from {
    opacity: 0;
    transform: translateY(4px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

#account-screen,
#saved-screen,
#notes-screen,
#settings-screen,
#access-screen,
#scenery-screen,
#credits-screen {
  position: absolute;
  padding: 0;
  isolation: isolate;
  overflow: hidden auto;
  scroll-padding-bottom: var(--app-bottom-scroll-zone);
  background: transparent;
}

#more-screen {
  position: absolute;
  padding: 0;
  isolation: isolate;
  overflow: hidden auto;
  scroll-padding-bottom: var(--app-bottom-scroll-zone);
  background: transparent;
}

#account-screen .topbar.compact,
#saved-screen .topbar.compact,
#notes-screen .topbar.compact,
#settings-screen .topbar.compact,
#access-screen .topbar.compact,
#scenery-screen .topbar.compact,
#credits-screen .topbar.compact,
#more-screen .topbar.compact {
  position: relative;
  min-height: 96px;
  padding: max(22px, calc(env(safe-area-inset-top) + 16px)) 0 0;
  align-items: center;
  border: 0;
  background: transparent;
}

#more-screen .topbar.compact {
  position: relative;
  min-height: 132px;
  padding: max(78px, calc(env(safe-area-inset-top) + 64px)) 28px 0;
  align-items: start;
}

#more-screen .topbar.compact > div {
  flex: 0 0 auto;
  text-align: left;
}

#account-screen .topbar.compact > div,
#saved-screen .topbar.compact > div,
#notes-screen .topbar.compact > div,
#settings-screen .topbar.compact > div,
#access-screen .topbar.compact > div,
#scenery-screen .topbar.compact > div,
#credits-screen .topbar.compact > div {
  position: absolute;
  left: 96px;
  right: 96px;
  top: max(36px, calc(env(safe-area-inset-top) + 30px));
  display: flex;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

#account-screen .topbar.compact:not(.split) > .icon-button + div,
#notes-screen .topbar.compact:not(.split) > .icon-button + div,
#settings-screen .topbar.compact:not(.split) > .icon-button + div,
#access-screen .topbar.compact:not(.split) > .icon-button + div,
#scenery-screen .topbar.compact:not(.split) > .icon-button + div,
#credits-screen .topbar.compact:not(.split) > .icon-button + div {
  margin-right: 0;
}

#account-screen .topbar.compact .more-back-button,
#saved-screen .topbar.compact .more-back-button,
#notes-screen .topbar.compact .more-back-button,
#settings-screen .topbar.compact .more-back-button,
#access-screen .topbar.compact .more-back-button,
#scenery-screen .topbar.compact .more-back-button,
#credits-screen .topbar.compact .more-back-button {
  position: absolute;
  top: max(26px, calc(env(safe-area-inset-top) + 20px));
  left: 22px;
  right: auto;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 18, 17, 0.66);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px);
}

#account-screen .topbar.compact .more-back-button svg,
#saved-screen .topbar.compact .more-back-button svg,
#notes-screen .topbar.compact .more-back-button svg,
#settings-screen .topbar.compact .more-back-button svg,
#access-screen .topbar.compact .more-back-button svg,
#scenery-screen .topbar.compact .more-back-button svg,
#credits-screen .topbar.compact .more-back-button svg {
  width: 30px;
  height: 30px;
}

#account-screen .topbar.compact h2,
#saved-screen .topbar.compact h2,
#notes-screen .topbar.compact h2,
#settings-screen .topbar.compact h2,
#access-screen .topbar.compact h2,
#scenery-screen .topbar.compact h2,
#credits-screen .topbar.compact h2,
#more-screen .topbar.compact h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-ui);
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-transform: none;
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.34);
}

#more-screen .topbar.compact h2 {
  font-size: 31px;
}

.scenery-page {
  display: grid;
  gap: 22px;
  padding: 18px 24px var(--app-bottom-scroll-zone);
}

.scenery-pack,
.scenery-options,
.scenery-card,
.scenery-fixed-sheet {
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 72px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(0.78);
}

.scenery-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.scenery-pack-copy {
  display: grid;
  gap: 4px;
}

.scenery-pack-copy span,
.scenery-pack-status,
.scenery-option-row small {
  color: rgba(255, 255, 255, 0.46);
  font: 500 12px/1.25 var(--font-ui);
  text-transform: lowercase;
}

.scenery-pack-copy strong {
  color: rgba(255, 255, 255, 0.94);
  font: 700 24px/1 var(--font-ui);
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.scenery-pack-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.scenery-options {
  overflow: hidden;
}

.scenery-option-row {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.scenery-option-row > span:first-child {
  display: grid;
  gap: 5px;
}

.scenery-option-row strong {
  color: rgba(255, 255, 255, 0.94);
  font: 700 18px/1.1 var(--font-ui);
  letter-spacing: -0.03em;
}

.scenery-option-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scenery-scenes {
  display: grid;
  gap: 13px;
}

.scenery-scenes h3 {
  margin: 0 0 0 4px;
  color: rgba(255, 255, 255, 0.34);
  font: 600 13px/1 var(--font-ui);
  letter-spacing: 0;
  text-transform: lowercase;
}

.scenery-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scenery-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 8px;
}

.scenery-card.active {
  border-color: rgba(255, 255, 255, 0.42);
}

.scenery-preview {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background-position: center;
  background-size: cover;
}

.scenery-preview-day {
  background-image: var(--scenery-day-image);
}

.scenery-preview-night {
  background-image: var(--scenery-night-image);
}

.scenery-preview-more {
  background-image: url("./assets/settings-door-bg.webp");
}

.scenery-card strong {
  color: rgba(255, 255, 255, 0.9);
  font: 700 13px/1 var(--font-ui);
  text-align: center;
  text-transform: lowercase;
}

.scenery-fixed-sheet {
  width: min(100%, 420px);
  padding-top: 56px;
}

.scenery-fixed-sheet h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font: 700 26px/1.05 var(--font-ui);
  letter-spacing: -0.03em;
}

.scenery-fixed-sheet p {
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font: 400 14px/1.45 var(--font-ui);
}

.scenery-fixed-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#account-screen .more-list,
#saved-screen .saved-list,
#saved-screen .local-upload,
#notes-screen .notes-list,
#credits-screen .more-list,
#settings-screen .settings-list,
#access-screen .settings-list,
#more-screen .more-groups {
  gap: 16px;
  padding: 18px 24px var(--app-bottom-scroll-zone);
}

#more-screen .more-groups {
  display: grid;
  gap: 28px;
  padding-inline: 48px;
}

#saved-screen .saved-list {
  gap: 12px 10px;
}

#more-screen .more-group {
  display: grid;
  gap: 8px;
}

.more-section-label {
  margin: 0 0 0 4px;
  color: rgba(255, 255, 255, 0.25);
  font: 300 10px/1 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#more-screen .more-group-list {
  display: grid;
  gap: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.055), rgba(238, 231, 214, 0.018)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.22), rgba(18, 20, 17, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 22px 72px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(22px) saturate(0.78);
}

#more-screen .more-credits-link {
  justify-self: start;
  margin-top: 4px;
  border: 0;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.25);
  background: transparent;
  font: 300 13px/1.2 var(--font-ui);
  text-align: left;
}

#account-screen .more-panel,
#saved-screen .saved-card,
#saved-screen .empty-state,
#notes-screen .note-card,
#notes-screen .empty-state,
#settings-screen .settings-card,
#access-screen .settings-card,
#credits-screen .more-panel {
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(238, 231, 214, 0.052), rgba(238, 231, 214, 0.016)),
    linear-gradient(115deg, rgba(48, 43, 31, 0.2), rgba(18, 20, 17, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 72px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(0.78);
}

#account-screen .more-panel,
#saved-screen .saved-card,
#saved-screen .empty-state,
#notes-screen .note-card,
#notes-screen .empty-state,
#access-screen .settings-card,
#credits-screen .more-panel {
  padding: 16px;
}

#account-screen .more-panel,
#saved-screen .saved-card,
#notes-screen .note-card,
#access-screen .settings-card,
#credits-screen .more-panel {
  color: rgba(255, 255, 255, 0.92);
}

#account-screen .more-panel h3,
#saved-screen .saved-card strong,
#notes-screen .note-card strong,
#access-screen .settings-card strong,
#credits-screen .more-panel h3 {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
}

#account-screen .more-panel p,
#saved-screen .saved-card span,
#notes-screen .note-card span,
#access-screen .settings-card p,
#credits-screen .more-panel p,
#credits-screen .more-panel a {
  color: rgba(255, 255, 255, 0.56);
}

#access-screen .settings-groups,
#settings-screen .settings-groups {
  display: grid;
  gap: 28px;
}

#access-screen .settings-group,
#settings-screen .settings-group {
  display: grid;
  gap: 8px;
}

#access-screen .settings-card,
#settings-screen .settings-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.discovery-mood-axis-list {
  display: grid;
  gap: 18px;
}

.discovery-mood-expanded {
  display: grid;
  gap: 14px;
}

.discovery-mood-expanded summary {
  min-height: 36px;
}

.discovery-mood-axis .room-mood-status-row small {
  color: rgba(255, 252, 244, 0.56);
}

.discovery-mood-axis.is-active .room-mood-status-row small {
  color: rgba(255, 252, 244, 0.92);
}

.dream-retriever-editor-panel .settings-key-status {
  min-height: 14px;
  margin: 0;
}

#more-screen .menu-card {
  position: relative;
  width: 100%;
  min-height: 62px;
  justify-content: flex-start;
  padding: 0 44px 0 20px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.052);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
  backdrop-filter: none;
}

#more-screen .menu-card:nth-child(odd),
#more-screen .menu-card:nth-child(even) {
  opacity: 1;
  transform: none;
}

#more-screen .menu-card:last-child {
  border-bottom: 0;
}

#more-screen .menu-card strong {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
}

#more-screen .more-chevron {
  position: absolute;
  right: 17px;
  top: 50%;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.24));
}

#access-screen .setting-row,
#settings-screen .setting-row {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.95);
  font: 600 24px/1.08 var(--font-ui);
  letter-spacing: -0.045em;
  text-decoration: none;
}

#access-screen .setting-row:last-child,
#settings-screen .setting-row:last-child {
  border-bottom: 0;
}

#access-screen .setting-row > span:first-child,
#settings-screen .setting-row > span:first-child {
  min-width: 0;
}

#settings-screen .settings-select-row select {
  flex: 0 1 260px;
  width: min(260px, 58%);
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(30, 28, 38, 0.72);
  color: rgba(255, 252, 244, 0.94);
  font: 400 13px/1.1 var(--font-ui);
}

#access-screen .setting-row input[type="checkbox"],
#settings-screen .setting-row input[type="checkbox"] {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 34px;
  margin: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.16);
  transition: background 180ms ease, border-color 180ms ease;
}

#access-screen .setting-row input[type="checkbox"]::after,
#settings-screen .setting-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, background 180ms ease;
}

#access-screen .setting-row input[type="checkbox"]:checked,
#settings-screen .setting-row input[type="checkbox"]:checked {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.28);
}

#access-screen .setting-row input[type="checkbox"]:checked::after,
#settings-screen .setting-row input[type="checkbox"]:checked::after {
  transform: translateX(24px);
  background: #fff;
}

#access-screen .settings-key-row,
#settings-screen .settings-key-row {
  min-height: 104px;
  align-items: stretch;
  padding-top: 16px;
  padding-bottom: 16px;
}

#access-screen .settings-key-block,
#settings-screen .settings-key-block {
  width: min(240px, 58%);
  display: grid;
  gap: 5px;
  align-self: center;
}

#access-screen .settings-key-form,
#settings-screen .settings-key-form {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  margin: 0;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(8, 10, 9, 0.22);
  overflow: hidden;
}

#access-screen .settings-key-form input,
#settings-screen .settings-key-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: 400 12px/1 var(--font-ui);
  letter-spacing: 0;
}

#access-screen .settings-key-form input::placeholder,
#settings-screen .settings-key-form input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

#access-screen .settings-key-form .soft-button,
#settings-screen .settings-key-form .soft-button {
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: none;
}

#access-screen .settings-link-row,
#settings-screen .settings-link-row {
  min-height: 86px;
}

#access-screen .settings-chevron,
#settings-screen .settings-chevron {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.48);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
}

#access-screen .settings-key-status,
#settings-screen .settings-key-status {
  min-height: 14px;
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.3);
  font: 300 11px/1.25 var(--font-ui);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.36);
}

@media (max-width: 380px) {
  #access-screen .setting-row,
  #settings-screen .setting-row {
    min-height: 78px;
    padding-inline: 20px;
    font-size: 21px;
  }

  #access-screen .settings-key-row,
  #settings-screen .settings-key-row {
    display: grid;
    align-content: center;
    gap: 12px;
  }

  #access-screen .settings-key-block,
  #settings-screen .settings-key-block {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 0;
    width: var(--app-vw, 100vw);
    height: var(--app-vh, 100dvh);
    min-height: 0;
    place-items: stretch;
  }

  .phone {
    width: var(--app-vw, 100vw);
    height: var(--app-vh, 100dvh);
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  @supports not (height: 100dvh) {
    .phone {
      height: 100svh;
    }
  }

  .onboarding {
    padding-top: 14px;
    padding-bottom: 22px;
  }

  .tabbar {
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 46px));
    width: min(202px, calc(100% - 172px));
  }
}

body.layout-phone-preview {
  --app-frame-padding: 8px;
  --app-frame-width: min(calc(var(--app-vw, 100vw) - 16px), 430px);
  --app-frame-height: min(calc(var(--app-vh, 100dvh) - 16px), 980px);
}

body.layout-phone-preview .shell {
  width: 100%;
  height: var(--app-vh, 100dvh);
  min-height: var(--app-vh, 100dvh);
  padding: var(--app-frame-padding);
  place-items: center;
}

body.layout-phone-preview .phone {
  width: var(--app-frame-width);
  max-width: calc(100vw - 16px);
  height: var(--app-frame-height);
  max-height: calc(var(--app-vh, 100dvh) - 16px);
  min-height: min(100%, var(--app-frame-height));
  border: 1px solid rgba(238, 235, 219, 0.075);
  border-radius: 28px;
  overflow: hidden;
}

body.device-mobile:not(.layout-desktop),
body.layout-phone-preview:not(.layout-desktop) {
  --mobile-studio-top: max(42px, calc(env(safe-area-inset-top) + 20px));
}

body.device-mobile:not(.layout-desktop) #studio-screen,
body.layout-phone-preview:not(.layout-desktop) #studio-screen {
  padding-top: var(--mobile-studio-top);
}

body.device-mobile:not(.layout-desktop) #studio-screen .studio-tools,
body.layout-phone-preview:not(.layout-desktop) #studio-screen .studio-tools {
  top: var(--mobile-studio-top);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
