:root {
    --ds-bg: #faf6f0;
    --ds-raised: #ffffff;
    --ds-ink: #2b2320;
    --ds-ink-2: #6f655e;
    --ds-hairline: #e3d9ce;
    --ds-teal: #8a5a2b;
    --accent: #8a5a2b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--ds-bg);
    color: var(--ds-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}
#root { max-width: 860px; margin: 0 auto; padding: 16px 16px 48px; }
.file-nav {
    display: flex; gap: 8px; margin: 4px 0 16px;
    border-bottom: 1px solid var(--ds-hairline); padding-bottom: 10px;
}
.file-nav a {
    color: var(--ds-ink-2); text-decoration: none; font-size: 15px;
    padding: 8px 14px; border-radius: 999px;
}
.file-nav a.is-active { color: var(--ds-ink); background: var(--ds-raised); border: 1px solid var(--ds-hairline); font-weight: 600; }
.group { background: var(--ds-raised); border: 1px solid var(--ds-hairline); border-radius: 20px; padding: 16px; margin-bottom: 16px; }
.group-label { font-size: 13px; color: var(--ds-ink-2); margin: 0 0 12px; }
.closing { color: var(--ds-ink-2); font-size: 14px; line-height: 1.55; margin: 0 4px 20px; }
.facts { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact b { font-size: 12px; color: var(--ds-ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.fact span { font-size: 14px; }
.file-button {
    display: inline-block; border: 1px solid var(--ds-hairline); background: var(--ds-raised);
    color: var(--ds-ink); border-radius: 999px; padding: 12px 20px; font-size: 15px;
    cursor: pointer; font-family: inherit; text-decoration: none;
}
.file-button[data-variant="primary"] { background: var(--ds-ink); color: #fff; border-color: var(--ds-ink); }
.file-button:disabled { opacity: 0.45; cursor: default; }
.numbered { margin: 0; padding-left: 22px; color: var(--ds-ink); font-size: 15px; line-height: 1.6; }
.numbered li { margin-bottom: 10px; }
.stage { display: flex; flex-direction: column; gap: 12px; }
.stage-photo { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; display: block; width: 100%; }
.stage-photo img { display: block; width: 100%; height: auto; border-radius: 16px; }
.stage-nav { display: flex; align-items: center; gap: 12px; }
.stage-arrow { flex: 0 0 48px; height: 48px; border-radius: 999px; border: 1px solid var(--ds-hairline); background: var(--ds-raised); color: var(--ds-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.stage-title { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stage-name { font-weight: 600; color: var(--ds-ink); }
.stage-note { color: var(--ds-ink-2); font-size: 14px; }
.thumb-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; -webkit-overflow-scrolling: touch; }
.thumb { position: relative; flex: 0 0 84px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span { position: absolute; left: 4px; bottom: 4px; background: rgba(37,31,33,0.72); color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 5px; }
.thumb[aria-selected="true"] { border-color: var(--ds-teal); }
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-label { font-size: 12px; color: var(--ds-ink-2); }
.color-chip { border: 1px solid var(--ds-hairline); background: var(--ds-raised); color: var(--ds-ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; font-family: inherit; }
.color-chip.is-active { border-color: var(--ds-teal); color: var(--ds-teal); font-weight: 600; }
.stage-fade { animation: stagefade 180ms ease-out; }
@keyframes stagefade { from { opacity: 0.35; } to { opacity: 1; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.compare-actions { margin-bottom: 12px; }
.compare-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
.compare-cell { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.compare-cell img { width: 100%; height: auto; border-radius: 16px; display: block; object-fit: cover; aspect-ratio: 16 / 9; }
.compare-cell figcaption { color: var(--ds-ink-2); font-size: 13px; }
.compare-empty { color: var(--ds-ink-2); font-size: 15px; line-height: 1.5; }
.save-link { display: inline-block; background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; margin-top: 10px; font-size: 15px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.save-link:active { opacity: 0.7; }
.viewer { position: fixed; inset: 0; background: rgba(20,16,14,0.96); z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.viewer img { max-width: 100%; max-height: 82vh; border-radius: 12px; }
.viewer-bar { color: #fff; display: flex; justify-content: space-between; width: 100%; max-width: 860px; padding: 12px 0; gap: 12px; align-items: center; }
.viewer-close { background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff; border-radius: 999px; padding: 8px 16px; font-size: 15px; cursor: pointer; }
.viewer-hint { color: rgba(255,255,255,0.75); font-size: 13px; }
.token-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.token-row input { flex: 1; min-width: 180px; border: 1px solid var(--ds-hairline); border-radius: 12px; padding: 12px 14px; font-size: 16px; font-family: inherit; background: var(--ds-raised); color: var(--ds-ink); }
.render-status { font-size: 15px; color: var(--ds-ink-2); margin: 12px 0; line-height: 1.5; }
.render-status.is-error { color: #9c2b2b; }
.render-result img { width: 100%; height: auto; border-radius: 16px; display: block; }
.room-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--ds-hairline); border-top-color: var(--ds-ink); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav-lock { margin-left: auto; background: none; border: 1px solid var(--ds-hairline); color: var(--ds-ink-2); border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; font-family: inherit; }
.lock-group { max-width: 420px; margin: 15vh auto 0; }
.color-note{margin:.35rem 0 0;font-size:.8rem;color:#6b6258;max-width:34rem}
.paused-note { background: #faf1e4; border: 1px solid var(--ds-hairline); border-radius: 14px; padding: 10px 14px; font-size: 15px; color: var(--ds-ink-2); margin: 4px 0 14px; }

.swatches{display:flex;gap:2px;justify-content:space-between;margin:14px 0 10px}
.swatch{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;background:none;border:0;padding:4px 0;font:inherit;color:#6b6258}
.swatch .dot{width:34px;height:34px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #d8cfc2}
.swatch small{font-size:10.5px}
.swatch.is-active .dot{box-shadow:0 0 0 2.5px #3a2f26}
.swatch.is-active small{color:#3a2f26;font-weight:600}
.stage-title{text-align:center}

.row-label{margin:12px 0 0;font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:#6b6258}
.row-label+.swatches{margin-top:6px}
.small .swatch .dot{width:26px;height:26px}
.small .swatch small{font-size:10px}
.small .swatches{margin:6px 0 4px}
.approx{margin:6px 0 4px;font-size:12px;color:#8a7f72;text-align:center}

.sc-head{padding:18px 4px 6px}.sc-head h1{font-size:30px;margin:0 0 4px;font-weight:600;letter-spacing:-.01em}.sc-head p{margin:0;color:#6b6258}
.sc-room{margin:26px 0 34px}.sc-room h2{font-size:21px;margin:2px 0 12px;font-weight:600}.sc-num{margin:0;font-size:12px;letter-spacing:.14em;color:#8a7e72}
.sc-foot{text-align:center;color:#8a7e72;font-size:12.5px;margin:10px 0 40px}
