/* =====================================================================
   Cozy Home — by Kiera
   "A calm, sun-drenched, plant-filled home that feels soft, cozy,
    and connected to nature."
   ===================================================================== */

:root {
  /* Cozy Natural palette (default) */
  --cream:        #f7ecd6;
  --cream-soft:   #fbf4e2;
  --cream-deep:   #ecdcb9;
  --paper:        #fdf8eb;
  --wood-dark:    #8b6843;
  --wood:         #c89668;
  --wood-light:   #e2c8a4;
  --sage:         #a8c4a2;
  --sage-deep:    #7a9b7e;
  --sage-soft:    #d6e3cf;
  --moss:         #6b8060;
  --olive:        #8a9a6a;
  --leaf:         #6e8c5c;
  --sun:          #f4d27a;
  --sun-soft:     #fae6a8;
  --sky:          #cfe1d6;
  --blush:        #f3d4c5;
  --ink:          #4a3f35;
  --ink-soft:     #6e5e4f;
  --shadow:       rgba(74, 63, 53, 0.14);
  --shadow-soft:  rgba(74, 63, 53, 0.08);

  /* Surface tokens */
  --bg:           var(--cream);
  --surface:      var(--paper);
  --accent:       var(--sage-deep);

  /* Layout */
  --topbar-h:     74px;
  --radius:       18px;
  --radius-sm:    10px;
  --radius-pill:  999px;

  /* Type */
  --font-body:    'Quicksand', 'Avenir Next', 'Helvetica Neue', system-ui, sans-serif;
  --font-hand:    'Caveat', 'Bradley Hand', 'Marker Felt', cursive;

  /* Layout chrome heights — used to compute available room area */
  --chrome-h:     240px; /* topbar + tray + padding (desktop) */
  --aspect:       1.42857142857; /* 8 / 5.6 */
}

/* Style packs (apply by adding .style-<name> to .app) */
.style-celestial {
  --bg:        #2c2a4a;
  --cream:     #2c2a4a;
  --cream-soft:#3a375f;
  --cream-deep:#1f1d3a;
  --paper:     #3a375f;
  --wood:      #4d4977;
  --wood-light:#6a6592;
  --wood-dark: #211f3d;
  --sage:      #c8b0e0;
  --sage-deep: #b596d4;
  --sage-soft: #4a4570;
  --sun:       #f4d27a;
  --sun-soft:  #fce6a0;
  --sky:       #1d1b34;
  --blush:     #d8b8e0;
  --ink:       #f4ecd8;
  --ink-soft:  #c8c0d0;
  --shadow:    rgba(20, 18, 40, 0.4);
  --accent:    #b596d4;
}
.style-wishcore {
  --bg:        #fce6ee;
  --cream:     #fce6ee;
  --cream-soft:#fdf0f4;
  --cream-deep:#f4cfdc;
  --paper:     #fef5f8;
  --wood:      #d8a4b0;
  --wood-light:#e8c4cd;
  --wood-dark: #ad7480;
  --sage:      #f0b8c8;
  --sage-deep: #d484a0;
  --sage-soft: #f8d5e0;
  --sun:       #ffe6a8;
  --sun-soft:  #fff0c0;
  --sky:       #f8d8e6;
  --blush:     #f3c8d4;
  --ink:       #6a3848;
  --ink-soft:  #9a6878;
  --accent:    #d484a0;
}
.style-juminocore {
  --bg:        #e9efd6;
  --cream:     #e9efd6;
  --cream-soft:#f2f5e2;
  --cream-deep:#d8e0bc;
  --paper:     #f5f8e8;
  --wood:      #a89668;
  --wood-light:#c4b78e;
  --wood-dark: #6e6240;
  --sage:      #94b078;
  --sage-deep: #6c8a4e;
  --sage-soft: #c4d4a4;
  --sun:       #f4d27a;
  --sun-soft:  #fae6a8;
  --sky:       #c8d8b0;
  --blush:     #e6c89a;
  --ink:       #3e4a2a;
  --ink-soft:  #647050;
  --accent:    #6c8a4e;
}

