/* castomo lab: the customiser shell. One stylesheet for every product; a product brings its accent (--accent on
   <html>), its theme (data-theme) and its layout (data-layout = split | drawer). */

:root {
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #ffffff;
  --bg2: #f5f5f7;
  --bg3: #ececf0;
  --ink: #1d1d1f;
  --ink2: #3a3a3f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line2: #e6e6eb;
  --card: #ffffff;
  --brand-in: #ffffff;
  --accent: #2563eb;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, var(--bg));
  --accent-line: color-mix(in srgb, var(--accent) 55%, var(--line));
  --on-accent: #ffffff;
  --ok: #1a7f37;
  --warn: #b45309;
  --stage-bg: radial-gradient(120% 90% at 50% 38%, #ffffff 0%, #f3f3f6 58%, #e8e8ee 100%);
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16, 18, 27, .06), 0 2px 10px rgba(16, 18, 27, .05);
  --shadow-2: 0 10px 40px rgba(16, 18, 27, .14), 0 2px 8px rgba(16, 18, 27, .06);
  --top-h: 60px;
  --bar-h: 84px;
  --rail-w: clamp(380px, 33vw, 500px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0c10;
  --bg2: #14161c;
  --bg3: #1d2028;
  --ink: #f3f4f7;
  --ink2: #d5d7de;
  --muted: #9a9eab;
  --line: #2d313c;
  --line2: #232731;
  --card: #14161c;
  --brand-in: #0b0c10;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--bg));
  --accent-line: color-mix(in srgb, var(--accent) 70%, var(--line));
  --stage-bg: radial-gradient(120% 90% at 50% 40%, #2a2d39 0%, #14161d 55%, #08090c 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 64px); }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { display: block; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ the top bar */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(14px, 2.2vw, 28px); background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-bottom: 1px solid var(--line2);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; }
.brand b { font-weight: 700; }
.crumb { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; transition: border-color .2s, background .2s, transform .15s;
}
.pill:hover { border-color: var(--ink2); }
.pill svg { width: 17px; height: 17px; fill: currentColor; }
.ai-btn { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--card)); border-color: var(--accent-line); }
.ai-btn svg { fill: var(--accent); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 0; background: transparent;
  transition: background .2s;
}
.icon-btn:hover { background: var(--bg2); }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.people { position: absolute; right: -2px; top: -2px; display: flex; }
.people i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); color: #fff; font: 700 9px/16px var(--font); text-align: center; font-style: normal; border: 2px solid var(--bg); margin-left: -6px; }
.lang { height: 32px; min-width: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; }
.concept {
  position: sticky; top: var(--top-h); z-index: 30; padding: 9px clamp(14px, 2.2vw, 28px); font-size: 13px; color: var(--ink2);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 7%, var(--bg)) 0 12px, var(--bg) 12px 24px); border-bottom: 1px solid var(--line2);
}
.concept b { color: var(--ink); }

