:root {
  --ink: #f4edf7;
  --panel: rgba(37, 30, 43, 0.92);
  --panel-solid: #251e2b;
  --muted: #c5b8cc;
  --accent: #0b6f68;
  --accent-soft: #dcefed;
  --warn: #9f4c20;
  --shadow: 0 18px 54px rgba(8, 6, 12, 0.36);
  --rr-shell-bg: #17101d;
  --rr-shell-edge: #2e2037;
  --rr-rail-bg: rgba(43, 34, 50, 0.76);
  --rr-rail-border: rgba(236, 218, 247, 0.14);
  --rr-rail-shadow: rgba(8, 6, 12, 0.34);
  --font-ui: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-chat: "Patrick Hand", "Comic Sans MS", "Trebuchet MS", cursive;
  --font-copy: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --app-viewport-height: 100vh;
  font-family: var(--font-ui);
}

@supports (height: 100svh) {
  :root {
    --app-viewport-height: 100svh;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--rr-shell-bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

img,
video,
canvas {
  -webkit-user-drag: none;
  user-select: none;
}

.room-app {
  min-height: var(--app-viewport-height);
}

.brand-logo {
  position: fixed;
  left: max(24px, env(safe-area-inset-left));
  top: max(22px, env(safe-area-inset-top));
  z-index: 27;
  width: clamp(150px, 10.5vw, 214px);
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 24px rgba(26, 31, 35, 0.16));
}

.room-viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(68px, 7vh, 104px) clamp(226px, 15.5vw, 300px) clamp(126px, 15vh, 166px) clamp(188px, 13.5vw, 270px);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07) 0,
      rgba(255, 255, 255, 0.07) 1px,
      rgba(120, 70, 140, 0.022) 2px,
      rgba(120, 70, 140, 0.022) 4px
    ),
    radial-gradient(circle at 50% 38%, rgba(87, 64, 96, 0.42), rgba(255, 255, 255, 0) 48%),
    linear-gradient(90deg, #100b15 0%, var(--rr-shell-edge) 12%, #201728 28%, #261c2f 50%, #201728 72%, var(--rr-shell-edge) 88%, #100b15 100%);
}

.canvas-shell {
  position: relative;
  width: min(70vw, calc(177.7778vh - 306px));
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  filter: drop-shadow(0 24px 58px rgba(0, 0, 0, 0.36));
}

.room-presence-strip {
  position: absolute;
  left: 50%;
  top: 10px;
  z-index: 24;
  display: flex;
  max-width: min(76%, 520px);
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(42, 32, 48, 0.14);
  border-radius: 999px;
  background: rgba(255, 252, 255, 0.86);
  box-shadow: 0 12px 30px rgba(76, 45, 96, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.room-presence-strip.has-occupants {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.room-presence-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 860;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(18, 22, 26, 0.32);
  box-shadow: 0 5px 12px rgba(76, 45, 96, 0.18);
}

.room-presence-avatar.has-image {
  background: rgba(255, 255, 255, 0.82);
  text-shadow: none;
}

.room-presence-avatar.is-current-user {
  outline: 2px solid rgba(0, 184, 201, 0.74);
  outline-offset: 2px;
}

.room-presence-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.room-presence-avatar .custom-standee,
.chat-avatar .custom-standee {
  width: 132%;
  height: 132%;
  align-self: end;
  filter: none;
}

.sky-layer,
.room-canvas,
.light-canvas,
.window-layer,
.door-layer,
.sign-layer,
.frame-layer,
.furniture-layer,
.ceiling-layer,
.lighting-layer,
.light-object-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sky-layer {
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: #93cbea;
}

.sky-layer.is-active {
  opacity: 1;
}

.sky-media-plane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  transform-origin: center;
}

.sky-media-plane.is-motion-pan-zoom,
.sky-media-plane.is-motion-scroll-x,
.window-exterior-plane.is-motion-pan-zoom,
.window-exterior-plane.is-motion-scroll-x {
  will-change: transform, background-position;
}

.sky-media-plane video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sky-media-plane.is-motion-pan-zoom,
.window-exterior-plane.is-motion-pan-zoom {
  animation: skyPanZoomDrift 50s ease-in-out infinite;
}

.sky-media-plane.is-motion-scroll-x,
.window-exterior-plane.is-motion-scroll-x {
  animation: skyScrollX 36s linear infinite;
}

@keyframes skyPanZoomDrift {
  0% {
    transform: scale(1) translateX(0%);
  }
  33% {
    transform: scale(1.1) translateX(2.8%);
  }
  66% {
    transform: scale(1.04) translateX(-2.4%);
  }
  100% {
    transform: scale(1) translateX(0%);
  }
}

@keyframes skyScrollX {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.room-canvas {
  z-index: 1;
  display: block;
  cursor: default;
}

.light-canvas {
  z-index: 2;
  display: block;
  pointer-events: none;
}

.room-canvas.is-paint-mode {
  cursor: pointer;
}

.window-layer {
  z-index: 3;
  pointer-events: none;
}

.door-layer {
  z-index: 3;
  pointer-events: none;
}

.sign-layer {
  z-index: 4;
  pointer-events: none;
}

.window-layer.is-window-mode {
  pointer-events: auto;
  cursor: crosshair;
}

.door-layer.is-door-mode {
  pointer-events: auto;
  cursor: crosshair;
}

.door-layer.is-view-mode {
  pointer-events: auto;
}

.door-layer.is-view-mode .door-item,
.door-layer.is-read-only .door-item,
.door-item.can-enter-door {
  cursor: pointer;
}

.sign-layer.is-sign-mode {
  pointer-events: auto;
  cursor: crosshair;
}

.window-layer.is-select-mode,
.sign-layer.is-select-mode,
.frame-layer.is-select-mode,
.furniture-layer.is-select-mode,
.ceiling-layer.is-select-mode,
.light-object-layer.is-select-mode {
  pointer-events: none;
}

.window-layer.is-select-mode .window-item,
.sign-layer.is-select-mode .sign-item,
.frame-layer.is-select-mode .frame-item,
.furniture-layer.is-select-mode .furniture-item,
.ceiling-layer.is-select-mode .ceiling-item,
.light-object-layer.is-select-mode .light-handle {
  pointer-events: auto;
}

.door-layer.is-select-mode {
  pointer-events: auto;
}

.frame-layer {
  z-index: 4;
  pointer-events: none;
}

.frame-layer.is-frame-mode {
  pointer-events: auto;
  cursor: crosshair;
}

.window-layer.is-read-only,
.sign-layer.is-read-only,
.frame-layer.is-read-only,
.furniture-layer.is-read-only,
.ceiling-layer.is-read-only,
.light-object-layer.is-read-only {
  pointer-events: none;
}

.door-layer.is-read-only {
  pointer-events: auto;
}

.furniture-layer {
  z-index: 5;
  pointer-events: none;
}

.furniture-layer.is-furniture-mode {
  pointer-events: auto;
}

.ceiling-layer {
  z-index: 6;
  pointer-events: none;
}

.ceiling-layer.is-ceiling-mode {
  pointer-events: auto;
}

.lighting-layer {
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.lighting-layer.is-active {
  opacity: 1;
}

.lighting-layer::before,
.lighting-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lighting-layer::before {
  background: rgba(var(--lighting-tint-rgb, 255, 190, 105), var(--lighting-tint-opacity, 0));
  mix-blend-mode: soft-light;
}

.lighting-layer::after {
  background:
    radial-gradient(
      circle at var(--lighting-focus-x, 50%) var(--lighting-focus-y, 34%),
      rgba(0, 0, 0, var(--lighting-focus-darkness, 0)) 0%,
      rgba(0, 0, 0, var(--lighting-focus-darkness, 0)) calc(var(--lighting-focus-size, 38%) * 0.62),
      rgba(0, 0, 0, var(--lighting-mid-darkness, 0)) var(--lighting-focus-size, 38%),
      rgba(0, 0, 0, var(--lighting-darkness, 0)) calc(var(--lighting-focus-size, 38%) + 18%)
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, calc(var(--lighting-vignette, 0) * 0.45)) 68%,
      rgba(0, 0, 0, var(--lighting-vignette, 0)) 100%
    ),
    rgba(0, 0, 0, var(--lighting-darkness, 0));
  mix-blend-mode: normal;
}

.light-object-layer {
  z-index: 19;
  pointer-events: none;
}

.light-object-layer.is-lighting-mode {
  pointer-events: auto;
}

.light-object-layer:not(.is-lighting-mode) .light-handle {
  display: none;
}

.light-object-layer.is-select-mode .light-handle {
  display: block;
  pointer-events: auto;
}

.light-handle {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--light-color);
  box-shadow:
    0 0 0 2px rgba(24, 27, 30, 0.48),
    0 0 var(--light-preview-size) color-mix(in srgb, var(--light-color) 62%, transparent);
  transform: translate(-50%, -50%);
  cursor: grab;
}

.light-handle.is-selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 6px rgba(11, 111, 104, 0.38),
    0 0 var(--light-preview-size) color-mix(in srgb, var(--light-color) 72%, transparent);
}

.light-handle:active {
  cursor: grabbing;
}

.room-transition {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%),
    rgba(13, 17, 20, 0.86);
  color: #f7f2e8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.room-transition.is-active {
  opacity: 1;
  pointer-events: auto;
}

.room-transition[hidden] {
  display: none;
}