/* =====================================================================
   Base
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 800px 500px at 18% 20%, rgba(255,235,180,0.45), transparent 60%),
    radial-gradient(ellipse 700px 600px at 82% 80%, rgba(168,196,162,0.20), transparent 60%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
button:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
ul { list-style: none; padding: 0; margin: 0; }
[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh; /* small viewport — fits when address bar is visible */
  height: 100dvh; /* dynamic — reflows as bar shows/hides on iPad/iPhone Safari */
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  overflow: hidden;
}

/* =====================================================================
   Topbar
   ===================================================================== */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(253, 248, 235, 0.90) 100%);
  border-bottom: 1px solid var(--cream-deep);
  box-shadow: 0 6px 20px -16px var(--shadow);
  position: relative;
  z-index: 10;
}

.title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}
.title-mark {
  font-size: 22px;
  color: var(--sage-deep);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.04));
}
.title-text { display: flex; align-items: baseline; gap: 8px; }
.title-text h1 {
  font-family: var(--font-hand);
  font-size: 34px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.title-sub {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink-soft);
}

.style-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.style-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 9px;
  border-radius: var(--radius-pill);
  background: var(--cream-soft);
  border: 1.5px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.2s ease;
  position: relative;
}
.style-chip:hover { background: var(--cream-deep); color: var(--ink); }
.style-chip.is-active {
  background: var(--paper);
  border-color: var(--sage-deep);
  color: var(--ink);
  box-shadow: 0 2px 8px -4px var(--shadow);
}
.style-chip .swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  background: var(--sage);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--shadow-soft);
}
.style-chip[data-style="natural"]   .swatch { background: linear-gradient(135deg, #c89668 0%, #a8c4a2 100%); }
.style-chip[data-style="celestial"] .swatch { background: linear-gradient(135deg, #2c2a4a 0%, #b596d4 100%); }
.style-chip[data-style="wishcore"]  .swatch { background: linear-gradient(135deg, #fce6ee 0%, #d484a0 100%); }
.style-chip[data-style="juminocore"].swatch { background: linear-gradient(135deg, #6c8a4e 0%, #c4b78e 100%); }

.glow-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: var(--cream-soft);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.glow-icon { color: var(--sun); font-size: 16px; }
.glow-text { letter-spacing: 0.3px; }
.glow-bar {
  display: inline-block;
  width: 110px;
  height: 8px;
  background: var(--cream-deep);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.glow-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sun-soft), var(--sun), var(--sage));
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.34, 1.3, 0.64, 1);
  box-shadow: 0 0 8px rgba(244, 210, 122, 0.6);
}
.glow-count { color: var(--ink); font-weight: 700; }
.glow-slash { color: var(--ink-soft); margin: 0 1px; font-weight: 400; }

/* =====================================================================
   Viewport (main stage)
   ===================================================================== */
.viewport {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(255,231,170,0.35), transparent 60%),
    radial-gradient(ellipse 500px 300px at 90% 95%, rgba(168,196,162,0.22), transparent 60%),
    var(--bg);
}

/* Ambient atmosphere */
.ambient {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.amb-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,232,170,0.55) 0%, transparent 35%),
    radial-gradient(circle at 78% 82%, rgba(168,196,162,0.18) 0%, transparent 40%);
}
.amb-leaves { position: absolute; inset: 0; }
.amb-leaves .leaf {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--leaf);
  opacity: 0.18;
  border-radius: 0 70% 0 70%;
  transform: rotate(35deg);
  filter: blur(0.5px);
  animation: drift 22s linear infinite;
}
.amb-leaves .l1 { top: 18%; left: -5%; animation-delay: 0s;  }
.amb-leaves .l2 { top: 32%; left: -5%; animation-delay: 5s;  width: 10px; height: 10px; }
.amb-leaves .l3 { top: 60%; left: -5%; animation-delay: 9s;  width: 16px; height: 16px; opacity: 0.14; }
.amb-leaves .l4 { top: 75%; left: -5%; animation-delay: 14s; width: 8px; height: 8px; }
.amb-leaves .l5 { top: 12%; left: -5%; animation-delay: 18s; width: 12px; height: 12px; opacity: 0.22; }
.amb-leaves .l6 { top: 48%; left: -5%; animation-delay: 11s; width: 11px; height: 11px; }
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(35deg); }
  50%  { transform: translate(60vw, 30px) rotate(70deg); }
  100% { transform: translate(120vw, 0) rotate(35deg); }
}

/* =====================================================================
   House view
   ===================================================================== */