/* ------------------------------------------------------------ split layout: the still product, the scrolling options */
.cz { position: relative; }
[data-layout="split"] .cz { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); align-items: start; }
.stage { position: relative; background: var(--stage-bg); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
[data-layout="split"] .stage { position: sticky; top: calc(var(--top-h) + var(--concept-h, 0px)); height: calc(100dvh - var(--top-h) - var(--concept-h, 0px) - var(--bar-h)); }
.viewport { position: absolute; inset: 0; }
.viewport > canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }
.stage-tools { position: absolute; top: 16px; display: flex; gap: 8px; z-index: 5; }
.stage-tools.left { left: 16px; }
.stage-tools.right { right: 16px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 10px; justify-content: center; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-1); transition: transform .15s var(--ease), opacity .2s;
}
.tool:hover:not(:disabled) { transform: translateY(-1px); }
.tool:disabled { opacity: .35; cursor: default; box-shadow: none; }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dice .pips circle { fill: currentColor; stroke: none; }
.dice.rolling svg { animation: roll .6s var(--ease); }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(.82); } 100% { transform: rotate(360deg) scale(1); } }
.stage-views {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 5; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-1); max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none;
}
.stage-views button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.stage-views button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.hint { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 4; font-size: 12.5px; color: var(--muted); pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.hint.gone { opacity: 0; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; background: var(--stage-bg); transition: opacity .5s; }
.loading.done { opacity: 0; pointer-events: none; }
.loading.failed::after { content: 'Could not start the preview.'; position: absolute; bottom: 40%; color: var(--muted); }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.peer { position: absolute; z-index: 7; pointer-events: none; transform: translate(-50%, -50%); transition: left .12s linear, top .12s linear; }
.peer i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.peer span { position: absolute; left: 14px; top: 10px; padding: 2px 7px; border-radius: 7px; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }

.rail { position: relative; min-width: 0; padding: 36px clamp(22px, 2.6vw, 44px) calc(var(--bar-h) + 40px); background: var(--bg); }
.grab { display: none; }
.rail-head { margin-bottom: 18px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.rail-head h1 { margin: 0; font-size: clamp(30px, 2.8vw, 40px); line-height: 1.06; letter-spacing: -.025em; font-weight: 700; }
.tagline { margin: 10px 0 0; font-size: 17px; color: var(--ink2); }
.from { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }
.highlights { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.highlights li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; background: var(--bg2); font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.highlights li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/10px no-repeat; }

.steps {
  position: sticky; top: calc(var(--top-h) + var(--concept-h, 0px)); z-index: 10; display: flex; gap: 6px; margin: 0 calc(-1 * clamp(22px, 2.6vw, 44px)); padding: 12px clamp(22px, 2.6vw, 44px);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid transparent; transition: border-color .2s;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}
.steps.stuck { border-bottom-color: var(--line2); }
.steps::-webkit-scrollbar, .stage-views::-webkit-scrollbar { display: none; }
.steps button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s var(--ease);
}
.steps button .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-size: 11.5px; color: var(--ink2); transition: all .2s; }
.steps button.seen .n { background: color-mix(in srgb, var(--ok) 14%, var(--bg)); color: var(--ok); }
.steps button[aria-current="step"] { color: var(--ink); border-color: var(--ink); }
.steps button[aria-current="step"] .n { background: var(--ink); color: var(--bg); }
.steps svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.step { padding: 34px 0 8px; border-bottom: 1px solid var(--line2); }
.step:last-child { border-bottom: 0; }
.step-k { margin: 0; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.step h2 { margin: 6px 0 18px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.opt { margin: 0 0 24px; }
.opt-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; min-height: 20px; }
.opt-h b { font-size: 14.5px; font-weight: 650; }
.opt-h .val { color: var(--muted); font-size: 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-h .peers { display: inline-flex; gap: 3px; }
.peerdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg); }
.opt-help { margin: -4px 0 10px; color: var(--muted); font-size: 13px; }
.opt.flash { animation: flash 1.1s var(--ease); }
@keyframes flash { 0%, 100% { background: transparent; } 30% { background: var(--accent-soft); } }

