/* Game Storage Generator. A light, quiet workspace: white panels on a cool grey, one teal accent for actions and focus,
   green, yellow and red only for status. */
:root {
  /* Every colour is from one Lospec palette, Bubblegum 16 by PineappleOnPizza (lospec.com/palette-list/bubblegum-16),
     or a mix of two of them (the greys are its ink in its white). Teal for actions and focus, pink for highlights,
     green, sun yellow and red for status. */
  --p-ink: #16171a; --p-wine: #7f0622; --p-red: #d62411; --p-orange: #ff8426; --p-sun: #ffd100; --p-white: #fafdff;
  --p-pink: #ff80a4; --p-hot: #ff2674; --p-plum: #94216a; --p-violet: #430067; --p-navy: #234975; --p-sky: #68aed4;
  --p-lime: #bfff3c; --p-green: #10d275; --p-teal: #007899; --p-deep: #002859;
  --bg: color-mix(in srgb, var(--p-sky) 7%, var(--p-white)); --card: var(--p-white);
  --soft: color-mix(in srgb, var(--p-ink) 4%, var(--p-white)); --soft-2: color-mix(in srgb, var(--p-ink) 8%, var(--p-white));
  --line: color-mix(in srgb, var(--p-ink) 11%, var(--p-white)); --line-2: color-mix(in srgb, var(--p-ink) 20%, var(--p-white));
  --text: var(--p-ink); --ink: var(--p-ink); --ink-2: color-mix(in srgb, var(--p-ink) 80%, var(--p-white));
  --mut: color-mix(in srgb, var(--p-ink) 64%, var(--p-white)); --mut-2: color-mix(in srgb, var(--p-ink) 42%, var(--p-white));
  --acc: var(--p-teal); --acc-d: var(--p-deep); --acc-bg: color-mix(in srgb, var(--p-teal) 9%, var(--p-white)); --acc-ring: color-mix(in srgb, var(--p-teal) 22%, transparent);
  --acc-line: color-mix(in srgb, var(--p-teal) 32%, var(--p-white)); --acc-soft: color-mix(in srgb, var(--p-teal) 55%, var(--p-white));
  --hi: var(--p-sun); --hi-bg: color-mix(in srgb, var(--p-sun) 16%, var(--p-white)); --hot: var(--p-hot);
  --ok: var(--p-green); --ok-bg: color-mix(in srgb, var(--p-green) 10%, var(--p-white)); --ok-ink: var(--p-navy);
  --warn-bg: color-mix(in srgb, var(--p-sun) 14%, var(--p-white)); --warn-bd: color-mix(in srgb, var(--p-sun) 55%, var(--p-white)); --warn-ink: var(--p-wine);
  --err-bg: color-mix(in srgb, var(--p-red) 7%, var(--p-white)); --err-bd: color-mix(in srgb, var(--p-red) 30%, var(--p-white)); --err-ink: var(--p-wine); --red: var(--p-red);
  --c-combs: var(--p-teal); --c-sleeve: var(--p-hot); --c-drawer: var(--p-green); --c-hw: var(--p-orange);
  --r: 14px; --r-s: 10px;
  --shadow-s: 0 1px 2px #16171a0d;
  --shadow: 0 1px 3px #16171a1a, 0 1px 2px #16171a0f;
  --shadow-l: 0 12px 32px -6px #16171a24, 0 4px 8px -4px #16171a0f;
  --bar: 60px; --deck: 440px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--acc-d); text-underline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { letter-spacing: -.015em; color: var(--text); }
svg { flex-shrink: 0; }

/* ------------------------------------------------------------------ top bar */
.topbar { display: flex; align-items: center; gap: 20px; height: var(--bar); padding: 0 24px; background: #fafdfff2; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand b { color: var(--acc); font-weight: 800; margin-left: 1px; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: var(--acc); display: grid; align-content: center; gap: 3px; padding: 0 6px; box-shadow: 0 2px 6px #00789955; }
.mark i { display: block; height: 4px; border-radius: 2px; background: var(--p-white); }
.topbar nav { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; } .topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { color: var(--mut); text-decoration: none; font-size: 13.5px; font-weight: 550; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.topbar nav a:hover { color: var(--text); background: var(--soft); }
.topbar nav a[aria-current=page] { color: var(--acc-d); background: var(--acc-bg); font-weight: 650; }

/* ------------------------------------------------------------------ designer: preview on the left, one scrolling panel on the right */
body.app { height: 100vh; height: 100dvh; overflow: hidden; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) var(--deck); height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar)); }
.stage { position: relative; min-width: 0; min-height: 0; background: radial-gradient(1200px 700px at 50% 0, var(--p-white) 0, transparent 70%), linear-gradient(var(--soft-2), var(--line)); }
.stage canvas { width: 100%; height: 100%; display: block; }
.grab { display: none; }
.viewport { display: contents; } /* the canvas and its open / reset chip: a box of its own only on small screens */

.deck { display: flex; flex-direction: column; min-height: 0; background: var(--card); border-left: 1px solid var(--line); box-shadow: -8px 0 24px -16px #16171a33; }
.deck-head { padding: 16px 20px 0; border-bottom: 1px solid var(--line); }
.dh-row { display: flex; align-items: center; gap: 10px; }
.deck-head h1 { margin: 0; font-size: 18px; font-weight: 750; flex: 1; }
.bhist { display: inline-flex; gap: 4px; }
button.icon { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
button.icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button.icon:disabled { opacity: .35; cursor: default; }
.jump { display: flex; gap: 4px; padding: 12px 0 12px; overflow-x: auto; scrollbar-width: none; } .jump::-webkit-scrollbar { display: none; }
.jump button { flex: 0 0 auto; border: 1px solid transparent; background: var(--soft); color: var(--mut); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; }
.jump button:hover:not([aria-current=true]) { color: var(--text); border-color: var(--line-2); background: var(--card); }
.jump button[aria-current=true] { background: var(--acc-bg); color: var(--acc-d); border-color: var(--acc-line); }
/* the three steps: Start, Customise, Download; the one you are in is filled, the ones done are ticked */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 0; padding: 0; counter-reset: none; }
.steps button { width: 100%; display: flex; align-items: center; gap: 8px; justify-content: center; border: 1px solid var(--line); background: var(--card); color: var(--mut); border-radius: 12px; padding: 8px 6px; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.steps .sn { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); color: var(--mut); font-size: 12px; font-weight: 750; }
.steps button[aria-current=step] { border-color: var(--acc); color: var(--acc-d); background: var(--acc-bg); }
.steps button[aria-current=step] .sn { background: var(--acc); color: var(--p-white); }
.steps button.done .sn { background: var(--ok); color: var(--p-white); }
.steps button:focus-visible, .preset:focus-visible, .stepper button:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.studio:not([data-stage=custom]) .jump { display: none; }
/* Start: ready-made designs as pictures */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 0 0 14px; }
.preset { width: 100%; display: grid; justify-items: center; gap: 2px; padding: 8px 6px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font: inherit; color: var(--text); cursor: pointer; text-align: center; }
.preset:hover { border-color: var(--acc); background: var(--acc-bg); }
.preset .pv { display: grid; place-items: center; height: 56px; } .preset .pv svg { max-height: 56px; width: auto; }
@media (max-width: 600px) { .presets { grid-template-columns: repeat(3, 1fr); gap: 6px; } .preset { padding: 6px 4px 8px; } .preset .pv { height: 44px; } .preset .pv svg { max-height: 44px; } .preset b { font-size: 12px; } .preset small { font-size: 10.5px; } .preset .w { display: none; } }
.preset b { font-size: 13px; } .preset small { color: var(--mut); font-size: 11.5px; }
/* how many games to store */
.want .stepper { display: flex; gap: 6px; align-items: stretch; }
.want .stepper input { width: 90px; text-align: center; font-size: 18px; font-weight: 700; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.want .stepper button { width: 44px; font-size: 20px; padding: 0; }
/* the summary in the Download step */
.summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.summary dl > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.summary dt { color: var(--mut); font-size: 12px; } .summary dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.summary dd.ok { color: var(--ok-ink); } .summary dd.bad { color: var(--err-ink); }
button.big { width: 100%; padding: 13px; font-size: 15.5px; font-weight: 700; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--acc); font: inherit; text-decoration: underline; cursor: pointer; }
/* the download window */
.dl-sheet { max-width: 560px; }
.dl-sheet fieldset { border: 1px solid var(--line); border-radius: 14px; margin: 0 0 12px; padding: 10px 14px; }
.dl-sheet legend { font-weight: 700; font-size: 13.5px; padding: 0 4px; }
.dl-sheet .opt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.dl-sheet .opt em { font-style: normal; font-size: 11px; font-weight: 750; color: var(--p-white); background: var(--acc); border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.dl-sheet .opt small, .dl-parts small { display: block; color: var(--mut); font-size: 12.5px; }
.dl-parts .chk { display: flex; gap: 10px; padding: 4px 0; } .dl-parts .chk small { display: inline; }
.dl-set { background: var(--soft); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; } .dl-set h3 { margin: 0 0 4px; font-size: 13px; } .dl-set p { margin: 0; font-size: 13px; color: var(--mut); }
.dl-msg { margin: 0 0 12px; } .dl-msg.bad { color: var(--err-ink); font-weight: 650; }
.dl-acct { display: grid; gap: 10px; margin: 0 0 12px; } .dl-acct label:not(.chk) { display: grid; gap: 4px; font-size: 13px; font-weight: 600; } .dl-acct input[type=email], .dl-acct input[type=text] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.dl-err { color: var(--err-ink); margin: 0; min-height: 1em; font-size: 13px; }
.dl-prog .bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; } .dl-prog .bar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .2s; }
.dl-prog small { display: block; margin: 4px 0 8px; color: var(--mut); }