.house-view {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 14px;
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.house-view.is-hidden {
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  pointer-events: none;
}

.house-frame {
  position: relative;
  /* Width = min of: design width, 94% of viewport, or what height allows */
  width: min(94vw, 1080px, calc((100vh  - var(--topbar-h) - 80px) * 1.6));
  width: min(94vw, 1080px, calc((100dvh - var(--topbar-h) - 80px) * 1.6));
  aspect-ratio: 16 / 10;
  background: var(--paper);
  border-radius: 24px;
  padding: 0;
  box-shadow:
    0 30px 60px -30px var(--shadow),
    0 4px 18px -10px var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.house-roof {
  position: relative;
  height: 56px;
  background:
    repeating-linear-gradient(135deg,
      var(--wood) 0 12px,
      var(--wood-light) 12px 24px);
  border-bottom: 3px solid var(--wood-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.house-roof::before, .house-roof::after {
  content: "";
  position: absolute;
  bottom: -3px;
  width: 0; height: 0;
  border-style: solid;
}
.house-roof::before {
  left: -1px;
  border-width: 0 0 56px 32px;
  border-color: transparent transparent var(--wood-dark) transparent;
}
.house-roof::after {
  right: -1px;
  border-width: 0 32px 56px 0;
  border-color: transparent var(--wood-dark) transparent transparent;
}
.roof-charm {
  font-size: 22px;
  color: var(--sun);
  text-shadow: 0 2px 0 rgba(74,63,53,0.18);
  z-index: 2;
}

.house-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: calc(100% - 56px - 22px);
  gap: 4px;
  padding: 4px;
  background: var(--wood-dark);
}
.room-cell {
  position: relative;
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.room-cell:hover { transform: scale(1.012); }
.room-cell:hover .room-cell-label { opacity: 1; transform: translateY(0); }
.room-cell svg { width: 100%; height: 100%; display: block; }
.room-cell-label {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(253, 248, 235, 0.94);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px -6px var(--shadow);
}
.room-cell.is-complete::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(244,210,122,0.30) 0%, transparent 70%);
  pointer-events: none;
  animation: glowSoft 4s ease-in-out infinite;
}
.room-cell .stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  transform: rotate(-12deg) scale(0);
  box-shadow: 0 4px 10px -4px var(--shadow);
  border: 2px solid var(--paper);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3;
}
.room-cell.is-complete .stamp { transform: rotate(-12deg) scale(1); }
@keyframes glowSoft {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.house-base {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22px;
  background: var(--wood-dark);
  border-top: 2px solid rgba(0,0,0,0.15);
}

.house-hint {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink-soft);
  margin: 0;
  letter-spacing: 0.5px;
}

/* =====================================================================
   Room view
   ===================================================================== */
.room-view {
  position: absolute;
  inset: 0;
  padding: 16px 16px 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.room-view.is-shown {
  opacity: 1;
  transform: scale(1);
}
/* Room stage scales to fit BOTH width and height while preserving aspect ratio.
   Width is the smaller of: 96% of parent, the 1080px design max,
   or (parent height × aspect) — the last one prevents vertical overflow. */
.room-stage {
  position: relative;
  width: min(96%, 1080px, calc((100vh  - var(--chrome-h)) * var(--aspect)));
  width: min(96%, 1080px, calc((100dvh - var(--chrome-h)) * var(--aspect)));
  aspect-ratio: 8 / 5.6;
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 30px 60px -28px var(--shadow),
    0 4px 16px -10px var(--shadow);
}
.room-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}
.room-stage .slot {
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.room-stage .slot:hover {
  filter: brightness(1.06) drop-shadow(0 4px 8px rgba(74,63,53,0.18));
}
.room-stage .slot.is-empty .ghost {
  animation: ghostPulse 2.4s ease-in-out infinite;
}
@keyframes ghostPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}
.room-stage .slot.is-cycling {
  animation: cyclePop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cyclePop {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* Sunbeam overlay (drawn in CSS, sits on top of room SVG) */
.room-stage .sunbeam {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255,232,170,0.55) 0%,
    rgba(255,232,170,0.18) 60%,
    rgba(255,232,170,0) 100%);
  filter: blur(1px);
  mix-blend-mode: screen;
  animation: sunPulse 6s ease-in-out infinite;
}
@keyframes sunPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Dappled leaf-shadow signature — drifts slowly across the floor */
.room-stage .leaf-shadows {
  position: absolute;
  pointer-events: none;
  inset: 0;
  overflow: hidden;
}
.room-stage .leaf-shadows::before,
.room-stage .leaf-shadows::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 60%;
  bottom: 0;
  left: 0;
  background-image:
    radial-gradient(ellipse 28px 18px at 10% 20%, rgba(74,63,53,0.10), transparent 60%),
    radial-gradient(ellipse 22px 14px at 28% 60%, rgba(74,63,53,0.08), transparent 60%),
    radial-gradient(ellipse 32px 20px at 45% 30%, rgba(74,63,53,0.09), transparent 60%),
    radial-gradient(ellipse 18px 12px at 60% 70%, rgba(74,63,53,0.07), transparent 60%),
    radial-gradient(ellipse 26px 16px at 78% 40%, rgba(74,63,53,0.10), transparent 60%),
    radial-gradient(ellipse 24px 14px at 90% 75%, rgba(74,63,53,0.08), transparent 60%),
    radial-gradient(ellipse 20px 12px at 5% 80%, rgba(74,63,53,0.09), transparent 60%),
    radial-gradient(ellipse 30px 18px at 38% 15%, rgba(74,63,53,0.08), transparent 60%);
  animation: leafDrift 28s linear infinite;
  mix-blend-mode: multiply;
}
.room-stage .leaf-shadows::after {
  animation-duration: 40s;
  animation-direction: reverse;
  opacity: 0.7;
  transform: translateY(8px);
}
@keyframes leafDrift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Bedroom-specific: cat blink */
.cat-eye { animation: catBlink 5s infinite; transform-origin: center; }
@keyframes catBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 98%      { transform: scaleY(0.1); }
}

