/* ============================================================
 *  UNFNSHED — Custom shelf, V2  ·  /configurator/v2/shelf.css
 *  The stylesheet of the V2 custom shelf customizer (./shelf.js): the
 *  full-bleed stage, the floating sheet, the stage pills, the sliders and
 *  the buy card. Spec: docs/shelf-customizer.md. Namespace: .scz
 *
 *  Host-agnostic on purpose: nothing here reaches outside the mount. What the
 *  storefront page needs around the mount (a full-width, padding-free section
 *  for the stage) lives in the theme's v2 mount branch and
 *  snippets/configurator-page-styles.liquid — the theme's chrome is the
 *  theme's business, and the live page keeps its own header and footer.
 * ============================================================ */

/* ---- tokens (the Modular builder's) ---- */
.scz {
  --ink: #15130f;
  --ink-soft: rgba(21,19,15,0.62);
  --ink-fade: rgba(21,19,15,0.42);
  --line: rgba(21,19,15,0.10);
  --line-strong: rgba(21,19,15,0.22);
  --paper: #ffffff;
  --paper-soft: rgba(21,19,15,0.05);
  --ground: #f3f1ed;
  --wood-top: #eadfce;
  --wood-part: #ddcbb3;
  --wood-line: rgba(21,19,15,0.72);
  --cream: #f6f2ea;
  --accent: #f25a38;
  --accent-deep: #d94828;
  --accent-soft: rgba(242,90,56,0.11);
  --green: #1e7a46;
  --track: rgba(21,19,15,0.13);
  --trk-h: 4px;
  --thumb-d: 20px;
  --radius-card: 22px;
  --radius-inner: 12px;
  --shadow-card: 0 1px 2px rgba(21,19,15,0.05), 0 18px 48px rgba(21,19,15,0.10);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 180ms;
  --panel-w: min(430px, 40vw);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
}
.scz *, .scz *::before, .scz *::after { box-sizing: border-box; }
.scz button, .scz input { font: inherit; color: inherit; }
.scz button { cursor: pointer; touch-action: manipulation; }
.scz button:disabled { cursor: not-allowed; opacity: 0.38; }
.scz ::selection { background: var(--ink); color: #f2efec; }
.scz :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.scz h1, .scz h2, .scz h3 { font-weight: 400; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.scz em { font-style: italic; color: var(--accent); }
.scz .scz-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =========================================================
   THE BUILDER — stage + sheet
   Mobile: the stage is sticky at the top and the sheet scrolls up over it.
   Desktop: the stage is the whole viewport, the sheet floats on the right.
   The stage holds the 2D drawing and the 3D view; the tabs swap them.
   ========================================================= */
.scz-builder { position: relative; }
.scz-stage {
  position: sticky; top: 0; z-index: 0;
  height: 50svh; min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(21,19,15,0.10), transparent 60%),
    linear-gradient(180deg, #f8f6f2 0%, #f3f0ea 55%, #e9e4db 100%);
}
/* The drawing sits on paper; the 3D view on the lit floor behind it. */
.scz-paper { position: absolute; inset: 0; background: linear-gradient(180deg, #fbfaf8 0%, #f5f3ef 100%); transition: opacity 200ms var(--ease-out); }
.scz-stage[data-mode="3d"] .scz-paper { opacity: 0; }
.scz-view3d { position: absolute; inset: 0; touch-action: none; cursor: grab; overflow: hidden; }
.scz-view3d:active { cursor: grabbing; }
.scz-view3d canvas { display: block; width: 100%; height: 100%; }
.scz-drawing { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.scz-drawing svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scz-stage[data-mode="2d"] .scz-view3d, .scz-stage[data-mode="3d"] .scz-drawing { visibility: hidden; }
.scz-drawing.is-swapping svg, .scz-drawing.is-swapping .scz-dimlabel { animation: scz-fade 220ms var(--ease-out); }
@keyframes scz-fade { from { opacity: 0; } }
.scz-drawing .p-shelf { fill: var(--wood-top); stroke: var(--wood-line); stroke-width: 1; stroke-linejoin: round; }
.scz-drawing .p-leg { fill: var(--wood-part); stroke: var(--wood-line); stroke-width: 1; stroke-linejoin: round; }
/* Dimensions — thin ink lines, one white label per measurement. */
.scz-drawing line { stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; opacity: 0.75; }
.scz-drawing line.ext { stroke-width: 1; opacity: 0.32; }
.scz-dimlabel {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  padding: 5px 9px; border-radius: 999px; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(21,19,15,0.10), inset 0 0 0 1px var(--line);
}
.scz-dimlabel[hidden] { display: none; }
.scz-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 24px; text-align: center; color: var(--ink-fade); font-size: 13px; }

.scz-topbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
}
.scz-topbar > * { pointer-events: auto; }
/* Stage controls: frosted pills that sit on either surface. */
.scz-pill, .scz-resetview {
  height: 36px; border-radius: 999px;
  background: rgba(255,255,255,0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgba(21,19,15,0.08), inset 0 0 0 1px var(--line);
}
.scz-pill { display: inline-flex; align-items: center; gap: 2px; padding: 3px; }
.scz-pill button {
  height: 30px; border: 0; background: transparent; border-radius: 999px; padding: 0 13px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.scz-pill button:hover, .scz-pill button.is-hover { color: var(--ink); }
.scz-pill button:active, .scz-pill button.is-active { transform: scale(0.97); }
.scz-pill button[aria-selected="true"] { background: var(--ink); color: #fff; }
/* Front|Top only describes the drawing — hidden in 3D, keeping its space. */
.scz-stage[data-mode="3d"] #pill-view { visibility: hidden; }

/* First-run gesture hint, then the Reset view button in the same corner. */
.scz-orbithint, .scz-resetview { position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: 16px; }
.scz-orbithint {
  height: 36px; display: flex; align-items: center; gap: 7px;
  color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 320ms ease;
}
.scz-orbithint.is-on { opacity: 1; }
.scz-orbithint.is-instant { transition: none; }
.scz-gesture { display: inline-flex; align-items: center; gap: 4px; }
.scz-gesture-icon { width: 14px; height: 14px; flex: none; overflow: visible; }
.scz-gesture-divider { opacity: 0.52; }
.scz-resetview {
  display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0 14px 0 11px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(2px);
  transition: opacity 180ms ease, transform 180ms ease, background-color var(--dur);
}
.scz-resetview.is-on { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.scz-resetview:hover { background: #fff; }
.scz-resetview:active { transform: scale(0.97); }
.scz-resetview svg { width: 15px; height: 15px; flex: none; }

/* Scroll lane — desktop only. The stage is the whole viewport there and the
   3D canvas takes every wheel as zoom, so the bottom sliver of the stage
   belongs to the page instead: it sits over the canvas (OrbitControls only
   hears the canvas), so a wheel here scrolls the site. A caret bobs in it to
   say so, and retires on the first scroll. On phones the sheet already
   scrolls the page. */
.scz-scrolllane { display: none; }
.scz-scrollcaret {
  width: 22px; height: 22px; color: var(--ink-fade);
  animation: scz-bob 1.8s ease-in-out infinite;
  transition: opacity 600ms ease, color var(--dur);
}
.scz-scrolllane:hover .scz-scrollcaret { color: var(--ink); }
.scz-scrolllane.is-gone .scz-scrollcaret { opacity: 0; }
@keyframes scz-bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

/* ---- the sheet ---- */
.scz-panel {
  position: relative; z-index: 2;
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  margin-top: -14px;
  padding: 8px 20px 28px;
  box-shadow: 0 -10px 36px rgba(21,19,15,0.10);
}
.scz-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 4px auto 14px; }
.scz-panelhead { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.scz-panelhead h2 { font-family: var(--serif); font-size: 28px; line-height: 1; letter-spacing: -0.01em; }

/* segmented pills — one tab style everywhere */
.scz-seg { display: inline-flex; background: var(--paper-soft); border-radius: 999px; padding: 3px; gap: 2px; }
.scz-seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 4px 11px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), box-shadow var(--dur);
}
.scz-seg button:hover, .scz-seg button.is-hover { color: var(--ink); }
.scz-seg button:active, .scz-seg button.is-active { transform: scale(0.98); }
.scz-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(21,19,15,0.14); }

/* One row per dimension: label / slider / value. The label column is a fixed
   width so every slider starts and ends on the same lines. */
.scz-controls { margin: 0; padding: 12px 0 18px; border: 0; }
.scz-control { display: grid; grid-template-columns: 6.7em minmax(0, 1fr) auto; grid-template-areas: "label slider value"; align-items: center; column-gap: 12px; }
.scz-control label { grid-area: label; font-size: 14px; font-weight: 600; white-space: nowrap; }
.scz-control input[type=range] { grid-area: slider; }
.scz-control .scz-valbox { grid-area: value; }
.scz-control + .scz-control { margin-top: 6px; }
.scz-control.scz-control-sep { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.scz-valbox { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 9px 0 0; background: var(--paper); transition: border-color var(--dur), box-shadow var(--dur); }
.scz-valbox:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper-soft); }
.scz-control:has(input[type=range]:active) .scz-valbox { border-color: var(--accent); }
.scz-val { width: 4.2em; border: 0; background: transparent; padding: 7px 4px 7px 10px; font-size: 15px; font-weight: 600; text-align: right; min-width: 0; font-variant-numeric: tabular-nums; }
.scz-val:focus { outline: none; }
.scz-unit { font-size: 12px; color: var(--ink-fade); }

/* sliders — WebKit has no progress pseudo-element, so JS keeps --fill in sync.
   pan-y: a vertical swipe across a slider still scrolls the page. */
.scz input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; background: transparent; cursor: pointer;
  /* The host page (the storefront theme) styles every <input> as a boxed
     field — border, padding, radius, shadow. A slider is a bare track. */
  padding: 0; border: 0; border-radius: 0; box-shadow: none; outline: none;
  touch-action: pan-y;
  --fill: 0%;
}
.scz input[type=range]:focus { outline: none; }
.scz input[type=range]::-webkit-slider-runnable-track {
  height: var(--trk-h); border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill), var(--track) var(--fill) 100%);
}
.scz input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: var(--thumb-d); height: var(--thumb-d); border-radius: 999px;
  background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(21,19,15,0.28);
  margin-top: calc((var(--trk-h) - var(--thumb-d)) / 2);
  transition: transform var(--dur) var(--ease-out);
}
.scz input[type=range]:hover::-webkit-slider-thumb, .scz input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.scz input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.scz input[type=range]::-moz-range-track { height: var(--trk-h); border-radius: 999px; background: var(--track); }
.scz input[type=range]::-moz-range-progress { height: var(--trk-h); border-radius: 999px; background: var(--accent); }
.scz input[type=range]::-moz-range-thumb { width: var(--thumb-d); height: var(--thumb-d); border-radius: 999px; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(21,19,15,0.28); }
.scz input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