/* cards */
.cards { display: grid; gap: 10px; }
.cards.two { grid-template-columns: 1fr 1fr; }
.card {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 14px; width: 100%; padding: 16px 18px; text-align: left;
  border-radius: var(--r); border: 1.5px solid var(--line); background: var(--card); transition: border-color .18s, box-shadow .18s, background .18s;
}
.card:hover { border-color: var(--ink2); }
.card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.card .t { font-weight: 650; font-size: 15.5px; letter-spacing: -.005em; }
.card .s { grid-column: 1; color: var(--muted); font-size: 13.5px; }
.card .sp { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.card .p { grid-row: 1 / span 3; grid-column: 2; font-size: 14px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.card .p.zero { color: var(--muted); font-weight: 500; }
.card .badge { position: absolute; top: -9px; right: 14px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; }
.card .ico { grid-row: 1 / span 3; width: 42px; height: 42px; border-radius: 12px; background: var(--bg2); display: grid; place-items: center; }
.card.with-ico { grid-template-columns: auto 1fr auto; }
.card.with-ico .t, .card.with-ico .s, .card.with-ico .sp { grid-column: 2; }
.card.with-ico .p { grid-column: 3; }
.card .ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: transparent; transition: transform .15s var(--ease);
}
.sw::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 0 -6px 10px rgba(0,0,0,.08), inset 0 5px 8px rgba(255,255,255,.25); }
.sw::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; transition: border-color .15s; }
.sw:hover { transform: scale(1.06); }
.sw[aria-pressed="true"]::after { border-color: var(--ink); }
.sw.none::before { background: linear-gradient(135deg, transparent 46%, #d23 46% 54%, transparent 54%), var(--bg2); }
.sw .pr { position: absolute; right: -4px; top: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 9.5px; font-weight: 700; line-height: 16px; }
.swatches.big .sw { width: 54px; height: 54px; border-radius: 14px; }
.swatches.big .sw::before { border-radius: 11px; }
.swatches.big .sw::after { border-radius: 14px; }

/* chips, toggles */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 14px; font-weight: 550; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--ink2); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.chip small { color: var(--muted); font-weight: 500; }
.chip.tog::before { content: ''; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line); background: var(--card) center/11px no-repeat; transition: all .15s; }
.chip.tog[aria-pressed="true"]::before { border-color: var(--accent); background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* fonts, icons, patterns, themes */
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.fontbtn { padding: 12px 10px 10px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); text-align: center; transition: border-color .15s, background .15s; }
.fontbtn .smp { display: block; font-size: 24px; line-height: 1.25; min-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fontbtn small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-family: var(--font); }
.fontbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.iconbtn { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); font-size: 11.5px; color: var(--muted); transition: border-color .15s, background .15s; }
.iconbtn svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: 0 0 0 1px var(--accent) inset; }
.iconbtn .pr { font-size: 10.5px; font-weight: 700; color: var(--ink2); }
.patterns { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.patbtn { padding: 0; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); overflow: hidden; transition: border-color .15s; }
.patbtn canvas { display: block; width: 100%; aspect-ratio: 1; }
.patbtn small { display: block; padding: 4px 2px 6px; font-size: 11.5px; color: var(--muted); }
.patbtn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.themebtn { padding: 0; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); overflow: hidden; text-align: left; }
.themebtn i { display: block; height: 52px; background: var(--sw); }
.themebtn small { display: block; padding: 6px 8px 7px; font-size: 12px; color: var(--ink2); font-weight: 600; }
.themebtn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* inputs */
.field { position: relative; display: flex; align-items: center; gap: 8px; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); font-size: 16px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; font-variant-numeric: tabular-nums; }
.field.multi .count { top: auto; bottom: 10px; transform: none; }
.input.has-count { padding-right: 58px; }
.select { appearance: none; -webkit-appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center/18px no-repeat; padding-right: 40px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; }
.stepper button:hover { background: var(--bg2); }
.stepper input { width: 84px; height: 44px; border: 0; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; background: transparent; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.unit { color: var(--muted); font-size: 14px; }
.range { width: 100%; accent-color: var(--accent); }
.qtybox { display: grid; gap: 10px; }
.qtybox .row { display: flex; align-items: center; gap: 12px; }
.marks { display: flex; flex-wrap: wrap; gap: 6px; }
.marks button { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.marks button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tierhint { font-size: 13px; color: var(--ok); font-weight: 600; }
.colorrow { display: flex; align-items: center; gap: 12px; }
.colorrow input[type=color] { width: 54px; height: 44px; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; background: none; }
.drop {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); border: 1.5px dashed var(--line);
  background: var(--bg2); transition: border-color .15s, background .15s; cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--card) center/contain no-repeat; display: grid; place-items: center; border: 1px solid var(--line2); }
.drop .thumb svg { width: 26px; height: 26px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop b { display: block; font-size: 14.5px; }
.drop small { color: var(--muted); font-size: 12.5px; }
.drop .rm { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--card); font-size: 18px; }

