:root {
  color-scheme: light;
  --bg: #e6e0d2;
  --ink: #2a2d2a;
  --muted: #65705f;
  --panel: #f6f1e7;
  --panel-2: #e9eadb;
  --line: #0b0d10;
  --cream: #fff8e8;
  --teal: #6faf72;
  --gold: #b8d96f;
  --brick: #9b6d4d;
  --sky: #b9d7ea;
  --peach: #f2b183;
  --stone: #e6e0d2;
  --danger: #b94e48;
  --shadow: rgba(42, 45, 42, 0.22);
  --soft-shadow: rgba(42, 45, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.74), transparent 42%),
    radial-gradient(circle at 12% 10%, rgba(111, 175, 114, 0.2), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(242, 177, 131, 0.22), transparent 28%),
    var(--bg);
}

.topbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(42, 45, 42, 0.18);
  background: rgba(42, 45, 42, 0.82);
  box-shadow: 0 8px 24px rgba(42, 45, 42, 0.1);
  backdrop-filter: blur(14px);
  overflow: visible;
}

.topbar-leading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--cream);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
  background:
    linear-gradient(90deg, transparent 0 8px, var(--teal) 8px 26px, transparent 26px),
    linear-gradient(0deg, transparent 0 8px, var(--gold) 8px 18px, var(--peach) 18px 26px, transparent 26px);
  image-rendering: pixelated;
  box-shadow: 0 0 0 3px var(--line), 4px 4px 0 var(--shadow);
}

h1,
h2,
h3,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
}

h2 {
  font-size: 18px;
  font-weight: 700;
}

.brand p,
.empty-inspector p {
  color: var(--muted);
  margin-top: 2px;
}

.topbar .brand p {
  color: #c9d8bf;
}

.app-version {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.start-screen .app-version {
  margin-top: 16px;
}

.studio-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.studio-link[hidden] {
  display: none;
}

.topbar .studio-link {
  color: #c9d8bf;
}

.topbar-actions,
.topbar-edit-tools,
.mode-toggle,
.board-switcher,
.control-row,
.swatch-row,
.inspector-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 auto;
}

.ghost-action {
  min-height: 38px;
  border: 1px solid rgba(255, 248, 232, 0.22);
  background: transparent;
  color: var(--cream);
  padding: 7px 12px;
  box-shadow: none;
}

.ghost-action:hover {
  background: rgba(255, 248, 232, 0.1);
}

.edit-menu {
  position: relative;
}

.edit-menu > summary {
  list-style: none;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 248, 232, 0.18);
  background: rgba(255, 248, 232, 0.08);
  color: var(--cream);
  cursor: pointer;
}

.edit-menu > summary::-webkit-details-marker {
  display: none;
}

.edit-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 70;
  display: grid;
  gap: 4px;
  min-width: min(320px, 86vw);
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 12px;
  border: 3px solid var(--line);
  background: rgba(32, 37, 45, 0.98);
  box-shadow: 6px 6px 0 var(--shadow);
}

.menu-section {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 248, 232, 0.12);
}

.menu-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.menu-section-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 248, 232, 0.55);
}

.menu-site-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.06);
  color: var(--cream);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.menu-site-link:hover,
.menu-site-link:focus-visible {
  background: rgba(255, 248, 232, 0.12);
  outline: none;
}

.menu-site-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.menu-account-button {
  width: 100%;
  justify-content: center;
}

.app.visit-mode .menu-arrange-only {
  display: none;
}

.app:not(.visit-mode) .menu-visit-only {
  display: none;
}

.menu-top-actions {
  display: none;
}

.visit-menu-readout {
  margin: 0;
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
}

.menu-hint,
.visit-menu-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 248, 232, 0.82);
}

.edit-menu-panel .menu-hint + button,
.edit-menu-panel .visit-menu-hint + button {
  margin-top: 4px;
}

.edit-menu-panel .file-action {
  display: grid;
  gap: 4px;
  color: var(--cream);
  font-size: 13px;
}

.archived-chrome[hidden],
[hidden].archived-chrome {
  display: none !important;
}

.edit-item-dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
  margin: auto;
  border: 4px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 0;
  overflow: auto;
}

.edit-item-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.edit-item-dialog-shell {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.edit-item-dialog .inspector-form,
.edit-item-dialog .playlist-panel {
  display: grid;
  gap: 12px;
}

.guest-banner-soft {
  background: rgba(244, 239, 224, 0.72);
  color: #4a5548;
  border-bottom: 1px solid rgba(162, 181, 156, 0.55);
  font-size: 14px;
}

.app.focus-mode .wall-architecture,
.app.focus-mode .window-view,
.app.focus-mode .wall-caption,
.app.focus-mode .drop-hint,
.app.focus-mode .wall-item:not(.focused) {
  filter: blur(7px);
  opacity: 0.42;
  pointer-events: none;
}

.app.focus-mode .wall-item.focused {
  transform: scale(1.12);
  transform-origin: center center;
  z-index: 40 !important;
  filter: none;
  opacity: 1;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.exit-focus-button {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  min-height: 40px;
  padding: 8px 16px;
  border: 3px solid var(--line);
  background: rgba(32, 37, 45, 0.94);
  color: var(--cream);
  box-shadow: 4px 4px 0 var(--shadow);
}

.workspace {
  grid-template-columns: 1fr;
}

.app[data-inspector-layout="modal"] .palette-panel,
.app[data-inspector-layout="modal"] .inspector-panel {
  display: none !important;
}

.board-switcher {
  min-height: 38px;
  border: 1px solid rgba(255, 248, 232, 0.18);
  background: rgba(255, 248, 232, 0.08);
  color: var(--cream);
  padding: 4px;
}

.board-switcher label {
  padding-left: 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: #c9d8bf;
}

.board-switcher select {
  min-height: 30px;
  max-width: 180px;
  border: 0;
  background: rgba(255, 248, 232, 0.92);
  color: var(--ink);
  padding: 4px 8px;
}

.prototype-label {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 232, 0.2);
  color: #f0dfbf;
  font-size: 12px;
  padding: 0 8px;
}

.mode-toggle,
.view-toggle {
  border: 1px solid rgba(255, 248, 232, 0.18);
  background: rgba(255, 248, 232, 0.08);
  box-shadow: none;
  overflow: hidden;
}

.mode-toggle button,
.view-toggle button,
.icon-button,
.secondary-action,
.primary-action,
.control-row button,
.danger-icon,
.setup-dialog button,
.detail-dialog button,
.catalog-dialog button {
  min-height: 38px;
  border: 1px solid rgba(42, 45, 42, 0.26);
  background: rgba(255, 248, 232, 0.78);
  color: var(--ink);
  padding: 7px 12px;
  box-shadow: 0 8px 18px var(--soft-shadow);
}

.mode-toggle button,
.view-toggle button {
  border: 0;
  box-shadow: none;
  min-width: 74px;
  color: var(--cream);
}

.mode-toggle button.active,
.view-toggle button.active,
.primary-action {
  background: var(--teal);
  color: #112211;
}

.view-toggle button:disabled,
.mode-toggle button:disabled,
.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #c9d8bf;
  padding: 0;
  box-shadow: none;
  font-size: 13px;
}

.save-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6faf72;
  box-shadow: 0 0 0 2px rgba(111, 175, 114, 0.25);
  flex-shrink: 0;
}

.save-status[data-state="saved"] .save-status-dot,
.save-status[data-state="view-only"] .save-status-dot {
  background: #6faf72;
}

.save-status[data-state="loading"] .save-status-dot,
.save-status[data-state="syncing"] .save-status-dot {
  background: #b9d7ea;
  animation: save-pulse 1.2s ease-in-out infinite;
}

.save-status[data-state="unsaved"] .save-status-dot,
.save-status[data-state="not-saved"] .save-status-dot {
  background: #f2b183;
}

.save-status[data-state="error"] .save-status-dot {
  background: #b94e48;
}

@keyframes save-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.save-retry {
  min-height: 32px;
  border: 1px solid rgba(255, 248, 232, 0.24);
  background: rgba(255, 248, 232, 0.08);
  color: var(--cream);
  padding: 4px 10px;
  font-size: 13px;
  box-shadow: none;
}

.app.visit-mode .topbar-leading .save-status,
.app.visit-mode .topbar-leading .save-retry,
.app.visit-mode .topbar-leading .topbar-version {
  display: none;
}

.app.visit-mode.save-attention .topbar-leading {
  display: flex;
}

.app.visit-mode.save-attention .topbar-leading .save-status,
.app.visit-mode.save-attention .topbar-leading .save-retry {
  display: inline-flex;
}

.topbar-version {
  margin: 0;
  font-size: 12px;
  color: rgba(201, 216, 191, 0.85);
}

.edit-dock {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 3px solid var(--line);
  border-radius: 0;
  background: rgba(32, 37, 45, 0.94);
  box-shadow: 4px 4px 0 var(--shadow);
  backdrop-filter: blur(12px);
  max-width: calc(100vw - 24px);
}

.dock-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dock-divider {
  width: 1px;
  align-self: stretch;
  min-height: 28px;
  background: rgba(255, 248, 232, 0.16);
  margin: 0 2px;
}

.dock-button {
  min-height: 36px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  background: rgba(255, 248, 232, 0.06);
  color: var(--cream);
  padding: 6px 12px;
  box-shadow: none;
  font-size: 14px;
}

.edit-dock .primary-action {
  min-height: 38px;
  padding: 8px 16px;
  font-weight: 600;
}

.inspector-delete {
  justify-self: start;
  margin-top: 4px;
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 8px 0;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.danger-text:hover {
  color: #8f3a35;
}

.account-identity {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c9d8bf;
  font-size: 13px;
  line-height: 38px;
}

.account-identity[hidden] {
  display: none;
}

.app.visit-mode .account-identity {
  flex: 0 1 auto;
  min-width: 0;
}

@media (max-width: 640px) {
  .account-identity {
    max-width: 100%;
  }
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, auto) auto;
  gap: 14px;
  padding: 14px;
  min-height: 0;
}

.panel {
  border: 1px solid rgba(42, 45, 42, 0.18);
  background: rgba(255, 248, 232, 0.76);
  box-shadow: 0 18px 34px rgba(42, 45, 42, 0.14);
  backdrop-filter: blur(16px);
}

.palette-panel,
.inspector-panel {
  padding: 12px;
}

.palette-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  border-radius: 8px;
}

.palette-panel hr {
  width: 1px;
  height: 54px;
  border: 0;
  border-left: 1px solid rgba(42, 45, 42, 0.22);
  flex: 0 0 auto;
}

.tool-card {
  min-width: 84px;
  min-height: 66px;
  border: 1px solid rgba(42, 45, 42, 0.24);
  background: rgba(255, 248, 232, 0.62);
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px 4px;
  box-shadow: 0 6px 14px var(--soft-shadow);
  border-radius: 8px;
  flex: 0 0 auto;
}

