/* Strata – customer interface.
   Identity: graphite machine panels, smoked glass, cool cyan light for the machine and its state,
   amber reserved for money and the primary action. The 3D printer chamber fills the viewport;
   panels are fixed around a "chamber window" (#focus) that the camera keeps the part centred in. */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --void: #05070a;
  --bg: #07090c;
  --g1: #0c1015;
  --g2: #11161c;
  --g3: #182029;
  --g4: #222b36;
  --panel: linear-gradient(180deg, rgba(20, 26, 33, .9), rgba(11, 14, 19, .93));
  --line: rgba(150, 185, 210, .14);
  --line-2: rgba(150, 185, 210, .26);
  --text: #e9eff4;
  --text-2: #b9c5cf;
  --muted: #8d9aa7;
  --cyan: #4fdcff;
  --cyan-2: #a6f0ff;
  --cyan-ink: #072029;
  --cyan-dim: rgba(79, 220, 255, .12);
  --cyan-line: rgba(79, 220, 255, .45);
  --amber: #ffb547;
  --amber-2: #ffc977;
  --amber-ink: #1b1204;
  --ok: #5fe3a6;
  --warn: #ffc95c;
  --bad: #ff6f5e;

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --bar-h: 64px;
  --gap: 20px;
  --cut: 14px;
  --sheet-h: 0px;

  /* chamber window (overridden per view) */
  --fl: 20px; --fr: 20px; --ft: var(--bar-h); --fb: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; background: var(--bg); }
body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  font-family: var(--font-ui); font-size: 15px; line-height: 1.5; color: var(--text);
  background: radial-gradient(120% 80% at 60% 70%, #0d1822 0%, #090c11 45%, var(--void) 100%);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.015em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { flex: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
::selection { background: rgba(79, 220, 255, .35); color: #fff; }

.visually-hidden, .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: 10px; z-index: 100; padding: 10px 14px; background: var(--amber); color: var(--amber-ink); font-weight: 650; transform: translateY(-160%); text-decoration: none; }
.skip-link:focus { transform: none; }
.noscript { position: fixed; inset: 40% 10% auto; text-align: center; color: var(--text); }
.mono, .ax, .pm-v, .grand strong, .order-no strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ chamber */
.chamber { position: fixed; inset: 0; z-index: 0; }
.chamber-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.chamber-canvas:focus-visible { outline: 2px solid var(--cyan); outline-offset: -6px; }
.chamber-fallback {
  position: absolute; display: none; left: var(--fl); right: var(--fr); top: var(--ft); bottom: var(--fb);
  width: calc(100% - var(--fl) - var(--fr)); height: calc(100% - var(--ft) - var(--fb)); opacity: .9;
}
.no-webgl .chamber-fallback { display: block; }
.no-webgl .ro-tools, .no-webgl .ro-help, .no-webgl .dims { display: none; }
.no-webgl .r-readout { grid-template-columns: auto; }
.atmos {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(130% 90% at 50% 55%, transparent 55%, rgba(2, 3, 5, .55) 100%),
    linear-gradient(180deg, rgba(3, 5, 7, .7) 0, transparent 120px);
}
.atmos::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease);
  background: linear-gradient(90deg, transparent 25%, rgba(4, 6, 9, .55) 55%, rgba(4, 6, 9, .82) 100%);
}
[data-view="order"] .atmos::after, [data-view="done"] .atmos::after, [data-view="review"] .atmos::after { opacity: 1; }
[data-view="review"] .atmos::after { opacity: .55; }

