:root {
  --ivory: #f5f1ea;
  --paper: #fbf9f5;
  --ink: #1c1915;
  --ink-2: #3a342d;
  --mute: #8b8279;
  --line: #e4ddd2;
  --brass: #a8784f;
  --brass-soft: #f1e6da;
  --ok: #3d6b55;
  --danger: #b42318;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 15px/1.65 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.demo-banner { background: #1c1915; color: #e9dcc8; font-size: 12px; padding: 7px 16px; text-align: center; }
.demo-banner code { background: rgba(255,255,255,.12); padding: 0 5px; border-radius: 4px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 40px); background: rgba(245, 241, 234, .86); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(28, 25, 21, .06);
}
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 14px; }
.nav-links { display: flex; align-items: center; gap: clamp(8px, 2vw, 22px); font-size: 14px; }
.nav-links > a:not(.btn) { text-decoration: none; color: var(--ink-2); }
@media (max-width: 640px) { #nav-guest > a:not(.btn), #nav-guest > .btn-text { display: none; } }
.tier { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.tier.pro { background: var(--ink); color: #e9cf9f; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 24px; border: 1px solid transparent; font-weight: 600; text-decoration: none; letter-spacing: .5px; transition: transform .15s, background .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.small { padding: 7px 16px; font-size: 13px; }
.btn.block { width: 100%; padding: 15px 24px; font-size: 16px; }
.btn-text { background: none; border: 0; padding: 4px 0; color: var(--brass); text-decoration: none; font-size: 14px; }
.btn-text.light { color: #fff; opacity: .9; }
.btn-text.small { font-size: 13px; }

.eyebrow { font-size: 12px; letter-spacing: 4px; color: rgba(255,255,255,.8); margin: 0 0 14px; }
.eyebrow.dark { color: var(--brass); }
.muted { color: var(--mute); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: .5px; }

/* ---------- hero ---------- */
.hero { position: relative; height: min(88vh, 820px); min-height: 560px; overflow: hidden; background: #2a241e; }
.compare { position: absolute; inset: 0; --pos: 46%; cursor: ew-resize; user-select: none; touch-action: pan-y; }
.compare img { width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-before img { filter: grayscale(1) sepia(.12) brightness(1.18) contrast(.72) blur(.4px); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: rgba(255,255,255,.9); transform: translateX(-1px); }
.compare-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; color: var(--ink); font-size: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.compare-tag { position: absolute; top: 24px; font-size: 12px; letter-spacing: 2px; color: #fff; background: rgba(0,0,0,.35); padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.compare-tag.left { left: 24px; } .compare-tag.right { right: 24px; }
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 120px clamp(20px, 6vw, 72px) clamp(32px, 6vw, 64px);
  background: linear-gradient(to top, rgba(18, 14, 10, .78), rgba(18, 14, 10, .35) 55%, transparent); color: #fff; pointer-events: none;
}
.hero-copy > * { pointer-events: auto; max-width: 640px; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.15; margin: 0 0 16px; }
.lead { font-size: clamp(15px, 1.6vw, 18px); opacity: .9; margin: 0 0 28px; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 110px) clamp(16px, 4vw, 40px); max-width: 1240px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(26px, 3.6vw, 40px); margin: 0 0 8px; }

.gallery { columns: 3 280px; column-gap: 16px; }
.style-card { position: relative; break-inside: avoid; margin: 0 0 16px; border-radius: var(--r); overflow: hidden; cursor: pointer; background: #ddd; }
.style-card img { width: 100%; transition: transform .6s ease; }
.style-card:nth-child(3n+1) img { aspect-ratio: 4 / 5; object-fit: cover; }
.style-card:nth-child(3n+2) img { aspect-ratio: 4 / 3; object-fit: cover; }
.style-card:nth-child(3n) img { aspect-ratio: 1; object-fit: cover; }
.style-card:hover img { transform: scale(1.04); }
.style-card figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.62), transparent); }
.style-card b { display: block; font-family: var(--serif); font-size: 19px; letter-spacing: 1px; }
.style-card small { opacity: .85; font-size: 12px; }
.style-card .use { position: absolute; top: 14px; right: 14px; font-size: 12px; background: rgba(255,255,255,.92); color: var(--ink); padding: 4px 12px; border-radius: 999px; opacity: 0; transform: translateY(-4px); transition: .25s; }
.style-card:hover .use { opacity: 1; transform: none; }

.how { border-top: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 36px); }
.how-visual { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--paper); border: 1px solid var(--line); margin-bottom: 18px; }
.how-visual img { width: 100%; height: 100%; object-fit: cover; }
.how-visual.plan img { object-fit: contain; padding: 10px; background: #fff; }
.bom-preview { padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; font-size: 14px; }
.bom-preview div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.bom-preview .sum { border: 0; padding-top: 4px; font-family: var(--serif); font-size: 17px; }
.bom-preview .sum b { color: var(--brass); }
.how-num { font-family: var(--serif); color: var(--brass); font-size: 14px; letter-spacing: 2px; }
.how h3 { font-size: 21px; margin: 4px 0 6px; }
.how p { color: var(--mute); margin: 0; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.price-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 22px; }
.price-card h3 { margin: 0; font-size: 18px; }
.price-card .amount { font-family: var(--serif); font-size: 36px; font-weight: 700; margin: 8px 0 14px; }
.price-card .amount small { font-size: 14px; color: var(--mute); }
.price-card ul { margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.price-card li::before { content: "—"; color: var(--brass); margin-right: 8px; }
.price-card.featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.price-card.featured ul { color: #d9cfc2; }
.ribbon { position: absolute; top: 18px; right: 18px; font-size: 11px; letter-spacing: 1px; color: #e9cf9f; border: 1px solid #e9cf9f; padding: 2px 10px; border-radius: 999px; }

.start-card { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(60, 40, 20, .25); }
@media (max-width: 760px) { .start-card { grid-template-columns: 1fr; } .start-art { max-height: 220px; } }
.start-art img { width: 100%; height: 100%; object-fit: cover; }
.start-form { padding: clamp(24px, 4vw, 48px); }
.start-form h2 { font-size: 28px; margin: 0 0 4px; }
.start-form .muted b { color: var(--brass); }
.picked { font-size: 13px; background: var(--brass-soft); color: var(--brass); padding: 8px 12px; border-radius: 10px; }

.field { display: block; margin-bottom: 14px; }
.field span, .code-row label span { display: block; font-size: 13px; color: var(--mute); margin-bottom: 6px; }
input, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28,25,21,.06); }
textarea { resize: vertical; }
.code-row { display: flex; gap: 10px; align-items: flex-end; }
.code-row label { flex: 1; }
.code-row .btn { height: 48px; flex: none; padding: 0 18px; }
.agree { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mute); margin: 4px 0 18px; }
.agree input { width: auto; }

/* ---------- workspace ---------- */
.workspace { display: grid; grid-template-columns: 380px 1fr; gap: 24px; max-width: 1400px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px); align-items: start; }
@media (max-width: 960px) { .workspace { grid-template-columns: 1fr; } }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 20px; position: sticky; top: 76px; }
@media (max-width: 960px) { .panel { position: static; } }
.group { margin-bottom: 18px; }
.label { font-size: 12px; letter-spacing: 2px; color: var(--mute); margin-bottom: 8px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--ivory); padding: 4px; border-radius: 999px; margin-bottom: 18px; }
.tab { border: 0; background: none; padding: 9px; border-radius: 999px; font-size: 14px; color: var(--mute); }
.tab.active { background: var(--ink); color: var(--paper); }
.dropzone { display: grid; place-items: center; min-height: 140px; border: 1px dashed #cfc3b3; border-radius: 14px; background: #fff; cursor: pointer; overflow: hidden; }
.dropzone img { width: 100%; max-height: 240px; object-fit: contain; }
.dz-empty { display: grid; justify-items: center; color: var(--mute); font-size: 14px; }
.dz-empty small { font-size: 12px; }
.dz-plus { font-size: 26px; line-height: 1; color: var(--brass); margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.style-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.style-pick { border: 0; padding: 0; background: none; text-align: center; font-size: 12px; color: var(--ink-2); }
.style-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.style-pick.active img { outline-color: var(--ink); }
.style-pick span { display: block; margin-top: 4px; }
.fineprint { font-size: 12px; color: var(--mute); text-align: center; margin: 10px 0 0; }

.stage { min-width: 0; }
.canvas { position: relative; border-radius: 22px; overflow: hidden; background: #e9e3da; aspect-ratio: 3 / 2; box-shadow: 0 30px 80px -40px rgba(40, 25, 10, .45); }
.canvas > img { width: 100%; height: 100%; object-fit: cover; animation: reveal .9s ease; }
@keyframes reveal { from { opacity: 0; filter: blur(14px); transform: scale(1.02); } to { opacity: 1; filter: none; transform: none; } }
.canvas-empty { position: absolute; inset: 0; }
.canvas-empty img { width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: grayscale(.4); }
.canvas-empty-copy { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 20px; }
.canvas-empty h2 { font-size: clamp(20px, 2.6vw, 30px); margin: 0 0 6px; }
.canvas-empty p { color: var(--ink-2); margin: 0; }
.ai-badge { position: absolute; right: 2%; bottom: 3%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 6px; letter-spacing: 1px; }
.demo-mark { position: absolute; left: 2%; top: 3%; background: rgba(255,255,255,.88); color: var(--ink-2); font-size: 11px; padding: 3px 10px; border-radius: 999px; }

.generating { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: linear-gradient(110deg, #e9e3da 30%, #f4efe7 50%, #e9e3da 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.generating .stage-text { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px); margin-bottom: 14px; }
.generating ol { list-style: none; padding: 0; margin: 0 auto; display: flex; gap: 8px; justify-content: center; }
.generating li { width: 34px; height: 4px; border-radius: 4px; background: rgba(28,25,21,.12); }
.generating li.done { background: var(--ink); }
.generating li.doing { background: var(--brass); animation: pulse 1s ease infinite alternate; }
@keyframes pulse { to { opacity: .4; } }

.meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 2px 0; }
.meta .prompt { font-family: var(--serif); font-size: 17px; }
.meta .sub { color: var(--mute); font-size: 13px; }
.meta .actions { display: flex; gap: 8px; flex-wrap: wrap; }

details.bom { margin-top: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
details.bom summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--serif); font-size: 17px; font-weight: 700; }
details.bom summary::-webkit-details-marker { display: none; }
details.bom summary .total { color: var(--brass); }
details.bom summary .toggle { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--mute); }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--mute); font-weight: 500; white-space: nowrap; }
td.qty { font-weight: 600; white-space: nowrap; }
td.price { white-space: nowrap; }
tr.total td { font-weight: 700; border-bottom: 0; font-size: 14px; }
.note { font-size: 12px; color: var(--mute); margin: 10px 0 0; }