/* Decor placement animation */
@keyframes decorPop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.92); }
  60%  { opacity: 1; transform: translateY(-2px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.room-stage .decor-anim { animation: decorPop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: center; transform-box: fill-box; }

/* Placed items (free placement) */
.room-stage .placed {
  cursor: grab;
  transition: filter 0.18s ease;
}
.room-stage .placed:hover { filter: drop-shadow(0 4px 6px rgba(74,63,53,0.18)); }
.room-stage .placed.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 12px 20px rgba(74,63,53,0.35)) brightness(1.04);
}
.room-stage .placed.is-selected .select-halo {
  animation: haloPulse 1.6s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Quokka */
.room-stage .quokka {
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
  transform-box: fill-box;
  transform-origin: center bottom;
}
.room-stage .quokka:hover { animation: quokkaHop 0.5s ease; }
.room-stage .quokka-eye { transform-box: fill-box; transform-origin: center; animation: quokkaBlink 5s infinite; }
@keyframes quokkaBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 98% { transform: scaleY(0.1); }
}
@keyframes quokkaHop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.room-stage .quokka-z {
  animation: zRise 3s ease-in-out infinite;
  transform-box: fill-box;
}
@keyframes zRise {
  0%   { opacity: 0; transform: translate(0, 0); }
  30%  { opacity: 1; transform: translate(-2px, -4px); }
  100% { opacity: 0; transform: translate(-8px, -16px); }
}

