/* ============================================================================
   studio.css — AOC STUDIO: phòng mẫu một màn hình, full-viewport.
   Nạp SAU css/index.css (engine). Hai chế độ theo html[data-theme]: "day" (mặc định — trắng + xanh lá thương hiệu,
   cùng tông trang chủ) và "night" (tối). MỌI màu đi qua token --st-* — không hardcode để đổi chế độ chỉ cần đổi :root.
   Bố cục: rail màu trái · sân khấu giữa · filmstrip dưới. Các thành phần engine (palette, slot, combo, modal) chỉ được
   ĐỔI VỎ — không đổi class/id vì js/index.js bám vào chúng.
   ========================================================================== */

:root {
  color-scheme: light;
  /* ── NGÀY: trắng + xanh lá (#315d40 / #3f9d70 = --green / --green-bright của trang chủ) ── */
  --st-bg: #ffffff;
  --st-bg-2: #f6f7f4;
  --st-rail-bg: #fafbf9;
  --st-panel: rgba(43, 45, 41, .05);
  --st-panel-2: rgba(43, 45, 41, .09);
  --st-line: #e6e8e2;
  --st-line-2: #d3d6cd;
  --st-text: #1f221e;
  --st-text-2: #4d5049;
  --st-muted: #7c7f77;
  --st-acc: #315d40;
  --st-acc-hover: #276a49;
  --st-acc-bright: #3f9d70;
  --st-acc-ink: #ffffff;
  --st-acc-text: #1c4d36;
  --st-acc-soft: #eef4f0;
  --st-acc-ring: rgba(47, 125, 87, .28);
  --st-acc-glow: rgba(63, 157, 112, .3);
  --st-on: #1f221e;
  --st-on-ink: #ffffff;
  --st-tabs-bg: #eef0eb;
  --st-tab-on-bg: #ffffff;
  --st-tab-on-ink: #315d40;
  --st-glass: rgba(255, 255, 255, .86);
  --st-dock: rgba(255, 255, 255, .92);
  --st-sheet: rgba(255, 255, 255, .97);
  --st-modal: #ffffff;
  --st-input: #ffffff;
  --st-backdrop: rgba(31, 34, 30, .45);
  --st-card-line: rgba(31, 34, 30, .1);
  --st-card-dim: .82;
  --st-scroll: rgba(31, 34, 30, .2);
  --st-noise: .035;
  --st-marquee: .5;
  --st-shadow-sm: 0 8px 18px rgba(31, 34, 30, .12);
  --st-shadow-md: 0 10px 24px rgba(31, 34, 30, .16);
  --st-shadow-lg: 0 20px 50px rgba(31, 34, 30, .16);
  --st-stage-shadow: 0 30px 80px rgba(31, 34, 30, .22), 0 0 0 1px rgba(31, 34, 30, .06);
  --st-stroke: #315d40;
  --st-film-bg: linear-gradient(180deg, #f6f7f4, #ffffff);
  --st-logo-filter: none;
  --st-icon-filter: none;
  /* engine tokens → hệ studio */
  --app-bg: var(--st-bg);
  --ink: var(--st-text);
  --muted: var(--st-muted);
  --fog: var(--st-bg-2);
  --sand: var(--st-bg-2);
  --gold: var(--st-acc);
  --gold-light: var(--st-acc-soft);
  --navy: var(--st-text);
  --accent-color: var(--st-acc);
  --text-main: var(--st-text);
  --text-muted: var(--st-muted);
  --line: var(--st-line);
  --shadow: var(--st-shadow-lg);
  --glass-bg: var(--st-glass);
  --glass-border: var(--st-line);
  --blur: 18px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-serif: 'Montserrat', system-ui, sans-serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;
  /* kích thước */
  --st-top: 64px;
  --st-rail: 372px;
  --st-film: 148px;
  --st-ease: cubic-bezier(.16, 1, .3, 1);
}
html[data-theme="night"] {
  color-scheme: dark;
  --st-bg: #0e100f;
  --st-bg-2: #151817;
  --st-rail-bg: #121514;
  --st-panel: rgba(255, 255, 255, .05);
  --st-panel-2: rgba(255, 255, 255, .09);
  --st-line: rgba(255, 255, 255, .1);
  --st-line-2: rgba(255, 255, 255, .18);
  --st-text: #eceee6;
  --st-text-2: #b7bab3;
  --st-muted: #8b8f88;
  --st-acc: #4fa47a;
  --st-acc-hover: #5cb387;
  --st-acc-bright: #63bb92;
  --st-acc-ink: #06130c;
  --st-acc-text: #cdeadb;
  --st-acc-soft: rgba(79, 164, 122, .15);
  --st-acc-ring: rgba(79, 164, 122, .35);
  --st-acc-glow: rgba(79, 164, 122, .28);
  --st-on: #eceee6;
  --st-on-ink: #0e100f;
  --st-tabs-bg: rgba(0, 0, 0, .35);
  --st-tab-on-bg: rgba(255, 255, 255, .1);
  --st-tab-on-ink: #eceee6;
  --st-glass: rgba(14, 16, 15, .82);
  --st-dock: rgba(14, 16, 15, .84);
  --st-sheet: rgba(18, 21, 20, .97);
  --st-modal: #151817;
  --st-input: rgba(0, 0, 0, .35);
  --st-backdrop: rgba(6, 8, 7, .72);
  --st-card-line: rgba(255, 255, 255, .1);
  --st-card-dim: .62;
  --st-scroll: rgba(255, 255, 255, .16);
  --st-noise: .06;
  --st-marquee: .32;
  --st-shadow-sm: 0 8px 18px rgba(0, 0, 0, .4);
  --st-shadow-md: 0 10px 24px rgba(0, 0, 0, .45);
  --st-shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  --st-stage-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
  --st-stroke: rgba(236, 238, 230, .9);
  --st-film-bg: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent);
  --st-logo-filter: brightness(0) invert(1) opacity(.9);   /* logo gốc xanh đậm — trên nền tối sẽ chìm */
  --st-icon-filter: invert(1);
}

/* ── v4 "ARCHITECTURAL EDITORIAL": TRẮNG TINH + XANH LÁ (user yêu cầu rõ: không be/ngà), than cho chữ, xanh lá
   #315d40 (= --green trang chủ) cho mọi điểm nhấn: nút chính, gạch chân tab, nhãn nhỏ, chấm gợi ý.
   Không hộp kính đè lên nhau. Phòng là trung tâm; UI ẩn khi rảnh (body.is-idle). ── */
:root {
  --st-bg: #ffffff;            /* trắng tinh */
  --st-bg-2: #f4f7f5;          /* xám xanh rất nhạt cho ô/nền phụ */
  --st-text: #16201a;          /* than ngả xanh */
  --st-text-2: #46524b;
  --st-muted: #8a948e;
  --st-line: rgba(22, 32, 26, .1);
  --st-line-2: rgba(22, 32, 26, .2);
  --st-glass: rgba(255, 255, 255, .8);
  --st-glass-2: rgba(255, 255, 255, .94);
  --st-glass-line: rgba(255, 255, 255, .7);
  --st-glass-shadow: 0 14px 40px rgba(22, 32, 26, .1);
  --st-ink-glass: rgba(49, 93, 64, .92);   /* pill tối = xanh lá */
  --st-backdrop-tint: rgba(255, 255, 255, .86);
  --st-dock-h: 168px;
  --st-blur: blur(22px) saturate(1.4);
  --st-spring: cubic-bezier(.34, 1.4, .64, 1);
  --st-acc: #315d40; --st-acc-hover: #276a49; --st-acc-bright: #3f9d70; --st-acc-ink: #fff; --st-acc-text: #1c4d36; --st-acc-soft: #eef4f0; --st-acc-ring: rgba(47, 125, 87, .28); --st-acc-glow: rgba(63, 157, 112, .3);
  --st-modal: #ffffff; --st-input: #ffffff; --st-backdrop: rgba(22, 32, 26, .45);
}
html[data-theme="night"] {
  --st-bg: #141513; --st-bg-2: #1c1d1b; --st-text: #ecebe6; --st-text-2: #b6b5ae; --st-muted: #7f7e77;
  --st-line: rgba(236, 235, 230, .12); --st-line-2: rgba(236, 235, 230, .22);
  --st-glass: rgba(20, 21, 19, .66); --st-glass-2: rgba(20, 21, 19, .9); --st-glass-line: rgba(255, 255, 255, .1); --st-glass-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  --st-ink-glass: rgba(236, 235, 230, .92); --st-backdrop-tint: rgba(20, 21, 19, .84);
  --st-acc: #5fae83; --st-acc-hover: #6fbb92; --st-acc-bright: #7cc79f; --st-acc-ink: #0d1a12; --st-acc-text: #cfe9da; --st-acc-soft: rgba(95, 174, 131, .14); --st-acc-ring: rgba(95, 174, 131, .3); --st-acc-glow: rgba(95, 174, 131, .3);
  --st-on: #ecebe6; --st-on-ink: #141513; --st-modal: #1c1d1b; --st-input: rgba(0, 0, 0, .3);
}