.route-notice {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 22;
  max-width: min(520px, calc(100% - 28px));
  padding: 9px 12px;
  border: 1px solid rgba(159, 76, 32, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.94);
  color: #6f3518;
  box-shadow: 0 10px 32px rgba(22, 27, 31, 0.14);
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.notification-stack {
  position: absolute;
  right: 14px;
  top: 58px;
  z-index: 39;
  width: min(340px, calc(100% - 28px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.notification-toast {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 10px 10px 0;
  border: 1px solid rgba(18, 25, 32, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 16px 40px rgba(14, 20, 27, 0.2);
  color: #1e252b;
  pointer-events: auto;
  animation: notificationIn 160ms ease-out;
}

.notification-toast::before {
  content: "";
  width: 6px;
  align-self: stretch;
  border-radius: 8px 0 0 8px;
  background: #4f7f63;
}

.notification-toast.is-warning::before {
  background: #b35b28;
}

.notification-toast.is-market::before {
  background: #7b5eb5;
}

.notification-toast.is-visitor::before {
  background: #2d7f91;
}

.notification-toast.is-achievement::before {
  background: #b38a1e;
}

.notification-toast strong {
  display: block;
  margin: 0 0 2px;
  font-size: 0.78rem;
  line-height: 1.2;
}

.notification-toast span {
  display: block;
  color: #4d5861;
  font-size: 0.74rem;
  line-height: 1.28;
}

.notification-toast button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #69737a;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.notification-toast button:hover,
.notification-toast button:focus-visible {
  background: rgba(20, 25, 31, 0.08);
  color: #1f252b;
  outline: none;
}

@keyframes notificationIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.object-context-menu {
  position: absolute;
  z-index: 40;
  width: 178px;
  padding: 6px;
  border: 1px solid rgba(18, 25, 32, 0.16);
  border-radius: 8px;
  background: rgba(20, 25, 31, 0.96);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(12, 16, 20, 0.28);
  backdrop-filter: blur(18px);
}

.object-context-title {
  overflow: hidden;
  padding: 6px 7px 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-context-menu button {
  width: 100%;
  min-height: 32px;
  display: block;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.82rem;
  text-align: left;
}

.object-context-menu button:hover,
.object-context-menu button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.room-transition-content {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px 22px;
  border: 1px solid rgba(247, 242, 232, 0.2);
  border-radius: 8px;
  background: rgba(18, 22, 25, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.room-transition-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(247, 242, 232, 0.28);
  border-top-color: #f7f2e8;
  border-radius: 50%;
  animation: room-transition-spin 780ms linear infinite;
}

.room-transition-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.canvas-shell.is-capturing-room .resize-handle,
.canvas-shell.is-capturing-room .frame-mini-actions,
.canvas-shell.is-capturing-room .draft-box,
.canvas-shell.is-capturing-room .light-handle,
.canvas-shell.is-capturing-room .ceiling-anchor {
  display: none !important;
}

.canvas-shell.is-capturing-room .furniture-item.is-selected,
.canvas-shell.is-capturing-room .ceiling-item.is-selected {
  outline: 0 !important;
}

.canvas-shell.is-capturing-room .sign-item.is-selected {
  box-shadow:
    inset 0 0 0 2px rgba(32, 35, 38, 0.16),
    0 8px 18px rgba(20, 24, 28, 0.15);
}

.canvas-shell.is-capturing-room .window-item.is-selected {
  box-shadow:
    0 2px 0 rgba(255, 249, 231, 0.38),
    0 10px 20px rgba(20, 24, 28, 0.16);
}

.canvas-shell.is-capturing-room .door-item.is-selected {
  box-shadow:
    inset 0 0 0 2px rgba(42, 29, 20, 0.2),
    0 9px 20px rgba(20, 24, 28, 0.18);
}

.canvas-shell.is-capturing-room .frame-item.is-selected {
  box-shadow: 0 8px 18px rgba(20, 24, 28, 0.16);
}

.canvas-shell.is-capturing-room .frame-item.is-selected .frame-linework polygon {
  stroke: #22272b;
}

@keyframes room-transition-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-transition,
  .room-transition-spinner {
    animation: none;
    transition: none;
  }
}

.window-item,
.door-item,
.sign-item,
.frame-item {
  position: absolute;
  min-width: 24px;
  min-height: 24px;
  overflow: hidden;
  pointer-events: auto;
}

.sign-item {
  background: #fff3b8;
  border: 0;
  box-shadow:
    inset 0 0 0 2px rgba(32, 35, 38, 0.16),
    0 8px 18px rgba(20, 24, 28, 0.15);
  cursor: move;
}

.sign-item.is-selected {
  box-shadow:
    0 0 0 2px rgba(11, 111, 104, 0.26),
    inset 0 0 0 2px rgba(32, 35, 38, 0.2),
    0 9px 20px rgba(20, 24, 28, 0.17);
}

.sign-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
  color: #1e2327;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
  transform-origin: top left;
}

.sign-linework {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.sign-linework polygon {
  fill: none;
  stroke: rgba(28, 31, 34, 0.82);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.window-item {
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 2px 0 rgba(255, 249, 231, 0.38),
    0 10px 20px rgba(20, 24, 28, 0.16);
  cursor: move;
}

.door-item {
  --door-panel-fill: rgba(104, 68, 43, 0.5);
  --door-line: #211a14;
  --door-knob: #e4c075;
  --door-reveal: rgba(62, 42, 28, 0.62);
  background: transparent;
  box-shadow: none;
  cursor: move;
}

.door-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 244, 220, 0.08) 0,
      rgba(255, 244, 220, 0.08) 5px,
      rgba(55, 38, 27, 0.13) 6px,
      rgba(55, 38, 27, 0.13) 10px
    ),
    linear-gradient(90deg, rgba(55, 38, 27, 0.34), rgba(255, 244, 220, 0.18) 22%, rgba(43, 29, 20, 0.34)),
    #8b5f3e;
  box-shadow:
    inset 8px 0 10px rgba(19, 13, 9, 0.26),
    inset -8px 0 10px rgba(255, 246, 222, 0.14),
    0 12px 20px rgba(20, 24, 28, 0.2);
}

.door-item[data-door-texture="painted"] .door-visual {
  --door-panel-fill: rgba(88, 127, 154, 0.38);
  --door-line: #162f3c;
  --door-knob: #f2dfaa;
  --door-reveal: rgba(36, 65, 84, 0.6);
  background:
    linear-gradient(90deg, rgba(18, 42, 56, 0.28), rgba(241, 249, 252, 0.16) 24%, rgba(18, 42, 56, 0.28)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.08)),
    #6aa5bd;
}

.door-item[data-door-texture="glass"] .door-visual {
  --door-panel-fill: rgba(128, 204, 226, 0.28);
  --door-line: #14313b;
  --door-knob: #d9eef5;
  --door-reveal: rgba(32, 72, 94, 0.58);
  background:
    linear-gradient(124deg, transparent 0 38%, rgba(255, 255, 255, 0.34) 39%, rgba(255, 255, 255, 0.13) 47%, transparent 48%),
    linear-gradient(90deg, rgba(32, 72, 94, 0.24), rgba(230, 248, 255, 0.2) 24%, rgba(32, 72, 94, 0.28)),
    #5a9db2;
}

.door-item[data-door-texture="metal"] .door-visual {
  --door-panel-fill: rgba(124, 132, 137, 0.42);
  --door-line: #20282d;
  --door-knob: #d8d4c8;
  --door-reveal: rgba(58, 65, 70, 0.62);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 2px,
      rgba(0, 0, 0, 0.06) 3px,
      rgba(0, 0, 0, 0.06) 6px
    ),
    linear-gradient(90deg, rgba(73, 76, 78, 0.26), rgba(255, 255, 255, 0.14) 24%, rgba(73, 76, 78, 0.28)),
    #81898d;
}

.door-item.is-selected .door-visual {
  box-shadow:
    0 0 0 2px rgba(11, 111, 104, 0.24),
    inset 8px 0 10px rgba(19, 13, 9, 0.26),
    inset -8px 0 10px rgba(255, 246, 222, 0.14),
    0 10px 22px rgba(20, 24, 28, 0.2);
}

.door-linework {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter:
    drop-shadow(0 1px 0 rgba(255, 246, 222, 0.42))
    drop-shadow(0 3px 3px rgba(23, 18, 13, 0.18));
}

.door-linework polygon,
.door-linework line,
.door-linework circle {
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.door-reveal-fill {
  fill: var(--door-reveal);
  stroke: none;
}

.door-panel-fill {
  fill: var(--door-panel-fill);
  stroke: none;
}

.door-linework polygon,
.door-linework line {
  fill: none;
  stroke: var(--door-line);
  stroke-width: 3;
}

.door-linework [data-role="panelOutline"] {
  stroke-width: 2.2;
}

.door-linework [data-role="threshold"] {
  stroke-width: 4.2;
}

.door-linework circle {
  fill: var(--door-knob);
  stroke: var(--door-line);
  stroke-width: 2.5;
}

.door-item.is-balcony-door {
  --door-panel-fill: rgba(88, 164, 194, 0.38);
  --door-line: #14313b;
  --door-knob: #d9eef5;
  --door-reveal: rgba(32, 72, 94, 0.58);
}

.door-item.is-gallery-door {
  --door-panel-fill: rgba(111, 75, 146, 0.44);
  --door-line: #2c2038;
  --door-knob: #f7df8e;
  --door-reveal: rgba(64, 42, 88, 0.6);
}

.door-item.has-no-destination {
  filter: saturate(0.8);
}

.door-label {
  position: absolute;
  left: 50%;
  top: 8%;
  z-index: 3;
  max-width: 82%;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.92);
  color: #211a14;
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.1;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  transform:
    translate(-50%, 5px)
    rotate(var(--door-label-rotation, 0deg))
    skewX(var(--door-label-skew, 0deg));
  transform-origin: 50% 0;
  white-space: nowrap;
}

.door-item.is-balcony-door .door-label {
  color: #14313b;
}

.door-item.is-gallery-door .door-label {
  color: #2c2038;
}

.door-item.has-no-destination .door-label {
  color: #4d565c;
}

.window-item.is-selected {
  box-shadow:
    0 0 0 2px rgba(11, 111, 104, 0.2),
    0 2px 0 rgba(255, 249, 231, 0.38),
    0 10px 20px rgba(20, 24, 28, 0.18);
}

.window-lip-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.window-lip {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.window-lip-left {
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.3),
    inset -9px 0 13px rgba(28, 22, 17, 0.17),
    2px 0 4px rgba(25, 20, 16, 0.16);
}

.window-lip-right {
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.3),
    inset 9px 0 13px rgba(28, 22, 17, 0.17),
    -2px 0 4px rgba(25, 20, 16, 0.16);
}

.window-lip-bottom {
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 9px 13px rgba(28, 22, 17, 0.16),
    0 -2px 5px rgba(25, 20, 16, 0.16);
}

.window-linework {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
  filter:
    drop-shadow(0 1px 0 rgba(255, 246, 222, 0.5))
    drop-shadow(0 3px 3px rgba(23, 18, 13, 0.22));
}

.window-linework path,
.window-linework line,
.window-linework polygon {
  fill: none;
  stroke: #241f19;
  stroke-width: 3.2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.window-linework .window-trim-fill {
  fill: rgba(248, 238, 214, 0.16);
  stroke: none;
}

.window-exterior {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.window-exterior-plane {
  position: absolute;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  transform-origin: top left;
}

.window-exterior-plane video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sky-view-controls{display:grid;gap:10px;padding:12px;border:1px solid #d9cfe3;border-radius:12px;background:#faf7fc;}
.sky-view-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#584364;}
.sky-view-heading .plain-button{width:auto;padding:5px 9px;font-size:.74rem;}
.sky-view-controls .field{font-size:.8rem;}
.sky-view-controls output{font-size:.75rem;color:#6a4b83;}
.sky-view-controls input[type="range"]{accent-color:#775099;}
.sky-zoom-hints{display:flex;justify-content:space-between;margin-top:-6px;font-size:.68rem;color:#7e6a8b;}
.sky-view-controls #skySmallerStars{padding:7px;font-size:.76rem;background:#eee4f6;color:#60467b;border-color:#d7c4e6;}
.sky-motion-controls{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:12px;align-items:end;}
.sky-motion-controls[hidden]{display:none;}
.sky-motion-controls select{min-width:0;width:100%;padding:6px;}
.sky-view-note{margin:0;font-size:.7rem;color:#7e6a8b;}
@media(prefers-reduced-motion:reduce){
  .sky-media-plane.is-motion-pan-zoom,.sky-media-plane.is-motion-scroll-x,
  .window-exterior-plane.is-motion-pan-zoom,.window-exterior-plane.is-motion-scroll-x{animation:none;}
}

.frame-item {
  border: 0;
  --frame-style-stroke: #22272b;
  --frame-style-mat: #fffdf7;
  --frame-style-accent: #6f747b;
  --frame-style-shadow: rgba(20, 24, 28, 0.18);
  --frame-style-stroke-width: 2.2;
  --frame-thickness: 10px;
  background: var(--frame-style-mat);
  box-shadow:
    inset 0 0 0 calc(var(--frame-thickness) * 0.58) color-mix(in srgb, var(--frame-style-mat) 82%, white),
    inset 0 0 0 var(--frame-thickness) color-mix(in srgb, var(--frame-style-stroke) 28%, transparent),
    0 8px 18px var(--frame-style-shadow);
  cursor: move;
  isolation: isolate;
}

.frame-item.is-selected {
  box-shadow:
    inset 0 0 0 calc(var(--frame-thickness) * 0.58) color-mix(in srgb, var(--frame-style-mat) 82%, white),
    inset 0 0 0 var(--frame-thickness) color-mix(in srgb, var(--frame-style-accent) 30%, transparent),
    0 0 0 2px rgba(11, 111, 104, 0.22),
    0 8px 18px rgba(20, 24, 28, 0.18);
}

.frame-item.is-media-frame {
  box-shadow:
    0 0 0 1px rgba(42, 32, 48, 0.36),
    0 9px 22px rgba(20, 24, 28, 0.2);
}

.frame-item.is-media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border: calc(var(--frame-thickness) * 0.5) solid color-mix(in srgb, var(--frame-style-mat) 88%, white);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--frame-style-stroke) 54%, transparent),
    0 0 0 1px color-mix(in srgb, var(--frame-style-stroke) 28%, transparent);
  pointer-events: none;
}

.frame-item.is-media-frame.is-selected::before {
  border-color: rgba(197, 244, 247, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(42, 32, 48, 0.5),
    0 0 0 1px rgba(11, 111, 104, 0.44);
}

.frame-hitbox {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: move;
  background: transparent;
}

.frame-item img,
.special-frame-embed,
.special-frame-empty {
  position: absolute;
  inset: var(--frame-thickness);
  z-index: 1;
  width: calc(100% - (var(--frame-thickness) * 2));
  height: calc(100% - (var(--frame-thickness) * 2));
  display: block;
}

.frame-item img {
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.special-frame-embed {
  border: 0;
}

.spotify-frame-embed {
  background: #121212;
}

.youtube-frame-embed {
  background: #0f0f0f;
}

.frame-layer:not(.is-read-only) .special-frame-embed,
.frame-layer:not(.is-read-only) .special-frame-empty {
  pointer-events: none;
}

.frame-layer:not(.is-read-only) .frame-item.is-player-active .special-frame-embed {
  pointer-events: auto;
}

.frame-layer:not(.is-read-only) .frame-item.is-player-active .frame-hitbox {
  pointer-events: none;
}

.frame-layer:not(.is-read-only) .frame-item.is-player-active {
  cursor: default;
}

.frame-empty,
.special-frame-empty {
  position: absolute;
  inset: var(--frame-thickness);
  width: calc(100% - (var(--frame-thickness) * 2));
  height: calc(100% - (var(--frame-thickness) * 2));
}

.frame-empty {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.28) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.28) 50% 75%, transparent 75%),
    rgba(255, 255, 255, 0.15);
  background-size: 18px 18px;
}

.special-frame-empty {
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.spotify-frame-empty {
  background: #121212;
  color: #1ed760;
}

.youtube-frame-empty {
  background: #0f0f0f;
  color: #ff2b2b;
}

.special-frame-edit-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 248, 242, 0.26), rgba(197, 244, 247, 0.18)),
    rgba(17, 19, 22, 0.18);
  color: transparent;
}

.frame-linework {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.frame-linework polygon {
  fill: none;
  stroke: var(--frame-style-stroke);
  stroke-width: var(--frame-style-stroke-width);
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.frame-item.is-selected .frame-linework polygon {
  stroke: var(--frame-style-accent);
}

.sticky-note-layer {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}

.sticky-note-item {
  position: absolute;
  width: clamp(22px, 1.8vw, 34px);
  aspect-ratio: 1;
  display: block;
  padding: 0;
  border: 1px solid rgba(63, 47, 14, 0.24);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 42%),
    var(--sticky-note-color, #fff176);
  box-shadow:
    0 4px 7px rgba(18, 16, 13, 0.18),
    inset 0 -5px 9px rgba(95, 75, 12, 0.08);
  cursor: pointer;
  overflow: hidden;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(var(--sticky-note-rotation, -4deg));
}

.sticky-note-item::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 0;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: rgba(255, 255, 255, 0.32);
}

.sticky-note-item:hover,
.sticky-note-item:focus-visible {
  border-color: rgba(11, 111, 104, 0.56);
  outline: none;
  transform: translate(-50%, -53%) rotate(var(--sticky-note-rotation, -4deg));
}

.room-item-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.room-item {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(24px, 2vw, 38px);
  height: clamp(15px, 1.15vw, 22px);
  padding: 0;
  border: 1px solid rgba(20, 24, 29, 0.28);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 38%),
    linear-gradient(#4b5158, #242b33);
  box-shadow:
    0 5px 9px rgba(15, 18, 22, 0.24),
    inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  cursor: default;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(var(--room-item-rotation, -3deg));
}

.room-item.is-owned {
  cursor: pointer;
}

.room-item[data-item-category="cd"] {
  width: clamp(22px, 1.8vw, 34px);
  height: clamp(22px, 1.8vw, 34px);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0 10%, rgba(51, 59, 67, 0.95) 11% 16%, transparent 17%),
    conic-gradient(from 30deg, #e8f7ff, #cfc5ff, #fff5b5, #bff5e8, #e8f7ff);
  box-shadow:
    0 5px 9px rgba(15, 18, 22, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.room-item[data-item-category="microCassette"],
.room-item[data-item-category="miniCassette"] {
  width: clamp(20px, 1.55vw, 30px);
  height: clamp(12px, 0.95vw, 18px);
}

.room-item[data-item-category="mixtape"] {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 38%),
    linear-gradient(#7b426e, #37233b);
}

.room-item::before,
.room-item::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 2px rgba(31, 37, 43, 0.34);
  transform: translateY(-50%);
}

.room-item::before {
  left: 18%;
}

.room-item::after {
  right: 18%;
}

.room-item[data-item-category="cd"]::before,
.room-item[data-item-category="cd"]::after {
  display: none;
}

.room-item:hover,
.room-item:focus-visible {
  border-color: rgba(30, 116, 126, 0.62);
  outline: none;
  transform: translate(-50%, -58%) rotate(var(--room-item-rotation, -3deg));
}

.marketplace-item-layer {
  position: absolute;
  inset: 0;
  z-index: 13;
  pointer-events: none;
}

.marketplace-item {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(150px, 17vw, 190px);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(33, 76, 85, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 36px rgba(12, 24, 28, 0.15);
  pointer-events: auto;
  color: #1c2f32;
}

.marketplace-item-visual {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(33, 76, 85, 0.12);
  background: #fff0a8;
  color: #806800;
  font-weight: 780;
  overflow: hidden;
}

.marketplace-item-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.marketplace-item-info {
  display: grid;
  gap: 3px;
}

.marketplace-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 760;
}

.marketplace-item-price {
  font-size: 0.74rem;
  color: #5f5122;
}

.marketplace-item-action {
  display: flex;
  justify-content: flex-end;
}

.marketplace-item-buy {
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 2px;
}

.frame-drag-rim {
  position: absolute;
  z-index: 6;
  display: block;
  pointer-events: auto;
  cursor: move;
}

.frame-item:not(.is-media-frame) .frame-drag-rim {
  display: none;
}

.frame-item.is-read-only .frame-drag-rim {
  display: none;
}

.frame-drag-rim-top {
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
}

.frame-drag-rim-right {
  top: 14px;
  right: 0;
  bottom: 14px;
  width: 14px;
}

.frame-drag-rim-bottom {
  right: 0;
  bottom: 0;
  left: 0;
  height: 14px;
}

.frame-drag-rim-left {
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 14px;
}

.furniture-item {
  position: absolute;
  min-width: 24px;
  min-height: 24px;
  overflow: visible;
  pointer-events: auto;
  transform-origin: 50% 100%;
  cursor: move;
  user-select: none;
}

.furniture-hitbox {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  touch-action: none;
  cursor: inherit;
}

.furniture-item.is-wall-mounted.is-shelf-furniture .furniture-hitbox {
  inset: -10% -8% -18% -8%;
}

.furniture-item.is-wall-mounted.is-shelf-furniture:not(.has-shelf-items) .furniture-hitbox {
  z-index: 6;
}

.furniture-item.is-wall-mounted.is-shelf-furniture.has-shelf-items .furniture-hitbox {
  inset: -10% -8% 24% -8%;
  z-index: 4;
}

.furniture-marketplace-sign {
  position: absolute;
  left: 50%;
  top: -9%;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(102, 74, 0, 0.38);
  border-radius: 99px;
  background: #ffef7a;
  color: #5b3c00;
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1;
  transform: translate(-50%, -50%);
  z-index: 8;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(30, 20, 8, 0.24);
  pointer-events: auto;
  padding-bottom: 1px;
}

.furniture-marketplace-sign:hover,
.furniture-marketplace-sign:focus-visible {
  outline: none;
  border-color: rgba(115, 76, 0, 0.65);
  box-shadow: 0 4px 12px rgba(30, 20, 8, 0.28);
}

.furniture-marketplace-sign[data-marketplace-listed="yes"] {
  border-color: rgba(89, 57, 0, 0.48);
  background: #ffc857;
}

.furniture-marketplace-popover {
  position: absolute;
  left: 50%;
  bottom: 78%;
  transform: translateX(-50%);
  z-index: 9;
  min-width: 130px;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(33, 76, 85, 0.16);
  border-radius: 9px;
  background: rgba(255, 253, 244, 0.96);
  color: #1f2529;
  text-align: left;
  pointer-events: auto;
  box-shadow: 0 9px 18px rgba(19, 28, 32, 0.2);
}

.furniture-marketplace-popover[hidden],
.furniture-marketplace-sign[hidden],
.furniture-marketplace-action[hidden] {
  display: none;
}

.furniture-marketplace-title {
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.furniture-marketplace-price {
  font-size: 0.68rem;
  line-height: 1.1;
  color: #6b4a09;
}

.furniture-marketplace-action {
  justify-self: end;
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 0.68rem;
}

.furniture-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  filter: drop-shadow(0 7px 7px rgba(18, 16, 13, 0.18));
  transform: perspective(760px) scaleX(var(--furniture-flip, 1)) rotateY(var(--furniture-turn, 0deg));
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
}

.door-visual {
  pointer-events: none;
}

.furniture-item.is-wall-mounted {
  transform-origin: 50% 50%;
}

.furniture-item.is-wall-mounted .furniture-image {
  object-position: center center;
  filter: drop-shadow(0 5px 5px rgba(18, 16, 13, 0.2));
  transform: scaleX(var(--furniture-flip, 1)) rotateZ(var(--furniture-turn, 0deg));
  transform-origin: 50% 50%;
}

.furniture-item.is-wall-mounted.is-shelf-furniture .furniture-image {
  object-fit: fill;
}

.furniture-item.is-floor-decal .furniture-image {
  object-position: center center;
  filter: drop-shadow(0 3px 3px rgba(18, 16, 13, 0.14));
  transform: perspective(780px) rotateX(63deg) rotateZ(var(--furniture-turn, 0deg)) scaleX(var(--furniture-flip, 1));
  transform-origin: 50% 50%;
}

.furniture-shelf-items {
  position: absolute;
  z-index: 5;
  left: 7%;
  right: 7%;
  top: auto;
  bottom: 50%;
  height: 52%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(4px, 1.05%, 14px);
  box-sizing: border-box;
  padding: 0 8%;
  pointer-events: none;
}

.furniture-item.is-standing-sprite.is-shelf-furniture .furniture-shelf-items {
  left: 25%;
  right: 25%;
  top: 12%;
  bottom: 28%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  align-items: end;
  justify-items: center;
  gap: 13% 8%;
  padding: 0 2% 2%;
}

.furniture-item.is-bookshelf-left .furniture-shelf-items {
  left: 31%;
  right: 29%;
  top: 12%;
  bottom: 28%;
  transform: perspective(520px) rotateY(-8deg) skewY(0.5deg);
  transform-origin: right center;
}

.furniture-item.is-bookshelf-right .furniture-shelf-items {
  left: 43%;
  right: 17%;
  top: 12%;
  bottom: 28%;
  transform: perspective(520px) rotateY(8deg) skewY(-0.5deg);
  transform-origin: left center;
}

.furniture-item.is-bookshelf-front .furniture-shelf-items {
  left: 24%;
  right: 24%;
}

.shelf-item {
  position: relative;
  width: clamp(32px, 15%, 72px);
  aspect-ratio: 0.74;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #6f5900;
  cursor: pointer;
  font-size: clamp(0.78rem, 2vw, 1rem);
  font-weight: 850;
  line-height: 1;
  flex: 0 0 auto;
  pointer-events: auto;
  transform:
    translateX(var(--shelf-item-nudge, 0%))
    translateY(var(--shelf-item-shift-y, 0%))
    rotate(var(--shelf-item-tilt, -3deg));
  transform-origin: 50% 100%;
  transition: transform 120ms ease, filter 120ms ease;
}

.shelf-item[data-display-size="small"] {
  width: clamp(24px, 10%, 44px);
}

.shelf-item[data-display-size="medium"] {
  width: clamp(34px, 15%, 68px);
}

.shelf-item[data-display-size="big"] {
  width: clamp(48px, 22%, 96px);
}

.furniture-item.is-standing-sprite.is-shelf-furniture .shelf-item {
  width: clamp(22px, 44%, 34px);
  align-self: end;
  transform:
    translateX(var(--shelf-item-nudge, 0%))
    translateY(var(--shelf-item-shift-y, 0%))
    rotate(var(--shelf-item-tilt, -2deg));
}

.furniture-item.is-standing-sprite.is-shelf-furniture .shelf-item[data-display-size="small"] {
  width: clamp(18px, 34%, 26px);
}

.furniture-item.is-standing-sprite.is-shelf-furniture .shelf-item[data-display-size="big"] {
  width: clamp(28px, 54%, 42px);
}

.furniture-item.is-standing-sprite.is-shelf-furniture .shelf-item:nth-child(2n) {
  transform:
    translateX(var(--shelf-item-nudge, 0%))
    translateY(var(--shelf-item-shift-y, 0%))
    rotate(var(--shelf-item-tilt, 2deg));
}

.furniture-item.is-bookshelf-furniture .shelf-item-book,
.furniture-item.is-bookshelf-furniture .shelf-item-journal {
  width: clamp(16px, 30%, 22px);
}

.furniture-item.is-bookshelf-furniture .shelf-item-book[data-display-size="big"],
.furniture-item.is-bookshelf-furniture .shelf-item-journal[data-display-size="big"] {
  width: clamp(21px, 40%, 29px);
}

.furniture-item.is-bookshelf-furniture .shelf-item.is-bookish[data-book-pose="stack-low"],
.furniture-item.is-bookshelf-furniture .shelf-item.is-bookish[data-book-pose="stack-high"] {
  aspect-ratio: 0.42;
  margin-left: 0;
  margin-right: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 0.58rem;
}

.shelf-item-cd {
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 4px 7px rgba(18, 16, 13, 0.2);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 9%, rgba(76, 45, 96, 0.32) 10% 18%, transparent 19%),
    conic-gradient(from 40deg, #e8fbff, #f9d8ff, #fff6b0, #d5f1ff, #e8fbff);
  color: #4c2d60;
}

.shelf-item-cassette,
.shelf-item-microCassette,
.shelf-item-miniCassette,
.shelf-item-mixtape {
  aspect-ratio: 1.28;
  border-radius: 4px;
  box-shadow: 0 4px 7px rgba(18, 16, 13, 0.2);
  background:
    radial-gradient(circle at 28% 54%, rgba(42, 32, 48, 0.22) 0 10%, transparent 11%),
    radial-gradient(circle at 72% 54%, rgba(42, 32, 48, 0.22) 0 10%, transparent 11%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 209, 226, 0.86)),
    #f4a6c4;
  color: #5d2644;
}

.shelf-item-book,
.shelf-item-journal {
  aspect-ratio: 0.42;
  border-radius: 2px;
  box-shadow: 0 4px 7px rgba(18, 16, 13, 0.2);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32), transparent 28%),
    linear-gradient(180deg, #5a3f8f, #2c6f68);
  color: #fff8d7;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 0.58rem;
}

.shelf-item.is-bookish.has-bookish-before {
  margin-left: -1.5%;
}

.shelf-item.is-bookish.has-bookish-after {
  margin-right: -1.5%;
}

.shelf-item.is-bookish.starts-bookish-run {
  margin-left: clamp(10px, 2.8%, 26px);
}

.shelf-item.is-bookish.ends-bookish-run {
  margin-right: clamp(6px, 1.4%, 18px);
}

.shelf-item.is-bookish[data-book-pose="stack-low"],
.shelf-item.is-bookish[data-book-pose="stack-high"] {
  aspect-ratio: 2.35;
  z-index: 4;
  margin-left: -4%;
  margin-right: -2%;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  font-size: 0.5rem;
}

.shelf-item.is-bookish[data-book-pose="stack-high"] {
  z-index: 5;
  margin-left: -7%;
}

.furniture-item.is-standing-sprite.is-shelf-furniture .shelf-item.is-bookish {
  margin-left: 0;
  margin-right: 0;
}

.shelf-item-journal {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 30%),
    linear-gradient(180deg, #9b325a, #d07956);
}

.shelf-item-shelfDecor {
  aspect-ratio: 1;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.shelf-item-shelfDecor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shelf-item::before {
  content: none;
  position: absolute;
  left: 18%;
  right: 18%;
  top: 28%;
  height: 1px;
  background: rgba(111, 89, 0, 0.26);
  box-shadow: 0 5px 0 rgba(111, 89, 0, 0.2);
}

.shelf-item-shelfDecor::before,
.shelf-item-book::before,
.shelf-item-journal::before {
  display: none;
}

.shelf-item:hover,
.shelf-item:focus-visible {
  border-color: rgba(11, 111, 104, 0.68);
  filter: drop-shadow(0 4px 4px rgba(18, 16, 13, 0.16));
  outline: none;
  transform:
    translateX(var(--shelf-item-nudge, 0%))
    translateY(calc(var(--shelf-item-shift-y, 0%) - 4%))
    rotate(var(--shelf-item-tilt, -3deg));
}

.radio-controls,
.music-device-controls {
  position: absolute;
  left: 50%;
  bottom: 74%;
  z-index: 7;
  width: min(220px, 130%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(42, 32, 48, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 255, 0.92);
  box-shadow: 0 10px 22px rgba(42, 32, 48, 0.18);
  color: #2a2030;
  pointer-events: auto;
  transform: translateX(-50%);
}

.radio-controls[hidden],
.music-device-controls[hidden] {
  display: none;
}

.radio-station-select,
.radio-play-button,
.music-device-select,
.music-device-play-button {
  min-width: 0;
  height: 28px;
  border: 1px solid rgba(42, 32, 48, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.84);
  color: #2a2030;
  font-size: 0.72rem;
  line-height: 1;
}

.radio-station-select {
  padding: 0 6px;
}

.music-device-select {
  padding: 0 6px;
}

.radio-play-button,
.music-device-play-button {
  min-width: 48px;
  padding: 0 8px;
  cursor: pointer;
  font-weight: 820;
}

.radio-volume-control,
.music-volume-control {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  accent-color: #8a6d12;
}

.radio-play-button:disabled,
.radio-station-select:disabled,
.music-device-play-button:disabled,
.music-device-select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.radio-status,
.music-device-status {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #695673;
  font-size: 0.66rem;
  font-weight: 720;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.furniture-shadow {
  position: absolute;
  z-index: 1;
  left: 18%;
  right: 18%;
  bottom: -4%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(21, 18, 14, 0.36), rgba(21, 18, 14, 0) 68%);
  transform: rotateX(62deg) scaleX(var(--furniture-shadow-scale, 1));
  pointer-events: none;
}

.furniture-item:not(.has-shadow) .furniture-shadow {
  display: none;
}

.furniture-item.is-selected {
  outline: 2px solid rgba(11, 111, 104, 0.76);
  outline-offset: 3px;
}

.furniture-item.is-floor-decal.is-selected {
  outline-offset: 1px;
}

.ceiling-item {
  position: absolute;
  min-width: 24px;
  min-height: 24px;
  overflow: visible;
  pointer-events: auto;
  cursor: move;
  user-select: none;
}

.ceiling-anchor {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: -5px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(31, 36, 39, 0.72);
  border-radius: 50%;
  background: rgba(243, 239, 226, 0.86);
  box-shadow: 0 1px 4px rgba(18, 16, 13, 0.24);
  transform: translateX(-50%);
  cursor: grab;
}

.ceiling-anchor:active {
  cursor: grabbing;
}

.ceiling-hanger {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  height: var(--hanger-length);
  transform: translateX(-50%);
  pointer-events: none;
}

.ceiling-item.is-string .ceiling-hanger {
  width: 2px;
  background: rgba(38, 32, 26, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.ceiling-item.is-chain .ceiling-hanger {
  width: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(35, 32, 29, 0.88) 0 5px,
      rgba(255, 255, 255, 0) 5px 10px
    );
}

.ceiling-image {
  position: absolute;
  z-index: 3;
  left: 0;
  top: var(--ceiling-image-top);
  width: 100%;
  height: var(--ceiling-image-height);
  display: none;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 7px 8px rgba(18, 16, 13, 0.22));
}

.ceiling-item.has-image .ceiling-image {
  display: block;
}

.ceiling-placeholder {
  position: absolute;
  z-index: 3;
  left: 12%;
  right: 12%;
  top: var(--ceiling-image-top);
  height: var(--ceiling-image-height);
  display: grid;
  place-items: center;
  border: 1px dashed rgba(31, 36, 39, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.34);
}

.ceiling-item.has-image .ceiling-placeholder {
  display: none;
}

.ceiling-item.is-selected {
  outline: 2px solid rgba(11, 111, 104, 0.76);
  outline-offset: 3px;
}

.frame-mini-actions {
  position: absolute;
  z-index: 8;
  top: 4px;
  right: 4px;
  display: none;
  gap: 4px;
}

.frame-item.is-selected .frame-mini-actions {
  display: flex;
}

.mini-button {
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(32, 35, 38, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f292e;
  font-size: 0.72rem;
  cursor: pointer;
}

.mini-button:hover {
  border-color: rgba(11, 111, 104, 0.55);
  color: var(--accent);
}

.resize-handle {
  position: absolute;
  z-index: 9;
  width: 12px;
  height: 12px;
  border: 1px solid #ffffff;
  border-radius: 2px;
  background: var(--accent);
  display: none;
}

.window-item.is-selected .resize-handle,
.door-item.is-selected .resize-handle,
.sign-item.is-selected .resize-handle,
.frame-item.is-selected .resize-handle,
.furniture-item.is-selected .resize-handle {
  display: block;
}

.ceiling-item.is-selected .resize-handle {
  display: block;
}

.ceiling-item .resize-handle[data-handle="nw"],
.ceiling-item .resize-handle[data-handle="ne"] {
  top: calc(var(--ceiling-image-top) - 6px);
}

.resize-handle[data-handle="nw"] {
  top: -6px;
  left: -6px;
  cursor: nwse-resize;
}

.resize-handle[data-handle="ne"] {
  top: -6px;
  right: -6px;
  cursor: nesw-resize;
}

.resize-handle[data-handle="sw"] {
  bottom: -6px;
  left: -6px;
  cursor: nesw-resize;
}

.resize-handle[data-handle="se"] {
  right: -6px;
  bottom: -6px;
  cursor: nwse-resize;
}

.frame-item.is-media-frame .resize-handle[data-handle="nw"] {
  top: 3px;
  left: 3px;
}

.frame-item.is-media-frame .resize-handle[data-handle="ne"] {
  top: 3px;
  right: 3px;
}

.frame-item.is-media-frame .resize-handle[data-handle="sw"] {
  bottom: 3px;
  left: 3px;
}

.frame-item.is-media-frame .resize-handle[data-handle="se"] {
  right: 3px;
  bottom: 3px;
}

.draft-box {
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(11, 111, 104, 0.12);
  pointer-events: none;
}

.draft-box.is-invalid {
  border-color: var(--warn);
  background: rgba(159, 76, 32, 0.12);
}

.floating-tools {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  top: 50%;
  z-index: 30;
  transform: translateY(-50%);
}

.floating-tools,
.right-orb-rail {
  border: 1px solid var(--rr-rail-border);
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.11) 0,
      rgba(255, 255, 255, 0.11) 1px,
      rgba(120, 70, 140, 0.035) 2px,
      rgba(120, 70, 140, 0.035) 4px
    ),
    var(--rr-rail-bg);
  box-shadow: 0 18px 45px var(--rr-rail-shadow);
  backdrop-filter: blur(18px);
}

.room-back-button {
  --tool-fill: #f3f0fa;
  --tool-border: #b8a9e8;
  --tool-icon: #5c4e9a;
  --tool-glow: rgba(184, 169, 232, 0.22);
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px));
  z-index: 36;
  min-width: 164px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(66, 74, 87, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tool-icon);
  box-shadow: 0 10px 26px rgba(26, 31, 35, 0.12);
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.room-back-button:hover {
  border-color: var(--tool-border);
  background: var(--tool-fill);
  box-shadow: 0 10px 28px var(--tool-glow);
  color: var(--tool-icon);
}

.room-back-button span {
  transform: translateY(-1px);
  font-size: 0.94rem;
  font-weight: 840;
  line-height: 1;
}

.tool-orb-rail {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.tool-orb {
  --tool-fill: #d9faf4;
  --tool-border: #69cfc3;
  --tool-icon: #117b76;
  --tool-glow: rgba(105, 207, 195, 0.26);
  width: clamp(148px, 9.4vw, 188px);
  min-height: 50px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(66, 74, 87, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(26, 31, 35, 0.12);
  color: var(--tool-icon);
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.tool-orb::after {
  content: attr(aria-label);
  min-width: 0;
  color: currentColor;
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.08;
  text-align: left;
  white-space: normal;
}

.tool-orb[data-mode="select"] {
  --tool-fill: #d9faf4;
  --tool-border: #69cfc3;
  --tool-icon: #117b76;
  --tool-glow: rgba(105, 207, 195, 0.26);
}

.tool-orb[data-mode="paint"] {
  --tool-fill: #ffe4f1;
  --tool-border: #f59ac6;
  --tool-icon: #a8326f;
  --tool-glow: rgba(245, 154, 198, 0.26);
}

.tool-orb[data-mode="window"] {
  --tool-fill: #ddebff;
  --tool-border: #82afff;
  --tool-icon: #2c5fa8;
  --tool-glow: rgba(130, 175, 255, 0.26);
}

.tool-orb[data-mode="door"] {
  --tool-fill: #ffe8c7;
  --tool-border: #e6a85e;
  --tool-icon: #8b5a19;
  --tool-glow: rgba(230, 168, 94, 0.26);
}

.tool-orb[data-mode="sign"] {
  --tool-fill: #fff3b8;
  --tool-border: #e6c84f;
  --tool-icon: #806800;
  --tool-glow: rgba(230, 200, 79, 0.24);
}

.tool-orb[data-mode="frame"] {
  --tool-fill: #e8e0ff;
  --tool-border: #a996f2;
  --tool-icon: #5744a6;
  --tool-glow: rgba(169, 150, 242, 0.26);
}

.tool-orb[data-mode="furniture"] {
  --tool-fill: #e2f7d7;
  --tool-border: #91d47d;
  --tool-icon: #3e7a34;
  --tool-glow: rgba(145, 212, 125, 0.26);
}

.tool-orb[data-mode="itemCrafter"] {
  --tool-fill: #fff7cc;
  --tool-border: #e4c753;
  --tool-icon: #806800;
  --tool-glow: rgba(228, 199, 83, 0.24);
}

.tool-orb[data-mode="ceiling"] {
  --tool-fill: #e8f7ff;
  --tool-border: #8fd3f4;
  --tool-icon: #26799e;
  --tool-glow: rgba(143, 211, 244, 0.26);
}

.tool-orb[data-mode="lighting"] {
  --tool-fill: #fff0c9;
  --tool-border: #ffc75f;
  --tool-icon: #9a6400;
  --tool-glow: rgba(255, 199, 95, 0.28);
}

.tool-orb[data-mode="house"] {
  --tool-fill: #f0e7da;
  --tool-border: #c8a985;
  --tool-icon: #6b4f35;
  --tool-glow: rgba(200, 169, 133, 0.24);
}

.tool-orb[data-mode="room"] {
  --tool-fill: #e6e0d8;
  --tool-border: #b8a99a;
  --tool-icon: #5c554d;
  --tool-glow: rgba(184, 169, 154, 0.22);
}

.tool-orb svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tool-orb:not(:disabled):not(.is-disabled):hover,
.tool-orb.is-active {
  border-color: var(--tool-border);
  background: var(--tool-fill);
  box-shadow: 0 12px 32px var(--tool-glow);
  color: var(--tool-icon);
}

.tool-orb.is-active {
  box-shadow: 0 12px 32px var(--tool-glow);
}

.tool-orb:disabled,
.tool-orb.is-disabled,
.mode-button:disabled,
.mode-button.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.right-orb-rail {
  position: fixed;
  left: max(22px, env(safe-area-inset-left));
  top: 50%;
  z-index: 34;
  display: grid;
  gap: 8px;
  width: clamp(196px, 13.2vw, 254px);
  padding: 11px;
  transform: translateY(-50%);
}

.right-rail-orb {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(236, 218, 247, 0.16);
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 38%),
    rgba(255, 252, 255, 0.88);
  color: #3a2d43;
  box-shadow:
    0 14px 30px rgba(8, 6, 12, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
}

.right-rail-orb::after {
  content: attr(title);
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.08;
  text-align: left;
  white-space: normal;
}

.right-rail-orb svg {
  justify-self: center;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.camera-launcher {
  border: 1px solid #7eb6ff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #ddebff;
  box-shadow:
    0 16px 36px rgba(57, 111, 196, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #2c5fa8;
}

.camera-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.camera-launcher:hover,
.camera-launcher.is-capturing {
  border-color: #5f9cf4;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 38%),
    #cfe2ff;
  color: #1f5299;
}

.camera-launcher:disabled {
  cursor: progress;
  opacity: 0.82;
}

.room-video-launcher {
  border: 1px solid #f0a8b6;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #ffe2e9;
  box-shadow:
    0 16px 36px rgba(181, 70, 103, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #a63a58;
}

.room-video-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.room-video-launcher:hover,
.room-video-launcher.is-recording {
  border-color: #e0718d;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 38%),
    #ffd3dd;
  color: #8d2343;
}

.room-video-launcher.is-recording {
  box-shadow:
    0 0 0 3px rgba(237, 84, 124, 0.16),
    0 16px 36px rgba(181, 70, 103, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.mobile-launcher {
  position: relative;
  border: 1px solid #9ab5ff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 38%),
    #e7eeff;
  box-shadow:
    0 16px 36px rgba(78, 101, 188, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #4256a8;
}

.mobile-launcher:hover,
.mobile-launcher.is-active,
.mobile-launcher.has-unread {
  border-color: #6f88e8;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 38%),
    #dbe5ff;
  color: #2f4495;
}

.mobile-launcher.has-unread {
  box-shadow:
    0 0 0 3px rgba(103, 127, 236, 0.14),
    0 16px 36px rgba(78, 101, 188, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.mobile-launcher.has-unread::before {
  content: attr(data-unread-count);
  position: absolute;
  top: 4px;
  left: 34px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d84f88;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(137, 38, 78, 0.28);
  pointer-events: none;
}

.debug-launcher {
  border: 1px solid #b69be8;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 38%),
    #efe5ff;
  box-shadow:
    0 16px 36px rgba(92, 66, 143, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: #5b3f91;
}

.debug-launcher svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.debug-launcher:hover,
.debug-launcher.is-active {
  border-color: #9c7adc;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 38%),
    #e4d5ff;
  color: #4d2f84;
}

.debug-launcher,
.debug-panel {
  display: none !important;
}

.auth-launcher {
  border: 1px solid #7c8fe6;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #e1e7ff;
  box-shadow:
    0 16px 36px rgba(68, 82, 161, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #4151a8;
}

.auth-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.auth-launcher:hover,
.auth-launcher.is-active,
body.is-alpha-authenticated .auth-launcher {
  border-color: #6376dc;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 38%),
    #d1d9ff;
  color: #31429b;
}

.map-launcher {
  border: 1px solid #7cb7df;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #dff4ff;
  box-shadow:
    0 16px 36px rgba(49, 103, 139, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #246c94;
}

.map-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.map-launcher:hover,
.map-launcher.is-active {
  border-color: #5ba5d1;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 38%),
    #cceeff;
  color: #175b82;
}

.tutorial-launcher {
  border: 1px solid #c79dff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 38%),
    #eedfff;
  box-shadow:
    0 16px 36px rgba(118, 79, 182, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.52);
  color: #6e42ab;
}

.tutorial-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tutorial-launcher:hover,
.tutorial-launcher.is-active {
  border-color: #b685f4;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 38%),
    #e7d3ff;
  color: #5f319f;
}

.closet-launcher {
  border: 1px solid #61d4c4;
  background: #d8faf2;
  box-shadow: 0 14px 34px rgba(97, 212, 196, 0.24);
  color: #147e78;
}

.closet-launcher svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.closet-launcher:hover,
.closet-launcher.is-active {
  border-color: #47c9b7;
  background: #c7f7ed;
  color: #0b6f68;
}

.item-inventory-launcher {
  border: 1px solid #e4c753;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #fff7cc;
  box-shadow:
    0 16px 36px rgba(128, 104, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: #806800;
}

.item-inventory-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.item-inventory-launcher:hover,
.item-inventory-launcher.is-active {
  border-color: #d6b83c;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 38%),
    #fff0a8;
  color: #6f5900;
}

.marketplace-launcher {
  border: 1px solid #f0b94d;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #ffd5a0;
  box-shadow:
    0 16px 36px rgba(138, 90, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #8a4f00;
}

.marketplace-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.marketplace-launcher:hover,
.marketplace-launcher.is-active {
  border-color: #d99d2e;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 38%),
    #ffd57b;
  color: #6a4500;
}

.closet-drawer {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(84px, calc(env(safe-area-inset-right) + 84px));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 33;
  width: min(360px, calc(100vw - 104px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(33, 76, 85, 0.16);
  border-radius: 8px;
  background: rgba(250, 255, 252, 0.94);
  box-shadow: 0 22px 64px rgba(26, 45, 47, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 22px));
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: blur(22px);
}

.closet-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.closet-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.closet-drawer-title {
  color: #1f3033;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.15;
}

.closet-drawer-subtitle,
.closet-capacity {
  color: #557072;
  font-size: 0.78rem;
}

.closet-close-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(33, 76, 85, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #24545b;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.slot-usage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.slot-usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(33, 76, 85, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  color: #40575a;
  font-size: 0.78rem;
}

.slot-usage-row strong {
  color: #203539;
  font-size: 0.78rem;
}

.closet-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: #dcefed;
}

.closet-tab {
  min-height: 32px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #547174;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 760;
}

.closet-tab.is-active {
  border-color: rgba(11, 111, 104, 0.16);
  background: #ffffff;
  color: #0b6f68;
  box-shadow: 0 1px 4px rgba(18, 70, 76, 0.08);
}

.closet-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  min-height: 0;
}

.closet-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(33, 76, 85, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.closet-item.is-blueprint {
  border-color: rgba(11, 111, 104, 0.18);
  background: rgba(229, 247, 241, 0.72);
}

.closet-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #e5f1ee;
  color: #356167;
  font-weight: 760;
}

.closet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.closet-item-body {
  min-width: 0;
}

.closet-item-actions {
  display: grid;
  gap: 5px;
  justify-items: stretch;
}

.closet-item-name {
  overflow: hidden;
  color: #203539;
  font-size: 0.86rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.closet-item-name-input {
  width: 100%;
  min-width: 0;
  height: 25px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #203539;
  font-size: 0.86rem;
  font-weight: 720;
}

.closet-item-name-input:hover,
.closet-item-name-input:focus {
  border-color: rgba(33, 76, 85, 0.18);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.closet-item-meta,
.closet-empty {
  color: #657a7c;
  font-size: 0.76rem;
}

.closet-empty {
  padding: 12px;
  border: 1px dashed rgba(33, 76, 85, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.furniture-closet-tools {
  display: grid;
  gap: 8px;
}

.furniture-closet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 7px;
  min-width: 0;
}

.furniture-closet-tile {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 0;
  min-height: 88px;
  padding: 6px;
  border: 1px solid rgba(33, 76, 85, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #25363c;
  cursor: pointer;
}

.furniture-closet-tile:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.furniture-closet-thumb {
  width: 54px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #e5f1ee;
  color: #356167;
  font-size: 0.82rem;
  font-weight: 840;
}

.furniture-closet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.furniture-closet-name {
  width: 100%;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.furniture-closet-empty {
  grid-column: 1 / -1;
  padding: 9px;
  border: 1px dashed rgba(33, 76, 85, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #657a7c;
  font-size: 0.78rem;
  font-weight: 760;
}

.items-drawer-title {
  color: #2d2a18;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.15;
}

.items-drawer-subtitle,
.items-capacity {
  color: #6f641f;
  font-size: 0.78rem;
}

.item-inventory-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: #f3ecce;
}

.item-inventory-tab {
  min-height: 32px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #776223;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 760;
}

.item-inventory-tab.is-active {
  border-color: rgba(127, 102, 20, 0.16);
  background: #ffffff;
  color: #5f4700;
  box-shadow: 0 1px 4px rgba(73, 55, 24, 0.08);
}

.item-inventory-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  min-height: 0;
}

.item-inventory-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(128, 104, 0, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.item-inventory-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff0a8;
  color: #806800;
  font-weight: 800;
}

.item-inventory-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-inventory-body {
  min-width: 0;
}

.item-inventory-name {
  overflow: hidden;
  color: #302b16;
  font-size: 0.86rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-inventory-meta,
.item-inventory-empty {
  color: #776d38;
  font-size: 0.76rem;
}

.item-inventory-actions {
  display: grid;
  gap: 5px;
}

.item-inventory-empty {
  padding: 12px;
  border: 1px dashed rgba(128, 104, 0, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.note-body-input {
  min-height: 172px;
  padding: 10px;
  resize: vertical;
  font-family: var(--font-copy);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.shelf-inventory-controls {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(42, 32, 48, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.shelf-inventory-controls[hidden] {
  display: none;
}

.shelf-inventory-title {
  color: #302b16;
  font-size: 0.76rem;
  font-weight: 780;
}

.shelf-inventory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(128, 104, 0, 0.12);
  border-radius: 7px;
  background: rgba(255, 252, 242, 0.66);
}

.shelf-inventory-name {
  min-width: 0;
  overflow: hidden;
  color: #302b16;
  font-size: 0.76rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-inventory-size {
  max-width: 82px;
  min-height: 28px;
  font-size: 0.72rem;
}

.shelf-inventory-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.shelf-inventory-empty {
  color: #776d38;
  font-size: 0.74rem;
}

.chat-launcher {
  border: 1px solid #b678ff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 38%),
    #e7ccff;
  box-shadow:
    0 16px 36px rgba(110, 53, 184, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.44);
  color: #6e35b8;
}

.chat-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.chat-launcher:hover,
.chat-launcher.is-active {
  border-color: #a15dff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 38%),
    #d9b2ff;
  color: #5f25a8;
}

.profile-launcher {
  border: 1px solid #f09bc4;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #ffe3f0;
  box-shadow:
    0 16px 36px rgba(162, 60, 112, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #a8326f;
}

.profile-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.profile-launcher:hover,
.profile-launcher.is-active {
  border-color: #e576ad;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 38%),
    #ffd4e8;
  color: #90235e;
}

.store-launcher {
  border: 1px solid #f0b94d;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 38%),
    #ffe39a;
  box-shadow:
    0 16px 36px rgba(138, 90, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: #8a5a00;
}

.store-launcher svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.store-launcher:hover,
.store-launcher.is-active {
  border-color: #d99d2e;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 38%),
    #ffd978;
  color: #704800;
}

.map-page,
.news-page {
  position: fixed;
  inset: 0;
  z-index: 24;
  padding: 0;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      rgba(8, 5, 14, 0.22) 2px,
      rgba(8, 5, 14, 0.22) 5px
    ),
    linear-gradient(135deg, #1c1126, #2a1738 44%, #171022);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.roomroom-mobile-page {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  min-height: var(--app-viewport-height);
  place-items: center;
  grid-template-columns: minmax(0, auto) minmax(260px, 360px);
  gap: 30px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 146, 196, 0.14), transparent 30%),
    radial-gradient(circle at 22% 32%, rgba(84, 180, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(34, 10, 44, 0.74), rgba(18, 8, 26, 0.92));
  backdrop-filter: blur(7px);
}

.roomroom-mobile-page[hidden] {
  display: none;
}

.roomroom-mobile-phone {
  width: min(460px, calc(100vw - 28px));
  min-height: min(900px, calc(var(--app-viewport-height) - 28px));
  max-height: calc(var(--app-viewport-height) - 28px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 245, 252, 0.97), rgba(245, 239, 255, 0.96)),
    repeating-linear-gradient(180deg, rgba(76, 42, 96, 0.04) 0, rgba(76, 42, 96, 0.04) 1px, transparent 2px, transparent 5px);
  box-shadow: 0 30px 110px rgba(10, 5, 18, 0.5);
}

.roomroom-mobile-companion-card {
  width: min(340px, calc(100vw - 32px));
  align-self: center;
  justify-self: start;
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 248, 252, 0.96), rgba(248, 242, 255, 0.94)),
    repeating-linear-gradient(180deg, rgba(88, 52, 116, 0.04) 0, rgba(88, 52, 116, 0.04) 1px, transparent 2px, transparent 5px);
  box-shadow: 0 22px 60px rgba(10, 5, 18, 0.32);
  color: #34233f;
}

.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-phone {
  position: relative;
}

.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-phone::after {
  content: "Desktop preview only";
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(34, 18, 45, 0.78);
  color: #fff6fe;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-body {
  filter: blur(1.2px) saturate(0.92);
  opacity: 0.82;
  pointer-events: none;
  user-select: none;
}

.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-home-card,
.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-screen,
.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-viewer,
.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-app-grid,
.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-footer {
  pointer-events: none;
}

.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-header .plain-button,
.roomroom-mobile-page.is-desktop-preview .roomroom-mobile-header .map-close-button {
  pointer-events: auto;
}

.roomroom-mobile-companion-card[hidden] {
  display: none;
}

.roomroom-mobile-companion-kicker {
  color: rgba(85, 56, 103, 0.8);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roomroom-mobile-companion-card strong {
  font-size: 1.18rem;
  line-height: 1.22;
}

.roomroom-mobile-companion-card p {
  margin: 0;
  color: #604d6d;
  line-height: 1.5;
}

.roomroom-mobile-companion-qr {
  width: 180px;
  height: 180px;
  justify-self: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(92, 55, 118, 0.12);
}

.roomroom-mobile-companion-link {
  color: #5c2a86;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.roomroom-mobile-companion-url {
  color: rgba(74, 52, 88, 0.72);
  font-size: 0.78rem;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.roomroom-mobile-companion-copy {
  justify-self: center;
}

.roomroom-mobile-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 6px;
  color: #463251;
  font-size: 0.8rem;
  font-weight: 700;
}

.roomroom-mobile-brand {
  opacity: 0.78;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.roomroom-mobile-notch {
  width: 138px;
  height: 22px;
  justify-self: center;
  margin-bottom: 4px;
  border-radius: 999px;
  background: rgba(35, 23, 44, 0.92);
}

.roomroom-mobile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px 12px;
}

.roomroom-mobile-heading {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: center;
}

.roomroom-mobile-heading strong {
  color: #2f203a;
  font-size: 1.12rem;
  line-height: 1.1;
}

.roomroom-mobile-heading span {
  color: rgba(65, 45, 76, 0.76);
  font-size: 0.76rem;
}

.roomroom-mobile-body {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 0 16px 16px;
}

.roomroom-mobile-footer {
  padding: 0 16px 18px;
}

.roomroom-mobile-home-card,
.roomroom-mobile-screen,
.roomroom-mobile-viewer,
.roomroom-mobile-empty,
.roomroom-mobile-stat-card,
.roomroom-mobile-post,
.roomroom-mobile-list-row {
  border: 1px solid rgba(90, 54, 118, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(61, 32, 81, 0.08);
}

.roomroom-mobile-home-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.roomroom-mobile-hero-avatar,
.roomroom-mobile-call-avatar,
.roomroom-mobile-mini-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-weight: 800;
}

.roomroom-mobile-hero-avatar {
  width: 84px;
  height: 112px;
}

.roomroom-mobile-call-avatar {
  width: 82px;
  height: 108px;
}

.roomroom-mobile-mini-avatar {
  width: 34px;
  height: 44px;
  border-radius: 12px;
  font-size: 0.72rem;
}

.roomroom-mobile-hero-avatar img,
.roomroom-mobile-call-avatar img,
.roomroom-mobile-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.roomroom-mobile-hero-copy {
  display: grid;
  gap: 4px;
}

.roomroom-mobile-hero-copy strong {
  color: #2d2334;
  font-size: 1.05rem;
}

.roomroom-mobile-hero-copy p {
  margin: 0;
  color: #5d4b68;
  line-height: 1.45;
}

.roomroom-mobile-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.roomroom-mobile-app-icon {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px 6px;
  border: 1px solid rgba(96, 54, 120, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: #39243f;
  touch-action: manipulation;
}

.roomroom-mobile-app-glyph {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffdf74, #ff8db3 54%, #9de7ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.roomroom-mobile-app-glyph[data-mobile-app="camera"] {
  background: linear-gradient(135deg, #ffb86d, #ff7b91 54%, #ffd86b);
}

.roomroom-mobile-app-glyph[data-mobile-app="photos"] {
  background: linear-gradient(135deg, #fff07a, #8ff0b3 52%, #8dd8ff);
}

.roomroom-mobile-app-glyph[data-mobile-app="videos"] {
  background: linear-gradient(135deg, #9dd7ff, #7da8ff 55%, #b1a0ff);
}

.roomroom-mobile-app-glyph[data-mobile-app="messages"] {
  background: linear-gradient(135deg, #ffd68c, #ff9cb3 54%, #ffc8f2);
}

.roomroom-mobile-app-glyph[data-mobile-app="shop"] {
  background: linear-gradient(135deg, #ffe58d, #ffc168 55%, #ff9d63);
}

.roomroom-mobile-app-glyph[data-mobile-app="roomnet"] {
  background: linear-gradient(135deg, #91f0dd, #80d8ff 54%, #82b0ff);
}

.roomroom-mobile-app-glyph[data-mobile-app="calendar"] {
  background: linear-gradient(135deg, #ffc2a8, #ff9cd4 54%, #d7a2ff);
}

.roomroom-mobile-app-glyph[data-mobile-app="roomzlist"] {
  background: linear-gradient(135deg, #d6f0a5, #8fe0a7 54%, #65cfd1);
}

.roomroom-mobile-app-glyph-svg {
  width: 34px;
  height: 34px;
  color: #3a2647;
}

.roomroom-mobile-app-label {
  font-size: 0.72rem;
  font-weight: 700;
}

.roomroom-mobile-screen {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.roomroom-mobile-camera-preview,
.roomroom-mobile-photo-view,
.roomroom-mobile-replay-stage,
.roomroom-mobile-call-stage {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #2e1235, #51335f 50%, #6b557d);
  background-size: cover;
  background-position: center;
}

.roomroom-mobile-photo-view img,
.roomroom-mobile-photo-thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.roomroom-mobile-photo-view img {
  object-fit: contain;
}

.roomroom-mobile-camera-preview::after,
.roomroom-mobile-photo-view::after,
.roomroom-mobile-replay-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  pointer-events: none;
}

.roomroom-mobile-replay-stage .standee-slot {
  --standee-width: 30%;
  --standee-height: 66%;
  --standee-bottom: 0%;
  --standee-x: 5%;
  --standee-scale: 0.9;
  --standee-art-height: 88%;
  --standee-bubble-gap: 18px;
}

.roomroom-mobile-replay-stage .standee-slot.roomroom-mobile-replay-solo {
  left: 50%;
  right: auto;
  transform: translateY(0) translateX(-50%) scale(var(--standee-scale));
}

.roomroom-mobile-replay-stage .standee-slot-back-left,
.roomroom-mobile-replay-stage .standee-slot-back-right {
  --standee-width: 24%;
  --standee-height: 56%;
  --standee-x: 18%;
  --standee-scale: 0.8;
}

.roomroom-mobile-replay-stage .standee-bubble {
  width: min(110%, 184px);
  min-width: min(126px, 92%);
  max-width: 184px;
  padding: 10px 11px;
}

.roomroom-mobile-replay-stage .standee-meta strong {
  font-size: 0.74rem;
}

.roomroom-mobile-replay-stage .standee-meta span {
  font-size: 0.66rem;
}

.roomroom-mobile-replay-stage .standee-bubble p {
  font-size: 0.74rem;
  line-height: 1.26;
}

.roomroom-mobile-camera-label,
.roomroom-mobile-camera-hint {
  position: absolute;
  left: 14px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 15, 24, 0.54);
  color: #fff8ff;
  font-size: 0.72rem;
  font-weight: 700;
}

.roomroom-mobile-camera-label {
  top: 14px;
}

.roomroom-mobile-camera-hint {
  bottom: 14px;
}

.roomroom-mobile-inline-actions,
.roomroom-mobile-filter-row,
.roomroom-mobile-favorite-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roomroom-mobile-screen button,
.roomroom-mobile-screen a,
.roomroom-mobile-home-card button,
.roomroom-mobile-app-grid button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.roomroom-mobile-mini-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d84f88;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.roomroom-mobile-help,
.roomroom-mobile-empty-inline {
  margin: 0;
  color: #5d4b68;
  font-size: 0.8rem;
  line-height: 1.45;
}

.roomroom-mobile-photo-grid,
.roomroom-mobile-list {
  display: grid;
  gap: 10px;
}

.roomroom-mobile-photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roomroom-mobile-photo-thumb {
  overflow: hidden;
  min-height: 92px;
  border: 1px solid rgba(96, 54, 120, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(135deg, #ffcd73, #fca5c3 56%, #9ddfff);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}

.roomroom-mobile-photo-thumb img {
  object-fit: cover;
}

.roomroom-mobile-photo-thumb.is-selected,
.roomroom-mobile-list-row.is-selected,
.roomroom-mobile-favorite-chip.is-selected {
  outline: 2px solid rgba(214, 102, 160, 0.7);
  outline-offset: 1px;
}

.roomroom-mobile-viewer {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.roomroom-mobile-viewer .roomroom-mobile-row-title {
  font-size: 1rem;
}

.roomroom-mobile-list-row,
.roomroom-mobile-post {
  display: grid;
  gap: 6px;
  padding: 12px;
  text-align: left;
}

.roomroom-mobile-row-title {
  color: #2e2134;
}

.roomroom-mobile-row-meta {
  color: #755d84;
  font-size: 0.74rem;
}

.roomroom-mobile-body-text {
  margin: 0;
  color: #4a3854;
  line-height: 1.45;
}

.roomroom-mobile-call-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  align-items: end;
}

.roomroom-mobile-call-figure {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.roomroom-mobile-message-log {
  display: grid;
  gap: 8px;
}

.roomroom-mobile-bubble {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(246, 234, 255, 0.9);
}

.roomroom-mobile-bubble strong {
  color: #3f2550;
  font-size: 0.8rem;
}

.roomroom-mobile-bubble p,
.roomroom-mobile-bubble span {
  margin: 0;
  color: #5a4765;
  font-size: 0.78rem;
  line-height: 1.4;
}

.roomroom-mobile-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(96, 54, 120, 0.1);
  border-radius: 18px;
  background: rgba(252, 247, 255, 0.82);
}

.roomroom-mobile-field span {
  color: #4a3752;
  font-size: 0.76rem;
  font-weight: 700;
}

.roomroom-mobile-field input,
.roomroom-mobile-field select,
.roomroom-mobile-field textarea {
  border-radius: 14px;
  border: 1px solid rgba(96, 54, 120, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.roomroom-mobile-playback-meter {
  flex: 1 1 120px;
  height: 10px;
  overflow: hidden;
  align-self: center;
  border-radius: 999px;
  background: rgba(96, 54, 120, 0.12);
}

.roomroom-mobile-playback-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff9a76, #ff68b7, #76d3ff);
}

.roomroom-mobile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.roomroom-mobile-stat-card {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.roomroom-mobile-stat-card span {
  color: #7a6284;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.roomroom-mobile-stat-card strong {
  color: #312338;
  font-size: 1.1rem;
}

@media (max-width: 640px) {
  .roomroom-mobile-page {
    min-height: var(--app-viewport-height);
    height: var(--app-viewport-height);
    align-items: stretch;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
  }

  .roomroom-mobile-phone {
    width: 100vw;
    min-height: var(--app-viewport-height);
    height: var(--app-viewport-height);
    max-height: var(--app-viewport-height);
    border-radius: 0;
    border: 0;
  }

  .roomroom-mobile-companion-card {
    display: none;
  }

  .roomroom-mobile-app-grid {
    gap: 10px;
  }

  .roomroom-mobile-app-glyph {
    width: 52px;
    height: 52px;
  }
}

.map-page[hidden],
.news-page[hidden] {
  display: none;
}

.map-page.is-open,
.news-page.is-open {
  opacity: 1;
  pointer-events: auto;
}

.map-page-shell {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(44px, 5vh, 72px) clamp(332px, 19vw, 388px) clamp(108px, 12vh, 138px) clamp(214px, 15vw, 278px);
}

.map-page-header {
  position: fixed;
  top: max(96px, calc(env(safe-area-inset-top) + 96px));
  left: max(22px, env(safe-area-inset-left));
  right: auto;
  z-index: 35;
  width: clamp(176px, 12vw, 224px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 14px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(8, 5, 14, 0.13) 2px,
      rgba(8, 5, 14, 0.13) 5px
    ),
    rgba(38, 29, 45, 0.94);
  box-shadow: 0 18px 44px rgba(8, 6, 12, 0.32);
  backdrop-filter: blur(18px);
}

.map-neighborhood-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  min-width: 0;
}

.map-neighborhood-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  align-self: stretch;
}

.map-neighborhood-chip {
  min-width: 0;
  min-height: 34px;
  padding: 5px 0;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #f2eaf5;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.map-neighborhood-chip:hover:not(:disabled) {
  border-color: rgba(253, 220, 146, 0.5);
  background: rgba(255, 248, 228, 0.18);
  transform: translateY(-1px);
}

.map-neighborhood-chip.is-active {
  border-color: rgba(255, 220, 133, 0.72);
  background: linear-gradient(180deg, rgba(255, 241, 205, 0.98), rgba(255, 221, 148, 0.92));
  color: #4b355b;
  box-shadow: 0 8px 18px rgba(15, 8, 19, 0.24);
}

.map-neighborhood-chip.is-full:not(.is-active) {
  border-color: rgba(238, 186, 135, 0.32);
  color: rgba(247, 229, 218, 0.96);
}

.map-neighborhood-chip.is-empty {
  border-style: dashed;
  color: rgba(217, 203, 234, 0.56);
  cursor: default;
}

.map-neighborhood-chip:disabled {
  opacity: 0.72;
}

.map-neighborhood-picker span,
.map-page-kicker {
  color: #d9cbea;
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.map-neighborhood-picker select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 5px 9px;
  border: 1px solid rgba(236, 218, 247, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #2a2030;
  font-size: 0.9rem;
  font-weight: 760;
}

.map-page-header h1 {
  display: none;
}

.map-onboarding-card {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid rgba(236, 218, 247, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.map-onboarding-card span {
  color: #d9cbea;
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.map-onboarding-card ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 17px;
  color: #f2eaf5;
  font-size: 0.82rem;
  line-height: 1.32;
}

.map-private-house-button {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 820;
  line-height: 1.15;
}

.map-close-button {
  justify-self: start;
  width: 100%;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #4b355b;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 860;
  line-height: 1;
}

.map-close-button:hover {
  border-color: rgba(76, 45, 96, 0.28);
  background: #fff8f2;
}

.map-page-layout {
  position: relative;
  width: min(74vw, calc(177.7778vh - 224px));
  aspect-ratio: 16 / 9;
  min-height: 0;
  filter: drop-shadow(0 24px 56px rgba(8, 6, 12, 0.34));
}

.news-page {
  z-index: 25;
  display: grid;
  place-items: center;
  padding: max(98px, calc(env(safe-area-inset-top) + 98px)) max(28px, env(safe-area-inset-right)) max(42px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
}

.news-page-panel {
  width: min(760px, calc(100vw - 56px));
  max-height: min(720px, calc(100vh - 150px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(64, 38, 90, 0.16);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      rgba(120, 70, 140, 0.035) 2px,
      rgba(120, 70, 140, 0.035) 5px
    ),
    rgba(255, 251, 255, 0.94);
  box-shadow: 0 24px 68px rgba(76, 45, 96, 0.2);
  backdrop-filter: blur(22px);
}

.news-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.news-page-header span {
  color: #6b4f76;
  font-size: 0.72rem;
  font-weight: 840;
  text-transform: uppercase;
}

.news-page-subtitle {
  margin: 10px 0 0;
  max-width: 34rem;
  color: #6b5777;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.news-page-header h1 {
  margin: 2px 0 0;
  color: #2a2030;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.9;
}

.news-page-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(76, 45, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.news-page-form[hidden] {
  display: none;
}

.news-page-form textarea {
  min-height: 118px;
  resize: vertical;
}

.news-page-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.news-page-post-button {
  justify-self: end;
}

.news-page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.news-page-feed {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.news-page-post-card,
.news-page-empty {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(76, 45, 96, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 240, 251, 0.9)),
    rgba(255, 255, 255, 0.78);
  padding: 14px;
  box-shadow: 0 16px 36px rgba(58, 32, 74, 0.1);
}

.news-page-post-card h3 {
  margin: 0 0 4px;
  color: #2a2030;
  font-size: 1.05rem;
  line-height: 1.1;
}

.news-page-post-title {
  display: none;
}

.news-page-post-card time {
  display: block;
  margin-bottom: 8px;
  color: #806f86;
  font-size: 0.66rem;
  font-weight: 780;
  text-transform: uppercase;
}

.news-page-post-card p,
.news-page-empty {
  margin: 0;
  color: #514658;
  font-family: var(--font-copy);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.38;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.news-page-broadcast-stage {
  display: grid;
  gap: 12px;
}

.news-page-broadcast-marquee {
  justify-self: start;
  max-width: min(100%, 26rem);
  padding: 8px 14px;
  border: 1px solid rgba(72, 44, 92, 0.16);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 248, 219, 0.96), rgba(255, 236, 188, 0.92));
  color: #4d324f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(102, 72, 24, 0.12);
}

.news-page-broadcast-room {
  position: relative;
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  padding: 28px 22px 26px;
  border: 1px solid rgba(82, 56, 95, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 247, 252, 0.96), rgba(246, 236, 247, 0.94) 52%, rgba(228, 210, 221, 0.95) 52%, rgba(214, 193, 206, 0.95) 100%);
  overflow: hidden;
}

.news-page-broadcast-room::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.76), transparent 28%),
    repeating-linear-gradient(90deg, rgba(128, 98, 144, 0.09) 0, rgba(128, 98, 144, 0.09) 2px, transparent 2px, transparent 32px);
  pointer-events: none;
}

.news-page-broadcast-room::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28%;
  height: 2px;
  background: rgba(103, 76, 116, 0.16);
  pointer-events: none;
}

.news-page-broadcast-facade {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 12%;
  bottom: 21%;
  border-radius: 24px 24px 10px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 24%),
    repeating-linear-gradient(90deg, rgba(126, 96, 141, 0.12) 0, rgba(126, 96, 141, 0.12) 3px, transparent 3px, transparent 28px),
    linear-gradient(180deg, rgba(252, 244, 248, 0.94), rgba(237, 220, 232, 0.96));
  box-shadow:
    inset 0 -14px 0 rgba(148, 114, 138, 0.42),
    0 18px 44px rgba(63, 43, 74, 0.12);
  pointer-events: none;
}

.news-page-broadcast-speaker {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.news-page-broadcast-speaker-art {
  width: 132px;
  height: 214px;
  display: grid;
  place-items: end center;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(18, 22, 26, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(36, 26, 45, 0.08),
    0 18px 26px rgba(40, 21, 52, 0.18);
  filter: drop-shadow(0 18px 26px rgba(40, 21, 52, 0.24));
}

.news-page-broadcast-speaker-art img,
.news-page-broadcast-speaker-art .custom-standee {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.news-page-broadcast-speaker-art.has-image {
  background: transparent;
  text-shadow: none;
}

.news-page-broadcast-speaker-art img {
  object-position: bottom center;
}

.news-page-broadcast-speaker-art:not(.has-standee) {
  border-radius: 28px 28px 18px 18px;
  background:
    linear-gradient(180deg, rgba(77, 43, 88, 0.98), rgba(42, 25, 58, 0.98)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 50%);
  color: #fff5fd;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.news-page-broadcast-speaker-plaque {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(55, 34, 64, 0.9);
  color: #fff5fd;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.news-page-broadcast-speech {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 10px;
}

.news-page-broadcast-bubble {
  display: grid;
  gap: 6px;
  max-width: min(100%, 32rem);
  padding: 12px 14px 13px;
  border: 2px solid rgba(58, 42, 72, 0.82);
  border-radius: 18px 18px 18px 8px;
  background: rgba(255, 253, 255, 0.95);
  color: #2f2237;
  box-shadow: 0 12px 24px rgba(54, 37, 67, 0.1);
}

.news-page-broadcast-bubble:nth-child(2n) {
  justify-self: end;
  border-radius: 18px 18px 8px 18px;
  background: rgba(255, 244, 250, 0.95);
}

.news-page-broadcast-bubble-label {
  color: #7d6588;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-page-broadcast-bubble p {
  margin: 0;
  color: #34273b;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.news-page-broadcast-prop {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  width: min(34%, 220px);
  padding: 10px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(250, 242, 247, 0.98), rgba(236, 224, 236, 0.96)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 14px 28px rgba(56, 33, 69, 0.16),
    inset 0 0 0 2px rgba(171, 141, 185, 0.3);
}

.news-page-post-image {
  width: 100%;
  display: block;
  border: 1px solid rgba(76, 45, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  object-fit: cover;
}

.news-page-post-video {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(76, 45, 96, 0.12);
  border-radius: 8px;
  background: rgba(18, 12, 24, 0.86);
  aspect-ratio: 16 / 9;
}

.news-page-post-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.news-page-post-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.map-board,
.map-info-panel {
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(8, 5, 14, 0.13) 2px,
      rgba(8, 5, 14, 0.13) 5px
    ),
    rgba(38, 29, 45, 0.94);
  box-shadow: 0 22px 64px rgba(8, 6, 12, 0.34);
  backdrop-filter: blur(22px);
}

.map-board {
  position: absolute;
  inset: 0;
  --map-pan-x: 0px;
  --map-pan-y: 0px;
  --map-zoom: 1;
  width: 100%;
  height: 100%;
  margin: auto;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  background:
    linear-gradient(90deg, rgba(93, 160, 154, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(93, 160, 154, 0.16) 1px, transparent 1px),
    #f7fbf2;
  background-size: 44px 44px;
}

.map-board.is-panning {
  cursor: grabbing;
}

.map-board.has-mask {
  background-color: #2a2030;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    none;
}

.map-board.has-mask::before {
  content: none;
}

.map-board.has-mask .map-board-sign,
.map-board.has-mask .map-road {
  display: none;
}

.map-board-sign {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 2;
  pointer-events: none;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 2px solid #2a2030;
  border-radius: 6px;
  background: #fff8f2;
  box-shadow: 6px 6px 0 rgba(42, 32, 48, 0.14);
  color: #2a2030;
  transform: rotate(-1deg);
}

.map-board-sign span {
  color: #6e35b8;
  font-size: 0.72rem;
  font-weight: 820;
}

.map-board-sign strong {
  font-size: 1rem;
  line-height: 1;
}

.map-road {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 50%;
  pointer-events: none;
  height: 96px;
  border-top: 4px solid rgba(255, 248, 242, 0.86);
  border-bottom: 4px solid rgba(255, 248, 242, 0.86);
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 40px,
      rgba(255, 248, 242, 0.78) 40px,
      rgba(255, 248, 242, 0.78) 72px
    ),
    #575d68;
  box-shadow: inset 0 0 0 1px rgba(42, 32, 48, 0.22);
  transform: translateY(-50%) rotate(-2deg);
}

.map-plane {
  position: absolute;
  inset: -9%;
  z-index: 1;
  overflow: visible;
  transform:
    translate(var(--map-pan-x), var(--map-pan-y))
    scale(var(--map-zoom));
  transform-origin: center;
  transition: transform 120ms ease;
}

.map-board.is-panning .map-plane {
  transition: none;
}

.map-board.has-mask .map-plane {
  background-color: #4f7d3a;
  background-image: var(--map-texture-image);
  background-position: 0 0;
  background-repeat: repeat;
  background-size: 128px 128px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.map-pan-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 38px);
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(8, 5, 14, 0.13) 2px,
      rgba(8, 5, 14, 0.13) 5px
    ),
    rgba(38, 29, 45, 0.92);
  box-shadow: 0 12px 30px rgba(8, 6, 12, 0.28);
}

.map-district-overview {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: min(260px, 28vw);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(8, 5, 14, 0.13) 2px,
      rgba(8, 5, 14, 0.13) 5px
    ),
    rgba(38, 29, 45, 0.94);
  box-shadow: 0 12px 30px rgba(8, 6, 12, 0.28);
}

.map-district-overview-header {
  display: grid;
  gap: 2px;
}

.map-district-overview-header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.map-district-overview-kicker {
  color: #d9cbea;
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.map-district-overview-title {
  color: #f6eff8;
  font-size: 0.92rem;
  font-weight: 840;
}

.map-district-nav {
  min-width: 0;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #4d3a58;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 860;
  line-height: 1;
}

.map-district-nav:hover,
.map-district-nav:focus-visible {
  border-color: rgba(76, 45, 96, 0.34);
  background: #fff8f2;
  outline: none;
}

.map-district-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.map-district-cell {
  position: relative;
  min-width: 0;
  min-height: 62px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6eff8;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.map-district-cell:hover:not(:disabled),
.map-district-cell:focus-visible {
  border-color: rgba(255, 220, 133, 0.58);
  background: rgba(255, 248, 228, 0.16);
  outline: none;
}

.map-district-cell.is-active {
  border-color: rgba(255, 220, 133, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 242, 0.4);
}

.map-district-cell.is-full:not(.is-active) {
  border-color: rgba(238, 186, 135, 0.32);
}

.map-district-cell.is-empty {
  border-style: dashed;
  color: rgba(217, 203, 234, 0.56);
  cursor: default;
}

.map-district-cell:disabled {
  opacity: 0.8;
}

.map-district-cell-number,
.map-district-cell-label,
.map-district-cell-meta {
  position: relative;
  z-index: 1;
}

.map-district-cell-number {
  font-size: 0.9rem;
  font-weight: 860;
  line-height: 1;
}

.map-district-cell-label {
  font-size: 0.62rem;
  font-weight: 760;
  line-height: 1.1;
}

.map-district-cell-meta {
  color: #d9cbea;
  font-size: 0.62rem;
  font-weight: 760;
}

.map-district-cell-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--district-fill, 0%);
  background: linear-gradient(180deg, rgba(106, 181, 120, 0), rgba(106, 181, 120, 0.42));
  pointer-events: none;
}

.map-pan-controls button {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #4d3a58;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1;
}

.map-pan-controls button:hover,
.map-pan-controls button:focus-visible {
  border-color: rgba(76, 45, 96, 0.34);
  background: #fff8f2;
  outline: none;
}

.map-pan-controls [data-map-pan="up"] {
  grid-column: 2;
  grid-row: 1;
}

.map-pan-controls [data-map-pan="left"] {
  grid-column: 1;
  grid-row: 2;
}

.map-pan-controls [data-map-pan="right"] {
  grid-column: 3;
  grid-row: 2;
}

.map-pan-controls [data-map-pan="down"] {
  grid-column: 2;
  grid-row: 3;
}

.map-region-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.map-texture-layer {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background-position: 0 0;
  background-repeat: repeat;
  transform: scale(var(--map-flip-x, 1), var(--map-flip-y, 1));
}

.map-texture-layer[hidden] {
  display: none;
}

.map-texture-layer-road {
  z-index: 1;
  background-image: var(--map-road-texture);
  background-size: 640px auto;
  -webkit-mask-image: var(--map-road-mask-image);
  mask-image: var(--map-road-mask-image);
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.map-texture-layer-park {
  z-index: 2;
  background-image: var(--map-park-texture);
  background-size: 128px 128px;
  -webkit-mask-image: var(--map-park-mask-image);
  mask-image: var(--map-park-mask-image);
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.map-lot-grid {
  --map-columns: 7;
  --map-rows: 5;
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--map-columns), minmax(82px, 1fr));
  grid-template-rows: repeat(var(--map-rows), minmax(82px, 1fr));
  gap: 12px;
  padding: 84px 24px 24px;
}

.map-lot-grid.is-region-map {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
}

.map-lot {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: space-between;
  gap: 5px;
  padding: 10px;
  border: 2px solid rgba(68, 85, 67, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.38)),
    #dff1d5;
  color: #2d442e;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(68, 85, 67, 0.12);
  text-align: left;
}

.map-lot.is-mask-lot {
  position: absolute;
  min-height: 0;
  align-content: center;
  justify-items: center;
  padding: 4px;
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: transparent;
  text-align: center;
}

.map-lot.is-mask-lot:not(.is-occupied):not(.is-reserved):not(.is-current) {
  border-style: dashed;
  border-color: rgba(255, 252, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(42, 32, 48, 0.32),
    inset 0 0 0 1px rgba(42, 32, 48, 0.16);
}

.map-lot.is-mask-lot::before {
  content: none;
}

.map-lot-card {
  position: relative;
  z-index: 1;
  min-width: min(184px, 20vw);
  max-width: 210px;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(236, 218, 247, 0.18);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(8, 5, 14, 0.13) 2px,
      rgba(8, 5, 14, 0.13) 5px
    ),
    rgba(38, 29, 45, 0.94);
  box-shadow: 0 10px 24px rgba(8, 6, 12, 0.32);
  color: #f6eff8;
  text-align: left;
}

.map-lot.is-mask-lot .map-lot-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  min-width: 174px;
  max-width: 210px;
  transform: translateX(-50%);
  transform-origin: center bottom;
  opacity: 0;
  pointer-events: none;
}

.map-lot.is-mask-lot .map-lot-label,
.map-lot.is-mask-lot .map-lot-name,
.map-lot.is-mask-lot .map-lot-owner,
.map-lot.is-mask-lot .map-lot-presence,
.map-lot.is-mask-lot .map-lot-meta {
  position: relative;
  z-index: 1;
}

.map-lot:hover,
.map-lot.is-selected {
  border-color: #2a2030;
  box-shadow:
    0 14px 30px rgba(76, 45, 96, 0.18),
    inset 0 0 0 2px rgba(255, 248, 242, 0.72);
}

.map-lot:focus-visible {
  outline: 3px solid rgba(255, 218, 77, 0.92);
  outline-offset: 2px;
}

.map-lot.is-mask-lot:hover,
.map-lot.is-mask-lot.is-selected,
.map-lot.is-mask-lot.is-current {
  border-style: solid;
  border-color: #2a2030;
  color: #2a2030;
  background: rgba(255, 252, 255, 0.18);
  box-shadow:
    0 10px 24px rgba(76, 45, 96, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.map-lot.is-mask-lot:hover .map-lot-card,
.map-lot.is-mask-lot.is-selected .map-lot-card,
.map-lot.is-mask-lot.is-occupied .map-lot-card,
.map-lot.is-mask-lot.is-current .map-lot-card,
.map-lot.is-mask-lot.is-reserved .map-lot-card {
  opacity: 1;
}

.map-lot.is-occupied {
  border-color: rgba(53, 89, 143, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.34)),
    #cceeff;
  color: #183e5f;
}

.map-lot.is-mask-lot.is-occupied {
  border-color: rgba(163, 80, 120, 0.72);
  background: rgba(244, 134, 191, 0.56);
  color: #2a2030;
  box-shadow:
    0 8px 20px rgba(126, 44, 96, 0.16),
    inset 0 0 0 1px rgba(255, 248, 242, 0.38);
}

.map-lot.is-current {
  border-color: #00b8c9;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.28)),
    #18a8ff;
  color: #041f3c;
  box-shadow:
    0 14px 34px rgba(0, 132, 255, 0.32),
    0 0 0 3px rgba(0, 132, 255, 0.18),
    inset 0 0 0 2px rgba(255, 248, 242, 0.82);
}

.map-lot.is-mask-lot.is-current {
  border-color: #008cff;
  background: rgba(0, 132, 255, 0.82);
  color: #ffffff;
  box-shadow:
    0 12px 28px rgba(0, 72, 160, 0.28),
    0 0 0 3px rgba(0, 132, 255, 0.18),
    inset 0 0 0 1px rgba(255, 248, 242, 0.5);
}

.map-lot.is-mask-lot.is-reserved:not(:hover):not(.is-selected):not(.is-current) {
  border-color: rgba(163, 80, 120, 0.72);
  border-style: solid;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0,
      rgba(255, 255, 255, 0.18) 6px,
      rgba(151, 45, 104, 0.16) 6px,
      rgba(151, 45, 104, 0.16) 12px
    ),
    rgba(244, 134, 191, 0.44);
  background-size: auto;
  background-repeat: repeat;
  background-blend-mode: normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 242, 0.32),
    0 5px 14px rgba(74, 50, 82, 0.12);
}

.map-lot.is-reserved {
  border-color: rgba(76, 45, 96, 0.16);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(76, 45, 96, 0.08) 0,
      rgba(76, 45, 96, 0.08) 6px,
      rgba(255, 255, 255, 0.42) 6px,
      rgba(255, 255, 255, 0.42) 12px
    ),
    #eadff0;
  color: #6b5a70;
}

.map-lot-label {
  color: #d9cbea;
  font-size: 0.7rem;
  font-weight: 860;
  line-height: 1;
  text-transform: uppercase;
}

.map-lot-name {
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: clamp(0.84rem, 1.2vw, 1rem);
  font-weight: 820;
  line-height: 1.12;
}

.map-lot-owner {
  color: #d2c4da;
  font-size: 0.73rem;
  font-weight: 720;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.map-lot-meta {
  color: #bdaec7;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
}

.map-lot-presence {
  color: #69cfc3;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.1;
}

.map-lot-presence::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.34em;
  border-radius: 999px;
  background: currentColor;
  vertical-align: 0.08em;
}

.map-lot.is-current .map-lot-label,
.map-lot.is-current .map-lot-owner,
.map-lot.is-current .map-lot-presence,
.map-lot.is-current .map-lot-meta {
  color: rgba(4, 31, 60, 0.78);
}

.map-lot.is-mask-lot.is-current .map-lot-label,
.map-lot.is-mask-lot.is-current .map-lot-name,
.map-lot.is-mask-lot.is-current .map-lot-owner,
.map-lot.is-mask-lot.is-current .map-lot-presence,
.map-lot.is-mask-lot.is-current .map-lot-meta {
  color: #08213e;
  text-shadow: none;
}

.map-info-panel {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  top: max(166px, calc(env(safe-area-inset-top) + 166px));
  z-index: 35;
  width: clamp(248px, 15vw, 316px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.map-wallet,
.map-current-house,
.map-selection {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(236, 218, 247, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
}

.map-wallet span,
.map-current-house span,
.map-selection-kicker {
  color: #d9cbea;
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

.map-wallet strong,
.map-current-house strong,
.map-selection strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 1.05rem;
}

.map-selection p {
  margin: 0;
  color: #d2c4da;
  font-size: 0.9rem;
  line-height: 1.4;
}

.map-primary-button {
  width: 100%;
  margin-top: auto;
  min-height: 42px;
  font-size: 0.9rem;
  font-weight: 840;
}

.map-status.is-error,
.status-line.is-error {
  color: var(--warn);
}

.app-footer {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  top: max(22px, env(safe-area-inset-top));
  z-index: 28;
  display: grid;
  width: clamp(224px, 13vw, 286px);
  gap: 8px;
  justify-items: stretch;
  padding: 10px 11px;
  border: 1px solid rgba(236, 218, 247, 0.14);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(8, 5, 14, 0.13) 2px,
      rgba(8, 5, 14, 0.13) 5px
    ),
    rgba(38, 29, 45, 0.94);
  box-shadow: 0 14px 36px rgba(8, 6, 12, 0.3);
  color: #d2c4da;
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.footer-dock {
  display: grid;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.15;
  pointer-events: auto;
}

.footer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(236, 218, 247, 0.12);
}

.footer-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  align-items: center;
}

.footer-link-grid span,
.footer-studio,
.footer-link {
  color: #d9cbea;
}

.footer-link {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
}

.footer-news-link {
  justify-self: end;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.footer-brand {
  color: #ffffff;
  font-weight: 820;
  min-width: 0;
  white-space: nowrap;
}

.footer-studio {
  display: block;
  padding-top: 1px;
  border-top: 1px solid rgba(236, 218, 247, 0.08);
  font-weight: 900;
}

.footer-product {
  color: #bdaec7;
  font-family: var(--font-copy);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.about-modal[hidden] {
  display: none;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 13, 28, 0.48);
  backdrop-filter: blur(10px);
}

.legal-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(76, 45, 96, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 246, 255, 0.98)),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 32px 90px rgba(24, 16, 31, 0.34);
}

.legal-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: start;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(76, 45, 96, 0.1);
}

.legal-modal-heading {
  display: grid;
  gap: 4px;
}

.legal-modal-kicker {
  color: #87599e;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-modal-header h2 {
  margin: 0;
  color: #251b2a;
  font-size: 1.05rem;
  line-height: 1.15;
}

.legal-modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76, 45, 96, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #4b355b;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.legal-modal-status {
  min-height: 1.2em;
  padding: 10px 16px 0;
  color: #5d4969;
  font-size: 0.8rem;
  font-weight: 700;
}

.legal-modal-status.is-error {
  color: #9d2e48;
}

.legal-modal-body {
  overflow: auto;
  padding: 12px 18px 18px;
  color: #2e2334;
  font-family: var(--font-copy);
}

.legal-modal-body h3,
.legal-modal-body h4 {
  margin: 0 0 10px;
  color: #23172a;
  font-family: var(--font-ui);
  line-height: 1.2;
}

.legal-modal-body h3 {
  font-size: 1rem;
}

.legal-modal-body h4 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legal-modal-body p,
.legal-modal-body ul,
.legal-modal-body ol,
.legal-feedback-note {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
}

.legal-modal-body ul,
.legal-modal-body ol {
  padding-left: 20px;
}

.legal-modal-body li {
  margin: 0 0 8px;
}

.legal-modal-body pre {
  margin: 0 0 12px;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(56, 35, 66, 0.06);
  color: #2d2434;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.legal-feedback-form {
  display: grid;
  gap: 12px;
  padding: 10px 18px 18px;
  overflow: auto;
}

.legal-feedback-note {
  color: #35293d;
}

.legal-feedback-actions {
  display: flex;
  justify-content: flex-start;
}

.about-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 22, 42, 0.32);
  backdrop-filter: blur(8px);
}

.about-modal-panel {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 36px));
  max-height: min(780px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(76, 45, 96, 0.18);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0,
      rgba(255, 255, 255, 0.18) 1px,
      rgba(120, 70, 140, 0.032) 2px,
      rgba(120, 70, 140, 0.032) 5px
    ),
    rgba(255, 252, 255, 0.96);
  box-shadow: 0 28px 82px rgba(36, 26, 45, 0.28);
}

.about-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(76, 45, 96, 0.1);
}

.about-modal-header h2 {
  margin: 0;
  color: #2a2030;
  font-size: 1rem;
  line-height: 1.1;
}

.about-modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76, 45, 96, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  color: #4b355b;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.about-modal-body {
  overflow: auto;
  padding: 14px 18px 18px;
}

.about-modal-body p {
  margin: 0 0 13px;
  color: #302436;
  font-family: var(--font-copy);
  font-size: clamp(0.92rem, 1.15vw, 1rem);
  font-weight: 700;
  line-height: 1.52;
}

.about-modal-body p:last-child {
  margin-bottom: 0;
}

.item-read-modal,
.radio-upload-modal,
.marketplace-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.item-read-modal[hidden],
.radio-upload-modal[hidden],
.marketplace-ai-modal[hidden] {
  display: none;
}

.item-read-modal-backdrop,
.radio-upload-modal-backdrop,
.marketplace-ai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 22, 42, 0.28);
  backdrop-filter: blur(8px);
}

.item-read-modal-panel,
.radio-upload-modal-panel,
.marketplace-ai-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 36px));
  max-height: min(680px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(128, 104, 0, 0.2);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.2) 1px,
      rgba(128, 104, 0, 0.035) 2px,
      rgba(128, 104, 0, 0.035) 5px
    ),
    rgba(255, 254, 245, 0.97);
  box-shadow: 0 28px 82px rgba(36, 32, 18, 0.26);
}

.item-read-modal-header,
.radio-upload-modal-header,
.marketplace-ai-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(128, 104, 0, 0.12);
}

.item-read-modal-header h2,
.radio-upload-modal-header h2,
.marketplace-ai-modal-header h2 {
  margin: 0;
  overflow: hidden;
  color: #302b16;
  font-size: 1rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-upload-kicker {
  margin-bottom: 3px;
  color: #8b7316;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.item-read-modal-close,
.radio-upload-modal-close,
.marketplace-ai-modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(128, 104, 0, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  color: #806800;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.marketplace-ai-modal-body {
  padding: 16px 16px 6px;
  color: #4a3d1a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.marketplace-ai-modal-body p {
  margin: 0;
}

.marketplace-ai-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.item-read-body {
  overflow: auto;
  min-height: 180px;
  padding: 18px;
  color: #2c281a;
  font-family: var(--font-copy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.radio-upload-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 16px;
  font-family: var(--font-copy);
  font-weight: 700;
}

.radio-upload-note {
  margin: 0;
  color: #5f5529;
  font-size: 0.84rem;
  line-height: 1.42;
}

.radio-upload-file-action {
  min-height: 42px;
}

.radio-upload-rights-field {
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(128, 104, 0, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.radio-upload-rights-field span {
  color: #3f371f;
  font-size: 0.8rem;
  line-height: 1.35;
}

.radio-upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-drawer {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 33;
  width: min(390px, calc(100vw - 92px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(64, 38, 90, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 255, 0.94);
  box-shadow: 0 22px 64px rgba(36, 26, 45, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 22px));
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: none;
}

.chat-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.store-drawer {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 33;
  width: min(420px, calc(100vw - 92px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(127, 84, 20, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.95);
  box-shadow: 0 22px 64px rgba(47, 36, 18, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 22px));
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: blur(22px);
}

.store-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.store-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-drawer-title {
  color: #2f2516;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.15;
}

.store-drawer-subtitle {
  margin-top: 2px;
  color: #7d6845;
  font-size: 0.78rem;
}

.store-close-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(127, 84, 20, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #6b4308;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.store-wallet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.store-wallet div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(127, 84, 20, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
}

.store-wallet strong,
.store-wallet span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-wallet strong {
  color: #2f2516;
  font-size: 0.82rem;
}

.store-wallet span {
  margin-top: 2px;
  color: #806d4d;
  font-size: 0.68rem;
}

.store-category-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: #f1eadc;
}

.store-category-tab {
  min-height: 32px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #735f3e;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 760;
}

.store-category-tab.is-active {
  border-color: rgba(127, 84, 20, 0.16);
  background: #ffffff;
  color: #61400d;
  box-shadow: 0 1px 4px rgba(73, 55, 24, 0.08);
}

.store-product-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  overflow: auto;
}

.store-product,
.store-empty {
  border: 1px solid rgba(127, 84, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.store-product {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
}

.store-product-section-heading {
  margin: 6px 2px 0;
  color: #7b570d;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.store-product-thumb {
  width: 58px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f5ead1;
  color: #6b4308;
  font-weight: 800;
}

.store-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-frame-style-thumb {
  width: 42px;
  height: 30px;
  border: 4px solid var(--store-frame-stroke);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--store-frame-accent) 24%, transparent), transparent 52%),
    var(--store-frame-mat);
  box-shadow:
    inset 0 0 0 3px color-mix(in srgb, var(--store-frame-stroke) 18%, transparent),
    0 2px 0 color-mix(in srgb, var(--store-frame-stroke) 36%, transparent);
}

.store-product-video-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(85, 196, 214, 0.42), rgba(183, 140, 224, 0.34)),
    #f7f0fa;
  color: #254a64;
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.store-product-body {
  min-width: 0;
}

.store-product-title,
.store-product-meta,
.store-product-price {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-product-title {
  color: #2f2516;
  font-size: 0.86rem;
  font-weight: 760;
}

.store-product-meta {
  margin-top: 2px;
  color: #75664f;
  font-size: 0.74rem;
}

.store-product-price {
  margin-top: 3px;
  color: #6b4308;
  font-size: 0.74rem;
  font-weight: 760;
}

.store-empty {
  padding: 12px;
  color: #75664f;
  font-size: 0.84rem;
}

.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-drawer-title {
  color: #251d2d;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.15;
}

.chat-drawer-subtitle {
  margin-top: 2px;
  color: #76548f;
  font-size: 0.78rem;
}

.chat-close-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(64, 38, 90, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #4d1f73;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.chat-close-button:hover {
  border-color: rgba(101, 39, 168, 0.42);
  background: #f3e8ff;
}

.chat-channel-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: #eee7f4;
}

.chat-channel-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #6b5878;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 760;
}

.chat-channel-tab.is-active {
  border-color: rgba(101, 39, 168, 0.16);
  background: #ffffff;
  color: #4d1f73;
  box-shadow: 0 1px 4px rgba(55, 36, 70, 0.08);
}

body.is-visitor-mode .floating-tools {
  display: none;
}

body.is-visitor-mode .debug-launcher,
body.is-visitor-mode .debug-panel {
  display: none;
}

body.is-map-open .floating-tools,
body.is-news-open .floating-tools {
  display: none;
}

body.is-map-open .debug-panel,
body.is-news-open .debug-panel {
  display: none;
}

body.is-map-open .brand-logo,
body.is-news-open .brand-logo {
  z-index: 35;
}

body.is-map-open .right-orb-rail,
body.is-news-open .right-orb-rail {
  display: none;
}

body.is-visitor-mode .tool-panel {
  display: none;
}

body.is-visitor-mode .room-canvas {
  cursor: default;
}

body.is-visitor-mode .window-item,
body.is-visitor-mode .sign-item,
body.is-visitor-mode .frame-item,
body.is-visitor-mode .furniture-item,
body.is-visitor-mode .ceiling-item {
  cursor: default;
  pointer-events: none;
}

body.is-visitor-mode .door-item {
  cursor: pointer;
  pointer-events: auto;
}

body.is-visitor-mode .frame-mini-actions,
body.is-visitor-mode .resize-handle,
body.is-visitor-mode .ceiling-anchor {
  display: none !important;
}

body.is-visitor-mode .furniture-item.has-shelf-items {
  pointer-events: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tool-panel {
  position: fixed;
  left: var(--tool-panel-left, max(10px, calc(100vw - min(390px, calc(100vw - 146px)) - max(226px, calc(env(safe-area-inset-right) + 226px)))));
  top: var(--tool-panel-top, max(116px, calc(env(safe-area-inset-top) + 116px)));
  z-index: 31;
  width: var(--tool-panel-width, min(390px, calc(100vw - 146px)));
  min-width: min(300px, calc(100vw - 20px));
  height: var(--tool-panel-height, auto);
  min-height: 190px;
  max-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(26, 31, 35, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 255, 0.96), rgba(250, 247, 252, 0.9)),
    var(--panel);
  box-shadow: 0 14px 38px rgba(54, 38, 66, 0.2);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: top left;
  transition: opacity 140ms ease, transform 140ms ease;
  overflow: hidden;
}

.tool-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.tool-panel.is-moving,
.tool-panel.is-resizing {
  transition: none;
  user-select: none;
}

.tool-panel-chrome {
  position: sticky;
  top: -8px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: -8px -8px 0;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 8px 8px 0 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.2) 1px,
      rgba(120, 70, 140, 0.035) 2px,
      rgba(120, 70, 140, 0.035) 5px
    ),
    rgba(255, 252, 255, 0.94);
  cursor: grab;
}

.tool-panel-chrome:active {
  cursor: grabbing;
}

.tool-panel-grip {
  display: grid;
  gap: 3px;
  width: 16px;
}

.tool-panel-grip span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(95, 74, 176, 0.46);
}

.tool-panel-title {
  min-width: 0;
  display: grid;
  color: #2a2030;
  font-weight: 820;
  line-height: 1.05;
}

.tool-panel-title-kicker {
  color: #76548f;
  font-size: 0.64rem;
  font-weight: 760;
  text-transform: uppercase;
}

.tool-panel-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tool-panel-reset-button,
.tool-panel-close-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(95, 74, 176, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  color: #5f4ab0;
  cursor: pointer;
}

.tool-panel-reset-button:hover,
.tool-panel-close-button:hover {
  border-color: rgba(0, 184, 201, 0.42);
  color: #007d89;
}

.tool-panel-close-button {
  font-size: 1.15rem;
  font-weight: 860;
  line-height: 1;
}

.tool-panel-reset-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tool-panel-resize-handle {
  position: sticky;
  right: -6px;
  bottom: -6px;
  align-self: flex-end;
  width: 24px;
  height: 24px;
  margin: -10px -6px -6px 0;
  cursor: nwse-resize;
}

.tool-panel-resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(95, 74, 176, 0.42);
  border-bottom: 2px solid rgba(95, 74, 176, 0.42);
  border-radius: 0 0 4px 0;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(11, 36px);
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 999px;
  background: rgba(241, 237, 246, 0.9);
  overflow-x: auto;
  scrollbar-width: none;
}

.mode-tabs::-webkit-scrollbar {
  display: none;
}

.mode-button,
.preset-button,
.plain-button,
.dev-toggle {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #273239;
  cursor: pointer;
}

.mode-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #5f4ab0;
}

.mode-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.mode-button:hover {
  border-color: rgba(0, 184, 201, 0.28);
  background: rgba(255, 255, 255, 0.7);
  color: #007d89;
}

.mode-button.is-active {
  background: #fff8f2;
  border-color: rgba(42, 32, 48, 0.28);
  color: #0b6f68;
  box-shadow: 0 7px 18px rgba(76, 45, 96, 0.13);
}

.panel-section {
  display: none;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.panel-section.is-active {
  display: flex;
  flex: 1 1 auto;
  overflow: auto;
  padding: 1px 3px 3px 1px;
  scrollbar-width: thin;
}

.field {
  display: grid;
  gap: 4px;
  color: #465057;
  font-size: 0.86rem;
  font-weight: 800;
}

.field > span,
.slider-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

select,
input[type="text"],
input[type="color"],
textarea {
  width: 100%;
  border: 1px solid rgba(32, 35, 38, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
}

select,
input[type="text"] {
  height: 34px;
  padding: 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
}

.readonly-route {
  color: var(--muted);
  font-size: 0.78rem;
}

input[type="color"] {
  height: 34px;
  padding: 4px;
}

.paint-color-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.paint-color-field input[type="color"] {
  width: 42px;
  min-width: 42px;
  justify-self: end;
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.toggle-field {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 9px;
  color: #465057;
  font-size: 0.8rem;
}

.toggle-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

output {
  min-width: 34px;
  color: var(--muted);
  text-align: right;
}

.tool-primary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.tool-section {
  border: 1px solid rgba(64, 42, 79, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.52);
  overflow: hidden;
}

.tool-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 32px;
  padding: 0 9px;
  color: #392943;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0;
  list-style: none;
  text-transform: uppercase;
}

.tool-section summary::-webkit-details-marker {
  display: none;
}

.tool-section summary::after {
  content: ">";
  color: rgba(95, 74, 176, 0.72);
  font-size: 0.76rem;
  transform: rotate(0deg);
  transition: transform 140ms ease;
}

.tool-section[open] summary {
  border-bottom: 1px solid rgba(64, 42, 79, 0.08);
  background: rgba(252, 248, 255, 0.74);
}

.tool-section[open] summary::after {
  transform: rotate(90deg);
}

.tool-section-body {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.compact-color-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.compact-color-row input[type="color"] {
  width: 42px;
  min-width: 42px;
}

.paint-actions {
  display: grid;
}

.object-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.house-room-panel {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(32, 35, 38, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.house-room-actions,
.house-room-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.house-room-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.house-room-actions {
  color: #465057;
  font-size: 0.88rem;
  font-weight: 680;
}

.house-room-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.house-room-list {
  display: grid;
  gap: 6px;
}

.house-integrity-report {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(86, 62, 112, 0.14);
  border-radius: 8px;
  background: rgba(247, 244, 251, 0.84);
  color: #362747;
}

.house-integrity-summary {
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.25;
}

.house-integrity-detail {
  font-size: 0.72rem;
  line-height: 1.3;
  color: #5c4870;
}

.house-integrity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.house-room-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px;
  border: 1px solid rgba(32, 35, 38, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.house-room-row.is-current {
  border-color: rgba(11, 111, 104, 0.34);
  background: rgba(11, 111, 104, 0.08);
}

.house-room-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f292e;
  text-align: left;
  cursor: pointer;
}

.house-room-button:disabled {
  cursor: default;
}

.house-room-name,
.house-room-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.house-room-name {
  font-weight: 700;
}

.house-room-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.house-room-row-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 5px;
}

.house-room-badge {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(32, 35, 38, 0.08);
  color: #465057;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
}

.house-room-delete {
  min-height: 28px;
  padding-inline: 8px;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.permission-panel {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(32, 35, 38, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.permission-title {
  color: #465057;
  font-size: 0.88rem;
  font-weight: 680;
}

.chat-members {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-member {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: 26px minmax(0, auto) auto;
  align-items: center;
  gap: 6px;
  padding: 4px 7px 4px 4px;
  border: 1px solid rgba(32, 35, 38, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.chat-avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(18, 22, 26, 0.28);
}

.chat-avatar.has-image {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  text-shadow: none;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chat-member-label,
.chat-member-role {
  overflow: hidden;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-member-label {
  max-width: 140px;
  color: #283238;
  font-size: 0.78rem;
  font-weight: 720;
}

.chat-member-role {
  color: var(--muted);
  font-size: 0.7rem;
}

.chat-thread {
  min-height: 210px;
  max-height: none;
  display: grid;
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(32, 35, 38, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(250, 247, 253, 0.92), rgba(255, 255, 255, 0.76)),
    #ffffff;
  font-family: var(--font-chat);
  scrollbar-width: thin;
}

.chat-empty {
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.chat-message {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
}

.chat-message-body {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(32, 35, 38, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.chat-message-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.chat-message-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #273239;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-meta time {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.chat-message p {
  margin: 0;
  color: #1f292e;
  font-family: var(--font-chat);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.chat-composer {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  padding-top: 2px;
}

.chat-message-field textarea {
  min-height: 72px;
  max-height: 140px;
  resize: vertical;
  padding: 9px;
  color: #1f292e;
  font-family: var(--font-chat);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.2;
}

.auth-session-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(65, 81, 168, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: #4b5874;
  line-height: 1.35;
}

.auth-session-card span {
  color: #6c5880;
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.auth-session-card strong {
  color: #25305e;
  font-size: 0.98rem;
}

.auth-session-card p {
  margin: 0;
  font-size: 0.8rem;
}

.auth-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(65, 81, 168, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.auth-form strong {
  color: #25305e;
  font-size: 0.92rem;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-primary-button {
  background: #4151a8;
  border-color: rgba(65, 81, 168, 0.2);
  color: #ffffff;
}

body.is-alpha-authenticated .auth-form {
  opacity: 0.62;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 162, 204, 0.34), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(141, 215, 255, 0.32), transparent 24%),
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.28), transparent 18%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      rgba(120, 70, 140, 0.03) 2px,
      rgba(120, 70, 140, 0.03) 4px
    ),
    linear-gradient(90deg, #dfbfdf, #f7eff8 38%, #e6f5ff 100%);
}

.auth-gate[hidden] {
  display: none;
}

.auth-gate-panel {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(76, 45, 96, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 244, 255, 0.94)),
    repeating-linear-gradient(180deg, rgba(107, 65, 136, 0.035) 0, rgba(107, 65, 136, 0.035) 1px, transparent 2px, transparent 5px);
  box-shadow:
    0 34px 90px rgba(43, 26, 56, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.42) inset;
  backdrop-filter: blur(18px);
}

.auth-gate-logo {
  width: 172px;
  height: auto;
  display: block;
}

.auth-gate-kicker {
  color: #6c5880;
  font-size: 0.74rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-gate h1 {
  margin: 0;
  color: #25305e;
  font-size: clamp(2.25rem, 3vw, 3.2rem);
  line-height: 0.94;
  max-width: 12ch;
}

.auth-gate p {
  max-width: 60ch;
  margin: 0;
  color: #4b5874;
  font-size: 1.02rem;
  line-height: 1.55;
}

.auth-gate-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-gate-form {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(65, 81, 168, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(253, 250, 255, 0.72));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.auth-gate-form strong {
  color: #25305e;
  font-size: 0.96rem;
}

.auth-gate-status {
  min-height: 18px;
}

.onboarding-tour {
  position: fixed;
  inset: 0;
  z-index: 92;
  pointer-events: auto;
}

.onboarding-tour[hidden] {
  display: none;
}

.onboarding-tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 28, 0.28);
  backdrop-filter: blur(2px);
}

.onboarding-tour-spotlight {
  position: fixed;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  box-shadow:
    0 0 0 9999px rgba(20, 16, 28, 0.32),
    0 14px 34px rgba(20, 16, 28, 0.26);
  pointer-events: none;
}

.onboarding-tour-pointer {
  position: fixed;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(20, 16, 28, 0.24);
  pointer-events: none;
  transform-origin: left center;
}

.onboarding-tour-card {
  position: fixed;
  z-index: 2;
  width: min(340px, calc(100vw - 36px));
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid rgba(76, 45, 96, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 255, 0.96);
  box-shadow: 0 24px 60px rgba(20, 16, 28, 0.24);
}

.onboarding-tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.onboarding-tour-step {
  color: #6c5880;
  font-size: 0.68rem;
  font-weight: 840;
  text-transform: uppercase;
}

.onboarding-tour-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(108, 88, 128, 0.2);
  border-radius: 999px;
  background: rgba(244, 239, 249, 0.92);
  color: #4e3d63;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.onboarding-tour-close:hover,
.onboarding-tour-close:focus-visible {
  background: rgba(236, 228, 246, 1);
  color: #322344;
}

.onboarding-tour-card h2 {
  margin: 0;
  color: #25305e;
  font-size: 1.12rem;
}

.onboarding-tour-card p {
  margin: 0;
  color: #4b5874;
  font-size: 0.9rem;
  line-height: 1.4;
}

.onboarding-tour-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-tour-actions .plain-button {
  color: #2a2030;
}

.onboarding-tour-actions .plain-button.auth-primary-button {
  color: #ffffff;
}

.chat-user-field.is-locked,
.profile-user-field.is-locked {
  opacity: 0.72;
}

.chat-user-field.is-locked select,
.profile-user-field.is-locked select {
  cursor: not-allowed;
}

.profile-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(168, 50, 111, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.profile-avatar-preview {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 860;
  text-shadow: 0 2px 4px rgba(18, 22, 26, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(36, 26, 45, 0.08),
    0 10px 22px rgba(168, 50, 111, 0.14);
}

.profile-avatar-preview.has-image {
  background: rgba(255, 255, 255, 0.72);
  text-shadow: none;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-name {
  margin-top: 7px;
  color: #705b73;
  font-size: 0.78rem;
  line-height: 1.3;
}

.profile-color-field input[type="color"] {
  height: 40px;
  padding: 4px;
}

.profile-standee-panel {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(168, 50, 111, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.profile-standee-preview {
  --profile-standee-flip: 1;
  width: 96px;
  height: 124px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 860;
  text-shadow: 0 2px 4px rgba(18, 22, 26, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(36, 26, 45, 0.08),
    0 10px 22px rgba(168, 50, 111, 0.14);
}

.profile-standee-preview.has-image {
  background: transparent;
  text-shadow: none;
}

.profile-standee-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: bottom center;
  transform: scaleX(var(--profile-standee-flip));
  transform-origin: bottom center;
}

.profile-standee-preview.is-flipped {
  --profile-standee-flip: -1;
}

.profile-standee-meta {
  display: grid;
  gap: 4px;
  color: #705b73;
  font-size: 0.78rem;
  line-height: 1.3;
}

.profile-standee-meta strong {
  color: #2a2030;
  font-size: 0.9rem;
}

.profile-standee-presets {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(168, 50, 111, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.profile-custom-standee-panel {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(76, 45, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.profile-standee-presets-title {
  color: #705b73;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.profile-custom-standee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-custom-standee-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.standee-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.standee-preset-button {
  min-width: 0;
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 6px;
  border: 1px solid rgba(32, 35, 38, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.66);
  color: #2a2030;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 760;
  text-align: center;
}

.standee-preset-button:hover,
.standee-preset-button.is-active {
  border-color: rgba(168, 50, 111, 0.42);
  background: rgba(255, 235, 247, 0.72);
}

.standee-preset-button img {
  width: 100%;
  height: 72px;
  display: block;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 10px rgba(36, 26, 45, 0.16));
}

.standee-preset-button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #465057;
  font-size: 0.88rem;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #a8326f;
}

.profile-standee-adjustments {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(168, 50, 111, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.profile-standee-adjustments .field {
  gap: 6px;
}

.profile-standee-adjustments .field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-standee-adjustments output {
  color: #705b73;
  font-size: 0.78rem;
  font-weight: 820;
}

.profile-standee-adjustments input[type="range"] {
  width: 100%;
}

.people-drawer {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(206px, calc(env(safe-area-inset-right) + 206px));
  bottom: max(104px, calc(env(safe-area-inset-bottom) + 104px));
  z-index: 33;
  width: min(390px, calc(100vw - 104px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(105, 207, 195, 0.18);
  border-radius: 8px;
  background: rgba(240, 255, 252, 0.95);
  box-shadow: 0 22px 64px rgba(8, 30, 34, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 22px));
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: blur(22px);
}

.people-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.people-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.people-drawer-title {
  color: #18363a;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.15;
}

.people-drawer-subtitle {
  color: #4f7074;
  font-size: 0.78rem;
}

.people-close-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(33, 76, 85, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #24545b;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.people-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: #dcefed;
}

.people-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #547174;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 760;
}

.people-tab.is-active {
  border-color: rgba(11, 111, 104, 0.16);
  background: #ffffff;
  color: #0b6f68;
  box-shadow: 0 1px 4px rgba(18, 70, 76, 0.08);
}

.people-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.people-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(33, 76, 85, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.people-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 860;
}

.people-avatar img,
.people-avatar .custom-standee {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.people-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.people-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.people-name {
  min-width: 0;
  overflow: hidden;
  color: #17353a;
  font-size: 0.9rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-meta,
.people-bio {
  color: #526d70;
  font-size: 0.76rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.people-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.people-empty {
  padding: 12px;
  border: 1px dashed rgba(33, 76, 85, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #657a7c;
  font-size: 0.82rem;
}

.quick-chat {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 32;
  height: max(82px, calc(env(safe-area-inset-bottom) + 82px));
  pointer-events: none;
}

.quick-chat.is-open {
  opacity: 1;
}

.quick-chat-form {
  position: fixed;
  left: 50%;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
  width: min(1120px, calc(100vw - 320px));
  display: grid;
  grid-template-columns: minmax(420px, 1.9fr) minmax(260px, 1fr) 68px 58px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(76, 45, 96, 0.16);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      rgba(110, 53, 184, 0.026) 2px,
      rgba(110, 53, 184, 0.026) 4px
    ),
    rgba(38, 29, 45, 0.94);
  box-shadow: 0 18px 42px rgba(8, 6, 12, 0.34);
  pointer-events: auto;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.quick-chat-emote-picker {
  grid-column: auto;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  min-width: 0;
}

.quick-chat.is-open .quick-chat-form {
  transform: translateX(-50%);
}

.quick-chat-info {
  position: fixed;
  left: max(24px, env(safe-area-inset-left));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
  width: clamp(144px, 10vw, 190px);
  min-height: 54px;
  display: none;
  align-content: center;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(236, 218, 247, 0.16);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      rgba(110, 53, 184, 0.026) 2px,
      rgba(110, 53, 184, 0.026) 4px
    ),
    rgba(38, 29, 45, 0.92);
  box-shadow: 0 18px 42px rgba(8, 6, 12, 0.3);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.quick-chat-info strong {
  overflow: hidden;
  color: #f4edf7;
  font-size: 0.82rem;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-chat-info span {
  overflow: hidden;
  color: #c5b8cc;
  font-size: 0.74rem;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.quick-chat-channel-label {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c5b8cc;
  display: block;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.quick-chat input[type="text"] {
  height: 42px;
  min-width: 0;
  border-color: rgba(236, 218, 247, 0.14);
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--font-chat);
  font-size: 1.16rem;
  font-weight: 400;
}

.quick-chat-send-button,
.quick-chat-log-button {
  min-height: 42px;
  font-size: 0.86rem;
  font-weight: 820;
}

.quick-chat-send-button {
  background: #5f2c86;
  border-color: rgba(61, 30, 82, 0.12);
  color: #ffffff;
}

.quick-chat-close-button {
  display: none;
}

.quick-chat .emote-custom {
  display: none;
}

.quick-chat-status {
  min-height: 34px;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}


.house-shout {
  --house-shout-bg: rgba(255, 250, 217, 0.95);
  --house-shout-border: rgba(42, 32, 48, 0.92);
  --house-shout-text: #241a2d;
  position: absolute;
  top: 4.5%;
  left: 50%;
  z-index: 27;
  width: min(58%, 680px);
  padding: 14px 18px;
  border: 3px solid var(--house-shout-border);
  border-radius: 8px;
  background: var(--house-shout-bg);
  color: var(--house-shout-text);
  box-shadow:
    7px 7px 0 rgba(42, 32, 48, 0.14),
    0 18px 42px rgba(36, 26, 45, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease;
}

.house-shout::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border: 3px solid rgba(42, 32, 48, 0.62);
  clip-path: polygon(
    0 22%, 5% 15%, 9% 20%, 14% 9%, 18% 17%, 24% 7%, 28% 15%,
    34% 8%, 40% 16%, 46% 7%, 52% 15%, 58% 8%, 64% 16%, 70% 8%,
    76% 17%, 82% 9%, 88% 19%, 94% 13%, 100% 22%,
    96% 48%, 100% 72%, 94% 86%, 88% 81%, 82% 93%, 76% 83%,
    70% 94%, 64% 84%, 58% 92%, 52% 85%, 46% 94%, 40% 84%,
    34% 93%, 28% 84%, 22% 92%, 16% 83%, 10% 91%, 5% 82%, 0 72%,
    4% 50%
  );
}

.house-shout.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.house-shout strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-size: clamp(0.78rem, 1.05vw, 0.96rem);
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.house-shout p {
  position: relative;
  margin: 0;
  font-family: var(--font-chat);
  font-size: clamp(1.18rem, 1.7vw, 1.6rem);
  font-weight: 400;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.standee-layer {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.standee-slot {
  --standee-width: 24%;
  --standee-height: 64%;
  --standee-bottom: 0%;
  --standee-x: 4%;
  --standee-scale: 1;
  --standee-art-height: 82%;
  --standee-bubble-gap: 26px;
  position: absolute;
  bottom: var(--standee-bottom);
  z-index: 2;
  width: var(--standee-width);
  height: var(--standee-height);
  opacity: 0;
  transform: translateY(18px) scale(var(--standee-scale));
  transform-origin: bottom center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.standee-slot-front-left {
  left: var(--standee-x);
  z-index: 4;
}

.standee-slot-front-right {
  right: var(--standee-x);
  z-index: 4;
}

.standee-slot-back-left {
  --standee-width: 22%;
  --standee-height: 57%;
  --standee-bottom: 0%;
  --standee-x: 23%;
  --standee-scale: 0.9;
  left: var(--standee-x);
  z-index: 3;
}

.standee-slot-back-right {
  --standee-width: 22%;
  --standee-height: 57%;
  --standee-bottom: 0%;
  --standee-x: 23%;
  --standee-scale: 0.9;
  right: var(--standee-x);
  z-index: 3;
}

.standee-slot.is-visible {
  opacity: 1;
  transform: translateY(0) scale(var(--standee-scale));
}

.standee-slot.is-new-message .standee-bubble {
  animation: standee-bubble-new 760ms ease-out;
}

.standee-slot.is-new-message .speech-text,
.house-shout.is-visible .speech-text {
  display: inline-block;
  transform-origin: 50% 80%;
  animation: standee-text-wiggle-once 540ms ease-out 1;
}

.standee-slot.is-new-message .standee-art {
  animation: standee-art-new 980ms ease-in-out;
}

.standee-slot.emote-dance .standee-art {
  animation: standee-avatar-dance 620ms ease-in-out infinite;
}

.standee-slot.emote-defeat.is-visible {
  animation: standee-defeat-sink 2300ms ease-in forwards;
}

.standee-slot.emote-dance .standee-bubble,
.standee-slot.emote-defeat .standee-bubble,
.standee-slot.emote-question .standee-bubble,
.standee-slot.emote-exclaim .standee-bubble {
  opacity: 0;
  visibility: hidden;
}

.standee-slot.emote-defeat::before,
.standee-slot.emote-defeat::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 8;
  width: min(112%, 210px);
  height: 13px;
  border: 2px solid #7b0000;
  border-radius: 999px;
  background: #ff1f1f;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.55),
    0 8px 18px rgba(96, 0, 0, 0.28);
  pointer-events: none;
}

.standee-slot.emote-defeat::before {
  transform: translate(-50%, -50%) rotate(38deg);
}

.standee-slot.emote-defeat::after {
  transform: translate(-50%, -50%) rotate(-38deg);
}

.standee-slot.emote-question::before,
.standee-slot.emote-exclaim::before {
  position: absolute;
  left: 50%;
  top: 4%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 4px solid rgba(42, 32, 48, 0.88);
  border-radius: 50%;
  background: rgba(255, 252, 255, 0.94);
  color: #241a2d;
  font-family: var(--font-ui);
  font-size: 4.8rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(255, 231, 94, 0.34),
    0 16px 34px rgba(36, 26, 45, 0.24);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: standee-symbol-pop 1050ms cubic-bezier(0.2, 1.2, 0.32, 1) 1 both;
}

.standee-slot.emote-question::before {
  content: "?";
  color: #5744a6;
}

.standee-slot.emote-exclaim::before {
  content: "!";
  color: #cf2438;
}

.standee-slot.is-shout .standee-bubble {
  --standee-bubble-border: rgba(42, 32, 48, 0.94);
  --standee-bubble-bg: rgba(255, 250, 217, 0.95);
  box-shadow:
    7px 7px 0 rgba(42, 32, 48, 0.16),
    0 18px 42px rgba(36, 26, 45, 0.2);
}

.standee-slot.is-shout .standee-bubble p {
  font-weight: 900;
}

@keyframes standee-bubble-new {
  0% {
    outline: 0 solid rgba(255, 231, 122, 0.7);
    outline-offset: 0;
  }
  34% {
    outline: 5px solid rgba(255, 231, 122, 0.34);
    outline-offset: 4px;
  }
  100% {
    outline: 0 solid rgba(255, 231, 122, 0);
    outline-offset: 10px;
  }
}

@keyframes standee-art-new {
  0% {
    transform:
      translateX(-50%)
      translateY(0);
  }
  20% {
    transform:
      translateX(-50%)
      translateY(-5px);
  }
  42% {
    transform:
      translateX(-50%)
      translateY(2px);
  }
  62% {
    transform:
      translateX(-50%)
      translateY(-3px);
  }
  100% {
    transform:
      translateX(-50%)
      translateY(0);
  }
}

.standee-art {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: var(--standee-art-height);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 252, 255, 0.72);
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 42%),
    var(--standee-color, #4f6f8f);
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
  text-shadow: 0 4px 10px rgba(18, 22, 26, 0.28);
  box-shadow: 0 18px 42px rgba(36, 26, 45, 0.18);
  transform: translateX(-50%);
  transform-origin: bottom center;
}

.standee-slot.has-standee {
  --standee-art-height: 100%;
}

.standee-slot.has-standee .standee-art {
  width: 150%;
  overflow: visible;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  text-shadow: none;
}

.standee-art img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 26px rgba(36, 26, 45, 0.2));
}

.standee-slot.is-flipped .standee-art > img {
  transform: scaleX(-1);
}

.custom-standee {
  position: relative;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 404 / 844;
  filter: drop-shadow(0 20px 26px rgba(36, 26, 45, 0.2));
}

.standee-slot.is-flipped .custom-standee,
.profile-standee-preview.is-flipped .custom-standee {
  transform: scaleX(-1);
}

.custom-standee-layer,
.custom-standee-layer img,
.custom-standee-layer-tint {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.custom-standee-layer img {
  object-fit: contain;
  object-position: bottom center;
}

.custom-standee-layer-tint {
  background: var(--custom-standee-layer-color, var(--custom-standee-color, #d9d9d9));
  mask-position: bottom center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: bottom center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mix-blend-mode: multiply;
  opacity: 0.72;
}

.standee-art > span:not(.custom-standee) {
  display: grid;
  place-items: center;
  width: 74%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.standee-bubble {
  --standee-bubble-x: -50%;
  --standee-tail-x: 50%;
  --standee-bubble-bg: rgba(255, 252, 255, 0.92);
  --standee-bubble-border: rgba(42, 32, 48, 0.84);
  --standee-bubble-text: #241a2d;
  position: absolute;
  left: 50%;
  bottom: calc(var(--standee-art-height) + var(--standee-bubble-gap));
  z-index: 2;
  width: min(124%, 360px);
  min-width: min(280px, 132%);
  padding: 13px 14px;
  border: 2px solid var(--standee-bubble-border);
  border-radius: 8px;
  background: var(--standee-bubble-bg);
  color: var(--standee-bubble-text);
  box-shadow:
    6px 6px 0 rgba(42, 32, 48, 0.12),
    0 18px 42px rgba(36, 26, 45, 0.18);
  opacity: 1;
  transform: translateX(var(--standee-bubble-x));
  transition: opacity 260ms ease, transform 260ms ease;
}

.standee-bubble::before,
.standee-bubble::after {
  content: "";
  position: absolute;
  left: var(--standee-tail-x);
  width: 0;
  height: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.standee-bubble::before {
  bottom: -15px;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 15px solid var(--standee-bubble-border);
}

.standee-bubble::after {
  bottom: -11px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid var(--standee-bubble-bg);
}

.standee-slot.is-bubble-hidden .standee-bubble {
  opacity: 0;
  transform: translate(var(--standee-bubble-x), -8px);
}

.standee-slot-front-left .standee-bubble,
.standee-slot-back-left .standee-bubble {
  --standee-bubble-x: -44%;
  --standee-tail-x: 44%;
}

.standee-slot-front-right .standee-bubble,
.standee-slot-back-right .standee-bubble {
  --standee-bubble-x: -56%;
  --standee-tail-x: 56%;
}

.standee-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.standee-meta strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standee-meta span {
  color: #705b73;
  font-size: 0.75rem;
  font-weight: 700;
}

.standee-bubble p {
  position: relative;
  margin: 0;
  font-size: clamp(0.9rem, 1.2vw, 1.08rem);
  line-height: 1.38;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: normal;
}

.standee-slot.emote-mad .standee-bubble,
.house-shout.emote-mad {
  --standee-bubble-bg: #cf2438;
  --standee-bubble-border: #4d0712;
  --standee-bubble-text: #fff34f;
  --house-shout-bg: #cf2438;
  --house-shout-border: #4d0712;
  --house-shout-text: #fff34f;
  background:
    repeating-linear-gradient(115deg, rgba(255, 243, 79, 0.16) 0 4px, transparent 4px 18px),
    var(--standee-bubble-bg, var(--house-shout-bg));
  box-shadow:
    7px 7px 0 rgba(77, 7, 18, 0.26),
    0 18px 42px rgba(77, 7, 18, 0.22);
}

.standee-slot.emote-mad .standee-bubble p,
.house-shout.emote-mad p {
  color: #fff34f;
  font-weight: 1000;
  text-shadow: 2px 2px 0 rgba(77, 7, 18, 0.62);
}

.standee-slot.emote-mad .standee-bubble p::before,
.standee-slot.emote-mad .standee-bubble p::after,
.house-shout.emote-mad p::before,
.house-shout.emote-mad p::after {
  content: "";
  position: absolute;
  top: -17px;
  left: -12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(#fff34f, #fff34f) 50% 0 / 4px 100% no-repeat,
    linear-gradient(90deg, #fff34f, #fff34f) 0 50% / 100% 4px no-repeat;
  filter: drop-shadow(2px 2px 0 rgba(77, 7, 18, 0.62));
  transform: rotate(45deg);
}

.standee-slot.emote-mad .standee-bubble p::after,
.house-shout.emote-mad p::after {
  top: -11px;
  left: 1px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(#fff34f, #fff34f) 50% 0 / 3px 100% no-repeat,
    linear-gradient(90deg, #fff34f, #fff34f) 0 50% / 100% 3px no-repeat;
}

.standee-slot.emote-sad .standee-bubble,
.house-shout.emote-sad {
  --standee-bubble-bg: #d9efff;
  --standee-bubble-border: #2c76e2;
  --standee-bubble-text: #009bff;
  --house-shout-bg: #d9efff;
  --house-shout-border: #2c76e2;
  --house-shout-text: #009bff;
}

.standee-slot.emote-sad .standee-bubble p,
.house-shout.emote-sad p {
  color: #009bff;
  font-weight: 900;
}

.standee-slot.emote-sad .standee-bubble::after {
  box-shadow:
    28px -18px 0 -5px rgba(0, 155, 255, 0.68),
    48px -5px 0 -6px rgba(0, 155, 255, 0.5);
}

.standee-slot.emote-sad .standee-bubble p::before,
.standee-slot.emote-sad .standee-bubble p::after,
.house-shout.emote-sad p::before,
.house-shout.emote-sad p::after {
  content: "";
  position: absolute;
  top: -6px;
  right: -16px;
  width: 10px;
  height: 15px;
  border-radius: 80% 80% 80% 0;
  background: #3fb8ff;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transform: rotate(-22deg);
  animation: standee-tear-fall 1800ms ease-in 1 both;
}

.standee-slot.emote-sad .standee-bubble p::after,
.house-shout.emote-sad p::after {
  top: 16px;
  right: -28px;
  width: 8px;
  height: 12px;
  animation-delay: 420ms;
}

.standee-slot.emote-sad .speech-letter,
.house-shout.emote-sad .speech-letter {
  display: inline-block;
  transform-origin: 50% 80%;
  animation: standee-sad-wiggle 620ms ease-in-out infinite;
  animation-delay: var(--speech-letter-delay, 0ms);
}

.standee-slot.emote-aaa .standee-bubble,
.house-shout.emote-aaa {
  --standee-bubble-bg: #ffe05a;
  --standee-bubble-border: #2b2119;
  --standee-bubble-text: #241a2d;
  --house-shout-bg: #ffe05a;
  --house-shout-border: #2b2119;
  --house-shout-text: #241a2d;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.72) 0 7px, transparent 8px),
    radial-gradient(circle at 88% 23%, rgba(255, 255, 255, 0.58) 0 5px, transparent 6px),
    var(--standee-bubble-bg, var(--house-shout-bg));
}

.standee-slot.emote-aaa .standee-bubble p,
.house-shout.emote-aaa p {
  font-weight: 1000;
  letter-spacing: 0;
  animation: standee-aaa-shake 180ms steps(2, end) infinite;
}

.standee-slot.emote-meh .standee-bubble,
.house-shout.emote-meh {
  --standee-bubble-bg: #e1e0e3;
  --standee-bubble-border: #6f6874;
  --standee-bubble-text: #4d4850;
  --house-shout-bg: #e1e0e3;
  --house-shout-border: #6f6874;
  --house-shout-text: #4d4850;
  filter: saturate(0.78);
}

.standee-slot.is-new-message.emote-meh .standee-bubble {
  animation: standee-bubble-new 760ms ease-out, standee-meh-slump 1900ms ease-in-out infinite;
}

.standee-slot.emote-meh:not(.is-new-message) .standee-bubble,
.house-shout.emote-meh {
  animation: standee-meh-slump 1900ms ease-in-out infinite;
}

.standee-slot.emote-meh .standee-bubble p,
.house-shout.emote-meh p {
  font-style: italic;
  font-weight: 800;
}

.standee-slot.emote-love .standee-bubble,
.house-shout.emote-love {
  --standee-bubble-bg: #ffd9ec;
  --standee-bubble-border: #d32778;
  --standee-bubble-text: #8a164d;
  --house-shout-bg: #ffd9ec;
  --house-shout-border: #d32778;
  --house-shout-text: #8a164d;
  box-shadow:
    0 0 0 0 rgba(255, 71, 159, 0.34),
    7px 7px 0 rgba(211, 39, 120, 0.16),
    0 18px 42px rgba(211, 39, 120, 0.18);
}

.standee-slot.is-new-message.emote-love .standee-bubble {
  animation: standee-bubble-new 760ms ease-out, standee-love-pulse 1450ms ease-in-out infinite;
}

.standee-slot.emote-love:not(.is-new-message) .standee-bubble,
.house-shout.emote-love {
  animation: standee-love-pulse 1450ms ease-in-out infinite;
}

.standee-slot.emote-love .standee-bubble p,
.house-shout.emote-love p {
  color: #8a164d;
  font-weight: 900;
}

.standee-slot.emote-love .standee-bubble p::before,
.standee-slot.emote-love .standee-bubble p::after,
.house-shout.emote-love p::before,
.house-shout.emote-love p::after {
  position: absolute;
  color: #ff4b9e;
  font-size: 1.18em;
  font-weight: 1000;
  line-height: 0.82;
  white-space: pre;
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.72);
  animation: standee-love-float 2200ms ease-out 1 both;
}

.standee-slot.emote-love .standee-bubble p::before,
.house-shout.emote-love p::before {
  content: "♥\A♥\A♥";
  left: -20px;
  top: -10px;
}

.standee-slot.emote-love .standee-bubble p::after,
.house-shout.emote-love p::after {
  content: "♥\A♥";
  right: -20px;
  bottom: -16px;
  animation-delay: 260ms;
}

.standee-slot.emote-cat .standee-bubble,
.house-shout.emote-cat {
  --standee-bubble-bg: #fff3c6;
  --standee-bubble-border: #2b2119;
  --standee-bubble-text: #6f3f12;
  --house-shout-bg: #fff3c6;
  --house-shout-border: #2b2119;
  --house-shout-text: #6f3f12;
}

.standee-slot.emote-cat .standee-bubble p,
.house-shout.emote-cat p {
  min-height: 1.3em;
  font-weight: 950;
  padding-inline: 28px;
  text-align: center;
}

.standee-slot.emote-cat .standee-bubble p .speech-text::before,
.house-shout.emote-cat p .speech-text::before {
  content: "^w^";
  display: inline-block;
  margin-right: 0.45em;
  font-weight: 1000;
}

.standee-slot.emote-cat .standee-bubble p .speech-text::after,
.house-shout.emote-cat p .speech-text::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 102%;
  height: 18px;
  pointer-events: none;
  background:
    linear-gradient(12deg, transparent 0 44%, #6f3f12 45% 51%, transparent 52%) left center / 38px 6px no-repeat,
    linear-gradient(-12deg, transparent 0 44%, #6f3f12 45% 51%, transparent 52%) left 9px / 38px 6px no-repeat,
    linear-gradient(-12deg, transparent 0 44%, #6f3f12 45% 51%, transparent 52%) right center / 38px 6px no-repeat,
    linear-gradient(12deg, transparent 0 44%, #6f3f12 45% 51%, transparent 52%) right 9px / 38px 6px no-repeat;
  transform: translate(-50%, -50%);
}

.standee-slot.emote-cat .standee-bubble p::before,
.standee-slot.emote-cat .standee-bubble p::after,
.house-shout.emote-cat p::before,
.house-shout.emote-cat p::after {
  content: "";
  position: absolute;
  top: -34px;
  width: 20px;
  height: 28px;
  border: 3px solid #2b2119;
  border-right: 0;
  border-bottom: 0;
  background: #fff3c6;
}

.standee-slot.emote-cat .standee-bubble p::before,
.house-shout.emote-cat p::before {
  left: -1px;
  transform: rotate(55deg) skew(6deg);
}

.standee-slot.emote-cat .standee-bubble p::after,
.house-shout.emote-cat p::after {
  right: -1px;
  transform: rotate(35deg) skew(-6deg);
}

.standee-slot.emote-lol .standee-bubble,
.house-shout.emote-lol {
  --standee-bubble-bg: #d8fff0;
  --standee-bubble-border: #087a5a;
  --standee-bubble-text: #063f32;
  --house-shout-bg: #d8fff0;
  --house-shout-border: #087a5a;
  --house-shout-text: #063f32;
}

.standee-slot.emote-lol .standee-bubble p,
.house-shout.emote-lol p {
  font-weight: 1000;
  animation: standee-lol-bounce 680ms ease-in-out infinite;
}

.standee-slot.emote-epic .standee-bubble,
.house-shout.emote-epic {
  --standee-bubble-bg: #241a2d;
  --standee-bubble-border: #ffe75e;
  --standee-bubble-text: #ffe75e;
  --house-shout-bg: #241a2d;
  --house-shout-border: #ffe75e;
  --house-shout-text: #ffe75e;
  box-shadow:
    0 0 0 3px rgba(255, 231, 94, 0.18),
    9px 9px 0 rgba(36, 26, 45, 0.22),
    0 18px 42px rgba(36, 26, 45, 0.28);
  animation: standee-epic-hue-cycle 1800ms linear infinite;
}

.standee-slot.emote-epic .standee-bubble p,
.house-shout.emote-epic p {
  color: #ffe75e;
  font-weight: 1000;
  text-transform: uppercase;
}

.standee-slot.emote-action .standee-bubble,
.house-shout.emote-action {
  --standee-bubble-bg: rgba(42, 32, 48, 0.9);
  --standee-bubble-border: rgba(255, 252, 255, 0.64);
  --standee-bubble-text: #fffbe8;
  --house-shout-bg: rgba(42, 32, 48, 0.9);
  --house-shout-border: rgba(255, 252, 255, 0.64);
  --house-shout-text: #fffbe8;
  border-style: dashed;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 6px, transparent 6px 14px),
    var(--standee-bubble-bg, var(--house-shout-bg));
}

.standee-slot.emote-action .standee-bubble::before,
.standee-slot.emote-action .standee-bubble::after {
  display: none;
}

.standee-slot.emote-action .standee-bubble p,
.house-shout.emote-action p {
  color: #fffbe8;
  font-size: clamp(1.08rem, 1.4vw, 1.32rem);
  font-style: italic;
  font-weight: 950;
  text-align: center;
}

.standee-slot.emote-ellipsis .standee-bubble,
.house-shout.emote-ellipsis {
  --standee-bubble-bg: rgba(255, 255, 255, 0.98);
  --standee-bubble-border: #111111;
  --standee-bubble-text: #111111;
  --house-shout-bg: rgba(255, 255, 255, 0.98);
  --house-shout-border: #111111;
  --house-shout-text: #111111;
  border-width: 4px;
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.18),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.standee-slot.emote-ellipsis .standee-bubble p,
.house-shout.emote-ellipsis p {
  min-height: 1.2em;
  color: #111111;
  font-size: clamp(1rem, 1.5vw, 1.26rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1.18;
  text-align: center;
}

.speech-ellipsis-wait,
.speech-ellipsis-reveal {
  display: block;
}

.speech-ellipsis-wait {
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 0.92;
  animation: standee-ellipsis-wait 3200ms steps(1, end) 1 both;
}

.speech-ellipsis-reveal {
  opacity: 0;
  transform: translateY(4px);
  animation: standee-ellipsis-reveal 3200ms ease-out 1 forwards;
}

.standee-slot.emote-ellipsis .standee-bubble p::before,
.house-shout.emote-ellipsis p::before {
  content: "";
  position: absolute;
  top: -14px;
  right: -2px;
  width: 11px;
  height: 16px;
  border: 2px solid #1e6dd8;
  border-radius: 70% 70% 70% 0;
  background: #69c4ff;
  transform: rotate(-28deg);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.48);
}

.standee-slot.emote-think .standee-bubble,
.house-shout.emote-think {
  --standee-bubble-bg: #f9f7ff;
  --standee-bubble-border: #5744a6;
  --standee-bubble-text: #332853;
  --house-shout-bg: #f9f7ff;
  --house-shout-border: #5744a6;
  --house-shout-text: #332853;
  border-width: 3px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.95) 0 18px, transparent 19px),
    radial-gradient(circle at 42% 4%, rgba(255, 255, 255, 0.9) 0 20px, transparent 21px),
    radial-gradient(circle at 72% 15%, rgba(255, 255, 255, 0.92) 0 18px, transparent 19px),
    var(--standee-bubble-bg, var(--house-shout-bg));
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.7),
    7px 7px 0 rgba(87, 68, 166, 0.16),
    0 18px 42px rgba(36, 26, 45, 0.18);
}

.standee-slot.emote-think .standee-bubble::before,
.standee-slot.emote-think .standee-bubble::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.standee-slot.emote-think .standee-bubble::before {
  left: 10%;
  right: 10%;
  top: -18px;
  height: 36px;
  border: 3px solid var(--standee-bubble-border);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(circle at 18% 80%, var(--standee-bubble-bg) 0 23px, transparent 24px),
    radial-gradient(circle at 46% 36%, var(--standee-bubble-bg) 0 30px, transparent 31px),
    radial-gradient(circle at 78% 76%, var(--standee-bubble-bg) 0 24px, transparent 25px);
  z-index: -1;
}

.standee-slot.emote-think .standee-bubble::after {
  left: calc(var(--standee-tail-x) - 22px);
  bottom: -38px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--standee-bubble-border);
  border-radius: 50%;
  background: var(--standee-bubble-bg);
  box-shadow:
    -16px 19px 0 -3px var(--standee-bubble-bg),
    -16px 19px 0 -1px var(--standee-bubble-border),
    -30px 33px 0 -5px var(--standee-bubble-bg),
    -30px 33px 0 -3px var(--standee-bubble-border);
}

.house-shout.emote-think::before {
  inset: -16px -10px auto;
  height: 44px;
  border: 3px solid var(--house-shout-border);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(circle at 16% 82%, var(--house-shout-bg) 0 24px, transparent 25px),
    radial-gradient(circle at 42% 34%, var(--house-shout-bg) 0 31px, transparent 32px),
    radial-gradient(circle at 76% 78%, var(--house-shout-bg) 0 25px, transparent 26px);
  clip-path: none;
}

.house-shout.emote-think::after {
  content: "";
  position: absolute;
  left: 30%;
  bottom: -36px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--house-shout-border);
  border-radius: 50%;
  background: var(--house-shout-bg);
  box-shadow:
    -16px 19px 0 -3px var(--house-shout-bg),
    -16px 19px 0 -1px var(--house-shout-border),
    -30px 33px 0 -5px var(--house-shout-bg),
    -30px 33px 0 -3px var(--house-shout-border);
}

.standee-slot.emote-think .standee-bubble p,
.house-shout.emote-think p {
  color: #332853;
  font-style: italic;
  font-weight: 900;
  text-align: center;
}

.standee-slot.emote-despair .standee-bubble,
.house-shout.emote-despair {
  --standee-bubble-bg: #141018;
  --standee-bubble-border: #ff1f1f;
  --standee-bubble-text: #fff7d0;
  --house-shout-bg: #141018;
  --house-shout-border: #ff1f1f;
  --house-shout-text: #fff7d0;
  overflow: hidden;
  border-width: 4px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 31, 31, 0.16) 0 8px, transparent 8px 18px),
    var(--standee-bubble-bg, var(--house-shout-bg));
  box-shadow:
    9px 9px 0 rgba(92, 0, 0, 0.28),
    0 20px 42px rgba(92, 0, 0, 0.25);
}

.standee-slot.emote-despair .standee-bubble p,
.house-shout.emote-despair p {
  min-height: 1.15em;
  overflow: hidden;
  color: #fff7d0;
  font-size: clamp(1.45rem, 2.8vw, 2.8rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    3px 3px 0 #8d0000,
    0 0 12px rgba(255, 31, 31, 0.45);
  white-space: nowrap;
}

.speech-despair-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.01em;
  animation: standee-despair-scroll 3800ms cubic-bezier(0.2, 0.82, 0.28, 1) 1 both;
}

.speech-despair-text span {
  display: inline-block;
  transform: scale(var(--despair-letter-scale, 1));
  transform-origin: 50% 85%;
}

@keyframes standee-sad-wiggle {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  28% {
    transform: translateY(1px) rotate(-1deg);
  }
  62% {
    transform: translateY(-1px) rotate(1deg);
  }
}

@keyframes standee-text-wiggle-once {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  18% {
    transform: translateY(-1px) rotate(-1deg);
  }
  36% {
    transform: translateY(1px) rotate(1deg);
  }
  54% {
    transform: translateY(-1px) rotate(0.5deg);
  }
}

@keyframes standee-avatar-dance {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
  25% {
    transform: translateX(-50%) translateY(-4px) rotate(-4deg);
  }
  50% {
    transform: translateX(-50%) translateY(2px) rotate(3deg);
  }
  75% {
    transform: translateX(-50%) translateY(-3px) rotate(4deg);
  }
}

@keyframes standee-defeat-sink {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(var(--standee-scale));
  }
  28% {
    opacity: 1;
    transform: translateY(8px) rotate(-3deg) scale(var(--standee-scale));
  }
  100% {
    opacity: 0.12;
    transform: translateY(118%) rotate(-10deg) scale(var(--standee-scale));
  }
}

@keyframes standee-symbol-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.28) rotate(-10deg);
  }
  26% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18) rotate(6deg);
  }
  52%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes standee-tear-fall {
  0% {
    opacity: 0;
    transform: translateY(-4px) rotate(-22deg) scale(0.82);
  }
  18%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(30px) rotate(-22deg) scale(1);
  }
}

@keyframes standee-aaa-shake {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  33% {
    transform: translate(-2px, 1px) rotate(-1deg);
  }
  66% {
    transform: translate(2px, -1px) rotate(1deg);
  }
}

@keyframes standee-meh-slump {
  0%,
  100% {
    transform: translateX(var(--standee-bubble-x, -50%)) translateY(0) rotate(-0.5deg);
  }
  50% {
    transform: translateX(var(--standee-bubble-x, -50%)) translateY(5px) rotate(1.2deg);
  }
}

@keyframes standee-love-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(255, 71, 159, 0.26),
      7px 7px 0 rgba(211, 39, 120, 0.16),
      0 18px 42px rgba(211, 39, 120, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(255, 71, 159, 0),
      7px 7px 0 rgba(211, 39, 120, 0.18),
      0 18px 42px rgba(211, 39, 120, 0.22);
  }
}

@keyframes standee-love-float {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.82);
  }
  18%,
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-28px) scale(1.08);
  }
}

@keyframes standee-lol-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-0.5deg);
  }
  50% {
    transform: translateY(-3px) rotate(0.5deg);
  }
}

@keyframes standee-epic-hue-cycle {
  0% {
    filter: hue-rotate(0deg) saturate(1.15);
  }
  100% {
    filter: hue-rotate(360deg) saturate(1.15);
  }
}

@keyframes standee-ellipsis-wait {
  0%,
  62% {
    opacity: 1;
  }
  63%,
  100% {
    opacity: 0;
  }
}

@keyframes standee-ellipsis-reveal {
  0%,
  62% {
    opacity: 0;
    transform: translateY(4px);
  }
  74%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes standee-despair-scroll {
  0% {
    transform: translateX(112%);
  }
  34%,
  58% {
    transform: translateX(2%);
  }
  100% {
    transform: translateX(-118%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .standee-slot.emote-dance .standee-art,
  .standee-slot.emote-defeat.is-visible,
  .standee-slot.emote-question::before,
  .standee-slot.emote-exclaim::before,
  .standee-slot.is-new-message .speech-text,
  .house-shout.is-visible .speech-text,
  .standee-slot.emote-sad .speech-letter,
  .house-shout.emote-sad .speech-letter,
  .standee-slot.emote-sad .standee-bubble p::before,
  .standee-slot.emote-sad .standee-bubble p::after,
  .house-shout.emote-sad p::before,
  .house-shout.emote-sad p::after,
  .standee-slot.emote-aaa .standee-bubble p,
  .house-shout.emote-aaa p,
  .standee-slot.emote-meh .standee-bubble,
  .house-shout.emote-meh,
  .standee-slot.emote-love .standee-bubble,
  .house-shout.emote-love,
  .standee-slot.emote-love .standee-bubble p::before,
  .standee-slot.emote-love .standee-bubble p::after,
  .house-shout.emote-love p::before,
  .house-shout.emote-love p::after,
  .standee-slot.emote-lol .standee-bubble p,
  .house-shout.emote-lol p,
  .standee-slot.emote-epic .standee-bubble,
  .house-shout.emote-epic,
  .speech-despair-text,
  .speech-ellipsis-wait,
  .speech-ellipsis-reveal {
    animation: none;
  }

  .speech-ellipsis-reveal {
    opacity: 1;
    transform: none;
  }
}

.floating-drawer {
  --drawer-accent: #5f4ab0;
  --drawer-accent-rgb: 95, 74, 176;
  --drawer-soft: #f1edf6;
  position: fixed;
  left: var(--floating-drawer-left, calc(100vw - min(430px, calc(100vw - 108px)) - 88px));
  top: var(--floating-drawer-top, max(18px, env(safe-area-inset-top)));
  right: auto;
  bottom: auto;
  z-index: 33;
  width: var(--floating-drawer-width, min(430px, calc(100vw - 108px)));
  min-width: min(300px, calc(100vw - 20px));
  height: var(--floating-drawer-height, min(680px, calc(100vh - 28px)));
  min-height: min(320px, calc(100vh - 20px));
  max-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 12px;
  border: 1px solid rgba(76, 45, 96, 0.14);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0,
      rgba(255, 255, 255, 0.14) 1px,
      rgba(var(--drawer-accent-rgb), 0.022) 2px,
      rgba(var(--drawer-accent-rgb), 0.022) 4px
    ),
    rgba(255, 252, 255, 0.94);
  box-shadow: 0 22px 64px rgba(76, 45, 96, 0.2);
  opacity: 0;
  overflow: auto;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: blur(22px);
}

.floating-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-drawer.is-moving,
.floating-drawer.is-resizing {
  transition: none;
  user-select: none;
}

.profile-drawer {
  --drawer-accent: #a8326f;
  --drawer-accent-rgb: 168, 50, 111;
  --drawer-soft: #ffe6f1;
}

.auth-drawer {
  --drawer-accent: #4151a8;
  --drawer-accent-rgb: 65, 81, 168;
  --drawer-soft: #edf0ff;
}

.closet-drawer {
  --drawer-accent: #0b6f68;
  --drawer-accent-rgb: 11, 111, 104;
  --drawer-soft: #e5fbf6;
}

.items-drawer {
  --drawer-accent: #806800;
  --drawer-accent-rgb: 128, 104, 0;
  --drawer-soft: #fff7cc;
}

.marketplace-drawer {
  --drawer-accent: #8a5a00;
  --drawer-accent-rgb: 138, 90, 0;
  --drawer-soft: #ffe1a8;
}

.marketplace-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 2px 10px;
  color: #5a470e;
  font-size: 0.82rem;
  font-weight: 700;
}

.marketplace-filter-row input {
  margin: 0;
}

.chat-drawer {
  --drawer-accent: #6e35b8;
  --drawer-accent-rgb: 110, 53, 184;
  --drawer-soft: #f3e8ff;
}

.store-drawer {
  --drawer-accent: #8a5a00;
  --drawer-accent-rgb: 138, 90, 0;
  --drawer-soft: #fff0c9;
}

.floating-drawer-chrome {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 -12px 0;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 8px 8px 0 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.2) 1px,
      rgba(var(--drawer-accent-rgb), 0.035) 2px,
      rgba(var(--drawer-accent-rgb), 0.035) 5px
    ),
    rgba(255, 252, 255, 0.94);
  cursor: grab;
}

.floating-drawer-chrome:active {
  cursor: grabbing;
}

.floating-drawer-grip {
  display: grid;
  gap: 3px;
  width: 16px;
}

.floating-drawer-grip span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(var(--drawer-accent-rgb), 0.46);
}

.floating-drawer-title {
  min-width: 0;
  display: grid;
  gap: 1px;
  color: #2a2030;
  line-height: 1.05;
}

.floating-drawer-title-kicker {
  color: rgba(var(--drawer-accent-rgb), 0.72);
  font-size: 0.64rem;
  font-weight: 760;
  text-transform: uppercase;
}

.floating-drawer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.floating-drawer-reset-button,
.floating-drawer-close-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(var(--drawer-accent-rgb), 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  color: var(--drawer-accent);
  cursor: pointer;
}

.floating-drawer-close-button {
  font-size: 1.1rem;
  line-height: 1;
}

.floating-drawer-reset-button:hover,
.floating-drawer-close-button:hover {
  border-color: rgba(var(--drawer-accent-rgb), 0.42);
  background: var(--drawer-soft);
  color: var(--drawer-accent);
}

.floating-drawer-reset-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.floating-drawer-resize-handle {
  position: sticky;
  right: -8px;
  bottom: -8px;
  align-self: flex-end;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: -8px -8px -8px 0;
  cursor: nwse-resize;
}

.floating-drawer-resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(var(--drawer-accent-rgb), 0.42);
  border-bottom: 2px solid rgba(var(--drawer-accent-rgb), 0.42);
  border-radius: 0 0 4px 0;
}

.floating-drawer .status-line {
  flex: 0 0 auto;
}

.chat-channel-tabs {
  border: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 999px;
  background: rgba(241, 237, 246, 0.9);
}

.chat-channel-tab {
  border-radius: 999px;
}

.chat-channel-tab.is-active {
  border-color: rgba(110, 53, 184, 0.18);
  background: #fff8f2;
  color: #5f25a8;
  box-shadow: 0 7px 18px rgba(76, 45, 96, 0.11);
}

.chat-user-field {
  padding: 8px;
  border: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.chat-members {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  scrollbar-width: thin;
}

.chat-member {
  flex: 0 0 auto;
  border-color: rgba(110, 53, 184, 0.12);
  background: rgba(255, 248, 242, 0.74);
}

.chat-thread {
  border-color: rgba(76, 45, 96, 0.12);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      rgba(110, 53, 184, 0.025) 2px,
      rgba(110, 53, 184, 0.025) 5px
    ),
    rgba(250, 247, 253, 0.82);
}

.chat-message-body {
  border-color: rgba(76, 45, 96, 0.1);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(76, 45, 96, 0.07);
}

.chat-message.is-current-user .chat-message-body {
  border-color: rgba(11, 111, 104, 0.18);
  background: rgba(216, 250, 242, 0.76);
}

.chat-message.is-current-user .chat-message-meta strong {
  color: #0b6f68;
}

.chat-composer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.chat-emote-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(76, 45, 96, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.quick-chat-emote-picker .speech-emote-button {
  height: 32px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.drawer-chat-emote-picker {
  grid-column: 1 / -1;
}

.speech-emote-button {
  width: 100%;
  min-width: 0;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(76, 45, 96, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #34243f;
  cursor: pointer;
  line-height: 1;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.speech-emote-button span {
  display: block;
  max-width: 100%;
  font-size: 0.76rem;
  font-weight: 920;
  letter-spacing: 0;
  white-space: nowrap;
}

.speech-emote-button:hover:not(:disabled),
.speech-emote-button.is-active {
  border-color: rgba(0, 184, 201, 0.58);
  box-shadow: 0 0 0 2px rgba(0, 184, 201, 0.18), 0 8px 16px rgba(76, 45, 96, 0.12);
  transform: translateY(-1px);
}

.speech-emote-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.speech-emote-button.emote-mad {
  background: #cf2438;
  border-color: #7f1623;
  color: #fff34f;
}

.speech-emote-button.emote-sad {
  background: #d9efff;
  border-color: #2c76e2;
  color: #009bff;
}

.speech-emote-button.emote-aaa {
  background: #ffe05a;
  border-color: #a96d00;
  color: #241a2d;
}

.speech-emote-button.emote-meh {
  background: #e1e0e3;
  border-color: #7f7886;
  color: #4d4850;
}

.speech-emote-button.emote-love {
  background: #ffd9ec;
  border-color: #d32778;
  color: #8a164d;
}

.speech-emote-button.emote-cat {
  background: #fff3c6;
  border-color: #6f3f12;
  color: #6f3f12;
}

.speech-emote-button.emote-lol {
  background: #d8fff0;
  border-color: #087a5a;
  color: #063f32;
}

.speech-emote-button.emote-epic {
  background: #241a2d;
  border-color: #ffe75e;
  color: #ffe75e;
}

.speech-emote-button.emote-action {
  background: #3b2d43;
  border-color: rgba(255, 252, 255, 0.64);
  color: #fffbe8;
}

.speech-emote-button.emote-ellipsis {
  background: #ffffff;
  border: 2px solid #1d1b21;
  color: #1d1b21;
}

.speech-emote-button.emote-think {
  background: #f9f7ff;
  border-color: #5744a6;
  color: #332853;
}

.speech-emote-button.emote-dance {
  background: #e8fff6;
  border-color: #09a870;
  color: #075f44;
}

.speech-emote-button.emote-defeat {
  background: #ffe2e2;
  border-color: #d10000;
  color: #8d0000;
}

.speech-emote-button.emote-despair {
  background: #241018;
  border-color: #ff1f1f;
  color: #fff7d0;
}

.speech-emote-button.emote-question {
  background: #f0ecff;
  border-color: #5744a6;
  color: #45348f;
}

.speech-emote-button.emote-exclaim {
  background: #fff0c9;
  border-color: #cf2438;
  color: #a01a2a;
}

.chat-message-field {
  min-width: 0;
}

.chat-message-field textarea {
  min-height: 58px;
  max-height: 120px;
}

.chat-send-button {
  min-height: 38px;
  align-self: end;
}

.danger-button {
  border-color: rgba(170, 51, 51, 0.28);
  color: #9a2f2f;
}

.danger-button:hover:not(:disabled) {
  border-color: rgba(170, 51, 51, 0.52);
  color: #7f2424;
}

.sign-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rich-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.rich-button {
  min-height: 32px;
}

.sign-editor {
  min-height: 112px;
  max-height: 190px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(32, 35, 38, 0.15);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f292e;
  font-size: 0.92rem;
  line-height: 1.35;
  outline: none;
}

.sign-editor[contenteditable="true"]:focus {
  border-color: rgba(11, 111, 104, 0.46);
  box-shadow: 0 0 0 3px rgba(11, 111, 104, 0.1);
}

.sign-editor[contenteditable="false"] {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.compact-action {
  min-height: 30px;
  font-size: 0.78rem;
}

.texture-browser {
  display: grid;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(32, 35, 38, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.52);
}

.texture-browser-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.texture-category-field {
  min-width: 0;
}

.texture-carousel-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  gap: 5px;
  align-items: center;
}

.texture-carousel {
  display: flex;
  gap: 6px;
  min-width: 0;
  min-height: 62px;
  padding: 2px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.texture-tile {
  width: 56px;
  min-width: 56px;
  display: grid;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(32, 35, 38, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  color: #3f474d;
  cursor: pointer;
}

.texture-tile:hover,
.texture-tile.is-active {
  border-color: rgba(11, 111, 104, 0.5);
  background: var(--accent-soft);
}

.texture-thumb {
  width: 48px;
  height: 42px;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(32, 35, 38, 0.1);
  object-fit: cover;
  image-rendering: pixelated;
}

.texture-name {
  overflow: hidden;
  color: #465057;
  font-size: 0.62rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texture-browser-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 0.75rem;
}

.carousel-button {
  width: 26px;
  height: 38px;
  border: 1px solid rgba(32, 35, 38, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
  color: #465057;
  cursor: pointer;
}

.carousel-button:hover:not(:disabled) {
  border-color: rgba(11, 111, 104, 0.44);
  color: var(--accent);
}

.carousel-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.sky-preset-grid {
  max-height: 174px;
  overflow: auto;
  padding-right: 2px;
}

.preset-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(32, 35, 38, 0.11);
  text-align: left;
}

.preset-button:hover,
.preset-button.is-active {
  border-color: rgba(11, 111, 104, 0.44);
  background: var(--accent-soft);
}

.sky-preset-button {
  min-height: 58px;
  padding: 5px;
  align-items: stretch;
  flex-direction: column;
  gap: 5px;
  font-size: 0.74rem;
}

.preset-thumbnail {
  width: 100%;
  height: 34px;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(32, 35, 38, 0.12);
  object-fit: cover;
  image-rendering: auto;
}

.sky-preset-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-swatch {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 5px;
  border: 1px solid rgba(32, 35, 38, 0.18);
}

.sky-day {
  background: linear-gradient(#84c2ee 0 48%, #f0d188 80%, #d88761);
}

.cloud-light {
  background:
    radial-gradient(circle at 30% 38%, #ffffff 0 18%, transparent 19%),
    radial-gradient(circle at 56% 46%, #ffffff 0 22%, transparent 23%),
    linear-gradient(#a9d6ef, #e9f5fb);
}

.forest-view {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(29, 83, 52, 0.9) 49% 54%, transparent 55%),
    linear-gradient(#a5d6e6 0 42%, #52795f 43%, #233d32 100%);
}

.night-view {
  background:
    radial-gradient(circle at 26% 24%, #f8f1c5 0 4%, transparent 5%),
    radial-gradient(circle at 70% 34%, #ffffff 0 2%, transparent 3%),
    linear-gradient(#172036, #384568 62%, #141b25);
}

.file-action {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(32, 35, 38, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: #253036;
  cursor: pointer;
  overflow: hidden;
}

.compact-file {
  min-height: 32px;
  font-size: 0.78rem;
}

.file-action:hover {
  border-color: rgba(11, 111, 104, 0.44);
  color: var(--accent);
}

.file-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-action.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-action.is-disabled input {
  cursor: not-allowed;
}

.plain-button,
.dev-toggle {
  min-height: 34px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(32, 35, 38, 0.16);
  color: #273239;
  font-size: 0.86rem;
  font-weight: 800;
}

.plain-button:hover:not(:disabled),
.dev-toggle:hover,
.dev-toggle.is-active {
  border-color: rgba(11, 111, 104, 0.44);
  color: var(--accent);
}

.plain-button:disabled {
  color: #5b646b;
  opacity: 0.68;
  cursor: not-allowed;
}

.plain-button.small {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.8rem;
}

.chat-send-button {
  min-height: 38px;
  background: #5f2c86;
  border-color: rgba(61, 30, 82, 0.12);
  color: #ffffff;
}

.chat-send-button:hover:not(:disabled) {
  border-color: rgba(61, 30, 82, 0.3);
  background: #4d1f73;
  color: #ffffff;
}

.mode-note {
  margin: 0;
  color: #3f474d;
  font-size: 0.78rem;
  line-height: 1.3;
}

.status-line {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.status-line.is-warning {
  color: var(--warn);
}

.debug-panel {
  position: fixed;
  right: max(88px, calc(env(safe-area-inset-right) + 88px));
  top: max(18px, env(safe-area-inset-top));
  z-index: 33;
  width: min(390px, calc(100vw - 116px));
  max-height: min(680px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(64, 42, 79, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 255, 0.97), rgba(250, 247, 252, 0.92)),
    var(--panel);
  box-shadow: 0 16px 42px rgba(54, 38, 66, 0.2);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 140ms ease, transform 140ms ease;
  overflow: hidden;
}

.debug-panel[hidden] {
  display: none;
}

.debug-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.debug-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(76, 45, 96, 0.1);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.2) 1px,
      rgba(120, 70, 140, 0.035) 2px,
      rgba(120, 70, 140, 0.035) 5px
    ),
    rgba(255, 252, 255, 0.94);
}

.debug-panel-title {
  min-width: 0;
  display: grid;
  color: #2a2030;
  line-height: 1.05;
}

.debug-panel-title span {
  color: #76548f;
  font-size: 0.64rem;
  font-weight: 760;
  text-transform: uppercase;
}

.debug-panel-title strong {
  font-size: 0.96rem;
}

.debug-panel-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  scrollbar-width: thin;
}

/* Performance defaults: keep content rich, avoid costly GPU compositing effects. */
.brand-logo,
.canvas-shell,
.map-page-layout,
.furniture-image,
.furniture-item.is-wall-mounted .furniture-image,
.furniture-item.is-floor-decal .furniture-image,
.standee-art img,
.custom-standee,
.profile-standee-preview img {
  filter: none;
}

.canvas-shell {
  box-shadow: 0 24px 56px rgba(76, 45, 96, 0.12);
}

.furniture-item::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  z-index: 1;
  height: 7%;
  min-height: 5px;
  border-radius: 999px;
  background: rgba(18, 16, 13, 0.13);
  opacity: 0.78;
  pointer-events: none;
  transform: scaleX(var(--furniture-flip, 1));
  transform-origin: 50% 50%;
}

.furniture-item.is-wall-mounted::after,
.furniture-item.is-floor-decal::after {
  display: none;
}

.floating-tools,
.right-orb-rail,
.room-back-button,
.tool-orb,
.camera-launcher,
.debug-launcher,
.auth-launcher,
.map-launcher,
.tutorial-launcher,
.closet-launcher,
.item-inventory-launcher,
.marketplace-launcher,
.profile-launcher,
.store-launcher,
.closet-drawer,
.floating-drawer,
.quick-chat-form,
.quick-chat-info,
.map-page-header,
.map-board,
.map-info-panel,
.app-footer,
.auth-gate-panel,
.onboarding-tour-scrim,
.tool-panel,
.debug-panel,
.about-modal-card,
.item-read-modal-card {
  backdrop-filter: none;
}

.dev-reset {
  display: inline-flex;
  align-items: center;
}

.slot-dev-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.slot-dev-grid input {
  min-width: 0;
}

.dev-template-panel {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(32, 35, 38, 0.1);
}

.dev-template-title {
  color: #4b5158;
  font-size: 0.78rem;
  font-weight: 700;
}

.state-json {
  display: none;
  min-height: 170px;
  resize: vertical;
  padding: 10px;
  color: #283137;
  font: 0.74rem/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.state-json.is-visible {
  display: block;
}

@media (max-width: 760px) {
  .app-footer {
    top: max(92px, calc(env(safe-area-inset-top) + 92px));
    right: max(12px, env(safe-area-inset-right));
    width: min(214px, calc(100vw - 148px));
    padding: 9px;
  }

  .news-page {
    padding: 126px 12px 18px;
    place-items: start center;
  }

  .news-page-panel {
    width: min(100%, 520px);
    max-height: calc(100vh - 148px);
    padding: 12px;
    gap: 10px;
  }

  .news-page-header h1 {
    font-size: 2.2rem;
  }

  .news-page-subtitle {
    font-size: 0.8rem;
  }

  .news-page-form textarea {
    min-height: 90px;
  }

  .news-page-broadcast-room {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 16px 20px;
  }

  .news-page-broadcast-prop {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 4px;
  }

  .news-page-broadcast-speaker {
    justify-self: start;
    gap: 8px;
  }

  .news-page-broadcast-facade {
    left: 6%;
    right: 6%;
    top: 10%;
    bottom: 24%;
  }

  .news-page-broadcast-speaker-art {
    width: 104px;
    height: 168px;
  }

  .room-viewport {
    place-items: start center;
    padding: clamp(118px, 17vh, 150px) 0 0;
  }

  .canvas-shell {
    width: min(94vw, 167.1111vh);
  }

  .floating-tools {
    right: max(14px, env(safe-area-inset-right));
    top: auto;
    bottom: max(104px, calc(env(safe-area-inset-bottom) + 104px));
    transform: none;
  }

  .right-orb-rail {
    top: auto;
    left: max(14px, env(safe-area-inset-left));
    bottom: max(104px, calc(env(safe-area-inset-bottom) + 104px));
    gap: 8px;
    transform: none;
    width: auto;
    padding: 8px;
  }

  .right-rail-orb {
    width: 48px;
    height: 48px;
    min-height: 48px;
    grid-template-columns: 1fr;
    padding: 0;
  }

  .right-rail-orb::after {
    content: none;
  }

  .camera-launcher,
  .auth-launcher,
  .profile-launcher,
  .map-launcher,
  .tutorial-launcher,
  .chat-launcher,
  .closet-launcher,
  .item-inventory-launcher,
  .marketplace-launcher,
  .store-launcher {
    top: auto;
    transform: none;
  }

  .camera-launcher svg,
  .auth-launcher svg,
  .profile-launcher svg,
  .people-launcher svg,
  .map-launcher svg,
  .tutorial-launcher svg,
  .chat-launcher svg,
  .closet-launcher svg,
  .item-inventory-launcher svg,
  .marketplace-launcher svg,
  .store-launcher svg {
    width: 28px;
    height: 28px;
  }

  .map-page {
    padding: 0;
  }

  .map-page-shell {
    place-items: start center;
    padding: clamp(176px, 24vh, 214px) 0 max(126px, calc(env(safe-area-inset-bottom) + 126px));
  }

  .map-page-layout {
    width: min(94vw, 167.1111vh);
  }

  .map-page-header {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px;
    min-height: 38px;
    padding: 5px 6px;
    transform: none;
  }

  .map-close-button {
    grid-column: 2;
    grid-row: 1;
  }

  .map-neighborhood-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-neighborhood-strip {
    grid-template-columns: repeat(3, minmax(30px, 1fr));
    gap: 3px;
  }

  .map-neighborhood-picker span {
    display: none;
  }

  .map-neighborhood-picker select {
    height: 28px;
    font-size: 0.76rem;
  }

  .map-neighborhood-chip {
    min-height: 28px;
    border-radius: 6px;
    font-size: 0.68rem;
  }

  .map-district-overview {
    top: 10px;
    right: 10px;
    width: min(188px, 42vw);
    gap: 6px;
    padding: 7px;
  }

  .map-district-cell {
    min-height: 48px;
    padding: 6px;
  }

  .map-district-cell-label {
    display: none;
  }

  .map-district-cell-number,
  .map-district-cell-meta {
    font-size: 0.6rem;
  }

  .map-district-nav {
    min-height: 22px;
    padding: 0 6px;
    font-size: 0.58rem;
  }

  .map-page-header h1 {
    font-size: 0.84rem;
  }

  .map-onboarding-card,
  .map-private-house-button {
    grid-column: 1 / -1;
  }

  .map-onboarding-card {
    padding: 7px;
  }

  .map-onboarding-card ol {
    gap: 3px;
    font-size: 0.68rem;
  }

  .map-close-button {
    width: 32px;
    height: 32px;
  }

  .map-lot-grid {
    grid-template-columns: repeat(var(--map-columns), minmax(66px, 1fr));
    grid-template-rows: repeat(var(--map-rows), minmax(68px, 1fr));
    gap: 8px;
    padding: 70px 12px 12px;
  }

  .map-lot {
    min-height: 68px;
    padding: 8px;
  }

  .map-lot-name {
    font-size: 0.78rem;
  }

  .map-info-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: 38vh;
    overflow: auto;
  }

  body.is-map-open .brand-logo,
  body.is-news-open .brand-logo {
    left: max(24px, env(safe-area-inset-left));
    top: max(22px, env(safe-area-inset-top));
  }

  body.is-map-open .right-orb-rail {
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    bottom: auto;
    transform: none;
  }

  .closet-drawer {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    transform: translateY(18px);
  }

  .closet-drawer.is-open {
    transform: translateY(0);
  }

  .chat-drawer {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    transform: translateY(18px);
  }

  .chat-drawer.is-open {
    transform: translateY(0);
  }

  .profile-summary {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .profile-avatar-preview {
    width: 72px;
    height: 72px;
    font-size: 1.1rem;
  }

  .profile-standee-panel {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .profile-standee-preview {
    width: 72px;
    height: 92px;
    font-size: 1.1rem;
  }

  .standee-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-chat {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
  }

  .quick-chat-info {
    display: none;
  }

  .quick-chat-form {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    grid-template-columns: minmax(0, 1fr) 64px 52px;
    transform: none;
  }

  .quick-chat-emote-picker {
    grid-column: 1 / -1;
  }

  .quick-chat.is-open .quick-chat-form {
    transform: none;
  }

  .room-back-button {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px));
    min-width: 144px;
    height: 48px;
    padding: 0 14px;
    font-size: 0.86rem;
  }

  .house-shout {
    top: max(84px, calc(env(safe-area-inset-top) + 84px));
    width: min(74vw, 420px);
    padding: 11px 13px;
  }

  .auth-gate {
    padding: 12px;
  }

  .auth-gate-panel {
    width: calc(100vw - 24px);
    padding: 16px;
  }

  .auth-gate-forms {
    grid-template-columns: 1fr;
  }

  .standee-slot {
    --standee-width: 31%;
    --standee-height: 52%;
  }

  .standee-slot-back-left,
  .standee-slot-back-right {
    --standee-width: 28%;
    --standee-height: 45%;
    --standee-x: 22%;
  }

  .standee-bubble {
    min-width: min(210px, 160%);
    padding: 10px 11px;
  }

  .standee-bubble p {
    font-size: 0.86rem;
  }

  .store-drawer {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    transform: translateY(18px);
  }

  .store-drawer.is-open {
    transform: translateY(0);
  }

  .floating-drawer {
    left: var(--floating-drawer-left, max(12px, env(safe-area-inset-left)));
    top: var(--floating-drawer-top, max(12px, env(safe-area-inset-top)));
    right: auto;
    bottom: auto;
    width: var(--floating-drawer-width, min(430px, calc(100vw - 24px)));
    height: var(--floating-drawer-height, min(680px, calc(100vh - 24px)));
    transform: translateY(8px) scale(0.98);
  }

  .floating-drawer.is-open {
    transform: translateY(0) scale(1);
  }

  .debug-panel {
    left: max(12px, env(safe-area-inset-left));
    right: max(78px, calc(env(safe-area-inset-right) + 78px));
    top: max(12px, env(safe-area-inset-top));
    width: auto;
    max-height: min(620px, calc(100vh - 24px));
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-thread {
    min-height: 160px;
  }

  .chat-member-label {
    max-width: 108px;
  }

  .tool-orb-rail {
    grid-template-columns: repeat(4, 42px);
    gap: 6px;
  }

  .tool-panel {
    left: var(--tool-panel-left, max(14px, env(safe-area-inset-left)));
    top: var(--tool-panel-top, max(96px, env(safe-area-inset-top)));
    width: var(--tool-panel-width, min(390px, calc(100vw - 28px)));
    max-height: min(74vh, calc(100vh - 28px));
    transform: translateY(10px) scale(0.98);
    transform-origin: top left;
  }

  .mode-tabs {
    grid-template-columns: repeat(11, 36px);
  }

  .tool-orb {
    width: 42px;
    height: 42px;
  }

  .tool-orb svg {
    width: 26px;
    height: 26px;
  }
}