.tool-card.active {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  background: rgba(184, 217, 111, 0.3);
}

.tool-icon {
  width: 28px;
  height: 24px;
  border: 3px solid currentColor;
  display: block;
  position: relative;
}

.artwork-icon {
  background: linear-gradient(135deg, #71b8d6 0 45%, #466e3a 45% 100%);
}

.quote-icon::before,
.note-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 12px;
  height: 3px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.shelf-icon::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 4px;
  height: 4px;
  background: currentColor;
}

.lamp-icon {
  border-top-width: 8px;
  border-left-color: transparent;
  border-right-color: transparent;
}

.plant-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  border-top: 4px solid currentColor;
  border-left: 4px solid currentColor;
  transform: rotate(45deg);
}

.music-icon::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 3px;
  width: 7px;
  height: 14px;
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
}

.folder-icon {
  height: 22px;
  margin-top: 4px;
  background: #6faf72;
  border-color: currentColor;
}

.folder-icon::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -10px;
  width: 15px;
  height: 10px;
  border: 3px solid currentColor;
  border-bottom: 0;
  background: #e6a94c;
}

.stereo-icon {
  background:
    linear-gradient(90deg, #18233b 0 28%, #d7e3f3 28% 72%, #18233b 72%),
    linear-gradient(#5fc5f1 0 30%, transparent 30% 100%);
}

.stereo-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 3px;
  width: 6px;
  height: 6px;
  border: 2px solid #79d6ff;
  box-shadow: 0 7px 0 #79d6ff, 0 14px 0 #79d6ff;
}

.sprite-icon {
  background:
    linear-gradient(90deg, transparent 0 8px, #6fd1c2 8px 20px, transparent 20px),
    linear-gradient(0deg, transparent 0 5px, #f0dfbf 5px 17px, #8d4935 17px 24px);
}

.sprite-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -6px;
  width: 8px;
  height: 8px;
  background: #e6a94c;
  box-shadow: -8px 8px 0 #3d765f, 8px 8px 0 #3d765f;
}

.secondary-action,
.file-action {
  width: auto;
  min-width: 86px;
  text-align: center;
  flex: 0 0 auto;
}

.file-action input {
  display: none;
}

.danger,
.danger-icon {
  background: var(--danger);
  color: #fff3e8;
}

.wall-stage {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: grid;
  align-items: start;
  justify-items: center;
}

.wall-frame {
  width: min(100%, 1440px);
  aspect-ratio: 16 / 9;
  min-height: 560px;
  border: 1px solid rgba(42, 45, 42, 0.26);
  background:
    linear-gradient(180deg, #fff8e8 0 10px, #b4c8b5 10px),
    #c8d8c9;
  box-shadow: 0 24px 55px rgba(42, 45, 42, 0.22);
  overflow: hidden;
  border-radius: 8px;
}

.wall {
  --grid-alpha: 0.16;
  --wall-floor-height: 88px;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  image-rendering: pixelated;
  background:
    linear-gradient(90deg, rgba(42, 45, 42, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(rgba(42, 45, 42, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(145deg, #dfe8dc 0%, #b8d5bd 58%, #88b292 100%);
  background-size: 32px 32px, 32px 32px, auto;
}

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

.wall::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.34), transparent 32%),
    radial-gradient(circle at 22% 18%, rgba(255, 248, 232, 0.38), transparent 22%),
    radial-gradient(circle at 78% 18%, rgba(111, 175, 114, 0.16), transparent 30%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(42, 45, 42, 0.05) 24px 25px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 248, 232, 0.12) 48px 49px);
  mix-blend-mode: soft-light;
}

.app.visit-mode .wall {
  --grid-alpha: 0;
}

.wall.material-greenhouse {
  background:
    linear-gradient(90deg, rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/garden-terminal-room.png");
  background-size: 32px 32px, 32px 32px, cover;
  background-position: center center;
}

.wall.material-greenhouse .wall-architecture,
.wall.material-greenhouse .window-view {
  display: none;
}

/* Design-system full rooms (baked window; no separate pane).
   Source art is portrait (~1122×1402); canvas is 900×1125 so cover shows the room, not a landscape crop. */
.wall.material-dw-sunlit-apartment,
.wall.material-dw-creative-loft,
.wall.material-dw-modern-gallery {
  width: 900px;
  height: 1125px;
  image-rendering: auto;
  background:
    linear-gradient(90deg, rgba(42, 33, 24, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(42, 33, 24, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/dw-sunlit-apartment.png");
  background-size: 32px 32px, 32px 32px, cover;
  background-position: center center;
}

.wall.material-dw-creative-loft {
  background-image:
    linear-gradient(90deg, rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/dw-creative-loft.png");
}

.wall.material-dw-modern-gallery {
  background-image:
    linear-gradient(90deg, rgba(40, 40, 38, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(40, 40, 38, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/dw-modern-gallery.png");
}

.wall.material-dw-sunlit-apartment::before,
.wall.material-dw-creative-loft::before,
.wall.material-dw-modern-gallery::before {
  opacity: 0.22;
}

.wall.material-dw-sunlit-apartment .wall-architecture,
.wall.material-dw-creative-loft .wall-architecture,
.wall.material-dw-modern-gallery .wall-architecture,
.wall.material-dw-sunlit-apartment .window-view,
.wall.material-dw-creative-loft .window-view,
.wall.material-dw-modern-gallery .window-view {
  display: none;
}

.wall .item-sprite.dw-sprite img {
  image-rendering: auto;
}

.wall.material-smoke-hearth,
.wall.material-smoke-garden,
.wall.material-smoke-moonroom {
  image-rendering: auto;
  background:
    linear-gradient(90deg, rgba(42, 33, 24, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(42, 33, 24, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/smoke-hearth-blank.jpg");
  background-size: 32px 32px, 32px 32px, cover;
  background-position: center center;
}

.wall.material-smoke-garden {
  background-image:
    linear-gradient(90deg, rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/smoke-garden-blank.jpg");
}

.wall.material-smoke-moonroom {
  background-image:
    linear-gradient(90deg, rgba(20, 28, 40, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(20, 28, 40, var(--grid-alpha)) 1px, transparent 1px),
    url("./assets/backgrounds/smoke-moonroom-blank.jpg");
}

.wall.material-smoke-hearth .wall-architecture,
.wall.material-smoke-garden .wall-architecture,
.wall.material-smoke-moonroom .wall-architecture {
  display: none;
}

/* Soft rooms: selectable outside overlay aligned to the painted window aperture */
.wall.material-smoke-hearth .window-view,
.wall.material-smoke-garden .window-view,
.wall.material-smoke-moonroom .window-view {
  display: block;
  z-index: 3;
  border-color: #2a2118;
  box-shadow: none;
  image-rendering: auto;
}

.wall.material-smoke-hearth .window-view {
  top: 48px;
  left: 34px;
  width: 300px;
  height: 352px;
  border-width: 14px;
}

.wall.material-smoke-garden .window-view {
  top: 36px;
  left: 40px;
  width: 318px;
  height: 378px;
  border-width: 12px;
  border-color: #6b4a2e;
}

.wall.material-smoke-moonroom .window-view {
  top: 28px;
  left: 22px;
  width: 330px;
  height: 520px;
  border-width: 10px;
  border-color: #1a2230;
}

.wall.material-smoke-hearth.window-position-none .window-view,
.wall.material-smoke-garden.window-position-none .window-view,
.wall.material-smoke-moonroom.window-position-none .window-view {
  display: none;
}

.wall.window-scene-forest .window-view {
  background-image: url("./assets/windows/window-forest-edge.jpg");
  image-rendering: auto;
}

.wall.window-scene-rain .window-view {
  background-image: url("./assets/windows/window-rainy-street.jpg");
  image-rendering: auto;
}

.wall.window-scene-forest .window-view .sun,
.wall.window-scene-forest .window-view .skyline,
.wall.window-scene-rain .window-view .sun,
.wall.window-scene-rain .window-view .skyline {
  display: none;
}

.wall.material-smoke-hearth.window-scene-city .window-view,
.wall.material-smoke-hearth.window-scene-ocean .window-view,
.wall.material-smoke-hearth.window-scene-mountain .window-view,
.wall.material-smoke-hearth.window-scene-farmland .window-view,
.wall.material-smoke-hearth.window-scene-forest .window-view,
.wall.material-smoke-hearth.window-scene-rain .window-view,
.wall.material-smoke-garden.window-scene-city .window-view,
.wall.material-smoke-garden.window-scene-ocean .window-view,
.wall.material-smoke-garden.window-scene-mountain .window-view,
.wall.material-smoke-garden.window-scene-farmland .window-view,
.wall.material-smoke-garden.window-scene-forest .window-view,
.wall.material-smoke-garden.window-scene-rain .window-view,
.wall.material-smoke-moonroom.window-scene-city .window-view,
.wall.material-smoke-moonroom.window-scene-ocean .window-view,
.wall.material-smoke-moonroom.window-scene-mountain .window-view,
.wall.material-smoke-moonroom.window-scene-farmland .window-view,
.wall.material-smoke-moonroom.window-scene-forest .window-view,
.wall.material-smoke-moonroom.window-scene-rain .window-view {
  background-color: transparent;
}

/* Option B: softer grounding shadows, less heavy drop than full bold */
.wall.material-smoke-hearth .item-sprite.hero img,
.wall.material-smoke-hearth .item-sprite[data-hero="1"] img,
.wall.material-smoke-garden .item-sprite.hero img,
.wall.material-smoke-garden .item-sprite[data-hero="1"] img,
.wall.material-smoke-moonroom .item-sprite.hero img,
.wall.material-smoke-moonroom .item-sprite[data-hero="1"] img,
.wall.material-smoke-hearth .item-sprite.smoke-bold img,
.wall.material-smoke-garden .item-sprite.smoke-bold img,
.wall.material-smoke-moonroom .item-sprite.smoke-bold img {
  filter: drop-shadow(3px 5px 2px rgba(42, 33, 24, 0.22));
}

.wall.material-smoke-hearth .item-sprite.variant-smoke-bold-trailing-vine,
.wall.material-smoke-hearth .item-sprite.variant-smoke-bold-hanging-plant,
.wall.material-smoke-garden .item-sprite.variant-smoke-bold-trailing-vine,
.wall.material-smoke-garden .item-sprite.variant-smoke-bold-hanging-plant {
  animation: vine-sway 6.5s ease-in-out infinite;
}

/* Option B: no pulsing bloom on soft sconces */
.wall.material-smoke-hearth .item-sprite.variant-smoke-bold-sconce img,
.wall.material-smoke-garden .item-sprite.variant-smoke-bold-sconce img,
.wall.material-smoke-moonroom .item-sprite.variant-smoke-bold-sconce img {
  animation: none;
  filter: drop-shadow(3px 5px 2px rgba(42, 33, 24, 0.2));
}

.wall.material-light {
  background:
    linear-gradient(90deg, rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(42, 45, 42, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 248, 232, 0.96) 0 68%, rgba(230, 224, 210, 0.96) 68%),
    linear-gradient(145deg, #fff8e8 0%, #f6f1e7 48%, #dbe8dd 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.wall.material-light .greenhouse-beam,
.wall.material-light .leaf-shadow {
  display: none;
}

.wall.material-brick {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    repeating-linear-gradient(0deg, var(--brick) 0 22px, #5f2f28 22px 25px),
    repeating-linear-gradient(90deg, transparent 0 54px, rgba(20, 12, 10, 0.42) 54px 57px);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.wall.material-concrete {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(145deg, #777a78, #b5aea2);
  background-size: 32px 32px, 32px 32px, auto;
}

.wall.material-gallery {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(145deg, #20242c, #343e45);
  background-size: 32px 32px, 32px 32px, auto;
}

.wall.material-plaster {
  background:
    linear-gradient(90deg, rgba(100, 70, 40, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(rgba(100, 70, 40, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(145deg, #cab898, #f0dfbf);
  background-size: 32px 32px, 32px 32px, auto;
}

.wall.material-wood {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, var(--grid-alpha)) 2px, transparent 2px),
    repeating-linear-gradient(90deg, #80512f 0 76px, #6a3f25 76px 82px);
  background-size: 32px 32px, 32px 32px, auto;
}

.wall.material-hearth {
  image-rendering: auto;
  background:
    linear-gradient(90deg, rgba(90, 60, 35, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(rgba(90, 60, 35, var(--grid-alpha)) 1px, transparent 1px),
    radial-gradient(ellipse at 18% 12%, rgba(255, 236, 196, 0.55), transparent 42%),
    linear-gradient(180deg, #f3e6d0 0 68%, transparent 68%),
    linear-gradient(145deg, #efe0c8 0%, #e4d0b0 48%, #d8c29a 100%);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

.wall.material-hearth .greenhouse-beam,
.wall.material-hearth .leaf-shadow,
.wall.material-hearth .wall-pegboard {
  display: none;
}

.wall.material-hearth .floor-band {
  height: calc(var(--wall-floor-height) + 8px);
  background:
    linear-gradient(180deg, rgba(255, 220, 150, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(42, 33, 24, 0.18), transparent 28%),
    repeating-linear-gradient(90deg, #8b5a32 0 58px, #7a4c28 58px 62px, #a06a3c 62px 118px, #6f4022 118px 122px);
  box-shadow:
    inset 0 8px 0 rgba(42, 33, 24, 0.16),
    inset 0 -10px 18px rgba(255, 210, 120, 0.12);
}

.wall.material-hearth .wall-ledge {
  background: linear-gradient(#b07a4a 0 6px, #6b4428 6px);
  border-color: #3a2818;
  opacity: 0.95;
}

.wall.material-hearth .window-view {
  width: 248px;
  height: 220px;
  border: 9px solid #4a3422;
  border-radius: 14px;
  box-shadow:
    6px 10px 14px rgba(42, 33, 24, 0.2),
    inset 0 0 0 3px rgba(255, 236, 196, 0.22);
  background:
    radial-gradient(circle at 76% 18%, #ffe7a8 0 12px, transparent 20px),
    linear-gradient(180deg, #6aa9d4 0 38%, #8ec8e8 38% 46%, #2f6f8f 46% 62%, #1f5a72 62% 70%, #3d8f6a 70% 78%, #2f6a48 78%);
  image-rendering: auto;
  overflow: hidden;
}

.wall.material-hearth .window-view::before {
  width: 5px;
  background: rgba(74, 52, 34, 0.88);
}

.wall.material-hearth .window-view::after {
  height: 5px;
  background: rgba(74, 52, 34, 0.88);
}

.wall.material-hearth .sun {
  width: 36px;
  height: 36px;
  top: 18px;
  right: 26px;
  background: #ffe7a8;
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(255, 224, 125, 0.2), 0 0 28px rgba(255, 200, 80, 0.5);
}

.wall.material-hearth .skyline {
  gap: 4px;
  left: 14px;
  right: 14px;
  bottom: 28%;
  align-items: end;
}

.wall.material-hearth .skyline span {
  width: 16px;
  background:
    linear-gradient(180deg, #fff6ea 0 18%, #f0d2b0 18% 55%, #e8b89a 55%);
  box-shadow:
    inset 2px 0 0 rgba(255, 248, 232, 0.55),
    0 0 0 1px rgba(74, 52, 34, 0.12);
  border-radius: 3px 3px 0 0;
}

.wall.material-hearth .skyline span:nth-child(1) { height: 22px; width: 14px; }
.wall.material-hearth .skyline span:nth-child(2) { height: 38px; width: 20px; }
.wall.material-hearth .skyline span:nth-child(3) { height: 28px; width: 15px; }
.wall.material-hearth .skyline span:nth-child(4) { height: 46px; width: 22px; }
.wall.material-hearth .skyline span:nth-child(5) { height: 24px; width: 14px; }
.wall.material-hearth .skyline span:nth-child(6) { height: 34px; width: 18px; }

.wall.material-hearth.light-golden::after {
  z-index: 1;
  background:
    linear-gradient(115deg, rgba(255, 214, 140, 0.42), transparent 48%),
    linear-gradient(0deg, rgba(255, 196, 110, 0.16), transparent 36%),
    radial-gradient(ellipse at 22% 18%, rgba(255, 236, 180, 0.28), transparent 34%);
}

.wall.material-hearth.light-morning::after {
  z-index: 1;
  background:
    linear-gradient(115deg, rgba(255, 248, 220, 0.4), transparent 46%),
    radial-gradient(circle at 20% 16%, rgba(255, 240, 180, 0.3), transparent 28%);
}

.wall.light-morning {
  filter: brightness(1.08) saturate(1.03);
}

.wall.light-golden::after {
  z-index: 1;
  background: linear-gradient(115deg, rgba(244, 184, 78, 0.35), transparent 46%);
}

.wall.light-night::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 13, 22, 0.36), rgba(10, 13, 22, 0.18));
}

.wall.light-spotlight::after {
  z-index: 1;
  background:
    radial-gradient(circle at 46% 14%, rgba(245, 208, 126, 0.32), transparent 22%),
    radial-gradient(circle at 64% 16%, rgba(245, 208, 126, 0.24), transparent 18%);
}

.wall.light-morning::after {
  z-index: 1;
  background:
    linear-gradient(115deg, rgba(255, 248, 232, 0.34), transparent 42%),
    radial-gradient(circle at 22% 16%, rgba(255, 248, 166, 0.22), transparent 25%);
}

.wall-architecture {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.greenhouse-beam,
.wall-pegboard,
.leaf-shadow,
.wall-ledge,
.floor-band {
  position: absolute;
  display: block;
  pointer-events: none;
}

.greenhouse-beam {
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.26), transparent 24%),
    #2a2d2a;
  box-shadow: 4px 4px 0 rgba(42, 45, 42, 0.18);
}

.beam-top {
  left: 4%;
  right: 4%;
  top: 22px;
  height: 6px;
  opacity: 0.22;
}

.beam-left,
.beam-right {
  top: 22px;
  bottom: var(--wall-floor-height);
  width: 6px;
  opacity: 0.18;
}

.beam-left {
  left: 42%;
}

.beam-right {
  right: 6%;
}

.beam-diagonal {
  width: 7px;
  height: 56%;
  top: 20px;
  transform-origin: top center;
  opacity: 0.14;
}

.beam-diagonal-one {
  left: 58%;
  transform: rotate(28deg);
}

.beam-diagonal-two {
  left: 72%;
  transform: rotate(-24deg);
}

.wall-pegboard {
  left: 30%;
  bottom: 135px;
  width: 330px;
  height: 124px;
  opacity: 0.2;
  background:
    radial-gradient(circle, #2a2d2a 0 2px, transparent 3px) 0 0 / 24px 24px,
    rgba(255, 248, 232, 0.2);
  border: 3px solid rgba(42, 45, 42, 0.16);
}

.leaf-shadow {
  width: 190px;
  height: 190px;
  opacity: 0.18;
  filter: blur(0.2px);
  background:
    radial-gradient(ellipse at 22% 28%, #2a2d2a 0 12px, transparent 13px),
    radial-gradient(ellipse at 44% 22%, #2a2d2a 0 16px, transparent 17px),
    radial-gradient(ellipse at 62% 38%, #2a2d2a 0 14px, transparent 15px),
    radial-gradient(ellipse at 36% 56%, #2a2d2a 0 15px, transparent 16px),
    linear-gradient(100deg, transparent 0 50%, #2a2d2a 50% 53%, transparent 53%);
}

.leaf-shadow-one {
  right: 4%;
  top: 12%;
  transform: rotate(-18deg);
}

.leaf-shadow-two {
  left: 15%;
  top: 33%;
  transform: rotate(18deg) scale(0.72);
  opacity: 0.12;
}

.wall-ledge {
  left: 8%;
  right: 8%;
  bottom: calc(var(--wall-floor-height) - 6px);
  height: 14px;
  background:
    linear-gradient(#9d6845 0 6px, #5f3b29 6px);
  border: 3px solid #2a2d2a;
  box-shadow: 5px 5px 0 rgba(42, 45, 42, 0.18);
  opacity: 0.86;
}

.floor-band {
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--wall-floor-height);
  background:
    linear-gradient(180deg, rgba(42, 45, 42, 0.13), transparent 22%),
    repeating-linear-gradient(90deg, rgba(42, 45, 42, 0.1) 0 3px, transparent 3px 96px),
    linear-gradient(145deg, #d8d2c4, #b9cab1);
  box-shadow: inset 0 6px 0 rgba(42, 45, 42, 0.18);
}

.window-view {
  position: absolute;
  z-index: 2;
  top: 42px;
  left: 44px;
  width: 210px;
  height: 180px;
  border: 7px solid #2e2118;
  background: linear-gradient(#b9d7ea 0 48%, #f2d29d 48% 60%, #8ebe8a 60%);
  background-size: cover;
  background-position: center;
  box-shadow: 5px 5px 0 var(--shadow);
  overflow: hidden;
}

.wall.window-scene-city .window-view {
  background-image: url("./assets/windows/window-city-skyline.jpg");
  image-rendering: auto;
}

.wall.window-scene-ocean .window-view {
  background-image: url("./assets/windows/window-ocean-view.jpg");
  image-rendering: auto;
}

.wall.window-scene-mountain .window-view {
  background-image: url("./assets/windows/window-mountain-view.jpg");
  image-rendering: auto;
}

.wall.window-scene-farmland .window-view {
  background-image: url("./assets/windows/window-farmland-view.jpg");
  image-rendering: auto;
}

.wall.window-scene-city .window-view .sun,
.wall.window-scene-city .window-view .skyline,
.wall.window-scene-ocean .window-view .sun,
.wall.window-scene-ocean .window-view .skyline,
.wall.window-scene-mountain .window-view .sun,
.wall.window-scene-mountain .window-view .skyline,
.wall.window-scene-farmland .window-view .sun,
.wall.window-scene-farmland .window-view .skyline {
  display: none;
}

.wall.material-hearth.window-scene-city .window-view,
.wall.material-hearth.window-scene-ocean .window-view,
.wall.material-hearth.window-scene-mountain .window-view,
.wall.material-hearth.window-scene-farmland .window-view {
  background-color: transparent;
}

.window-position-center .window-view {
  left: calc(50% - 105px);
}

.window-position-right .window-view {
  left: auto;
  right: 44px;
}

.wall.material-smoke-hearth.window-position-center .window-view {
  left: calc(50% - 150px);
}

.wall.material-smoke-garden.window-position-center .window-view {
  left: calc(50% - 159px);
}

.wall.material-smoke-moonroom.window-position-center .window-view {
  left: calc(50% - 165px);
}

.wall.material-smoke-hearth.window-position-right .window-view,
.wall.material-smoke-garden.window-position-right .window-view,
.wall.material-smoke-moonroom.window-position-right .window-view {
  left: auto;
  right: 36px;
}

.window-position-none .window-view {
  display: none;
}

.window-view::before,
.window-view::after {
  content: "";
  position: absolute;
  background: #2e2118;
}

.window-view::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 3px);
  width: 6px;
}

.window-view::after {
  left: 0;
  right: 0;
  top: calc(50% - 3px);
  height: 6px;
}

.sun {
  width: 28px;
  height: 28px;
  background: #fff8a6;
  position: absolute;
  top: 28px;
  right: 34px;
  box-shadow: 0 0 0 5px rgba(255, 224, 125, 0.18);
}

.skyline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  display: flex;
  align-items: end;
  gap: 7px;
}

.skyline span {
  width: 22px;
  background: #6f8f88;
  box-shadow: inset 4px 0 0 rgba(255, 248, 232, 0.62);
}

.skyline span:nth-child(1) { height: 40px; }
.skyline span:nth-child(2) { height: 66px; }
.skyline span:nth-child(3) { height: 52px; }
.skyline span:nth-child(4) { height: 92px; }
.skyline span:nth-child(5) { height: 48px; }
.skyline span:nth-child(6) { height: 72px; }

.wall-caption {
  position: absolute;
  z-index: 10;
  left: 44px;
  bottom: 22px;
  max-width: 250px;
  border-left: 5px solid var(--teal);
  padding: 8px 0 8px 12px;
  color: rgba(35, 51, 38, 0.72);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 248, 232, 0.62);
}

.drop-hint {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 80%);
  border: 3px dashed rgba(246, 237, 223, 0.6);
  background: rgba(17, 20, 25, 0.52);
  color: var(--cream);
  text-align: center;
  padding: 18px;
}

.drop-hint.hidden {
  display: none;
}

.wall-item {
  position: absolute;
  z-index: 2;
  min-width: 48px;
  min-height: 40px;
  border: 2px solid rgba(42, 45, 42, 0.72);
  box-shadow: 0 10px 20px rgba(42, 45, 42, 0.18), 2px 3px 0 rgba(42, 45, 42, 0.24);
  user-select: none;
  touch-action: none;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}

.wall-item.selected {
  outline: 3px solid rgba(111, 175, 114, 0.9);
  outline-offset: 4px;
}

.visit-mode .wall-item {
  cursor: pointer;
}

.item-artwork {
  background: #1a2029;
  padding: 8px;
}

.item-artwork::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 3px solid rgba(59, 37, 22, 0.78);
  pointer-events: none;
  z-index: 2;
}

.item-artwork.variant-wood {
  background:
    linear-gradient(90deg, #5d341e 0 10px, #7f5132 10px 18px, #5d341e 18px calc(100% - 18px), #9e6941 calc(100% - 18px) calc(100% - 10px), #5d341e calc(100% - 10px)),
    linear-gradient(#5d341e 0 10px, #8d5b36 10px 18px, #1a2029 18px calc(100% - 18px), #6f4428 calc(100% - 18px) calc(100% - 10px), #5d341e calc(100% - 10px));
}

.item-artwork.variant-wood::before {
  border-color: #20140e;
}

.item-artwork.variant-chrome {
  background:
    linear-gradient(90deg, #69788f 0 9px, #d7e3f3 9px 17px, #8797ad 17px calc(100% - 17px), #f2f7ff calc(100% - 17px) calc(100% - 9px), #485467 calc(100% - 9px)),
    linear-gradient(#485467 0 9px, #f2f7ff 9px 17px, #1a2029 17px calc(100% - 17px), #8797ad calc(100% - 17px) calc(100% - 9px), #485467 calc(100% - 9px));
}

.item-artwork.variant-gallery {
  background:
    linear-gradient(90deg, #090b0f 0 12px, #313945 12px 20px, #090b0f 20px calc(100% - 20px), #313945 calc(100% - 20px) calc(100% - 12px), #090b0f calc(100% - 12px)),
    linear-gradient(#090b0f 0 12px, #313945 12px 20px, #1a2029 20px calc(100% - 20px), #090b0f calc(100% - 20px));
}

.item-artwork.variant-neon {
  background:
    linear-gradient(90deg, #091012 0 8px, var(--item-accent) 8px 14px, #091012 14px calc(100% - 14px), #8cf6ff calc(100% - 14px) calc(100% - 8px), #091012 calc(100% - 8px)),
    linear-gradient(#091012 0 8px, #8cf6ff 8px 14px, #152027 14px calc(100% - 14px), var(--item-accent) calc(100% - 14px) calc(100% - 8px), #091012 calc(100% - 8px));
  box-shadow: 5px 5px 0 var(--shadow), 0 0 0 4px rgba(111, 209, 194, 0.22);
}

.item-artwork.variant-cork {
  background:
    radial-gradient(circle at 14px 14px, #d9564a 0 4px, #2e2118 5px 7px, transparent 8px),
    radial-gradient(circle at calc(100% - 14px) 14px, #d9564a 0 4px, #2e2118 5px 7px, transparent 8px),
    #b97945;
}

.item-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.demo-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    linear-gradient(160deg, transparent 0 56%, #1f2a39 56%),
    linear-gradient(90deg, transparent 0 46%, rgba(253, 211, 115, 0.95) 46% 52%, transparent 52%),
    linear-gradient(#11192d 0 40%, #efb168 40% 54%, #1c314d 54%);
  color: var(--cream);
  padding: 10px;
  border: 3px solid #0b0d10;
}

.demo-art.coffee {
  background:
    radial-gradient(circle at 76% 16%, #ffe07d 0 14px, transparent 15px),
    linear-gradient(#9edbf1 0 50%, #e8b560 50%);
  color: #172028;
}

.demo-art.garden {
  background:
    linear-gradient(160deg, transparent 0 58%, #6faf72 58%),
    linear-gradient(135deg, transparent 0 42%, #b8d96f 42% 50%, transparent 50%),
    linear-gradient(#b9d7ea 0 48%, #fff8e8 48% 56%, #a8cfa8 56%);
  color: #233326;
}

.demo-art.sky {
  background:
    radial-gradient(circle at 72% 18%, #fff8a6 0 13px, transparent 14px),
    linear-gradient(145deg, #b9d7ea 0 48%, #f2b183 48% 56%, #6faf72 56%);
  color: #233326;
}

.demo-art span {
  display: block;
  max-width: 100%;
  max-height: 42px;
  overflow-wrap: anywhere;
  overflow: hidden;
  background: rgba(11, 13, 16, 0.72);
  border: 2px solid rgba(246, 237, 223, 0.36);
  padding: 3px 5px;
  font-size: 11px;
  line-height: 1.05;
  text-shadow: 1px 1px 0 #111;
}

.item-quote,
.item-note {
  background: var(--cream);
  color: #252018;
  padding: 10px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.item-quote {
  align-content: center;
  justify-items: center;
}

.item-quote p,
.item-note p {
  margin: 0;
  position: relative;
  z-index: 1;
}

.quote-mark {
  position: absolute;
  left: 8px;
  top: 2px;
  color: rgba(37, 32, 24, 0.28);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.item-quote.variant-plaque {
  background:
    linear-gradient(90deg, #2d1c13 0 9px, #c89144 9px 15px, #f1dbaf 15px calc(100% - 15px), #8d5b36 calc(100% - 15px) calc(100% - 9px), #2d1c13 calc(100% - 9px));
  border-color: #2e2118 !important;
}

.item-quote.variant-glow {
  background: #111419;
  color: #dffbf5;
  border-color: var(--item-accent) !important;
  box-shadow: 5px 5px 0 var(--shadow), 0 0 0 4px rgba(111, 209, 194, 0.18), inset 0 0 0 5px #23323a;
  text-shadow: 2px 2px 0 #0b0d10, 0 0 8px rgba(111, 209, 194, 0.75);
}

.item-quote.variant-pinboard {
  background:
    radial-gradient(circle at 50% 10px, #b94e48 0 5px, #2e2118 6px 8px, transparent 9px),
    linear-gradient(#f0dfbf, #e1c99d);
  padding-top: 18px;
}

.item-quote.variant-glass-label {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(217, 239, 232, 0.82)),
    #d8efe8;
  color: #233326;
  border-color: rgba(111, 175, 114, 0.88) !important;
  box-shadow: 0 10px 20px rgba(42, 45, 42, 0.16), inset 0 0 0 5px rgba(255, 255, 255, 0.42);
}

.item-quote.variant-glass-label::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-top: 4px solid rgba(255, 255, 255, 0.7);
  border-right: 4px solid rgba(255, 255, 255, 0.7);
}

.item-note.variant-sticky {
  background:
    linear-gradient(135deg, transparent 0 calc(100% - 22px), rgba(0, 0, 0, 0.14) calc(100% - 22px) calc(100% - 11px), #e0b84f calc(100% - 11px)),
    #f3d260;
}

.item-note.variant-taped {
  background:
    linear-gradient(90deg, transparent 0 32%, rgba(240, 223, 191, 0.85) 32% 68%, transparent 68%),
    linear-gradient(#dfe8e2, #c8d9d0);
  padding-top: 18px;
}

.item-note.variant-index {
  background:
    repeating-linear-gradient(#eef5ee 0 15px, #b9d0df 16px 18px),
    #eef5ee;
  border-left-width: 10px;
  border-left-color: #b94e48 !important;
}

.item-note.variant-seed-tag {
  background:
    radial-gradient(circle at 50% 12px, #6faf72 0 5px, #2a2d2a 6px 8px, transparent 9px),
    linear-gradient(#fff8e8, #e6e0d2);
  border-color: rgba(42, 45, 42, 0.72) !important;
  color: #233326;
  padding-top: 22px;
}

.item-note.variant-seed-tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 18px;
  height: 14px;
  background:
    radial-gradient(ellipse at 6px 8px, #b8d96f 0 6px, transparent 7px),
    radial-gradient(ellipse at 13px 6px, #6faf72 0 6px, transparent 7px);
  transform: translateX(-50%);
}

.note-pin {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 10px;
  height: 10px;
  background: #b94e48;
  border: 3px solid #2e2118;
  transform: translateX(-50%);
}

.item-shelf {
  height: 26px;
  min-height: 26px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.shelf-board {
  width: 100%;
  height: 20px;
  background:
    linear-gradient(#9e6941 0 8px, #63391f 8px 100%);
  border: 4px solid #2e2118;
  box-shadow: 5px 5px 0 var(--shadow);
}

.item-lamp {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.lamp-glow {
  position: absolute;
  inset: 4px;
  background: radial-gradient(circle at 50% 22%, rgba(255, 224, 125, 0.42), transparent 54%);
}

.lamp-shade,
.lamp-stem {
  position: relative;
  z-index: 1;
  display: block;
}

.lamp-shade {
  width: 52px;
  height: 28px;
  background: #e2a346;
  border: 4px solid #2e2118;
  box-shadow: inset 0 -7px 0 #b97945;
}

.lamp-stem {
  width: 12px;
  height: 34px;
  background: #2e2118;
  box-shadow: 0 28px 0 #2e2118;
}

.item-lamp.variant-gallery .lamp-shade {
  width: 68px;
  height: 22px;
  background: #d7e3f3;
  box-shadow: inset 0 -6px 0 #77869a, 0 18px 0 -7px #ffe07d;
}

.item-lamp.variant-neon .lamp-shade {
  width: 58px;
  height: 16px;
  background: #8cf6ff;
  border-color: #091012;
  box-shadow: 0 0 0 4px rgba(111, 209, 194, 0.28), 0 0 18px rgba(111, 209, 194, 0.85);
}

.item-lamp.variant-neon .lamp-stem {
  height: 44px;
  background: #091012;
  box-shadow: none;
}

.item-plant {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.plant-leaves,
.plant-pot {
  position: relative;
  z-index: 1;
  display: block;
}

.plant-leaves {
  width: 62px;
  height: 58px;
  background:
    radial-gradient(circle at 16px 18px, #63ad71 0 11px, transparent 12px),
    radial-gradient(circle at 44px 16px, #7ed28a 0 12px, transparent 13px),
    radial-gradient(circle at 30px 34px, #3d765f 0 15px, transparent 16px);
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.3));
}

.plant-pot {
  width: 44px;
  height: 34px;
  background:
    linear-gradient(90deg, #8d4935 0 9px, #c26f47 9px calc(100% - 9px), #663421 calc(100% - 9px)),
    #8d4935;
  border: 4px solid #2e2118;
  box-shadow: 5px 5px 0 var(--shadow);
}

.item-plant.variant-pothos {
  align-content: start;
}

.item-plant.variant-pothos .plant-leaves {
  width: 72px;
  height: 72px;
  background:
    radial-gradient(circle at 16px 14px, #7ed28a 0 11px, transparent 12px),
    radial-gradient(circle at 50px 16px, #63ad71 0 13px, transparent 14px),
    radial-gradient(circle at 34px 34px, #3d765f 0 15px, transparent 16px),
    linear-gradient(90deg, transparent 0 30px, #315c49 30px 36px, transparent 36px);
}

.item-plant.variant-pothos .plant-pot {
  width: 36px;
  height: 26px;
}

.item-plant.variant-shelf .plant-leaves {
  width: 58px;
  height: 44px;
}

.item-plant.variant-tall .plant-leaves {
  width: 68px;
  height: 78px;
  background:
    radial-gradient(ellipse at 18px 18px, #7ed28a 0 10px, transparent 11px),
    radial-gradient(ellipse at 48px 24px, #63ad71 0 13px, transparent 14px),
    radial-gradient(ellipse at 24px 50px, #3d765f 0 15px, transparent 16px),
    radial-gradient(ellipse at 48px 58px, #7ed28a 0 12px, transparent 13px),
    linear-gradient(90deg, transparent 0 31px, #315c49 31px 37px, transparent 37px);
}

.item-plant.variant-tall .plant-pot {
  width: 48px;
  height: 38px;
}

.item-plant.variant-vine {
  align-content: start;
}

.item-plant.variant-vine .plant-leaves {
  width: 74px;
  height: 94px;
  background:
    radial-gradient(ellipse at 18px 16px, #b8d96f 0 9px, transparent 10px),
    radial-gradient(ellipse at 48px 20px, #6faf72 0 11px, transparent 12px),
    radial-gradient(ellipse at 28px 42px, #6faf72 0 10px, transparent 11px),
    radial-gradient(ellipse at 54px 56px, #b8d96f 0 10px, transparent 11px),
    radial-gradient(ellipse at 34px 76px, #568c58 0 10px, transparent 11px),
    linear-gradient(90deg, transparent 0 34px, #568c58 34px 40px, transparent 40px);
  animation: vine-sway 4.8s ease-in-out infinite;
}

.item-plant.variant-vine .plant-pot {
  width: 42px;
  height: 24px;
  background:
    linear-gradient(90deg, #6f8a5c 0 9px, #e6e0d2 9px calc(100% - 9px), #6f8a5c calc(100% - 9px)),
    #e6e0d2;
}

@keyframes vine-sway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.item-lamp.variant-grow-light .lamp-shade {
  width: 74px;
  height: 20px;
  background: #2a2d2a;
  border-color: #0b0d10;
  box-shadow: inset 0 -6px 0 #6faf72, 0 18px 0 -7px rgba(184, 217, 111, 0.9);
}

.item-lamp.variant-grow-light .lamp-stem {
  height: 44px;
  background: #2a2d2a;
  box-shadow: 0 36px 0 #2a2d2a;
}

.item-lamp.variant-grow-light .lamp-glow {
  background: radial-gradient(circle at 50% 28%, rgba(184, 217, 111, 0.52), transparent 56%);
  animation: grow-glow 3.6s ease-in-out infinite;
}

@keyframes grow-glow {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.item-musicPlayer {
  background:
    linear-gradient(90deg, #0b0d10 0 8px, #2f3945 8px calc(100% - 8px), #0b0d10 calc(100% - 8px)),
    #171d24;
  color: var(--cream);
  padding: 18px 10px 10px;
  border-color: rgba(111, 175, 114, 0.9) !important;
  gap: 3px;
}

.player-screen {
  width: 54px;
  height: 14px;
  background: #7ed28a;
  border: 3px solid #0b0d10;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}

.item-musicPlayer strong,
.item-musicPlayer span:not(.player-screen) {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.05;
}

.item-folder {
  align-content: center;
  background: #f0b64f;
  color: #22170d;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  line-height: 1.08;
  padding: 28px 10px 10px;
}

.item-folder.variant-manila {
  background:
    linear-gradient(180deg, transparent 0 20%, #f0b64f 20% 100%),
    linear-gradient(90deg, #d68b35 0 38%, transparent 38%);
}

.item-folder.variant-inbox {
  background:
    linear-gradient(180deg, #c6d3df 0 18%, #7d8b9d 18% 24%, #d7e3f3 24% 100%);
  color: #121820;
  border-color: #2e3540 !important;
}

.item-folder.variant-binder {
  background:
    linear-gradient(90deg, #1b2434 0 22px, #31475d 22px 32px, #e7c165 32px 42px, #27405a 42px),
    #27405a;
  color: #f6eddf;
  border-color: #111419 !important;
}

.item-folder.variant-green-crate,
.item-folder.variant-blue-crate,
.item-folder.variant-peach-crate {
  padding-top: 20px;
  border-color: rgba(42, 45, 42, 0.72) !important;
  color: #172018;
  box-shadow: 0 12px 20px rgba(42, 45, 42, 0.18), inset 0 -8px 0 rgba(42, 45, 42, 0.12);
}

.item-folder.variant-green-crate {
  background:
    linear-gradient(#b8d96f 0 16px, transparent 16px),
    linear-gradient(90deg, #5f9e63 0 12px, #6faf72 12px calc(100% - 12px), #4e8351 calc(100% - 12px));
}

.item-folder.variant-blue-crate {
  background:
    linear-gradient(#b9d7ea 0 16px, transparent 16px),
    linear-gradient(90deg, #5c95b4 0 12px, #6da7c8 12px calc(100% - 12px), #497c99 calc(100% - 12px));
}

.item-folder.variant-peach-crate {
  background:
    linear-gradient(#ffd0ad 0 16px, transparent 16px),
    linear-gradient(90deg, #d8845f 0 12px, #f2b183 12px calc(100% - 12px), #be6f4d calc(100% - 12px));
}

.item-folder::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 48px;
  height: 20px;
  background: #f3c569;
  border: 4px solid #2e2118;
  border-bottom: 0;
}

.item-folder.variant-inbox::before {
  left: 16px;
  right: 16px;
  top: 10px;
  width: auto;
  height: 14px;
  background: #edf4fb;
  border-color: #2e3540;
}

.item-folder.variant-binder::before {
  left: 10px;
  top: 12px;
  width: 12px;
  height: calc(100% - 24px);
  background: #111419;
  border: 0;
  box-shadow: 0 18px 0 #e7c165, 0 42px 0 #e7c165;
}

.item-folder.variant-green-crate::before,
.item-folder.variant-blue-crate::before,
.item-folder.variant-peach-crate::before {
  left: 18px;
  right: 18px;
  top: 42px;
  width: auto;
  height: 18px;
  background: rgba(255, 248, 232, 0.78);
  border: 3px solid #2a2d2a;
}

.item-folder.variant-green-crate .folder-lines,
.item-folder.variant-blue-crate .folder-lines,
.item-folder.variant-peach-crate .folder-lines {
  display: none;
}

.item-folder strong,
.item-folder span,
.item-folder button {
  position: relative;
  z-index: 1;
}

.item-folder strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.item-folder .folder-tab {
  display: none;
}

.folder-lines {
  position: absolute;
  right: 13px;
  top: 36px;
  width: 38px;
  height: 4px;
  background: rgba(46, 33, 24, 0.36);
  box-shadow: 0 11px 0 rgba(46, 33, 24, 0.25), 0 22px 0 rgba(46, 33, 24, 0.18);
}

.item-folder span:not(.folder-tab):not(.folder-lines) {
  font-size: 12px;
  font-weight: 700;
}

.item-folder button {
  border: 3px solid #2e2118;
  background: #171d24;
  color: var(--cream);
  padding: 4px 8px;
  box-shadow: 2px 2px 0 var(--shadow);
}

.item-stereo {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  gap: 4px;
  align-items: stretch;
}

.stereo-speaker,
.stereo-deck {
  border: 4px solid #0b0d10;
  box-shadow: 5px 5px 0 var(--shadow);
}

.stereo-speaker {
  height: 82%;
  align-self: end;
  background:
    radial-gradient(circle at 50% 28%, #3b4558 0 8px, #111419 9px 13px, transparent 14px),
    radial-gradient(circle at 50% 70%, #3b4558 0 9px, #111419 10px 15px, transparent 16px),
    #18233b;
}

.stereo-deck {
  position: relative;
  background:
    linear-gradient(90deg, #c7d8ec 0 10px, #f4f8ff 10px calc(100% - 10px), #8291a6 calc(100% - 10px)),
    #d7e3f3;
}

.disc {
  position: absolute;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 4px solid #6f7f94;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f6eddf 0 7px, #0b0d10 8px 10px, transparent 11px),
    conic-gradient(from 45deg, #80cdf2, #dff6ff, #80cdf2, #5ba4d7, #80cdf2);
  transform: translateX(-50%);
}

.disc-one {
  top: 12px;
}

.disc-two {
  top: 54px;
}

.disc-three {
  top: 96px;
}

.stereo-display {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 21px;
  height: 13px;
  background: #61c4f1;
  border: 3px solid #0b0d10;
}

.stereo-buttons {
  position: absolute;
  left: 14px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  background: #f6eddf;
  border: 2px solid #0b0d10;
  box-shadow: 13px 0 0 #f6eddf, 26px 0 0 #f6eddf, 39px 0 0 #f6eddf, 52px 0 0 #f6eddf;
}

.item-stereo.variant-boombox {
  grid-template-columns: 1fr;
  align-items: center;
  background: #293442;
  border: 4px solid #0b0d10;
  box-shadow: 5px 5px 0 var(--shadow);
}

.item-stereo.variant-boombox .stereo-speaker {
  position: absolute;
  top: 40px;
  width: 34px;
  height: 54px;
}

.item-stereo.variant-boombox .stereo-speaker-left {
  left: 8px;
}

.item-stereo.variant-boombox .stereo-speaker-right {
  right: 8px;
}

.item-stereo.variant-boombox .stereo-deck {
  width: 48px;
  height: 72px;
  margin-top: 32px;
}

.item-stereo.variant-boombox .disc {
  display: none;
}

@keyframes disc-spin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

.living-motion.item-stereo .disc,
.living-motion.item-living.variant-cd-player .disc {
  animation: disc-spin 4.2s linear infinite;
}

.living-motion.item-stereo .disc-two,
.living-motion.item-living.variant-cd-player .disc-two {
  animation-delay: -1.4s;
}

.living-motion.item-stereo .disc-three,
.living-motion.item-living.variant-cd-player .disc-three {
  animation-delay: -2.8s;
}

.item-plant.living-motion .plant-leaves {
  transform: scale(var(--plant-growth, 1));
  transform-origin: bottom center;
  animation: plant-breathe 5.5s ease-in-out infinite;
}

.item-plant.living-motion[data-growth-stage="0"] .plant-pot {
  height: 26px;
  width: 36px;
}

.item-plant.living-motion[data-growth-stage="1"] .plant-leaves {
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.28)) saturate(0.92);
}

@keyframes plant-breathe {
  0%, 100% { transform: scale(var(--plant-growth, 1)) translateY(0); }
  50% { transform: scale(calc(var(--plant-growth, 1) * 1.03)) translateY(-2px); }
}

.item-living {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.item-living.variant-record-player {
  display: grid;
  place-items: center;
}

.record-player-base {
  position: relative;
  width: 118px;
  height: 92px;
  background:
    linear-gradient(90deg, #6b4423 0 10px, #a66b3f 10px calc(100% - 10px), #4f3018 calc(100% - 10px)),
    #8b5a32;
  border: 4px solid #0b0d10;
  box-shadow: 5px 5px 0 var(--shadow);
}

.record-player-platter {
  position: absolute;
  left: 18px;
  top: 16px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1a1a1c;
  border: 3px solid #0b0d10;
}

.record-vinyl {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 3px solid #2e3540;
  background:
    radial-gradient(circle, #c9a24a 0 6px, #0b0d10 7px 9px, transparent 10px),
    conic-gradient(from 20deg, #1f2430, #3d4658, #1f2430, #58627a, #1f2430);
  animation: vinyl-spin 3.1s linear infinite;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.record-player-arm {
  position: absolute;
  right: 22px;
  top: 18px;
  width: 8px;
  height: 46px;
  background: #d4b06a;
  border: 3px solid #0b0d10;
  transform-origin: top center;
  transform: rotate(24deg);
  box-shadow: 18px 34px 0 -3px #2a2118;
}

.record-player-badge {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f6eddf;
  border: 3px solid #0b0d10;
  animation: grow-glow 2.4s ease-in-out infinite;
}

.item-living.variant-cd-player {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  gap: 4px;
  align-items: stretch;
}

.item-living.variant-cd-player .stereo-display {
  animation: grow-glow 2.8s ease-in-out infinite;
}

.item-living.variant-cat {
  position: relative;
  display: grid;
  place-items: end center;
}

.cat-shadow {
  position: absolute;
  bottom: 2px;
  width: 62px;
  height: 10px;
  background: rgba(11, 13, 16, 0.22);
  border-radius: 50%;
  filter: blur(1px);
}

.cat-body {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 34px;
  background:
    radial-gradient(circle at 18px 12px, #f2c98a 0 12px, transparent 13px),
    #c98b52;
  border: 4px solid #2e2118;
  border-radius: 18px 18px 12px 12px;
  animation: cat-breathe 3.2s ease-in-out infinite;
}

.cat-head {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 26px;
  width: 38px;
  height: 34px;
  transform: translateX(-50%);
  background: #c98b52;
  border: 4px solid #2e2118;
  border-radius: 16px 16px 12px 12px;
}

.cat-ear {
  position: absolute;
  top: -8px;
  width: 12px;
  height: 14px;
  background: #c98b52;
  border: 4px solid #2e2118;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.cat-ear-left {
  left: 2px;
  transform: rotate(-8deg);
}

.cat-ear-right {
  right: 2px;
  transform: rotate(8deg);
}

.cat-face {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 6px;
  height: 6px;
  transform: translateX(-50%);
  background: #2e2118;
  border-radius: 50%;
  box-shadow: -10px -2px 0 #2e2118, 10px -2px 0 #2e2118;
  animation: cat-blink 6s ease-in-out infinite;
}

.cat-tail {
  position: absolute;
  z-index: 0;
  right: 8px;
  bottom: 18px;
  width: 10px;
  height: 34px;
  background: #b87945;
  border: 4px solid #2e2118;
  border-radius: 8px;
  transform-origin: bottom center;
  animation: cat-tail 2.6s ease-in-out infinite;
}

@keyframes cat-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes cat-tail {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-16deg); }
}

@keyframes cat-blink {
  0%, 44%, 48%, 100% { transform: translateX(-50%) scaleY(1); }
  46% { transform: translateX(-50%) scaleY(0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .living-motion .disc,
  .living-motion .record-vinyl,
  .living-motion .plant-leaves,
  .living-motion .cat-body,
  .living-motion .cat-tail,
  .living-motion .cat-face,
  .living-motion .record-player-badge,
  .living-motion .stereo-display {
    animation: none !important;
  }
}

.item-sprite {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.item-sprite img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(5px 5px 0 var(--shadow));
  pointer-events: none;
}

.item-sprite.hero img,
.item-sprite[data-hero="1"] img {
  image-rendering: auto;
  filter: drop-shadow(4px 7px 3px rgba(42, 33, 24, 0.28));
}

.wall.material-hearth .item-sprite.hero img,
.wall.material-hearth .item-sprite[data-hero="1"] img {
  filter: drop-shadow(5px 8px 4px rgba(70, 42, 18, 0.32));
}

.wall.material-hearth .item-sprite.variant-hero-trailing-vine {
  animation: vine-sway 4.8s ease-in-out infinite;
}

.wall.material-hearth .item-sprite.variant-hero-wall-sconce img {
  animation: grow-glow 3.6s ease-in-out infinite;
}

.wall.material-hearth .item-sprite.variant-hero-hanging-plant {
  animation: vine-sway 5.4s ease-in-out infinite;
}

.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  right: -7px;
  bottom: -7px;
  border: 3px solid var(--line);
  background: var(--teal);
  z-index: 3;
}

.visit-mode .resize-handle {
  display: none;
}

.inspector-panel {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
  border-radius: 8px;
  max-width: 1080px;
}

.inspector-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inspector-header,
#textField,
#imageField,
#styleField,
#folderField,
.control-row,
.swatch-row {
  grid-column: 1 / -1;
}

.empty-inspector,
.inspector-form,
.playlist-panel,
.setup-form,
.detail-dialog form,
.folder-dialog-shell,
.folder-page-editor {
  display: grid;
  gap: 12px;
}

.hidden {
  display: none !important;
}

.catalog-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  margin: auto;
  border: 4px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 0;
  overflow: hidden;
}

.catalog-dialog[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.catalog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 2px solid rgba(42, 45, 42, 0.2);
  background: rgba(255, 248, 232, 0.92);
  position: sticky;
  top: 0;
  z-index: 3;
}

.catalog-nav-chip {
  min-height: 36px;
  padding: 6px 12px;
  border: 2px solid rgba(42, 45, 42, 0.22);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.9);
  color: var(--ink);
  font-size: 13px;
  box-shadow: none;
}

.catalog-nav-chip.active,
.catalog-nav-chip[aria-pressed="true"] {
  background: rgba(111, 175, 114, 0.35);
  border-color: rgba(42, 45, 42, 0.35);
  font-weight: 600;
}

.catalog-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 0;
  background: rgba(32, 37, 45, 0.98);
}

.catalog-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.catalog-dialog-header {
  margin: 0;
}

.catalog-dialog .catalog-grid {
  overflow: auto;
  padding: 0 16px 16px;
  max-height: min(680px, calc(100vh - 160px));
}

.catalog-header {
  border-bottom: 3px solid var(--line);
  background:
    linear-gradient(90deg, rgba(111, 209, 194, 0.14), transparent 48%),
    rgba(32, 37, 45, 0.96);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.catalog-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.catalog-header p {
  color: var(--muted);
  margin-top: 4px;
}

.catalog-count {
  border: 3px solid var(--line);
  background: #111419;
  color: var(--teal);
  font-weight: 700;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  box-shadow: 3px 3px 0 var(--shadow);
  white-space: nowrap;
}

.catalog-grid {
  display: grid;
  gap: 16px;
}

.catalog-section {
  border: 3px solid var(--line);
  background: rgba(32, 37, 45, 0.96);
  box-shadow: 5px 5px 0 var(--shadow);
  padding: 14px;
}

.catalog-section h3,
.catalog-section-head .catalog-section-heading {
  font-size: 16px;
  font-weight: 600;
}

.catalog-section h3 {
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 0;
  background: rgba(32, 37, 45, 0.98);
}

.catalog-collapsible {
  border: 0;
}

.catalog-collapsible > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 0;
  background: rgba(32, 37, 45, 0.98);
}

.catalog-collapsible > summary::-webkit-details-marker {
  display: none;
}

.catalog-section-heading {
  font-size: 16px;
  font-weight: 600;
}

.catalog-section-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.4;
  max-width: 100%;
}

.catalog-section-collapsible .catalog-object-grid {
  margin-top: 4px;
}

.catalog-object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.catalog-card {
  border: 3px solid var(--line);
  background: #171d24;
  box-shadow: 4px 4px 0 var(--shadow);
  display: grid;
  grid-template-rows: 172px auto;
  min-width: 0;
}

.catalog-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 172px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, 0.08) 2px, transparent 2px),
    linear-gradient(145deg, #222a31, #101319);
  background-size: 24px 24px, 24px 24px, auto;
}

.catalog-preview .item-sprite:not(.hero):not(.smoke-bold):not([data-hero="1"]) img {
  image-rendering: pixelated;
}

.catalog-preview .item-sprite.hero img,
.catalog-preview .item-sprite.smoke-bold img,
.catalog-preview .item-sprite[data-hero="1"] img {
  image-rendering: auto;
}

.catalog-preview .wall-item {
  position: relative;
  left: auto;
  top: auto;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  cursor: default;
}

.catalog-preview .item-shelf {
  min-height: 42px;
}

.catalog-preview .item-folder button {
  display: none;
}

.catalog-meta {
  display: grid;
  gap: 2px;
  padding: 10px;
  min-width: 0;
  /* Cards are always dark (#171d24); do not inherit page --ink (often near-black). */
  color: #e8eef2;
}

.catalog-meta strong,
.catalog-meta span {
  overflow-wrap: anywhere;
}

.catalog-meta span {
  color: rgba(232, 238, 242, 0.72);
  font-size: 13px;
}

.inspector-header {
  justify-content: space-between;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 3px solid var(--line);
  background: #fff8e8;
  color: var(--ink);
  padding: 10px;
  min-height: 40px;
}

input[type="file"] {
  background: #fff8e8;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.control-row {
  flex-wrap: wrap;
  justify-content: space-between;
}

.control-row span {
  color: var(--muted);
  margin-right: auto;
}

.swatch-row {
  flex-wrap: wrap;
}

.swatch {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  box-shadow: 2px 2px 0 var(--shadow);
}

.track-list {
  display: grid;
  gap: 8px;
}

.track {
  border: 3px solid var(--line);
  background: var(--panel-2);
  padding: 9px;
  display: grid;
  gap: 6px;
}

.track.active {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.track-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.track-actions button,
.track-actions a {
  border: 2px solid var(--line);
  background: #151a21;
  color: var(--ink);
  padding: 5px 7px;
  text-decoration: none;
}

.setup-dialog,
.detail-dialog,
.folder-dialog {
  width: min(460px, calc(100vw - 28px));
  border: 4px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
}

.folder-dialog {
  width: min(820px, calc(100vw - 28px));
}

.setup-dialog::backdrop,
.detail-dialog::backdrop,
.folder-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.detail-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 4px solid var(--line);
  background: #0b0d10;
  box-shadow: 4px 4px 0 var(--shadow);
  overflow: hidden;
}

.detail-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.detail-dialog a {
  color: var(--teal);
  font-weight: 700;
}

.folder-workspace {
  display: grid;
  grid-template-columns: minmax(160px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
}

.folder-pages {
  display: grid;
  align-content: start;
  gap: 10px;
}

.folder-page-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
}

.folder-page-tab {
  border: 3px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 9px;
  text-align: left;
  box-shadow: 3px 3px 0 var(--shadow);
}

.folder-page-tab.active {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.folder-page-tab span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.folder-dialog.read-only input,
.folder-dialog.read-only textarea,
.folder-dialog.read-only select {
  opacity: 1;
  color: var(--cream);
  border-color: #35404a;
}

.folder-dialog.read-only #addFolderPageButton,
.folder-dialog.read-only #deleteFolderPageButton {
  opacity: 0.45;
  cursor: not-allowed;
}

.folder-inspector {
  display: grid;
}

.app.visit-mode .palette-panel,
.app.visit-mode .inspector-panel,
.app.visit-mode .edit-chrome,
.app.visit-mode .guest-banner {
  display: none !important;
}

.app.visit-mode .wall-stage {
  padding-bottom: 24px;
}

.app:not(.visit-mode) .wall-stage {
  padding-bottom: 88px;
}

.app.visit-mode {
  grid-template-rows: 1fr;
  overflow: hidden;
  min-height: 100vh;
  height: 100vh;
}

.app.visit-mode .topbar {
  position: fixed;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 30;
  width: auto;
  max-width: calc(100vw - 24px);
  padding: 8px 10px;
  border: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  background: rgba(32, 37, 45, 0.92);
  box-shadow: 4px 4px 0 var(--shadow);
  backdrop-filter: blur(10px);
}

.app.visit-mode .topbar-leading {
  flex: 0 0 auto;
}

.app.visit-mode .topbar-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.app.visit-mode .workspace {
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.app.visit-mode .wall-stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 12px;
}

.app.visit-mode .wall-frame {
  width: min(100%, 1220px);
}

.app.visit-landscape.visit-mode {
  min-height: 100dvh;
}

.app.visit-landscape.visit-mode .topbar {
  top: max(6px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  padding: 6px 8px;
  max-width: min(calc(100vw - 16px), 320px);
}

.app.visit-landscape.visit-mode .mode-toggle button {
  min-height: 36px;
  padding: 4px 8px;
  font-size: 12px;
}

.app.visit-landscape.visit-mode .wall-stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 0;
  height: calc(100dvh - max(48px, env(safe-area-inset-top, 0px) + 42px));
  max-height: calc(100dvh - max(48px, env(safe-area-inset-top, 0px) + 42px));
  padding: 4px 8px max(8px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  box-sizing: border-box;
}

.app.visit-landscape.visit-mode .wall-frame {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  width: min(100%, 1220px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app.visit-landscape.visit-mode .mobile-visit-toolbar:not([hidden]) {
  display: grid;
  flex: 0 0 auto;
  max-width: min(100%, 520px);
  margin: 0 auto 4px;
}

.app.visit-landscape.focus-mode .exit-focus-button {
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .palette-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .palette-panel h2,
  .palette-panel hr,
  .secondary-action {
    grid-column: 1 / -1;
  }

  .wall-frame {
    min-height: 430px;
  }
}

/* Keep the board's coordinates stable across devices; JS fitCanvas scales the wall. */
.wall-frame {
  overflow: hidden;
  max-width: 100%;
}

.wall {
  width: 1200px;
  height: 800px;
  min-width: 1200px;
}

.topbar-actions {
  flex-wrap: wrap;
}

.board-switcher {
  flex-wrap: wrap;
}

.board-switcher select {
  max-width: 200px;
}

#boardsDialog {
  width: min(600px, 92vw);
  padding: 24px;
}

#boardsList {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.board-card {
  text-align: left;
  padding: 20px;
}

.boards-page {
  max-width: 640px;
}

.boards-page-header {
  margin-bottom: 8px;
}

.boards-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.boards-grid {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.boards-card {
  display: grid;
  gap: 8px;
  margin: 0;
}

.boards-card-title {
  margin: 0;
  font-size: 1.1rem;
}

.boards-card-meta {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
}

.boards-card-open {
  font-weight: 600;
}

.boards-empty {
  margin: 16px 0;
}

.boards-footer {
  margin-top: 24px;
  font-size: 14px;
}

.boards-footer a {
  margin-top: 0;
}

.upload-help,
#uploadStatus {
  font-size: 12px;
  line-height: 1.5;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mobile-wall-toolbar {
  display: none;
  width: 100%;
  max-width: min(100%, 440px);
  margin: 0 auto 8px;
  padding: 0 4px;
  gap: 8px;
}

.mobile-wall-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.mobile-wall-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.mobile-wall-zoom {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(42, 45, 42, 0.22);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.82);
  color: var(--ink);
  font-size: 13px;
  box-shadow: none;
}

.mobile-wall-zoom.active {
  background: rgba(111, 175, 114, 0.28);
  border-color: rgba(42, 45, 42, 0.35);
  font-weight: 600;
}

@media (max-width: 640px) {
  .app:not(.visit-mode) {
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .app:not(.visit-mode) .topbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
  }

  .app:not(.visit-mode) .topbar-leading {
    flex: 0 1 auto;
    min-width: 0;
  }

  .app:not(.visit-mode) .topbar-leading .topbar-version,
  .app:not(.visit-mode) .topbar-leading #wallVersion {
    display: none !important;
  }

  .app:not(.visit-mode) .save-status-label {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app:not(.visit-mode) .topbar-actions {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
  }

  .app:not(.visit-mode) .topbar-actions > .ghost-action {
    display: none;
  }

  .app:not(.visit-mode) .account-identity {
    display: none;
  }

  .menu-top-actions {
    display: grid;
  }

  .app.visit-mode .topbar {
    top: max(12px, env(safe-area-inset-top, 0px));
    max-width: min(calc(100vw - 24px), 360px);
  }

  .app.visit-mode .topbar-actions > .ghost-action,
  .app.visit-mode .topbar-actions > .account-identity {
    display: none;
  }

  .mode-toggle button {
    min-height: 40px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .workspace {
    min-width: 0;
  }

  .wall-stage {
    width: 100%;
    min-width: 0;
    padding: 8px 10px 96px;
    justify-items: stretch;
  }

  .app.visit-mode .wall-stage {
    padding: 12px 10px max(24px, env(safe-area-inset-bottom, 0px));
  }

  .wall-frame {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
  }

  .mobile-wall-toolbar:not([hidden]) {
    display: grid;
  }

  .sync-error {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .palette-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .palette-panel .tool-card {
    min-width: 0;
    padding: 8px 2px;
  }

  .tool-card span:last-child {
    font-size: 11px;
  }

  button {
    min-height: 44px;
  }

  .board-switcher {
    width: 100%;
  }

  .window-view {
    width: 160px;
    height: 140px;
  }

  .folder-workspace {
    grid-template-columns: 1fr;
  }

  .folder-page-list {
    max-height: 180px;
  }

  .edit-item-dialog,
  .catalog-dialog,
  .setup-dialog,
  .detail-dialog,
  .folder-dialog,
  #shareDialog,
  #boardsDialog,
  #accountDialog {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-width: none;
    margin: 0;
    max-height: min(88dvh, 860px);
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
    box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.28);
  }

  .catalog-dialog[open] {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .catalog-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .catalog-nav::-webkit-scrollbar {
    display: none;
  }

  .catalog-nav-chip {
    flex: 0 0 auto;
  }

  .catalog-dialog .catalog-grid {
    max-height: none;
  }

  .edit-item-dialog-shell {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .control-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .control-row span {
    flex: 1 1 100%;
  }
}

.setup-dialog .setup-help {
  margin: -4px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.setup-dialog .setup-section {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 45, 42, 0.12);
}

.setup-dialog .setup-section-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.setup-background-picker {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.setup-bg-thumb {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  border: 2px solid rgba(42, 45, 42, 0.18);
  background-color: #e8e0d2;
  background-size: cover;
  background-position: center;
}

.setup-background-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.setup-background-copy strong {
  color: var(--ink);
}

.setup-background-copy .setup-help {
  margin: 0;
}

.setup-background-copy .secondary-action {
  justify-self: start;
}

.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;
}

.catalog-card-background.is-selected {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.catalog-preview-background {
  background-color: #d8d0c2;
  background-size: cover;
  background-position: center;
  image-rendering: auto;
}

.thumb-material-hearth,
.catalog-preview.thumb-material-hearth {
  background:
    radial-gradient(ellipse at 18% 12%, rgba(255, 236, 196, 0.55), transparent 42%),
    linear-gradient(145deg, #efe0c8 0%, #e4d0b0 48%, #d8c29a 100%);
}

.thumb-material-light,
.catalog-preview.thumb-material-light {
  background: linear-gradient(145deg, #fff8e8 0%, #f6f1e7 48%, #dbe8dd 100%);
}

.thumb-material-brick,
.catalog-preview.thumb-material-brick {
  background:
    repeating-linear-gradient(0deg, #8b3e34 0 14px, #5f2f28 14px 16px),
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(20, 12, 10, 0.42) 36px 38px);
}

.thumb-material-concrete,
.catalog-preview.thumb-material-concrete {
  background: linear-gradient(145deg, #777a78, #b5aea2);
}

.thumb-material-gallery,
.catalog-preview.thumb-material-gallery {
  background: linear-gradient(145deg, #20242c, #343e45);
}

.thumb-material-plaster,
.catalog-preview.thumb-material-plaster {
  background: linear-gradient(145deg, #cab898, #f0dfbf);
}

.thumb-material-wood,
.catalog-preview.thumb-material-wood {
  background: repeating-linear-gradient(90deg, #80512f 0 28px, #6a3f25 28px 32px);
}

.app.design-lang-hearth-elevated {
  --bg: #ebe3d4;
  --panel: #faf4e8;
  --teal: #8a9a6a;
  --gold: #c9a24a;
}

.app.design-lang-hearth-elevated .topbar {
  background: rgba(58, 42, 28, 0.92);
}

.app.design-lang-hearth-elevated .topbar .brand p {
  color: #e8dcc8;
}

.app.design-lang-hearth-elevated .catalog-section:first-child {
  outline: 2px solid rgba(201, 162, 74, 0.35);
  outline-offset: 6px;
  border-radius: 12px;
}

.design-language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-size: 13px;
}

.design-language-toggle select {
  max-width: 168px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 248, 232, 0.22);
  background: rgba(255, 248, 232, 0.12);
  color: var(--cream);
}

.app.design-lang-hearth-elevated.visit-mode .wall-frame {
  box-shadow:
    0 24px 60px rgba(58, 42, 28, 0.22),
    inset 0 0 0 1px rgba(201, 162, 74, 0.12);
  border-radius: 4px;
}

.app.design-lang-hearth-elevated.visit-mode .wall-caption {
  background: rgba(58, 42, 28, 0.72);
  color: #f5ead8;
  border-color: rgba(201, 162, 74, 0.35);
}

.app.design-lang-hearth-elevated .wall.material-hearth .item-sprite.hero img,
.app.design-lang-hearth-elevated .wall.material-hearth .item-sprite[data-hero="1"] img {
  filter: drop-shadow(6px 10px 5px rgba(70, 42, 18, 0.36));
}

.app.design-lang-garden-terminal {
  --bg: #e3ebe0;
  --panel: #f3f8ef;
  --teal: #6faf72;
  --gold: #b8d96f;
}

.app.design-lang-garden-terminal .topbar {
  background: rgba(36, 48, 36, 0.9);
}

.app.design-lang-moonroom-preview {
  --bg: #1a2230;
  --ink: #e8eef8;
  --muted: #9eb0c8;
  --panel: #243044;
  --panel-2: #2c3a52;
  --cream: #eef3ff;
  --line: #0e1218;
  color-scheme: dark;
}

.app.design-lang-moonroom-preview .topbar {
  background: rgba(12, 16, 24, 0.94);
  border-bottom-color: rgba(158, 176, 200, 0.25);
}

.app.design-lang-moonroom-preview .topbar .brand p,
.app.design-lang-moonroom-preview .panel,
.app.design-lang-moonroom-preview .catalog-header p {
  color: var(--muted);
}

.app.design-lang-moonroom-preview .panel,
.app.design-lang-moonroom-preview .catalog-dialog,
.app.design-lang-moonroom-preview .tool-card,
.app.design-lang-moonroom-preview .inspector-form label {
  background: var(--panel);
  color: var(--ink);
  border-color: rgba(158, 176, 200, 0.28);
}

.app.design-lang-moonroom-preview .topbar-actions button {
  color: var(--cream);
}

/* Durable walls: preserve the existing visual system and one canonical canvas. */
.start-screen { max-width: 480px; margin: 8vh auto; padding: 28px; background: var(--panel, #f5f0df); border: 1px solid #a2b59c; border-radius: 12px; }
.start-screen form, #shareDialog form, #accountDialog form { display: grid; gap: 16px; }
.start-screen label, #shareDialog label, #accountDialog label { display: grid; gap: 6px; }
.start-screen input, #shareDialog input, #shareDialog select, #accountDialog input { width: 100%; padding: 10px; }
.start-screen button, #shareDialog button, #accountDialog button { padding: 10px 16px; }
.guest-banner { margin: 0; padding: 12px 20px; color: #243024; background: #f4efe0; border-bottom: 1px solid #a2b59c; }
#accountDialog { max-width: min(520px, 94vw); }
.start-screen a { display: inline-block; margin-top: 20px; }
.start-screen .site-nav { margin-top: 20px; }
.start-screen .site-nav-link { margin-top: 0; }
.sync-error { margin: 0; padding: 12px 20px; color: #782b22; background: #ffecdc; }
#shareDialog { max-width: min(520px, 94vw); }
#shareUrlInput { font-size: 12px; }
.wall-frame, .app.visit-mode .wall-frame { min-height: 0; aspect-ratio: auto; }
.wall, .app.visit-mode .wall { width: 1200px; height: 800px; min-height: 0; transform-origin: top left; }
.wall.material-dw-sunlit-apartment,
.wall.material-dw-creative-loft,
.wall.material-dw-modern-gallery,
.app.visit-mode .wall.material-dw-sunlit-apartment,
.app.visit-mode .wall.material-dw-creative-loft,
.app.visit-mode .wall.material-dw-modern-gallery {
  width: 900px;
  height: 1125px;
}
.wall { touch-action: none; }
.wall-item.light-off .lamp-glow { display: none; }
.read-only #palettePanel, .read-only #inspectorPanel, .read-only #undoButton, .read-only #redoButton { display: none; }
.explore-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.74), transparent 42%),
    radial-gradient(circle at 12% 10%, rgba(111, 175, 114, 0.2), transparent 30%),
    var(--bg);
}

.explore-header,
.explore-main,
.explore-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px;
}

.explore-footer .app-version {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.explore-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-top: 36px;
}

.explore-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.explore-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.explore-lede {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
}

/* Site triangle — Explore · Studio · My walls (also used on boards + Studio) */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 16px;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  background: rgba(42, 45, 42, 0.06);
  outline: none;
}

.site-nav-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.site-nav-link.is-active {
  background: rgba(111, 175, 114, 0.28);
  border-color: rgba(22, 48, 24, 0.12);
  color: #163018;
}

.site-nav-on-panel {
  margin: 16px 0 0;
  justify-content: center;
}

.explore-header .site-nav {
  margin: 10px 0 14px;
}

.boards-page-header .site-nav {
  margin: 0 0 12px;
}

.explore-secondary-actions {
  margin: 0;
}

.explore-guest-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(42, 45, 42, 0.16);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.explore-guest-cta:hover,
.explore-guest-cta:focus-visible {
  background: var(--cream);
  outline: none;
}

.explore-guest-cta:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.explore-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.explore-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

#exploreSort:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.template-dialog {
  max-width: min(560px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(20, 24, 20, 0.28);
}

.template-dialog-shell {
  display: grid;
  gap: 14px;
  padding: 22px 20px 18px;
}

.template-dialog-lede {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.template-grid {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.template-card {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid rgba(42, 45, 42, 0.16);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
}

.template-card:hover,
.template-card:focus-visible {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 2px rgba(111, 175, 114, 0.35);
}

.template-card strong {
  font-size: 15px;
}

.template-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.wall-stage-mobile-fit {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  justify-items: start;
}

.explore-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.explore-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(42, 45, 42, 0.18);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px var(--soft-shadow);
}

.explore-card-main h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.explore-card-main a {
  color: var(--ink);
  text-decoration: none;
}

.explore-card-main a:hover {
  text-decoration: underline;
}

.explore-card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.explore-vote {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 88px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 45, 42, 0.22);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
}

.explore-vote[aria-pressed="true"] {
  background: #dcefc9;
  border-color: #6faf72;
}

.explore-vote:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.explore-vote-count {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.explore-vote-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.explore-empty,
.explore-error,
.explore-session {
  color: var(--muted);
}

.explore-error {
  color: var(--danger);
}

.explore-footer {
  padding-bottom: 40px;
}

@media (max-width: 700px) {
  .explore-header {
    flex-direction: column;
    padding-top: max(24px, env(safe-area-inset-top, 0px));
  }

  .explore-header .site-nav,
  .boards-page-header .site-nav {
    width: 100%;
  }

  .explore-header .site-nav-link,
  .boards-page-header .site-nav-link {
    flex: 1 1 auto;
  }

  .explore-secondary-actions {
    width: 100%;
  }

  .explore-guest-cta {
    width: 100%;
    text-align: center;
  }

  .explore-main,
  .explore-footer {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .explore-card {
    flex-direction: column;
    align-items: stretch;
  }

  .explore-vote {
    width: 100%;
    min-height: 44px;
  }

  .start-screen {
    margin: max(16px, env(safe-area-inset-top, 0px)) 12px 24px;
    max-width: none;
  }

  .boards-page.start-screen {
    margin-left: max(12px, env(safe-area-inset-left, 0px));
    margin-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .boards-toolbar button,
  #boardsRetryButton {
    min-height: 44px;
  }

  .topbar-actions { gap: 6px; flex-wrap: wrap; }
  .board-switcher { flex-wrap: wrap; }
  .wall-stage { min-width: 0; padding: 8px; }
}