.history-wrap { margin-top: 26px; }
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.history button { border: 0; padding: 0; background: none; text-align: left; }
.history img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; transition: opacity .15s; }
.history button:hover img { opacity: .85; }
.history span { display: block; font-size: 12px; color: var(--mute); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 15, 10, .5); backdrop-filter: blur(4px); display: grid; align-items: end; justify-items: center; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--paper); border-radius: 22px 22px 0 0; padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .modal { align-items: center; } .sheet { border-radius: 22px; } }
.sheet h2 { margin: 0 0 4px; font-size: 24px; }
.close { position: absolute; right: 14px; top: 12px; border: 0; background: none; font-size: 28px; color: var(--mute); line-height: 1; }
.plans { display: grid; gap: 10px; margin: 18px 0; }
.plan { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; }
.plan small { display: block; color: var(--mute); font-size: 12px; }
.plan span { font-family: var(--serif); font-size: 24px; font-weight: 700; white-space: nowrap; }
.plan span i { font-style: normal; font-size: 12px; color: var(--mute); }
.plan.featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan.featured small { color: #cfc4b6; }
.redeem-row { display: flex; gap: 8px; margin-top: 14px; }
.redeem-row .btn { flex: none; }
.ledger-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger-row small { color: var(--mute); display: block; font-size: 12px; }
.ledger-row .plus { color: var(--ok); font-weight: 700; text-align: right; }
.ledger-row .minus { color: var(--danger); font-weight: 700; text-align: right; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: rgba(28, 25, 21, .94); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; max-width: calc(100% - 32px); }

.footer { text-align: center; color: var(--mute); font-size: 12px; padding: 28px 16px 36px; border-top: 1px solid var(--line); }
.footer p { margin: 3px 0; }
.footer a { text-decoration: none; }

/* ---------- guest trial / filters ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -12px 0 26px; }
.filters .chip { padding: 6px 16px; font-size: 14px; }
.style-card .tag { position: absolute; top: 14px; left: 14px; font-size: 12px; color: #fff; background: rgba(0,0,0,.4); backdrop-filter: blur(6px); padding: 3px 10px; border-radius: 999px; }
.guest-tip { font-size: 13px; background: var(--brass-soft); color: var(--brass); padding: 9px 12px; border-radius: 12px; margin-bottom: 14px; }
.guest-tip b { font-size: 15px; }
.small-note { font-size: 13px; margin-top: 14px; text-align: center; }
.start-form { display: flex; flex-direction: column; justify-content: center; }
.start-form .btn.block { margin-top: 18px; }
#member-actions { display: inline-flex; gap: clamp(8px, 2vw, 22px); align-items: center; }
#auth-sub b { color: var(--brass); }
#auth-modal .sheet { max-width: 440px; }
#auth-modal h2 { margin-bottom: 4px; }
#auth-modal .muted { margin: 0 0 18px; }

/* =================== v3: whole-house customization =================== */
.lead.dark { color: var(--ink-2); opacity: 1; }
.small-note.left { text-align: left; }
.center { text-align: center; }

/* hero */
.hero2 { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1240px; margin: 0 auto; padding: clamp(36px, 7vw, 96px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 72px); }
@media (max-width: 880px) { .hero2 { grid-template-columns: 1fr; } }
.hero2 h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.18; margin: 0 0 18px; }
.hero2-visual { position: relative; display: grid; grid-template-columns: 1fr auto 1.25fr; align-items: center; gap: 14px; }
@media (max-width: 560px) { .hero2-visual { grid-template-columns: 1fr; } .hv-arrow { transform: rotate(90deg); justify-self: center; } }
.hv-plan { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 20px 50px -30px rgba(60,40,20,.35); }
.hv-plan svg, .hv-plan img { width: 100%; height: auto; }
.hv-arrow { font-family: var(--serif); color: var(--brass); font-size: 14px; letter-spacing: 2px; white-space: nowrap; }
.hv-mood .mood { box-shadow: 0 30px 70px -30px rgba(60,40,20,.5); }
.hv-caption { grid-column: 1 / -1; text-align: right; font-family: var(--serif); font-size: 15px; color: var(--ink-2); min-height: 1.6em; }
.hv-caption b { color: var(--brass); font-weight: 700; }
.fade { animation: fadein .7s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* moodboard */
.mood {
  position: relative; display: grid; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; gap: 3px; background: var(--paper);
  grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas: "wall wall floor" "wall wall joinery" "fabric top joinery";
}
.mood .sw { position: relative; }
.mood .sw span { position: absolute; left: 10px; bottom: 8px; right: 8px; font-size: 11px; color: rgba(255,255,255,.95); text-shadow: 0 1px 3px rgba(0,0,0,.35); line-height: 1.3; }
.mood.small .sw span { display: none; }
.mood .wall { grid-area: wall; background: radial-gradient(120% 90% at 25% 15%, rgba(255,255,255,.55), transparent 60%), radial-gradient(80% 60% at 80% 90%, rgba(0,0,0,.06), transparent 70%), var(--c1); }
.mood .wall span { color: var(--ink-2); text-shadow: none; }
.mood .floor { grid-area: floor; }
.mood .joinery { grid-area: joinery; }
.mood .fabric { grid-area: fabric; background: repeating-linear-gradient(0deg, rgba(255,255,255,.10) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 1px, transparent 1px 3px), var(--c2); }
.mood .top { grid-area: top; }
.mood .wood {
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,.07) 0 1px, transparent 1px 7px, rgba(255,255,255,.06) 7px 9px, transparent 9px 16px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(0,0,0,.12) 46px 48px),
    linear-gradient(180deg, color-mix(in srgb, var(--c3) 88%, white), var(--c3) 60%, color-mix(in srgb, var(--c3) 80%, var(--c4)));
}
.mood .joinery.wood { background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 1px, transparent 1px 6px, rgba(255,255,255,.05) 6px 8px, transparent 8px 13px),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(0,0,0,.18) 38px 40px),
    linear-gradient(90deg, color-mix(in srgb, var(--c4) 70%, var(--c3)), var(--c3)); }
