/* Studio thiết kế & dự toán nhà phố — giao diện tối toàn màn hình (ADR-0043). Dùng cùng studio-engine.js / studio-app.js.
   Font Fraunces + Be Vietnam Pro tự lưu trên server (SIL Open Font License 1.1 — themes/asahome/fonts/OFL-*.txt). */
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-400-normal-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-500-normal-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-500-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-500-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-600-normal-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-600-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-600-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-700-normal-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-700-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../themes/asahome/fonts/be-vietnam-pro-700-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/fraunces-600-italic-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/fraunces-600-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/fraunces-600-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/fraunces-500-600-normal-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/fraunces-500-600-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../themes/asahome/fonts/fraunces-500-600-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #0b0e12; --bg2: #0f1318; --panel: #12171e; --panel2: #171d26; --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
  --ink: #e8ecf1; --muted: #8e9aa8; --dim: #64707d;
  --accent: #d6a067; --accent2: #e9bb88; --accent-ink: #1b1309; --accent-soft: rgba(214, 160, 103, .14); --accent-ring: rgba(214, 160, 103, .45);
  --cyan: #7fd3f7; --cyan-soft: rgba(127, 211, 247, .12); --ok: #5cc98f; --err: #ff8473;
  --r: 10px; --r-sm: 7px; --top: 64px;
  --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14.5px/1.5 var(--body); overflow-wrap: break-word; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.sta-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 12px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); }
.sta-skip:focus { top: 10px; }
.sta-noscript { margin: 80px auto; max-width: 520px; padding: 16px; text-align: center; color: var(--muted); }

/* ===== Thanh trên ===== */
.sta-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; height: var(--top); padding: 0 18px;
  background: rgba(11, 14, 18, .86); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sta-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.sta-brand img { width: 52px; height: auto; }
.sta-brand b { display: block; font-size: 15px; letter-spacing: .02em; }
.sta-brand small { display: block; color: var(--muted); font-size: 11.5px; }
.sta-steps { display: flex; gap: 4px; margin: 0 auto; }
.sta-steps a { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.sta-steps a:hover { color: var(--ink); background: var(--panel); }
.sta-steps a.on { color: var(--ink); background: var(--panel2); }
.sta-steps i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line2); font-style: normal; font-size: 11px; }
.sta-steps a.on i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sta-top-act { display: flex; gap: 8px; flex: none; }

.sta-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.sta-btn:active { transform: translateY(1px); }
.sta-btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 22px rgba(214, 160, 103, .22); }
.sta-btn--accent:hover { background: var(--accent2); }
.sta-btn--ghost { background: transparent; border-color: var(--line2); color: var(--ink); }
.sta-btn--ghost:hover { border-color: var(--muted); background: var(--panel); }
.sta-btn--block { width: 100%; min-height: 46px; font-size: 14.5px; }
.sta-btn[disabled] { opacity: .6; cursor: progress; }
.sta-link { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Bố cục ===== */
.sta-app { display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr) minmax(320px, 370px); height: calc(100dvh - var(--top)); }
.sta-col { min-width: 0; }
.sta-controls, .sta-est { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.sta-controls { padding: 22px 20px 40px; border-right: 1px solid var(--line); }
.sta-est { padding: 18px 18px 96px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; } /* chừa nút chat (ADR-0044) */
.sta-intro h1 { font-family: var(--display); font-size: 25px; line-height: 1.2; }
.sta-intro p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }

.sta-step { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.sta-step > header { display: flex; gap: 12px; margin-bottom: 14px; }
.sta-num { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.sta-step h2 { font-size: 15.5px; }
.sta-step header p { margin: 2px 0 0; color: var(--dim); font-size: 12.5px; }
.sta-f { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.sta-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sta-grid3 .sta-f { margin-top: 0; }
.sta-row { display: flex; flex-wrap: wrap; gap: 0 18px; }
.sta-meta { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.sta input[type=number], .sta input[type=text], .sta input[type=tel], .sta textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--bg2); color: var(--ink); font-size: 15px; }
.sta input:focus, .sta textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.sta-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.sta-seg button { padding: 8px 13px; border: 1px solid var(--line2); border-radius: 999px; background: transparent; font-size: 13px; transition: border-color .15s, background .15s; }
.sta-seg button:hover { border-color: var(--muted); }
.sta-seg button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sta-seg button em { margin-left: 4px; font-style: normal; font-size: 11.5px; opacity: .65; }
.sta-stepper { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line2); border-radius: 999px; }
.sta-stepper button { width: 40px; height: 38px; border: 0; background: var(--panel2); font-size: 18px; }
.sta-stepper button:hover { background: var(--line2); }
.sta-stepper output { min-width: 78px; text-align: center; font-weight: 600; }

.sta-tpls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sta-tpl { position: relative; display: flex; flex-direction: column; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); text-align: left; transition: border-color .15s, transform .15s, background .15s; }
.sta-tpl:hover { border-color: var(--line2); transform: translateY(-1px); }
.sta-tpl.on { border-color: var(--accent); background: var(--panel2); box-shadow: 0 0 0 3px var(--accent-soft); }
.sta-tpl .sta-thumb { height: 112px; border-radius: var(--r-sm); background: radial-gradient(120% 90% at 50% 100%, #1a212b, #0f1318); overflow: hidden; }
.sta-tpl svg { display: block; width: 100%; height: 100%; }
.sta-tpl b { margin-top: 8px; font-size: 13px; line-height: 1.3; }
.sta-tpl small { margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.sta-tpl .sta-fit { position: absolute; top: 12px; left: 12px; padding: 2px 7px; border-radius: 999px; background: rgba(92, 201, 143, .16); color: var(--ok); font-size: 10.5px; font-weight: 600; }
.sta-empty { grid-column: 1 / -1; padding: 14px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); font-size: 13px; }

.sta-styles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sta-sty { padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); text-align: left; transition: border-color .15s; }
.sta-sty:hover { border-color: var(--line2); }
.sta-sty.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sta-sty b { display: block; font-size: 13.5px; }
.sta-sty small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.sta-sty .up { color: var(--err); } .sta-sty .down { color: var(--ok); }
.sta-dots { display: flex; gap: 3px; margin-bottom: 7px; }
.sta-dots i { width: 13px; height: 13px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; }
.sta-pals { display: flex; flex-wrap: wrap; gap: 6px; }
.sta-pal { display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border: 1px solid var(--line2); border-radius: 999px; background: transparent; font-size: 12.5px; }
.sta-pal:hover { border-color: var(--muted); }
.sta-pal span { display: flex; }
.sta-pal i { width: 13px; height: 13px; margin-right: -3px; border: 1px solid var(--bg); border-radius: 50%; }
.sta-crow { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.sta-crow:first-child { margin-top: 14px; }
.sta-crow > b { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.sta-sws { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.sta-sw { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; }
.sta-sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.sta-cpick { position: relative; display: grid; place-items: center; overflow: hidden; width: 24px; height: 24px; border: 1px dashed var(--muted); border-radius: 50%; color: var(--muted); font-size: 13px; }
.sta-cpick.custom { border: 1px solid rgba(255, 255, 255, .2); outline: 2px solid var(--accent); outline-offset: 2px; }
.sta-cpick input { position: absolute; inset: -6px; width: 40px; height: 40px; opacity: 0; cursor: pointer; }
.sta-foot { margin: 26px 0 0; color: var(--dim); font-size: 12px; }

/* ===== Sân khấu (mặt tiền) ===== */
.sta-stage { position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 85%, rgba(214, 160, 103, .07), transparent 70%), var(--bg); }
.sta-stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px;
  mask-image: radial-gradient(80% 75% at 50% 55%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(80% 75% at 50% 55%, #000 40%, transparent 100%); }
.sta-stage.is-line::before { opacity: 1; background-image: linear-gradient(var(--cyan-soft) 1px, transparent 1px), linear-gradient(90deg, var(--cyan-soft) 1px, transparent 1px); }
.sta-stage-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.sta-title b { display: block; font-size: 15px; }
.sta-title small { color: var(--muted); font-size: 12.5px; }
.sta-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(18, 23, 30, .7); flex: none; }
.sta-toggle button { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; }
.sta-toggle button.on { background: var(--panel2); color: var(--ink); }
.sta-canvas { position: relative; z-index: 1; flex: 1; min-height: 0; padding: 10px 24px 0; }
.sta-canvas svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); transition: opacity .2s; }
.sta-stage.is-line .sta-canvas svg { filter: drop-shadow(0 0 6px rgba(127, 211, 247, .25)); }
.sta-photo { display: flex; align-items: flex-end; justify-content: center; }
.sta-photo[hidden], .sta-canvas[hidden] { display: none; }
.sta-photo canvas { display: block; max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.sta-ai { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(11, 14, 18, .72); color: var(--cyan); font-size: 11.5px; white-space: nowrap; }
.sta-photoNote { position: relative; z-index: 1; margin: 0 20px; padding: 8px 12px; border: 1px dashed var(--line2); border-radius: var(--r-sm); color: var(--muted); font-size: 12.5px; text-align: center; }
.sta-toggle button[disabled] { opacity: .4; cursor: not-allowed; }
.sta-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px 20px 18px; }
.sta-chips span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(18, 23, 30, .75); color: var(--muted); font-size: 12px; }
.sta-chips b { color: var(--ink); font-weight: 600; }

/* ===== Dự toán ===== */
.sta-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.sta-total { background: linear-gradient(160deg, rgba(214, 160, 103, .12), transparent 55%), var(--panel); border-color: rgba(214, 160, 103, .28); }
.sta-total > small { color: var(--muted); font-size: 12.5px; }
.sta-big { display: block; margin-top: 4px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sta-range { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.sta-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.sta-kpi { padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg2); }
.sta-kpi small { display: block; color: var(--dim); font-size: 11px; }
.sta-kpi b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sta-bar { display: flex; gap: 2px; height: 8px; margin: 16px 0 8px; overflow: hidden; border-radius: 6px; }
.sta-bar div { transition: flex .35s ease; }
.sta-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 11.5px; }
.sta-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; }
.sta-card summary { font-weight: 600; font-size: 13.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.sta-card summary::-webkit-details-marker { display: none; }
.sta-card summary::after { content: '+'; color: var(--muted); }
.sta-card[open] summary::after { content: '−'; }
.sta-t { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.sta-t td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sta-t td.r { padding-left: 10px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sta-t td small { display: block; color: var(--dim); font-size: 11.5px; }
.sta-t tr.tot td { padding-top: 10px; border-bottom: 0; font-weight: 700; }
.sta-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sta-actions2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sta-actions2 .sta-btn { padding: 8px 10px; font-size: 12.5px; white-space: normal; }

/* ===== Hộp thoại ===== */
.sta-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 10, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sta-modal.open { display: flex; }
.sta-dlg { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 20px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.sta-dh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sta-dh h3 { font-size: 17px; }
.sta-x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--panel2); font-size: 18px; }
#sta-leadF { display: flex; flex-direction: column; gap: 2px; }
.sta-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sta-sum { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg2); color: var(--muted); font-size: 12.5px; white-space: pre-line; }
.sta-err { margin: 10px 0 0; color: var(--err); font-size: 13px; }
#sta-leadF .sta-btn--block { margin-top: 14px; }
#sta-quoteTxt { width: 100%; margin-top: 10px; font-size: 13px; }
.sta-toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13.5px;
  opacity: 0; transform: translateX(-50%) translateY(20px); transition: .25s; pointer-events: none; }