/* Speech bubble */
.room-stage .speech {
  pointer-events: none;
  animation: speechIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes speechIn {
  0% { opacity: 0; transform: translateY(6px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.room-stage .speech.is-leaving {
  animation: speechOut 0.3s ease forwards;
}
@keyframes speechOut {
  to { opacity: 0; transform: translateY(-6px); }
}

/* Drag ghost (when dragging from tray) */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 8px 16px rgba(74,63,53,0.35));
  transform: translate(-50%, -50%);
  opacity: 0.95;
}
.drag-ghost svg { width: 100%; height: 100%; }

/* Trash zone */
.trash-zone {
  position: absolute;
  bottom: 22px;
  right: 22px;
  width: 64px;
  height: 64px;
  background: var(--paper);
  border: 2px dashed var(--ink-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  z-index: 6;
  transition: all 0.2s ease;
  box-shadow: 0 6px 14px -8px var(--shadow);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
.trash-zone.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.trash-zone.is-hovered {
  background: #f4d4cc;
  border-style: solid;
  border-color: #c47a8a;
  transform: scale(1.1);
}
.trash-zone .trash-mouth { line-height: 1; }

/* Tray (rebuilt) */
.decor-tray {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 92%;
  max-height: 200px;
}
.tray-cats {
  display: flex;
  gap: 6px;
  padding: 0 6px;
  overflow-x: auto;
}
.tray-cat-tab {
  flex-shrink: 0;
  padding: 6px 12px 4px;
  border-radius: 12px 12px 0 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  border-bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tray-cat-tab.is-active {
  background: var(--cream-soft);
  color: var(--ink);
  border-color: var(--cream-deep);
}
.tray-cat-tab .cat-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--paper);
}
.tray-cat-tab.is-filled .cat-check { background: var(--sage-deep); }
.tray-items {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--cream-soft);
  border-radius: 14px;
  border: 1.5px solid var(--cream-deep);
  overflow-x: auto;
}
.tray-item {
  flex-shrink: 0;
  width: 86px;
  height: 86px;
  background: var(--paper);
  border-radius: 12px;
  border: 1.5px solid transparent;
  position: relative;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
  touch-action: none;
}
.tray-item:hover { border-color: var(--sage); }
.tray-item:active { cursor: grabbing; transform: scale(0.96); }
.tray-item svg { width: 78px; height: 78px; pointer-events: none; }
.tray-item.is-locked {
  background: var(--cream-deep);
  cursor: not-allowed;
  opacity: 0.65;
}
.tray-item.is-locked::after {
  content: "🔒";
  position: absolute;
  font-size: 20px;
  filter: grayscale(0.4);
}
.tray-item.is-locked svg { display: none; }
.tray-item-name {
  position: absolute;
  bottom: -16px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.tray-item:hover .tray-item-name { opacity: 1; }

/* Brief checklist */
.brief-panel .brief-checks {
  display: inline-flex;
  gap: 6px;
  margin-left: 6px;
}
.brief-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: var(--cream-deep);
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}
.brief-check.is-on {
  background: var(--sage);
  color: var(--paper);
  transform: scale(1.04);
}
.brief-check .check-mark { font-size: 11px; }

/* Naming dialog */
.dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74,63,53,0.25);
  backdrop-filter: blur(2px);
  z-index: 60;
  animation: dialogIn 0.3s ease;
}
@keyframes dialogIn { from { opacity: 0; } to { opacity: 1; } }
.dialog-card {
  background: var(--paper);
  border-radius: 22px;
  padding: 28px 32px 24px;
  width: min(380px, 90%);
  text-align: center;
  border: 1.5px solid var(--cream-deep);
  box-shadow: 0 30px 60px -20px var(--shadow);
  animation: welcomeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dialog-card h3 {
  font-family: var(--font-hand);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.dialog-card p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.5;
}
.dialog-quokka {
  width: 88px;
  height: 88px;
  margin: 0 auto 6px;
}
.dialog-quokka svg { width: 100%; height: 100%; display: block; }
.dialog-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink);
  background: var(--cream-soft);
  border: 1.5px solid var(--cream-deep);
  border-radius: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease;
  margin-bottom: 14px;
}
.dialog-input:focus { border-color: var(--sage-deep); }
.dialog-actions { display: flex; gap: 10px; justify-content: center; }
.dialog-btn {
  background: var(--cream-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--cream-deep);
  transition: all 0.2s ease;
}
.dialog-btn.is-primary {
  background: linear-gradient(135deg, var(--sage-deep), var(--sage));
  color: var(--paper);
  border-color: var(--sage-deep);
  box-shadow: 0 6px 14px -6px rgba(122,155,126,0.6);
}
.dialog-btn.is-primary:hover { transform: translateY(-1px); }
.dialog-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: -6px 0 14px;
}
.suggestion-chip {
  font-family: var(--font-hand);
  font-size: 16px;
  background: var(--cream-soft);
  color: var(--ink-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--cream-deep);
  transition: all 0.18s ease;
}
.suggestion-chip:hover { background: var(--sage-soft); color: var(--ink); }

