/* ============================================================
 *  UNFNSHED — Custom Shape Table  ·  /configurator/shape-table/widget.css
 *  The stylesheet of the Shape Table customizer (./widget.js): the
 *  full-bleed stage, the floating sheet, the stage pills, the sliders and
 *  the buy card. Spec: docs/shape-table-customizer.md. Namespace: .tcz
 *
 *  The bench customizer's stylesheet renamed (.bcz → .tcz). Host-agnostic on purpose:
 *  nothing here reaches outside the mount. What the storefront page needs
 *  around the mount lives in the theme's mount branch and
 *  snippets/configurator-page-styles.liquid.
 * ============================================================ */

.tcz {
  --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);
  --pocket-fill: rgba(242,90,56,0.09);
  --pocket-line: rgba(184,57,32,0.58);
  --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);
}
.tcz *, .tcz *::before, .tcz *::after { box-sizing: border-box; }
.tcz button, .tcz input { font: inherit; color: inherit; }
.tcz button { cursor: pointer; touch-action: manipulation; }
.tcz button:disabled { cursor: not-allowed; opacity: 0.38; }
.tcz ::selection { background: var(--ink); color: #f2efec; }
.tcz :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tcz h1, .tcz h2, .tcz h3 { font-weight: 400; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.tcz em { font-style: italic; color: var(--accent); }
.tcz .tcz-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.
   ========================================================= */
.tcz-builder { position: relative; }
.tcz-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. */
.tcz-paper { position: absolute; inset: 0; background: linear-gradient(180deg, #fbfaf8 0%, #f5f3ef 100%); transition: opacity 200ms var(--ease-out); }
.tcz-stage[data-mode="3d"] .tcz-paper { opacity: 0; }
.tcz-view3d { position: absolute; inset: 0; touch-action: none; cursor: grab; overflow: hidden; }
.tcz-view3d:active { cursor: grabbing; }
.tcz-view3d canvas { display: block; width: 100%; height: 100%; }
.tcz-drawing { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tcz-drawing svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tcz-stage[data-mode="2d"] .tcz-view3d, .tcz-stage[data-mode="3d"] .tcz-drawing { visibility: hidden; }
.tcz-drawing.is-swapping svg, .tcz-drawing.is-swapping .tcz-dimlabel { animation: tcz-fade 220ms var(--ease-out); }
@keyframes tcz-fade { from { opacity: 0; } }
.tcz-drawing .p-top { fill: var(--wood-top); stroke: var(--wood-line); stroke-width: 1; stroke-linejoin: round; }
.tcz-drawing .p-part { fill: var(--wood-part); stroke: var(--wood-line); stroke-width: 1; stroke-linejoin: round; }
/* Blind pockets under the top, seen through it in the Top view — the live
   widget's dashed orange. */
.tcz-drawing .p-pocket { fill: var(--pocket-fill); stroke: var(--pocket-line); stroke-width: 1; stroke-dasharray: 4 2.6; stroke-linejoin: round; }
/* Dimensions — thin ink lines, one white label per measurement. */
.tcz-drawing line { stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; opacity: 0.75; }
.tcz-drawing line.ext { stroke-width: 1; opacity: 0.32; }
.tcz-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);
}
.tcz-dimlabel[hidden] { display: none; }
/* 3D dimensions — the same lines and labels over the canvas, following the
   camera (placeDims); only in 3D, only while the Dimensions button is on. */
.tcz-dimlayer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.tcz-dimlayer[hidden] { display: none; }
.tcz-stage[data-mode="2d"] .tcz-dimlayer { visibility: hidden; }
.tcz-dimlayer svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tcz-dimlayer line { stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; opacity: 0.75; }
.tcz-dimlayer line.ext { stroke-width: 1; opacity: 0.32; }
/* The word that says what a label measures ("overhang"). */
.tcz-dimword { font-weight: 500; color: var(--ink-soft); }
/* The overhang shows only while it is being changed (peekOverhang): its line
   and pill sit at zero opacity until .is-peek, then fade back out. With the
   3D overlay off it shows on its own (.is-solo hides the rest). */
.tcz-drawing .ov, #d2-o, .tcz-dimlayer .ov, #d3-o { transition: opacity 250ms var(--ease-out); }
.tcz-drawing:not(.is-peek) .ov, .tcz-drawing:not(.is-peek) #d2-o,
.tcz-dimlayer:not(.is-peek) .ov, .tcz-dimlayer:not(.is-peek) #d3-o { opacity: 0; }
/* It appears at once with the slider and only fades on the way out. */
.tcz-drawing.is-peek .ov, .tcz-drawing.is-peek #d2-o, .tcz-dimlayer.is-peek .ov, .tcz-dimlayer.is-peek #d3-o { transition: none; }
.tcz-dimlayer.is-solo line:not(.ov), .tcz-dimlayer.is-solo .tcz-dimlabel:not(#d3-o) { display: none; }
.tcz-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; }

.tcz-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;
}
.tcz-topbar > * { pointer-events: auto; }
/* Stage controls: frosted pills that sit on either surface. */
.tcz-pill, .tcz-resetview, .tcz-dimtoggle {
  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);
}
.tcz-pill { display: inline-flex; align-items: center; gap: 2px; padding: 3px; }
.tcz-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);
}
.tcz-pill button:hover, .tcz-pill button.is-hover { color: var(--ink); }
.tcz-pill button:active, .tcz-pill button.is-active { transform: scale(0.97); }
.tcz-pill button[aria-selected="true"] { background: var(--ink); color: #fff; }
/* Front|Top only describes the drawing — hidden in 3D, keeping its space. */
.tcz-stage[data-mode="3d"] #pill-view { visibility: hidden; }

/* Dimensions — top-right of the stage; 3D only (the drawings always carry
   theirs). Pressed = ink, like a selected tab. */
.tcz-dimtoggle {
  position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: 16px;
  display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0 14px 0 11px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  transition: background-color var(--dur), color var(--dur), transform var(--dur) var(--ease-out);
}
.tcz-dimtoggle[hidden] { display: none; }
.tcz-stage[data-mode="2d"] .tcz-dimtoggle { visibility: hidden; }
.tcz-dimtoggle svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tcz-dimtoggle:hover { background: #fff; }
.tcz-dimtoggle:active { transform: scale(0.97); }
.tcz-dimtoggle[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.tcz-dimtoggle[aria-pressed="true"]:hover { background: var(--ink); }

/* First-run gesture hint, then the Reset view button in the same spot:
   bottom-right on phones (just above the sheet's rounded top); on desktop
   in the top row, just left of the Dimensions button (whose measured width
   the module puts in --tcz-dimtoggle-w). */
.tcz-orbithint, .tcz-resetview { position: absolute; z-index: 3; bottom: 30px; right: 16px; }
.tcz-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;
}
.tcz-orbithint.is-on { opacity: 1; }
.tcz-orbithint.is-instant { transition: none; }
.tcz-gesture { display: inline-flex; align-items: center; gap: 4px; }
.tcz-gesture-icon { width: 14px; height: 14px; flex: none; overflow: visible; }
.tcz-gesture-divider { opacity: 0.52; }
.tcz-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);
}
.tcz-resetview.is-on { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.tcz-resetview:hover { background: #fff; }
.tcz-resetview:active { transform: scale(0.97); }
.tcz-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. */
.tcz-scrolllane { display: none; }
.tcz-scrollcaret {
  width: 22px; height: 22px; color: var(--ink-fade);
  animation: tcz-bob 1.8s ease-in-out infinite;
  transition: opacity 600ms ease, color var(--dur);
}
.tcz-scrolllane:hover .tcz-scrollcaret { color: var(--ink); }
.tcz-scrolllane.is-gone .tcz-scrollcaret { opacity: 0; }
@keyframes tcz-bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

/* ---- the sheet ---- */
.tcz-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);
}
.tcz-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 4px auto 14px; }
.tcz-panelhead { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tcz-panelhead h2 { font-family: var(--serif); font-size: 28px; line-height: 1; letter-spacing: -0.01em; }

/* segmented pills — one tab style everywhere */
.tcz-seg { display: inline-flex; background: var(--paper-soft); border-radius: 999px; padding: 3px; gap: 2px; }
.tcz-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);
}
.tcz-seg button:hover, .tcz-seg button.is-hover { color: var(--ink); }
.tcz-seg button:active, .tcz-seg button.is-active { transform: scale(0.98); }
.tcz-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. */
.tcz-controls { margin: 0; padding: 12px 0 18px; border: 0; }
.tcz-control { display: grid; grid-template-columns: 6.7em minmax(0, 1fr) auto; grid-template-areas: "label slider value"; align-items: center; column-gap: 12px; }
.tcz-control label { grid-area: label; font-size: 14px; font-weight: 600; white-space: nowrap; }
.tcz-control input[type=range] { grid-area: slider; }
.tcz-control .tcz-valbox { grid-area: value; }
.tcz-control + .tcz-control { margin-top: 6px; }
.tcz-control.tcz-control-sep { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
/* The top's shape: four outlined tiles above the sizes. */
.tcz-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; }
.tcz .tcz-shape { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-soft); font-size: 12px; font-weight: 500; line-height: 1.2; cursor: pointer; transition: border-color var(--dur), box-shadow var(--dur), color var(--dur); }
.tcz-shape svg { display: block; width: 26px; height: 26px; }
.tcz-shape svg path { fill: #efe3cf; stroke: rgba(21,19,15,0.55); stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tcz .tcz-shape:hover { border-color: var(--line-strong); color: var(--ink); }
.tcz .tcz-shape[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); font-weight: 600; }
.tcz-shape[aria-checked="true"] svg path { fill: #e6cfa9; stroke: var(--ink); }
.tcz-shape:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The nesting table: a switch row below the sizes, its own two sliders under it. */
.tcz-nest { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tcz-nesthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tcz-nestlabel { display: block; font-size: 14px; font-weight: 600; }
.tcz-nesthint { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.tcz .tcz-switch { flex: none; position: relative; width: 44px; height: 26px; border: 0; border-radius: 999px; padding: 0; background: var(--line-strong); cursor: pointer; transition: background-color var(--dur); }
.tcz-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(21,19,15,0.25); transition: transform var(--dur) var(--ease-out); }
.tcz-switch[aria-checked="true"] { background: var(--accent); }
.tcz-switch[aria-checked="true"] span { transform: translateX(18px); }
.tcz .tcz-switch:disabled { opacity: 0.4; cursor: not-allowed; }
.tcz-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tcz-nestcontrols { margin-top: 10px; }
.tcz-nestcontrols[hidden] { display: none; }
.tcz-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); }
.tcz-valbox:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper-soft); }
.tcz-control:has(input[type=range]:active) .tcz-valbox { border-color: var(--accent); }
.tcz-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; }
.tcz-val:focus { outline: none; }
.tcz-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. */
.tcz 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%;
}
.tcz input[type=range]:focus { outline: none; }
.tcz 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%);
}
.tcz 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);
}
.tcz input[type=range]:hover::-webkit-slider-thumb, .tcz input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.tcz input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.tcz input[type=range]::-moz-range-track { height: var(--trk-h); border-radius: 999px; background: var(--track); }
.tcz input[type=range]::-moz-range-progress { height: var(--trk-h); border-radius: 999px; background: var(--accent); }
.tcz 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); }
.tcz input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* Trust badges — the live builder's three, under the buy card. */
.tcz-badges { display: flex; justify-content: space-evenly; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.tcz-badge { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; min-width: 0; max-width: 140px; }
.tcz-badge img { width: 30px; height: 30px; object-fit: contain; margin-bottom: 8px; opacity: 0.85; }
.tcz-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): --tcz-offset is measured by the
     module (./host-offset.js), so the whole builder fits without a scroll. */
  .tcz-builder { height: calc(100svh - var(--tcz-offset, 0px)); min-height: 660px; }
  .tcz-stage { position: absolute; inset: 0; height: auto; min-height: 0; }
  .tcz-view3d, .tcz-drawing { right: calc(var(--panel-w) + 56px); }
  .tcz-topbar { padding: 22px 28px 0; right: calc(var(--panel-w) + 56px); }
  .tcz-dimtoggle { top: 22px; right: calc(var(--panel-w) + 56px + 14px); }
  .tcz-orbithint, .tcz-resetview { top: 22px; bottom: auto; right: calc(var(--panel-w) + 56px + 14px + var(--tcz-dimtoggle-w, 124px) + 12px); }
  .tcz-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;
  }
  .tcz-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;
  }
  .tcz-grip { display: none; }
}
/* Narrow desktops: the hint shares the top row with the 2D/3D pill and the
   Dimensions button, so it sheds gestures until it fits. */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .tcz-orbithint .tcz-gesture[data-gesture="pan"] { display: none; }
}
@media (min-width: 900px) and (max-width: 1019.98px) {
  .tcz-orbithint .tcz-gesture[data-gesture="zoom"] { display: none; }
}
@media (max-width: 899.98px) {
  /* Fingers, not cursors: a heavier bar and thumb (the live builder's phone sizes). */
  .tcz { --trk-h: 5px; --thumb-d: 22px; }
  /* Front|Top takes the top-right corner; in 3D it hides and the Dimensions
     button stands there instead. */
  .tcz-topbar #pill-view { margin-left: auto; }
}
}
@media (max-width: 520px) {
  .tcz-orbithint .tcz-gesture[data-gesture="pan"] { display: none; }
}
@media (max-width: 420px) {
  .tcz-gesture-icon { display: none; }
  .tcz-dimtoggle { padding: 0 11px; }
  .tcz-dimtoggle span { 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) {
  .tcz-control { grid-template-columns: 1fr auto; grid-template-areas: "label value" "slider slider"; row-gap: 0; }
  .tcz-control + .tcz-control { margin-top: 4px; }
  .tcz-badge p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .tcz *, .tcz *::before, .tcz *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .tcz-price .unfn-price-digit, .tcz-price .unfn-price-roll { transition: none; }
  .tcz-scrollcaret { animation: none; }
}