.mood .stone {
  background:
    linear-gradient(118deg, transparent 40%, color-mix(in srgb, var(--c4) 30%, transparent) 41%, transparent 43%),
    linear-gradient(62deg, transparent 66%, color-mix(in srgb, var(--c4) 22%, transparent) 67%, transparent 68.5%),
    linear-gradient(150deg, transparent 20%, color-mix(in srgb, white 40%, transparent) 21%, transparent 23%),
    radial-gradient(70% 60% at 30% 30%, rgba(255,255,255,.4), transparent 70%),
    var(--c2);
}
.mood .top.stone { background:
    linear-gradient(125deg, transparent 35%, color-mix(in srgb, var(--c4) 35%, transparent) 36%, transparent 38%),
    linear-gradient(40deg, transparent 60%, color-mix(in srgb, var(--c3) 30%, transparent) 61%, transparent 63%),
    radial-gradient(80% 70% at 70% 30%, rgba(255,255,255,.5), transparent 70%),
    color-mix(in srgb, var(--c1) 60%, var(--c2)); }
.mood .dots { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; padding: 4px 6px; background: rgba(255,255,255,.7); border-radius: 999px; backdrop-filter: blur(4px); }
.mood .dots i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.mood.small .dots { display: none; }

/* style cards */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.style-card2 { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 12px 12px 18px; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; text-align: left; }
.style-card2:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -30px rgba(60,40,20,.4); }
.style-card2.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.style-card2 .meta2 { padding: 14px 6px 0; }
.style-card2 .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.style-card2 h3 { margin: 0; font-size: 22px; }
.style-card2 .en { font-family: var(--serif); font-style: italic; color: var(--mute); font-size: 13px; }
.style-card2 .mood-line { color: var(--brass); font-size: 13px; letter-spacing: 2px; margin: 2px 0 8px; }
.style-card2 .keys { display: flex; flex-wrap: wrap; gap: 6px; }
.style-card2 .keys span { font-size: 12px; color: var(--ink-2); background: var(--ivory); border-radius: 999px; padding: 2px 10px; }
.style-card2 .level { font-size: 12px; color: var(--mute); }