html { background: var(--st-bg); }
html, body { height: 100%; }
body.studio {
  margin: 0; display: block !important; position: relative; height: 100vh; height: 100dvh; min-height: 0 !important; overflow: clip;
  background: var(--st-bg) !important; color: var(--st-text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--st-ease), color .5s;
}
body.studio button, body.studio input { font-family: inherit; }
body.studio ::selection { background: var(--st-acc); color: var(--st-acc-ink); }
body.studio *::-webkit-scrollbar { width: 8px; height: 8px; }
body.studio *::-webkit-scrollbar-thumb { background: var(--st-line-2); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
body.studio *::-webkit-scrollbar-track { background: transparent; }
body.studio * { scrollbar-width: thin; scrollbar-color: var(--st-line-2) transparent; }
.st-btn, .st-round, .st-seg button, .st-modes button, .st-chip, .st-card, .st-island, .st-arrow, .st-x, .st-fam, .st-chipbtn, .st-swatch, .st-intro__cta, .st-logo, .st-nav__a {
  appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; text-decoration: none;
}
.st-round svg, .st-seg svg, .st-arrow svg, .st-x svg, .st-chipbtn svg, .st-intro__cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.st-k { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--st-muted); }
/* UI ẩn khi rảnh: chỉ còn phòng */
.st-ui, .st-cap, .st-float, body.studio > .st-dock { transition: opacity .6s var(--st-ease), transform .6s var(--st-ease); }
body.studio.is-idle .st-ui, body.studio.is-idle .st-float { opacity: 0; }   /* vẫn nhận click: chuột động là hiện lại ngay, không chặn cú bấm đầu */
body.studio.is-idle > .st-dock { opacity: 0; transform: translate(-50%, 12px); }
body.studio.is-idle .st-cap { opacity: .0; }

/* ── SÂN KHẤU ──────────────────────────────────────────────────────────── */
/* touch-action: pan-y trên CẢ sân khấu (không chỉ .canvas-wrap): kéo ngang là cử chỉ của app (đổi phòng), trình duyệt không
   được cướp làm cuộn/back-swipe rồi huỷ pointer; overscroll-behavior chặn kéo-làm-mới / vuốt-lùi trang. */
html, body.studio { overscroll-behavior: none; }
body.studio > .st-stage { position: absolute; inset: 0; z-index: 1; overflow: clip; display: grid; grid-template-rows: minmax(0, 1fr); max-width: none; width: auto; margin: 0; padding: 0; gap: 0; touch-action: pan-y; }   /* engine: main{max-width:1320px} */
/* Nền ám màu: ảnh nguồn chỉ 48×29 px (studio.js) phóng to bằng background-size:cover đã tự mờ — blur CSS chỉ để xoá vết
   khối; 90px trên cả màn hình quá nặng cho GPU điện thoại → 36px desktop, bỏ hẳn trên màn nhỏ / cảm ứng. */
/* KHÔNG filter, KHÔNG will-change: đo A/B 2026-09-23 — blur(36px) trên lớp phủ cả màn hình giữ trang ở 30 fps kể cả khi
   đứng yên (bỏ đi = 60 fps). Ảnh nguồn 32×19 px (studio.js ambient) phóng lên toàn màn hình đã tự mờ nhờ nội suy. */
.st-backdrop { position: absolute; inset: -24px; background-size: cover; background-position: center; opacity: .35; }
.st-backdrop::after { content: ''; position: absolute; inset: 0; background: var(--st-backdrop-tint); }
.st-stage__inner { position: relative; z-index: 1; display: grid; place-items: center; min-height: 0; min-width: 0; height: 100%; padding: 92px 120px calc(var(--st-dock-h) + 96px); }
body.studio .canvas-wrap { width: 100% !important; height: 100% !important; display: grid; place-items: center; background: transparent !important; border: 0 !important; cursor: none !important; touch-action: pan-y; }
body.studio .canvas-wrap.compare-on { cursor: ew-resize !important; }
/* Khung ảnh mặc định 300×150 rồi fit() mới đặt cỡ thật → nhảy 180→629 px = CLS 0,13 trên desktop (đo 01/10/2026).
   Giấu bằng visibility (KHÔNG phải opacity): Chrome bỏ qua phần tử visibility:hidden khi tính CLS. */
body.studio .canvas-compare:not(.is-fit) { visibility: hidden; }
@media (hover: none), (pointer: coarse) { body.studio .canvas-wrap { cursor: crosshair !important; } }
body.studio .canvas-compare {
  display: block !important; width: auto; height: auto; max-width: 100%; max-height: 100%; position: relative;
  border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px rgba(22, 32, 26, .18), 0 2px 6px rgba(22, 32, 26, .06);
  background: var(--st-bg-2); transition: transform .28s var(--st-ease);   /* .6s → .28s: đổi phòng nhạy hơn */
}
html[data-theme="night"] body.studio .canvas-compare { box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06); }
body.studio.is-switching .canvas-compare { transform: scale(.985); }
body.studio #cvBase { display: block; width: var(--st-w, 100%); height: var(--st-h, 100%); max-width: none; opacity: 0; }
body.studio #cv { display: block; width: var(--st-w, 100%); height: var(--st-h, 100%); max-width: none; box-shadow: none !important; }
body.studio .compare-painted { inset: 0; }
body.studio .canvas-wrap.compare-on .compare-painted { border-right: 2px solid rgba(255, 255, 255, .95); box-shadow: 8px 0 24px rgba(0, 0, 0, .5); }
body.studio .canvas-wrap.compare-on #cvBase { opacity: 1; }
body.studio .canvas-wrap.compare-on .canvas-compare::before, body.studio .canvas-wrap.compare-on .canvas-compare::after { position: absolute; bottom: 16px; z-index: 3; padding: 7px 13px; border-radius: 2px; font-size: 10px; font-weight: 700; letter-spacing: .18em; background: rgba(49, 93, 64, .88); color: #fff; pointer-events: none; }
body.studio .canvas-wrap.compare-on .canvas-compare::before { content: 'MÀU MỚI'; left: 16px; }
body.studio .canvas-wrap.compare-on .canvas-compare::after { content: 'BAN ĐẦU'; right: 16px; }
body.studio .st-cmp-handle { display: none; }
body.studio .canvas-wrap.compare-on .st-cmp-handle { display: block; position: absolute; top: 0; bottom: 0; left: var(--compare-pos, 50%); width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .95); z-index: 3; pointer-events: none; box-shadow: 0 0 18px rgba(0, 0, 0, .6); }
body.studio .canvas-wrap.compare-on .st-cmp-handle::after { content: '⇆'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 17px; font-weight: 900; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
body.studio .canvas-wrap > .control-card, body.studio .canvas-daynight-box, body.studio .canvas-addscene-box, body.studio .canvas-compare-box, body.studio .control-card--inline .control-title, body.studio .surface-actions, body.studio .my-colors-header { display: none !important; }
body.studio .texture-highlight-path { stroke: #fff !important; stroke-width: 3 !important; }
.st-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 2; }
body.is-loading .st-loading, body.is-switching .st-loading { opacity: 1; }
.st-loading span { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--st-line-2); border-top-color: var(--st-acc); animation: stSpin .8s linear infinite; animation-play-state: paused; }
/* Vòng quay chỉ chạy khi đang tải / đổi phòng — trước đây quay vô hạn cả lúc đã trong suốt (tốn CPU khi đứng yên). */
body.is-loading .st-loading span, body.is-switching .st-loading span { animation-play-state: running; }
@keyframes stSpin { to { transform: rotate(360deg); } }
.st-arrow { position: absolute; top: 50%; z-index: 3; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; display: grid; place-items: center; color: var(--st-text); opacity: 0; transition: opacity .3s, transform .3s var(--st-spring), background .2s; }
.st-arrow--prev { left: 34px; transform: translateX(-8px); } .st-arrow--next { right: 34px; transform: translateX(8px); }
.st-stage:hover .st-arrow, .st-arrow:focus-visible { opacity: 1; transform: none; }
.st-arrow:hover { background: var(--st-acc); color: var(--st-acc-ink); transform: scale(1.06); }
.st-arrow svg { width: 22px; height: 22px; }
.st-hint { position: absolute; left: 50%; bottom: calc(var(--st-dock-h) + 120px); transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border-radius: 999px; background: var(--st-ink-glass); color: var(--st-bg); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 14px 34px rgba(0, 0, 0, .25); transition: opacity .4s, transform .5s var(--st-ease); }
.st-hint__tap { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--st-acc-bright); flex: 0 0 auto; }
.st-hint__tap::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--st-acc-bright); animation: stTap 1.4s ease-out infinite; }
@keyframes stTap { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.st-hint.is-hidden, body.is-loading .st-hint { opacity: 0; transform: translate(-50%, 8px); }
/* chú thích tạp chí dưới ảnh: trái = loại phòng nhỏ + TÊN LỚN + số thứ tự; phải = bề mặt */
.st-cap { position: absolute; left: 120px; right: 120px; bottom: calc(var(--st-dock-h) + 22px); z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; pointer-events: none; }
.st-cap > * { pointer-events: auto; }
.st-island { display: grid; grid-template-columns: auto auto; grid-template-areas: 'cat cat' 'name idx'; align-items: baseline; column-gap: 14px; row-gap: 2px; text-align: left; padding: 0; color: var(--st-text); transition: transform .3s var(--st-spring); }
.st-island:hover { transform: translateX(4px); }
.st-island__cat { grid-area: cat; font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--st-acc); }
.st-island__name { grid-area: name; font-size: clamp(22px, 2.4vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.st-island__idx { grid-area: idx; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--st-muted); font-variant-numeric: tabular-nums; }
.st-island__grid { display: none; }
.st-cap__right { display: flex; align-items: center; gap: 14px; }
.st-cap__label { font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--st-muted); }
body.studio .surface-pills { display: block !important; }
body.studio .surface-pills__list { display: flex !important; gap: 2px !important; flex-wrap: nowrap !important; border-bottom: 1px solid var(--st-line); }
body.studio .surface-btn {
  height: 36px !important; padding: 0 12px 0 8px !important; border-radius: 0 !important; border: 0 !important; border-bottom: 2px solid transparent !important; margin-bottom: -1px;
  background: transparent !important; color: var(--st-muted) !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: .12em; text-transform: uppercase; gap: 8px !important;
  display: inline-flex !important; align-items: center; white-space: nowrap; box-shadow: none !important; transition: color .2s, border-color .3s;
}
body.studio .surface-btn:hover { color: var(--st-text) !important; }
body.studio .surface-btn.active { color: var(--st-acc-text) !important; border-bottom-color: var(--st-acc) !important; }
body.studio .surface-btn .color-dot { width: 12px !important; height: 12px !important; border: 1px solid rgba(255, 255, 255, .8) !important; order: -1; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
body.studio .surface-btn.active .color-dot { animation: stPop .5s var(--st-spring); }
.st-float { position: absolute; right: 120px; top: 92px; z-index: 3; display: flex; gap: 6px; }
.st-round { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; color: var(--st-text-2); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: color .2s, background .2s, transform .25s var(--st-spring); }
.st-round:hover { color: var(--st-text); background: var(--st-acc-soft); }
.st-round:active { transform: scale(.94); }
.st-round.is-on { background: var(--st-acc); color: var(--st-acc-ink); }
.st-round svg { width: 15px; height: 15px; }
.st-round--acc { background: var(--st-acc); color: var(--st-acc-ink); height: 40px; padding: 0 18px 0 14px; box-shadow: 0 10px 26px var(--st-acc-ring); }
.st-round--acc:hover { background: var(--st-acc-hover); color: var(--st-acc-ink); }
.st-round--acc.is-done { background: var(--st-acc); color: var(--st-acc-ink); }

/* ── THANH TRÊN: chữ, không hộp ─────────────────────────────────────────── */
.st-ui { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 22px 120px 0; pointer-events: none; }
.st-ui > * { pointer-events: auto; }
.st-logo { justify-self: start; display: inline-flex; align-items: center; gap: 12px; }
.st-logo img { height: 30px; width: auto; display: block; filter: var(--st-logo-filter); }
.st-logo span { font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--st-muted); padding-left: 12px; border-left: 1px solid var(--st-line-2); }
.st-nav { display: flex; gap: 6px; }
.st-nav__a { position: relative; height: 36px; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--st-text-2); display: inline-flex; align-items: center; gap: 8px; }
.st-nav__a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: var(--st-acc); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--st-ease); }
.st-nav__a:hover { color: var(--st-text); } .st-nav__a:hover::after { transform: scaleX(1); }
.st-nav__a kbd { font: inherit; font-size: 9px; letter-spacing: .08em; padding: 2px 6px; border: 1px solid var(--st-line-2); border-radius: 4px; color: var(--st-muted); }
.st-topr { justify-self: end; display: flex; align-items: center; gap: 6px; }
.st-seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--st-line-2); }
.st-seg button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--st-muted); transition: all .3s var(--st-spring); }
.st-seg button:hover { color: var(--st-text); }
.st-seg button.is-on { background: var(--st-acc); color: var(--st-acc-ink); }
.st-seg button.is-on svg { animation: stSpin360 .55s var(--st-ease); }
.st-seg svg { width: 15px; height: 15px; }
.st-seg.is-disabled { opacity: .35; } .st-seg.is-disabled button { cursor: not-allowed; }
.st-theme { width: 40px; height: 40px; padding: 0; border: 1px solid var(--st-line-2); }
.st-theme svg { width: 16px; height: 16px; transition: transform .45s var(--st-spring); }
.st-theme .st-theme__moon, html[data-theme="night"] .st-theme .st-theme__sun { display: none; }
html[data-theme="night"] .st-theme .st-theme__moon { display: block; }
.st-theme:hover svg { transform: rotate(30deg); }
@keyframes stSpin360 { from { transform: rotate(-120deg) scale(.6); opacity: 0; } }
@keyframes stDrop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes stRise { from { opacity: 0; transform: translate(-50%, 18px); } }