.deck-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px 32px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.deck-scroll > * + * { margin-top: 10px; }
.sect { padding-top: 6px; }
.sect + .sect { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.sect-h { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; }
.sect-h .num { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--acc); color: var(--p-white); font-weight: 750; font-size: 13px; box-shadow: 0 0 0 4px var(--acc-bg); margin-top: 1px; }
.sect-h h2 { margin: 0; font-size: 16.5px; font-weight: 720; }
.sect-h p { margin: 2px 0 0; color: var(--mut); font-size: 13px; }
.sect > * + * { margin-top: 10px; }
.deck-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--card); }
.foot-sum { flex: 1; min-width: 0; display: grid; gap: 1px; }
.foot-sum small { color: var(--mut); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-foot .primary { width: auto; padding: 10px 20px; }
.status { font-size: 13px; font-weight: 650; color: var(--text); display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #10d2752e; flex: 0 0 auto; }
.status.warn::before { background: var(--hi); box-shadow: 0 0 0 3px #ffd1002e; }
.status.bad { color: var(--err-ink); } .status.bad::before { background: var(--red); box-shadow: 0 0 0 3px #d624112e; }

/* floating controls over the preview */
.hud { position: absolute; z-index: 4; display: flex; align-items: center; gap: 8px; }
.hud-tl { top: 16px; left: 16px; flex-wrap: wrap; max-width: 46%; }
.hud-tr { top: 16px; right: 16px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.hud-bottom { bottom: 16px; left: 50%; transform: translateX(-50%); flex-wrap: wrap; justify-content: center; background: #fafdffe6; backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 7px 10px 7px 14px; box-shadow: var(--shadow-l); width: max-content; max-width: calc(100% - 32px); }
.hud .slider { color: var(--mut); margin: 0; font-size: 12.5px; font-weight: 600; gap: 8px; justify-content: flex-start; }
.hud .slider input { width: 96px; accent-color: var(--acc); }
.hud .check { color: var(--mut); margin: 0; font-size: 12.5px; font-weight: 600; justify-content: flex-start; gap: 6px; }
.hud .check input { accent-color: var(--acc); }
.pill { background: #fafdffe6; backdrop-filter: blur(10px); color: var(--text); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 650; box-shadow: var(--shadow-s); }
.pill.hot { background: var(--acc); border-color: var(--acc); color: var(--p-white); }
.pill:empty { display: none; }
.dims { position: absolute; z-index: 4; top: 62px; right: 16px; background: #fafdffeb; backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-l); padding: 10px 16px 11px; min-width: 250px; max-width: 390px; }
.dims:empty { display: none; }
/* a setting jumped to from a click on its piece flashes once, faintly */
.field.jumped { animation: jumped 1.6s ease-out; border-radius: 6px; }
@keyframes jumped { 0%, 30% { background: var(--acc-bg); box-shadow: 0 0 0 6px var(--acc-bg); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.dims-h { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin-bottom: 4px; }
.dims dl { display: flex; gap: 18px; margin: 0; }
.dims dt { font-size: 12px; font-weight: 600; color: var(--mut); }
.dims dd { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dims dd small { font-size: 12.5px; font-weight: 650; color: var(--mut); margin-left: 3px; letter-spacing: 0; }
.dims p { margin: 6px 0 0; font-size: 12px; color: var(--mut); }
.dims dl.mat { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.dims dl.mat dd { font-size: 18px; }
.dims dl.mat dd small { font-size: 11.5px; }
.hintbar { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 72px; color: var(--mut-2); font-size: 11.5px; text-align: center; white-space: nowrap; }
.hudbtn, .viewbtns, .toggles { background: #fafdffe6; backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.hudbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--text); border-radius: 10px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.hudbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.hudbtn.round { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; font-weight: 750; }
.hudbtn:hover:not(:disabled) { border-color: var(--line-2); background: var(--p-white); }
.viewbtns { display: flex; gap: 2px; border-radius: 10px; padding: 3px; }
.viewbtns button { background: transparent; border: 0; color: var(--mut); border-radius: 7px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.viewbtns button:hover:not(:disabled) { background: var(--soft); color: var(--text); }
.toggles { display: flex; gap: 2px; border-radius: 10px; padding: 3px 4px; }
.tswitch { display: inline-flex; align-items: center; gap: 7px; padding: 3px 8px 3px 4px; border-radius: 7px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text); }
.tswitch:hover { background: var(--soft); }
.tswitch input { position: absolute; opacity: 0; pointer-events: none; }
.tswitch .track { width: 28px; height: 16px; border-radius: 99px; background: var(--line-2); position: relative; transition: .18s; flex: 0 0 auto; }
.tswitch .track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--p-white); transition: .18s; box-shadow: 0 1px 2px #16171a33; }
.tswitch input:checked + .track { background: var(--acc); }
.tswitch input:checked + .track::after { left: 14px; }
.tswitch input:focus-visible + .track { outline: 2px solid var(--acc); outline-offset: 2px; }

.loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; background: color-mix(in srgb, var(--bg) 95%, transparent); color: var(--mut); text-align: center; z-index: 9; padding: 20px; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--acc); animation: spin .9s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ cards, groups, fields */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.card h2, .group h3, h3.sub { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); font-weight: 700; }
h3.sub { margin: 14px 0 4px; } h3.sub:first-child { margin-top: 0; }
.group { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 6px; background: var(--card); }
.group + .group { margin-top: 10px; }
.adv { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px; background: var(--card); box-shadow: none; }
.adv > summary { cursor: pointer; font-weight: 650; font-size: 13.5px; padding: 8px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--mut-2); border-bottom: 2px solid var(--mut-2); transform: rotate(45deg); transition: .15s; margin-right: 4px; }
.adv[open] > summary::after { transform: rotate(-135deg); }
.adv[open] { padding-bottom: 12px; }
.adv .group { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 2px; margin-top: 6px; }
.hint { color: var(--mut); font-size: 12.5px; margin: 6px 0 0; }

.field { display: grid; grid-template-columns: 1fr 96px; gap: 3px 10px; align-items: center; margin: 4px 0 12px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.field small { grid-column: 1 / -1; color: var(--mut); font-size: 12px; line-height: 1.45; }
.unit { position: relative; } .unit input { padding-right: 28px; } .unit i { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--mut-2); font-style: normal; font-size: 12px; pointer-events: none; }
input[type=number], input[type=text], input[type=email], input[type=password], select, textarea { width: 100%; background: var(--p-white); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font: inherit; box-shadow: var(--shadow-s); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-ring); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.field select { grid-column: 1 / -1; }
.field.wide { grid-template-columns: 1fr; } .field.wide > label { margin-bottom: 2px; }
.field.slide { grid-template-columns: 1fr; gap: 3px; }
.sl { display: grid; grid-template-columns: 1fr 96px 26px; gap: 10px; align-items: center; }
.sl .reset { width: 26px; height: 26px; padding: 0; border-radius: 8px; display: inline-grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--mut); visibility: hidden; }
.sl .reset.on { visibility: visible; }
.sl .reset:hover { background: var(--soft); border-color: var(--line); color: var(--text); }
.sl .reset svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sl input[type=range] { width: 100%; accent-color: var(--acc); height: 22px; }
.sl .unit input { padding-right: 30px; }
.field .seg { grid-column: 1 / -1; }
.seg, .tog { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; grid-column: 1 / -1; }
.seg button, .tog button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 6px 4px; font: inherit; font-size: 13px; font-weight: 550; color: var(--mut); cursor: pointer; }
.seg button[aria-pressed=true], .tog button[aria-pressed=true], .tog button.on { background: var(--p-white); color: var(--text); font-weight: 650; box-shadow: var(--shadow); }
.seg button:hover:not([aria-pressed=true]) { color: var(--text); }
.check, .slider { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.slider input { width: 130px; accent-color: var(--acc); }
.readout { margin: 10px 0 0; display: grid; gap: 4px; } .readout div { display: flex; justify-content: space-between; } .readout dt { color: var(--mut); } .readout dd { margin: 0; font-weight: 650; }
.slotHint { color: var(--mut) !important; }
.warnhint { color: var(--err-ink) !important; font-weight: 650; }
small.note { display: block; color: var(--mut); font-size: 11.5px; line-height: 1.35; margin-top: 1px; }

/* the three kinds of storage */
.typecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: none; padding: 0; }
.typecards button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 10px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); box-shadow: var(--shadow-s); }
.typecards button svg { width: 44px; height: 36px; fill: none; stroke: var(--mut); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.typecards button b { font-size: 13px; font-weight: 700; }
.typecards button small { font-size: 11.5px; color: var(--mut); line-height: 1.3; font-weight: 450; }
.typecards button:hover:not([aria-pressed=true]) { border-color: var(--line-2); color: var(--text); }
.typecards button[aria-pressed=true] { border-color: var(--acc); background: var(--acc-bg); box-shadow: 0 0 0 3px var(--acc-ring); }
.typecards button[aria-pressed=true] svg { stroke: var(--acc); }

button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line-2); background: var(--p-white); color: var(--text); padding: 7px 12px; transition: border-color .12s, background .12s, box-shadow .12s, transform .12s, color .12s; }
button:hover:not(:disabled) { border-color: var(--mut-2); }
button.primary { background: var(--acc); border-color: var(--acc); color: var(--p-white); font-weight: 650; padding: 11px 14px; width: 100%; box-shadow: 0 1px 2px #16171a0d, inset 0 1px 0 #fafdff22; }
button.primary:hover:not(:disabled) { background: var(--acc-d); border-color: var(--acc-d); }
button.ghost { background: var(--soft); border-color: transparent; font-size: 13px; font-weight: 550; padding: 7px 8px; }
button.ghost:hover:not(:disabled) { background: var(--soft-2); border-color: transparent; }
button:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; } .row > input, .row > select { flex: 1; min-width: 0; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.filebtn { display: inline-flex; align-items: center; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 550; cursor: pointer; background: var(--soft); }
.actions { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }

.err, .warn, .gate { border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 0 0 6px; }
.err { background: var(--err-bg); border: 1px solid var(--err-bd); color: var(--err-ink); }
.err b { display: block; margin-bottom: 3px; }
.err .more { background: none; box-shadow: none; padding: 2px 0 0; margin: 4px 0 0; border: 0; } .err .more summary { cursor: pointer; font-weight: 650; font-size: 12.5px; }
.err .fixes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .err .fixes button { background: var(--p-white); border-color: var(--err-bd); color: var(--err-ink); font-weight: 650; font-size: 12.5px; padding: 5px 11px; border-radius: 99px; }
.err .fixes button:hover { background: var(--err-ink); border-color: var(--err-ink); color: var(--p-white); }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-ink); }
.gate { background: var(--acc-bg); border: 1px solid var(--acc-line); color: var(--acc-d); }
.gate a { font-weight: 700; }
#gates:empty, #errors:empty, #warnings:empty { display: none; }
.printerbar { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin-bottom: 12px; box-shadow: var(--shadow-s); }
.printerbar .field > label { font-weight: 700; }
.planbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 10px 12px; background: var(--soft); border-radius: 12px; }
.planbox .hint { margin: 1px 0 0; font-size: 12px; } .planbox a { white-space: nowrap; }

/* the cartridge being stored */
.cartcard { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--acc-bg), var(--acc-bg)); border: 1px solid var(--acc-line); border-radius: var(--r); padding: 14px 16px; }
.cartcard dl { margin: 0; min-width: 0; } .cartcard dt { font-weight: 720; font-size: 15px; } .cartcard dd { margin: 2px 0 0; color: var(--mut); font-size: 13px; } .cartcard dd.conf { font-size: 11px; font-weight: 700; color: var(--acc-d); text-transform: uppercase; letter-spacing: .05em; }
.cc-art { flex: 0 0 auto; display: grid; place-items: center; width: 120px; }
.cc-art svg { max-width: 120px; height: auto; max-height: 96px; }
.cartcard dd.approx { font-size: 11.5px; color: var(--mut-2); margin-top: 4px; }
.cs-body { fill: var(--mut); stroke: var(--ink-2); stroke-width: 1; stroke-linejoin: round; }
.cs-label { fill: var(--p-white); opacity: .9; }