/* Quokka name pill in topbar */
.pet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream-soft);
  border-radius: var(--radius-pill);
  padding: 4px 12px 4px 8px;
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink);
  margin-left: 8px;
}
.pet-pill .pet-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #9a6b3a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Transform toolbar (visible when an item is selected) */
.transform-bar {
  position: absolute;
  bottom: calc(var(--chrome-h) - 60px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--paper);
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-pill);
  padding: 4px 8px;
  box-shadow: 0 8px 18px -8px var(--shadow);
  z-index: 7;
  animation: txBarIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes txBarIn {
  0%   { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.92); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.tx-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ink);
  font-weight: 700;
  transition: all 0.18s ease;
  border: 1.5px solid transparent;
}
.tx-btn:hover { background: var(--sage-soft); border-color: var(--sage-deep); }
.tx-btn:active { transform: scale(0.92); }
.tx-btn.tx-trash { background: #f3d4cc; }
.tx-btn.tx-trash:hover { background: #e8b8a8; border-color: #c47a8a; }
.tx-btn.tx-reset { background: var(--cream-deep); font-size: 16px; }
.tx-meter {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
  min-width: 32px;
  text-align: center;
  padding: 0 4px;
}

@media (max-width: 900px) {
  .transform-bar { padding: 3px 6px; gap: 3px; bottom: calc(var(--chrome-h) - 50px); }
  .tx-btn { width: 32px; height: 32px; font-size: 16px; }
  .tx-meter { font-size: 10px; min-width: 28px; }
}

/* Help hint floats above the tray briefly */
.help-hint {
  position: absolute;
  left: 50%;
  bottom: 230px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  z-index: 5;
  pointer-events: none;
  animation: hintFade 6s ease-out forwards;
}
@keyframes hintFade {
  0%   { opacity: 0; transform: translateX(-50%) translateY(8px); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Room glow on completion */
.room-stage.is-glowing::after {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 28px;
  background: radial-gradient(ellipse at center, rgba(244,210,122,0.5) 0%, transparent 70%);
  pointer-events: none;
  animation: roomGlow 1.6s ease-out;
}
@keyframes roomGlow {
  0%   { opacity: 0; transform: scale(0.92); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.08); }
}

/* =====================================================================
   Brief panel + Decor tray + Back button
   ===================================================================== */
.brief-panel {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1.5px solid var(--cream-deep);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 20px -10px var(--shadow);
  z-index: 5;
  max-width: 90%;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.brief-panel .brief-icon {
  font-size: 16px;
  color: var(--sage-deep);
}
.brief-panel .brief-room {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.4px;
}
.brief-panel .brief-text {
  color: var(--ink-soft);
  font-weight: 500;
}
.brief-panel .brief-progress {
  display: inline-flex;
  gap: 4px;
  margin-left: 4px;
}
.brief-panel .brief-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cream-deep);
  transition: background 0.3s ease, transform 0.3s ease;
}
.brief-panel .brief-dot.is-on {
  background: var(--sage-deep);
  transform: scale(1.1);
}

.decor-tray {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1.5px solid var(--cream-deep);
  border-radius: 22px;
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  box-shadow: 0 14px 28px -14px var(--shadow);
  z-index: 5;
  max-width: 92%;
  flex-wrap: wrap;
  justify-content: center;
}
.tray-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px 6px;
  border-radius: 14px;
  background: var(--cream-soft);
  border: 1.5px solid transparent;
  min-width: 92px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.tray-slot:hover { background: var(--cream-deep); }
.tray-slot.is-active {
  background: var(--paper);
  border-color: var(--sage-deep);
  box-shadow: 0 4px 10px -6px var(--shadow);
}
.tray-slot.is-filled .tray-slot-name { color: var(--ink); }
.tray-slot-icon {
  font-size: 22px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tray-slot-label {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 700;
}
.tray-slot-name {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
  line-height: 1;
}

.back-button {
  position: absolute;
  top: 16px;
  left: 18px;
  background: var(--paper);
  border: 1.5px solid var(--cream-deep);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  z-index: 5;
  box-shadow: 0 4px 10px -6px var(--shadow);
  transition: all 0.2s ease;
}
.back-button:hover {
  background: var(--cream-soft);
  color: var(--ink);
  transform: translateX(-2px);
}

/* =====================================================================
   FX layer (sparkles, completion bursts)
   ===================================================================== */
.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, var(--sun-soft) 0%, var(--sun) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkleRise 1.4s ease-out forwards;
}
@keyframes sparkleRise {
  0%   { opacity: 0; transform: translateY(0) scale(0.4); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), -120px) scale(1.4); }
}