/* ── DẢI MÀU (dưới): không hộp; đường kẻ mảnh; chữ lớn ──────────────────── */
body.studio > .st-dock {
  position: absolute; left: 50%; bottom: 0; z-index: 4; width: calc(100% - 240px); height: var(--st-dock-h); transform: translateX(-50%);
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); border-top: 1px solid var(--st-line); background: transparent;
}
.st-dock__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0 0; min-width: 0; }
.st-modes { display: inline-flex; gap: 22px; flex: 0 0 auto; }
.st-modes button { position: relative; height: 28px; padding: 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--st-muted); transition: color .2s; white-space: nowrap; }
.st-modes button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--st-acc); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--st-ease); }
.st-modes button:hover { color: var(--st-text); }
.st-modes button.is-on { color: var(--st-acc-text); } .st-modes button.is-on::after { transform: scaleX(1); }
.st-fams { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.st-fams::-webkit-scrollbar { display: none; }
.st-fam { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--st-muted); white-space: nowrap; transition: all .25s var(--st-spring); }
.st-fam i { width: 10px; height: 10px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .25s var(--st-spring); }
.st-fam:hover { color: var(--st-text); } .st-fam:hover i { transform: scale(1.3); }
.st-fam.is-on { color: var(--st-acc-text); background: var(--st-acc-soft); font-weight: 700; }
.st-dock__body { min-height: 0; min-width: 0; position: relative; }
.st-mode { display: none; height: 100%; min-height: 0; }
body.route-tool .st-mode--tool, body.route-classic .st-mode--classic, body.route-custom .st-mode--custom { display: grid; animation: stModeIn .4s var(--st-ease) both; }
@keyframes stModeIn { from { opacity: 0; transform: translateY(8px); } }
.st-mode--tool { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; padding: 6px 0 10px; }
.st-active { display: flex; align-items: center; gap: 16px; min-width: 260px; max-width: 320px; }
.st-active i { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 12px 26px rgba(0, 0, 0, .16); transition: background .5s var(--st-ease); }
.st-active.is-pop i { animation: stPop .55s var(--st-spring); }
.st-active span { display: grid; gap: 3px; min-width: 0; }
.st-active small { font-size: 10px; font-weight: 700; letter-spacing: .2em; color: var(--st-muted); text-transform: uppercase; }
.st-active b { font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-chips { display: flex; gap: 14px; align-items: center; padding: 12px 24px 12px 4px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding: 0 4px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); }
.st-chips::-webkit-scrollbar { display: none; }
body.studio .st-chips { scrollbar-width: none !important; cursor: grab; user-select: none; }
body.studio .st-chips::-webkit-scrollbar { display: none !important; height: 0 !important; }
.st-swatch { position: relative; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; scroll-snap-align: start; animation: stChipIn .45s var(--st-ease) both; }
.st-swatch i { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform .3s var(--st-spring), box-shadow .3s; }
.st-swatch:hover i { transform: scale(1.22); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 12px 26px rgba(0, 0, 0, .22); z-index: 2; }
.st-swatch.is-on i { transform: scale(1.1); box-shadow: 0 0 0 3px var(--st-bg), 0 0 0 4.5px var(--st-acc); }
.st-swatch.is-on i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 8px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translate(-50%, -65%) rotate(-45deg); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.st-swatch.is-pop i { animation: stPop .5s var(--st-spring); }
.st-swatch span { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px); padding: 5px 9px; border-radius: 3px; background: var(--st-ink-glass); color: var(--st-bg); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s, transform .25s var(--st-spring); z-index: 3; }
.st-swatch:hover span { opacity: 1; transform: translate(-50%, 0); }
.st-swatch--more i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-line-2); }
.st-swatch--more i::before { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 500; color: var(--st-text-2); }
@keyframes stChipIn { from { opacity: 0; transform: translateY(10px) scale(.8); } }
@keyframes stPop { 0% { transform: scale(.86); } 55% { transform: scale(1.16); } 100% { transform: scale(1); } }
/* Bộ 3 màu */
.st-mode--classic { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; padding: 8px 0 10px; }
.st-combo-side { display: grid; gap: 10px; min-width: 200px; }
.st-combo-side__t { font-size: clamp(16px, 1.4vw, 20px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.st-chipbtn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--st-line-2); color: var(--st-text-2); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transition: all .25s var(--st-spring); white-space: nowrap; justify-self: start; }
.st-chipbtn:hover { background: var(--st-acc); color: var(--st-acc-ink); border-color: var(--st-acc); }
.st-chipbtn:active { transform: scale(.94); }
.st-chipbtn svg { width: 14px; height: 14px; }
.st-combo-host { min-width: 0; }
body.studio .combo-panel { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; height: 100% !important; max-height: none !important; min-height: 0 !important; display: block !important; }
body.studio .combo-panel__header { display: none !important; }
body.studio .combo-strip { display: flex !important; flex-direction: row !important; gap: 10px !important; height: 100% !important; max-height: none !important; overflow-x: auto !important; overflow-y: hidden !important; padding: 6px 24px 8px 2px !important; scroll-snap-type: x proximity !important; scrollbar-width: none; align-items: center; mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); }
body.studio .combo-strip::-webkit-scrollbar { display: none; }
body.studio .combo-square { width: auto !important; min-width: 0 !important; max-width: none !important; flex: 0 0 auto !important; height: auto !important; padding: 5px 5px 5px 6px !important; border-radius: 999px !important; scroll-snap-align: start; display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; text-align: left !important; background: transparent !important; border: 1px solid var(--st-line) !important; box-shadow: none !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; transition: transform .3s var(--st-spring), border-color .2s, background .2s; transform: none; animation: stChipIn .45s var(--st-ease) both; }
body.studio .combo-square:hover { border-color: var(--st-acc) !important; transform: translateY(-2px) !important; }
body.studio .combo-square.is-active { border-color: var(--st-acc) !important; background: var(--st-acc-soft) !important; }
body.studio .combo-square__body { transform: none !important; width: auto !important; margin: 0 !important; display: flex !important; align-items: center; gap: 10px; overflow: visible !important; }
.combo-square__sub { margin: 0; font-size: 10.5px; letter-spacing: .06em; color: var(--st-text-2); font-weight: 600; white-space: nowrap; order: 2; }
.combo-square__triplet { display: flex; width: 66px; height: 34px; border-radius: 999px; overflow: hidden; margin: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); order: 1; }
.combo-square__triplet > div { flex: 1 1 0; } .combo-square__triplet > div:first-child { flex: 1.6 1 0; }
.combo-square__codes { display: none; }
body.studio .combo-square__apply, body.studio .combo-square.is-active .combo-square__apply { height: 30px !important; padding: 0 12px !important; border-radius: 999px !important; background: var(--st-acc-soft) !important; color: var(--st-acc-text) !important; border: 0 !important; font-size: 10px !important; font-weight: 700 !important; letter-spacing: .12em !important; text-transform: uppercase !important; transition: all .2s; white-space: nowrap; }
body.studio .combo-square:hover .combo-square__apply, body.studio .combo-square.is-active .combo-square__apply { background: var(--st-acc) !important; color: var(--st-acc-ink) !important; }
/* Bộ 3 màu v2: thẻ dọc — dải 3 màu là nhân vật chính, tên + nút "Thử" một hàng dưới */
body.studio .combo-strip { gap: 12px !important; padding: 8px 40px 10px 2px !important; cursor: grab; scroll-snap-type: x proximity !important; scroll-padding-left: 2px; mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
body.studio .combo-strip:active { cursor: grabbing; }
body.studio .combo-square { flex-direction: column !important; align-items: stretch !important; gap: 8px !important; width: 132px !important; padding: 7px 7px 8px !important; border-radius: 14px !important; border: 1px solid var(--st-line) !important; background: var(--st-bg, #fff) !important; user-select: none; }
body.studio .combo-square:hover { transform: translateY(-3px) !important; box-shadow: 0 8px 20px rgba(22, 32, 26, .10) !important; }
body.studio .combo-square.is-active { border-color: var(--st-acc) !important; box-shadow: 0 0 0 1px var(--st-acc) !important; background: var(--st-acc-soft) !important; }
body.studio .combo-square__body { flex-direction: column !important; align-items: stretch !important; gap: 7px !important; width: 100% !important; }
body.studio .combo-square__triplet { order: 1; width: 100%; height: 46px; border-radius: 9px; gap: 2px; box-shadow: none; background: transparent; }
body.studio .combo-square__triplet > div { border-radius: 4px; } body.studio .combo-square__triplet > div:first-child { border-radius: 9px 4px 4px 9px; flex: 1.5 1 0; } body.studio .combo-square__triplet > div:last-child { border-radius: 4px 9px 9px 4px; }
body.studio .combo-square__sub { order: 2; font-size: 11px; letter-spacing: .02em; padding-left: 2px; }
body.studio .combo-square__apply, body.studio .combo-square.is-active .combo-square__apply { width: 100% !important; height: 28px !important; padding: 0 !important; letter-spacing: .1em !important; }
@media (max-width: 640px) { body.studio .combo-square { width: 116px !important; } body.studio .combo-square__triplet { height: 40px; } }
/* Tự phối */
.st-mode--custom { place-items: center; padding: 12px 0; }
.st-custom { display: grid; justify-items: center; gap: 14px; text-align: center; max-width: 520px; }
.st-custom__t { font-size: 14px; font-weight: 500; color: var(--st-text-2); }
body.studio .combo-custom { gap: 12px !important; }
body.studio .combo-custom__launch { height: 44px; padding: 0 26px !important; border-radius: 999px !important; background: var(--st-acc) !important; color: var(--st-acc-ink) !important; border: 0 !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: .14em !important; text-transform: uppercase; box-shadow: none !important; transition: transform .3s var(--st-spring), background .18s; }
body.studio .combo-custom__launch:hover { background: var(--st-acc-hover) !important; transform: translateY(-2px); }
body.studio #customPreviewList { display: none !important; }
body.studio .combo-custom__fields { display: none !important; }

/* ── SHEET: chọn phòng (hàng theo loại) / tìm màu ─────────────────────────── */
.st-sheet { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--st-bg); animation: stSheet .5s var(--st-ease) both; }
.st-sheet[hidden] { display: none; }
@keyframes stSheet { from { opacity: 0; transform: translateY(16px); } }
.st-sheet__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 34px 120px 14px; }
.st-sheet__title { display: grid; gap: 6px; font-size: clamp(30px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.st-sheet__title small { font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--st-acc); }
.st-sheet__title em { font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--st-muted); margin-left: 12px; vertical-align: middle; }
.st-x { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--st-line-2); color: var(--st-text); transition: transform .3s var(--st-spring), background .2s, color .2s; }
.st-x:hover { transform: rotate(90deg); background: var(--st-acc); color: var(--st-acc-ink); }
.st-cats { display: flex; gap: 22px; padding: 6px 120px 18px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--st-line); margin: 0 120px; padding-left: 0; padding-right: 0; }
.st-cats::-webkit-scrollbar { display: none; }
.st-chip { position: relative; height: 30px; padding: 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--st-muted); white-space: nowrap; transition: color .2s; }
.st-chip::after { content: ''; position: absolute; left: 0; right: 0; bottom: -19px; height: 1.5px; background: var(--st-acc); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--st-ease); }
.st-chip:hover { color: var(--st-text); }
.st-chip.is-on { color: var(--st-acc-text); } .st-chip.is-on::after { transform: scaleX(1); }
.st-chip small { margin-left: 6px; font-weight: 600; opacity: .55; }
.st-sheet__scroll { min-height: 0; overflow-y: auto; padding: 24px 120px 60px; overscroll-behavior: contain; }
.st-row { margin-bottom: 34px; }
.st-row__t { margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--st-muted); display: flex; align-items: baseline; gap: 10px; }
.st-row__t small { font-weight: 600; letter-spacing: .1em; opacity: .7; }
.st-row__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px 0 14px; scrollbar-width: none; perspective: 1200px; }
.st-row__track::-webkit-scrollbar { display: none; }
.st-row--grid .st-row__track { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); overflow: visible; }
.st-card { position: relative; flex: 0 0 320px; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; background-size: cover; background-position: center; scroll-snap-align: start; transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateZ(0); transition: transform .4s var(--st-ease), box-shadow .4s var(--st-ease); text-align: left; padding: 0; animation: stChipIn .5s var(--st-ease) both; }
.st-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .7)); opacity: .9; transition: opacity .3s; }
.st-card:hover { box-shadow: 0 30px 60px rgba(0, 0, 0, .28); z-index: 2; }
.st-card.is-on { box-shadow: 0 0 0 2px var(--st-bg), 0 0 0 3.5px var(--st-acc); }
.st-card__n, .st-card__cat { display: none; }
.st-card__name { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .35s var(--st-ease); }
.st-card__go { position: absolute; left: 16px; bottom: 14px; z-index: 1; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #fff; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .35s var(--st-ease); }
.st-card:hover .st-card__name { transform: translateY(-20px); }
.st-card:hover .st-card__go { opacity: 1; transform: none; }
.st-card.is-on::before { content: 'ĐANG XEM'; position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 9px; border-radius: 2px; background: var(--st-acc); color: var(--st-acc-ink); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.st-card:nth-child(n+2) { animation-delay: .04s; } .st-card:nth-child(n+4) { animation-delay: .08s; } .st-card:nth-child(n+7) { animation-delay: .12s; }
/* Tìm màu: lưới swatch của engine (đổi vỏ) */
body.studio .palette-controls { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0 0 22px; position: sticky; top: 0; z-index: 1; background: var(--st-bg); padding: 4px 0 12px; }
body.studio .palette-controls input { height: 56px; border-radius: 0 !important; border: 0 !important; border-bottom: 1.5px solid var(--st-text) !important; background: transparent !important; color: var(--st-text) !important; padding: 0 !important; font-size: clamp(18px, 2vw, 26px); font-weight: 500; letter-spacing: -.02em; outline: none; }
body.studio .palette-controls input::placeholder { color: var(--st-muted); }
body.studio .palette-controls input:focus { border-color: var(--st-acc) !important; box-shadow: none; }
body.studio .palette-controls .note { height: 56px; display: grid; place-items: center; padding: 0 !important; background: transparent !important; border: 0 !important; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--st-muted) !important; }
body.studio .palette { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)) !important; gap: 10px !important; max-height: none !important; overflow: visible !important; padding: 0 !important; }
body.studio .swatch { height: 104px !important; border-radius: 4px !important; border: 0 !important; padding: 12px 14px !important; font-size: 10px !important; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .3s var(--st-spring), box-shadow .3s; }
body.studio .swatch:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 16px 34px rgba(0, 0, 0, .22); z-index: 2; }
body.studio .swatch.active { box-shadow: 0 0 0 2px var(--st-bg), 0 0 0 3.5px var(--st-acc); }
body.studio .swatch-code { font-size: 9.5px !important; letter-spacing: .12em; opacity: .7; }
body.studio .swatch-name { font-size: 12.5px !important; font-weight: 600 !important; }
body.studio .swatch-add { display: none !important; }
body.studio .swatch-info { width: 26px !important; height: 26px !important; border-radius: 50% !important; background: rgba(255, 255, 255, .85) !important; opacity: 0; transition: opacity .15s; }
body.studio .swatch:hover .swatch-info { opacity: 1; }
body.studio .swatch-info img { width: 13px !important; height: 13px !important; }