/* order step callout: dot on the part → leader line → info card. In: dot, line, card. Out: card, line, dot. */
.callout { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.co-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.co-line { fill: none; stroke: var(--cyan); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 3px rgba(79, 220, 255, .75)); transition: stroke-dashoffset .4s cubic-bezier(.6, 0, .2, 1) .15s; }
.co-dot, .co-ring { transform-box: fill-box; transform-origin: center; transform: scale(0); opacity: 0; transition: transform .25s, opacity .25s; transition-delay: .5s; }
.co-dot { fill: var(--cyan); filter: drop-shadow(0 0 4px rgba(79, 220, 255, .9)); }
.co-ring { fill: none; stroke: var(--cyan); stroke-width: 1; }
.co-box {
  position: absolute; left: 0; top: 0; min-width: 180px; max-width: 250px; padding: 10px 13px 11px;
  background: rgba(4, 8, 12, .84); border: 1px solid var(--cyan-line); box-shadow: 0 0 24px rgba(79, 220, 255, .12);
  opacity: 0; clip-path: inset(0 0 0 100%); transition: opacity .25s, clip-path .3s cubic-bezier(.6, 0, .2, 1);
}
.callout.right .co-box { clip-path: inset(0 100% 0 0); }
.callout.on .co-dot, .callout.on .co-ring { transform: scale(1); opacity: 1; transition-delay: 0s; }
.callout.on .co-ring { opacity: .45; }
.callout.on .co-line { stroke-dashoffset: 0; transition-delay: .2s; }
.callout.on .co-box { opacity: 1; clip-path: inset(0 0 0 0); transition-delay: .55s; }
.co-k { font: 500 10.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.co-name { margin-top: 3px; font-weight: 620; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-meta { margin-top: 2px; font-size: 12px; color: var(--muted); }
.co-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.co-price span { font: 12px var(--font-mono); color: var(--text-2); white-space: nowrap; }
.co-price strong { font: 500 15px var(--font-mono); color: var(--amber); white-space: nowrap; }
.co-vat { margin-top: 1px; font-size: 11px; color: var(--muted); text-align: right; }
@media (prefers-reduced-motion: reduce) { .callout * { transition: none !important; } }
@media (max-width: 900px) { .callout { display: none; } }

.dims { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s; }
.dims.on { opacity: 1; }
.dim {
  position: absolute; left: 0; top: 0; padding: 2px 7px; white-space: nowrap;
  font: 500 12px/1.4 var(--font-mono); color: var(--cyan-2); letter-spacing: .02em;
  background: rgba(4, 8, 12, .82); border: 1px solid rgba(79, 220, 255, .38);
  transition: opacity .2s;
}
.dim::before { margin-right: 6px; color: var(--muted); }
.dim-x::before { content: "X"; } .dim-y::before { content: "Y"; } .dim-z::before { content: "Z"; }

/* ------------------------------------------------------------------ top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--bar-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 0 var(--gap);
  border-bottom: 1px solid rgba(150, 185, 210, .07);
  background: linear-gradient(180deg, rgba(5, 7, 10, .92), rgba(5, 7, 10, .55));
}
@supports (backdrop-filter: blur(4px)) { .bar { backdrop-filter: blur(10px); } }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; justify-self: start; }
.brand:hover { color: #fff; }
.brand-logo { display: block; height: 30px; width: auto; flex: none; }
.brand:hover .brand-logo { filter: brightness(1.12); }

/* Animated wordmark. The y's "v" is a print nozzle: it slides in from the left, laying the filament
   (the swoosh) behind its tip, and when it arrives the other letters ripple out from it.
   Coordinates come from the 512×128 artwork: nozzle tip x≈206 at rest, filament spans x 0–214. */
.logo-anim { position: relative; aspect-ratio: 4 / 1; }
.logo-anim .lg { position: absolute; inset: 0; width: 100%; height: 100%; animation-fill-mode: both; animation-play-state: paused; }

.logo-anim .lg-y { animation: lg-nozzle 1.25s cubic-bezier(.6, 0, .2, 1) .1s both paused; }
.logo-anim .lg-filament { animation: lg-filament 1.25s cubic-bezier(.6, 0, .2, 1) .1s both paused; }
.logo-anim .lg-a, .logo-anim .lg-r { animation: lg-letter .5s cubic-bezier(.2, .8, .2, 1) 1.25s both paused; }
.logo-anim .lg-L, .logo-anim .lg-u { animation: lg-letter .5s cubic-bezier(.2, .8, .2, 1) 1.33s both paused; }
.logo-anim .lg-s { animation: lg-letter .5s cubic-bezier(.2, .8, .2, 1) 1.41s both paused; }
.logo-anim .lg-h { animation: lg-letter .5s cubic-bezier(.2, .8, .2, 1) 1.49s both paused; }
.logo-anim.go .lg { animation-play-state: running; }   /* more specific than the rules above */

@keyframes lg-nozzle {
  0% { transform: translateX(-38.7%); opacity: 0; filter: drop-shadow(0 0 0 rgba(79, 220, 255, 0)); }
  12% { opacity: 1; filter: drop-shadow(0 0 5px rgba(79, 220, 255, .9)); }
  85% { filter: drop-shadow(0 0 5px rgba(79, 220, 255, .9)); }
  100% { transform: none; opacity: 1; filter: drop-shadow(0 0 0 rgba(79, 220, 255, 0)); }
}
/* the reveal edge follows the nozzle tip: x 8 → 214 of 512 */
@keyframes lg-filament {
  0% { clip-path: inset(0 98.4% 0 0); filter: drop-shadow(0 0 4px rgba(79, 220, 255, .8)); }
  85% { filter: drop-shadow(0 0 4px rgba(79, 220, 255, .8)); }
  100% { clip-path: inset(0 58.2% 0 0); filter: drop-shadow(0 0 0 rgba(79, 220, 255, 0)); }
}
@keyframes lg-letter {
  0% { opacity: 0; transform: translateY(18%) scale(.92); filter: blur(3px); }
  100% { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-anim .lg { animation: none !important; }
}
.brand-tag { color: var(--muted); font-size: 13px; padding-left: 12px; border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.steps ol { display: flex; align-items: center; gap: 0; }
.steps li { display: flex; align-items: center; }
.steps li + li::before { content: ""; width: 28px; height: 1px; margin: 0 10px; background: var(--line-2); }
.step { display: inline-flex; align-items: center; gap: 9px; padding: 6px 8px; color: var(--muted); font-size: 13.5px; font-weight: 550; text-decoration: none; white-space: nowrap; border-radius: 2px; }
a.step:hover, button.step:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
button.step { font-family: inherit; line-height: inherit; border: 0; background: none; cursor: pointer; }
button.step:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.step-n {
  display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none;
  font: 500 12px var(--font-mono); border: 1px solid var(--line-2); color: var(--muted);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}
.step-n svg { width: 14px; height: 14px; }
.step.done { color: var(--text-2); }
.step.done .step-n { color: var(--cyan); border-color: var(--cyan-line); background: var(--cyan-dim); }
.step[aria-current] { color: var(--text); }
.step[aria-current] .step-n { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px rgba(79, 220, 255, .45); }

.lang { justify-self: end; display: inline-flex; border: 1px solid var(--line-2); padding: 2px; gap: 2px; }
.lang button { min-width: 40px; height: 32px; border: 0; background: transparent; color: var(--muted); font: 500 12.5px var(--font-mono); letter-spacing: .06em; cursor: pointer; }
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--g4); color: var(--text); }

/* ------------------------------------------------------------------ regions & choreography */
main { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.focus { position: fixed; left: var(--fl); right: var(--fr); top: var(--ft); bottom: var(--fb); pointer-events: none; }
.region {
  position: fixed; z-index: 5; pointer-events: none; visibility: hidden; opacity: 0;
  transition: opacity .28s var(--ease-in), transform .38s var(--ease-in), visibility 0s linear .38s;
}
.region.on {
  pointer-events: auto; visibility: visible; opacity: 1; transform: none;
  transition: opacity .45s var(--ease) .16s, transform .7s var(--ease) .12s, visibility 0s;
}
.booting .region, .booting .region.on { transition: none; }

.panel, .r-queue, .sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .35);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
@supports (backdrop-filter: blur(4px)) {
  @media (pointer: fine) {
    .r-queue, .sheet, .r-readout .ro-info, .r-readout .ro-tools, .msg { backdrop-filter: blur(16px) saturate(1.15); }
    .r-queue, .sheet { background: linear-gradient(180deg, rgba(20, 26, 33, .8), rgba(11, 14, 19, .86)); }
  }
}
/* illuminated top edge, brightest at the hinge side */
.r-queue::before, .sheet::before {
  content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 70%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--cyan) 0, rgba(79, 220, 255, .35) 40%, transparent);
}
.r-queue::after, .sheet::after {
  content: ""; position: absolute; top: 0; left: calc(100% - var(--cut)); width: calc(var(--cut) * 1.4142); height: 1.5px; z-index: 2;
  background: var(--line-2); transform-origin: 0 0; transform: rotate(45deg); pointer-events: none;
}