/* =====================================================================
   Portfolio
   ===================================================================== */
.portfolio {
  position: absolute;
  top: calc(var(--topbar-h) + 16px);
  right: 16px;
  z-index: 8;
}
.portfolio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  padding: 8px 14px 8px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--cream-deep);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: 0 4px 12px -6px var(--shadow);
  transition: all 0.2s ease;
}
.portfolio-toggle:hover { background: var(--cream-soft); color: var(--ink); }
.portfolio-icon { font-size: 16px; }

.portfolio-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 320px;
  background: var(--paper);
  border-radius: 18px;
  border: 1.5px solid var(--cream-deep);
  box-shadow: 0 24px 48px -20px var(--shadow);
  padding: 18px 20px 20px;
  background-image: linear-gradient(0deg, transparent 28px, rgba(168,196,162,0.08) 29px, transparent 30px);
  background-size: 100% 30px;
}
.portfolio-header {
  display: flex; justify-content: space-between; align-items: baseline;
}
.portfolio-panel h2 {
  font-family: var(--font-hand);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--ink);
}
.portfolio-close {
  font-size: 24px;
  color: var(--ink-soft);
  line-height: 1;
  padding: 0 4px;
}
.portfolio-tag {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.portfolio-stamps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stamp-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: var(--cream-soft);
  border: 1.5px dashed var(--cream-deep);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stamp-card.is-empty {
  color: var(--ink-soft);
  font-family: var(--font-hand);
  font-size: 18px;
  letter-spacing: 0.5px;
}
.stamp-card.is-filled {
  border: 1.5px solid var(--sage);
  background: var(--paper);
  box-shadow: 0 4px 10px -6px var(--shadow);
  animation: stampDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stamp-card svg { width: 100%; height: 100%; display: block; }
.stamp-card-name {
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(180deg, transparent, rgba(253,248,235,0.95));
  padding: 14px 4px 2px;
}
.stamp-card .stamp-mark {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--sage);
  color: var(--paper);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hand);
  font-size: 18px;
  font-weight: 700;
  transform: rotate(-12deg);
  box-shadow: 0 2px 4px -2px var(--shadow);
}
@keyframes stampDrop {
  0%   { transform: scale(0.6) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.06) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.portfolio-reward {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--sun-soft), var(--sage-soft));
  padding: 12px 14px;
  border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--ink);
  border: 1.5px solid var(--sun);
}
.portfolio-reward .reward-icon { font-size: 22px; color: var(--ink); }

/* =====================================================================
   Welcome overlay
   ===================================================================== */