/* estimate */
.est table { width: 100%; border-collapse: collapse; font-size: 13px; } .est td { padding: 6px 0; border-bottom: 1px solid var(--soft); } .est td:last-child { text-align: right; font-weight: 650; } .est tr:last-child td { border-bottom: 0; }
.est .big { font-size: 26px; font-weight: 780; letter-spacing: -.02em; } .est .sub { color: var(--mut); font-size: 12px; margin-bottom: 10px; }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--soft); margin: 6px 0 6px; gap: 2px; }
.bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--mut); margin-bottom: 8px; } .legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); vertical-align: 0; }

/* ------------------------------------------------------------------ drawer builder */
.builder { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.bhead { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; }
.blabel { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); font-weight: 700; }
.bnote { font-size: 12px; color: var(--acc-d); background: var(--acc-bg); border-radius: 99px; padding: 2px 10px; font-weight: 650; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dstrip { display: flex; gap: 6px; padding: 8px 14px 10px; overflow-x: auto; scrollbar-width: thin; }
.dchip { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; border-radius: 99px; padding: 4px 11px 4px 5px; font-size: 12.5px; background: var(--soft); border: 1px solid transparent; color: var(--text); }
.dchip.all { padding-left: 11px; }
.dchip[aria-pressed=true] { background: var(--p-white); border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-ring); font-weight: 650; }
.dchip .dn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--p-white); border: 1px solid var(--line); font-size: 11px; font-weight: 700; padding: 0 5px; }
.dchip.all .dn { background: transparent; border: 0; min-width: 0; padding: 0; }
.dchip .dsw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid #16171a26; }
.dchip .dl { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); }
.dchip.custom .dn { border-color: var(--acc); background: var(--acc-bg); color: var(--acc-d); }
.dsel { margin: 0 14px 12px; padding: 10px 12px; background: var(--soft); border-radius: 12px; display: grid; gap: 8px; }
.dshead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dshead .ghost { padding: 3px 9px; font-size: 12px; background: var(--p-white); border: 1px solid var(--line); } .dshead .tier + .ghost { margin-left: auto; }
.dshead .ghost:disabled { opacity: .4; }
.dsum { font-size: 12px; color: var(--mut); flex: 1 1 auto; min-width: 0; }
.df { display: grid; gap: 4px; font-size: 13px; font-weight: 600; } .df input, .df select { font-weight: 400; }
.dsel small { color: var(--mut); font-size: 12px; }
.btabs { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.btabs button { flex: 0 1 auto; border: 0; background: transparent; padding: 9px 8px; border-radius: 0; color: var(--mut); font-size: 12.5px; font-weight: 600; }
.btabs button:hover:not([aria-selected=true]) { color: var(--text); }
.btabs button[aria-selected=true] { color: var(--acc-d); box-shadow: inset 0 -2px 0 var(--acc); }
.btabs button.has-own::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--acc); vertical-align: middle; }
.btab { padding: 14px 14px 8px; }
.btab .field:first-child { margin-top: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.gcard { display: flex; flex-direction: column; gap: 5px; padding: 5px; border-radius: 12px; background: var(--p-white); border: 1px solid var(--line); text-align: left; }
.gcard:hover:not(:disabled) { border-color: var(--line-2); box-shadow: var(--shadow); }
.gcard[aria-pressed=true] { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-ring); }
.gthumb { display: block; } .gthumb svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.gname { font-size: 12px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 0 3px 2px; }
.tier { font-style: normal; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--hi-bg); color: var(--warn-ink); border-radius: 99px; padding: 1px 7px; font-weight: 750; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; grid-column: 1 / -1; }
.sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid var(--p-white); box-shadow: 0 0 0 1px #16171a33; }
.sw:hover:not(:disabled) { border-color: var(--p-white); box-shadow: 0 0 0 2px var(--mut-2); }
.sw[aria-pressed=true] { box-shadow: 0 0 0 2px var(--acc); }
.drow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px 14px; align-items: start; }
.bulk { background: none; border: 0; padding: 0; margin: 2px 0 0; box-shadow: none; } .bulk + .bulk { margin-top: 6px; }
.bulk summary { cursor: pointer; font-size: 13px; font-weight: 650; } .bulk summary .tier { margin-left: 6px; }
.bulk textarea { margin: 6px 0 2px; font-size: 13px; resize: vertical; }
.brow { display: flex; gap: 8px; margin: 10px 0 0; } .brow .ghost { display: inline-flex; align-items: center; gap: 6px; }
.scopenote { margin: 0 0 10px; font-size: 12px; color: var(--acc-d); background: var(--acc-bg); border-radius: 8px; padding: 6px 10px; }
.scopenote:empty { display: none; }
.bfoot { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--soft); font-size: 12.5px; color: var(--mut); }
.bfoot:empty { display: none; }
.field .ovr { display: none; margin-left: 6px; padding: 0 6px; border: 0; background: var(--acc-bg); color: var(--acc-d); border-radius: 99px; font-size: 12px; line-height: 17px; cursor: pointer; vertical-align: baseline; }
.field.own .ovr { display: inline-block; }
.field.own > label { color: var(--acc-d); font-weight: 700; }
.field.shared > label::after { content: 'all drawers'; margin-left: 8px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--soft); color: var(--mut); border-radius: 99px; padding: 1px 7px; font-weight: 700; vertical-align: middle; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.quick .ghost { padding: 4px 9px; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; background: var(--p-white); border: 1px solid var(--line); }
.cset i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #16171a26; }
.cset i:last-of-type { margin-right: 4px; }
.ftable { width: 100%; border-collapse: collapse; }
.ftable td, .ftable th { padding: 7px 6px; border-bottom: 1px solid var(--line); font-size: 12.5px; text-align: left; vertical-align: top; }
.ftable th { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.ftable td button { padding: 3px 8px; font-size: 12px; }
.plythumb svg { display: block; margin-top: 5px; max-width: 100%; height: auto; }
td.n { text-align: right; color: var(--mut); white-space: nowrap; }

/* flat stand-in for the 3D preview (no WebGL) */
.flatview { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 16px 80px; color: var(--mut); }
.fv-note { max-width: 520px; margin: 0 0 4px; font-size: 12.5px; text-align: center; background: var(--p-white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.fv-stack { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.fv-row { position: relative; padding: 0; border: 2px solid transparent; background: transparent; border-radius: 10px; line-height: 0; }
.fv-row svg { display: block; border-radius: 8px; max-width: 100%; height: auto; }
.fv-row:hover { border-color: var(--line-2); } .fv-row[aria-pressed=true] { border-color: var(--acc); }
.fv-n { position: absolute; left: 8px; top: 6px; font-size: 11px; line-height: 1.2; font-weight: 700; color: var(--p-white); background: #16171aaa; border-radius: 99px; padding: 1px 8px; }
.fv-size { margin: 4px 0 0; font-size: 12px; color: var(--mut); }

/* ------------------------------------------------------------------ overlays and toasts */
.overlay { position: fixed; inset: 0; background: #16171a66; backdrop-filter: blur(4px); z-index: 40; overflow: auto; padding: 32px 20px; }
.overlay[hidden] { display: none; }
.sheet { position: relative; max-width: 780px; margin: 0 auto; background: var(--card); border-radius: 18px; padding: 24px 30px 30px; box-shadow: var(--shadow-l); }
.sheet h2 { margin: 0 0 6px; font-size: 22px; } .sheet h3 { margin: 18px 0 6px; font-size: 15px; }
.sheet ol, .sheet ul { padding-left: 20px; } .sheet li { margin: 4px 0; }
.sheet .close { position: absolute; right: 14px; top: 12px; font-size: 22px; line-height: 1; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--mut); }
.sheet .close:hover { background: var(--soft-2); color: var(--text); }
.steps { list-style: none; padding: 0 !important; margin: 14px 0 0; } .steps > li { margin: 0 0 26px; }
.steps h3 { display: flex; align-items: center; gap: 10px; margin-top: 0; } .steps h3 span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--acc); color: var(--p-white); font-size: 13px; }
figure { margin: 10px 0; } figure svg { width: 100%; height: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; } figcaption { color: var(--mut); font-size: 12.5px; margin-top: 4px; }
.callout { background: var(--acc-bg); border-left: 3px solid var(--acc); padding: 8px 12px; border-radius: 6px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--p-white); padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 550; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; box-shadow: var(--shadow-l); } #toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ information pages */
.pagehead { max-width: 1160px; margin: 0 auto; padding: 56px 24px 8px; }
.pagehead h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.pagehead .tag { max-width: 70ch; }
.pagehead + .content { padding-top: 20px; }
.eyebrow, .crumb { display: inline-block; margin: 0 0 12px; background: var(--acc-bg); color: var(--acc-d); font-size: 12px; font-weight: 700; letter-spacing: .02em; border-radius: 99px; padding: 4px 12px; }
.tag { margin: 0 0 16px; color: var(--mut); max-width: 760px; font-size: 16.5px; line-height: 1.6; }
.toolbtn, .btn.hi { display: inline-flex; align-items: center; gap: 8px; background: var(--acc); color: var(--p-white); font-weight: 650; border-radius: 10px; padding: 10px 18px; text-decoration: none; box-shadow: 0 1px 2px #16171a0d, 0 4px 12px -2px #00789966; }
.toolbtn:hover, .btn.hi:hover { background: var(--acc-d); }
.content { max-width: 1160px; margin: 0 auto; padding: 32px 24px; }
.content h2 { font-size: 26px; margin: 0 0 14px; font-weight: 750; } .content h3 { font-size: 15.5px; margin: 0 0 6px; }
.content h2.spaced { margin-top: 44px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.fcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-s); }
.fcard svg { fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; background: var(--acc-bg); border-radius: 12px; padding: 8px; box-sizing: content-box; width: 28px; height: 28px; margin-bottom: 14px; }
.fcard h3 { font-size: 16px; margin: 0 0 4px; } .fcard p { margin: 0; color: var(--mut); }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-s); }
.step span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--acc); color: var(--p-white); font-weight: 750; margin-bottom: 10px; }
.step p { margin: 0; color: var(--mut); }
table { width: 100%; border-collapse: collapse; }
.content table td, .content table th { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13.5px; }
.cmp { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-s); border-collapse: separate; border-spacing: 0; }
.cmp th { background: var(--soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.cmp tr:last-child td { border-bottom: 0; }
.content td button { padding: 3px 8px; font-size: 12px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 0 0 8px; } details summary { cursor: pointer; font-weight: 650; } details p { margin: 8px 0 2px; color: var(--mut); }
.cartrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 22px; }
.cartrow figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; }
.cartrow figure svg { width: auto; max-width: 110px; max-height: 100px; background: none; border: 0; border-radius: 0; }
.cartrow figcaption { color: var(--text); font-weight: 650; font-size: 12.5px; text-align: center; } .cartrow figcaption small { display: block; color: var(--mut); font-weight: 450; font-size: 11.5px; }
.cta { max-width: 1112px; margin: 24px auto 16px; padding: 34px 38px; border-radius: 20px; background: radial-gradient(600px 260px at 90% 0, var(--acc-soft), transparent 70%), var(--acc); color: var(--p-white); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 4px; font-size: 28px; color: var(--p-white); } .cta p { margin: 0; color: var(--acc-line); }
.cta .btn.hi { background: var(--p-white); color: var(--acc-d); box-shadow: none; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.dcard { display: flex; flex-direction: column; gap: 3px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: left; box-shadow: var(--shadow-s); }
.dcard:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--acc-line); box-shadow: var(--shadow-l); }
.dcard svg { width: 100%; height: auto; border-radius: 9px; display: block; margin-bottom: 6px; }
.dcard .dn2 { font-weight: 650; padding: 0 2px; } .dcard small { color: var(--mut); font-size: 12px; padding: 0 2px 2px; }