.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; flex-wrap: wrap; position: relative; }
.panel-head h2 { font-size: 19px; }
.panel-head .sub { color: var(--muted); font-size: 13px; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.panel-head .count { color: var(--muted); font: 12px var(--font-mono); margin-left: auto; }
.panel-head .back { flex-basis: 100%; }
.panel-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 18px 18px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--g4) transparent; }
.panel-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); background: rgba(5, 7, 10, .45); display: grid; gap: 12px; }
.sheet { display: flex; flex-direction: column; }
.sheet-grip { display: none; }
.lead { color: var(--text-2); font-size: 14.5px; margin-bottom: 18px; }
.empty { color: var(--muted); padding: 10px 0 16px; }
.fine { color: var(--muted); font-size: 12.5px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.kicker.ok { color: var(--ok); flex-basis: 100%; }
.kicker svg { width: 16px; height: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; padding: 4px 0; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--text); }

/* ---- upload */
.r-intro { left: clamp(24px, 5vw, 80px); top: calc(var(--bar-h) + clamp(32px, 11vh, 120px)); width: min(500px, 38vw); transform: translateX(-36px); }
.r-intro h1 { font-size: clamp(40px, 4.4vw, 66px); font-weight: 720; letter-spacing: -.04em; line-height: .98; margin: 16px 0 20px; text-wrap: balance; }
.r-intro .lead { font-size: 16.5px; max-width: 44ch; }
.points { display: grid; gap: 10px; margin: 6px 0 30px; }
.points li { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 520; }
.points svg { width: 20px; height: 20px; color: var(--cyan); }
.points li > span { display: grid; gap: 1px; }
.points small { color: var(--muted); font-size: 13px; font-weight: 400; }
.r-intro .fine + .fine { margin-top: 6px; }
.r-intro .fine a { color: var(--text-2); }

.r-port { left: min(44vw, 600px); right: var(--gap); bottom: clamp(20px, 6vh, 64px); display: flex; justify-content: center; transform: translateY(28px); }
.port {
  position: relative; width: min(460px, 100%); padding: 26px 28px 22px; text-align: center;
  display: grid; justify-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(14, 22, 30, .78), rgba(7, 10, 14, .9));
  border: 1px solid var(--cyan-line);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 60px -20px rgba(79, 220, 255, .45), inset 0 1px 0 rgba(166, 240, 255, .2);
}
@supports (backdrop-filter: blur(4px)) { .port { backdrop-filter: blur(14px); } }
.port::before, .port::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--cyan); pointer-events: none; }
.port::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.port::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.port-ring { width: 54px; height: 54px; display: grid; place-items: center; color: var(--cyan); border: 1px solid var(--cyan-line); border-radius: 50%; position: relative; }
.port-ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--cyan); animation: spin 3.2s linear infinite; }
.port-ring svg { width: 24px; height: 24px; }
.port-title { font-size: 18px; font-weight: 620; }
.port-formats { font: 12.5px var(--font-mono); color: var(--text-2); letter-spacing: .02em; }
.port-privacy { font-size: 12.5px; color: var(--muted); max-width: 38ch; }