/* ── MÀN CHÀO ──────────────────────────────────────────────────────────── */
.st-intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; background: var(--st-bg); color: var(--st-text); transition: opacity .6s var(--st-ease); }
.st-intro.is-out { opacity: 0; transform: none; pointer-events: none; }
.st-intro__marquee { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1fr; gap: 18px; padding: 18px 0; opacity: .9; transform: rotate(-5deg) scale(1.18); }
.st-intro__veil { position: absolute; inset: 0; background: radial-gradient(ellipse at center, var(--st-bg) 0%, color-mix(in srgb, var(--st-bg) 84%, transparent) 40%, color-mix(in srgb, var(--st-bg) 45%, transparent) 100%); }
.st-intro__row { display: flex; gap: 18px; width: max-content; animation: stIntroRow 56s linear infinite; will-change: transform; }
.st-intro__row:nth-child(2) { animation-direction: reverse; animation-duration: 70s; }
/* Kích thước TÍNH SẴN theo chiều cao màn hình (không phải height:100% + width:auto): trước khi ảnh về, width auto = 0 →
   ảnh về mới nở ra → dải nhảy (CLS 0,9 đo trên 4G). Lưới 2 dải, padding 18px, gap 18px → mỗi dải = (100dvh − 54px) / 2. */
.st-intro__row img { --mq-h: calc((100dvh - 54px) / 2); height: var(--mq-h); width: calc(var(--mq-h) * 1.6); object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
@keyframes stIntroRow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.st-intro__body { position: relative; z-index: 1; text-align: center; padding: 0 20px; animation: stRiseIn 1s var(--st-ease) both; max-width: 1240px; }
@keyframes stRiseIn { from { opacity: 0; transform: translateY(28px); filter: blur(6px); } }
.st-intro__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--st-acc); margin-bottom: 28px; }
.st-intro__title { margin: 0; font-weight: 600; line-height: .96; letter-spacing: -.05em; font-size: clamp(56px, 8.4vw, 132px); }
/* "màu sắc." viết tay Alex Brush — cùng font với chữ "Sống" ở hero trang chủ (css/hero-demo.css .script-calligraphy).
   Font thư pháp trông nhỏ hơn sans cùng cỡ → phóng 1.3×; bỏ letter-spacing âm thừa của tiêu đề; nét mảnh nên đậm màu hơn. */
