/* =====================================================================
   Kocamaz Product Studio - look and layout
   Colours come from the olive grove and the machine itself:
     grove  = olive-tinted dark frame around the stage
     mist   = the pale silver-green studio the machine stands in
     pimento= the company colour (Kocamaz red): actions and selection only
     press  = first-press oil gold: measured values, dimensions, section, hotspots
   Change the company colour in web/config/brand.json (accent).
   ===================================================================== */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../lib/fonts/barlow-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../lib/fonts/barlow-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../lib/fonts/barlow-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../lib/fonts/barlow-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../lib/fonts/barlow-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../lib/fonts/barlow-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(../lib/fonts/barlow-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(../lib/fonts/barlow-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url(../lib/fonts/barlow-semi-condensed-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url(../lib/fonts/barlow-semi-condensed-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url(../lib/fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url(../lib/fonts/barlow-semi-condensed-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Colour tokens ---------- */
:root {
  --pimento: #e2000f;              /* replaced by brand.json accent */
  --pimento-hi: color-mix(in oklab, var(--pimento) 82%, white);
  --pimento-soft: color-mix(in oklab, var(--pimento) 16%, transparent);
  --on-pimento: #ffffff;
  --press: #d8b23a;                /* first-press gold: measured / technical */
  --press-soft: rgba(216, 178, 58, 0.16);

  --grove-0: #121510;              /* app frame */
  --grove-1: #1a1e17;              /* panels */
  --grove-2: #23281f;              /* raised, hover */
  --grove-3: #2e3429;              /* pressed, selected row */
  --line: rgba(214, 224, 196, 0.10);
  --line-strong: rgba(214, 224, 196, 0.20);
  --leaf: #e6e9df;                 /* text */
  --sage: #a3ab98;                 /* secondary text */
  --moss: #707866;                 /* hints */

  /* The studio the machine stands in */
  --mist-a: #f2f3ee; --mist-b: #d3d7cb; --mist-c: #b4b9ab;

  --radius-panel: 14px;
  --radius-ctl: 8px;
  --shadow-float: 0 10px 30px rgba(8, 10, 6, 0.28), 0 2px 6px rgba(8, 10, 6, 0.18);
  --font: "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --grove-0: #e4e7de;
  --grove-1: #f3f4ef;
  --grove-2: #e9ebe3;
  --grove-3: #dce0d4;
  --line: rgba(40, 48, 30, 0.12);
  --line-strong: rgba(40, 48, 30, 0.22);
  --leaf: #1b1f17;
  --sage: #555d4c;
  --moss: #7d8574;
  --press: #9c7a0c;
  --press-soft: rgba(156, 122, 12, 0.14);
  --shadow-float: 0 10px 30px rgba(40, 48, 30, 0.16), 0 2px 6px rgba(40, 48, 30, 0.10);
  color-scheme: light;
}
/* Stage presets (Explore > Studio) */
.stage[data-env="graphite"] { --mist-a: #3d4339; --mist-b: #262a23; --mist-c: #171a15; }
.stage[data-env="showroom"] { --mist-a: #f6efe4; --mist-b: #ddd0bd; --mist-c: #b9a98f; }
.stage[data-env="white"]    { --mist-a: #ffffff; --mist-b: #f3f4f1; --mist-c: #e4e6e0; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--grove-0); color: var(--leaf);
  font: 400 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--press); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--grove-1); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.num { font-family: var(--font-cond); font-variant-numeric: tabular-nums; }

/* ---------- Frame layout ---------- */
.app { display: grid; height: 100dvh;
  grid-template-columns: var(--catalog-w, 0px) minmax(0, 1fr) var(--insp-w, 300px);
  grid-template-rows: 50px minmax(0, 1fr);
  grid-template-areas: "top top top" "cat stage insp"; }
.app.cat-open.cat-pinned { --catalog-w: 260px; }   /* pinned: docked beside the 3D view */
.topbar { grid-area: top; }
.catalog { grid-area: cat; }
.stage { grid-area: stage; }
.inspector { grid-area: insp; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 14px 0 10px; min-width: 0; }
/* The product plate: Future Software Lab logo + "Design Tool" (white like the company's site) */
.tool-plate { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 11px 0 7px; border-radius: 7px; flex: none;
  background: #ffffff; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.tool-plate img { height: 26px; width: auto; display: block; }
.tool-text { display: flex; flex-direction: column; line-height: 1.05; }
.tool-text b { font: 600 13px/1.1 var(--font); color: #2b3a4b; letter-spacing: -.005em; white-space: nowrap; }
.tool-text small { font: 500 11px/1.2 var(--font); color: #6a7a8c; white-space: nowrap; }
.tool-plate:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 0 0 2px var(--press); }
.product-switch { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 300px; height: 36px;
  padding: 0 12px 0 10px; border: 0; border-radius: var(--radius-ctl); background: transparent; text-align: left; }
.product-switch:hover { background: var(--grove-2); }
.product-switch[aria-expanded="true"] .ic { color: var(--pimento-hi); }
.product-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.product-name { font: 600 15px/1.15 var(--font-cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-cat { font-size: 11.5px; color: var(--sage); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modes { display: flex; align-items: center; gap: 2px; margin: 0 auto; padding: 3px; border-radius: 11px; background: var(--grove-1); }
.modes button, .mode-link { position: relative; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border: 0; border-radius: 8px; background: transparent; color: var(--sage); font-weight: 500; text-decoration: none; white-space: nowrap; }
.modes button:hover, .mode-link:hover { color: var(--leaf); }
.modes button[aria-selected="true"] { color: var(--leaf); background: var(--grove-3); }
.modes button[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  border-radius: 2px; background: var(--pimento); }
.mode-link { cursor: pointer; }
.mode-link .ic { width: 16px; height: 16px; }

.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--radius-ctl); border: 1px solid transparent; font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn.primary { background: var(--pimento); color: var(--on-pimento); }
.btn.primary:hover { background: color-mix(in oklab, var(--pimento) 88%, black); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--leaf); }
.btn.ghost:hover { background: var(--grove-2); }
.btn.quiet { background: var(--grove-2); color: var(--leaf); }
.btn.quiet:hover { background: var(--grove-3); }
.btn.wide { width: 100%; }
.btn.small { height: 26px; padding: 0 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-ctl);
  background: transparent; color: var(--sage); }
.icon-btn:hover { background: var(--grove-2); color: var(--leaf); }
.icon-btn.small { width: 24px; height: 24px; }
.icon-btn.small .ic { width: 15px; height: 15px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--grove-1); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--sage); height: 24px; padding: 0 9px; border-radius: 6px; font-weight: 600; font-size: 12.5px; }
.seg button:hover { color: var(--leaf); }
.seg button[aria-checked="true"], .seg button.on { background: var(--grove-3); color: var(--leaf); }
.seg.small button { height: 22px; padding: 0 7px; font-size: 11.5px; }
.seg.fill { display: flex; }
.seg.fill button { flex: 1; }

.plan-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; border: 1px dashed var(--line-strong); }
.plan-switch button { border: 0; background: transparent; color: var(--moss); height: 26px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.plan-switch button[aria-checked="true"] { background: var(--press-soft); color: var(--press); }

/* ---------- Catalogue ---------- */
.catalog { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0 0 8px 8px; }
/* not pinned (or closed): floats over the 3D view and slides away */
.app:not(.cat-pinned) .catalog, .app:not(.cat-open) .catalog {
  position: fixed; left: 8px; top: 52px; bottom: 10px; width: 272px; z-index: 30; padding: 8px 0 8px 8px;
  border-radius: var(--radius-panel); background: var(--grove-0); box-shadow: var(--shadow-float), 0 0 0 1px var(--line);
  transform: translateX(-110%); visibility: hidden; transition: transform .2s, visibility .2s; }
.app.cat-open:not(.cat-pinned) .catalog { transform: none; visibility: visible; }
.catalog-head { display: flex; flex-direction: column; gap: 6px; padding: 2px 6px 8px 0; }
.catalog-top { display: flex; align-items: center; gap: 2px; font-weight: 600; font-size: 13px; padding-left: 2px; }
.catalog-top span { margin-right: auto; }
#catalog-pin[aria-pressed="true"] { color: var(--press); background: var(--press-soft); }
.search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: var(--radius-ctl);
  background: var(--grove-1); border: 1px solid var(--line); color: var(--sage); }
.search:focus-within { border-color: var(--press); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--leaf); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sage); cursor: pointer; }
.check input { accent-color: var(--pimento); width: 15px; height: 15px; margin: 0; }
.catalog-list { flex: 1; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--grove-3) transparent; }
.cat-group { margin-bottom: 4px; }
.cat-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 6px; border: 0; background: transparent;
  border-radius: var(--radius-ctl); text-align: left; color: var(--leaf); font-weight: 600; font-size: 12.5px; }
.cat-head:hover { background: var(--grove-1); }
.cat-head .ic { width: 14px; height: 14px; color: var(--moss); transition: transform .18s; }
.cat-group.open .cat-head .ic { transform: rotate(90deg); }
.cat-head .count { margin-left: auto; color: var(--moss); font: 500 12px var(--font-cond); }
.cat-items { display: none; padding: 2px 0 6px; }
.cat-group.open .cat-items { display: block; }
.item { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 4px 6px;
  border: 0; border-radius: var(--radius-ctl); background: transparent; text-align: left; color: var(--sage); }
.item:hover { background: var(--grove-1); color: var(--leaf); }
.item.on { background: var(--grove-2); color: var(--leaf); box-shadow: inset 2px 0 0 var(--pimento); }
.item .thumb { width: 40px; height: 30px; border-radius: 6px; object-fit: cover; background: #e9ebe4; }
.item .thumb.ph { display: grid; place-items: center; color: #8d9584; }
.item .name { font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge3d { font: 600 11px var(--font-cond); padding: 2px 6px; border-radius: 5px; color: var(--press); background: var(--press-soft); }
.catalog-empty { padding: 20px 8px; color: var(--moss); font-size: 13px; }
.catalog-foot { padding: 8px 6px 0 0; }

/* ---------- Stage: the viewing window ---------- */
.stage { position: relative; min-width: 0; min-height: 0; margin: 0 2px 8px; border-radius: var(--radius-panel); overflow: hidden;
  background: radial-gradient(120% 95% at 50% 32%, var(--mist-a) 0%, var(--mist-b) 58%, var(--mist-c) 100%);
  outline: none; isolation: isolate; }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.stage .label-layer { position: absolute; inset: 0; pointer-events: none; }
.stage.picking canvas { cursor: crosshair; }
.stage.hovering canvas { cursor: pointer; }

.loader { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, 70%); z-index: 4;
  padding: 16px 18px; border-radius: 12px; background: rgba(18, 21, 16, .78); color: #e6e9df; backdrop-filter: blur(8px); }
.loader-text { font-size: 13px; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 10px; }
.loader-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--press); transition: width .2s; }

.empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 40px;
  color: #1b1f17; z-index: 3; }
.empty img { width: min(46%, 520px); max-height: 70%; object-fit: contain; mix-blend-mode: multiply; }
.empty h2 { font: 600 26px/1.15 var(--font-cond); margin: 0 0 8px; max-width: 22ch; }
.empty p { margin: 0 0 16px; color: #4d5545; max-width: 40ch; }
.empty .btn.ghost { color: #1b1f17; border-color: rgba(27,31,23,.25); }

/* View cube */
.viewcube-wrap { position: absolute; top: 22px; right: 22px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.viewcube { --s: 43px; --half: calc(var(--s) / 2); position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; perspective: none; }
.viewcube .face { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 1px solid rgba(27,31,23,.22); border-radius: 9px;
  background: rgba(246, 247, 242, .96); color: #2b3125; font: 600 10.5px var(--font-cond); backface-visibility: hidden; }
.viewcube .face:hover { background: var(--pimento); color: #fff; border-color: transparent; }
.f-front  { transform: translateZ(var(--half)); }
.f-back   { transform: rotateY(180deg) translateZ(var(--half)); }
.f-right  { transform: rotateY(90deg) translateZ(var(--half)); }
.f-left   { transform: rotateY(-90deg) translateZ(var(--half)); }
.f-top    { transform: rotateX(90deg) translateZ(var(--half)); }
.f-bottom { transform: rotateX(-90deg) translateZ(var(--half)); }
.cube-iso { border: 0; height: 22px; padding: 0 9px; border-radius: 6px; background: rgba(18,21,16,.62); color: #e6e9df; font-size: 11.5px; font-weight: 600; }
.cube-iso:hover { background: var(--pimento); }

/* Dock */
.dock { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 1px;
  padding: 4px; border-radius: 11px; background: rgba(18, 21, 16, .84); color: #e6e9df; backdrop-filter: blur(10px);
  box-shadow: var(--shadow-float); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.dock button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px;
  border: 0; border-radius: 9px; background: transparent; color: #c9cfbf; flex: none; }
.dock button:hover { background: rgba(255,255,255,.08); color: #fff; }
.dock button.on { background: rgba(216,178,58,.18); color: #f0cf62; }
.dock button.ar-tool { background: var(--pimento); color: #fff; font-weight: 600; padding: 0 12px; }
.dock button.ar-tool:hover { background: color-mix(in oklab, var(--pimento) 88%, black); }
.dock .sep { width: 1px; height: 22px; margin: 0 4px; background: rgba(255,255,255,.14); flex: none; }
.dock .ic { width: 17px; height: 17px; }

/* Tooltip for any element with data-tip (filled from data-i18n-title) */
.tip { position: fixed; z-index: 60; pointer-events: none; padding: 6px 9px; border-radius: 7px; background: #0d0f0b; color: #eef0e9;
  font-size: 12.5px; max-width: 260px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.tip b { color: var(--press); font-weight: 600; }

.stage-hint { position: absolute; bottom: 74px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 8px 14px; border-radius: 999px;
  background: rgba(18,21,16,.84); color: #eef0e9; font-size: 13px; box-shadow: var(--shadow-float); white-space: nowrap; }
.stage-hint kbd { font: 600 11px var(--font-cond); padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.14); margin: 0 2px; }
.drop-hint { position: absolute; inset: 12px; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 2px dashed var(--press); border-radius: 12px; background: rgba(18,21,16,.5); color: #fff; font-weight: 600; font-size: 16px; }

/* Dimension and measure labels on the model */
.dim-label { padding: 3px 9px; border-radius: 6px; background: #1c2018; color: #f4d469; font: 600 13px var(--font-cond);
  font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.dim-label small { color: #b9bfae; font-weight: 500; margin-right: 5px; }
.measure-label { pointer-events: auto; cursor: default; }

/* Hotspots */
.hotspot-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hs { position: absolute; left: 0; top: 0; pointer-events: auto; transform: translate(-50%, -50%); transition: opacity .2s; }
.hs.hidden-behind:not(.open) { opacity: .3; }
.hs-dot { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid #fff;
  background: var(--press); color: #1c2018; box-shadow: 0 2px 8px rgba(0,0,0,.3); font: 700 13px var(--font-cond); }
.hs-dot:hover, .hs.open .hs-dot { background: var(--pimento); color: #fff; }
.hs-card { position: absolute; left: 18px; top: -10px; width: 240px; padding: 12px 14px; border-radius: 10px; background: rgba(18,21,16,.92);
  color: #eef0e9; box-shadow: var(--shadow-float); display: none; backdrop-filter: blur(6px); }
.hs.open .hs-card { display: block; }
.hs.flip .hs-card { left: auto; right: 18px; }
.hs-card h4 { margin: 0 0 4px; font: 600 15px var(--font-cond); }
.hs-card p { margin: 0; font-size: 13px; color: #c3c9b8; }

.tour-caption { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 4; max-width: min(560px, 80%);
  padding: 12px 18px; border-radius: 12px; background: rgba(18,21,16,.86); color: #eef0e9; text-align: center; box-shadow: var(--shadow-float); }
.tour-caption h3 { margin: 0 0 2px; font: 600 20px var(--font-cond); }
.tour-caption p { margin: 0; color: #c3c9b8; font-size: 14px; }
.tour-caption .tour-stop { margin-top: 6px; font-size: 12px; color: #9ea693; }

/* ---------- Inspector ---------- */
.inspector { display: flex; flex-direction: column; min-height: 0; padding: 0 8px 8px 4px; }
.panel { flex: 1; min-height: 0; overflow-y: auto; border-radius: var(--radius-panel); background: var(--grove-1); padding: 10px 12px;
  scrollbar-width: thin; scrollbar-color: var(--grove-3) transparent; }
.sheet-grip { display: none; }
/* drag the left edge of the inspector to make it wider */
.inspector { position: relative; }
.insp-resize { position: absolute; left: -3px; top: 0; bottom: 10px; width: 8px; cursor: ew-resize; z-index: 5; border-radius: 4px; }
.insp-resize:hover, .insp-resize.on { background: linear-gradient(90deg, transparent 3px, var(--press) 3px 5px, transparent 5px); }

/* ---------- Light tab: the rig window ---------- */
.rig { position: relative; height: 240px; border-radius: 12px; overflow: hidden; margin-bottom: 4px;
  background: radial-gradient(120% 95% at 50% 30%, #3a4135, #1c2019 70%, #141711); }
.rig canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.rig-bar { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.rig-bar > * { pointer-events: auto; }
.rig-bar .seg { background: rgba(18,21,16,.8); border-color: rgba(255,255,255,.1); }
.rig-bar .seg button { color: #c9cfbf; }
.rig-bar .seg button[aria-checked="true"] { background: rgba(216,178,58,.22); color: #f0cf62; }
.rig-sel { margin-left: auto; padding: 3px 9px; border-radius: 6px; background: rgba(18,21,16,.8); color: #f0cf62; font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.rig-btn { background: rgba(18,21,16,.8); color: #c9cfbf; }
.rig-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; cursor: ns-resize;
  background: linear-gradient(180deg, transparent 4px, rgba(255,255,255,.25) 4px 6px, transparent 6px) center / 44px 100% no-repeat; }
.rig-grip:hover { background-color: rgba(216,178,58,.18); }
.xyz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.xyz-f { position: relative; display: block; }
.xyz-f span { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font: 700 12px var(--font-cond); pointer-events: none; }
.xyz-f em { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font: normal 11px var(--font); color: var(--moss); pointer-events: none; }
.xyz-f .input { padding: 0 24px 0 20px; }
.axis-x span { color: #e5534b; } .axis-y span { color: #57ab5a; } .axis-z span { color: #539bf5; }
.light-list { display: flex; flex-direction: column; gap: 4px; }
.light-row { display: grid; grid-template-columns: 18px 1fr auto auto; align-items: center; gap: 6px; padding: 3px 4px 3px 6px; border-radius: 9px;
  border: 1px solid var(--line); cursor: pointer; }
.light-row:hover { background: var(--grove-2); }
.light-row.on { border-color: var(--press); background: var(--press-soft); }
.light-row.off { opacity: .55; }
.light-row .lsw { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 10px var(--line-strong); }
.light-row .lname { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.light-row .lname small { display: block; color: var(--moss); font-size: 11px; font-weight: 400; }
.kelvin { height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--sage);
  font: 600 11.5px var(--font-cond); display: inline-flex; align-items: center; gap: 5px; }
.kelvin::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.kelvin:hover { color: var(--leaf); border-color: var(--press); }
.p-title { font: 600 18px/1.12 var(--font-cond); margin: 0 0 2px; }
.p-sub { color: var(--sage); font-size: 12px; margin: 0 0 6px; line-height: 1.35; }
.block { padding: 8px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; padding-top: 4px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.block-head h3 { margin: 0; font-size: 13px; font-weight: 600; }
.block-head .hint, .hint { color: var(--moss); font-size: 11.5px; }
.lock-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--press-soft); color: var(--leaf); font-size: 13px; }
.lock-note .ic { color: var(--press); }
.product-photo { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 8px; background: #eceee8; margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.fact { padding: 5px 8px; border-radius: 7px; background: var(--grove-2); }
.fact b { display: block; font: 600 16px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; }
.fact span { font-size: 11px; color: var(--sage); }
.fact.wide { grid-column: span 3; display: flex; justify-content: space-between; align-items: baseline; }
.fact.wide b { font-size: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 7px; font-size: 12px; color: var(--sage); }
.field > span { display: flex; justify-content: space-between; }
.field output { color: var(--leaf); font: 600 13px var(--font-cond); font-variant-numeric: tabular-nums; }
.input, textarea.input, select.input { width: 100%; height: 30px; padding: 0 8px; border-radius: var(--radius-ctl); border: 1px solid var(--line-strong);
  background: var(--grove-0); color: var(--leaf); outline: 0; }
textarea.input { height: 56px; padding: 6px 8px; resize: vertical; }
.input:focus { border-color: var(--press); }
input[type="range"] { width: 100%; height: 16px; margin: 0; accent-color: var(--pimento); }
input[type="color"] { width: 30px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: none; }

.env-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.env { display: flex; flex-direction: column; gap: 3px; align-items: center; border: 0; background: transparent; color: var(--sage); font-size: 11px; padding: 0; }
.env i { width: 100%; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.env.on { color: var(--leaf); }
.env.on i { box-shadow: 0 0 0 2px var(--grove-1), 0 0 0 4px var(--pimento); }

/* Variant switch */
.variants { display: flex; flex-wrap: wrap; gap: 6px; }
.variant { padding: 5px 10px; border-radius: var(--radius-ctl); border: 1px solid var(--line-strong); background: transparent; font-weight: 600; font-size: 13px; color: var(--sage); }
.variant.on { border-color: var(--pimento); color: var(--leaf); background: var(--pimento-soft); }

/* Material list (Configure) */
.mat-list { display: flex; flex-direction: column; gap: 2px; }
.mat { border-radius: 10px; }
.mat.open { background: var(--grove-2); }
.mat-row { display: grid; grid-template-columns: 20px 1fr auto 14px; gap: 8px; align-items: center; width: 100%; padding: 4px 6px; border: 0;
  background: transparent; border-radius: 10px; text-align: left; }
.mat-row:hover { background: var(--grove-2); }
.mat-row .sw { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 0 0 1px var(--line); }
.mat-row .nm { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-row .nm small { display: block; font-size: 11px; color: var(--moss); font-weight: 400; }
.mat-row .changed { font: 600 11px var(--font-cond); color: var(--pimento-hi); }
.mat-row .ic { width: 14px; height: 14px; color: var(--moss); transition: transform .18s; }
.mat.open .mat-row .ic { transform: rotate(90deg); }
.mat-body { padding: 2px 8px 8px 34px; }
.fin-group { margin-bottom: 6px; }
.fin-group > span { display: block; font-size: 12px; color: var(--sage); margin-bottom: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 0 0 2px var(--grove-2);
  transition: transform .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 0 0 2px var(--grove-2), 0 0 0 4px var(--pimento); }
.swatch.metal { background-image: linear-gradient(135deg, rgba(255,255,255,.65), rgba(255,255,255,0) 45%, rgba(0,0,0,.18)); }

/* Parts list */
.parts { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; margin-top: 8px; }
.part { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 2px; padding: 1px 4px 1px 6px; border-radius: 6px; font-size: 12px; }
.part:hover { background: var(--grove-2); }
.part.off { color: var(--moss); }
.part.sel { background: var(--press-soft); }
.part span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }

/* Labels (decals) */
.zone-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.zone { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; padding: 4px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; text-align: left; }
.zone.on { border-color: var(--pimento); background: var(--pimento-soft); }
.zone canvas { width: 40px; height: 30px; border-radius: 4px; background: repeating-conic-gradient(#d8dbd3 0 25%, #f2f3ef 0 50%) 0 0 / 8px 8px; }
.zone small { display: block; color: var(--moss); font-size: 12px; }
.label-preview { width: 100%; border-radius: 8px; margin-bottom: 6px;
  background: repeating-conic-gradient(#d8dbd3 0 25%, #f2f3ef 0 50%) 0 0 / 14px 14px; }
.stage.grab canvas { cursor: grab; }
.stage.grabbing canvas { cursor: grabbing; }
.dist-grid { display: grid; grid-template-columns: 1fr; justify-items: center; }
.dist-grid > .field { width: 48%; }
.dist-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.input.num { font-family: var(--font-cond); font-variant-numeric: tabular-nums; text-align: right; }
.align-row { display: flex; flex-direction: column; gap: 6px; }
.label-preview { touch-action: none; }
.drop-zone { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1px dashed var(--line-strong); color: var(--sage);
  cursor: pointer; font-size: 12px; margin-bottom: 7px; }
.drop-zone:hover { border-color: var(--press); color: var(--leaf); }

/* Measure list */
.measures { display: flex; flex-direction: column; gap: 6px; }
.measure { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 5px 8px; border-radius: 9px; background: var(--grove-2); }
.m-modes button { padding: 0 4px; }
.measure .m-type { display: block; color: var(--sage); font: 500 11px var(--font); }
.measure b { font: 600 15px var(--font-cond); color: var(--press); font-variant-numeric: tabular-nums; }
.measure small { display: block; color: var(--sage); font: 500 12px var(--font-cond); font-variant-numeric: tabular-nums; }

.switch { position: relative; width: 32px; height: 18px; border-radius: 9px; border: 0; background: var(--grove-3); flex: none; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: var(--pimento); }
.switch[aria-checked="true"]::after { transform: translateX(14px); background: #fff; }

.changes { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.changes li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.changes li span:last-child { color: var(--sage); text-align: right; }

/* Locked features (not in the chosen plan) */
.locked { position: relative; opacity: .45; }
.locked::after { content: ""; position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--press) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c2018' stroke-width='3' stroke-linecap='round'%3E%3Crect x='6' y='11' width='12' height='9' rx='1.5'/%3E%3Cpath d='M9 11V8a3 3 0 0 1 6 0v3'/%3E%3C/svg%3E") center / 8px no-repeat; }

/* ---------- Dialog, toast ---------- */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: 16px; background: var(--grove-1); color: var(--leaf);
  box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.dialog::backdrop { background: rgba(10, 12, 8, .55); backdrop-filter: blur(3px); }
.dialog-x { position: absolute; right: 10px; top: 10px; }
.dialog h2 { margin: 0 0 6px; font: 600 24px/1.15 var(--font-cond); padding-right: 30px; }
.dialog p { margin: 0 0 14px; color: var(--sage); }
.qr { display: grid; place-items: center; padding: 14px; margin: 0 auto 14px; width: 220px; border-radius: 12px; background: #fff; }
.qr svg { width: 192px; height: 192px; display: block; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.dialog .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.shot-preview { width: 100%; border-radius: 10px; margin-bottom: 12px; background: repeating-conic-gradient(#d8dbd3 0 25%, #f2f3ef 0 50%) 0 0 / 14px 14px; }
.plans-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.plans-table td { padding: 5px 0; border-bottom: 1px dashed var(--line); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 70; padding: 10px 16px; border-radius: 10px;
  background: #0d0f0b; color: #eef0e9; box-shadow: var(--shadow-float); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  font-size: 13.5px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Fair (kiosk) mode and full screen: only the stage ---------- */
.app.kiosk { grid-template-columns: 0 1fr 0; grid-template-rows: 0 1fr; }
.app.kiosk .topbar, .app.kiosk .catalog, .app.kiosk .inspector { visibility: hidden; overflow: hidden; }
.app.kiosk .stage { margin: 0; border-radius: 0; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: var(--catalog-w, 0px) minmax(0, 1fr) var(--insp-w, 280px); }
}
@media (max-width: 1640px) {
  .mode-link span { display: none; }
  .mode-link { padding: 0 9px; }
}
@media (max-width: 1400px) {
  .modes button, .mode-link { padding: 0 10px; }
  #share-btn span, .mode-link span { display: none; }
  #share-btn { padding: 0 10px; }
}
@media (max-width: 980px) {
  .app.cat-open.cat-pinned { --catalog-w: 0px; }
  .app .catalog { position: fixed; left: 8px; top: 52px; bottom: 10px; width: min(320px, 88vw); z-index: 30; padding: 8px 0 8px 8px;
    border-radius: var(--radius-panel); background: var(--grove-0); box-shadow: var(--shadow-float); transform: translateX(-110%); visibility: hidden; }
  .app.cat-open .catalog { visibility: visible; transform: none; }
  #catalog-pin { display: none; }
  .mode-link span, .plan-dd { display: none; }
}
/* Phones: stage on top, inspector as a bottom sheet */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 50px minmax(0, 1fr) auto;
    grid-template-areas: "top" "stage" "insp"; }
  .topbar { gap: 8px; padding: 0 8px; }
  .tool-plate { padding: 0 8px 0 5px; height: 32px; }
  .tool-plate img { height: 22px; }
  .tool-text b { display: none; }
  .product-switch { flex: 1; max-width: none; padding: 0 6px; }
  .modes { position: fixed; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 6px); z-index: 25; margin: 0; justify-content: space-around;
    box-shadow: var(--shadow-float); background: var(--grove-1); overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .modes button, .mode-link { padding: 0 8px; font-size: 13px; }
  .top-right #share-btn { display: none; }
  #theme-btn { display: none; }
  .stage { margin: 0 6px 6px; }
  .viewcube-wrap { transform: scale(.8); transform-origin: top right; top: 8px; right: 8px; }
  .dock { bottom: 8px; left: 8px; right: 8px; transform: none; max-width: none; }
  .dock .ar-tool { order: -1; }
  .inspector { padding: 0 6px calc(env(safe-area-inset-bottom) + 58px); max-height: 46dvh; transition: max-height .25s; }
  .inspector.collapsed { max-height: calc(env(safe-area-inset-bottom) + 86px); }
  .sheet-grip { display: flex; justify-content: center; padding: 6px 0 8px; cursor: grab; }
  .sheet-grip i { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); }
  .panel { padding: 12px 14px; }
  .app .catalog { top: 50px; left: 0; width: 100vw; border-radius: 0; }
  .empty { flex-direction: column; text-align: center; padding: 20px; }
}
@media (max-width: 760px) { .insp-resize { display: none; } .rig { height: 230px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Look pop-up (dock > sphere) and finish editor ---------- */
.look-pop { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 6; width: 300px; max-width: calc(100% - 24px);
  max-height: calc(100% - 80px); overflow-y: auto; padding: 8px 10px 10px; border-radius: 12px; background: var(--grove-1);
  border: 1px solid var(--line); box-shadow: var(--shadow-float); color: var(--leaf); font-size: 12.5px; }
.lp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.lp-head b { font: 600 13px var(--font-cond); letter-spacing: .02em; text-transform: uppercase; color: var(--sage); }
.lp-sec { padding: 6px 0; border-top: 1px solid var(--line); }
.lp-label { display: block; font-size: 12px; color: var(--sage); margin-bottom: 6px; }
.lp-label b { color: var(--leaf); font-weight: 600; }
.lp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); color: var(--sage); }
.lp-foot { display: flex; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
.look-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.look-grid button { height: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--grove-2); color: var(--sage); font-size: 11.5px; font-weight: 600; }
.look-grid button:hover { color: var(--leaf); }
.look-grid button[aria-pressed="true"] { background: var(--press-soft); border-color: var(--press); color: var(--leaf); }
.lp-mat .field { margin-bottom: 4px; }

.pbr-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.pbr-field { margin-bottom: 4px; }
.colour-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0 4px; }
.colour-row .vsep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 1px; }
.swatch.picker { position: relative; display: inline-block; overflow: hidden; cursor: pointer;
  background: conic-gradient(#e2000f, #f5c400, #3cb043, #1e88e5, #8e44ad, #e2000f); }
.swatch.picker input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; }
.tex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 5px; }
.tex { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--grove-2) center / cover; padding: 0;
  display: grid; place-items: center; color: var(--sage); }
.tex .ic { width: 14px; height: 14px; }
.tex[style*="background-image"] .ic { filter: drop-shadow(0 0 2px #000); color: #fff; }
.tex:hover { border-color: var(--sage); }
.tex[aria-pressed="true"] { outline: 2px solid var(--pimento); outline-offset: 1px; }
.tex-opts { margin-top: 6px; }
.row.end { justify-content: flex-end; }
@media (max-width: 760px) { .look-pop { bottom: 56px; left: 8px; right: 8px; transform: none; width: auto; } }

/* =====================================================================
   SHOWROOM UI (top bar > Showroom): the machine fills the screen,
   floating glass panel on the right, camera views at the bottom.
   ===================================================================== */
.showroom { display: none; }
.app.ui-showroom { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "stage"; }
.app.ui-showroom .topbar, .app.ui-showroom .inspector { display: none; }
.app.ui-showroom .stage { margin: 0; border-radius: 0; }
.app.ui-showroom #dock, .app.ui-showroom .viewcube-wrap, .app.ui-showroom .look-pop,
.app.ui-showroom #hotspot-layer, .app.ui-showroom .stage-hint { display: none !important; }
.app.ui-showroom .tour-caption { bottom: 84px; }
/* the catalogue always floats over the machine here */
.app.ui-showroom .catalog { position: fixed; left: 14px; top: 62px; bottom: 74px; width: 290px; z-index: 30; padding: 8px 0 8px 8px;
  border-radius: 20px; background: var(--grove-0); box-shadow: var(--shadow-float); transform: translateX(-115%); visibility: hidden; }
.app.ui-showroom.cat-open .catalog { transform: none; visibility: visible; }

.app.ui-showroom .showroom { display: block; position: absolute; inset: 0; z-index: 7; pointer-events: none;
  --sr-ink: #1c1e1b; --sr-soft: #6b6f68; --sr-glass: rgba(236, 238, 234, .62); --sr-card: rgba(255, 255, 255, .5);
  --sr-line: rgba(255, 255, 255, .65); --sr-shadow: 0 18px 50px rgba(20, 24, 18, .18), 0 2px 8px rgba(20, 24, 18, .08);
  font: 500 13px/1.3 var(--font); color: var(--sr-ink); }
.showroom > *, .sr-panel { pointer-events: auto; }
.showroom .ic { width: 15px; height: 15px; }

/* pills: product, classic UI, reset, unfold */
.sr-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--sr-line);
  background: var(--sr-glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  color: var(--sr-ink); font: 600 12.5px var(--font); box-shadow: 0 4px 16px rgba(20, 24, 18, .1); cursor: pointer; }
.sr-pill:hover { background: rgba(255, 255, 255, .8); }
.sr-brand { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; max-width: calc(100% - 140px); }
.sr-product span { max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-reset { position: absolute; top: 14px; right: 18px; }
.sr-unfold { position: absolute; right: 18px; top: 58px; }
.sr-unfold .ic { transform: rotate(180deg); }

/* the glass panel */
.sr-panel { position: absolute; top: 56px; right: 18px; bottom: 70px; width: 300px; display: flex; flex-direction: column;
  border-radius: 24px; background: var(--sr-glass); border: 1px solid var(--sr-line); box-shadow: var(--sr-shadow);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.sr-panel.collapsed { transform: translateX(calc(100% + 30px)); opacity: 0; pointer-events: none; }
.sr-tabs { display: grid; grid-template-columns: 1fr 1fr 34px; align-items: center; gap: 4px; padding: 10px 10px 4px 14px; }
.sr-tabs [role="tab"] { height: 32px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--sr-soft);
  font: 600 13px var(--font); cursor: pointer; }
.sr-tabs [role="tab"][aria-selected="true"] { color: var(--sr-ink); border-bottom-color: var(--sr-ink); }
.sr-fold { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .7); color: var(--sr-ink);
  display: grid; place-items: center; cursor: pointer; justify-self: end; }
.sr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .2) transparent; }
.sr-card { border-radius: 16px; background: var(--sr-card); border: 1px solid rgba(255, 255, 255, .55); flex: none; }
.sr-card header { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 10px 0 13px; cursor: pointer; }
.sr-card header b { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); flex: none; }
.sr-cam { width: 26px; height: 26px; border-radius: 8px; border: 0; background: none; color: var(--sr-soft); display: grid; place-items: center; cursor: pointer; }
.sr-cam:hover { background: rgba(255, 255, 255, .8); color: var(--sr-ink); }
.sr-chev { color: var(--sr-soft); transform: rotate(90deg); transition: transform .2s; flex: none; }
.sr-chev.up { transform: rotate(-90deg); }
.sr-sws { display: flex; flex-wrap: wrap; gap: 9px; padding: 2px 13px 13px; }
.sr-sw { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: transform .12s; }
.sr-sw.metal { background: linear-gradient(135deg, #fff 0%, var(--c) 40%, color-mix(in srgb, var(--c) 70%, #000) 100%); }
.sr-sw:hover { transform: scale(1.08); }
.sr-sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--sr-ink); }
.sr-sw.on::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.sr-sw.undo { background: rgba(255, 255, 255, .7); display: grid; place-items: center; color: var(--sr-soft); }
.sr-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 13px 13px; }
.sr-chip { height: 30px; padding: 0 13px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .75); color: var(--sr-ink);
  font: 600 12.5px var(--font); cursor: pointer; }
.sr-chip:hover { background: var(--sr-ink); color: #fff; }
.sr-text { margin: -4px 13px 10px; font-size: 12px; color: var(--sr-soft); }
.sr-play { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 0 13px 13px; }
.sr-play button { height: 30px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .75); color: var(--sr-ink);
  font: 600 12.5px var(--font); cursor: pointer; }
.sr-play button.on, .sr-play button:hover:first-child { background: var(--sr-ink); color: #fff; }
.sr-foot { display: flex; align-items: center; gap: 8px; margin: 6px; padding: 8px 8px 8px 12px; border-radius: 18px; background: #fff;
  color: var(--sr-soft); font-size: 12px; box-shadow: 0 2px 10px rgba(20, 24, 18, .08); }
.sr-count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--sr-ink);
  color: #fff; font: 700 11.5px var(--font); }
.sr-summary { margin-left: auto; height: 32px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--sr-ink); color: #fff;
  font: 700 12px var(--font); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.sr-summary:hover { background: #000; }

/* camera views */
.sr-views { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px;
  max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: var(--sr-glass);
  border: 1px solid var(--sr-line); box-shadow: 0 6px 22px rgba(20, 24, 18, .14); backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.sr-views::-webkit-scrollbar { display: none; }
.sr-views button { flex: none; height: 30px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: var(--sr-ink);
  font: 500 12.5px var(--font); white-space: nowrap; cursor: pointer; }
.sr-views button:hover { background: rgba(255, 255, 255, .7); }
.sr-views button[aria-pressed="true"] { background: var(--sr-ink); color: #fff; }
/* keep the views clear of the panel on wide screens */
@media (min-width: 761px) { .sr-views { left: calc(50% - 160px); max-width: calc(100% - 380px); } }

/* summary dialog */
.sr-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 13px; }
.sr-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sr-table td:last-child { text-align: right; color: var(--sage); }
.sr-sum-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* phones: panel becomes a sheet at the bottom */
@media (max-width: 760px) {
  .sr-panel { top: auto; left: 10px; right: 10px; bottom: 60px; width: auto; max-height: 46vh; border-radius: 20px; }
  .sr-panel.collapsed { transform: translateY(calc(100% + 80px)); }
  .sr-views { bottom: 10px; }
  .sr-unfold { top: auto; bottom: 60px; right: 12px; }
  .sr-unfold .ic { transform: rotate(-90deg); }
  .sr-brand .sr-pill span { display: none; }
  .sr-product span { display: inline !important; max-width: 40vw; }
}

/* ---------- Material library (matlib.js) ---------- */
.matlib { position: absolute; left: 12px; top: 12px; bottom: 64px; z-index: 9; width: min(600px, calc(100% - 24px)); display: flex; flex-direction: column;
  border-radius: 16px; background: var(--grove-1); border: 1px solid var(--line); box-shadow: var(--shadow-float); color: var(--leaf); overflow: hidden; }
.ml-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 10px 6px 14px; }
.ml-head b { display: block; font: 600 15px var(--font-cond); letter-spacing: .02em; }
.ml-for { display: block; font-size: 11.5px; color: var(--moss); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-search { margin: 0; }
.ml-cats { display: flex; gap: 4px; padding: 2px 12px 8px; overflow-x: auto; scrollbar-width: thin; flex: none; }
.ml-cats button { flex: none; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--grove-2); color: var(--sage);
  font: 600 12px var(--font); white-space: nowrap; }
.ml-cats button small { color: var(--moss); font-weight: 500; margin-left: 2px; }
.ml-cats button[aria-pressed="true"] { background: var(--leaf); color: var(--grove-0); border-color: transparent; }
.ml-cats button[aria-pressed="true"] small { color: inherit; opacity: .7; }
.ml-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px;
  padding: 4px 12px 12px; align-content: start; scrollbar-width: thin; }
.ml-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 8px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--leaf); text-align: center; min-width: 0; }
.ml-card:hover { background: var(--grove-2); }
.ml-card.on { border-color: var(--pimento); background: var(--pimento-soft); }
.ml-ball { position: relative; width: 76px; height: 76px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 60%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 55%, #000)); }
.ml-ball img { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); object-fit: cover; border-radius: 50%; }
.ml-dl { position: absolute; right: -2px; bottom: 2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grove-0); color: var(--sage); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ml-dl .ic { width: 12px; height: 12px; }
.ml-spin { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--pimento); animation: ml-spin .8s linear infinite; }
@keyframes ml-spin { to { transform: rotate(360deg); } }
.ml-card b { font-size: 11.5px; font-weight: 600; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ml-card small { font-size: 10px; color: var(--moss); line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ml-foot { padding: 7px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--moss); flex: none; }
.ml-foot a { color: var(--sage); }
.ml-open { margin-bottom: 8px; }
.sr-sw.more { background: rgba(255, 255, 255, .7); display: grid; place-items: center; color: var(--sr-soft); }
.app.ui-showroom .matlib { top: 56px; bottom: 70px; left: 18px; width: min(560px, calc(100% - 360px)); border-radius: 22px; }
@media (max-width: 760px) {
  .matlib, .app.ui-showroom .matlib { left: 8px; right: 8px; width: auto; top: 8px; bottom: 60px; }
  .ml-head { grid-template-columns: 1fr auto; }
  .ml-search { grid-column: 1 / -1; grid-row: 2; }
}
/* the library in the showroom look: same light glass as the showroom panel */
.app.ui-showroom .matlib { background: rgba(236, 238, 234, .78); color: #1c1e1b; border: 1px solid rgba(255, 255, 255, .65);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 18px 50px rgba(20, 24, 18, .18), 0 2px 8px rgba(20, 24, 18, .08);
  --leaf: #1c1e1b; --sage: #3d413b; --moss: #6b6f68; --line: rgba(0, 0, 0, .08); --grove-0: #fff; --grove-2: rgba(255, 255, 255, .7); }
.app.ui-showroom .matlib .search { background: rgba(255, 255, 255, .8); }
.app.ui-showroom .matlib .search input { color: #1c1e1b; }
.app.ui-showroom .matlib .icon-btn { color: #1c1e1b; }

/* ---------- Scene tab (scene.js) ---------- */
/* painted in DOM order: background layer, 3D picture, vignette, then labels and panels */
.stage-bg { position: absolute; inset: 0; pointer-events: none; }
.stage-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 45%, rgba(0,0,0,.75) 100%); }
.stage.env-loading::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 8;
  background: linear-gradient(90deg, transparent, var(--pimento), transparent); background-size: 40% 100%; background-repeat: no-repeat;
  animation: sc-load 1.1s linear infinite; }
@keyframes sc-load { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.panel[data-panel="scene"] h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.panel[data-panel="scene"] h3 .hint { font-weight: 500; text-transform: none; letter-spacing: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel[data-panel="scene"] .seg { margin-bottom: 8px; flex-wrap: wrap; }
.sc-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.sc-preset { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: none; color: var(--sage); font-size: 10.5px; line-height: 1.15; text-align: left; }
.sc-preset i { display: block; aspect-ratio: 16 / 10; border-radius: 7px; border: 1px solid var(--line); }
.sc-preset.on i, .sc-preset:hover i { outline: 2px solid var(--pimento); outline-offset: 1px; }
.sc-preset.on span { color: var(--leaf); }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12.5px; color: var(--sage); }
.sc-row .seg { margin: 0 !important; }
.sc-skies, .sc-bgs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 8px; }
.sc-bgs { grid-template-columns: repeat(8, 1fr); }
.sc-skies button, .sc-bgs button { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line); padding: 0; }
.sc-bgs button.on, .sc-skies button:hover, .sc-bgs button:hover { outline: 2px solid var(--pimento); outline-offset: 1px; }
.sc-cols { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sc-col { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sage); }
.sc-col input { width: 30px; height: 26px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; }
.sc-thumb { width: 100%; max-height: 90px; object-fit: cover; border-radius: 8px; margin-top: 6px; }
.envgallery { width: min(640px, calc(100% - 24px)); }
.eg-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 4px 12px 12px; align-content: start; }
.eg-grid h4 { grid-column: 1 / -1; margin: 6px 0 -2px; font: 600 12px var(--font-cond); letter-spacing: .06em; text-transform: uppercase; color: var(--moss); }
.eg-card { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--leaf); text-align: left; font-size: 12px; font-weight: 600; }
.eg-card i { position: relative; display: block; aspect-ratio: 2 / 1; border-radius: 9px; border: 1px solid var(--line); }
.eg-card:hover i, .eg-card.on i { outline: 2px solid var(--pimento); outline-offset: 1px; }
.eg-card.busy i { animation: sc-pulse .8s ease-in-out infinite alternate; }
@keyframes sc-pulse { to { opacity: .5; } }
.eg-card .ml-dl { right: 4px; bottom: 4px; }
.stage.bg-dark .stage-hint, .stage.bg-dark .tour-caption { color: #fff; }
/* background picture: small frame, drag the dot to place it */
.sc-frame { position: relative; margin: 6px 0 8px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); cursor: crosshair; touch-action: none; }
.sc-frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sc-frame i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff;
  background: var(--pimento); box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }

/* ---------- Design tab ---------- */
.panel[data-panel="design"] h4 { margin: 10px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--sage); }
.ds-shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.ds-shapes button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 6px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--grove-1); color: var(--leaf); font-size: 11.5px; cursor: pointer; }
.ds-shapes button:hover { background: var(--grove-2); border-color: var(--pimento); }
.ds-ic { width: 22px; height: 22px; flex: none; }
.btn .ds-ic { width: 16px; height: 16px; }
.ds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ds-num { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--sage); position: relative; min-width: 0; }
.ds-num input { width: 100%; height: 26px; padding: 0 22px 0 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--grove-1); color: var(--leaf); font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ds-num input:focus { outline: none; border-color: var(--pimento); }
.ds-num i { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 10.5px; opacity: .7; pointer-events: none; }
.ds-snap { display: flex; align-items: center; gap: 8px; }
.ds-snap .ds-num { width: 70px; }
.ds-snap .ds-num span { display: none; }
.ds-name { flex: 1; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  color: var(--leaf); font: inherit; font-weight: 600; font-size: 14px; }
.ds-name:hover, .ds-name:focus { border-color: var(--line); background: var(--grove-1); outline: none; }
.ds-finishes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ds-finishes button { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.ds-finishes button i { display: block; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000) 100%); }
.ds-finishes button.on { border-color: var(--pimento); }
.ds-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ds-actions .btn { gap: 5px; }
.ds-wait { color: var(--pimento); }
.ds-wait .link { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
.ds-list { list-style: none; margin: 0 0 4px; padding: 0; max-height: 220px; overflow: auto; }
.ds-list li { display: flex; align-items: center; gap: 4px; border-radius: 6px; }
.ds-list li.on { background: var(--grove-3); }
.ds-list li > button:first-child { flex: 1; text-align: left; border: 0; background: none; color: var(--leaf); padding: 5px 8px; font: inherit; font-size: 12.5px; cursor: pointer; }
/* Design tab: X / Y / Z letters of the triad */
.ds-axis { font: 700 12px/1 var(--font, sans-serif); padding: 2px 4px; border-radius: 4px; color: #fff; pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.ds-axis-x { background: #e5483f; } .ds-axis-y { background: #4cb050; } .ds-axis-z { background: #3f7fe5; }
/* Design tab: sketch */
.sk-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.sk-tools button { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--grove-1); color: var(--leaf); font-size: 12px; cursor: pointer; }
.sk-tools button:hover { background: var(--grove-2); }
.sk-tools button.on { border-color: var(--pimento); background: var(--grove-3); }
.sk-tools .ds-ic { width: 18px; height: 18px; }
.sk-start .btn { flex: 1; }
.sk-readout { position: absolute; z-index: 6; pointer-events: none; padding: 3px 7px; border-radius: 6px; font-size: 12px;
  font-variant-numeric: tabular-nums; background: rgba(18, 21, 16, .85); color: #fff; white-space: nowrap; }
.sk-readout b { color: #ffd7d7; margin-left: 6px; }
/* View cube: drag to turn the view */
.viewcube { cursor: grab; touch-action: none; }
.viewcube-wrap.dragging .viewcube { cursor: grabbing; }
.viewcube-wrap.dragging .face:hover { background: rgba(246, 247, 242, .96); color: #2b3125; }
/* Space Navigator (3D mouse) button and its window */
#spacenav-btn { position: relative; }
#spacenav-btn.on { border-color: var(--pimento); }
.sn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); opacity: .5; flex: none; }
.sn-dot.on { background: #3fbf5a; opacity: 1; box-shadow: 0 0 0 2px rgba(63,191,90,.25); }
#spacenav-btn .sn-dot { margin-left: 2px; }
.spacenav-pop { position: fixed; top: 58px; right: 12px; z-index: 40; width: 290px; max-width: calc(100vw - 24px); padding: 8px 10px 10px;
  border-radius: 12px; background: var(--grove-1); border: 1px solid var(--line); box-shadow: var(--shadow-float); color: var(--leaf); font-size: 12.5px; }
.spacenav-pop .field { margin-top: 8px; }
.sn-state { display: flex; align-items: center; gap: 7px; margin: 2px 0 8px; color: var(--sage); }
.sn-state b { color: var(--leaf); }
@media (max-width: 1700px) { #spacenav-btn span { display: none; } #spacenav-btn { padding: 0 8px; gap: 4px; } }
.cube-iso { position: relative; z-index: 5; }
.viewcube { z-index: 1; }

/* Top bar drop-downs: language and package */
.dd { position: relative; flex: none; }
.dd[hidden] { display: none; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border-radius: 9px; border: 1px solid var(--line);
  background: transparent; color: var(--leaf); font-size: 12.5px; cursor: pointer; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { background: var(--grove-2); }
.dd-btn b { font-weight: 600; }
.dd-btn .ic { width: 16px; height: 16px; }
.dd-btn .dd-chev { width: 12px; height: 12px; transform: rotate(90deg); opacity: .7; transition: transform .15s; }
.dd-btn[aria-expanded="true"] .dd-chev { transform: rotate(-90deg); }
.plan-dd .dd-btn { border-style: dashed; border-color: var(--line-strong); }
.plan-dd .dd-btn b { color: var(--press); }
.dd-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 45; min-width: 190px; max-width: 320px; margin: 0; padding: 5px; list-style: none;
  border-radius: 11px; background: var(--grove-1); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.plan-dd .dd-menu { min-width: 280px; }
.dd-menu button { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 9px; border: 0;
  border-radius: 7px; background: transparent; color: var(--leaf); font: inherit; font-size: 13px; text-align: start; cursor: pointer; }
.plan-dd .dd-menu button { flex-direction: column; align-items: flex-start; gap: 2px; }
.dd-menu button:hover { background: var(--grove-2); }
.dd-menu button[aria-selected="true"] { background: var(--grove-3); box-shadow: inset 3px 0 0 var(--pimento); }
.dd-menu small { color: var(--sage); font-size: 11.5px; }
.plan-dd .dd-menu small { white-space: normal; line-height: 1.3; }
/* Display: five ways to draw the machine, in two rows */
.seg.disp-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg.disp-seg button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-row.lp-wrap { flex-wrap: wrap; }
.lp-row.lp-wrap .disp-seg { width: 100%; }

/* Product name in the stage corner: quiet, half see-through, the logo stays in the top bar */
.tool-plate { padding: 0 7px; }
.stage-brand { position: absolute; top: 18px; left: 22px; z-index: 3; display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  color: rgba(27, 31, 23, .42); transition: color .2s; }
.stage-brand b { font: 600 19px/1.05 var(--font); letter-spacing: -.01em; }
.stage-brand small { font: 500 13px/1.1 var(--font); letter-spacing: .02em; }
.stage-brand:hover { color: rgba(27, 31, 23, .7); }
.stage.bg-dark .stage-brand { color: rgba(255, 255, 255, .45); }
.stage.bg-dark .stage-brand:hover { color: rgba(255, 255, 255, .75); }
.app.ui-showroom .stage-brand, .app.kiosk .stage-brand { display: none; }
@media (max-width: 760px) { .stage-brand { top: 10px; left: 12px; } .stage-brand b { font-size: 15px; } .stage-brand small { font-size: 11px; } }
.seg.disp-seg { grid-template-columns: repeat(6, 1fr); }
.seg.disp-seg button { grid-column: span 2; }
.seg.disp-seg button:nth-child(n + 4) { grid-column: span 3; }

/* ---------- Feature tree (Design tab): see-through, floating over the left of the stage ---------- */
.feature-tree { position: absolute; top: 66px; left: 14px; z-index: 4; width: 236px; max-height: calc(100% - 150px); overflow-y: auto;
  padding: 6px 4px 8px; border-radius: 10px; color: rgba(24, 28, 22, .78); font-size: 12.5px;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(24, 28, 22, .08); opacity: .82; transition: opacity .15s, background .15s; scrollbar-width: thin; }
.feature-tree:hover { opacity: 1; background: rgba(255, 255, 255, .5); }
.feature-tree.collapsed { width: auto; padding-bottom: 6px; }
.stage.bg-dark .feature-tree { color: rgba(236, 240, 230, .82); background: rgba(16, 18, 14, .28); border-color: rgba(255, 255, 255, .08); }
.stage.bg-dark .feature-tree:hover { background: rgba(16, 18, 14, .55); }
.ft-head { display: flex; align-items: center; gap: 4px; padding: 0 6px 4px 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.ft-head b { font-weight: 600; opacity: .8; }
.ft-list { list-style: none; margin: 0; padding: 0; }
.ft-row { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 4px 0 calc(4px + var(--lv) * 16px); border-radius: 6px;
  cursor: default; white-space: nowrap; user-select: none; }
.ft-row:hover { background: rgba(127, 127, 127, .16); }
.ft-row.on { background: rgba(224, 35, 42, .16); box-shadow: inset 2px 0 0 var(--pimento); }
.ft-row.gone { opacity: .45; }
.ft-row.gone .ft-label { text-decoration: line-through; text-decoration-thickness: 1px; }
.ft-row[data-ft="feature"] .ft-label, .ft-row[data-ft="body"] .ft-label { font-weight: 500; }
.ft-ic { width: 15px; height: 15px; flex: none; opacity: .85; }
.ft-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ft-sp { width: 14px; flex: none; }
.ft-chev, .ft-eye { display: grid; place-items: center; width: 14px; height: 18px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; flex: none; }
.ft-chev .ft-ic { width: 11px; height: 11px; transition: transform .12s; }
.ft-chev.open .ft-ic { transform: rotate(90deg); }
.ft-eye { width: 20px; opacity: 0; }
.ft-eye .ft-ic { width: 14px; height: 14px; }
.ft-row:hover .ft-eye, .ft-eye.off { opacity: .8; }
.ft-rename { flex: 1; min-width: 0; height: 20px; padding: 0 4px; border: 1px solid var(--pimento); border-radius: 4px; font: inherit; }
.app.ui-showroom .feature-tree { display: none; }
@media (max-width: 760px) { .feature-tree { top: 48px; left: 8px; width: 200px; max-height: 40%; } }
/* Feature tree: almost invisible frame - only the text floats over the stage (a soft halo keeps it readable) */
.feature-tree, .feature-tree:hover { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.feature-tree { opacity: .9; text-shadow: 0 0 3px rgba(255, 255, 255, .95), 0 0 8px rgba(255, 255, 255, .7); }
.feature-tree:hover { background: rgba(255, 255, 255, .08); }
.stage.bg-dark .feature-tree, .stage.bg-dark .feature-tree:hover { background: transparent; border-color: transparent; }
.stage.bg-dark .feature-tree { text-shadow: 0 0 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .6); }
.stage.bg-dark .feature-tree:hover { background: rgba(0, 0, 0, .1); }
.feature-tree .ft-ic { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)); }
.stage.bg-dark .feature-tree .ft-ic { filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9)); }
.ft-row:hover { background: rgba(127, 127, 127, .12); }
/* Feature tree: tool column on its left (show / hide, undo, redo, frame) */
.feature-tree { display: flex; align-items: flex-start; gap: 4px; }
.ft-main { min-width: 0; flex: 1; }
.ft-tools { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; flex: none; }
.ft-tool { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: transparent;
  color: inherit; cursor: pointer; }
.ft-tool .ft-ic { width: 16px; height: 16px; }
.ft-tool:hover:not(:disabled) { background: rgba(127, 127, 127, .18); color: var(--pimento); }
.ft-tool:disabled { opacity: .3; cursor: default; }
.feature-tree { width: 270px; }
.feature-tree.collapsed { width: auto; }
/* Feature tree rows: eye + frame column at the left of every row */
.ft-row { padding-left: 2px; }
.ft-lead { display: inline-flex; flex: none; }
.ft-lead .ft-sp { width: 18px; }
.ft-ind { width: calc(var(--lv) * 10px); flex: none; }       /* indent per level */
/* eye + frame sit in the left column (under undo / redo), outside the indent, so every level starts further left */
.ft-row { position: relative; }
.ft-lead { position: absolute; left: -30px; top: 2px; }
.ft-lead .ft-sp { width: 15px; }
.ft-lead .ft-eye, .ft-lead .ft-frame { width: 15px; }
.ft-name { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.ft-eye, .ft-frame { display: grid; place-items: center; width: 18px; height: 20px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; flex: none; border-radius: 4px; }
.ft-eye .ft-ic, .ft-frame .ft-ic { width: 13px; height: 13px; }
.ft-eye { opacity: .45; }
.ft-eye.off { opacity: .9; color: var(--pimento); }
.ft-frame { opacity: 0; }
.ft-row:hover .ft-eye { opacity: .9; }
.ft-row:hover .ft-frame { opacity: .9; }
.ft-eye:hover, .ft-frame:hover { background: rgba(127, 127, 127, .2); }

/* Selection filter bar (top of the stage) and the chip that says what is chosen */
.sel-filter { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .28); color: rgba(24, 28, 22, .8); font-size: 12px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.stage.bg-dark .sel-filter { background: rgba(16, 18, 14, .35); color: rgba(236, 240, 230, .85); }
.sel-filter .sf-label { padding: 0 6px 0 4px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; opacity: .7; }
.sel-filter button { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent;
  color: inherit; font: inherit; cursor: pointer; }
.sel-filter button svg { width: 16px; height: 16px; }
.sel-filter button:hover { background: rgba(127, 127, 127, .18); }
.sel-filter button.on { background: var(--pimento); color: #fff; }
.sel-chip { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; max-width: 70%;
  padding: 5px 6px 5px 12px; border-radius: 9px; background: rgba(18, 21, 16, .82); color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sel-chip b { font-weight: 600; }
.sel-chip .sc-x { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer; opacity: .7; }
.app.ui-showroom .sel-filter, .app.ui-showroom .sel-chip { display: none; }
@media (max-width: 900px) { .sel-filter span:not(.sf-label) { display: none; } }

/* ---------- File and Tools menus in the mode bar ---------- */
.mode-dd { position: relative; display: flex; }
.modes .mode-dd-btn { gap: 5px; }
.modes .mode-dd-btn small { font-size: 12px; color: var(--sage); font-weight: 500; }
.modes .mode-dd-btn .dd-chev { width: 11px; height: 11px; transform: rotate(90deg); opacity: .6; transition: transform .15s; }
.modes .mode-dd-btn[aria-expanded="true"] .dd-chev { transform: rotate(-90deg); }
.modes .mode-dd-btn[aria-expanded="true"] { color: var(--leaf); background: var(--grove-2); }
.mode-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 45; min-width: 230px; margin: 0; padding: 5px; list-style: none;
  border-radius: 11px; background: var(--grove-1); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.mode-menu[hidden] { display: none; }
.mode-menu li { display: block; }
.modes .mode-menu button { width: 100%; justify-content: flex-start; gap: 9px; height: 32px; padding: 0 10px; border-radius: 7px; white-space: nowrap; }
.modes .mode-menu button .ic { width: 16px; height: 16px; opacity: .8; }
.modes .mode-menu button:hover { background: var(--grove-2); color: var(--leaf); }
.modes .mode-menu button[aria-selected="true"]::after { display: none; }
.modes .mode-menu button[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--pimento); }
.mode-menu .mm-sec { padding: 8px 10px 3px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); opacity: .8; }
.mode-menu .mm-sec:first-child { padding-top: 3px; }
@media (max-width: 760px) {
  .mode-menu { position: fixed; top: auto; bottom: calc(env(safe-area-inset-bottom) + 58px); left: 8px; right: 8px; min-width: 0; max-height: 60vh; overflow-y: auto; }
}

/* Feature tree: "Select same" filter line */
.ft-filter { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 4px 4px; padding: 3px 4px 3px 8px;
  border-radius: 7px; background: rgba(224, 35, 42, .12); font-size: 12px; }
.ft-filter b { font-weight: 600; }
.ft-filter button { border: 0; background: none; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; }

/* ---------- Walkthrough (first person) and avatar ---------- */
.walk-btn { background: var(--pimento); color: #fff; border-color: transparent; }
.walk-btn:hover { filter: brightness(1.08); }
.walk-btn .ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar-btn.on { box-shadow: inset 0 0 0 1px var(--pimento); }
.avatar-btn.active { background: var(--pimento); }
/* while walking only the 3D picture is shown */
.app.walking { grid-template-columns: 0 1fr 0; grid-template-rows: 0 1fr; }
.app.walking .topbar, .app.walking .catalog, .app.walking .inspector { visibility: hidden; overflow: hidden; }
.app.walking .stage { margin: 0; border-radius: 0; }
.app.walking #dock, .app.walking .viewcube-wrap, .app.walking .feature-tree, .app.walking .sel-filter, .app.walking .sel-chip,
.app.walking .stage-brand, .app.walking .hotspot-layer, .app.walking .look-pop, .app.walking .stage-hint { display: none !important; }
.app.walking .stage canvas { cursor: move; }
.walk-exit { position: absolute; top: 14px; right: 14px; z-index: 6; }
.walk-cross { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 5; pointer-events: none; }
.walk-cross::before, .walk-cross::after { content: ""; position: absolute; background: rgba(255, 255, 255, .85); box-shadow: 0 0 2px rgba(0, 0, 0, .6); }
.walk-cross::before { left: 8px; top: 0; width: 2px; height: 18px; }
.walk-cross::after { top: 8px; left: 0; height: 2px; width: 18px; }
.walk-joy { position: absolute; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; z-index: 5;
  border: 2px solid rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .15); display: none; pointer-events: none; }
.walk-joy i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(226, 0, 15, .75); }
.walk-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 999px; background: rgba(18, 21, 16, .82); color: #fff; font-size: 13px; text-align: center; pointer-events: none; }
@media (max-width: 1500px) { #walk-btn span { display: none; } #walk-btn { padding: 0 9px; } }
/* Avatar button: on / off switch */
.avatar-btn.active, .avatar-btn.active:hover { background: rgba(224, 35, 42, .16); box-shadow: inset 0 0 0 1.5px var(--pimento); }
/* Walkthrough button: greyed until an avatar stands in the scene */
.walk-btn.off { background: var(--grove-2); color: var(--sage); cursor: not-allowed; }
.walk-btn.off:hover { filter: none; }

/* ---------- Drawing tabs (Design tab): one tab per open design, see-through like the feature tree ---------- */
.design-tabs { position: absolute; z-index: 4; display: flex; gap: 6px; color: rgba(24, 28, 22, .8); font-size: 12.5px;
  text-shadow: 0 0 3px rgba(255, 255, 255, .95), 0 0 8px rgba(255, 255, 255, .7); transition: transform .22s ease, opacity .22s ease; }
.stage.bg-dark .design-tabs { color: rgba(236, 240, 230, .85); text-shadow: 0 0 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .6); }
.design-tabs .dt-ic { width: 14px; height: 14px; flex: none; }
.dt-list { display: flex; gap: 3px; min-width: 0; flex: 1; scrollbar-width: none; }
.dt-tab { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 3px 0 8px; border-radius: 7px; cursor: pointer; flex: none;
  max-width: 180px; background: rgba(127, 127, 127, .07); user-select: none; }
.dt-tab:hover { background: rgba(127, 127, 127, .16); }
.dt-tab.on { background: rgba(224, 35, 42, .13); font-weight: 600; }
.dt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-x, .dt-new, .dt-tools button { display: grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 5px; flex: none; }
.dt-x { width: 18px; height: 18px; opacity: .45; }                    /* every tab shows its ×: close it without opening it */
.dt-x .dt-ic { width: 11px; height: 11px; }
.dt-tab:hover .dt-x, .dt-tab.on .dt-x { opacity: .75; }
.dt-x:hover { opacity: 1; background: rgba(127, 127, 127, .25); color: var(--pimento); }
.dt-new { width: 26px; height: 26px; opacity: .8; }
.dt-new:hover, .dt-tools button:hover { opacity: 1; background: rgba(127, 127, 127, .18); color: var(--pimento); }
.dt-tools { display: flex; gap: 2px; flex: none; }
.dt-tools button { width: 26px; height: 26px; opacity: .55; }
.dt-tools button.on { opacity: .9; color: var(--pimento); }
.dt-rename { width: 110px; height: 20px; padding: 0 4px; border: 1px solid var(--pimento); border-radius: 4px; font: inherit; }
.design-tabs .dt-ic { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)); }
.stage.bg-dark .design-tabs .dt-ic { filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9)); }

/* at the bottom: a row along the bottom edge; the tool dock slides up a little to make room */
.design-tabs.side-bottom { left: 14px; right: 14px; bottom: 8px; align-items: center; }
.design-tabs.side-bottom .dt-list { align-items: center; overflow-x: auto; }
.design-tabs.side-bottom .dt-tab.on { box-shadow: inset 0 -2px 0 var(--pimento); }
.design-tabs.side-bottom.tucked { transform: translateY(calc(100% + 12px)); opacity: 0; pointer-events: none; }
.dock, .stage-hint { transition: bottom .22s ease; }
.stage.dtabs-bottom .dock { bottom: 46px; }
.stage.dtabs-bottom .stage-hint { bottom: 108px; }

/* on the left: a column along the left edge; the feature tree moves right */
.design-tabs.side-left { left: 8px; top: 66px; bottom: 12px; width: 150px; flex-direction: column; }
.design-tabs.side-left .dt-list { flex-direction: column; overflow-y: auto; }
.design-tabs.side-left .dt-tab { max-width: none; }
.design-tabs.side-left .dt-tab.on { box-shadow: inset 2px 0 0 var(--pimento); }
.design-tabs.side-left .dt-tools { order: -1; }
.design-tabs.side-left.tucked { transform: translateX(calc(-100% - 12px)); opacity: 0; pointer-events: none; }
.feature-tree { transition: opacity .15s, background .15s, left .22s ease; }
.stage.dtabs-left .feature-tree { left: 166px; }
.app.ui-showroom .design-tabs { display: none; }
@media (max-width: 760px) { .design-tabs.side-left { width: 120px; } .stage.dtabs-left .feature-tree { left: 134px; } }

/* ---------- Design menu (Part Design / Assembly) ---------- */
#design-menu .mode-menu button[aria-selected="true"] { color: var(--pimento); font-weight: 600; }

/* ---------- Assembly (Design > Assembly) ---------- */
.asm-ins { display: flex; flex-wrap: wrap; gap: 6px; }
.asm-ins .btn { gap: 6px; max-width: 100%; }
.asm-ins .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.asm-ins .btn small { opacity: .6; font-weight: 500; }
.asm-ins .ft-ic, .asm-kind .ft-ic, .asm-list .ft-ic, .block-head h3 .ft-ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.asm-pick { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; margin-bottom: 4px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in oklab, var(--pimento) 9%, transparent); }
.asm-pick b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--pimento); color: #fff; font-size: 11px; flex: none; }
.asm-pick small { opacity: .65; }
.asm-pick.asm-none { background: transparent; border: 1px dashed var(--line); color: var(--sage); }
.asm-pick.asm-none b { background: var(--line); color: inherit; }
.asm-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; margin: 8px 0; }
.asm-kind { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.asm-kind:hover { border-color: var(--pimento); }
.asm-kind.on { background: var(--pimento); border-color: var(--pimento); color: #fff; }
.hint.warn { color: var(--pimento); }
.hint.ok { color: #4c9a50; }
.asm-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.asm-list button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 8px; border: 0; border-radius: 7px; cursor: pointer;
  background: color-mix(in oklab, var(--pimento) 12%, transparent); color: inherit; font: inherit; font-size: 12.5px; text-align: left; }
.asm-list button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asm-list button small { opacity: .75; font-variant-numeric: tabular-nums; }
.asm-bom { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; }
.asm-bom th { text-align: left; font-weight: 600; color: var(--sage); padding: 3px 4px; border-bottom: 1px solid var(--line); }
.asm-bom td { padding: 4px; border-bottom: 1px dashed var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.asm-bom td small { display: block; opacity: .6; font-size: 11px; }
.asm-bom td:nth-child(3), .asm-bom td:nth-child(4), .asm-bom th:nth-child(3), .asm-bom th:nth-child(4) { text-align: right; }
.asm-tree .at-fix { font-style: normal; opacity: .6; }
.asm-tree .at-sub { opacity: .55; font-size: 11px; }
.asm-tree .at-warn { color: var(--pimento); }
.asm-tree .at-warn .ft-ic { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- Light window: view cube and X / Y / Z triad (like the main view) ---------- */
.viewcube-wrap.rig-nav { top: 46px; right: 14px; gap: 9px; transform: none; }
.rig-nav .viewcube { --s: 24px; }                                   /* half the earlier size: small enough for this window */
.rig-nav .face { font-size: 6px; border-radius: 5px; letter-spacing: -.2px; }
.rig-triad { position: absolute; left: 2px; bottom: 2px; width: 76px; height: 76px; pointer-events: none; overflow: visible; }   /* tight in the corner */
.rig-triad text { font: 700 8.5px var(--font, sans-serif); fill: #fff; }
.rig-proj { border: 0; height: 18px; padding: 0 7px; border-radius: 5px; background: rgba(18,21,16,.8); color: #c9cfbf;
  font: 600 9.5px var(--font, sans-serif); white-space: nowrap; cursor: pointer; }
.rig-proj:hover { color: #fff; background: var(--pimento); }
.rig-proj[aria-pressed="true"] { color: #f0cf62; }

/* ---------- Design: X / Y / Z triad in the bottom-left corner of the view ---------- */
.ds-triad { position: absolute; left: 6px; bottom: 6px; width: 84px; height: 84px; z-index: 3; pointer-events: none; overflow: visible;
  transition: bottom .22s ease, left .22s ease; }
.ds-triad text { font: 700 8.5px var(--font, sans-serif); fill: #fff; }
.stage.dtabs-bottom .ds-triad { bottom: 40px; }                    /* above the drawing tabs */
.stage.dtabs-left .ds-triad { left: 162px; }
.app.walking .ds-triad { display: none; }

/* ---------- Drawing tabs: the "…" button and its menu (tabs after the 10th) ---------- */
.dt-more { display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 0; border-radius: 7px; flex: none; cursor: pointer;
  background: rgba(127, 127, 127, .1); color: inherit; font: inherit; max-width: 170px; }
.dt-more span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-more:hover { background: rgba(127, 127, 127, .2); }
.dt-more.on { background: rgba(224, 35, 42, .13); font-weight: 600; box-shadow: inset 0 -2px 0 var(--pimento); }
.design-tabs .dt-menu { position: absolute; z-index: 6; display: flex; flex-direction: column; gap: 2px; min-width: 170px; max-height: 50vh; overflow-y: auto;
  padding: 6px; border-radius: 10px; background: rgba(26, 30, 23, .96); color: #e6e9df; text-shadow: none; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.design-tabs .dt-menu .dt-tab { max-width: none; background: transparent; }
.design-tabs .dt-menu .dt-tab:hover { background: rgba(255, 255, 255, .08); }
.design-tabs .dt-menu .dt-tab.on { background: rgba(224, 35, 42, .25); box-shadow: none; }
.design-tabs .dt-menu .dt-ic { filter: none; }
.design-tabs .dt-menu .dt-x { margin-left: auto; }

/* ---------- × on message boxes (loading / error box, short messages) ---------- */
.box-x { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #e6e9df; flex: none; }
.box-x:hover { background: var(--pimento); color: #fff; }
.box-x .ic { width: 13px; height: 13px; pointer-events: none; }
.loader .box-x { position: absolute; top: 8px; right: 8px; }
.loader { padding-right: 40px; }
.loader.failed .loader-bar i { background: var(--pimento); width: 100% !important; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast.show { pointer-events: auto; }

/* ---------- Display style menu at the top of the view (displayhud.js) ---------- */
.disp-hud { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stage.hud-side .disp-hud { left: auto; right: 104px; transform: none; align-items: flex-end; }    /* Design: beside the view cube */
.dh-btn, .dh-menu { background: rgba(255, 255, 255, .28); color: rgba(24, 28, 22, .85); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.stage.bg-dark .dh-btn, .stage.bg-dark .dh-menu { background: rgba(16, 18, 14, .35); color: rgba(236, 240, 230, .9); }
.dh-btn { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px 0 8px; border: 0; border-radius: 10px; cursor: pointer; }
.dh-btn:hover, .dh-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .5); }
.stage.bg-dark .dh-btn:hover, .stage.bg-dark .dh-btn[aria-expanded="true"] { background: rgba(16, 18, 14, .6); }
.dh-ic { width: 24px; height: 24px; }
.dh-chev { width: 14px; height: 14px; opacity: .6; }
.dh-menu { display: flex; gap: 2px; padding: 3px; border-radius: 10px; }
.dh-menu button { display: grid; place-items: center; width: 36px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.dh-menu button:hover { background: rgba(255, 255, 255, .45); }
.stage.bg-dark .dh-menu button:hover { background: rgba(255, 255, 255, .12); }
.dh-menu button[aria-checked="true"] { background: var(--pimento); color: #fff; }
.app.walking .disp-hud, .app.ui-showroom .disp-hud { display: none; }

/* ---------- View type menu under the view cube (projhud.js) ---------- */
.proj-dd { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; }
.proj-btn { display: flex; align-items: center; gap: 1px; height: 30px; padding: 0 4px 0 6px; }
.pj-ic { width: 22px; height: 22px; }
.pj-chev { width: 12px; height: 12px; opacity: .7; }
.proj-menu { position: absolute; top: calc(100% + 6px); right: -8px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px;
  background: rgba(18, 21, 16, .9); color: #e6e9df; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); backdrop-filter: blur(6px); }
.pj-group > span { display: block; margin: 0 0 4px 2px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; opacity: .65; }
.pj-group > div { display: flex; gap: 2px; }
.proj-menu button { display: grid; place-items: center; width: 38px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.proj-menu button:hover { background: rgba(255, 255, 255, .12); }
.proj-menu button[aria-checked="true"] { background: var(--pimento); color: #fff; }
.proj-menu .pj-ic { width: 26px; height: 26px; }

/* projection switch + display menu side by side; badge when X-ray is on */
.dh-row { display: flex; gap: 6px; }
.dh-proj { padding: 0 8px; }
.dh-proj[aria-pressed="true"] { color: var(--pimento); }
.dh-btn { position: relative; }
.dh-badge { position: absolute; top: 3px; left: 24px; display: grid; place-items: center; width: 12px; height: 12px; border-radius: 3px;
  background: var(--pimento); color: #fff; font: 700 8px/1 var(--font, sans-serif); font-style: normal; }
.dh-sep { width: 1px; margin: 4px 3px; background: currentColor; opacity: .25; }
.dh-menu button[disabled] { opacity: .35; cursor: not-allowed; }
.dh-menu button[data-dhxray][aria-checked="true"] { background: var(--pimento); color: #fff; }

/* ---------- Model tree (left of the view, every tab but Design) ---------- */
.model-tree .mt-count { opacity: .55; font-size: 11px; }
.model-tree .ft-row { position: relative; }
.model-tree .mt-acts { display: none; gap: 2px; margin-left: auto; padding-left: 6px; }
.model-tree .ft-row:hover .mt-acts { display: flex; }
.model-tree .mt-acts button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: none; color: inherit; cursor: pointer; opacity: .7; }
.model-tree .mt-acts button:hover { opacity: 1; background: rgba(127, 127, 127, .2); color: var(--pimento); }
.model-tree .mt-acts button.on { opacity: 1; color: var(--pimento); }
.model-tree .mt-acts .ft-ic { width: 14px; height: 14px; }
.app.walking .model-tree, .app.ui-showroom .model-tree { display: none; }

/* Tree scroll bars: hidden until the mouse is over the tree (the space stays, so rows do not jump) */
.feature-tree { scrollbar-color: transparent transparent; }
.feature-tree:hover, .feature-tree:focus-within { scrollbar-color: rgba(24, 28, 22, .35) transparent; }
.stage.bg-dark .feature-tree:hover, .stage.bg-dark .feature-tree:focus-within { scrollbar-color: rgba(236, 240, 230, .35) transparent; }
.feature-tree::-webkit-scrollbar { width: 6px; }
.feature-tree::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.feature-tree:hover::-webkit-scrollbar-thumb { background: rgba(24, 28, 22, .35); }
.stage.bg-dark .feature-tree:hover::-webkit-scrollbar-thumb { background: rgba(236, 240, 230, .35); }

/* material dot on each row, and the Material row at the bottom */
.model-tree .mt-sw { flex: none; width: 9px; height: 9px; margin-left: 2px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .28); }
.model-tree .mt-sw.metal { background-image: linear-gradient(135deg, rgba(255, 255, 255, .75), transparent 65%); }
.model-tree .mt-sw.mixed { background-image: conic-gradient(#b8463c 0 25%, #4d8a57 0 50%, #3d6db3 0 75%, #c9a83a 0); }
.model-tree .mt-matrow [data-mtmat] { cursor: pointer; }
.model-tree .mt-matrow [data-mtmat]:hover .ft-label { color: var(--pimento); }
.model-tree .ft-tool:disabled { opacity: .3; cursor: default; }
/* Configure: names of the chosen parts */
.sel-mat .sel-names { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Select (Part / Body / Material) beside the display style, top of the view */
.dh-sel { display: flex; gap: 2px; padding: 0 3px; height: 34px; align-items: center; border-radius: 10px;
  background: rgba(255, 255, 255, .28); color: rgba(24, 28, 22, .85); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.stage.bg-dark .dh-sel { background: rgba(16, 18, 14, .35); color: rgba(236, 240, 230, .9); }
.dh-sel button { display: grid; place-items: center; width: 32px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.dh-sel button .dh-ic { width: 20px; height: 20px; }
.dh-sel button:hover { background: rgba(255, 255, 255, .45); }
.stage.bg-dark .dh-sel button:hover { background: rgba(255, 255, 255, .12); }
.dh-sel button[aria-checked="true"] { background: var(--pimento); color: #fff; }

/* Trees: when rows go on below the window, the last 4 rows fade (the last one to about half strength) */
.feature-tree.fade-end {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 96px), rgba(0, 0, 0, .42) 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 96px), rgba(0, 0, 0, .42) 100%);
}

/* Part tools (parttools.js): icon grid and the tool dialog */
.pt-tools button:disabled { opacity: .35; cursor: default; }
.pt-tools button:disabled:hover { background: none; border-color: var(--line); }
.pt-tools span { font-size: 11px; text-align: center; line-height: 1.15; }
.pt-dialog h3 { display: flex; align-items: center; gap: 7px; }
.pt-dialog h3 .ds-ic { width: 20px; height: 20px; color: var(--pimento); }
.pt-dialog .seg { margin-bottom: 8px; }
.pt-bodies { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; font-size: 12px; color: var(--sage); }
.pt-bodies b { font-weight: 500; color: var(--leaf); }
.pt-bodies i { font-style: normal; color: var(--sage); }
.pt-pick { margin: -2px 0 8px; }
.pt-pick b { color: var(--pimento); font-weight: 600; }
.pt-pick .link { border: 0; background: none; color: var(--pimento); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
.pt-holes { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.pt-hole { display: grid; grid-template-columns: 16px 1fr 1fr 1fr 24px; gap: 4px; align-items: end; }
.pt-hole > span { font-size: 11px; color: var(--sage); padding-bottom: 7px; }
.pt-bodies .link { border: 0; background: none; color: var(--pimento); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; margin-left: auto; }
.pt-prof { display: grid; grid-template-columns: 1fr 24px; gap: 4px; align-items: end; }

/* Sketch: dimension numbers / relation signs in the view, and their list */
.sk-con { padding: 1px 5px; border-radius: 5px; font: 600 11px var(--font-cond); color: #1b6fe0; background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(27, 111, 224, .45); pointer-events: none; white-space: nowrap; transform: translateY(-14px); }
.sk-con.dim { color: #fff; background: #1b6fe0; border-color: #1b6fe0; }
.sk-picks { display: flex; gap: 8px; align-items: baseline; margin: 6px 0; font-size: 12px; color: var(--sage); }
.sk-picks .link { border: 0; background: none; color: var(--pimento); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; margin-left: auto; }
.sk-cons { flex-wrap: wrap; }
.sk-conlist li { display: grid; grid-template-columns: 1fr 92px 28px; gap: 4px; align-items: center; }
.sk-conlist li > span { font-size: 12px; }
.sk-conlist .ds-num { margin: 0; }
.sk-bad { color: var(--pimento); }

/* ---------- My materials (mymat.js, Professional): own PBR sets in the library ---------- */
.ml-shelf { margin: 0 12px 8px; flex: none; }
.ml-shelf small { color: var(--moss); font-weight: 500; margin-left: 3px; }
.my-card { position: relative; cursor: pointer; }
.my-card:focus-visible { outline: 2px solid var(--pimento); outline-offset: 1px; }
.my-card-acts { position: absolute; top: 2px; right: 2px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.my-card:hover .my-card-acts, .my-card:focus-within .my-card-acts { opacity: 1; }
.my-card-acts .icon-btn { background: var(--grove-1); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.ml-ball.baked { border-radius: 14px; }                        /* a picture painted for one model: shown as a square */
.ml-ball.baked img { border-radius: 14px; inset: 0; width: 100%; height: 100%; }
.my-add .ml-ball { display: grid; place-items: center; background: transparent; border: 2px dashed var(--line-strong); color: var(--sage); }
.my-add .ml-ball .ic { width: 26px; height: 26px; }
.my-add:hover .ml-ball { border-color: var(--pimento); color: var(--pimento); }

.my-edit { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 14px 10px; scrollbar-width: thin; }
.my-drop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px dashed var(--line-strong); background: var(--grove-2); }
.my-drop.over { border-color: var(--pimento); background: var(--pimento-soft); }
.my-drop > .ic { width: 22px; height: 22px; color: var(--sage); }
.my-drop b { display: block; font-size: 13px; }
.my-drop small { display: block; font-size: 11px; color: var(--moss); line-height: 1.3; margin-top: 2px; }
.matlib.my-busy .my-drop { opacity: .6; pointer-events: none; }
.my-notes { margin: 8px 0 0; padding: 7px 10px 7px 24px; border-radius: 10px; background: var(--grove-2); font-size: 11.5px; color: var(--sage); }
.my-notes li + li { margin-top: 3px; }
.my-slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 10px 0 4px; }
.my-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.my-pic { width: 100%; aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line-strong); background: var(--grove-2); color: var(--moss);
  display: grid; place-items: center; overflow: hidden; padding: 0; }
.my-slot.full .my-pic { border-style: solid; border-color: var(--line); }
.my-pic:hover { border-color: var(--pimento); }
.my-pic img, .my-even { width: 100%; height: 100%; object-fit: cover; display: block; }
.my-slot b { font-size: 10.5px; font-weight: 600; line-height: 1.2; }
.my-slot small { font-size: 10px; color: var(--moss); line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.my-slot-acts { position: absolute; top: 4px; right: 4px; left: 4px; display: flex; justify-content: flex-end; gap: 3px; opacity: 0; transition: opacity .15s; }
.my-slot:hover .my-slot-acts, .my-slot:focus-within .my-slot-acts { opacity: 1; }
.my-slot-acts .btn.small { height: 22px; padding: 0 6px; font-size: 10.5px; }
.my-slot-acts .icon-btn { background: var(--grove-1); }
.my-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.my-sec h4 { margin: 0 0 8px; font: 600 12px var(--font-cond); letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }
.my-sec > .hint { display: block; margin: 5px 0 8px; }
.my-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.my-sub { margin: 4px 0 6px; }
.my-sub .hint { display: block; margin-top: -2px; }
.my-f input[type="color"] { width: 100%; }
.my-sec .check { margin-top: 6px; }
.my-live { margin: 12px 0 0; }
.my-foot { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); flex: none; }
.my-foot > span { flex: 1; }
@media (max-width: 760px) {
  .my-slots { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .my-two { grid-template-columns: 1fr; }
  .my-drop { grid-template-columns: 1fr auto; }
  .my-drop > .ic { display: none; }
}
.app.ui-showroom .matlib .input { background: rgba(255, 255, 255, .8); color: #1c1e1b; }

/* ---------- Render studio (render.js) ---------- */
.rn-panel { position: absolute; right: 12px; top: 12px; bottom: 64px; z-index: 9; width: min(330px, calc(100% - 24px)); display: flex; flex-direction: column;
  border-radius: 16px; background: var(--grove-1); border: 1px solid var(--line); box-shadow: var(--shadow-float); color: var(--leaf); overflow: hidden; }
.rn-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 6px 14px; }
.rn-head b { font: 600 15px var(--font-cond); letter-spacing: .02em; margin-right: auto; }

.rn-body { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 14px 10px; scrollbar-width: thin; }
.rn-body > .field { margin: 10px 0 5px; }
.rn-body > .hint { display: block; margin: 5px 0 0; }
.rn-body .check { margin-top: 10px; }
.rn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.rn-px { font-variant-numeric: tabular-nums; }
.rn-colour { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 6px !important; }
.rn-fit { margin-top: 12px; }
.rn-busy { margin-top: 12px; padding: 9px 10px; border-radius: 10px; background: var(--grove-2); display: grid; gap: 7px; font-size: 12px; }
.rn-busy b { display: block; height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.rn-busy i { display: block; height: 100%; width: 0; background: var(--pimento); transition: width .25s; }
.rn-result { margin-top: 12px; display: grid; gap: 6px; }
.rn-result img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px;
  background: repeating-conic-gradient(#8a8f84 0 25%, #a7ab9f 0 50%) 0 0 / 16px 16px; }
.rn-result small { font-size: 11px; color: var(--moss); word-break: break-all; }
.rn-foot { padding: 9px 12px; border-top: 1px solid var(--line); flex: none; }
.rn-frame { position: absolute; z-index: 8; pointer-events: none; border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 0 9999px rgba(10, 12, 9, .42); border-radius: 2px; }
.rn-size { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(10, 12, 9, .6); color: #fff;
  font: 600 11px var(--font-cond); font-variant-numeric: tabular-nums; }
.rn-thirds { position: absolute; inset: 0; display: none;
  background: linear-gradient(90deg, transparent calc(33.333% - .5px), rgba(255,255,255,.55) 0 calc(33.333% + .5px), transparent 0 calc(66.666% - .5px), rgba(255,255,255,.55) 0 calc(66.666% + .5px), transparent 0),
              linear-gradient(180deg, transparent calc(33.333% - .5px), rgba(255,255,255,.55) 0 calc(33.333% + .5px), transparent 0 calc(66.666% - .5px), rgba(255,255,255,.55) 0 calc(66.666% + .5px), transparent 0); }
.rn-frame.thirds .rn-thirds { display: block; }
.rn-live { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.rn-frame.rendering { box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 0 9999px rgba(10, 12, 9, .85); }
.rn-frame.rendering .rn-live { display: block; background: repeating-conic-gradient(#8a8f84 0 25%, #a7ab9f 0 50%) 0 0 / 16px 16px; }
@media (max-width: 760px) {
  .rn-panel { top: auto; left: 8px; right: 8px; width: auto; bottom: 60px; max-height: 52%; }
}
.rn-tabs { margin: 0 12px 4px; flex: none; }
.rn-tabs .ic { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; }
.seg.an-types { display: grid; grid-template-columns: 1fr 1fr; }
.an-types button { padding: 0 4px; white-space: nowrap; }
.an-views { display: grid; gap: 4px; margin: 6px 0; }
.an-view { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 4px 6px 4px 10px; border-radius: 9px; background: var(--grove-2); font-size: 12.5px; }
.an-swatches { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.an-swatches .swatch { position: relative; width: 26px; height: 26px; }
.an-swatches .swatch.on { outline: 2px solid var(--pimento); outline-offset: 1px; }
.an-swatches .swatch i { position: absolute; right: -5px; top: -5px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--pimento); color: #fff;
  font: 600 9.5px/15px var(--font-cond); font-style: normal; text-align: center; }
.rn-body .field .an-unit { position: absolute; right: 10px; bottom: 7px; font-style: normal; font-size: 11.5px; color: var(--moss); pointer-events: none; }
.rn-body .field:has(.an-unit) { position: relative; }
.rn-body .field:has(.an-unit) .input { padding-right: 26px; }
.rn-result video { width: 100%; max-height: 240px; border-radius: 10px; background: #000; }

/* ---------- Render Studio screen (main.js openStudio): no catalogue, no model tree; tabs on the right ---------- */
.app.studio-mode { --catalog-w: 0px; }
.app.studio-mode .catalog { visibility: hidden; }
.st-tabs { margin: 0 0 6px; flex: none; }
.st-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; white-space: nowrap; }
.st-tabs .ic { width: 14px; height: 14px; }
.st-tabs button[aria-selected="true"] { background: var(--grove-3); color: var(--leaf); }
.panel[data-panel="render"] { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.panel[data-panel="render"][hidden] { display: none; }
.rn-panel.docked { position: static; flex: 1; min-height: 0; width: auto; border: 0; border-radius: 0; box-shadow: none; background: none; }
.rn-panel.docked .rn-head { display: none; }
.rn-panel.docked .rn-tabs { margin-top: 10px; }