/* the recap at the end of the rail */
.recap { margin-top: 30px; padding: 22px; border-radius: var(--r-lg); background: var(--bg2); }
.recap h3 { margin: 0 0 12px; font-size: 19px; letter-spacing: -.01em; }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines td { padding: 6px 0; vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.lines tr.tot td { padding-top: 12px; border-top: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.lines tr.vat td { color: var(--muted); font-size: 13px; padding-top: 0; }
.specs { margin: 12px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; font-size: 13px; color: var(--ink2); }
.specs li { break-inside: avoid; padding: 3px 0; }
.specs b { font-weight: 600; color: var(--muted); }

/* ------------------------------------------------------------ the buy bar */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px;
  min-height: var(--bar-h); padding: 12px clamp(14px, 2.2vw, 28px) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line2);
}
.bb-info { min-width: 0; }
.bb-delivery { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bb-delivery::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.bb-delivery em { font-style: normal; color: var(--ok); }
.bb-sub { margin-top: 2px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-price { text-align: right; line-height: 1.15; }
.bb-price b { display: block; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: color .3s; }
.bb-price b.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.06); color: var(--accent); } }
.bb-price small { color: var(--muted); font-size: 12px; }
.bb-actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 650; font-size: 15px; transition: transform .15s var(--ease), background .2s, box-shadow .2s; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 32%, transparent); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink2); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ------------------------------------------------------------ drawer layout: the product takes the screen */
[data-layout="drawer"] body { overflow: hidden; }
[data-layout="drawer"] .stage { position: fixed; inset: calc(var(--top-h) + var(--concept-h, 0px)) 0 var(--bar-h) 0; }
[data-layout="drawer"] .rail {
  position: fixed; z-index: 30; left: 50%; bottom: calc(var(--bar-h) + 10px); transform: translateX(-50%); width: min(1060px, calc(100% - 28px));
  max-height: min(36dvh, 330px); display: flex; flex-direction: column; padding: 0; border-radius: var(--r-lg); background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line2); box-shadow: var(--shadow-2);
  transition: max-height .35s var(--ease);
}
[data-layout="drawer"] .rail-head, [data-layout="drawer"] .recap { display: none; }
[data-layout="drawer"] .steps { position: relative; top: 0; margin: 0; padding: 10px 12px; background: transparent; backdrop-filter: none; border-bottom: 1px solid var(--line2); flex: none; }
[data-layout="drawer"] .steps button { height: 38px; padding: 0 14px 0 10px; }
[data-layout="drawer"] .steps button .n { display: none; }
[data-layout="drawer"] .sections { overflow-y: auto; padding: 4px 20px 6px; overscroll-behavior: contain; }
[data-layout="drawer"] .step { display: none; padding: 14px 0 0; border: 0; }
[data-layout="drawer"] .step.active { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 28px; }
[data-layout="drawer"] .step-k, [data-layout="drawer"] .step h2 { display: none; }
[data-layout="drawer"] .opt { margin-bottom: 16px; }
[data-layout="drawer"] .rail.folded { max-height: 59px; }
[data-layout="drawer"] .rail.folded .sections { visibility: hidden; }
[data-layout="drawer"] .grab { display: block; position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 46px; height: 22px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9eab' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 14l5-5 5 5'/%3E%3C/svg%3E") center/16px no-repeat; transform-origin: center; }
[data-layout="drawer"] .rail:not(.folded) .grab { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9eab' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); }
[data-layout="drawer"] .stage-views { bottom: auto; top: 16px; }
[data-layout="drawer"] .hint { bottom: auto; top: 66px; }
[data-layout="drawer"] .swatches .sw { width: 44px; height: 44px; }

/* ------------------------------------------------------------ chat: the dock (sofas-ai) with two tabs (planthy-ai)
   Folded it is its head only: the spark, "Ask AI", a line under it, the people in the room. On a computer it sits at
   the stage's top right, under the AR and picture tools (clear of the view buttons and the drawer); on a phone it is a
   round button that opens a bottom sheet. */
.chat {
  position: fixed; z-index: 45; right: calc(var(--rail-w) + 16px); top: calc(var(--top-h) + var(--concept-h, 0px) + 66px); width: min(390px, calc(100% - var(--rail-w) - 32px));
  max-height: calc(100dvh - var(--top-h) - var(--concept-h, 0px) - var(--bar-h) - 90px); display: flex; flex-direction: column;
  border-radius: var(--r-lg); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line2); box-shadow: var(--shadow-2); overflow: hidden; transition: width .25s var(--ease);
}
.chat.folded { width: auto; max-width: min(340px, calc(100% - var(--rail-w) - 32px)); }
[data-layout="drawer"] .chat { right: 16px; top: calc(var(--top-h) + var(--concept-h, 0px) + 66px); width: min(390px, calc(100% - 32px)); max-height: calc(100dvh - var(--top-h) - var(--concept-h, 0px) - var(--bar-h) - 90px); }
[data-layout="drawer"] .chat.folded { max-width: 320px; }
.chat-head { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 14px 11px 11px; border: 0; background: transparent; text-align: left; }
.chat-head:hover .spark { transform: rotate(-8deg) scale(1.05); }
.spark { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #ff7ad9)); transition: transform .25s var(--ease); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.spark svg { width: 19px; height: 19px; fill: #fff; }
.chat-titles { flex: 1; min-width: 0; }
.chat-titles b { display: block; font-size: 15px; }
.chat-titles small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; transform: rotate(180deg); }
.chat.folded .chev { transform: none; }
.chat.folded .chat-body { display: none; }
.dock-people { display: flex; padding-left: 6px; }
.dock-people i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; font: 700 11px/24px var(--font); text-align: center; font-style: normal; margin-left: -6px; box-shadow: 0 0 0 2px var(--card); }
.chat-body { display: flex; flex-direction: column; min-height: 0; min-width: 0; flex: 1; border-top: 1px solid var(--line2); }
.chat-tabs { display: flex; gap: 4px; padding: 8px 10px 0; }
.chat-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 10px 10px 0 0; background: transparent; font-size: 13.5px; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; }
.chat-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.chat-tabs .tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 11px/18px var(--font); font-style: normal; }
.chat-view { display: flex; flex-direction: column; min-height: 0; flex: 1; border-top: 1px solid var(--line2); }
.room-join { display: grid; gap: 12px; padding: 16px; overflow-y: auto; }
.room-join .lead { margin: 0; color: var(--ink2); font-size: 14px; }
.room-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink2); }
.room-points li { display: flex; gap: 8px; align-items: flex-start; }
.room-points li::before { content: ''; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/10px no-repeat; }
.room-join label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.room-join input { height: 44px; padding: 0 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font-size: 16px; outline: none; }
.room-join input:focus { border-color: var(--accent); }
.room-in { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.room-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line2); background: var(--bg2); }
.room-bar .chip { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.members { flex: 1; min-width: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.members i { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--card); font-style: normal; font-size: 12px; font-weight: 600; }
.members i::before { content: attr(data-i); width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 10.5px; }
.conn { padding: 8px 14px; background: #fff4e5; color: #8a4b00; font-size: 13px; }
.log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; min-height: 180px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line2); border-top-left-radius: 5px; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--bg); border-top-right-radius: 5px; }
.msg.other { align-self: flex-start; background: color-mix(in srgb, var(--c, #888) 13%, var(--bg)); border-top-left-radius: 5px; }
.msg .who { display: block; font-size: 11.5px; font-weight: 700; color: var(--c, var(--muted)); margin-bottom: 2px; }
.msg img { display: block; max-width: 100%; border-radius: 10px; margin-top: 6px; }
.msg .meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 12.5px; font-weight: 600; color: var(--ok); }
.msg .meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sys { align-self: center; color: var(--muted); font-size: 12px; text-align: center; }
.typing { align-self: flex-start; display: flex; align-items: center; gap: 4px; padding: 10px 13px; border-radius: 16px; background: var(--bg2); font-size: 12.5px; color: var(--muted); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.voice-status { margin: 0 14px 8px; padding: 7px 11px; border-radius: 10px; background: var(--accent-soft); color: var(--ink2); font-size: 12.5px; font-weight: 600; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.sugg button { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); font-size: 13px; font-weight: 550; color: var(--ink); text-align: left; }
.sugg button:hover { border-color: var(--accent); }
.pending { position: relative; margin: 0 14px 8px; width: 70px; }
.pending img { width: 70px; height: 54px; object-fit: cover; border-radius: 10px; }
.pending button { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid var(--line2); }
.composer textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 120px; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); resize: none; outline: none; font-size: 15px; }
.composer textarea:focus { border-color: var(--accent); }
.photo, .send, .ai-toggle, .mic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 0; cursor: pointer; }
.photo, .mic { background: var(--bg2); color: var(--ink2); }
.photo svg, .mic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mic[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.mic[data-phase="listening"] { animation: listen 1.3s ease-in-out infinite; }
.mic[data-phase="speaking"] { background: var(--ok); }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.send { background: var(--accent); }
.send svg { width: 18px; height: 18px; fill: var(--on-accent); }
.ai-toggle { width: auto; padding: 0 10px; font-weight: 800; font-size: 12px; background: var(--bg2); color: var(--muted); }
.ai-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent) inset; }

