/* Factory Studio: dark neutral theme, one accent (amber). No build step. */
:root {
  --bg: #0e0f11;
  --bg-2: #121316;
  --surface: #17191c;
  --surface-2: #1d2024;
  --surface-3: #25292e;
  --line: #2a2e34;
  --line-2: #363b42;
  --text: #ecebe8;
  --muted: #a3a7ae;
  --faint: #70757d;
  --accent: #f0a93b;
  --accent-ink: #1a1206;
  --accent-soft: rgba(240, 169, 59, 0.12);
  --accent-line: rgba(240, 169, 59, 0.45);
  --danger: #e5695a;
  --danger-soft: rgba(229, 105, 90, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --rail: 232px;
  --top: 60px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
img { display: block; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- top bar ---------- */
.topbar {
  height: var(--top);
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 650; letter-spacing: 0.01em; background: none; border: 0; padding: 0; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: conic-gradient(from 210deg, var(--accent), #ffd79a, var(--accent));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.brand small { color: var(--faint); font-weight: 500; }
.crumb { color: var(--muted); display: flex; gap: 10px; align-items: center; min-width: 0; }
.crumb b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb .sep { color: var(--faint); }
.topbar .spacer { flex: 1; }

.budget { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.budget .meter { width: 150px; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.budget .meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .6s ease; }
.budget.warn .meter i { background: var(--danger); }
.budget b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.shell { display: flex; height: calc(100% - var(--top)); }
.rail {
  width: var(--rail); flex: none;
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  overflow-y: auto;
  background: var(--bg-2);
}
.rail h6 { margin: 0 10px 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.rail ol { list-style: none; margin: 0; padding: 0; position: relative; }
.rail li { position: relative; }
.rail li + li::before {
  content: ""; position: absolute; left: 25px; top: -8px; height: 16px; width: 2px; background: var(--line);
}
.rail li.done + li::before { background: var(--accent-line); }
.step {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; margin: 0 0 4px; border-radius: 10px;
  background: none; border: 1px solid transparent; text-align: left; cursor: pointer;
}
.step:hover:not(:disabled) { background: var(--surface); }
.step:disabled { cursor: default; opacity: .45; }
.step.viewing { background: var(--surface-2); border-color: var(--line-2); }
.step .dot {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 2px solid var(--line-2); color: var(--muted); background: var(--bg-2);
}
.step.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.current .dot { border-color: var(--accent); color: var(--accent); }
.step.busy .dot { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.step .label { display: flex; flex-direction: column; min-width: 0; }
.step .label b { font-weight: 600; font-size: 14px; }
.step .label small { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.current .label small { color: var(--accent); }

main#view { flex: 1; overflow-y: auto; min-width: 0; }
.page { max-width: 1320px; margin: 0 auto; padding: 36px 44px 80px; }
.page.narrow { max-width: 880px; }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 650; margin-bottom: 8px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 650; }
h2 { font-size: 22px; font-weight: 620; }
h3 { font-size: 16px; font-weight: 620; }
.lead { color: var(--muted); font-size: 16px; max-width: 64ch; margin: 10px 0 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.grow { flex: 1; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #444a52; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: #f5b751; border-color: #f5b751; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--surface); }
.btn.big { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn .price { font-weight: 500; opacity: .8; font-size: 12.5px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }

.field { display: block; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 550; }
.input, textarea.input {
  width: 100%; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2);
  padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.title-input { font-size: 24px; font-weight: 650; font-family: var(--font-display); padding: 10px 14px; }
textarea.input { min-height: 96px; line-height: 1.5; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.solid { background: var(--accent); color: var(--accent-ink); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.free { background: rgba(255,255,255,.06); color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.flat { background: var(--bg-2); }
.card.hero { padding: 32px; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; flex: none; }
.spinner.lg { width: 28px; height: 28px; border-width: 3px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.working { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.working .spinner { color: var(--accent); }

.bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--accent); transition: width .6s ease; }
.bar.indeterminate i { width: 35% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }

.error {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--danger-soft); border: 1px solid rgba(229,105,90,.35); color: #f3c2bb; font-size: 14px;
}
.error b { color: var(--danger); display: block; margin-bottom: 2px; }
.error .grow { min-width: 0; overflow-wrap: anywhere; }

.banner {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 14px;
}
.banner .icon { color: var(--accent); font-weight: 800; font-size: 16px; line-height: 1.3; }
.banner b { color: var(--accent); }

.note { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13.5px; }
.note .icon { color: var(--accent); flex: none; }

.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty h2 { color: var(--text); margin-bottom: 8px; }

/* ---------- home ---------- */
.home { max-width: 1180px; margin: 0 auto; padding: 56px 44px 80px; }
.home-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.home-hero h1 { font-size: 44px; }
.home-hero .lead { font-size: 17px; }
.steps-mini { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.steps-mini span { font-size: 12.5px; color: var(--muted); padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; }
.new-game textarea.input { min-height: 130px; font-size: 16px; }
.new-game .row { margin-top: 16px; justify-content: space-between; }
.sessions { margin-top: 64px; }
.sessions h2 { margin-bottom: 18px; }
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.session-card {
  text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.session-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.session-card .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #202329, #16181b); position: relative; overflow: hidden; }
.session-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.session-card .thumb .initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; font-weight: 700; color: var(--line-2); font-family: var(--font-display); }
.session-card .meta { padding: 14px 16px 16px; }
.session-card .meta b { display: block; font-size: 16px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- pitch ---------- */
.idea-quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--muted); font-size: 16px; margin: 0 0 32px; max-width: 72ch; }
.loglines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.choice {
  position: relative; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover:not(:disabled) { border-color: var(--line-2); background: var(--surface-2); }
.choice.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }
.choice:disabled { cursor: default; }
.choice .num { font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: .1em; }
.choice.selected .num { color: var(--accent); }
.choice h3 { margin: 8px 0 8px; font-size: 18px; }
.choice p { margin: 0; color: var(--muted); font-size: 15px; }
.choice .check {
  position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: transparent;
}
.choice.selected .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.pitch-foot { margin-top: 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: var(--radius); border: 1px solid var(--line); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- interview ---------- */
.interview { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100%; }
.interview .main-col { overflow-y: auto; padding: 36px 44px 80px; }
.interview .main-inner { max-width: 760px; margin: 0 auto; }
.gdd-panel { border-left: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; padding: 28px 28px 60px; }
.gdd-panel .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; position: sticky; top: -28px; background: var(--bg-2); padding: 10px 0; z-index: 1; }
.gdd-panel.flash .md { animation: flash 1.6s ease; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.qcard .topic { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qcard .question { font-family: var(--font-display); font-size: 26px; line-height: 1.3; font-weight: 620; margin: 0 0 12px; }
.qcard .why { display: flex; gap: 10px; color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.qcard .why .icon { color: var(--accent); }
.options { display: grid; gap: 12px; }
.option { padding: 18px 20px 18px 56px; }
.option .check { left: 20px; right: auto; top: 20px; }
.option h3 { margin: 0 0 4px; font-size: 16.5px; }
.option p { font-size: 14.5px; }
.option .rec { margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--accent); }
.option .rec .pill { flex: none; }
.own-words { margin-top: 18px; }
.own-words textarea.input { min-height: 74px; }
.qnav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.progress-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.progress-dots i { width: 18px; height: 4px; border-radius: 4px; background: var(--surface-3); }
.progress-dots i.on { background: var(--accent); }
.progress-dots i.here { background: var(--text); }

.history { margin-top: 40px; }
.history h3 { margin-bottom: 12px; }
.history ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.history li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); align-items: start; }
.history li:first-child { border-top: 0; }
.history li.viewing { background: var(--surface); }
.history li.conflict .n { background: var(--danger-soft); color: var(--danger); }
.history .n { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.history .q { font-size: 13.5px; color: var(--muted); }
.history .a { font-size: 14.5px; font-weight: 550; margin-top: 2px; }

/* markdown */
.md { font-size: 14px; line-height: 1.6; color: #d8d7d3; border-radius: 8px; }
.md h1 { font-size: 22px; margin: 0 0 12px; }
.md h2 { font-size: 16px; margin: 22px 0 8px; color: var(--text); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 14.5px; margin: 16px 0 6px; color: var(--text); }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md blockquote { margin: 0 0 12px; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: 13px; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- art ---------- */
.anchor { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--accent-line); background: var(--accent-soft); font-size: 13px; color: var(--text); }
.anchor img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.anchor b { color: var(--accent); font-weight: 650; }
.slot { margin-bottom: 44px; }
.slot-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.slot-head .sub { color: var(--muted); font-size: 13.5px; }
.slot-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid.style { grid-template-columns: repeat(2, 1fr); }
.grid.character { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.room { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.sky { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.tile {
  position: relative; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  background: var(--surface-2); outline: 1px solid var(--line); transition: outline-color .15s, transform .2s;
}
.tile:hover { outline-color: var(--line-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.02); }
.grid.style .tile { aspect-ratio: 16/9; }
.grid.character .tile { aspect-ratio: 1; }
.grid.character .tile img { object-fit: contain; background: #e9e7e3; }
.grid.room .tile { aspect-ratio: 16/9; }
.grid.sky .tile { aspect-ratio: 2/1; }
.tile.approved { outline: 3px solid var(--accent); }
.tile .badge { position: absolute; top: 12px; left: 12px; }
.tile .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 12.5px; color: #ddd; opacity: 0; transition: opacity .2s;
}
.tile:hover .caption, .tile:focus-visible .caption { opacity: 1; }
.tile.pending { cursor: default; outline-style: dashed; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.tile.pending .inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slot .empty-slot {
  border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px; display: flex; align-items: center; gap: 18px; color: var(--muted);
}
.note-box { margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.note-box textarea.input { min-height: 56px; }
.round-note { margin: -4px 0 12px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; }
.round-note .icon { color: var(--accent); }
.gate { max-width: 560px; margin: 60px auto; text-align: center; }
.gate h2 { margin-bottom: 10px; }
.gate p { color: var(--muted); margin: 0 0 22px; }
.stage-foot { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* lightbox */
.overlay { position: fixed; inset: 0; background: rgba(6,7,8,.86); backdrop-filter: blur(6px); z-index: 50; display: flex; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox { display: grid; grid-template-columns: minmax(0, 1fr) 360px; width: 100%; height: 100%; }
.lightbox .stage-img { display: grid; place-items: center; padding: 40px; position: relative; min-height: 0; }
.lightbox .stage-img img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox .stage-img img.contain-light { background: #e9e7e3; }
.lightbox .side { background: var(--surface); border-left: 1px solid var(--line); padding: 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(23,25,28,.8); cursor: pointer; font-size: 18px; }
.lightbox .nav:hover { background: var(--surface-3); }
.lightbox .nav.prev { left: 16px; } .lightbox .nav.next { right: 16px; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.close { position: absolute; top: 18px; right: 18px; }

/* modal */
.modal { margin: auto; width: min(480px, calc(100% - 40px)); background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 8px; }
.modal .price-big { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 6px; }
.modal .price-big b { font-size: 40px; font-family: var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.modal .price-lines { margin: 18px 0; border-top: 1px solid var(--line); }
.modal .price-lines div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.modal .price-lines div b { color: var(--text); font-variant-numeric: tabular-nums; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- hero ---------- */
.hero-layout { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.concept-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.concept-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #e9e7e3; }
.concept-card .meta { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.viewer-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-height: 520px; }
.viewer { flex: 1; position: relative; min-height: 440px; background: radial-gradient(ellipse at 50% 40%, #2a2e35, #15171a 70%); }
.viewer canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer .veil { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; font-size: 14px; }
.viewer .hint { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--faint); pointer-events: none; }
.clips { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.clips .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.hero-step { display: flex; flex-direction: column; justify-content: center; }
.steps-list { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.steps-list li { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 14.5px; }
.steps-list li i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; }
.steps-list li.done { color: var(--text); }
.steps-list li.done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps-list li.now { color: var(--text); }
.steps-list li.now i { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.quote-big { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 6px; }
.quote-big b { font-size: 48px; font-family: var(--font-display); color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- greybox ---------- */
.rooms-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.room-card { padding: 0; overflow: hidden; }
.room-card .thumb { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; position: relative; }
.room-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.room-card .thumb .initial { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); font-size: 36px; font-weight: 700; }
.room-card .body { padding: 16px 18px 18px; }
.room-card .body h3 { margin: 4px 0 10px; }
.room-card .check { top: 12px; right: 12px; background: rgba(0,0,0,.4); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.facts li { display: grid; grid-template-columns: 74px 1fr; gap: 8px; color: var(--muted); }
.facts li span:first-child { color: var(--faint); }
.facts li span:last-child { color: #d6d5d1; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; }
.launch-bar { margin-top: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }

/* ---------- spec ---------- */
.spec-rooms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.spec-rooms .room-card .body, .rooms-pick .room-card .body { padding: 14px; }
.spec-rooms .facts li, .rooms-pick .facts li { grid-template-columns: 1fr; gap: 0; }
.spec-rooms .facts li span:first-child, .rooms-pick .facts li span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); color: #d6d5d1; font-variant-numeric: tabular-nums; }
table.data td.num, table.data th.num { text-align: right; }
table.data tfoot td { font-weight: 700; color: var(--text); border-bottom: 0; padding-top: 14px; }
.quote-total { display: flex; justify-content: space-between; align-items: flex-end; margin: 22px 0 18px; gap: 16px; }
.quote-total b { font-size: 34px; font-family: var(--font-display); color: var(--accent); line-height: 1; }
.section-title { margin: 40px 0 16px; display: flex; align-items: center; gap: 12px; }

/* ---------- build ---------- */
.build-hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.build-hero .art { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; filter: saturate(1.1); }
.build-hero .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,15,17,.96) 20%, rgba(14,15,17,.55)); }
.build-hero .content { position: relative; padding: 36px 40px; }
.pipeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 26px 0 14px; }
.pipeline div { font-size: 12.5px; color: var(--faint); }
.pipeline div i { display: block; height: 6px; border-radius: 6px; background: var(--surface-3); margin-bottom: 8px; overflow: hidden; }
.pipeline div i b { display: block; height: 100%; background: var(--accent); transition: width .6s ease; }
.pipeline div.done { color: var(--muted); }
.pipeline div.now { color: var(--text); font-weight: 600; }
.logtail { margin-top: 24px; background: #0a0b0c; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #b9bcc1; max-height: 300px; overflow: auto; white-space: pre-wrap; }
.logtail .hl { color: var(--accent); }
.big-number { font-size: 56px; font-family: var(--font-display); font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .spec-rooms, .rooms-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  :root { --rail: 200px; }
  .page { padding: 28px 30px 70px; }
  .interview { grid-template-columns: minmax(0, 1fr) 340px; }
  .interview .main-col { padding: 28px 30px 70px; }
  .loglines { grid-template-columns: 1fr; }
  .hero-layout { grid-template-columns: 1fr 1.3fr; }
  .two-col { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 1024px) {
  :root { --rail: 72px; }
  .step .label { display: none; }
  .rail h6 { display: none; }
  .rail { padding: 18px 10px; }
  .interview { grid-template-columns: 1fr; height: auto; }
  .gdd-panel { border-left: 0; border-top: 1px solid var(--line); }
  .grid.style { grid-template-columns: 1fr; }
  .hero-layout { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .budget .meter { width: 90px; }
}

main#view.fill { overflow: hidden; }
main#view.fill > .interview { height: 100%; }
@media (max-width: 1024px) { main#view.fill { overflow-y: auto; } }
.session-card .thumb img, .room-card .thumb img { position: absolute; inset: 0; }