.st-intro__title em {
  font-family: 'Alex Brush', cursive; font-style: normal; font-weight: 400; letter-spacing: 0;
  /* to gấp đôi tiêu đề, nghiêng nhẹ, kéo lên đè mép dưới dòng "Sống cùng" như chữ ký tay đặt lên ảnh */
  font-size: 2.05em; line-height: .7; display: inline-block; position: relative; z-index: 1;
  margin: -.07em 0 .06em .04em; padding: .06em .14em .02em .04em; white-space: nowrap;
  transform: rotate(-3deg); transform-origin: 20% 60%;
  color: var(--st-acc);
  background: linear-gradient(110deg, var(--st-acc) 0%, var(--st-acc) 35%, #5b9370 62%, var(--st-acc) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 22px rgba(22, 32, 26, .18));
  animation: stScriptIn 1.1s cubic-bezier(.2, .8, .2, 1) .35s both, stScriptShine 5s ease-in-out 1.6s 2;   /* 2 lượt rồi thôi: animate background-position = vẽ lại chữ mỗi khung hình, để vô hạn là CPU chạy mãi trên màn chào */
}
/* nét gạch chân vẽ tay (SVG) chạy từ trái sang sau khi chữ hiện */
.st-intro__title em::after {
  content: ''; position: absolute; left: 8%; right: 4%; bottom: -.02em; height: .16em; z-index: -1;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 40' preserveAspectRatio='none'><path d='M4 28 C 90 6, 170 34, 250 16 S 370 12, 396 24' fill='none' stroke='%23315d40' stroke-width='7' stroke-linecap='round' opacity='.35'/></svg>") no-repeat left center / 100% 100%;
  clip-path: inset(0 100% 0 0); animation: stScriptLine .9s cubic-bezier(.7, 0, .3, 1) 1.15s forwards;
}
@keyframes stScriptIn { from { opacity: 0; transform: rotate(-9deg) translate(-.08em, .18em) scale(.86); filter: blur(10px) drop-shadow(0 0 0 transparent); } }
@keyframes stScriptShine { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
@keyframes stScriptLine { to { clip-path: inset(0 0 0 0); } }
html[data-theme="night"] .st-intro__title em { background-image: linear-gradient(110deg, var(--st-acc) 0%, var(--st-acc) 35%, #b9d8c2 62%, var(--st-acc) 100%); }
.st-intro__sub { margin: 26px auto 34px; max-width: 520px; font-size: clamp(14px, 1.2vw, 16px); font-weight: 500; line-height: 1.6; color: var(--st-text-2); }
.st-intro__cta { display: inline-flex; align-items: center; gap: 14px; height: 60px; padding: 0 10px 0 30px; border-radius: 999px; background: var(--st-acc); color: var(--st-acc-ink); box-shadow: 0 16px 40px var(--st-acc-glow); font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; transition: transform .3s var(--st-spring), background .2s; }
.st-intro__cta svg { width: 40px; height: 40px; padding: 11px; border-radius: 50%; background: rgba(255, 255, 255, .18); color: var(--st-acc-ink); transition: transform .3s var(--st-spring); }
.st-intro__cta:hover { transform: translateY(-3px); } .st-intro__cta:hover svg { transform: translateX(3px); }
.st-intro__meta { margin-top: 26px; font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--st-muted); }
/* chuyển cảnh: mực xanh từ nút (studio.js dismissIntro) */
.st-intro__ink { position: absolute; z-index: 5; border-radius: 50%; background: var(--st-acc); transform: translate(-50%, -50%) scale(0); pointer-events: none; will-change: transform; }
.st-intro.is-ink .st-intro__ink { transform: translate(-50%, -50%) scale(1); transition: transform .75s cubic-bezier(.5, 0, .1, 1); }
.st-intro__cta.is-pressed { transform: scale(.94); transition: transform .18s var(--st-spring); }
.st-intro.is-ink .st-intro__body > *:not(.st-intro__cta) { opacity: 0; transform: translateY(-26px); filter: blur(8px); transition: opacity .45s var(--st-ease), transform .6s var(--st-ease), filter .5s; }
.st-intro.is-ink .st-intro__cta { opacity: 0; transform: scale(1.4); transition: opacity .35s .15s, transform .5s var(--st-ease); }
.st-intro.is-ink .st-intro__marquee { transform: rotate(-5deg) scale(1.6); opacity: 0; transition: transform 1.1s cubic-bezier(.7, 0, .3, 1), opacity .8s .2s; }
.st-intro.is-ink .st-intro__veil { opacity: 0; transition: opacity .6s; }
body.studio:not(.is-entered) .st-ui, body.studio:not(.is-entered) > .st-dock, body.studio:not(.is-entered) .st-cap, body.studio:not(.is-entered) .st-float { opacity: 0; animation: none; }
body.studio.is-entered .st-ui { animation: stDrop .9s var(--st-ease) both; animation-delay: .3s; }
body.studio.is-entered > .st-dock { animation: stRise 1s var(--st-ease) both; animation-delay: .4s; }
body.studio.is-entered .st-cap, body.studio.is-entered .st-float { animation: stDrop .9s var(--st-ease) both; animation-delay: .5s; }
body.studio.is-entered .canvas-compare { animation: stCanvasIn 1.1s var(--st-ease) both; }
@keyframes stCanvasIn { from { opacity: 0; transform: scale(1.06); filter: blur(14px); } 60% { filter: blur(0); } to { opacity: 1; transform: scale(1); filter: blur(0); } }

/* ── ENGINE: modal / toast (đổi vỏ) ─────────────────────────────────────── */
body.studio .global-toast { position: fixed !important; bottom: auto !important; top: 84px; left: 50%; z-index: 90; background: var(--st-ink-glass) !important; color: var(--st-bg) !important; font-weight: 600; letter-spacing: .02em; font-size: 12.5px; text-transform: none !important; border-radius: 999px; padding: 10px 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
body.studio .global-toast.is-visible { transform: translateX(-50%) translateY(6px) !important; }
body.studio .combo-picker, body.studio .color-detail, body.studio .slot-limit-modal { position: fixed !important; z-index: 95 !important; }
body.studio .combo-picker__backdrop, body.studio .color-detail__backdrop, body.studio .slot-limit-modal__backdrop { background: var(--st-backdrop) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
body.studio .combo-picker__panel, body.studio .color-detail__panel, body.studio .slot-limit-modal__panel { background: var(--st-modal) !important; color: var(--st-text) !important; border: 1px solid var(--st-line) !important; border-radius: 8px !important; box-shadow: 0 50px 120px rgba(0, 0, 0, .35) !important; }
body.studio .combo-picker__title, body.studio .color-detail__name, body.studio .slot-limit-modal__panel h3, body.studio .combo-picker__targets-title { color: var(--st-text) !important; }
body.studio .combo-picker__actions input, body.studio .color-detail input { background: var(--st-input) !important; color: var(--st-text) !important; border: 1px solid var(--st-line-2) !important; border-radius: 4px !important; }
body.studio .combo-picker__targets { background: transparent !important; border: 1px solid var(--st-line) !important; border-radius: 6px; }
body.studio .combo-picker__item { background: var(--st-bg-2) !important; border: 1px solid var(--st-line) !important; border-radius: 6px !important; color: var(--st-text) !important; box-shadow: none !important; }
body.studio .combo-picker__item:hover { border-color: var(--st-text) !important; }
body.studio .combo-picker__meta { color: var(--st-text) !important; }
body.studio .combo-picker__meta div:last-child { color: var(--st-muted) !important; font-size: 11px; }
body.studio .combo-picker__swatch { border-radius: 50% !important; border: 1px solid var(--st-card-line) !important; }
body.studio .combo-picker__item-btn { background: var(--st-bg) !important; color: var(--st-text) !important; border: 1px solid var(--st-line-2) !important; border-radius: 999px !important; font-size: 10px !important; font-weight: 700 !important; letter-spacing: .1em; }
body.studio .combo-picker__item-btn img { filter: var(--st-icon-filter); }
body.studio .combo-target { background: var(--st-bg-2) !important; border: 1px dashed var(--st-line-2) !important; border-radius: 6px !important; color: var(--st-text); }
body.studio .combo-target.is-active { border-style: solid !important; border-color: var(--st-text) !important; box-shadow: none !important; }
body.studio .combo-target.is-dragover { background: var(--st-acc-soft) !important; border-color: var(--st-acc) !important; }
body.studio .combo-target__label { color: var(--st-muted) !important; }
body.studio .combo-target__text { color: var(--st-text-2); }
body.studio .combo-target.is-empty .combo-target__swatch { background: var(--st-line) !important; }
body.studio .btn.btn-primary, body.studio .color-detail__actions .btn-primary { background: var(--st-acc) !important; color: var(--st-acc-ink) !important; border: 0 !important; border-radius: 999px !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
body.studio .btn:not(.btn-primary) { background: transparent; color: var(--st-text); border: 1px solid var(--st-line-2); border-radius: 999px; }
body.studio .combo-picker__close, body.studio .color-detail__close { background: transparent !important; color: var(--st-text) !important; border: 1px solid var(--st-line-2) !important; border-radius: 50% !important; }
body.studio .color-detail__card, body.studio .color-detail__preview, body.studio .color-detail__section { background: var(--st-bg-2); border-color: var(--st-line) !important; border-radius: 6px; }
body.studio .color-detail__code, body.studio .color-detail__meta, body.studio .color-detail__label, body.studio .color-detail__preview-label { color: var(--st-muted) !important; }
body.studio .scene-gallery { display: none !important; }

/* ── HIỆU ỨNG (studio.js §10b) ─────────────────────────────────────────── */
body.studio .st-fx { position: absolute; left: 0; top: 0; width: var(--st-w, 100%); height: var(--st-h, 100%); z-index: 4; pointer-events: none; display: none; }
body.studio .st-fx.is-on { display: block; }
body.studio .canvas-wrap.compare-on .st-fx { display: none !important; }
.st-caption { position: absolute; left: 50%; bottom: calc(var(--st-dock-h) + 120px); z-index: 3; transform: translate(-50%, 14px) scale(.96); opacity: 0; pointer-events: none; display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; background: var(--st-ink-glass); color: var(--st-bg); box-shadow: 0 14px 34px rgba(0, 0, 0, .25); transition: opacity .28s var(--st-ease), transform .5s var(--st-spring); }
.st-caption.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.st-caption i { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.st-caption b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-caption small { font-size: 10px; font-weight: 700; opacity: .65; letter-spacing: .14em; }
/* con trỏ = giọt màu + nhãn mã/tên */
.st-brush { position: absolute; left: 0; top: 0; z-index: 5; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none; background: var(--c, #fff); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, .18), 0 8px 18px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .15s, width .15s, height .15s, margin .15s; }
.st-brush.is-on { opacity: 1; }
.st-brush.is-down { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
.st-brush::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .8); }
.st-brush span { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 0 12px rgba(0, 0, 0, .4); }
body.studio .canvas-compare::after { content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); background-size: 250% 100%; transition: opacity .2s; }
body.studio.is-switching .canvas-compare::after { opacity: 1; animation: stShimmer 1.1s linear infinite; }
@keyframes stShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 1400px) { .st-ui { padding-left: 64px; padding-right: 64px; } .st-cap { left: 64px; right: 64px; } .st-float { right: 64px; } body.studio > .st-dock { width: calc(100% - 128px); } .st-stage__inner { padding-left: 80px; padding-right: 80px; } .st-sheet__bar, .st-sheet__scroll { padding-left: 64px; padding-right: 64px; } .st-cats { margin: 0 64px; } }
@media (max-width: 1180px) { .st-round span, .st-round--acc span { display: none; } .st-round { width: 36px; padding: 0; } .st-round--acc { width: 40px; padding: 0; } .st-active { min-width: 200px; } .st-nav__a kbd { display: none; } }
@media (max-width: 900px) {
  :root { --st-dock-h: 214px; }
  .st-stage__inner { padding: 96px 12px calc(var(--st-dock-h) + 70px); }
  .st-ui { grid-template-columns: auto 1fr auto; padding: 12px 14px 0; gap: 8px; }
  .st-logo img { height: 24px; } .st-logo span { display: none; }
  .st-nav { justify-self: center; gap: 0; } .st-nav__a { padding: 0 8px; font-size: 10px; letter-spacing: .1em; } .st-nav__a[href="/"] { display: none; }
  .st-topr { gap: 4px; } .st-seg button { width: 30px; height: 30px; } .st-theme { width: 36px; height: 36px; } .st-round--acc { width: 36px; height: 36px; }
  .st-arrow { display: none; }
  .st-cap { left: 14px; right: 14px; bottom: calc(var(--st-dock-h) + 12px); flex-direction: column; align-items: stretch; gap: 8px; }
  .st-island__name { font-size: 20px; max-width: 100%; }
  .st-cap__label { display: none; }
  .st-cap__right { overflow-x: auto; scrollbar-width: none; } .st-cap__right::-webkit-scrollbar { display: none; }
  body.studio .surface-btn { height: 32px !important; font-size: 10px !important; }
  .st-float { right: 14px; top: auto; bottom: calc(var(--st-dock-h) + 96px); }
  .st-hint, .st-caption { bottom: calc(var(--st-dock-h) + 150px); font-size: 11px; max-width: calc(100% - 28px); white-space: normal; text-align: left; }
  body.studio > .st-dock { width: calc(100% - 28px); }
  .st-dock__head { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; }
  .st-modes { gap: 16px; } .st-modes button { height: 24px; font-size: 10px; }
  .st-mode--tool { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 2px; padding: 4px 0 6px; }
  .st-active { min-width: 0; max-width: none; gap: 10px; } .st-active i { width: 26px; height: 26px; } .st-active span { display: flex; align-items: baseline; gap: 8px; } .st-active b { font-size: 15px; } .st-active small { font-size: 9px; }
  .st-chips { padding: 8px 20px 8px 2px; gap: 10px; } .st-swatch { width: 40px; height: 40px; }
  .st-mode--classic { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 4px; padding: 6px 0; }
  .st-combo-side { display: flex; align-items: center; justify-content: space-between; min-width: 0; } .st-combo-side__t br { display: none; } .st-combo-side__t { font-size: 14px; }
  body.studio .combo-strip { padding: 4px 20px 6px 2px !important; }
  .st-mode--custom { padding: 8px 0; } .st-custom__t { font-size: 13px; }
  .st-sheet__bar { padding: 22px 14px 10px; } .st-sheet__title { font-size: 30px; }
  .st-cats { margin: 0 14px; gap: 16px; } .st-sheet__scroll { padding: 16px 14px 32px; }
  .st-card { flex-basis: 240px; } .st-row--grid .st-row__track { grid-template-columns: repeat(2, 1fr); }
  body.studio .palette { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important; gap: 8px !important; }
  .st-intro__title { font-size: clamp(48px, 15vw, 84px); } .st-intro__title em { font-size: min(2.05em, 26vw); margin-top: -.04em; } .st-intro__body { padding: 0 22px; } .st-intro__marquee { transform: rotate(-6deg) scale(1.3); }
}
@media (max-height: 720px) and (min-width: 901px) { :root { --st-dock-h: 156px; } .st-stage__inner { padding-top: 84px; } }
@media (prefers-reduced-motion: reduce) {
  .st-intro__row, .st-loading span, .st-hint__tap::after, .st-swatch, .st-card, body.studio .combo-square, .st-mode, .st-caption, .st-seg button.is-on svg, .st-intro__body, .st-intro__ink, .st-intro__title em, .st-intro__title em::after { animation: none !important; transition: none !important; }
  .st-intro__title em::after { clip-path: none; }
  body.studio.is-entered .st-ui, body.studio.is-entered > .st-dock, body.studio.is-entered .st-cap, body.studio.is-entered .st-float, body.studio.is-entered .canvas-compare { animation: none !important; opacity: 1; }
}
/* ── tinh chỉnh v4 ──────────────────────────────────────────────────────── */
body.studio > .st-dock { padding-bottom: 14px; box-sizing: border-box; }
body:not(.route-tool) .st-fams { display: none; }   /* họ màu chỉ có nghĩa ở "Một màu" */
@media (max-width: 900px) {
  :root { --st-dock-h: 200px; }
  .st-stage__inner { padding: 64px 12px calc(var(--st-dock-h) + 118px); }
  .st-ui { grid-template-columns: auto 1fr auto; padding: 10px 12px 0; }
  .st-nav__a { height: 32px; padding: 0 6px; white-space: nowrap; font-size: 9.5px; }
  .st-cap { bottom: calc(var(--st-dock-h) + 10px); gap: 6px; }
  .st-island { grid-template-columns: 1fr auto; }
  .st-island__cat { font-size: 9px; } .st-island__name { font-size: 18px; } .st-island__idx { font-size: 10px; }
  .st-float { top: 60px; bottom: auto; right: 12px; }
  .st-round { height: 32px; width: 32px; padding: 0; }
  .st-hint, .st-caption { bottom: calc(var(--st-dock-h) + 118px); }
  body.studio > .st-dock { padding-bottom: 8px; }
  .st-dock__head { padding-top: 8px; }
}
@media (max-width: 900px) { .st-stage__inner { padding-top: 40px; } .st-float { top: 54px; } }

/* ── §12 ATELIER — người xem đa số là dân kiến trúc: chữ serif nghiêng kiểu tạp chí cho tên phòng/tên màu/tiêu đề sheet,
   khung ảnh như tranh treo (viền chỉ + vân phim mờ), đổi phòng trượt theo hướng vuốt, số thứ tự lăn, chế độ "gallery" khi
   rảnh tay (ảnh phóng chậm, UI ẩn). Toàn bộ chỉ transform/opacity — không filter toàn màn hình, không ảnh hưởng tốc độ. ── */
/* Font tự host (sample-room/fonts, subset latin + vietnamese từ Google Fonts v21/v23). size-adjust cho fallback Georgia/Times
   để chữ đổi font không đổi bề rộng nhiều → không nhảy bố cục. */
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-i500-vi.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; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-i500-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; }
@font-face { font-family: 'Alex Brush'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/alex-brush-vi.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; }
@font-face { font-family: 'Alex Brush'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/alex-brush-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; }
@font-face { font-family: 'Cormorant fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 88%; ascent-override: 92%; descent-override: 28%; }
:root { --st-serif: 'Cormorant Garamond', 'Cormorant fallback', Georgia, serif; }
.st-island__name { font-family: var(--st-serif); font-style: italic; font-weight: 500; font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -.005em; line-height: 1; padding-right: .1em; }
.st-island__idx { font-family: var(--st-serif); font-style: italic; font-weight: 500; font-size: 15px; letter-spacing: .06em; color: var(--st-muted); display: inline-block; }
.st-island__idx.is-roll { animation: stRoll .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes stRoll { from { transform: translateY(.7em); opacity: 0; clip-path: inset(0 0 100% 0); } to { transform: none; opacity: 1; clip-path: inset(0 0 -20% 0); } }
.st-active b { font-family: var(--st-serif); font-style: italic; font-weight: 500; font-size: clamp(24px, 2.1vw, 32px); letter-spacing: 0; line-height: 1; }
.st-sheet__title { font-family: var(--st-serif); font-style: italic; font-weight: 500; font-size: clamp(44px, 5.4vw, 76px); letter-spacing: -.01em; line-height: .95; }
.st-sheet__title small { font-family: 'Montserrat', system-ui, sans-serif; font-style: normal; }
.st-sheet__title em { font-family: 'Montserrat', system-ui, sans-serif; font-style: normal; }
/* thẻ phòng: số thứ tự serif lớn mờ ở góc, hiện rõ khi rê chuột — nhịp "danh mục triển lãm" */
.st-card__no { position: absolute; right: 14px; top: 8px; z-index: 1; font-family: var(--st-serif); font-style: italic; font-weight: 500; font-size: 34px; line-height: 1; color: #fff; opacity: .6; text-shadow: 0 2px 14px rgba(0, 0, 0, .45), 0 0 2px rgba(0, 0, 0, .3); transition: opacity .3s, transform .4s var(--st-ease); }
.st-card:hover .st-card__no { opacity: 1; transform: translateY(-2px); }
/* ::before của .st-card.is-on là nhãn "ĐANG XEM" (dòng 401) — scrim trên chỉ cho thẻ thường */
.st-card:not(.is-on)::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .26), transparent 36%); opacity: .8; pointer-events: none; }
/* khung ảnh: viền chỉ mảnh + passe-partout ảo (bóng đôi) — tranh treo trên tường trắng */
body.studio .canvas-compare { box-shadow: 0 0 0 1px rgba(22, 32, 26, .10), 0 24px 60px rgba(22, 32, 26, .16), 0 2px 6px rgba(22, 32, 26, .06); }
html[data-theme="night"] body.studio .canvas-compare { box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 30px 80px rgba(0, 0, 0, .6); }
/* (vân phim SVG đã bỏ 2026-09-23: user thấy ảnh "vỡ như chất lượng kém") */
/* chế độ gallery khi rảnh: UI đã ẩn (is-idle) → ảnh phóng chậm 2,5% trong 7 s như camera tiến vào phòng; chạm là về ngay */
body.studio .canvas-compare { transition: transform .28s var(--st-ease), box-shadow .6s; }
body.studio.is-idle .canvas-compare { transform: scale(1.025); transition: transform 7s cubic-bezier(.2, .6, .2, 1), box-shadow .6s; }
/* nhãn màu vừa sơn: chữ serif nghiêng lớn trên nền tối mờ mảnh, không phải viên thuốc xanh */
.st-caption { background: rgba(16, 24, 19, .66) !important; color: #fff; padding: 10px 22px 10px 14px !important; border-radius: 999px; gap: 12px; -webkit-backdrop-filter: none; backdrop-filter: none; }
.st-caption i { width: 30px; height: 30px; }
.st-caption b { font-family: var(--st-serif); font-style: italic; font-weight: 500; font-size: 24px; letter-spacing: 0; line-height: 1; }
.st-caption small { font-family: 'Montserrat', system-ui, sans-serif; font-size: 10px; letter-spacing: .18em; opacity: .7; align-self: center; }
@media (max-width: 900px) {
  .st-island__name { font-size: 30px; } .st-active b { font-size: 26px; } .st-sheet__title { font-size: 44px; } .st-caption b { font-size: 20px; }
  body.studio.is-idle .canvas-compare { transform: none; }   /* điện thoại: không phóng (khung đã sát mép) */
}
@media (prefers-reduced-motion: reduce) { .st-island__idx.is-roll { animation: none !important; } body.studio.is-idle .canvas-compare { transform: none; } }

/* ── §13 SHEET "CHỌN MÀU KELLY-MOORE" — port giao diện modal km-picker trang chủ (css/aoc-wow.css .km-picker .km-grid):
   ô vuông 50px, khe 2px, ô đỉnh phồng 3x (150px) lộ mã/tên/nút (i) — cỡ chữ tính theo toạ độ gốc 50px (÷3). ── */
.st-km__bar { align-items: center; }
.st-km__head { min-width: 0; }
.st-km__title { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.st-km__sub { margin-top: 4px; font-size: 12.5px; color: var(--st-muted); }
.st-km__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.st-x--sm { width: 40px; height: 40px; } .st-x--sm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-x[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.st-km__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 0 120px 12px; }
.st-km__search { flex: 1 1 260px; min-width: 200px; height: 40px; border: 1px solid var(--st-line-2); border-radius: 8px; padding: 0 14px; font: 500 14px 'Montserrat', system-ui, sans-serif; background: var(--st-input); color: var(--st-text); outline: none; }
.st-km__search:focus { border-color: var(--st-acc); box-shadow: 0 0 0 3px rgba(49, 93, 64, .12); }
.st-km__fams, .st-km__bright { display: flex; flex-wrap: wrap; gap: 6px; }
.st-km__fams button, .st-km__bright button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--st-line-2); background: transparent; color: var(--st-muted); font: 600 11.5px 'Montserrat', system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.st-km__fams button i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.st-km__fams button:hover, .st-km__bright button:hover { color: var(--st-text); border-color: var(--st-text); }
.st-km__fams button.is-on, .st-km__bright button.is-on { background: var(--st-acc); color: #fff; border-color: var(--st-acc); }
.st-km__bright { border: 1px solid var(--st-line-2); border-radius: 999px; gap: 0; overflow: hidden; }
.st-km__bright button { border: 0; border-radius: 0; }
.st-km__scroll { padding-top: 10px; }
.st-km__grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); gap: 2px; justify-content: start; align-items: start; padding-bottom: 100px; overflow: visible; isolation: isolate; }
.st-km__cell { position: relative; display: block; width: 50px; height: 50px; padding: 0; margin: 0; border: 1px solid rgba(16, 22, 29, .12); border-radius: 0; text-align: left; overflow: hidden; contain: paint style; content-visibility: auto; contain-intrinsic-size: 50px 50px; transform: scale(var(--mag, 1)); transform-origin: center center; cursor: pointer;   /* KHÔNG will-change: 1.661 lớp compositor = lag cả trang; content-visibility: ô ngoài màn hình không tính style/paint */ font-family: 'Montserrat', system-ui, sans-serif; transition: transform .16s cubic-bezier(.33, 1, .68, 1), border-color .15s ease; }
.st-km__cell:hover, .st-km__cell.is-peak { border-color: var(--st-acc); outline: 2px solid var(--st-acc); outline-offset: -2px; }
.st-km__code { position: absolute; top: 5.3px; left: 5.3px; font-size: 4.3px; font-weight: 400; letter-spacing: .02em; opacity: 0; pointer-events: none; transition: opacity .16s ease .04s; }
.st-km__name { position: absolute; top: 10.6px; left: 5.3px; right: 5.3px; font-size: 6.7px; font-weight: 400; line-height: 1.15; white-space: normal; overflow: visible; word-break: break-word; opacity: 0; pointer-events: none; transition: opacity .16s ease .04s; }
.st-km__cell.is-peak .st-km__code { opacity: .92; }
.st-km__cell.is-peak .st-km__name { opacity: 1; }
.st-km__info { position: absolute; bottom: 4px; right: 4px; width: 7.3px; height: 7.3px; display: grid; place-items: center; color: inherit; opacity: 0; border-radius: 50%; pointer-events: none; cursor: pointer; transition: opacity .16s ease .04s, background .12s ease; }
.st-km__info svg { pointer-events: none; width: 60%; height: 60%; }
.st-km__cell.is-peak .st-km__info { opacity: .85; pointer-events: auto; }
.st-km__info:hover { opacity: 1; background: rgba(255, 255, 255, .35); }
.st-km__cell.is-dark .st-km__info:hover { background: rgba(0, 0, 0, .28); }
.st-km__cell.is-dark { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.st-km__empty { grid-column: 1 / -1; padding: 28px 0; color: var(--st-muted); font-size: 14px; }
html[data-theme="night"] .st-km__cell { border-color: rgba(255, 255, 255, .10); }
@media (max-width: 1400px) { .st-km__tools { padding-left: 64px; padding-right: 64px; } }
/* Cảm ứng / giảm chuyển động: không phồng — ô to sẵn để đọc được mã/tên, nút (i) luôn bấm được */
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .st-km__cell { transform: none !important; transition: border-color .15s ease !important; }
  .st-km__code, .st-km__name { opacity: .92 !important; }
  .st-km__info { opacity: .55 !important; pointer-events: auto !important; }
}
@media (max-width: 900px) {
  .st-km__tools { padding: 0 14px 10px; } .st-km__title { font-size: 18px; } .st-km__sub { font-size: 11.5px; }
  .st-km__fams { flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }   /* 1 hàng cuộn ngang, đỡ chiếm chỗ lưới */
  .st-km__fams button { flex: 0 0 auto; }
  .st-km__grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 3px; padding-bottom: 40px; }
  .st-km__cell { width: auto; height: auto; aspect-ratio: 1; }
  .st-km__code { top: 7px; left: 7px; font-size: 9.5px; } .st-km__name { top: 20px; left: 7px; right: 7px; font-size: 11.5px; font-weight: 500; }
  .st-km__info { width: 18px; height: 18px; bottom: 5px; right: 5px; }
}

/* ══ §14. Bảng "Tự phối combo" — dùng lại lưới ô vuông của bảng chọn màu (§13) ══
   Markup .combo-picker__item của engine không còn được dựng nữa (studio.js §6c ghi đè renderComboPicker),
   chỉ cần bố cục panel + thanh lọc + khung cuộn. */
body.studio .combo-picker__panel { width: min(1180px, 96vw) !important; max-height: 92% !important; grid-template-rows: auto auto auto minmax(0, 1fr) !important; padding: 18px 18px 8px !important; }
body.studio .st-km__tools--combo { padding: 0 !important; gap: 8px 12px; }
body.studio .st-km__tools--combo .st-km__fams button, body.studio .st-km__tools--combo .st-km__bright button { height: 28px; font-size: 11px; }
body.studio .st-combo__scroll { overflow: auto; min-height: 0; padding-top: 8px; }
body.studio .st-combo__scroll .st-km__grid { overflow: visible; padding-bottom: 60px; }
/* Khu 3 ô đích gọn lại để chừa chỗ cho lưới màu (trước đây cao ~180px). */
body.studio .combo-picker__targets { padding: 10px 12px !important; }
body.studio .combo-picker__targets-grid { gap: 8px; }
body.studio .combo-target { min-height: 64px !important; padding: 8px !important; }
body.studio .combo-target__swatch { height: 16px; }
body.studio .combo-picker__targets-actions #customComboApply { width: auto; padding: 10px 22px; }
@media (max-width: 900px) {
  body.studio .combo-picker__panel { width: 100vw !important; max-height: 100% !important; height: 100%; border-radius: 0 !important; padding: 12px 12px 4px !important; }
  body.studio .combo-target { min-height: 56px !important; }
  body.studio .combo-picker__targets-title { font-size: 10px; }
}
/* Panel là grid 1 cột: cột mặc định rộng theo max-content của 3 ô đích → tràn ngang trên điện thoại. */
body.studio .combo-picker__panel { grid-template-columns: minmax(0, 1fr) !important; }
@media (max-width: 900px) {
  /* index.css xếp 3 ô đích thành 1 cột dọc → chiếm hơn nửa màn, lưới màu bị đẩy xuống. Giữ 3 cột, bỏ chữ gợi ý. */
  body.studio .combo-picker__targets-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px; }
  body.studio .combo-target { min-height: 0 !important; padding: 6px !important; }
  body.studio .combo-target__label { font-size: 9px; }
  body.studio .combo-target__text { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.studio .combo-target.is-empty .combo-target__text { display: none; }
  body.studio .combo-picker__targets-actions #customComboApply { width: 100%; padding: 9px 12px; font-size: 11px; }
}

/* ── §14 Gợi ý chỗ chạm để sơn (studio.js §10c, 01/10/2026). Chấm trắng = đúng điểm chạm; bong bóng thùng sơn viền
   chấm nằm cạnh để mắt bắt được "đây là chỗ bấm". Nằm TRONG .canvas-compare nên phóng/thu theo ảnh (kể cả hiệu ứng
   phóng chậm khi rảnh). Ẩn khi đang so sánh trước/sau và khi đang đổi phòng. ── */
body.studio .st-hs-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
body.studio .st-hs-layer.is-hidden,
body.studio .canvas-wrap.compare-on .st-hs-layer,
body.studio.is-switching .st-hs-layer { display: none; }
body.studio .st-hs { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; }
body.studio .st-hs__dot { position: absolute; left: 0; top: 0; width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px rgba(22, 32, 26, .55), 0 3px 10px rgba(0, 0, 0, .35); }
body.studio .st-hs__bucket { position: absolute; left: 22px; top: 0; width: 46px; height: 46px; transform: translate(0, -50%); border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #16201a; border: 2px dashed #16201a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28); transition: transform .25s var(--st-ease), background .2s, color .2s; }
/* Nhịp "mời bấm" bằng vòng lan TRANSFORM + OPACITY (GPU) — bản đầu animate box-shadow, buộc vẽ lại mỗi khung hình
   cho cả 3 điểm, chạy vô hạn (đo: phần lớn CPU lúc Sơn thử đứng yên trên điện thoại). */
body.studio .st-hs__bucket::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #fff;
  opacity: 0; pointer-events: none; will-change: transform, opacity; animation: stHsPulse 2.4s ease-out infinite; }
body.studio .st-hs__bucket svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.studio .st-hs.is-flip .st-hs__bucket { left: auto; right: 22px; }
body.studio .st-hs__tip { position: absolute; left: 22px; top: 30px; white-space: nowrap; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; background: rgba(22, 32, 26, .82); color: #fff; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; pointer-events: none; }
body.studio .st-hs.is-flip .st-hs__tip { left: auto; right: 22px; }
body.studio .st-hs:hover .st-hs__bucket, body.studio .st-hs:focus-visible .st-hs__bucket { transform: translate(0, -50%) scale(1.1); background: var(--st-acc); color: #fff; border-color: #fff; }
body.studio .st-hs:hover .st-hs__bucket::after { animation: none; }
body.studio .st-hs:hover .st-hs__tip, body.studio .st-hs:focus-visible .st-hs__tip { opacity: 1; transform: none; }
body.studio .st-hs.is-active .st-hs__dot { box-shadow: 0 0 0 3px var(--st-acc), 0 3px 10px rgba(0, 0, 0, .35); }
body.studio .st-hs.is-active .st-hs__bucket { border-color: var(--st-acc); color: var(--st-acc); }
@keyframes stHsPulse { 0% { transform: scale(1); opacity: .85; } 60%, 100% { transform: scale(1.45); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { body.studio .st-hs__bucket::after { animation: none; } }
@media (max-width: 900px) {
  body.studio .st-hs__dot { width: 14px; height: 14px; }
  body.studio .st-hs__bucket { width: 36px; height: 36px; left: 16px; }
  body.studio .st-hs.is-flip .st-hs__bucket { right: 16px; }
  body.studio .st-hs__bucket svg { width: 16px; height: 16px; }
}
body.studio #stTips:not(.is-on) { opacity: .7; }
/* Màn chào còn che (chưa bấm "Bắt đầu sơn thử") → các điểm gợi ý nằm dưới, không ai thấy: đừng chạy nhịp lan. */
body.studio:not(.is-entered) .st-hs__bucket::after { animation: none; }