/* floor-plan library */
.library { border-top: 1px solid var(--line); }
.lib-search { max-width: 520px; margin: 0 auto 26px; }
.lib-search input { border-radius: 999px; padding: 13px 20px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.lib-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px; cursor: pointer; text-align: left; transition: transform .2s, border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.lib-card:hover { transform: translateY(-2px); }
.lib-card.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.lib-card .plan-pic { aspect-ratio: 4 / 3; background: #fff; border-radius: 12px; display: grid; place-items: center; padding: 8px; overflow: hidden; }
.lib-card .plan-pic svg, .lib-card .plan-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lib-card h3 { font-size: 17px; margin: 12px 0 2px; }
.lib-card .sub { font-size: 13px; color: var(--mute); }
.lib-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lib-card .tags span { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--ink-2); }
.lib-card.upload .plan-pic { border: 1.5px dashed #cfc3b3; background: var(--ivory); color: var(--mute); flex-direction: column; text-align: center; font-size: 14px; }
.lib-card.upload .plan-pic b { font-size: 30px; color: var(--brass); font-weight: 400; line-height: 1; }
.how-grid article { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.start-art { background: var(--ivory); padding: 24px; display: grid; place-items: center; }
.start-art .mood { width: 100%; }

/* studio */
.studio { max-width: 1240px; margin: 0 auto; padding: 22px clamp(16px, 3vw, 32px) 40px; }
.studio .guest-tip { max-width: 520px; margin: 0 auto 16px; text-align: center; }
.stepper { list-style: none; padding: 0; margin: 0 auto 28px; display: flex; justify-content: center; gap: clamp(6px, 2vw, 28px); flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 14px; cursor: pointer; }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; background: var(--paper); }
.stepper li.done span { background: var(--ink-2); color: var(--paper); border-color: var(--ink-2); }
.stepper li.current { color: var(--ink); font-weight: 600; }
.stepper li.current span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stepper li.locked { cursor: not-allowed; opacity: .5; }
.pane-title { text-align: center; font-size: clamp(24px, 3vw, 32px); margin: 0 0 18px; }
.custom { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .custom { grid-template-columns: 1fr; } }
.custom-left { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.custom-left .label { margin-top: 16px; }
.custom-left .label:first-child { margin-top: 0; }
.chosen { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; align-items: center; font-size: 14px; }
.chosen .thumb { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.chosen .thumb svg, .chosen .thumb img { max-width: 100%; max-height: 100%; }
/* Raster/SVG plan images: pin inside the 4:3 frame (percentage max-height does not resolve in a grid cell). */
.lib-card .plan-pic, .chosen .thumb { position: relative; }
.lib-card .plan-pic img, .chosen .thumb img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); max-width: none; max-height: none; object-fit: contain; }
.chosen b { font-family: var(--serif); font-size: 16px; display: block; }
.chosen small { color: var(--mute); }
.chosen .change { margin-left: 6px; }
.custom-left .btn.block { margin-top: 18px; }
.chip.off { opacity: .45; }
.mat-list { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.mat-list dt { color: var(--mute); }
.mat-list dd { margin: 0; }

/* plan view */
.plan-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.plan-head h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); }
.plan-head .sub { color: var(--mute); font-size: 14px; }
.plan-progress { font-size: 13px; color: var(--brass); }
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.room-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.room-card .pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.room-card .pic img { width: 100%; height: 100%; object-fit: cover; animation: reveal .9s ease; }
.room-card .cap { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 14px; }
.room-card .cap b { font-family: var(--serif); font-size: 16px; }
.room-card .cap small { color: var(--mute); }
.render-ph { position: absolute; inset: 0; animation: reveal .9s ease;
  background:
    radial-gradient(40% 50% at 72% 30%, rgba(255,255,255,.75), transparent 70%),
    linear-gradient(180deg, var(--c1) 0 60%, transparent 60%),
    linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--c3) 85%, white) 60%, var(--c3)); }