/* ------------------------------------------------------------------ accounts and pricing */
.acct { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.signin, .signup, .btn { white-space: nowrap; text-decoration: none; font-size: 13.5px; border-radius: 9px; padding: 7px 14px; display: inline-block; font-weight: 600; }
.signin { color: var(--text); } .signin:hover { background: var(--soft); }
.signup, .btn.primary { background: var(--acc); color: var(--p-white); font-weight: 650; box-shadow: var(--shadow-s); }
.signup:hover, .btn.primary:hover { background: var(--acc-d); }
.btn { background: var(--card); color: var(--text); border: 1px solid var(--line-2); cursor: pointer; } .btn:hover { background: var(--soft); }
.acct-chip { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px 3px 3px; }
.acct-chip:hover { background: var(--soft); }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--acc); color: var(--p-white); display: grid; place-items: center; font-weight: 750; font-size: 12px; }
.planbadge { font-style: normal; font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; background: var(--soft); border-radius: 99px; padding: 1px 8px; color: var(--mut); }
.planbadge.pro, .planbadge.lifetime { background: var(--acc-bg); color: var(--acc-d); } .planbadge.starter { background: var(--hi-bg); color: var(--warn-ink); }
.demo-banner { background: var(--hi-bg); color: var(--warn-ink); font-size: 12.5px; text-align: center; padding: 7px 12px; border-bottom: 1px solid var(--warn-bd); }
.center { text-align: center; }
.hero { max-width: 1160px; margin: 0 auto; padding: 56px 24px 18px; } .hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; } .hero.center .tag { margin-left: auto; margin-right: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chips span { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 13px; font-size: 12.5px; }
.plans-wrap { max-width: 1200px; margin: 0 auto; padding: 8px 24px 10px; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 22px; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow-s); }
.plan.pop { border: 2px solid var(--acc); box-shadow: 0 20px 44px -16px #00789966; }
.plan.cur { outline: 2px solid var(--ok); outline-offset: 2px; }
.plan h2 { margin: 0; font-size: 19px; } .ptag { margin: 2px 0 12px; color: var(--mut); font-size: 13px; }
.ribbon { position: absolute; top: -12px; left: 20px; background: var(--acc); color: var(--p-white); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; padding: 3px 11px; border-radius: 99px; }
.price { display: flex; align-items: baseline; gap: 6px; } .price b { font-size: 38px; letter-spacing: -.03em; } .price span { color: var(--mut); }
.psub { margin: 2px 0 14px; color: var(--mut); font-size: 12.5px; min-height: 18px; }
.inc, .exc { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13.5px; }
.inc li, .exc li { padding: 4px 0 4px 24px; position: relative; }
.inc li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 10px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.exc li { color: var(--mut-2); } .exc li::before { content: "\00d7"; position: absolute; left: 4px; top: 1px; font-size: 16px; color: var(--mut-2); }
.plan > button { margin-top: auto; width: 100%; padding: 11px; font-weight: 650; }
.plan.pop > button { background: var(--acc); border-color: var(--acc); color: var(--p-white); }
.plan > ul:last-of-type { margin-bottom: 18px; }
/* the Lifetime card: its founder ribbon in ink, the months-of-Pro anchor, and notes under a card's features */
.plan.life .ribbon { background: var(--text); }
.anchor { display: inline-block; margin: -6px 0 10px; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--acc); font-size: 12.5px; font-weight: 650; }
.plan .hint { font-size: 12px; margin: 0 0 12px; }
.pnote { color: var(--mut); font-size: 12.5px; text-align: center; margin: 4px 0 16px; }
/* the project pass, a strip under the plan cards */
.pass { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin: 22px 0 10px; padding: 18px 22px; border: 1px dashed var(--line); border-radius: 18px; background: var(--card); }
.pass p { margin: 0 0 6px; } .pass .hint { margin: 0; font-size: 12.5px; } .pass-h { font-size: 15px; }
.pass > button { flex: none; padding: 11px 18px; font-weight: 650; }
/* the monthly email sign-up */
.news { max-width: 1080px; margin: 28px auto; padding: 22px 26px; display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 8px 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.news h2 { margin: 0 0 4px; font-size: 18px; } .news-copy p { margin: 0; color: var(--mut); font-size: 13.5px; }
.news-form { display: flex; gap: 8px; } .news-form input { flex: 1 1 auto; width: auto; min-width: 0; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; }
.news-form button { flex: none; width: auto; padding: 10px 18px; font-weight: 650; }
.tog i { white-space: nowrap; }
.news-msg { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--ok-ink); min-height: 1em; } .news-msg.bad { color: var(--err-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* downloads left this week, in the header on the Free plan */
.dl-left { font-size: 12.5px; font-weight: 650; text-decoration: none; color: var(--acc); border: 1px solid var(--acc); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.dl-left.none { color: var(--p-white); background: var(--acc); }
.biz { display: flex; gap: 20px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; } .biz h2 { margin: 0 0 4px; font-size: 18px; } .biz p { margin: 0; color: var(--mut); }
.acct-wrap { max-width: 880px; margin: 0 auto; padding: 32px 24px 44px; min-height: 60vh; }
.acct-wrap h1 { font-size: 28px; margin: 0; } .acct-head { display: flex; justify-content: space-between; align-items: center; }
.auth { max-width: 440px; margin: 24px auto; padding: 28px 30px; } .auth h1 { font-size: 26px; margin-bottom: 4px; }
.bhist .savequick { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-weight: 650; font-size: 13.5px; background: var(--acc-bg); color: var(--acc); border: 1px solid transparent; }
.bhist .savequick svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bhist .savequick:hover { border-color: currentColor; }
.bhist .savequick .dirty { width: 7px; height: 7px; border-radius: 50%; background: var(--hi); margin-left: 1px; }
.deck { position: relative; }
.dh-title { flex: 1; min-width: 0; } .dh-title h1 { flex: none; }
.dname { margin: 2px 0 0; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dname b { color: var(--text); font-weight: 650; }
/* My designs: a small menu under the panel header */
.dpop { position: absolute; z-index: 30; top: 70px; right: 16px; width: min(380px, calc(100% - 32px)); max-height: min(70vh, 560px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 44px -14px #16171a47; padding: 14px 14px 12px; }
.dpop h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: baseline; gap: 8px; } .dpop h3 .hint { font-weight: 500; font-size: 12.5px; }
.dpop .dp-save { display: flex; gap: 6px; } .dpop .dp-save input { flex: 1; min-width: 0; } .dpop .dp-save button { flex: none; width: auto; padding-left: 18px; padding-right: 18px; }
.dpop .dp-tip { margin: 5px 0 10px; font-size: 12px; }
.acct-find { display: flex; gap: 8px; margin: 4px 0 12px; } .acct-find input { flex: 1; min-width: 0; } .acct-find select { width: auto; }
.dpop .dp-find { display: flex; gap: 6px; margin-bottom: 8px; } .dpop .dp-find input { flex: 1; min-width: 0; } .dpop .dp-find select { flex: none; width: auto; }
.dpop .dp-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.dpop .dp-list li { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dpop .dp-list li.cur { border-color: var(--acc); background: var(--acc-bg); }
.dpop .dp-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 6px 10px 6px 6px; display: flex; align-items: center; gap: 10px; border-radius: 0; }
.dpop .dp-thumb { flex: none; display: flex; } .dpop .dp-thumb svg { display: block; border-radius: 7px; }
.dpop .dp-text { min-width: 0; display: grid; gap: 1px; }
td.dthumb { width: 76px; padding-right: 0; } td.dthumb svg { display: block; border-radius: 7px; }
.dpop .dp-open:hover { background: var(--soft); } .dpop li.cur .dp-open:hover { background: transparent; }
.dpop .dp-open b { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dpop .dp-open small { color: var(--mut); font-size: 12px; }
.dpop .dp-del { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 0 12px; color: var(--mut); font-size: 18px; }
.dpop .dp-del:hover { color: var(--err-ink); background: var(--err-bg); }
.dpop .dp-foot { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.dpop .dp-foot > * { font-size: 13px; padding: 6px 10px; }
.dpop .row { display: flex; gap: 8px; margin-bottom: 12px; }
@media (max-width: 720px) {
  .pass { flex-direction: column; align-items: stretch; } .news { grid-template-columns: 1fr; margin: 20px 16px; padding: 18px; }
  .dl-left { display: none; }
}
@media (max-width: 600px) {
  .bhist .savequick { padding: 7px 9px; } .bhist .savequick .sq-label { display: none; }
  .dpop { left: 12px; right: 12px; width: auto; top: 64px; }
}
.auth .google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 16px; padding: 11px 14px; background: var(--p-white); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font-weight: 650; font-size: 15px; }
.auth .google:hover { background: var(--soft); border-color: var(--line-2); }
.auth .or { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; color: var(--mut); font-size: 12.5px; } .auth .or::before, .auth .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth .sent { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-ink); font-size: 14px; }
.auth form { display: grid; gap: 12px; margin-top: 14px; } .f2 { display: grid; gap: 5px; font-size: 13px; font-weight: 650; } .f2 input { font-weight: 400; }
.f2.inline { max-width: 340px; margin-bottom: 8px; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--mut); } .chk input { margin-top: 3px; accent-color: var(--acc); }
.chk-docs { margin: -2px 0 8px 30px; font-size: 12.5px; }
.formerr { color: var(--err-ink); font-size: 13px; min-height: 18px; margin: 0; }
.switch { text-align: center; margin: 12px 0 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 18px; } .tabs button { border: 0; background: transparent; border-radius: 0; padding: 9px 14px; color: var(--mut); font-weight: 600; }
.tabs button[aria-selected=true] { color: var(--acc-d); box-shadow: inset 0 -2px 0 var(--acc); }
.tabbody { display: grid; gap: 12px; } .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lv { display: flex; align-items: center; gap: 10px; } .lv b { font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 6px; } .stats div { background: var(--soft); border-radius: 10px; padding: 10px 12px; } .stats dt { font-size: 11.5px; color: var(--mut); } .stats dd { margin: 0; font-size: 20px; font-weight: 750; }
.big { font-size: 28px; font-weight: 780; margin: 4px 0; letter-spacing: -.02em; } .big small { font-size: 14px; color: var(--mut); font-weight: 500; }
.meter { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 8px 0; } .meter i { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.todo { list-style: none; padding: 0; margin: 8px 0 0; } .todo li { padding: 6px 0 6px 28px; position: relative; border-bottom: 1px solid var(--soft); }
.todo li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 14px; height: 14px; border: 2px solid var(--line-2); border-radius: 50%; }
.todo li.done { color: var(--mut); text-decoration: line-through; } .todo li.done::before { background: var(--ok); border-color: var(--ok); }
.upsell { background: var(--acc-bg); border-color: var(--acc-line); } .upsell h2 { color: var(--acc-d); }
.danger { border-color: var(--err-bd); } .danger h2 { color: var(--err-ink); } .danger button:not(:disabled) { background: var(--err-ink); color: var(--p-white); border-color: var(--err-ink); }
.list td { padding: 8px 6px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
.mini { width: 100%; margin: 8px 0 14px; } .mini td { padding: 5px 0; border-bottom: 1px solid var(--soft); }
.sheet.small { max-width: 460px; margin-top: 12vh; }
.acct-wrap .card, body > .card { box-shadow: var(--shadow-s); }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1280px) { :root { --deck: 400px; } }
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat, .cards3 { grid-template-columns: repeat(2, 1fr); }
  .hud-tr .hudbtn span { display: none; }
}
@media (max-width: 900px) {
  /* one screen: the preview on top, the panel below it, and only the panel scrolls */
  .studio { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 42%) minmax(0, 1fr); }
  .deck { border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px #16171a33; }
  .deck-head { padding: 10px 14px 0; } .deck-head h1 { font-size: 15.5px; } .jump { padding: 8px 0; }
  .deck-scroll { padding: 14px 14px 24px; }
  .deck-foot { padding: 10px 14px; }
  .hud-tl { display: none; }
  .dims { top: 52px; right: 10px; padding: 7px 12px 8px; min-width: 0; }
  .dims dl { gap: 4px 12px; flex-wrap: wrap; } .dims dd { font-size: 19px; } .dims p, .dims-h { display: none; }
  .dims { max-width: calc(100% - 20px); }
  .dims dl.mat { margin-top: 5px; padding-top: 5px; } .dims dl.mat dd { font-size: 14px; }
  .hud-tr { left: 10px; right: 10px; top: 10px; max-width: none; justify-content: flex-start; gap: 6px; }
  .hud-bottom { bottom: 10px; padding: 5px 10px; gap: 4px 12px; }
  .hintbar { display: none; }
  .hud .slider input { width: 70px; }
  #shotBtn { display: none; }
  .hud-bottom .slider:nth-of-type(2) { display: none; }
}
@media (max-width: 700px) {
  .topbar { gap: 10px; padding: 0 12px; } .topbar nav { flex: 1; } .bname { display: none; } .signup { padding: 6px 12px; font-size: 12.5px; }
  .content { padding: 26px 16px; } .pagehead, .hero { padding: 36px 16px 6px; }
  .feat, .cards3, .two, .plans, .grid2 { grid-template-columns: 1fr; }
  .content table { display: block; overflow-x: auto; }
  .overlay { padding: 10px; } .sheet { padding: 18px 16px 24px; }
  .biz { flex-direction: column; align-items: flex-start; }
  .acct-chip { font-size: 0; gap: 0; padding: 2px; } .acct-chip .planbadge { display: none; } .signin { display: none; }
  .drow { grid-template-columns: 1fr; }
  .cta { margin: 20px 12px; padding: 26px 22px; }
  .hud .check { display: none; }
  .typecards button small { display: none; }
}
@media (pointer: coarse) {
  .field .ovr { padding: 4px 10px; font-size: 14px; line-height: 20px; }
  .dchip { min-height: 36px; } button.icon { width: 38px; height: 38px; }
  .btabs button { padding-top: 12px; padding-bottom: 12px; }
}
select, input[type=text], input[type=number] { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01s !important; scroll-behavior: auto !important; } }
/* the Bambu Studio project button: a second, quieter call to action under "Download everything" */
.actions .bambu { margin-top: 6px; display: grid; gap: 1px; justify-items: start; text-align: left; width: 100%; padding: 9px 14px; border-color: var(--acc-line); background: var(--acc-bg); color: var(--acc-d); }
.actions .bambu b { font-size: 14px; } .actions .bambu small { font-size: 12px; color: var(--mut); font-weight: 500; }
.actions .bambu:hover:not(:disabled) { border-color: var(--acc); background: var(--acc-bg); }
.bambu-how { margin: 8px 2px 4px; line-height: 1.6; } .bambu-how kbd { font: 600 11.5px/1 var(--font); padding: 2px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--p-white); }
/* "Install app" in the header, where the browser can install the site as an app (icon only on a phone) */
.install { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--acc-d); background: var(--acc-bg); border-color: var(--acc-line); border-radius: 99px; }
.install svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install:hover:not(:disabled) { border-color: var(--acc); }
.install:not([hidden]) + .acct { margin-left: 0; }
@media (max-width: 700px) { .install { padding: 7px; } .install span { display: none; } }