.welcome {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 63, 53, 0.18);
  backdrop-filter: blur(2px);
  z-index: 50;
  transition: opacity 0.45s ease;
}
.welcome.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.welcome-card {
  background: var(--paper);
  border-radius: 24px;
  padding: 32px 36px 28px;
  width: min(420px, 90%);
  text-align: center;
  box-shadow: 0 30px 60px -20px var(--shadow), 0 4px 18px -8px var(--shadow);
  border: 1.5px solid var(--cream-deep);
  position: relative;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(244,210,122,0.18) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(168,196,162,0.18) 0%, transparent 40%);
  animation: welcomeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes welcomeIn {
  0%   { opacity: 0; transform: translateY(20px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.welcome-mark {
  position: relative;
  height: 60px;
  margin-bottom: 8px;
}
.welcome-sun {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--sun) 0%, var(--sun-soft) 60%, transparent 80%);
  border-radius: 50%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  animation: sunPulse 4s ease-in-out infinite;
}
.welcome-leaf {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--sage-deep);
  left: calc(50% + 12px);
  top: 8px;
  border-radius: 0 70% 0 70%;
  transform: rotate(35deg);
}
.welcome-card h2 {
  font-family: var(--font-hand);
  font-size: 38px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.welcome-blurb {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.welcome-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  background: var(--cream-soft);
  padding: 14px 18px;
  border-radius: 14px;
}
.welcome-list li {
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.welcome-list li span {
  color: var(--sage-deep);
  font-size: 15px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.welcome-go {
  background: linear-gradient(135deg, var(--sage-deep), var(--sage));
  color: var(--paper);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  box-shadow: 0 8px 18px -8px rgba(122,155,126,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.welcome-go:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px -8px rgba(122,155,126,0.7);
}
.welcome-credit {
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

/* =====================================================================
   Toast
   ===================================================================== */
.toast {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 24px -8px var(--shadow);
}
.toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hide the bottom hint when we're inside a room */
.viewport.in-room .house-hint { display: none; }

/* =====================================================================
   Responsive trims — keep chrome small so the room dominates the screen
   ===================================================================== */
@media (max-width: 900px) {
  :root {
    --topbar-h: 96px;
    --chrome-h: 290px; /* topbar 96 + tray ~150 + padding ~44 */
  }
  .topbar {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    padding: 6px 12px;
    gap: 4px 10px;
  }
  .title-block { grid-column: 1; grid-row: 1; }
  .glow-counter { grid-column: 2; grid-row: 1; }
  .style-selector { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .style-chip { padding: 4px 9px 4px 6px; font-size: 11px; gap: 6px; }
  .style-chip .swatch { width: 12px; height: 12px; }
  .glow-counter { padding: 5px 10px; gap: 6px; font-size: 11px; }
  .glow-bar { width: 56px; height: 7px; }
  .glow-text { display: none; }
  .pet-pill { font-size: 16px; padding: 2px 9px 2px 6px; margin-left: 4px; }
  .pet-pill .pet-icon { width: 18px; height: 18px; font-size: 10px; }
  .title-text h1 { font-size: 24px; }
  .title-sub { display: none; }
  .title-mark { font-size: 18px; }
  .portfolio { top: calc(var(--topbar-h) + 6px); right: 8px; }
  .portfolio-panel { width: min(280px, calc(100vw - 24px)); }
  .portfolio-toggle-label { display: none; }
  .portfolio-toggle { padding: 6px 9px; }
  .brief-panel { font-size: 12px; padding: 6px 10px; gap: 6px; max-width: calc(100% - 32px); flex-wrap: wrap; justify-content: center; top: 8px; }
  .brief-panel .brief-room { font-size: 16px; }
  .brief-check { padding: 2px 7px; font-size: 10px; }
  .decor-tray { padding: 6px; gap: 6px; bottom: 8px; max-height: 170px; }
  .tray-cat-tab { padding: 4px 9px 3px; font-size: 10px; }
  .tray-cat-tab .cat-check { width: 12px; height: 12px; font-size: 9px; }
  .tray-items { gap: 6px; padding: 6px; }
  .tray-item { width: 72px; height: 72px; }
  .tray-item svg { width: 64px; height: 64px; }
  .welcome-card { padding: 22px; max-height: 90vh; overflow-y: auto; }
  .welcome-card h2 { font-size: 28px; }
  .welcome-list { padding: 12px 16px; }
  .room-view { padding: 12px 12px 188px; }
  .house-frame { aspect-ratio: 4 / 3; }
  .back-button { top: 10px; left: 10px; padding: 6px 11px; font-size: 12px; }
  .trash-zone { width: 54px; height: 54px; bottom: 184px; right: 14px; font-size: 22px; }
}

/* Even tighter on short viewports — iPad landscape (height ≤ 820 or so) */
@media (max-height: 820px) and (max-width: 1280px) {
  :root { --chrome-h: 270px; }
  .decor-tray { max-height: 150px; }
  .tray-item { width: 64px; height: 64px; }
  .tray-item svg { width: 56px; height: 56px; }
  .room-view { padding: 12px 12px 170px; }
  .trash-zone { bottom: 168px; }
}

/* Very short — phone landscape, small iPad split-view */
@media (max-height: 600px) {
  :root { --topbar-h: 70px; --chrome-h: 220px; }
  .style-selector { display: none; } /* trade off: hide style picker to save vertical space */
  .topbar { grid-template-rows: auto; padding: 4px 10px; }
  .decor-tray { max-height: 130px; }
  .tray-item { width: 56px; height: 56px; }
  .tray-item svg { width: 48px; height: 48px; }
  .room-view { padding: 8px 8px 140px; }
  .trash-zone { bottom: 138px; width: 48px; height: 48px; font-size: 20px; }
  .brief-panel { padding: 4px 10px; font-size: 11px; }
  .brief-panel .brief-room { font-size: 14px; }
}