.render-ph::before { content: ""; position: absolute; left: 12%; right: 38%; bottom: 30%; height: 16%; border-radius: 14px 14px 6px 6px; background: var(--c2); box-shadow: 0 10px 18px -8px rgba(0,0,0,.25); }
.render-ph::after { content: ""; position: absolute; right: 12%; top: 16%; width: 22%; height: 34%; border: 5px solid rgba(255,255,255,.9); background: linear-gradient(180deg, #dfe9ee, #f6f2ea); }
.render-ph span { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 11px; color: var(--ink-2); background: rgba(255,255,255,.75); margin: 0 14px; border-radius: 999px; padding: 2px 8px; z-index: 1; }
.room-card .pending { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--serif); background: linear-gradient(110deg, #e9e3da 30%, #f4efe7 50%, #e9e3da 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; color: var(--ink-2); }
.room-card .pending small { font-family: var(--sans); font-size: 12px; color: var(--mute); }
.room-card.skipped .pic { display: grid; place-content: center; text-align: center; background: var(--ivory); color: var(--mute); font-size: 13px; gap: 8px; }
.plan-sections { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; margin-top: 22px; align-items: start; }
@media (max-width: 900px) { .plan-sections { grid-template-columns: 1fr; } }
.panel-box { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.panel-box h3 { margin: 0 0 10px; font-size: 18px; }
.budget { display: grid; gap: 8px; margin-top: 4px; }
.budget div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 8px; font-size: 14px; }
.budget div:last-child { border: 0; }
.budget b { font-family: var(--serif); font-size: 18px; color: var(--brass); }
.history .hcard { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 10px; text-align: left; }
.history .hcard .mood { border-radius: 10px; }
.history .hcard b { display: block; font-family: var(--serif); margin-top: 6px; }
.history .hcard small { color: var(--mute); }

/* tiers & packs */
.pricing.tiers3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.price-card li b { color: inherit; }
.price-card.featured li b { color: #e9cf9f; }
.packs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 22px; font-size: 14px; }
.packs-title { color: var(--mute); margin-right: 6px; }
.pack { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; }
.pack b { color: var(--brass); margin-left: 4px; }
.pack.hot { border-color: var(--brass); }
.sheet.wide { max-width: 600px; }
.sheet .label { margin-top: 14px; }
.plans { margin: 8px 0 12px; }
.packs-row { grid-template-columns: repeat(3, 1fr); }
.packs-row .plan { flex-direction: column; align-items: flex-start; gap: 4px; }
.packs-row .plan span { font-size: 20px; }
@media (max-width: 480px) { .packs-row { grid-template-columns: 1fr; } .packs-row .plan { flex-direction: row; align-items: center; } }
.plan.highlight { outline: 2px solid var(--brass); outline-offset: 2px; }

/* 3D / quote gating */
.room-card .extras { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.xbtn { font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; color: var(--ink-2); }
.xbtn.locked { color: var(--mute); }
.xbtn.locked::before { content: "🔒 "; }
.xbtn.ready { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.xbtn.busy { color: var(--brass); border-color: var(--brass); }
.quote-wrap { position: relative; }
.quote-locked .quote-body { filter: blur(5px); pointer-events: none; user-select: none; opacity: .7; }
.quote-gate { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; padding: 20px; }
.quote-gate h4 { font-family: var(--serif); font-size: 20px; margin: 0; }
.quote-gate p { margin: 0; color: var(--ink-2); font-size: 14px; }
.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.grade { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; text-align: left; }
.grade b { display: block; font-family: var(--serif); font-size: 15px; }
.grade span { font-size: 13px; color: var(--brass); font-weight: 600; }
.grade small { display: block; font-size: 11px; color: var(--mute); }
.grade.active { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }

/* ---------- legal pages & report form ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 36px 20px 56px; }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc .updated { color: var(--mute); font-size: 13px; margin: 0 0 26px; }
.doc h2 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { line-height: 1.85; color: var(--ink-2); }
.doc ul { padding-left: 20px; margin: 6px 0; }
.doc .fill { background: #fff1c2; padding: 0 4px; border-radius: 4px; }
.doc .note { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.report-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; }
.report-form textarea { min-height: 140px; }
.report-done { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }

/* ---------- showcase & share ---------- */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.showcase-card { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .2s; }
.showcase-card:hover { transform: translateY(-2px); }
.showcase-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.showcase-card div { padding: 12px 14px; }
.showcase-card b { font-family: var(--serif); font-size: 16px; display: block; }
.showcase-card small { color: var(--mute); }
.share-feature { margin: 16px 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.share-feature p { margin: 4px 0 10px; font-size: 13px; }
.share-page { max-width: 1040px; margin: 0 auto; padding: 32px 16px 56px; }
.share-page h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 6px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 22px 0 14px; }
.share-grid figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.share-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.share-grid figcaption { padding: 10px 14px; font-family: var(--serif); }

/* ---------- style library & recommendation ---------- */
.style-card2 { position: relative; }
.trend-tag { position: absolute; top: 20px; left: 20px; z-index: 2; background: var(--ink); color: #f6d59e; font-size: 12px; padding: 3px 10px; border-radius: 999px; letter-spacing: 1px; }
.trend-tag.inline { position: static; display: inline-block; margin-left: 6px; font-size: 11px; padding: 1px 8px; }
.rec-entry { margin-top: 10px; }
#rec-form .label { margin-top: 14px; }
.rec-card { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 10px; }
.rec-card .mood { border-radius: 10px; }
.rec-card b { font-family: var(--serif); font-size: 17px; }
.rec-card p { margin: 4px 0 8px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 480px) { .rec-card { grid-template-columns: 96px 1fr; gap: 10px; padding: 10px; } .rec-card p { font-size: 13px; } }

/* ---------- prices from the admin console ---------- */
.was { font-size: .55em; color: var(--mute); margin-right: 6px; font-weight: 400; }
.price-card.featured .was, .plan.featured .was { color: #b9ab98; }
.promo-tag { margin: -8px 0 12px; font-size: 13px; color: var(--brass); }
.price-card.featured .promo-tag { color: #e9cf9f; }
.price-card .buy-btn { margin-top: 16px; width: 100%; }
.promo-banner { display: inline-block; margin: 10px auto 0; padding: 6px 14px; border-radius: 999px; background: #f6ead7; color: #6f4b2a; font-size: 13.5px; }
#paywall .promo-banner { display: block; margin: 0 0 10px; border-radius: 12px; }
.price-card .ribbon-top { position: static; display: inline-block; margin-bottom: 10px; }
.price-card:not(.featured) .ribbon-top { color: var(--brass); border-color: var(--brass); }