/* buy card */
.scz-buy { border-top: 1px solid var(--line); padding-top: 18px; }
.scz-pricerow { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.scz-price { font-family: var(--serif); font-size: 46px; line-height: 1; display: flex; align-items: flex-start; letter-spacing: -0.01em; }
.scz-price .unfn-price-char { display: block; height: 1em; }
.scz-price .unfn-price-digit { display: block; height: 1em; overflow: hidden; transition: width 0.28s cubic-bezier(0.22,0.61,0.36,1); }
.scz-price .unfn-price-roll { display: block; transition: transform 0.28s cubic-bezier(0.22,0.61,0.36,1); }
.scz-price .unfn-price-roll span { display: block; height: 1em; }
.scz-shipnote { margin-top: 7px; font-size: 13px; color: var(--ink-soft); }
.scz-shipnote.is-free { color: var(--green); font-weight: 600; }
.scz-readout { list-style: none; margin: 0; padding: 0; text-align: right; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.scz-readout b { font-weight: 600; color: var(--ink); }
.scz-warn:empty { display: none; }
.scz-warn { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: #94341f; font-size: 13px; line-height: 1.5; }
.scz .scz-cta {
  width: 100%; border: 0; border-radius: 999px; padding: 17px 20px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 600;
  box-shadow: 0 8px 22px rgba(242,90,56,0.28);
  transition: background-color var(--dur), transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.scz-cta:hover:not(:disabled), .scz-cta.is-hover { background: var(--accent-deep); }
.scz-cta:active:not(:disabled), .scz-cta.is-active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(242,90,56,0.24); }
.scz-cta:disabled { background: var(--ink-fade); box-shadow: none; opacity: 1; }
.scz .scz-cta[data-state="loading"] { color: transparent; position: relative; }
.scz-cta[data-state="loading"]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: scz-spin 700ms linear infinite; }
.scz-cta[data-state="loading"]:disabled { background: var(--accent); }
@keyframes scz-spin { to { transform: rotate(360deg); } }
.scz-note { margin: 12px 0 0; font-size: 13px; color: var(--ink); text-align: center; line-height: 1.5; }
.scz-note:empty { display: none; }
.scz-note a { text-decoration: underline !important; text-underline-offset: 3px; }
.scz-ok { color: var(--green); font-weight: 600; }

/* Trust badges — the live builder's three, under the buy card. */
.scz-badges { display: flex; justify-content: space-evenly; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.scz-badge { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; min-width: 0; max-width: 140px; }
.scz-badge img { width: 30px; height: 30px; object-fit: contain; margin-bottom: 8px; opacity: 0.85; }
.scz-badge p { margin: 0; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ink-soft); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 900px) {
  /* The stage is the viewport, less whatever the host page puts above the
     mount (the storefront's own header): --scz-offset is measured by the
     module (./host-offset.js), so the whole builder fits without a scroll. */
  .scz-builder { height: calc(100svh - var(--scz-offset, 0px)); min-height: 660px; }
  .scz-stage { position: absolute; inset: 0; height: auto; min-height: 0; }
  .scz-view3d, .scz-drawing { right: calc(var(--panel-w) + 56px); }
  .scz-topbar { padding: 22px 28px 0; right: calc(var(--panel-w) + 56px); }
  .scz-orbithint, .scz-resetview { top: 22px; right: calc(var(--panel-w) + 56px + 14px); }
  .scz-scrolllane {
    display: flex; align-items: center; justify-content: center;
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; /* full width: the caret centres on the screen, not the 3D area; the sheet still covers its corner */
    height: 5%; min-height: 40px; cursor: default;
  }
  .scz-panel {
    position: absolute; top: 30px; right: 20px; bottom: 20px; width: var(--panel-w);
    margin: 0; border-radius: var(--radius-card); overflow-y: auto; overscroll-behavior: contain;
    padding: 22px 22px 22px;
    background: rgba(255,255,255,0.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card), inset 0 0 0 1px var(--line);
    scrollbar-width: thin;
  }
  .scz-grip { display: none; }
}
@media (max-width: 899.98px) {
  /* Fingers, not cursors: a heavier bar and thumb (the live builder's phone sizes). */
  .scz { --trk-h: 5px; --thumb-d: 22px; }
}
@media (max-width: 520px) {
  .scz-orbithint .scz-gesture[data-gesture="pan"] { display: none; }
}
@media (max-width: 420px) {
  .scz-gesture-icon { display: none; }
}
/* Very narrow phones: the single row would squeeze the slider, so it goes
   full width under the label + value row — as the live builder does. */
@media (max-width: 400px) {
  .scz-control { grid-template-columns: 1fr auto; grid-template-areas: "label value" "slider slider"; row-gap: 0; }
  .scz-control + .scz-control { margin-top: 4px; }
  .scz-badge p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .scz *, .scz *::before, .scz *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .scz-price .unfn-price-digit, .scz-price .unfn-price-roll { transition: none; }
  .scz-scrollcaret { animation: none; }
}

/* ============================================================
 *  The Slider Table on top of the stage above (was style.css on the internal page). */
/* The stage, sheet, controls, and tokens come from the shared Shelf V2 CSS. */
.scz .scz-panelhead { gap: 12px; }
.scz .scz-panelhead h1 { font-family: var(--serif); font-size: 28px; line-height: 1.05; letter-spacing: -.01em; }
.scz .scz-seg { flex-shrink: 0; }
.scz .table-intro { margin: 16px 0 0; color: var(--ink-soft); font-size: 14px; }
.scz .table-summary { border-top: 1px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.scz .table-summary-title { color: var(--ink-soft); font-size: 12px; }
.scz .table-summary strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scz #source-size { border: 0; padding: 5px 0; background: transparent; color: var(--ink-soft); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.scz #source-size:hover { color: var(--ink); }
.scz .table-assembly { padding-top: 18px; border-top: 1px solid var(--line); }
.scz .table-door-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.scz .table-door-label label { font-weight: 600; }
.scz .table-door-label output { color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.scz .table-preview-note { margin: 24px 0 0; text-align: center; font-size: 12px; color: var(--ink-fade); }
/* The internal test order (2026-10-12): the materialized cutting files, straight into /custom. */
.scz .table-order { margin-top: 18px; display: grid; gap: 8px; }
.scz .table-quote { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 14px; border-radius: 12px; background: rgba(21,19,15,.04); }
.scz .table-quote > div { display: flex; flex-direction: column; gap: 2px; }
.scz .table-quote span { font-size: 12px; color: var(--ink-soft); }
.scz .table-quote strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.scz .table-quote-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12px; color: var(--ink-fade); }
.scz .table-order-button { width: 100%; min-height: 44px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font: 600 14px/1 var(--sans, "Instrument Sans", system-ui, sans-serif); cursor: pointer; transition: opacity var(--dur) var(--ease-out); }
.scz .table-order-button:disabled { opacity: .4; cursor: default; }
.scz .table-order-result { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--ink-soft); }
.scz .table-order-result a { color: var(--ink); text-underline-offset: 3px; }
.scz .table-order-ok { color: var(--green); font-weight: 600; }



/* Full scene with a floating sheet; no separate viewport column. The stage is a living-room diorama
   (see room.js); its ground colour stands behind the canvas before it draws. */
.scz { background: transparent; }
.scz .scz-builder { min-height: calc(100svh - var(--scz-offset, 0px)); height: auto; padding: 52svh 16px 24px; }
.scz .scz-stage { position: absolute; inset: 0; height: 100%; min-height: 0; background: #e9e2d8; }
.scz .scz-view3d { inset: 0; touch-action: pan-y pinch-zoom; }
.scz .scz-view3d canvas { touch-action: pan-y pinch-zoom; outline-offset: -4px; }
.scz .scz-view3d canvas.is-dragging { cursor: grabbing; }
.scz .scz-panel { position: relative; top: auto; right: auto; bottom: auto; margin: 0; width: 100%; padding: 24px; border: 0; border-radius: 24px; background: rgba(255,253,249,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 2px 4px rgba(25,18,10,.06), 0 24px 80px rgba(25,18,10,.22), inset 0 1px rgba(255,255,255,.75); }
.scz .scz-panelhead, .scz .table-summary, .scz .table-assembly { border: 0; }
.scz .table-intro { margin-top: 4px; }
.scz .table-summary { padding: 12px 0 20px; }
.scz .table-assembly { padding-top: 8px; }
.scz .table-preview-note { margin-top: 20px; }
.scz .table-gesture { top: calc(52svh - 30px); bottom: auto; left: 16px; right: 16px; color: rgba(29,20,16,.62); font-size: 12px; }
.scz .scz-valbox { background: rgba(255,255,255,.65); }
/* The value boxes read like the live customizers' (plain text fields): no spinner arrows. They
   stay number inputs, so typing and the arrow keys still step the value. */
.scz .scz-val { -moz-appearance: textfield; appearance: textfield; }
.scz .scz-val::-webkit-inner-spin-button, .scz .scz-val::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.scz button:active { transform: scale(.96); }
@media (min-width: 900px) {
  .scz .scz-builder { height: calc(100svh - var(--scz-offset, 0px)); min-height: 620px; padding: 0; }
  .scz .scz-panel { position: absolute; top: 80px; right: 24px; bottom: auto; width: min(410px, 36vw); max-height: calc(100% - 104px); overflow-y: auto; overscroll-behavior: contain; }
  .scz .table-gesture { top: auto; bottom: 24px; left: 0; right: calc(min(410px, 36vw) + 64px); }
}
@media (max-width: 480px) { .scz .scz-panel { padding: 22px; } }
/* The intro: the panel and the gesture hint wait until the table has assembled. */
.scz .scz-panel, .scz .table-gesture { transition: opacity .7s ease, visibility 0s linear 0s; }
.scz-builder.is-intro .scz-panel, .scz-builder.is-intro .table-gesture { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.scz .table-replay { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.scz .table-replay:hover { color: var(--ink); }
/* Development scrubber for the intro (internal page; remove when the intro is final). */
.scz .table-scrub { position: absolute; z-index: 4; top: 64px; left: 28px; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,253,249,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 2px rgba(25,18,10,.08), 0 8px 24px rgba(25,18,10,.12); font-size: 12px; }
.scz .table-scrub-tag { padding: 3px 8px; border-radius: 999px; background: #1d1410; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.scz #scrub-play { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #1d1410; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; }
.scz #scrub { width: min(260px, 40vw); margin: 0; }
.scz #scrub-time { min-width: 48px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
/* × puts the whole timeline away until the page is reloaded (James, 2026-11-03). */
.scz #scrub-hide { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: rgba(29,20,16,.08); color: var(--ink-soft); font-size: 14px; line-height: 1; cursor: pointer; }
.scz #scrub-hide:hover { background: rgba(29,20,16,.16); color: var(--ink); }
.scz .table-scrub[hidden] { display: none; }
@media (max-width: 480px) { .scz .table-scrub { top: 52px; left: 16px; right: 16px; } .scz #scrub { flex: 1; width: auto; } }
@media (prefers-reduced-motion: reduce) { .scz button:active { transform: none; } .scz .table-replay { display: none; } }
/* The size line carries the blueprint button. */
.scz .table-size { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; width: 100%; }
.scz .table-size .table-blueprint { justify-self: start; }
/* Each number with its axis letter over the digits alone (not the unit). */
.scz #current-size { display: flex; align-items: flex-end; gap: 6px; padding-top: 16px; white-space: nowrap; }
.scz .dim-num { position: relative; }
.scz .dim-axis { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; color: var(--ink-soft); font-size: 11px; font-weight: 500; line-height: 1; }
.scz .dim-x { color: var(--ink-soft); font-weight: 500; }
.scz .table-blueprint { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: rgba(21,19,15,.05); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); cursor: pointer; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.scz .table-blueprint:hover { background: #17497f; color: #fff; box-shadow: none; }
.scz .table-blueprint:disabled { opacity: .35; cursor: default; background: transparent; color: var(--ink); }
.scz .table-assembly .scz-note { margin: 4px 0 0; text-align: left; }

/* Blueprint viewer: the sheet in blueprint blue; the downloads print black on white. */
/* The desk the sheet lies on: classic blueprint blue under a soft drafting grid (fine every 24 px,
   stronger every 120 px). */
.bp { width: min(1440px, calc(100vw - 32px)); height: calc(100svh - 32px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 20px; color: #eef4fc;
  background-color: #1d4f91;
  background-image: linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px), radial-gradient(120% 90% at 50% 40%, rgba(255,255,255,.06), rgba(0,0,0,.18));
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px, 100% 100%;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px, 0 0; font-family: "Instrument Sans", system-ui, sans-serif; box-shadow: 0 30px 120px rgba(4,12,24,.5); overflow: hidden; }
.bp[open] { display: flex; flex-direction: column; animation: bp-in .28s cubic-bezier(.22,1,.36,1); }
.bp::backdrop { background: rgba(10,18,30,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes bp-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.bp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 12px 24px; }
.bp-heading { min-width: 0; }
.bp-heading h2 { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-size: 28px; font-weight: 400; line-height: 1.05; }
.bp-heading p { margin: 4px 0 0; font-size: 13px; color: rgba(238,244,252,.78); font-variant-numeric: tabular-nums; }
.bp-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bp button { font: inherit; cursor: pointer; }
.bp-download { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: #f25a38; color: #fff; font-size: 14px !important; font-weight: 600 !important; box-shadow: 0 6px 18px rgba(242,90,56,.35); }
.bp-download:hover { background: #d94828; }
.bp-svg { height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(238,244,252,.1); color: #eef4fc; font-size: 13px !important; font-weight: 600 !important; letter-spacing: .04em; }
.bp-svg:hover { background: rgba(238,244,252,.18); }
.bp-close { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgba(238,244,252,.1); color: #eef4fc; }
.bp-close:hover { background: rgba(238,244,252,.2); }
.bp :focus-visible { outline: 2px solid #f25a38; outline-offset: 3px; }
.bp-sheet { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 24px; container-type: size; }
.bp-sheet svg { display: block; width: min(100cqw, 100cqh * 431.8 / 279.4); height: auto; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(6,22,48,.3), 0 10px 24px rgba(6,22,48,.28), 0 30px 70px rgba(6,22,48,.3); }
.bp-status { margin: 0; color: rgba(238,244,252,.6); font-size: 14px; }
.bp-foot { margin: 0; padding: 12px 24px 16px; font-size: 12px; color: rgba(238,244,252,.7); text-align: center; }
@media (max-width: 760px) {
  .bp { width: 100vw; height: 100svh; border-radius: 0; }
  .bp-bar { flex-wrap: wrap; padding: 14px 16px 10px; }
  .bp-heading h2 { font-size: 24px; }
  /* A phone shows the sheet at a readable size and scrolls it; the page itself never scrolls sideways. */
  .bp-sheet { display: block; place-items: normal; container-type: normal; overflow: auto; padding: 0 16px; -webkit-overflow-scrolling: touch; }
  .bp-sheet svg { width: 880px; max-width: none; }
  .bp-status { padding: 24px 0; }
  .bp-foot { padding: 10px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) { .bp[open] { animation: none; } }
.scz .table-corners { padding: 4px 0 8px; }
/* The top's surface (2026-10-16): birch, or a laminate colour. Round swatches; the chosen one ringed. */
.scz .table-tops { padding: 6px 0 8px; }
.scz .table-tops #top-label { font-weight: 600; }
.scz .table-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.scz .table-swatches button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(21,19,15,0.16), inset 0 -4px 6px rgba(21,19,15,0.08); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.scz .table-swatches button[data-finish="birch"] { background: url('../birch-face.webp') center / 260% auto, var(--swatch); }
.scz .table-swatches button:hover { transform: translateY(-1px); }
.scz .table-swatches button:active { transform: scale(0.94); }
.scz .table-swatches button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(21,19,15,0.16), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.scz .table-swatches button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) { .scz .table-swatches button { transition: none; } }
/* The finger pull's shape (2026-10-16): one tile per shape, each a little door chip with the pull
   cut through it, drawn from the same outline the cutting file uses. */
.scz .table-pulls { padding: 6px 0 10px; }
.scz .table-pulls #pull-label { font-weight: 600; }
.scz .table-pull-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin-top: 8px; padding: 3px; border-radius: 14px; background: var(--paper-soft); }
.scz .table-pull-seg button { display: grid; place-items: center; height: 46px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-soft); cursor: pointer; transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), box-shadow var(--dur), transform var(--dur) var(--ease-out); }
.scz .table-pull-seg button:hover { color: var(--ink); }
.scz .table-pull-seg button:active { transform: scale(0.96); }
.scz .table-pull-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(21,19,15,0.14); }
.scz .table-pull-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.scz .table-pull-seg svg { display: block; width: 38px; height: 28px; overflow: visible; }
.scz .table-pull-seg .chip { fill: var(--wood-top); stroke: var(--line-strong); stroke-width: 1; transition: fill var(--dur) var(--ease-out); }
.scz .table-pull-seg button[aria-pressed="true"] .chip { fill: var(--wood-part); }
.scz .table-pull-seg .pull { fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .scz .table-pull-seg button { transition: none; } }
.scz #corner-radius, .scz #overhang { margin: 0; }
/* Door grips: a ring over a door's finger hole; press and drag to slide the door. */
.scz .door-grip { position: absolute; z-index: 2; pointer-events: none; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(29,20,16,.28), 0 2px 10px rgba(29,20,16,.25), inset 0 0 0 1px rgba(29,20,16,.18); opacity: 0; transform: translate(-50%, -50%) scale(.7); transition: opacity .15s ease, transform .2s cubic-bezier(.22,1,.36,1); }
.scz .door-grip.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.scz .door-grip.is-dragging { border-color: #f25a38; }
.scz .scz-view3d canvas.is-door-hover { cursor: pointer; }
.scz .scz-view3d canvas.is-door-drag, .scz .scz-view3d canvas.is-door-drag.is-dragging { cursor: ew-resize; }
@media (prefers-reduced-motion: reduce) { .scz .door-grip { transition: none; } }
/* Dimensions (the live shelf and bench customizers' button and overlay; the lines and labels are
   scz.css's .scz-dimlayer / .scz-dimlabel). Under the header on a phone, beside the sheet's top on
   desktop. Pressed = ink, like a selected tab. Waits out the intro with the panel. */
.scz .scz-dimtoggle {
  position: absolute; z-index: 3; top: 68px; right: 16px; height: 36px;
  display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0 14px 0 11px; border-radius: 999px;
  background: rgba(255,255,255,0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgba(21,19,15,0.08), inset 0 0 0 1px var(--line);
  font: 600 13px/1 var(--sans, "Instrument Sans", system-ui, sans-serif); color: var(--ink); cursor: pointer;
  transition: background-color .18s, color .18s, transform .18s ease-out, opacity .7s ease, visibility 0s linear 0s;
}
.scz .scz-dimtoggle[hidden] { display: none; }
.scz .scz-dimtoggle svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scz .scz-dimtoggle:hover { background: #fff; }
.scz .scz-dimtoggle[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.scz-builder.is-intro .scz-dimtoggle { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
@media (min-width: 900px) { .scz .scz-dimtoggle { top: 80px; right: calc(min(410px, 36vw) + 24px + 16px); } }
.scz .scz-dimlayer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.scz .scz-dimlayer[hidden] { display: none; }
.scz .scz-dimlayer svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scz .scz-dimlayer line { stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; opacity: 0.75; }
.scz .scz-dimlayer line.ext { stroke-width: 1; opacity: 0.32; }
/* On a phone the dev scrubber spans the top of the stage: the button goes under it. */
@media (max-width: 480px) { .scz .scz-dimtoggle { top: 104px; } }