/* ------------------------------------------------------------------ phones and small tablets (900 px wide or less)
   Built on what people expect from phone apps and 3D configurators (Apple's and Google's guidance on sheets and touch
   targets, NN/g on wizards): the 3D model always shows, the settings are a sheet under it with three heights that only
   its handle changes, one step a page with Back and Next under the thumb, nothing floats over the model, and every
   control is at least 44 px. studio.js does the moving; desktop stays as it is above. */
.viewbtn { display: none; }
.viewpop { display: none; }
/* the same test as studio.js: a phone or small tablet, or a big phone on its side (wider than 900 px, but short) */
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  /* the site's top bar is the designer's app bar: the menu, the design's name, Save, My designs, Undo and Redo */
  body.app.compact { --bar: calc(52px + env(safe-area-inset-top, 0px)); }
  body.app.compact .topbar { height: var(--bar); padding: env(safe-area-inset-top, 0px) max(6px, env(safe-area-inset-right, 0px)) 0 max(6px, env(safe-area-inset-left, 0px)); gap: 2px; }
  body.app.compact .topbar > .brand, body.app.compact .topbar > nav, body.app.compact .topbar > .acct { display: none; }
  .topbar .dh-row { flex: 1; min-width: 0; gap: 2px; }
  .topbar .dh-title { min-width: 0; }
  .topbar .dh-title h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* still read out */
  .topbar .dname { margin: 0; font-size: 15px; font-weight: 650; color: var(--text); }
  .topbar .bhist { gap: 0; }
  .topbar .bhist button.icon, .topbar .bhist .savequick { width: 44px; height: 44px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .topbar .bhist .savequick .sq-label { display: none; }
  .topbar .bhist .savequick { position: relative; } .topbar .bhist .savequick .dirty { position: absolute; top: 10px; right: 9px; }
  .dpop { position: fixed; z-index: 40; top: calc(var(--bar) + 6px); left: 10px; right: 10px; width: auto; max-height: calc(100dvh - var(--bar) - 20px); }

  /* the model on top, the sheet under it */
  .studio { height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar)); grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 50%); }
  .studio.has-sheet { grid-template-rows: minmax(0, 1fr) var(--sheet, 50%); transition: grid-template-rows .26s cubic-bezier(.2, .8, .2, 1); }
  .studio.has-sheet.dragging { transition: none; }
  .stage { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .viewport { display: block; position: relative; grid-row: 1; grid-column: 1; min-height: 0; }
  .loading { grid-row: 1 / -1; grid-column: 1; }
  .hud-tl, .hintbar { display: none; }
  /* the sizes: one line under the model, never over it */
  .dims { position: static; grid-row: 2; grid-column: 1; display: flex; align-items: center; justify-content: space-between; gap: 2px 10px; min-width: 0; max-width: none; padding: 5px max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px)); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--p-white); backdrop-filter: none; }
  .dims dl { gap: 10px; flex-wrap: nowrap; }
  .dims dt { font-size: 11px; line-height: 1.2; }
  .dims dd { font-size: 15px; } .dims dd small { font-size: 11px; margin-left: 2px; }
  .dims dl.mat { margin: 0; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--line); }
  .dims dl.mat dd { font-size: 14px; } .dims dl.mat dd small { font-size: 11px; }
  .dims p, .dims .mat-note, .dims-h { display: none; }

  /* View: one button in the corner of the model; its menu holds the camera, the toggles, open, explode, spin and reset */
  .viewbtn { display: inline-flex; align-items: center; gap: 6px; position: absolute; z-index: 6; top: 8px; right: max(8px, env(safe-area-inset-right, 0px)); height: 44px; padding: 0 14px 0 12px; border-radius: 22px; background: #fafdffeb; backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); font-weight: 650; font-size: 14px; }
  .viewbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .viewbtn[aria-expanded=true] { background: var(--acc-bg); color: var(--acc-d); border-color: var(--acc-line); }
  /* the View menu takes the settings panel's place under the handle, so the model it changes stays in sight */
  .viewpop:not([hidden]) { display: block; position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; top: 32px; overflow: auto; overscroll-behavior: contain; background: var(--card); padding: 0 max(14px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
  .vp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .vp-head b { font-size: 16px; font-weight: 700; }
  .vp-head .ghost { min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 650; color: var(--acc-d); }
  .viewpop .hud { position: static; transform: none; display: flex; flex-wrap: wrap; gap: 8px; max-width: none; width: auto; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  .viewpop .hud-bottom { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .viewpop .viewbtns { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; background: var(--soft); border: 0; box-shadow: none; }
  .viewpop .viewbtns button { height: 44px; font-size: 14px; padding: 0; }
  .viewpop .toggles { display: flex; gap: 8px; width: 100%; background: none; border: 0; box-shadow: none; padding: 0; }
  .viewpop .tswitch { flex: 1; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
  .viewpop .hud .slider, .viewpop .hud .check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; color: var(--text); }
  .viewpop .hud .slider input { flex: 1; width: auto; height: 32px; }
  .viewpop .hud .check input { width: 22px; height: 22px; }
  .viewpop .hudbtn { display: inline-flex; min-height: 44px; padding: 0 14px; font-size: 14px; background: var(--card); box-shadow: none; }
  .viewpop .hudbtn span { display: inline; }
  .viewpop .hudbtn.round { width: 44px; height: 44px; margin-left: auto; }
  .viewpop #shotBtn { display: inline-flex; }
  .viewpop .hud-bottom .hudbtn { justify-content: center; }

  /* the sheet: the handle, the step buttons, one step's settings, the footer */
  .deck { border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 28px -18px #16171a40; border-radius: 16px 16px 0 0; }
  .grab { display: flex; justify-content: center; align-items: center; flex: 0 0 auto; width: 100%; height: 32px; padding: 0; border: 0; border-radius: 16px 16px 0 0; background: var(--card); touch-action: none; position: relative; z-index: 2; }
  .grab::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; } /* a 44 px tall target round a slim handle */
  .grab i { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); }
  .grab:hover:not(:disabled) { background: var(--card); } .grab:hover i { background: var(--mut-2); }
  .studio:not(.has-sheet) .grab { display: none; }
  .deck-head { padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px)); touch-action: pan-x; }
  .jump { padding: 2px 0 8px; gap: 6px; }
  .jump button { min-height: 44px; padding: 0 16px; font-size: 14px; }
  .jump, .jump button { touch-action: pan-x; } /* a swipe along the step buttons scrolls them, it never drags the sheet */
  .deck-scroll { padding: 14px max(14px, env(safe-area-inset-right, 0px)) 24px max(14px, env(safe-area-inset-left, 0px)); overscroll-behavior: contain; }
  /* one step a page */
  .studio.paged .deck .sect:not(.cur) { display: none; }
  /* the bottom strip: the step row and the footer only (the settings keep their place for when it comes back up) */
  .studio.has-sheet[data-sheet=peek]:not(.dragging) .deck-scroll { padding-top: 0; padding-bottom: 0; }
  .studio.paged .sect + .sect { margin-top: 0; padding-top: 6px; border-top: 0; }
  .deck-foot { gap: 8px; padding: 8px max(12px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .deck-foot .primary { min-height: 48px; padding: 0 18px; font-size: 15px; white-space: nowrap; }
  .deck-foot .foot-back { width: 44px; height: 48px; }
  .foot-sum { gap: 2px; } .status { font-size: 14px; } .foot-sum small { font-size: 12.5px; }
  body.kb .deck-foot { display: none; } /* the keyboard is up: the field gets the room */

  /* touch: every control at least 44 px, text boxes at 16 px so phones do not zoom in on them, and no double-tap zoom
     on quick taps */
  button, a, label, input, select, summary, textarea { touch-action: manipulation; }
  input[type=number], input[type=text], input[type=email], input[type=password], input[type=search], select, textarea { font-size: 16px; }
  .bulk textarea { font-size: 16px; }
  input[type=number], input[type=text], input[type=search], select { min-height: 44px; }
  .sl { grid-template-columns: 1fr 96px 44px; }
  .sl input[type=range] { height: 44px; }
  .sl .reset { width: 44px; height: 44px; }
  .sw { min-width: 44px; min-height: 44px; }
  .row3 button, .actions button { min-height: 48px; }
  .adv > summary, details > summary { min-height: 44px; }
  .dchip { min-height: 44px; }
  button.icon { width: 44px; height: 44px; }
  .btabs button { min-height: 44px; min-width: 44px; }
  .seg button, .tog button, .quick .ghost, .brow .ghost, .fixes button, .ftable td button, a.btn, .row button, .row .filebtn, .dpop .dp-foot > * { min-height: 44px; }
  .field small.help { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
  .field small.help.open { display: block; -webkit-line-clamp: unset; }
  .btabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .btabs::-webkit-scrollbar { display: none; }
  .btabs button { flex: 0 0 auto; }
  .typecards { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  #toast { left: 12px; right: 12px; margin-inline: auto; width: fit-content; max-width: none; transform: translateY(20px); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); text-align: center; }
  #toast.show { transform: none; }

  /* sign-up: the whole line is the target for the terms box */
  .chk { min-height: 44px; align-items: center; } .chk input { width: 22px; height: 22px; margin-top: 0; flex: 0 0 auto; }
  /* printing from a phone: the steps, readable */
  .phoneprint .pp-list { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
}
/* a phone on its side: the model and the panel side by side, the panel as wide as it can usefully be */
@media (max-width: 900px) and (max-height: 520px), (max-height: 520px) and (pointer: coarse) {
  .studio, .studio.has-sheet { grid-template-columns: minmax(0, 1fr) minmax(300px, 50%); grid-template-rows: minmax(0, 1fr); }
  .deck { border-top: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .grab { display: none; }
  .jump { padding: 6px 0; } .jump button { min-height: 40px; }
  .deck-foot { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
  .deck-foot .primary { min-height: 44px; } .foot-sum small { display: none; }
  .dims dl.mat { display: none; }
  .viewpop:not([hidden]) { top: 0; }
  /* every pixel of height counts: a slimmer app bar, the step's heading on one line */
  body.app.compact { --bar: calc(44px + env(safe-area-inset-top, 0px)); }
  .sect-h p { display: none; }
  .sect-h { margin-bottom: 8px; } .sect-h h2 { font-size: 15.5px; }
  .deck-scroll { padding-top: 10px; }
}

/* the menu button and its panel: phones, on every page (and the designer's app bar) */
.menubtn { display: none; }
.sitemenu { display: none; }
@media (max-width: 700px) {
  .topbar { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  .topbar > nav { display: none; }
  .menubtn { display: inline-grid; place-items: center; order: 99; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); }
  .acct .signin, .acct .signup { display: none; }
}
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  body.app.compact .menubtn { display: inline-grid; place-items: center; order: 0; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); }
}
.menubtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menubtn[aria-expanded=true] { background: var(--acc-bg); color: var(--acc-d); }
.sitemenu:not([hidden]) { display: block; position: fixed; inset: var(--bar, 60px) 0 0 0; z-index: 50; background: #16171a33; }
.sitemenu .sm-card { margin: 6px max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-l); padding: 8px; display: grid; gap: 4px; max-height: calc(100dvh - var(--bar, 60px) - 20px); overflow: auto; }
.sitemenu nav, .sitemenu .sm-acct, .sitemenu .sm-more { display: grid; gap: 2px; }
.sitemenu .sm-acct, .sitemenu .sm-more { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.sitemenu a, .sitemenu button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 600; background: transparent; border: 0; text-align: left; width: 100%; }
.sitemenu a:hover, .sitemenu button:hover { background: var(--soft); }
.sitemenu a[aria-current=page] { color: var(--acc-d); background: var(--acc-bg); }
.sitemenu a small { color: var(--mut); font-weight: 500; font-size: 13px; }
.sitemenu .sm-primary { background: var(--acc); color: var(--p-white); justify-content: center; } .sitemenu .sm-primary:hover { background: var(--acc-d); }
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) { body.app.compact .topbar > .install { display: none; } }
/* the phone printing steps are for phones; a computer has Bambu Studio */
body.app:not(.compact) .phoneprint { display: none; }

/* the palette credit at the foot of every page */
.credit { color: var(--mut); font-size: 12px; } .credit a { color: inherit; }

/* Home: a light introduction, with no live 3D engine. */
.home-main { max-width: 1200px; margin: auto; padding: 0 36px 64px; }
.home-main > section { margin: 80px 0; scroll-margin-top: 85px; }
.home-main h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; margin: 0 0 16px; }
.home-main h3 { font-size: 21px; margin: 12px 0 8px; }
.home-main p { color: var(--mut); font-size: 16px; }
.home-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.home-hero h1 { font-size: clamp(38px, 4.5vw, 62px); line-height: 1.04; margin: 16px 0 24px; letter-spacing: -.045em; }
.home-main .home-eyebrow { color: var(--acc); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.home-main .home-lead { font-size: 19px; line-height: 1.6; }
.home-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.home-actions a, .home-consoles a, .home-faq a, .home-pricing a { display: inline-flex; align-items: center; min-height: 44px; }
.home-actions .primary { background: var(--acc); color: var(--p-white); padding: 14px 23px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.home-film { overflow: hidden; border-radius: 28px; background: var(--acc-bg); border: 1px solid var(--line); }
.home-film video { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.film-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0; padding: 14px 20px; background: var(--card); border-top: 1px solid var(--line); min-height: 52px; }
.film-cap b { font-size: 16px; } .film-cap span { color: var(--acc); font-weight: 700; }
.home-film { margin: 0; }
.home-wood { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.wood-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wood-list li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 600; transition: background .2s, border-color .2s; }
.wood-list li.on { background: var(--hi-bg); border-color: var(--p-orange); }
.home-builds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.home-builds a { color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.home-builds a:hover { border-color: var(--acc-line); background: var(--acc-bg); }
.home-builds img { width: 100%; height: auto; display: block; background: var(--bg); }
.home-builds a > div { padding: 4px 16px 16px; }
.home-builds h3 { font-size: 17px; margin: 4px 0 6px; }
.home-builds p { font-size: 14px; margin: 0; }
.home-builds .plan-tag { display: inline-block; margin: 6px 0 2px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--hi-bg); color: var(--warn-ink); }
.home-builds .plan-tag.free { background: var(--ok-bg); color: var(--ok-ink); }
.home-main .home-builds .holds { color: var(--acc); font-weight: 750; font-size: 14px; margin-top: 10px; }
.home-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.home-steps li { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.home-steps span { color: var(--acc); font-weight: 800; }
.home-products, .home-pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.home-products a { color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); }
.home-products a > div { padding: 8px 24px 20px; }
.home-products img, .home-rooms img { width: 100%; height: auto; object-fit: cover; display: block; }
.home-consoles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.home-consoles a { background: var(--card); border: 1px solid var(--acc-line); border-radius: 10px; text-decoration: none; padding: 12px 16px; font-weight: 600; }
.home-consoles a:hover, .home-products a:hover { background: var(--acc-bg); }
.home-rooms, .home-faq > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home-rooms figure { margin: 0; overflow: hidden; border-radius: 14px; background: var(--card); }
.home-rooms figcaption { padding: 16px; font-weight: 650; }
.home-pricing { background: var(--hi-bg); padding: 36px; border-radius: 20px; }
.home-pricing ul { list-style: none; margin: 0; padding: 0; }
.home-pricing li { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.home-pricing li span { text-align: right; }
.home-main a:focus-visible { outline: 3px solid var(--acc); outline-offset: 4px; }
@media (max-width: 1000px) and (min-width: 701px) { .home-builds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
 .home-main { padding: 0 20px 24px; }
 .home-main > section { margin: 48px 0; }
 .home-hero, .home-products, .home-pricing, .home-rooms, .home-faq > div, .home-steps, .home-wood { grid-template-columns: 1fr; gap: 20px; }
 .home-builds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
 .home-builds a > div { padding: 2px 12px 12px; }
 .home-builds h3 { font-size: 15px; }
 .film-cap { padding: 12px 16px; }
 .home-hero h1 { font-size: 43px; }
 .home-consoles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .home-consoles a { overflow-wrap: anywhere; font-size: 13px; padding: 12px; }
 .home-pricing { padding: 24px; }
 .home-pricing li { flex-wrap: wrap; gap: 4px 14px; }
 .home .topbar a { min-height: 44px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .home { scroll-behavior: auto; } html:has(.home) { scroll-behavior: auto; } }

/* 28 October 2026: designer audit. Shared controls and restrained summaries. */
body.app { --control-radius: 10px; }
body.app :is(button, input, select, textarea) { border-radius: var(--control-radius); }
body.app :focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.typecards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet-actions { display: none; }
.preview-status { position: absolute; left: 16px; bottom: 72px; padding: 4px 8px; border-radius: 10px; background: var(--card); color: var(--text); pointer-events: none; }
.preview-status:empty { display: none; }
.preset[aria-pressed=true] { border-color: var(--acc); background: var(--acc-bg); box-shadow: inset 0 0 0 2px var(--acc); }
.preset { height: 100%; }
.deck-foot { min-height: 76px; }
.foot-sum { min-width: 0; }
#stepStatus { display: block; height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; border: 0; background: transparent; }
#footSum { display: none; }
#accountHint { display: block; font-size: 14px; }
body.app summary { cursor: pointer; padding: 8px 0; }
.field details { grid-column: 1 / -1; }
.field small.help { display: block; overflow: visible; cursor: auto; }
.btabs { flex-wrap: nowrap; overflow-x: auto; }
.btabs button { flex-shrink: 0; }
.builder > details { padding: 0 12px; }
#guideBody > .steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
#guideBody li { min-width: 0; }
#guideBody h3 span { flex-shrink: 0; }
.sheet .close { width: 44px; height: 44px; }
.dl-sequence, #dlFeedback { font-size: 14px; }
#dlFeedback:empty { display: none; }
.dl-prog.complete small { display: block; font-size: 18px; font-weight: 700; margin: 12px 0; color: var(--acc-d); }
body.app:has(.overlay:not([hidden])) #toast { display: none; }
#summary dl > div:nth-child(2), #summary dl > div:nth-child(4), .dims dl.mat, .dims .mat-note { display: none; }
@media (max-width: 900px) {
  body.app :is(small, .hint, .sub, .help, .slotHint, figcaption, .preset b, .preset small, .btabs button, .dims dt, .dims dd small, .steps button, .steps .sn, .typecards button b, .typecards button small, .credit, .dsum, .tier) { font-size: 14px; }
  body.app :is(button, select, summary, .chk, .opt, .tswitch, .filebtn) { min-height: 44px; }
  body.app input[type=range] { min-height: 44px; }
  body.app :is(.chk, .opt) { display: flex; align-items: center; }
  .sheet-actions { display: flex; justify-content: space-between; padding: 0 10px; gap: 8px; }
  .sheet-actions button { flex: 1; }
  .grab { height: 12px; }
  .grab::before { display: none; }
  .deck-head .steps { margin: 4px 0; }
  .deck-head .steps > li { margin: 0; }
  .jump { padding: 0; }
  .deck-scroll { padding-top: 8px; }
  .sect-h { margin-bottom: 8px; }
  .sect-h p { margin: 4px 0; }
  #sec0 .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 4px 0; }
  #sec0 .preset { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 1fr 1fr; padding: 4px; gap: 0 4px; height: 64px; text-align: left; justify-items: start; }
  #sec0 .preset .pv { grid-row: 1 / 3; height: 44px; }
  #sec0 .preset .pv svg { max-width: 40px; }
  #sec0 .preset .w { display: none; }
  #sec0 .printerbar { margin: 4px 0; padding: 0; border: 0; }
  #sec0 .printerbar .field { margin: 0; }
  #sec0 .printerbar details { margin: 0; }
  .foot-sum { flex: 1; }
  #accountHint { display: none; }
  #stepStatus { font-size: 14px; }
  .vp-head::after { content: 'Scroll for more view controls ↓'; display: block; font-size: 14px; color: var(--mut); }
  .vp-head { flex-wrap: wrap; }
  #guideBody > .steps { grid-template-columns: minmax(0, 1fr); }
  #guideBody figure { width: 100%; }
  body.app .field small.help { display: block; -webkit-line-clamp: unset; overflow: visible; }
}
@media (max-width: 900px) {
  #sec0 .preset { height: 56px; }
  body.app :is(.dshead, .dsum, .blabel, .bnote, .dchip, .dn, .dl, .dl-parts, .dl-set p, .dl-fmt small, .dl-prog small, .legend, .planbox, .scopenote, .field label, .field summary, .reset, .unit i, .status, .vp-body, .dname, .ftable, .ftable small) { font-size: 14px; }
  .dims dl { gap: 12px; }
  .dims dd { font-size: 18px; }
}

/* Keep a high-priority still visible while the hero film loads. */
.home-hero-media { position: relative; }
.home-hero-media > img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.home-hero-media > video { position: absolute; inset: 0; }
.home-closing { text-align: center; }