/* ------------------------------------------------------------ dialogs */
.modal { border: 0; padding: 0; background: transparent; max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
.modal::backdrop { background: rgba(10, 12, 18, .45); backdrop-filter: blur(4px); }
.modal[open] .modal-card { animation: pop .25s var(--ease); }
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } }
.modal-card { width: 460px; max-width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 22px 24px 24px; border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-2); display: grid; gap: 14px; }
.modal-card.wide { width: 880px; }
.modal-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-card h2 { margin: 0; font-size: 21px; letter-spacing: -.015em; }
.modal-card .x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg2); font-size: 20px; line-height: 1; }
.modal-card label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.modal-card label input, .modal-card label textarea { height: 46px; padding: 0 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font-size: 16px; font-weight: 400; outline: none; }
.modal-card label textarea { height: auto; padding: 10px 13px; resize: vertical; }
.modal-card label input:focus, .modal-card label textarea:focus { border-color: var(--accent); }
.modal-card label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--muted); }
.modal-card label.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.modal-card .lead { margin: 0; color: var(--ink2); }
.modal-card .b2b { display: none; }
[data-b2b] .modal-card .b2b { display: grid; }
.demo-note { margin: 0; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--bg2); }
.err { margin: 0; color: #c0262d; font-size: 13.5px; min-height: 1em; }
.err:empty { display: none; }
.order-total { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--bg2); font-size: 14px; }
.order-total b { font-size: 20px; }
.summary { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
.summary .shot { border-radius: 16px; background: #f4f4f6; overflow: hidden; aspect-ratio: 14 / 11; align-self: start; }
.summary .shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.summary h3 { margin: 0 0 4px; font-size: 20px; }
.summary .deliv { margin: 10px 0 14px; font-size: 14px; color: var(--ok); font-weight: 600; }
.summary .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.summary .acts .btn { height: 44px; padding: 0 18px; font-size: 14px; }
.qr { display: grid; place-items: center; padding: 14px; border-radius: 16px; background: #fff; }
.qr svg, .qr img { width: 220px; height: 220px; }
.ar-files { display: flex; gap: 8px; justify-content: center; }
.done-ok { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 6px 0; }
.done-ok .tick { width: 58px; height: 58px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, var(--bg)); display: grid; place-items: center; }
.done-ok .tick svg { width: 30px; height: 30px; fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done-ok p { margin: 0; color: var(--ink2); }

/* ------------------------------------------------------------ toasts */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--bar-h) + 18px); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 24px); }
.toast { padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 550; box-shadow: var(--shadow-2); animation: toast .3s var(--ease); max-width: 100%; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .3s; }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } }
[data-layout="drawer"] .toasts { bottom: auto; top: calc(var(--top-h) + 66px); }

