/* ── Lamina visualizer — styles ─────────────────────────────────────────
   Tokens first (light palette on :root, dark via prefers-color-scheme and
   an explicit data-theme stamp), then layout, then components.            */

:root {
  --bg: #f8f7f3;
  --panel: #ffffff;
  --panel-2: #efede7;
  --panel-3: #e5e2da;
  --ink: #16181a;
  --ink-2: #565a5d;
  --ink-3: #6f7477;   /* AA on the panel for 11px text */
  --line: #e3e1da;
  --line-2: #cbc8bf;
  --accent: #a2512a;   /* burnt copper — the text-safe cousin of plyview.com's #cc7446 */
  --accent-ink: #ffffff;
  --accent-soft: rgba(162, 81, 42, 0.10);
  --shadow: 0 1px 2px rgba(20, 24, 22, 0.05), 0 10px 30px rgba(20, 24, 22, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 24, 22, 0.18);
  --stage-bg: #dfe3e1;
  --coach: rgba(22, 24, 26, 0.55);
  --font-display: 'Bricolage Grotesque', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-ui: 'Instrument Sans', 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 7px;
  --topbar-h: 56px;
  --surfacebar-h: 48px;
  --catalog-w: 336px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161614;
    --panel: #1f1f1c;
    --panel-2: #292926;
    --panel-3: #33332f;
    --ink: #efece6;
    --ink-2: #a7a39a;
    --ink-3: #8d897f;  /* AA on the dark panel (old value was 3.7:1) */
    --line: #34332f;
    --line-2: #45433e;
    --accent: #d9814f;
    --accent-ink: #1b0f07;
    --accent-soft: rgba(217, 129, 79, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
    --stage-bg: #0f1115;
    --coach: rgba(0, 0, 0, 0.66);
  }
}
:root[data-theme="dark"] {
  --bg: #161614;
  --panel: #1f1f1c;
  --panel-2: #292926;
  --panel-3: #33332f;
  --ink: #efece6;
  --ink-2: #a7a39a;
  --ink-3: #8d897f;  /* AA on the dark panel (old value was 3.7:1) */
  --line: #34332f;
  --line-2: #45433e;
  --accent: #d9814f;
  --accent-ink: #1b0f07;
  --accent-soft: rgba(217, 129, 79, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  --stage-bg: #0f1115;
  --coach: rgba(0, 0, 0, 0.66);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
img, canvas { display: block; max-width: 100%; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--panel-2); padding: 0.1em 0.4em; border-radius: 4px; }
kbd { background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 0.05em 0.45em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex: none; }
.ic { display: inline-flex; line-height: 0; }

/* ── Boot splash ─────────────────────────────────────────────────────── */
.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 18px; background: var(--bg); }
.boot-mark { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.28em; font-size: 22px; color: var(--ink); text-align: center; }
.boot-bar { width: 160px; height: 3px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 2px; animation: boot 1.1s ease-in-out infinite; }
@keyframes boot { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }
.boot-error { color: #b42318; max-width: 360px; text-align: center; }

/* ── Brand ───────────────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 22px; }
.brand-btn .brand-mark { font-size: 19px; }
.brand-sub { font-family: var(--font-display); font-weight: 500; color: var(--ink-2); letter-spacing: 0.04em; font-size: 13px; }
/* Uploaded logo (admin → Homepage) replaces the text mark. */
.brand-logo { max-height: 34px; max-width: 180px; width: auto; object-fit: contain; }
.brand-logo.small { max-height: 26px; max-width: 130px; }
.website-link { display: inline-flex; align-items: center; gap: 5px; }
.website-link .ext svg { width: 14px; height: 14px; }

/* ── Buttons & chips ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--panel-2); filter: none; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn.small { width: 30px; height: 30px; }
.chips { display: flex; gap: 6px; align-items: center; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll-x { overflow-x: auto; scrollbar-width: none; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--ink-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel-2); gap: 2px; }
.seg-btn { border: 0; background: transparent; color: var(--ink-2); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.seg-btn.dim:not(.on) { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.count-muted { color: var(--ink-3); font-weight: 500; font-size: 0.85em; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tag { font-family: var(--font-display); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.empty { color: var(--ink-2); padding: 18px 4px; }
.empty[data-reason="availability"] { display: grid; gap: 4px; padding: 16px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); font-size: 13px; }
.empty[data-reason="availability"] b { color: var(--ink); font-weight: 600; }
.empty[data-reason="availability"] .ic { color: var(--ink-3); margin-bottom: 2px; }
/* A search that matched nothing here but found designs in other rooms/areas:
   each hit is a shortcut that opens the room and applies the design. */
.empty[data-reason="filter"]:has(.empty-hits) { display: grid; gap: 4px; padding: 16px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: 13px; }
.empty[data-reason="filter"] b { color: var(--ink); font-weight: 600; }
.empty[data-reason="filter"] .ic { color: var(--ink-3); margin-bottom: 2px; }
.empty-hits { display: grid; gap: 6px; margin-top: 8px; }
.empty-hit { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.empty-hit:hover:not(:disabled) { border-color: var(--accent); }
.empty-hit:disabled { opacity: 0.55; cursor: default; }
.empty-hit .hit-name { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-hit .hit-where { margin-left: auto; font-size: 11px; color: var(--accent); white-space: nowrap; }

/* ── Landing ─────────────────────────────────────────────────────────── */
.landing { max-width: 1180px; margin: 0 auto; padding: 22px 28px 40px; min-height: 100%; display: flex; flex-direction: column; gap: 48px; }
.landing-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.nav-link:hover { color: var(--ink); }
.hero { max-width: 66ch; display: grid; gap: 12px; padding-top: 30px; }
/* Minimal landing: one line of copy, then straight into the rooms. */
.hero-min { max-width: 100%; padding-top: 6px; gap: 6px; }
.hero-min h1 { font-size: clamp(22px, 3.2vw, 34px); max-width: 30ch; }
.eyebrow { margin: 0; font-family: var(--font-display); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.06; letter-spacing: -0.018em; text-wrap: balance; }
.lede { margin: 4px 0 0; font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 64ch; }
.tabs { display: inline-flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.room-card {
  display: grid; gap: 0; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.room-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.room-thumb { aspect-ratio: 16 / 10; background: var(--panel-2); position: relative; display: grid; place-items: center; overflow: hidden; }
.room-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 1.6s ease-in-out infinite; }
.room-thumb.ready::after, .room-thumb:has(img.ready)::after { display: none; }
@keyframes shimmer { to { transform: translateX(100%); } }
.room-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.room-thumb img.ready { opacity: 1; }
.room-meta { padding: 14px 16px 16px; display: grid; gap: 4px; }
.room-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.room-meta h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.room-meta p { margin: 0; color: var(--ink-2); font-size: 13px; }
.room-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.room-count svg { width: 16px; height: 16px; }

.featured-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.featured-card {
  display: grid; gap: 6px; padding: 8px 8px 10px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.featured-swatch { width: 100%; aspect-ratio: 1; height: auto; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.featured-name { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.featured-id { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Where a searched design can be applied (shown only in search results). */
.featured-where { font-size: 11px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Landing-page catalogue search */
.find-search { min-width: 260px; flex: 0 1 340px; }
.find-status { margin: -8px 0 14px; font-size: 13px; color: var(--ink-2); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: grid; gap: 6px; align-content: start; }
.step-n { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.step h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 13.5px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stat { padding: 18px 22px; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-n { font-family: var(--font-display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-l { color: var(--ink-2); font-size: 13px; }

.landing-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-right { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.admin-link { color: var(--ink-3); text-decoration: none; border-bottom: 1px dotted var(--line-2); }
.admin-link:hover { color: var(--ink); border-bottom-color: var(--ink-3); }
/* Agency credit (white-label footer). */
.made-by { color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.made-by:hover { color: var(--ink); }
.made-by .heart { color: #c8323b; }

/* ── Landing hero (engine render + copy) ─────────────────────────────── */
.hero-vis { position: relative; border-radius: 18px; overflow: hidden; min-height: clamp(400px, 58vh, 640px); display: grid; align-items: end; background: #101214; isolation: isolate; box-shadow: var(--shadow-lg); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 62% 55%; animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
@media (prefers-reduced-motion: reduce) { .hero-img { animation: none; } }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,11,0.02) 0%, rgba(8,9,11,0.12) 40%, rgba(8,9,11,0.8) 100%), linear-gradient(90deg, rgba(8,9,11,0.42) 0%, rgba(8,9,11,0) 62%); }
.hero-copy { position: relative; padding: clamp(24px, 4vw, 46px); display: grid; gap: 14px; color: #f4efe6; max-width: 760px; }
.hero-copy .eyebrow { color: #86e3dd; }
.hero-copy h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 4.3vw, 52px); line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; text-shadow: 0 2px 28px rgba(0,0,0,0.4); }
.hero-actions .hero-ghost { color: #f4efe6; border-color: rgba(255,255,255,0.4); background: rgba(20,22,26,0.35); }
.hero-actions .hero-ghost:hover { background: rgba(255,255,255,0.14); }
.hero-stats { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.hero-stats li { display: grid; gap: 2px; }
.hero-stats b { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 11.5px; color: rgba(244,239,230,0.72); letter-spacing: 0.06em; text-transform: uppercase; }
/* No hero render on this deployment → a quiet panel with the same copy. */
.hero-vis.no-image { min-height: auto; background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
.hero-vis.no-image .hero-scrim { display: none; }
.hero-vis.no-image .hero-copy { color: var(--ink); }
.hero-vis.no-image .hero-copy .eyebrow { color: var(--accent); }
.hero-vis.no-image .hero-copy h1 { text-shadow: none; }
.hero-vis.no-image .hero-stats span { color: var(--ink-2); }
.hero-vis.no-image .hero-ghost { color: var(--ink); border-color: var(--line-2); background: transparent; }

/* Room cards carry engine renders (assets/shots/<room>.jpg) when present. */
.room-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }
.room-card { border-radius: 16px; }
.room-thumb img { transition: opacity 0.35s ease, transform 0.7s ease; }
.room-card:hover .room-thumb img { transform: scale(1.045); }

/* Day / night band */
.lights { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.light { position: relative; margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--panel-2); box-shadow: var(--shadow); }
.light img { width: 100%; height: 100%; object-fit: cover; }
.light figcaption { position: absolute; left: 14px; bottom: 12px; padding: 7px 13px; border-radius: 999px; background: rgba(8,9,11,0.62); color: #f4efe6; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
@media (max-width: 720px) { .lights { grid-template-columns: 1fr; } }

/* Real-scan swatches deserve room to breathe. */
.featured-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.featured-swatch { border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }

/* ── App frame ───────────────────────────────────────────────────────── */
.app { position: fixed; inset: 0; display: grid; grid-template-rows: var(--topbar-h) 1fr; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 8px 6px 4px; border-radius: 8px; cursor: pointer; }
.brand-btn:hover { background: var(--panel-2); }
.brand-btn .ic { color: var(--ink-2); }
.room-switch { position: relative; }
.room-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--panel); padding: 7px 10px 7px 14px; border-radius: 999px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.room-btn:hover { background: var(--panel-2); }
.menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 20; display: grid; }
.menu-item { display: grid; text-align: left; gap: 1px; padding: 9px 12px; border: 0; background: transparent; border-radius: var(--radius-sm); cursor: pointer; }
.menu-item:hover { background: var(--panel-2); }
.menu-item.on { background: var(--accent-soft); }
.menu-item.back { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); color: var(--ink-2); }
.menu-item.back .menu-name { display: inline-flex; align-items: center; gap: 8px; }
.menu-name { font-weight: 600; }
.menu-sub { font-size: 12px; color: var(--ink-3); text-transform: capitalize; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.workspace { display: grid; grid-template-columns: var(--catalog-w) 1fr; min-height: 0; transition: grid-template-columns 0.3s ease; }
/* Desktop: the catalogue column collapses to give the room the full width. */
.app.catalog-collapsed .workspace { grid-template-columns: 0 1fr; }
.app.catalog-collapsed .catalog { overflow: hidden; padding-left: 0; padding-right: 0; border-right-width: 0; }
.catalog-toggle[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }

/* ── Catalogue ───────────────────────────────────────────────────────── */
.catalog { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 8px; border-right: 1px solid var(--line); background: var(--panel); min-height: 0; min-width: 0; }
.catalog > :not(.swatches) { flex: none; }   /* only the swatch grid may shrink/scroll */
.sheet-grab { display: none; }
.sheet-close { display: none; }
.catalog-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.catalog-head { display: grid; gap: 8px; }
.catalog-head h2 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.catalog-sub { margin: -4px 0 0; color: var(--ink-2); font-size: 12.5px; }
.catalog-sub b { color: var(--accent); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--ink-3); }
.search input { flex: 1; border: 0; background: transparent; padding: 8px 0; color: var(--ink); outline: none; min-width: 0; }
.search:focus-within { border-color: var(--accent); color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px 10px; overflow-y: auto; padding: 2px 2px 12px; min-height: 0; align-content: start; scrollbar-width: thin; overscroll-behavior: contain; }
.swatch-card { position: relative; display: grid; gap: 3px; }
.swatch-btn { padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-sm); position: relative; }
.swatch-img { width: 100%; aspect-ratio: 1; height: auto; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); transition: transform 0.15s ease; object-fit: cover; }
.swatch-btn:hover .swatch-img { transform: scale(1.03); }
.swatch-card.applied .swatch-img { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.applied-badge { position: absolute; left: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: none; place-items: center; }
.applied-badge svg { width: 14px; height: 14px; }
.swatch-card.applied .applied-badge { display: grid; }
.heart-btn { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.9); color: #4b4741; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.heart-btn svg { width: 15px; height: 15px; }
.swatch-card:hover .heart-btn, .heart-btn.on, .heart-btn:focus-visible { opacity: 1; }
.heart-btn.on { color: #c8323b; }
/* Touch screens have no hover: an invisible heart button would still eat the
   tap that lands on it, which reads as "tapping the swatch does nothing". */
@media (hover: none) { .heart-btn { opacity: 1; } }
.swatch-name { font-size: 12.5px; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch-id { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ── Stage ───────────────────────────────────────────────────────────── */
.stage { position: relative; min-width: 0; min-height: 0; background: var(--stage-bg); overflow: hidden; }
.canvas-host { position: absolute; inset: 0; }
.canvas-host canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.canvas-host canvas:active { cursor: grabbing; }
.hover-label { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 3; }
.loading { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-2); background: var(--stage-bg); }
.loading-bar { width: 140px; height: 3px; background: color-mix(in srgb, var(--ink) 12%, transparent); border-radius: 2px; overflow: hidden; }
.room-notice { position: absolute; z-index: 6; top: 70px; left: 16px; right: 72px; max-width: 540px; padding: 14px; border-radius: 12px; background: var(--panel, #fff); color: var(--ink, #222); box-shadow: 0 4px 20px #0003; }
.room-notice button { margin-left: 12px; padding: 6px 12px; cursor: pointer; }
.room-notice[hidden] { display: none; }
.loading-bar span { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 2px; animation: boot 1.1s ease-in-out infinite; }
.toolbar { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.tool { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: background 0.15s, color 0.15s; }
.tool:hover { color: var(--ink); background: var(--panel-2); }
.tool.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tool svg { width: 20px; height: 20px; }
/* WhatsApp enquiry rides the tool rail in brand green so it reads instantly. */
.tool-wa { background: #25d366; border-color: #25d366; color: #fff; }
.tool-wa:hover { background: #1ebe5b; color: #fff; }
.applied-strip { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 3; max-width: min(440px, calc(100% - 90px)); }
.applied-strip:empty { display: none; }
.applied-swatch { width: 44px; height: 44px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); object-fit: cover; }
.applied-text { display: grid; line-height: 1.25; min-width: 0; }
.applied-surface { font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.applied-design { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.applied-meta { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hint { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); font-size: 12px; color: var(--ink-2); background: color-mix(in srgb, var(--panel) 78%, transparent); padding: 5px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; z-index: 2; backdrop-filter: blur(6px); transition: background 0.2s, color 0.2s; }
.hint.look { color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, color-mix(in srgb, var(--panel) 80%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }

/* ── Application-area bar (bottom of the stage) ──────────────────────── */
.areabar {
  /* Anchored between fixed insets and centred with auto margins so however
     many areas a room has, the bar shrinks-and-scrolls instead of sliding
     off-stage. (The WhatsApp enquiry lives in the tool rail now, so the
     bottom-right corner no longer needs reserving.) */
  position: absolute; left: 14px; right: 14px; bottom: 14px; margin-inline: auto; width: fit-content;
  /* max-width must equal the inset zone (100% − left − right): a larger cap
     over-constrains the box and the browser drops `right`. */
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 28px);
  padding: 8px 12px; border-radius: 16px; z-index: 4;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); backdrop-filter: blur(10px);
}
.areabar-label { font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.area-chips { display: flex; gap: 6px; align-items: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.area-chips::-webkit-scrollbar { display: none; }
.area-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.area-btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.area-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 45%, transparent); }
.area-swatch { width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); object-fit: cover; flex: none; }
.area-swatch-ph { background: var(--panel-3); display: inline-block; }

/* ── WhatsApp enquiry ────────────────────────────────────────────────── */
.wa-action { color: #178046; border-color: color-mix(in srgb, #178046 45%, transparent); }
.wa-action:hover { background: color-mix(in srgb, #178046 12%, transparent); }

/* ── Portrait rotate tip ─────────────────────────────────────────────── */
.rotate-tip {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 9px; max-width: calc(100% - 20px);
  padding: 7px 8px 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); backdrop-filter: blur(8px);
}
.rotate-tip .rotate-ic { color: var(--accent); }
.rotate-tip .rotate-ic svg { width: 18px; height: 18px; }
.rotate-text { font-size: 12.5px; font-weight: 500; }
.rotate-tip .btn.small { padding: 5px 11px; font-size: 12px; }

/* ── Coach overlay ───────────────────────────────────────────────────── */
.coach { position: fixed; inset: 0; z-index: 40; background: var(--coach); opacity: 0; transition: opacity 0.25s; cursor: pointer; }
.coach.on { opacity: 1; }
.callout { position: absolute; width: 280px; background: var(--panel); color: var(--ink); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); display: grid; gap: 4px; }
.callout::before { content: ''; position: absolute; left: -8px; top: 18px; border: 8px solid transparent; border-right-color: var(--panel); border-left: 0; }
.callout-step { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.callout p { margin: 0; font-size: 13.5px; }
.coach-dismiss { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); color: #fff; font-size: 13px; opacity: 0.8; margin: 0; }

/* ── Modals & toasts ─────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 8, 0.5); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity 0.2s; }
.modal-backdrop.on { opacity: 1; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); background: var(--panel); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; transform: translateY(6px); transition: transform 0.2s; }
.modal-backdrop.on .modal { transform: none; }
.modal.wide { width: min(840px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.shortlist-grid { display: grid; gap: 10px; }
.sl-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.sl-swatch { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.sl-text { display: grid; gap: 2px; }
.sl-text span { color: var(--ink-3); font-size: 12px; }
.sl-actions { display: flex; align-items: center; gap: 6px; }
.snap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.snap-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.snap-side h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 15px; }
.snap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.snap-list li { display: grid; gap: 2px; }
.snap-surface { font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.snap-design { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.help-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.help-tips { margin: 16px 0 0; color: var(--ink-2); font-size: 12.5px; }
.quality { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.quality-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quality-head b { font-weight: 600; }
.quality-note { margin: 0; color: var(--ink-3); font-size: 12px; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; white-space: nowrap; }
.toast.on { opacity: 1; transform: none; }
.toast-ic { display: inline-flex; color: var(--accent); }
.toast-ic svg { width: 16px; height: 16px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .landing { padding: 16px 16px 32px; gap: 28px; }
  .hero { padding-top: 6px; }
  .section-head { margin-bottom: 14px; }
  .featured-list { display: flex; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; }
  .featured-card { flex: 0 0 132px; scroll-snap-align: start; }

  /* The catalogue becomes a bottom sheet over the stage: the room keeps the
     whole screen and the canvas never resizes when the sheet opens. */
  .workspace { grid-template-columns: 1fr; }
  .catalog {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    max-height: min(62vh, 520px); border-right: 0; border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg);
    transform: translateY(102%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.25, 1);
    gap: 10px; padding-top: 6px; padding-bottom: max(8px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  /* The swatch grid must never be squeezed out by the filters above it. */
  .swatches { min-height: 150px; }
  .app.sheet-open .catalog { transform: none; }
  .sheet-grab { display: grid; place-items: center; padding: 2px 0 0; }
  .sheet-grab span { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
  .sheet-close { display: inline-grid; }
  .catalog-sub { display: block; margin-top: -2px; }
  .chips.wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips.wrap::-webkit-scrollbar { display: none; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }

  .hint { display: none; }
  .applied-strip { display: none; }   /* the sheet + area bar carry the same info */
  .areabar { bottom: max(10px, env(safe-area-inset-bottom)); left: 8px; right: 8px; padding: 6px 10px; border-radius: 14px; }
  .areabar-label { display: none; }
  .area-btn { padding: 7px 12px 7px 7px; font-size: 12.5px; }
  .toolbar { top: 10px; right: 10px; }
  .tool { width: 38px; height: 38px; }

  .snap { grid-template-columns: 1fr; }
  .topbar-right .btn span:not(.ic):not(.count) { display: none; }
  .topbar-right .btn { padding: 6px 10px; }
  .brand-btn .brand-mark { display: none; }
  .brand-btn .brand-logo { max-height: 22px; max-width: 90px; }
  .sl-item { grid-template-columns: 56px 1fr; }
  .sl-swatch { width: 56px; height: 56px; }
  .sl-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .quality-head { align-items: flex-start; flex-direction: column; }
}
/* Landscape phones: chrome shrinks so the room gets the height, and the
   catalogue becomes a right-side drawer — a bottom sheet would cover the
   whole room, so applying a laminate would happen invisibly.
   This block must stand alone: 861–1000 px landscape phones (Pixel Pro,
   S-Ultra, iPhone Pro Max) never enter the ≤860 px sheet block, so all the
   fixed-drawer plumbing is declared here too. The width/height pair below is
   half of COMPACT_MQ in src/main.js — change the two together. */
@media (max-width: 1000px) and (max-height: 500px) {
  :root { --topbar-h: 46px; --drawer-w: min(320px, 44vw); }
  .toolbar { flex-direction: row; top: 8px; right: 8px; gap: 5px; }
  .tool { width: 36px; height: 36px; border-radius: 9px; }
  .tool svg { width: 18px; height: 18px; }
  .workspace { grid-template-columns: 1fr; }
  .areabar { bottom: 8px; left: 8px; right: 8px; }
  .hint { display: none; }
  .applied-strip { display: none; }

  .catalog {
    position: fixed; z-index: 30;
    left: auto; right: 0; top: var(--topbar-h); bottom: 0;
    width: var(--drawer-w); max-height: none;
    border-radius: 14px 0 0 14px; border-top: 0; border-right: 0; border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg); overscroll-behavior: contain;
    transform: translateX(103%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.25, 1);
    padding-top: 10px; padding-bottom: 10px;
  }
  .app.sheet-open .catalog { transform: none; }
  .sheet-grab { display: none; }
  .sheet-close { display: inline-grid; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); min-height: 100px; }

  /* With the drawer open, everything floating on the stage slides left so it
     stays visible and tappable beside it. */
  /* max-width must equal the inset zone (see the base rule): with `none` the
     fit-content box over-constrains and the browser drops `right`, so the
     bar grows to its content and runs under the drawer. */
  .app.sheet-open .areabar { left: 8px; right: calc(var(--drawer-w) + 8px); transform: none; max-width: calc(100% - var(--drawer-w) - 16px); justify-content: flex-start; }
  .app.sheet-open .toolbar { right: calc(var(--drawer-w) + 8px); }
  .app.sheet-open .rotate-tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Landing: the "Gallery" system (shared with plyview.com) ─────────── */
.landing { max-width: 1240px; padding: 26px 32px 48px; gap: 76px; }
.brand-sub { font-family: var(--font-ui); color: var(--ink-3); font-size: 13.5px; }
.landing-nav .btn.small { background: var(--ink); border-color: var(--ink); color: var(--bg); padding: 8px 16px; }
.landing-nav .btn.small:hover { filter: none; background: var(--ink-2); border-color: var(--ink-2); }
/* Copy on the paper, the render as a slab beside it, the stats card on the
   slab's foot: the card is positioned against the hero grid, so the copy
   block must not be a positioned ancestor. */
.hero-vis { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; column-gap: 40px; min-height: 0; background: transparent; border-radius: 0; box-shadow: none; overflow: visible; isolation: auto; }
.hero-img { position: relative; grid-column: 2; grid-row: 1; width: 100%; height: 100%; min-height: 560px; border-radius: 28px; object-fit: cover; animation: none; box-shadow: var(--shadow-lg); }
.hero-scrim { display: none; }
.hero-copy { position: static; grid-column: 1; grid-row: 1; z-index: 1; color: var(--ink); padding: 0; max-width: none; gap: 20px; }
.hero-copy .eyebrow { color: var(--accent); font-family: var(--font-ui); letter-spacing: 0.18em; }
.hero-copy h1 { font-size: clamp(36px, 4.7vw, 64px); font-weight: 600; line-height: 0.96; letter-spacing: -0.035em; text-shadow: none; max-width: 12ch; font-variation-settings: "opsz" 96, "wdth" 100; }
.hero-actions .btn { padding: 12px 22px; font-size: 15px; }
.hero-actions .hero-ghost { color: var(--ink); border-color: var(--line-2); background: var(--panel); }
.hero-actions .hero-ghost:hover { background: var(--panel-2); }
.hero-stats { position: absolute; left: 47%; bottom: -30px; width: max-content; margin: 0; padding: 18px 26px; gap: 34px; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-lg); }
.hero-stats b { font-size: 28px; color: var(--ink); font-weight: 600; }
.hero-stats span { color: var(--ink-3); }
.hero-vis.no-image { grid-template-columns: 1fr; }
.hero-vis.no-image .hero-copy { padding: clamp(24px, 4vw, 46px); }
.hero-vis.no-image .hero-stats { position: static; width: auto; padding: 0; background: transparent; box-shadow: none; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.tabs { border-bottom: 0; gap: 16px; }
.tabs button { padding: 6px 2px; font-size: 14px; font-weight: 500; }
/* Two large rooms, then a row of three. */
.room-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 22px; }
.room-card { grid-column: span 2; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.room-card:nth-child(-n + 2) { grid-column: span 3; }
.room-card:hover { transform: none; box-shadow: none; }
.room-thumb { border-radius: 20px; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.room-card:nth-child(-n + 2) .room-thumb { aspect-ratio: 16 / 10; }
.room-card:hover .room-thumb img { transform: scale(1.04); }
.room-meta { padding: 14px 4px 0; gap: 4px; }
.room-meta h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.room-meta p { font-size: 13.5px; color: var(--ink-2); }
.tag { color: var(--ink-3); }
.lights { gap: 22px; }
.light { border-radius: 20px; }
.light figcaption { background: var(--panel); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.landing-foot { padding-top: 26px; }
@media (max-width: 860px) {
  .landing { padding: 20px 20px 40px; gap: 56px; }
  .hero-vis { grid-template-columns: 1fr; row-gap: 24px; }
  .hero-img { grid-column: 1; grid-row: 2; min-height: 320px; border-radius: 20px; }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-stats { position: static; width: auto; padding: 0; margin-top: 4px; background: transparent; box-shadow: none; border-radius: 0; gap: 24px; }
  .room-card, .room-card:nth-child(-n + 2) { grid-column: span 3; }
}
@media (max-width: 560px) {
  .room-card, .room-card:nth-child(-n + 2) { grid-column: span 6; }
}

/* ── embedded room (?embed=1): the canvas alone, for the marketing hero ─── */
body.embed { background: transparent; }
body.embed .app { grid-template-rows: 1fr; background: transparent; }
body.embed .workspace { grid-template-columns: 1fr; }
body.embed .topbar, body.embed .catalog, body.embed .toolbar, body.embed .areabar, body.embed .hint,
body.embed .applied-strip, body.embed .rotate-tip, body.embed .hover-label, body.embed .loading,
body.embed .room-notice, body.embed .boot, body.embed .coach, body.embed .toasts, body.embed .landing { display: none !important; }

/* ── 2026-11 UX pass ─────────────────────────────────────────────────── */
/* Names read in full: two lines instead of a clipped one. */
.swatch-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* The tool rail is icons only, so each one names itself at once on hover or
   keyboard focus (the native title tooltip takes over a second to appear). */
.tool { position: relative; }
@media (hover: hover) {
  .tool:hover::after, .tool:focus-visible::after {
    content: attr(title); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
    padding: 5px 9px; border-radius: 7px; background: var(--ink); color: var(--bg);
    font: 500 12px/1.2 var(--font-ui); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow);
  }
}
/* First visit: one quiet pointer on the room instead of a dimmed tour. */
.coach.soft { background: transparent; pointer-events: none; cursor: default; }
.coach.soft .callout { width: 250px; border: 1px solid var(--accent); }
/* Fingers need more than a mouse does. */
@media (pointer: coarse) {
  .heart-btn { width: 34px; height: 34px; top: 3px; right: 3px; }
  .heart-btn svg { width: 17px; height: 17px; }
}
@media (max-width: 860px) and (min-height: 501px) {
  /* The sheet takes the lower part of the screen only, with the shades in one
     sideways row, so the surface being changed stays in view above it. */
  .catalog { max-height: min(46vh, 400px); gap: 8px; }
  .swatches { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; min-height: 0; flex: none; padding: 4px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .swatches::-webkit-scrollbar { display: none; }
  .swatch-card { flex: 0 0 96px; scroll-snap-align: start; }
  .tool { width: 42px; height: 42px; }
  /* The tip sits beside the tool rail, not under it, and wraps to two lines at most. */
  .rotate-tip { left: 10px; right: 62px; top: 10px; transform: none; max-width: none; border-radius: 14px; padding: 8px 8px 8px 12px; }
  .rotate-text { flex: 1; line-height: 1.3; }
  .rotate-tip .btn.small { padding: 8px 12px; }
}

/* Guest (no lead form yet): the other rooms carry a lock note on the landing page. */
.room-card.locked .room-thumb::after {
  content: "Unlock with your email"; position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--ink); font-size: 12px; font-weight: 600; backdrop-filter: blur(6px);
}
.room-card.locked .room-thumb { position: relative; }
@media (max-width: 860px) { .guest-unlock { padding: 6px 10px; font-size: 12px; } }