/* ---- configure */
.r-queue { left: var(--gap); top: calc(var(--bar-h) + 12px); width: 276px; max-height: calc(100dvh - var(--bar-h) - 32px); display: flex; flex-direction: column; transform: translateX(-36px); }
.q-list { overflow: auto; padding: 0 10px; display: grid; gap: 6px; scrollbar-width: thin; scrollbar-color: var(--g4) transparent; }
.q-item { position: relative; }
.q-card {
  width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left;
  padding: 8px 34px 8px 8px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); cursor: pointer; position: relative;
  transition: border-color .2s, background .2s;
}
.q-card:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.q-card[aria-pressed="true"] { border-color: var(--cyan-line); background: var(--cyan-dim); box-shadow: inset 2px 0 0 var(--cyan); }
.q-item.problem .q-card { box-shadow: inset 2px 0 0 var(--bad); }
.q-body { display: grid; gap: 3px; min-width: 0; }
.q-name { font-weight: 560; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-price { font: 500 13px var(--font-mono); color: var(--text); }
.q-x { position: absolute; right: 4px; top: 6px; }
.q-card .bar-progress { position: absolute; left: 0; right: 0; bottom: 0; }
.btn-add { margin: 10px; }
.thumb { width: 48px; height: 48px; display: grid; place-items: center; background: #141820; border: 1px solid var(--line); overflow: hidden; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb svg { width: 20px; height: 20px; }
.fmt { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }

.r-readout { left: calc(276px + var(--gap) * 2); right: calc(392px + var(--gap) * 2); bottom: var(--gap); display: grid; justify-items: center; gap: 8px; transform: translateY(24px); }
.ro-info, .ro-tools { display: inline-flex; align-items: center; background: rgba(8, 11, 15, .82); border: 1px solid var(--line); }
.r-readout { grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 8px; }
.ro-help { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); text-shadow: 0 1px 2px #000; }
.ro-info { gap: 12px; padding: 0 14px; height: 44px; }
.ro-dims { font: 500 14px var(--font-mono); display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ro-dims.muted { color: var(--muted); font-size: 12.5px; }
.ax { font-size: 11px; padding: 1px 4px; margin-left: 6px; border: 1px solid; }
.ax:first-child { margin-left: 0; }
.ax-x { color: #ff8a7a; } .ax-y { color: #7fe7a7; } .ax-z { color: var(--cyan); }
.u { color: var(--muted); font-size: 12px; }
.ro-fit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 560; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.ro-fit svg { width: 15px; height: 15px; }
.ro-fit.ok { color: var(--ok); } .ro-fit.bad { color: var(--bad); }
.ro-tools { padding: 3px; gap: 2px; height: 44px; }
.ro-btn { white-space: nowrap; height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 9px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 560; }
.ro-btn svg { width: 18px; height: 18px; }
.ro-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ro-btn.with-text { color: var(--text); border-right: 1px solid var(--line); margin-right: 2px; padding: 0 12px 0 10px; }
.ro-btn[aria-pressed="true"] { color: var(--cyan); background: var(--cyan-dim); }

.r-msg { left: var(--fl); right: var(--fr); top: var(--ft); bottom: var(--fb); display: grid; place-items: center; pointer-events: none !important; }
.msg {
  display: grid; justify-items: center; gap: 8px; text-align: center; padding: 16px 22px; max-width: 360px;
  background: rgba(6, 9, 13, .82); border: 1px solid var(--line-2); font-size: 14px;
}
.msg .msg-k { font: 500 11.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.msg .msg-sub { color: var(--muted); font-size: 12.5px; }
.msg .bar-progress { width: 220px; }
.msg-failed { border-color: rgba(255, 111, 94, .5); }
.msg-failed svg { color: var(--bad); width: 22px; height: 22px; }
.msg-nogl svg { color: var(--cyan); width: 22px; height: 22px; }

.r-config { right: var(--gap); top: calc(var(--bar-h) + 12px); bottom: var(--gap); width: 392px; transform: translateX(40px); }

/* ---- review / order / done */
.r-review { right: var(--gap); top: calc(var(--bar-h) + 12px); bottom: var(--gap); width: 480px; transform: translateX(48px); }
.r-order { right: var(--gap); top: calc(var(--bar-h) + 12px); bottom: var(--gap); width: min(640px, calc(54vw - 40px)); transform: translateX(56px); }
.r-done { right: var(--gap); top: calc(var(--bar-h) + 12px); bottom: var(--gap); width: 520px; transform: translateX(48px) scale(.985); }

/* chamber window per view (desktop) */
[data-view="upload"] { --fl: min(44vw, 600px); --fr: var(--gap); --fb: 210px; }
[data-view="configure"] { --fl: calc(276px + var(--gap) * 2); --fr: calc(392px + var(--gap) * 2); --fb: 112px; --ft: calc(var(--bar-h) + 8px); }
[data-view="review"] { --fl: var(--gap); --fr: calc(480px + var(--gap) * 2); --fb: var(--gap); }
[data-view="order"] { --fl: var(--gap); --fr: calc(min(640px, calc(54vw - 40px)) + var(--gap) * 2); --fb: var(--gap); }
[data-view="done"] { --fl: var(--gap); --fr: calc(520px + var(--gap) * 2); --fb: var(--gap); }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 18px;
  border: 1px solid transparent; background: none; font-weight: 620; font-size: 14.5px; letter-spacing: .005em;
  cursor: pointer; text-decoration: none; white-space: nowrap; color: var(--text);
  transition: background .18s, border-color .18s, color .18s, box-shadow .25s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-lg { height: 52px; font-size: 15.5px; padding: 0 22px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; gap: 7px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-block > span:first-child { flex: 1; text-align: left; }
.btn-accent {
  background: var(--amber); color: var(--amber-ink);
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .5), 0 14px 34px -14px rgba(255, 181, 71, .7);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.btn-accent:hover { background: var(--amber-2); color: var(--amber-ink); }
.btn-accent svg { transition: transform .25s var(--ease); }
.btn-accent:hover svg { transform: translateX(3px); }
.btn-accent:focus-visible { outline-color: #fff; clip-path: none; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--g3); color: var(--muted); box-shadow: none; cursor: not-allowed; border-color: var(--line);
}
.btn[disabled]:hover svg, .btn[aria-disabled="true"]:hover svg { transform: none; }
.btn-primary { background: rgba(79, 220, 255, .14); border-color: var(--cyan-line); color: #e4faff; }
.btn-primary:hover { background: rgba(79, 220, 255, .24); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan-line); background: rgba(255, 255, 255, .04); color: #fff; }
.btn-quiet { color: var(--cyan-2); padding: 0 8px; }
.btn-quiet:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; font-size: 12px; font-weight: 560; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; line-height: 1.5; }
.chip-busy { color: var(--cyan-2); border-color: rgba(79, 220, 255, .35); }
.chip-ok { color: var(--ok); border-color: rgba(95, 227, 166, .35); }
.chip-bad { color: var(--bad); border-color: rgba(255, 111, 94, .45); }
.chip-warn { color: var(--warn); border-color: rgba(255, 201, 92, .4); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: pulse 1.4s ease-in-out infinite; }

.bar-progress { display: block; height: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar-progress i { display: block; height: 100%; width: var(--pct, 0%); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transition: width .25s; }
.bar-progress.indeterminate i { width: 35%; animation: indet 1.3s ease-in-out infinite; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(79, 220, 255, .25); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
.spinner.lg { width: 34px; height: 34px; border-width: 3px; }
.center { display: grid; place-items: center; }

/* fields */
.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.label, .fs > legend {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 0; margin: 0 0 10px;
  font: 500 11.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
}
.label .value { font: 500 13px var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--text); text-align: right; }
.help { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 8px; }
.help strong { color: var(--text-2); }

.mats { display: grid; gap: 6px; }
.mat {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; padding: 11px 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); cursor: pointer; position: relative; transition: border-color .2s, background .2s;
}
.mat:hover { border-color: var(--line-2); }
.mat input, .swatch input, .seg input, .opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mat-name { font-weight: 620; font-size: 15px; }
.mat-props { color: var(--muted); font-size: 12.5px; text-align: right; }
.mat:has(input:checked) { border-color: var(--cyan-line); background: var(--cyan-dim); box-shadow: inset 2px 0 0 var(--cyan); }
.mat:has(input:focus-visible), .seg label:has(input:focus-visible), .opt:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch .dot { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--swatch, #888); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 -8px 14px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .5); transition: transform .15s; }
.swatch:hover .dot { transform: scale(1.06); }
.swatch:has(input:checked) .dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan), 0 0 16px rgba(79, 220, 255, .5); }
.swatch:has(input:focus-visible) .dot { outline: 2px solid #fff; outline-offset: 5px; }
.swatch:has(input:disabled) { cursor: not-allowed; }
.swatch:has(input:disabled) .dot { opacity: .3; background-image: linear-gradient(135deg, transparent 46%, rgba(255, 255, 255, .8) 47% 53%, transparent 54%); }

.seg { display: grid; gap: 4px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-infill { grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); }
.seg label {
  position: relative; display: grid; place-items: center; text-align: center; gap: 1px; min-height: 42px; padding: 7px 6px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); cursor: pointer; font-size: 13.5px; font-weight: 560; transition: border-color .2s, background .2s, color .2s;
}
.seg label:hover { border-color: var(--line-2); }
.seg-infill label span { font: 500 14px var(--font-mono); }
.seg label small { font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.seg label:has(input:checked) { border-color: var(--cyan-line); background: var(--cyan-dim); color: #fff; }
.seg label:has(input:checked) small { color: var(--cyan-2); }

.qty { display: inline-flex; border: 1px solid var(--line-2); }
.qty button { width: 46px; height: 44px; border: 0; background: rgba(255, 255, 255, .03); cursor: pointer; display: grid; place-items: center; color: var(--text); }
.qty button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.qty button:disabled { color: var(--g4); cursor: not-allowed; }
.qty button svg { width: 16px; height: 16px; }
.qty input { width: 72px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: transparent; font: 500 16px var(--font-mono); -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus-visible { outline-offset: -2px; }

.alert { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; border: 1px solid; border-left-width: 2px; }
.alert > svg { width: 18px; height: 18px; margin-top: 1px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert-bad { border-color: rgba(255, 111, 94, .35); border-left-color: var(--bad); background: rgba(255, 111, 94, .08); }
.alert-bad > svg, .alert-bad strong { color: var(--bad); }
.alert-warn { border-color: rgba(255, 201, 92, .3); border-left-color: var(--warn); background: rgba(255, 201, 92, .07); }
.alert-warn > svg { color: var(--warn); }
.alert-info { border-color: rgba(79, 220, 255, .25); border-left-color: var(--cyan); background: rgba(79, 220, 255, .06); }
.alert-info > svg { color: var(--cyan); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.pstatus { display: grid; gap: 0; margin: 0 0 18px; padding: 12px 14px; border: 1px solid rgba(79, 220, 255, .22); background: rgba(79, 220, 255, .05); }
.ps { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 5px 0; color: var(--muted); font-size: 13.5px; }
.ps-ic { width: 16px; height: 16px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; }
.ps-ic svg { width: 11px; height: 11px; }
.ps.done { color: var(--text-2); }
.ps.done .ps-ic { border-color: var(--cyan); background: var(--cyan); color: var(--cyan-ink); }
.ps.active { color: var(--text); font-weight: 560; }
.ps.active .ps-ic { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 220, 255, .15); }
.ps.active .ps-ic::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: pulse 1.4s ease-in-out infinite; }
.ps-aside { font: 12px var(--font-mono); color: var(--cyan-2); }


/* price module */
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pm-cell { display: grid; align-content: start; gap: 2px; padding: 10px 12px; background: #0b0f14; min-width: 0; }
.pm-k { font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pm-k small { letter-spacing: 0; text-transform: none; font-size: 11px; }
.pm-v { font-size: 21px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-v.amber, .pm-total .pm-v { color: var(--amber); }
.pm-v.calc { font: 500 13.5px var(--font-ui); color: var(--cyan-2); display: flex; align-items: center; gap: 8px; min-height: 27px; white-space: normal; }
.pm-v.muted { color: var(--muted); font-size: 15px; }
.pm-sub { font: 12px var(--font-mono); color: var(--muted); }
.pm-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pm-total .pm-v { color: var(--amber); }
.pm-cell:first-child .pm-v.amber { color: var(--text); }
.pm-sub.calc, .help.calc { display: flex; align-items: center; gap: 7px; font: 500 12px var(--font-ui); color: var(--cyan-2); }
.pm-sub.calc .spinner, .help.calc .spinner { width: 11px; height: 11px; border-width: 1.5px; flex: none; }

.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; justify-self: start; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 34px; height: 20px; border: 1px solid var(--line-2); background: var(--g3); position: relative; flex: none; transition: background .2s, border-color .2s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.toggle input:checked + .sw { background: var(--cyan-dim); border-color: var(--cyan-line); }
.toggle input:checked + .sw::after { transform: translateX(14px); background: var(--cyan); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* review list */
.rv-list { display: grid; gap: 6px; }
.rv-card, .rv-list.static li {
  width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left;
  padding: 8px 12px 8px 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); cursor: pointer; transition: border-color .2s, background .2s;
}
.rv-list.static li { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; cursor: default; }
.rv-card:hover { border-color: var(--line-2); }
.rv-card[aria-pressed="true"] { border-color: var(--cyan-line); box-shadow: inset 2px 0 0 var(--cyan); background: var(--cyan-dim); }
.rv-body { display: grid; gap: 3px; min-width: 0; }
.rv-name { font-weight: 580; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-meta { color: var(--muted); font-size: 12.5px; }
.rv-price { display: grid; justify-items: end; gap: 2px; }
.rv-price strong { font: 500 14.5px var(--font-mono); }
.rv-qty { font: 12px var(--font-mono); color: var(--muted); white-space: nowrap; }

.sum-lines { display: grid; gap: 0; margin: 4px 0 0; }
.sl { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed rgba(150, 185, 210, .12); font-size: 13.5px; }
.sl dt { color: var(--text-2); }
.sl dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl.muted dt, .sl.muted dd { color: var(--muted); }
.grand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.grand span { font: 500 11.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.grand strong { font-size: 28px; font-weight: 500; color: var(--amber); letter-spacing: -.01em; }

.opts { display: grid; gap: 6px; }
.opt {
  position: relative; display: grid; grid-template-columns: 20px 1fr auto; column-gap: 12px; row-gap: 2px; align-items: baseline;
  padding: 12px 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); cursor: pointer; transition: border-color .2s, background .2s;
}
.opt::before { content: ""; grid-row: 1; grid-column: 1; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); align-self: center; transition: box-shadow .2s, border-color .2s; }
.opt:hover { border-color: var(--line-2); }
.opt:has(input:checked) { border-color: var(--cyan-line); background: var(--cyan-dim); }
.opt:has(input:checked)::before { border-color: var(--cyan); box-shadow: inset 0 0 0 4px #0b1218, inset 0 0 0 8px var(--cyan); }
.opt-t { font-weight: 600; grid-column: 2; }
.opt-p { grid-column: 3; font: 13px var(--font-mono); color: var(--text-2); text-align: right; }
.opt-d { grid-column: 2 / -1; font-size: 13px; color: var(--muted); }
/* review step: numbered, clearly separated sections */
.rv-sec { margin: 0 0 14px; padding: 16px 16px 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.rv-sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px; font-weight: 640; color: var(--text); }
.rv-sec-n { display: grid; place-items: center; width: 22px; height: 22px; flex: none; font: 500 12px var(--font-mono); color: var(--cyan-ink); background: var(--cyan); }
.rv-sec-t { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.rv-sec-t svg { width: 17px; height: 17px; color: var(--cyan); flex: none; }
.rv-sec-a { margin-left: auto; font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rv-sec .rv-list { gap: 8px; }
.rv-sec .rv-card { background: rgba(0, 0, 0, .22); }
.rv-sec .opts { gap: 8px; }
.opt-dl { grid-template-columns: 20px 28px 1fr auto; padding: 14px; background: rgba(0, 0, 0, .22); }
.opt-dl .opt-ic { grid-row: 1 / span 2; grid-column: 2; align-self: start; margin-top: -4px; display: grid; place-items: center; width: 28px; height: 28px; color: var(--text-2); }
.opt-dl .opt-ic svg { width: 22px; height: 22px; }
.opt-dl:has(input:checked) .opt-ic { color: var(--cyan); }
.opt-dl .opt-t { grid-column: 3; }
.opt-dl .opt-p { grid-column: 4; }
.opt-dl .opt-d { grid-column: 3 / -1; }
.opt-p.free { padding: 2px 8px; font: 600 12px var(--font-ui); letter-spacing: .02em; color: var(--ok); background: rgba(95, 227, 166, .12); border: 1px solid rgba(95, 227, 166, .35); }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.chosen div { display: grid; gap: 2px; }
.chosen span { font: 13px var(--font-mono); color: var(--text-2); }

/* checkout form */
.fs { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.fs > legend { float: left; }
.fs > legend + * { clear: both; }
.fs > legend small { font: 12px var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--muted); }
.fs .help { margin: 0 0 10px; clear: both; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; clear: both; }
.grid + .grid { margin-top: 12px; }
.grid-3 { grid-template-columns: 1fr 1.4fr 1.2fr; }
.span-2 { grid-column: 1 / -1; }
.inp { display: grid; gap: 6px; min-width: 0; }
.inp-l { font-size: 13px; color: var(--text-2); font-weight: 520; }
.inp-l small { color: var(--muted); font-weight: 400; }
.inp input, .inp textarea {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line-2); background: rgba(3, 5, 8, .6);
  font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.inp textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.inp input::placeholder, .inp textarea::placeholder { color: #6a7682; }
.inp input:hover, .inp textarea:hover { border-color: rgba(150, 185, 210, .4); }
.inp input:focus, .inp textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 220, 255, .16); outline: none; }
.inp input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px #0d141b inset; caret-color: var(--text); }
.inp.err input, .inp.err textarea { border-color: var(--bad); }
.err-msg { display: block; color: var(--bad); font-size: 12.5px; margin-top: 2px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-top: 16px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cyan); }
.check.err span { color: var(--text); }
.mini-sum summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 13px; color: var(--text-2); list-style: none; }
.mini-sum summary::-webkit-details-marker { display: none; }
.mini-sum summary span:last-child { color: var(--cyan-2); }
.mini-sum[open] summary span:last-child { opacity: .6; }
.mini-sum .sum-lines { margin-top: 8px; }

/* confirmation */
.order-no { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 16px 18px; margin: 4px 0 18px; border: 1px solid var(--cyan-line); background: linear-gradient(90deg, rgba(79, 220, 255, .12), rgba(79, 220, 255, .02)); }
.order-no span { font: 500 11.5px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.order-no strong { grid-row: 2; font-size: clamp(24px, 3vw, 32px); font-weight: 500; letter-spacing: .04em; color: var(--cyan-2); text-shadow: 0 0 24px rgba(79, 220, 255, .45); }
.order-no .btn { grid-row: 1 / span 2; grid-column: 2; }
.r-done .lead { margin-bottom: 10px; }
.r-done .help { margin: 0 0 14px; }
.r-done .help .chip { margin: 0 2px; }
.timeline { position: relative; display: grid; gap: 12px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; font-size: 14px; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 9px; height: 9px; border: 1px solid var(--line-2); background: var(--bg); transform: rotate(45deg); }
.timeline li.now { color: var(--text); }
.timeline li.now::before { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* ------------------------------------------------------------------ overlays */
.drop-overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(60% 50% at 50% 55%, rgba(79, 220, 255, .14), rgba(3, 6, 9, .8));
  box-shadow: inset 0 0 0 2px var(--cyan), inset 0 0 120px rgba(79, 220, 255, .25);
}
.drop-overlay.show { opacity: 1; }
.drop-overlay div { padding: 18px 28px; border: 1px solid var(--cyan); background: rgba(5, 9, 13, .9); font-size: 20px; font-weight: 620; color: #fff; }

.toasts { position: fixed; z-index: 70; top: calc(var(--bar-h) + 12px); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: 20px 1fr 28px; align-items: start; gap: 10px; padding: 12px 10px 12px 14px;
  background: #0d1218; border: 1px solid var(--line-2); border-left: 2px solid var(--cyan); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .8);
  font-size: 14px; animation: toast-in .35s var(--ease);
}
.toast > svg { width: 18px; height: 18px; color: var(--cyan); margin-top: 1px; }
.toast.bad { border-left-color: var(--bad); }
.toast.bad > svg { color: var(--bad); }
.toast button { width: 28px; height: 28px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.toast button svg { width: 16px; height: 16px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------------------ narrower desktops */
@media (max-width: 1240px) and (min-width: 901px) {
  :root { --gap: 14px; }
  .r-queue { width: 236px; }
  .r-config { width: 356px; }
  [data-view="configure"] { --fl: calc(236px + var(--gap) * 2); --fr: calc(356px + var(--gap) * 2); }
  .r-readout { left: calc(236px + var(--gap) * 2); right: calc(356px + var(--gap) * 2); }
  .r-review { width: 420px; }
  [data-view="review"] { --fr: calc(420px + var(--gap) * 2); }
  .r-done { width: 460px; }
  [data-view="done"] { --fr: calc(460px + var(--gap) * 2); }
  .brand-tag { display: none; }
  .ro-help { display: none; }
  [data-view="configure"] { --fb: 76px; }
  .steps li + li::before { width: 16px; margin: 0 6px; }
}

/* ------------------------------------------------------------------ mobile & tablet: bottom sheet */
@media (max-width: 900px) {
  :root { --bar-h: 56px; --gap: 12px; --cut: 12px; }
  body { font-size: 15px; }
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 0 12px; }
  .brand-tag { display: none; }
  .brand-logo { height: 22px; }
  .steps { justify-self: center; min-width: 0; }
  .steps li + li::before { width: 10px; margin: 0 4px; }
  .step { padding: 4px; gap: 6px; font-size: 13px; }
  .step:not([aria-current]) .step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lang button { min-width: 34px; height: 30px; }

  /* upload */
  .r-intro { left: 18px; right: 18px; width: auto; top: calc(var(--bar-h) + 18px); }
  .r-intro h1 { font-size: clamp(30px, 8.4vw, 44px); margin: 10px 0 10px; }
  .r-intro .lead { font-size: 14.5px; margin-bottom: 0; }
  .points, .r-intro .fine { display: none; }
  .r-port { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .port { padding: 18px 18px 16px; gap: 10px; }
  .port-ring { display: none; }
  .port-title { font-size: 16px; }
  .port .btn { width: 100%; }
  [data-view="upload"] { --fl: 0px; --fr: 0px; --ft: calc(var(--bar-h) + 170px); --fb: 210px; }

  /* configure */
  .r-queue { left: 0; right: 0; top: var(--bar-h); width: auto; max-height: none; flex-direction: row; align-items: center; clip-path: none; border-width: 0 0 1px; transform: translateY(-16px); }
  .r-queue::before, .r-queue::after { display: none; }
  .r-queue .panel-head { display: none; }
  .q-list { display: flex; overflow-x: auto; overflow-y: hidden; padding: 8px 12px; gap: 8px; flex: 1; scroll-snap-type: x proximity; }
  .q-item { flex: 0 0 210px; scroll-snap-align: start; }
  .q-card { grid-template-columns: 36px minmax(0, 1fr); padding: 6px 30px 6px 6px; }
  .q-card .thumb { width: 36px; height: 36px; }
  .btn-add { margin: 0 12px 0 0; padding: 0 12px; height: 44px; }
  .btn-add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .r-readout { left: 12px; right: 12px; top: calc(var(--bar-h) + var(--q-h, 0px) + 8px); bottom: auto; grid-template-columns: 1fr auto; justify-items: stretch; transform: translateY(-12px); }
  .ro-info { height: 40px; padding: 0 10px; gap: 8px; min-width: 0; overflow: hidden; }
  .ro-dims { font-size: 12.5px; gap: 4px; }
  .ax { margin-left: 4px; font-size: 10px; padding: 0 3px; }
  .ro-fit { font-size: 0; padding-left: 8px; gap: 0; }
  .ro-fit svg { width: 17px; height: 17px; }
  .ro-tools { height: 40px; }
  .ro-btn { height: 32px; min-width: 32px; padding: 0 6px; }
  .ro-btn.with-text span, .ro-help { display: none; }
  .ro-btn.with-text { padding: 0 8px; }
  .r-readout [data-act="v-in"], .r-readout [data-act="v-out"] { display: none; }
  [data-view="configure"], [data-view="review"], [data-view="done"], [data-view="order"] {
    --fl: 0px; --fr: 0px; --fb: var(--sheet-h);
  }
  [data-view="configure"] { --ft: calc(var(--bar-h) + var(--q-h, 0px) + 52px); }
  [data-view="review"], [data-view="done"], [data-view="order"] { --ft: var(--bar-h); }

  .sheet {
    left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: calc(100dvh - var(--bar-h) - 8px);
    transform: translateY(105%); padding-bottom: env(safe-area-inset-bottom);
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
    transition: opacity .28s var(--ease-in), transform .38s var(--ease-in), visibility 0s linear .38s, height .45s var(--ease);
  }
  .sheet.on { transition: opacity .35s var(--ease) .1s, transform .55s var(--ease) .08s, visibility 0s, height .45s var(--ease); }
  [data-snap="half"] .sheet { height: 54dvh; }
  [data-view="configure"][data-snap="half"] .r-config { height: 50dvh; }
  [data-snap="full"] .sheet { height: calc(100dvh - var(--bar-h) - 8px); }
  [data-snap="peek"] .sheet { height: auto; }
  [data-snap="peek"] .sheet .panel-body { display: none; }
  [data-snap="peek"] .sheet .toggle, [data-snap="peek"] .sheet .mini-sum, [data-snap="peek"] .sheet .fine { display: none; }
  .sheet-head { padding: 20px 16px 10px; touch-action: none; cursor: grab; }
  .sheet-grip { display: block; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 72px; height: 22px; border: 0; background: none; cursor: pointer; padding: 0; }
  .sheet-grip i { display: block; width: 40px; height: 4px; margin: 8px auto 0; background: var(--line-2); border-radius: 2px; }
  .sheet-grip:hover i { background: var(--cyan-line); }
  .panel-head h2 { font-size: 17px; }
  .panel-body { padding: 4px 16px 16px; }
  .panel-foot { padding: 10px 16px 12px; gap: 10px; }
  .r-config .panel-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .r-config .pm { grid-column: 1; background: none; border: 0; grid-template-columns: 1fr; }
  .r-config .pm-cell:first-child { display: none; }
  .r-config .pm-cell { padding: 0; background: none; }
  .r-config .pm-sub { display: none; }
  .r-config .panel-foot .btn-accent { grid-column: 2; grid-row: 1; width: auto; }
  .r-config .panel-foot .btn-accent > span:first-child { flex: none; }
  .r-config .panel-foot .btn-accent { padding: 0 16px; gap: 8px; height: 50px; }
  .r-config .pm-v { font-size: 19px; overflow: visible; }
  .r-config .pm-note { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .q-item { flex-basis: 190px; }
  .r-config .toggle { grid-column: 1 / -1; }
  .grand strong { font-size: 24px; }
  .order-no { grid-template-columns: 1fr; }
  .order-no strong { font-size: 26px; white-space: nowrap; }
  .order-no .btn { grid-row: 3; grid-column: 1; justify-self: start; margin-left: -8px; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1.4fr; }
  .grid-3 > :last-child { grid-column: 1 / -1; }
  .toasts { top: auto; bottom: calc(var(--sheet-h) + 10px); }
  .dim { font-size: 11px; padding: 1px 5px; }
}

/* queue strip only when it is useful on small screens */
@media (max-width: 900px) {
  body:not(.multi) .r-queue { display: none; }
  body.multi { --q-h: 62px; }
}

/* ------------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  .region, .region.on, .sheet, .sheet.on { transform: none !important; transition: opacity .15s linear, visibility 0s linear .15s !important; }
  .region.on, .sheet.on { transition: opacity .15s linear, visibility 0s !important; }
  .port-ring::after, .pulse, .ps.active .ps-ic::after, .bar-progress.indeterminate i { animation: none; }
  .bar-progress.indeterminate i { width: 100%; opacity: .5; }
  .spinner { animation-duration: 2s; }
  .toast { animation: none; }
  .atmos::after, .dims, .btn, .btn svg { transition: none; }
}
@media (forced-colors: active) {
  .btn, .mat, .seg label, .opt, .q-card, .rv-card { border: 1px solid ButtonText; }
  .sheet, .r-queue, .port { border: 1px solid CanvasText; }
}