.nojs { padding: 40px; text-align: center; }

/* ------------------------------------------------------------ phones and small tablets */
@media (max-width: 960px) {
  :root { --top-h: 54px; --bar-h: 70px; }
  .brand span, .ai-btn span { display: none; }
  .ai-btn { width: 38px; padding: 0; justify-content: center; }
  [data-layout="split"] .cz { display: block; }
  [data-layout="split"] .stage { position: sticky; top: calc(var(--top-h) + var(--concept-h, 0px)); z-index: 20; height: clamp(260px, 44svh, 480px); box-shadow: 0 8px 20px -14px rgba(0,0,0,.35); }
  .stage-tools { top: 10px; } .stage-tools.left { left: 10px; } .stage-tools.right { right: 10px; }
  .tool { height: 36px; min-width: 36px; padding: 0 8px; border-radius: 11px; }
  .tool span { display: none; }
  .stage-views { bottom: 10px; }
  .stage-views button { height: 28px; padding: 0 11px; font-size: 12.5px; }
  .hint { display: none; }
  .rail { padding: 22px 18px calc(var(--bar-h) + 30px); }
  .steps { top: calc(var(--top-h) + var(--concept-h, 0px) + clamp(260px, 44svh, 480px)); margin: 0 -18px; padding: 10px 18px; }
  .concept { font-size: 12px; padding: 6px 14px; }
  html { scroll-padding-top: calc(var(--top-h) + clamp(260px, 44svh, 480px) + 60px); }
  .rail-head h1 { font-size: 28px; }
  .tagline { font-size: 15.5px; }
  .step { padding-top: 26px; }
  .step h2 { font-size: 22px; }
  .buybar { grid-template-columns: 1fr auto; gap: 10px; }
  .bb-actions .ghost { display: none; }
  .bb-price { text-align: left; grid-row: 1; grid-column: 1; }
  .bb-info { grid-row: 2; grid-column: 1 / -1; display: none; }
  .bb-price b { font-size: 21px; display: inline; }
  .bb-price small { display: block; }
  .btn { height: 46px; padding: 0 20px; }
  .chat, [data-layout="drawer"] .chat { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: min(80dvh, 660px); max-height: none; border-radius: 22px 22px 0 0; }
  .chat.folded, [data-layout="drawer"] .chat.folded { left: auto; right: 12px; bottom: calc(var(--bar-h) + 12px); width: auto; max-width: none; height: auto; border-radius: 16px; }
  [data-layout="drawer"] .chat.folded { top: calc(var(--top-h) + var(--concept-h, 0px) + 104px); bottom: auto; }
  [data-layout="split"] .chat.folded { top: calc(var(--top-h) + var(--concept-h, 0px) + 56px); bottom: auto; right: 10px; }
  .chat.folded .chat-titles, .chat.folded .chev { display: none; }
  .chat.folded .chat-head { padding: 6px; }
  .chat.folded .dock-people { padding: 0 4px 0 0; }
  .summary { grid-template-columns: 1fr; }
  .specs { columns: 1; }
  .cards.two { grid-template-columns: 1fr; }
  [data-layout="drawer"] .rail { left: 0; right: 0; bottom: var(--bar-h); transform: none; width: 100%; border-radius: 20px 20px 0 0; max-height: 40dvh; border-left: 0; border-right: 0; }
  [data-layout="drawer"] .sections { padding: 2px 14px 6px; }
  [data-layout="drawer"] .step.active { grid-template-columns: 1fr; }
  [data-layout="drawer"] .stage { bottom: var(--bar-h); }
  [data-layout="drawer"] .stage-views { top: 58px; }
}
@media (max-width: 420px) {
  .lang { min-width: 34px; padding: 0 7px; }
  .top { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .top, .buybar, .chat, .stage-tools, .stage-views, .steps, .concept { display: none !important; }
  .modal { position: static; } .modal::backdrop { display: none; }
}
