/* Space Planner: warm palette, liquid-glass panels over the shader gradient (fx.js). System fonts only (CSP). */
:root {
  --primary: #a34a2a; --primary-ink: #fff; --accent: #e8a33d; --primary-soft: rgba(163, 74, 42, .12);
  --text: #2a1d17; --muted: #6b5a50; --line: rgba(60, 35, 20, .16); --surface: #fffaf4; --bg: #f6ece2;
  --ok: #2f7a4b; --radius: 18px;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root { --text: #f7ece4; --muted: #cdb9ab; --line: rgba(255, 255, 255, .16); --surface: #24181a; --bg: #1a1213;
    --primary-soft: rgba(232, 163, 61, .16); --ok: #7fd19d; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 17px/1.55 var(--font); color: var(--text); background: var(--bg);
  overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .4em; }
h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.topbar { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: var(--surface); }
.top-in { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 12px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 700; font-family: var(--serif);
  font-size: 1.15rem; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: .95rem; }
nav a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
main { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; outline: none; }
footer.site { max-width: 980px; margin: 0 auto; padding: 0 16px 28px; font-size: .88rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: transparent; min-height: 52px; }
.choice[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft);
  box-shadow: 0 0 0 2px var(--primary) inset; }
.choice small { display: block; color: var(--muted); }
.choice .big { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; display: block; }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); min-height: 44px; }
.btn.secondary { background: transparent; color: inherit; border: 1px solid var(--line); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.steps { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: s; }
.steps li { counter-increment: s; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; accent-color: var(--primary); }
.check span::before { content: counter(s) ". "; font-weight: 700; }
.check input:checked + span { color: var(--muted); text-decoration: line-through; }
.label { font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; margin: 14px 0 4px; }
@media (prefers-color-scheme: dark) { .label { color: var(--accent); } }
.done-box { padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
label.field { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
input[type=number], input[type=text], select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); min-height: 44px; width: 100%; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 10px 0 14px; }
.result { font-family: var(--serif); font-size: 1.25rem; }
.q { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0 16px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--primary-soft); font-size: .85rem; }
.room-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dots { display: flex; gap: 6px; margin-top: 8px; }
.dots b { flex: 1; text-align: center; font-size: .8rem; padding: 4px 0; border-radius: 8px; border: 1px solid var(--line); }
.dots b.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.sample { border: 2px dashed var(--accent); }

/* ---------- shader gradient, liquid glass, liquid logo (fx.js) */
.fx-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; pointer-events: none; }
.fx-bg.hidden { display: none; }
body.fx-on { background: transparent; }
body.fx-on.fx-nogl { background: radial-gradient(120% 80% at 10% 0%, var(--primary) 0%, transparent 60%),
  radial-gradient(90% 70% at 100% 30%, var(--accent) 0%, transparent 55%), var(--primary); }
body.fx-on .card, body.fx-on .topbar {
  --glass: rgba(255, 250, 244, .66); --edge: rgba(255, 255, 255, .65);
  position: relative; background: var(--glass); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(255, 255, 255, .18), 0 10px 34px rgba(40, 15, 5, .18);
}
body.fx-on .card { border-radius: 22px; overflow: hidden; }
body.fx-on.fx-refract .card.glass-hero { backdrop-filter: url(#fx-liquid) blur(16px) saturate(170%); }
body.fx-on .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .18) 100%); }
body.fx-on .card > * { position: relative; }
body.fx-on .topbar { border-width: 0 0 1px; }
body.fx-on .hero { text-align: center; padding: 22px 0 18px; }
body.fx-on .hero h1 { color: #fff; text-shadow: 0 2px 22px rgba(0, 0, 0, .3); font-size: 2.5rem; letter-spacing: -.02em; }
body.fx-on .hero p { color: rgba(255, 255, 255, .94); font-size: 1.08rem; max-width: 560px; margin: 0 auto;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
body.fx-on footer.site { color: rgba(255, 255, 255, .88); text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.liquid-logo { display: block; width: 116px; height: 116px; margin: 0 auto 10px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .3)); }
img.liquid-logo { border-radius: 28px; }
@media (max-width: 720px) { body.fx-on .hero h1 { font-size: 1.9rem; } .liquid-logo { width: 92px; height: 92px; }
  nav a { padding: 6px 8px; font-size: .9rem; } }
@media (prefers-color-scheme: dark) {
  body.fx-on .card, body.fx-on .topbar { --glass: rgba(30, 18, 16, .58); --edge: rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 34px rgba(0, 0, 0, .35); }
  body.fx-on .card::before { background: linear-gradient(125deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 40%); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