.sta-toast.show { opacity: 1; transform: translateX(-50%); }
.sta-mbar { display: none; }

/* ===== Màn hình vừa: dự toán xuống dưới mặt tiền ===== */
@media (max-width: 1280px) {
  .sta-app { grid-template-columns: minmax(330px, 380px) minmax(0, 1fr); grid-template-rows: 64dvh auto; height: auto; }
  .sta-controls { grid-row: 1 / span 2; align-self: start; position: sticky; top: var(--top); height: calc(100dvh - var(--top)); }
  .sta-stage { grid-column: 2; grid-row: 1; }
  .sta-est { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: start; overflow: visible; border-left: 0; padding-top: 6px; }
  .sta-est .sta-total, .sta-est .sta-actions { grid-column: 1 / -1; }
  .sta-steps a { padding: 7px 9px; }
}
@media (max-width: 1080px) { .sta-steps { display: none; } }

/* ===== Điện thoại ===== */
@media (max-width: 860px) {
  :root { --top: 56px; }
  .sta-top { padding: 0 12px; gap: 10px; }
  .sta-brand img { width: 44px; }
  .sta-top-act .sta-btn--ghost { display: none; }
  .sta-top-act .sta-btn { min-height: 36px; padding: 6px 14px; }
  .sta-app { display: flex; flex-direction: column; height: auto; }
  .sta-stage { order: -1; position: sticky; top: var(--top); z-index: 20; height: 40dvh; min-height: 260px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .sta-stage-bar { padding: 10px 14px 0; }
  .sta-title b { font-size: 13.5px; }
  .sta-title small { font-size: 11.5px; }
  .sta-toggle button { padding: 5px 9px; font-size: 11.5px; }
  .sta-canvas { padding: 6px 14px 0; }
  .sta-chips { padding: 6px 10px 10px; gap: 6px; }
  .sta-chips span { padding: 3px 9px; font-size: 11px; }
  .sta-chips span:nth-child(4), .sta-title small { display: none; }
  .sta-tpl .sta-thumb { height: 92px; }
  .sta-tpl b { font-size: 12.5px; }
  .sta-controls { position: static; height: auto; overflow: visible; border-right: 0; padding: 18px 16px 8px; }
  .sta-est { display: flex; overflow: visible; border-left: 0; padding: 8px 16px 110px; }
  .sta-intro h1 { font-size: 21px; }
  .sta-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sta-crow { grid-template-columns: 1fr; gap: 6px; }
  .sta-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(15, 19, 24, .94); border-top: 1px solid var(--line2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .sta-mbar small { display: block; color: var(--muted); font-size: 11px; }
  .sta-mbar b { font-size: 17px; font-variant-numeric: tabular-nums; }
  .sta-toast { bottom: 84px; }
}
/* ===== Màn hình chọn + dự toán nội thất (ADR-0047) — chế độ trang ở <body data-mode="home|int|build"> ===== */
.sta-intro .sta-h1 { font-family: var(--display); font-size: 25px; line-height: 1.2; }
.sta-home, .sta-int, .sta-int-only { display: none; }
body[data-mode="home"] .sta-home, body[data-mode="int"] .sta-int { display: block; }
body[data-mode="int"] .sta-int-only { display: inline-flex; }
body[data-mode="home"] .sta-top-act, body[data-mode="int"] .sta-top-act { margin-left: auto; }
body[data-mode="home"] :is(.sta-app, .sta-steps, .sta-build-only), body[data-mode="int"] :is(.sta-app, .sta-steps, .sta-build-only) { display: none !important; }
.sta-back { display: inline-block; margin-bottom: 10px; color: var(--muted); font-size: 13px; text-decoration: none; }
.sta-back:hover { color: var(--accent2); }
.sta-eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.sta-lead { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.sta-home { min-height: calc(100dvh - var(--top)); background: radial-gradient(900px 480px at 20% -10%, rgba(214, 160, 103, .12), transparent 60%), radial-gradient(800px 420px at 100% 0%, rgba(127, 211, 247, .07), transparent 60%), var(--bg); }
.sta-home-in { max-width: 1040px; margin: 0 auto; padding: clamp(36px, 8vh, 96px) 20px 120px; text-align: center; }
.sta-home h1 { font-family: var(--display); font-size: clamp(30px, 4.2vw, 48px); line-height: 1.12; font-weight: 600; }
.sta-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 36px; text-align: left; }
.sta-choice { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 22px; border: 1px solid var(--line2); border-radius: 18px; background: linear-gradient(180deg, var(--panel2), var(--panel)); color: var(--ink); text-decoration: none; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.sta-choice:hover, .sta-choice:focus-visible { transform: translateY(-3px); border-color: var(--accent-ring); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.sta-choice--main { border-color: var(--accent-ring); background: linear-gradient(180deg, rgba(214, 160, 103, .16), var(--panel) 70%); }
.sta-choice-k { color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sta-choice b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.15; }
.sta-choice small { color: var(--muted); font-size: 14px; line-height: 1.55; }
.sta-choice-go { margin-top: auto; padding-top: 8px; color: var(--accent2); font-weight: 600; }
.sta-int-in { max-width: 1180px; margin: 0 auto; padding: 26px 20px 120px; }
.sta-int-title { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.15; }
.sta-int-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 28px; align-items: start; margin-top: 8px; }
.sta-int-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.sta-int-type { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.sta-int-type b { font-size: 15px; }
.sta-int-type small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.sta-int-type:hover { border-color: var(--accent-ring); }
.sta-int-type.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sta-int-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sta-int-quick button { padding: 6px 12px; border: 1px solid var(--line2); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.sta-int-quick button:hover { border-color: var(--accent-ring); color: var(--ink); }
.sta-int-res { position: sticky; top: calc(var(--top) + 18px); display: flex; flex-direction: column; gap: 12px; }
.sta-int-card > small { color: var(--muted); font-size: 12.5px; }
.sta-int-h { margin: 16px 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sta-int-card .sta-int-h:first-of-type { margin-top: 10px; }
.sta-int-note { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.sta-int-contact { margin: 4px 0 0; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: var(--r-sm); color: var(--ink); font-size: 13.5px; }
.sta-int-empty { margin: 8px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .sta-choices, .sta-int-grid { grid-template-columns: 1fr; }
  .sta-home-in { padding: 28px 16px 110px; }
  .sta-choice { padding: 20px; }
  .sta-choice b { font-size: 22px; }
  .sta-int-in { padding: 18px 16px 110px; }
  .sta-int-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sta-int-res { position: static; }
  .sta-intro .sta-h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
