/* =====================================================================
   Bella portal — client overlays on the 3D viewer (index.html only).
   The model stays visible: panels are glass, pins and labels are small.
   Uses the tokens from css/portal.css.
   ===================================================================== */

/* ---------- side sheet (bottom sheet on phones) ---------- */
.sheet {
  position: fixed; z-index: 70; top: calc(16px + var(--top-h, 0px)); right: 16px; bottom: calc(var(--dock-h, 0px) + 12px);
  width: min(420px, calc(100vw - 32px));
  display: flex; flex-direction: column;
  /* Dark enough to stay readable over a bright sky or white walls. */
  background: linear-gradient(165deg, rgba(44,47,54,0.94), rgba(20,22,26,0.94));
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  color: var(--b-text); font-family: var(--b-font); font-size: 15px; line-height: 1.45;
  animation: sheet-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.sheet *, .sheet *::before, .sheet *::after { box-sizing: border-box; }
.sheet.sheet-wide { width: min(880px, calc(100vw - 32px)); }
@keyframes sheet-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(32px); } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid rgba(255,255,255,0.10); }
.sheet-title { flex: 1; margin: 0; font-size: 19px; font-weight: 700; font-stretch: 125%; font-variation-settings: 'wdth' 125; }
.sheet-close {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--b-line);
  background: rgba(0,0,0,0.25); color: var(--b-text); font-size: 14px; cursor: pointer;
}
.sheet-close:hover { border-color: #4a505a; }
.sheet button:focus-visible, .sheet a:focus-visible, .sheet summary:focus-visible { outline: 2px solid var(--b-gold); outline-offset: 2px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 18px 22px; overscroll-behavior: contain; }
.sheet-muted { color: var(--b-muted); margin: 6px 0; }
.sheet-h3 { font-size: 14px; font-weight: 600; color: var(--b-muted); margin: 18px 0 4px; }


.sheet .message { margin: 8px 0; }

/* Desktop: beside the side rail, level with its top (see #sideRail). */
@media (min-width: 701px) and (min-height: 501px) {
  .sheet, .sheet.sheet-wide {
    left: var(--rail-right, 88px); right: auto; top: var(--rail-top, 16px); bottom: auto;
    max-height: calc(100vh - var(--rail-top, 16px) - 16px);
    animation-name: sheet-in-left;
  }
  .sheet.sheet-wide { width: min(880px, calc(100vw - var(--rail-right, 88px) - 16px)); }
}
@keyframes sheet-in-left { from { opacity: 0; transform: translateX(-24px); } }
@media (max-width: 700px), (max-height: 500px) {
  /* Just above the dock (Views row + tool nav), which never hides. */
  .sheet, .sheet.sheet-wide {
    top: auto; left: 0; right: 0; bottom: var(--dock-h, 0px); width: auto;
    max-height: 74vh; max-height: min(74dvh, calc(100dvh - var(--dock-h, 0px) - 70px));
    border-radius: 18px 18px 0 0; border-bottom: none;
    animation-name: sheet-up;
  }
  .sheet.sheet-compact { max-height: 50vh; max-height: min(50dvh, calc(100dvh - var(--dock-h, 0px) - 70px)); }
}

/* ---------- documents ---------- */
.doc-group:first-child .sheet-h3 { margin-top: 4px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.doc-text { display: grid; gap: 2px; min-width: 0; }
.doc-title { font-weight: 600; overflow-wrap: anywhere; }
.doc-meta { font-size: 13px; color: var(--b-muted); }
.sheet .history { margin-top: 4px; }

/* ---------- schedules ---------- */
.tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.06); margin-bottom: 4px; }
.tabs button {
  flex: 1; min-height: 38px; border: none; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--b-muted); font: inherit; font-size: 14px; white-space: nowrap;
}
.tabs button[aria-selected="true"] { background: var(--b-text); color: #16181c; font-weight: 600; }
/* Provenance, set like a drawing's title block: always on screen, so a
   phone screenshot of the table always says where the data came from. */
.schedule-stamp {
  margin: 14px 0 12px; padding: 8px 12px; border-left: 3px solid var(--b-gold);
  background: rgba(201,169,97,0.08); font-size: 14px; font-weight: 600;
  font-stretch: 112%; font-variation-settings: 'wdth' 112;
}
.schedule-tools { display: flex; gap: 10px; margin-bottom: 6px; }
.schedule-tools .input { flex: 1; min-height: 42px; padding: 8px 12px; }
.table-scroll { overflow: auto; max-height: 52vh; margin-top: 8px; border: 1px solid rgba(255,255,255,0.10); border-radius: 8px; }
.schedule-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.schedule-table th {
  position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600;
  background: #23262c; color: var(--b-text); padding: 9px 10px; border-bottom: 1px solid var(--b-line); white-space: nowrap;
}
.schedule-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); white-space: nowrap; }
.schedule-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.025); }

/* ---------- comments list + thread ---------- */




@media (hover: hover) {

}






.sheet .textarea { margin-top: 6px; }

/* ---------- install ---------- */
.steps { margin: 4px 0 14px; padding-left: 22px; }
.steps li { margin: 10px 0; }

/* ---------- comment pins: drafting-sheet detail callouts ---------- */
.pins-layer, .measure-labels { position: fixed; inset: 0; z-index: 26; pointer-events: none; overflow: hidden; }
.pin {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  width: 30px; height: 42px; padding: 0 0 12px; border: none; background: none;
  color: var(--b-gold); font: 700 13px/30px var(--b-font); text-align: center; isolation: isolate;
}
.pin::before { /* the callout circle */
  content: ''; position: absolute; left: 0; top: 0; width: 30px; height: 30px; z-index: -1; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--b-gold); background: rgba(18,19,23,0.88);
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.pin::after { /* the leader line down to the exact spot */
  content: ''; position: absolute; left: 14px; top: 30px; width: 2px; height: 12px; background: var(--b-gold);
}
.pin.resolved { color: #a9aaa6; }
.pin.resolved::before { border-color: #7d7f7b; background: rgba(18,19,23,0.7); }
.pin.resolved::after { background: #7d7f7b; }
.pin.highlighted { color: #1b1710; }
.pin.highlighted::before { background: var(--b-gold); box-shadow: 0 0 0 6px rgba(201,169,97,0.28), 0 2px 10px rgba(0,0,0,0.45); }
.pin.draft { pointer-events: none; }
.pin.draft::before { border-style: dashed; }
.pin:focus-visible { outline: none; }
.pin:focus-visible::before { box-shadow: 0 0 0 3px var(--b-text); }

/* ---------- measure labels: dimension text ---------- */
.measure-label {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  padding: 3px 9px; border-radius: 4px; border: 1px solid var(--b-gold-deep);
  background: rgba(18,19,23,0.88); color: var(--b-gold);
  font: 700 14px/1.3 var(--b-font); font-variant-numeric: tabular-nums;
}
/* The total on top; across / up under it, smaller. */
.measure-label { display: grid; justify-items: center; gap: 1px; line-height: 1.25; }
.measure-label .ml-split { font: 600 12px/1.2 var(--b-font); color: var(--b-muted); }
.measure-label.saved .ml-split { color: #d6d5d1; }

/* The snap marker: a square on an endpoint, a triangle on a midpoint. */
.snap-marker { position: fixed; left: 0; top: 0; z-index: 27; pointer-events: none; }
.snap-marker[hidden] { display: none; }
.snap-shape {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; box-sizing: border-box;
  border: 2px solid var(--b-gold); background: rgba(18,19,23,0.35); box-shadow: 0 0 0 1px rgba(0,0,0,0.6);
}
.snap-marker[data-kind="midpoint"] .snap-shape {
  border: none; background: var(--b-gold); box-shadow: none;
  clip-path: polygon(50% 8%, 96% 92%, 4% 92%); left: -10px; top: -10px; width: 20px; height: 20px;
}
.snap-marker[data-kind="face"] .snap-shape { border-radius: 50%; width: 10px; height: 10px; left: -5px; top: -5px; background: rgba(201,169,97,0.55); }
.snap-tag {
  position: absolute; left: 14px; top: -26px; white-space: nowrap; padding: 2px 8px; border-radius: 6px;
  background: rgba(18,19,23,0.9); color: var(--b-gold); font: 700 12px/1.4 var(--b-font);
}

/* Saved ones (everyone on the project sees them): white, set apart from
   the gold lines being measured right now. */
.measure-label.saved { color: #f2f1ee; border-color: rgba(242,241,238,0.45); font-weight: 600; }
/* The name, under the line (the number is above it): a small box to type in, then gold text once saved. */
.measure-name {
  position: absolute; left: 0; top: 0; box-sizing: content-box; max-width: 40ch; pointer-events: auto;
  padding: 2px 8px; border-radius: 4px; border: 1px dashed var(--b-gold-deep);
  background: rgba(18,19,23,0.78); color: var(--b-gold); font: 600 13px/1.3 var(--b-font); text-align: center;
}
.measure-name::placeholder { color: var(--b-muted); font-weight: 500; }
.measure-name:focus { outline: none; border-style: solid; border-color: var(--b-gold); box-shadow: 0 0 0 3px rgba(201,169,97,0.25); }
.measure-name.saved { pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: none; background: rgba(18,19,23,0.6); }
.measure-name[hidden] { display: none; }

/* ---------- tool bar (Measure / Add comment): top on phones, clear of the keyboard; beside the side rail on desktop ---------- */
.tool-bar {
  position: fixed; z-index: 72; top: calc(max(12px, env(safe-area-inset-top)) + var(--top-h, 0px)); left: 50%; transform: translateX(-50%);
  width: min(600px, calc(100vw - 24px)); padding: 12px 14px; box-sizing: border-box;
  background: linear-gradient(165deg, rgba(44,47,54,0.95), rgba(20,22,26,0.95));
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid rgba(201,169,97,0.45); border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  color: var(--b-text); font-family: var(--b-font); font-size: 15px;
}
.tool-bar *, .tool-bar *::before, .tool-bar *::after { box-sizing: border-box; }
/* Measure and Add comment on computers: see-through glass, like the comments on the Drawings page (.lc), with the same pill
   buttons. With the dock (1100px+) Measure floats under Home instead of filling the side, and the view stays where it is. */
@media (min-width: 701px) and (min-height: 501px) {
  .tool-bar.glass-tool {
    background: rgba(14,15,18,0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    color: #f2f1ee; text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  }
  html.props-docked .tool-bar.dock-tool.glass-tool {
    top: calc(var(--top-h, 0px) + 76px); bottom: auto; left: calc(var(--rail-w, 0px) + 16px); width: 340px;
    max-height: calc(100vh - var(--top-h, 0px) - 200px); padding: 14px; border-width: 1px; border-radius: 16px; animation: none;
  }
  html .tool-bar.glass-tool:not(.dock-tool) { top: calc(var(--top-h, 0px) + 76px); left: calc(var(--rail-w, 0px) + 16px); width: 380px; transform: none; }   /* Add comment: under Home too */
  .glass-tool .button { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); background: rgba(14,15,18,0.62); color: #f2f1ee; font-weight: 700; text-shadow: none; }
  .glass-tool .button.primary { border-color: var(--b-gold); background: var(--b-gold); color: #1b1710; font-weight: 800; }
  .glass-tool .tool-hint, .glass-tool .measure-status { color: #f2f1ee; }
  .tool-bar.glass-tool .textarea { background: rgba(14,15,18,0.62); border-color: rgba(255,255,255,0.18); color: #f2f1ee; }
  .glass-tool .tool-disclaimer { color: rgba(242,241,238,0.7); }
  .glass-tool .measure-saved { border-top-color: rgba(255,255,255,0.14); }
  /* the Comments panel: the same glass, its cards and boxes see-through too */
  .sheet.glass-tool { background: rgba(14,15,18,0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); color: #f2f1ee; }
  html.props-docked .sheet.glass-tool {
    top: calc(var(--top-h, 0px) + 76px); bottom: 24px; left: calc(var(--rail-w, 0px) + 16px); width: 380px; height: auto;
    border-width: 1px; border-radius: 16px; animation: none;
  }
  .sheet.glass-tool .sheet-head { border-bottom-color: rgba(255,255,255,0.14); }
  .sheet.glass-tool .sheet-close { border-radius: 999px; background: rgba(14,15,18,0.62); border-color: rgba(255,255,255,0.18); color: #f2f1ee; }
  .sheet.glass-tool .board-card { background: rgba(14,15,18,0.55); border-color: rgba(255,255,255,0.14); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
  .sheet.glass-tool .board-chip { border-color: rgba(255,255,255,0.18); background: rgba(14,15,18,0.5); color: #f2f1ee; }
  .sheet.glass-tool .board-chip.on { background: rgba(201,169,97,0.25); border-color: var(--b-gold); color: var(--b-gold); }
  .sheet.glass-tool textarea, .sheet.glass-tool input[type="text"] { background: rgba(14,15,18,0.62); border-color: rgba(255,255,255,0.18); color: #f2f1ee; }
  @media (hover: hover) { .glass-tool .button:hover { border-color: var(--b-gold); box-shadow: 0 0 0 1px var(--b-gold), 0 0 10px rgba(201,169,97,0.5); } }
  .glass-tool .button:focus-visible { outline: none; border-color: var(--b-gold); box-shadow: 0 0 0 1px var(--b-gold), 0 0 10px rgba(201,169,97,0.5); }
}
.tool-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-row strong { font-weight: 700; }
.tool-hint { color: #d6d5d1; }
.tool-bar .spacer { flex: 1; }
.tool-disclaimer { margin: 8px 0 0; font-size: 12px; color: var(--b-muted); }
.tool-actions { display: flex; gap: 10px; margin-top: 10px; }
/* Measure: save the last measurement (optional note), and the saved list. */
.measure-status { margin: 8px 0 0; font-size: 13px; color: #d6d5d1; }
.measure-status:empty { display: none; }
.measure-saved { margin-top: 10px; border-top: 1px solid rgba(255,255,255,0.10); padding-top: 8px; }
.measure-saved summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 4px 0; }
.measure-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; }
.measure-item { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.measure-go {
  flex: 1; min-width: 0; display: grid; gap: 2px; padding: 9px 0; text-align: left; cursor: pointer;
  background: none; border: none; color: inherit; font: inherit;
}
.measure-go:hover .measure-item-name { color: var(--b-gold); }
.measure-item-name { font-weight: 600; overflow-wrap: anywhere; }
.measure-item-meta { font-size: 13px; color: var(--b-muted); }
.measure-item-meta strong { color: var(--b-text); font-variant-numeric: tabular-nums; }
.tool-actions .button { flex: 1; min-height: 42px; }
@media (min-width: 701px) and (min-height: 501px) { .tool-actions { justify-content: flex-end; } .tool-actions .button { flex: none; min-width: 96px; } }
@media (max-width: 700px), (max-height: 500px) { .sheet-head { touch-action: none; } }
.compose { display: grid; gap: 8px; }
.compose .textarea { min-height: 76px; }
/* Desktop: Measure and Add comment are a small panel beside the side rail, like the rest. */
@media (min-width: 701px) and (min-height: 501px) {
  .tool-bar {
    left: var(--rail-right, 88px); top: var(--rail-top, 16px); transform: none; width: 340px;
    max-height: calc(100vh - var(--rail-top, 16px) - 16px); overflow-y: auto;
  }
}

/* ---------- project status ---------- */
.intro-status { margin: 4px 0 18px; }
.intro-status .status-track { font-family: var(--b-font); }

/* ---------- Project details (client menu) ---------- */
.pd-h { margin: 0 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--b-muted); }
.pd-list { list-style: none; margin: 0; padding: 0; }
.pd-contact { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pd-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; font-size: 14px; }
.pd-links a { color: var(--b-gold); text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- A list of materials with a slider each, and its Save bar (Texture scale in Finish setup; the Align tab's foot) ---------- */
.config-body { flex: 1; overflow-y: auto; padding: 4px 16px 12px; overscroll-behavior: contain; }
.config-note { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: rgba(201,169,97,0.12); font-size: 13px; }
.config-list { list-style: none; margin: 6px 0 0; padding: 0; }
.config-row { display: grid; gap: 3px; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.config-row:hover, .config-row:focus-within { background: rgba(201,169,97,0.08); }
.config-row.dirty .config-name::after { content: ' •'; color: var(--b-gold); }
.config-name { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.config-controls { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.config-controls input[type="range"] { flex: 1; min-width: 0; accent-color: var(--b-gold); }
.config-number { width: 72px; padding: 5px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.3); color: var(--b-text); font: inherit; }
.config-controls .portal-link-button { padding: 4px 0; font-size: 13px; }
.config-controls .portal-link-button:disabled { opacity: 0.35; cursor: default; }
.config-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.10); }
.config-status { font-size: 13px; color: var(--b-muted); }
.config-foot .button { min-height: 38px; }
.config-foot .button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Existing | Proposed switch (0012) ----------
   Top centre, between the logo and the ViewCube; the same dark tile look
   as the Sun / Walk / Orbit buttons, gold for what's showing. */
.existing-toggle {
  position: fixed; z-index: 34; left: 50%; top: calc(max(16px, env(safe-area-inset-top)) + var(--top-h, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--dock-bg, rgba(14,15,18,0.94)); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); font-family: var(--b-font);
}
.existing-toggle[hidden] { display: none; }
.existing-toggle button {
  min-height: 36px; padding: 0 14px; border: none; border-radius: 10px; background: none; cursor: pointer;
  color: var(--b-text); font: 600 14px var(--b-font);
}
.existing-toggle button[aria-pressed="true"] { color: var(--b-gold); background: rgba(201,169,97,0.13); }
.existing-toggle button { transition: box-shadow 0.14s ease; }
@media (hover: hover) {
  .existing-toggle button:hover {
    box-shadow: 0 0 0 1.5px var(--b-gold), 0 0 10px color-mix(in srgb, var(--b-gold) 55%, transparent);
  }
}
.existing-toggle button:focus-visible { outline: none; box-shadow: 0 0 0 1.5px var(--b-gold), 0 0 10px color-mix(in srgb, var(--b-gold) 55%, transparent); }
.existing-toggle.busy button { opacity: 0.6; cursor: progress; }
.existing-status { font-size: 12px; color: var(--b-muted); padding: 0 6px; white-space: nowrap; }
.existing-opacity { display: none; width: 96px; margin: 0 8px 0 4px; accent-color: var(--b-gold); }
.existing-toggle.overlay .existing-opacity { display: block; }
.existing-toggle button[hidden] { display: none; }
/* Under the switch: the admin's note, and the points scan's dot size. */
.existing-under { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.existing-note { padding: 5px 12px; border-radius: 10px; max-width: min(620px, 90vw); background: var(--b-gold); color: #1b1710; font: 600 12px var(--b-font); }
html:not(.align-open) .existing-toggle[data-shown="proposed"] .existing-note { display: none; }   /* only where the scan and the ground are in play */
@media (max-width: 700px), (max-height: 500px) { .existing-note { white-space: normal; width: max-content; max-width: 80vw; text-align: center; } }
.existing-points {
  display: flex; gap: 14px; padding: 8px 12px; white-space: nowrap;
  background: var(--dock-bg, rgba(14,15,18,0.94)); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); color: var(--b-text); font: 600 12px var(--b-font);
}
.existing-points[hidden] { display: none; }
.existing-points label { display: flex; align-items: center; gap: 8px; }
.existing-slider { width: 90px; accent-color: var(--b-gold); }
.existing-status:empty { display: none; }
@media (max-width: 700px), (max-height: 500px) { .existing-toggle button { padding: 0 11px; font-size: 13px; } }

/* ---------- Align existing (admin, js/portal/align-panel.js): a tab of the Properties dock on computers, a popup elsewhere ---------- */
.align-panel {
  position: fixed; z-index: 66; left: var(--rail-right, 88px); top: calc(16px + var(--top-h, 0px)); bottom: calc(var(--dock-h, 0px) + 12px);
  width: min(344px, calc(100vw - 32px)); display: flex; flex-direction: column;
  background: linear-gradient(165deg, rgba(44,47,54,0.95), rgba(20,22,26,0.95));
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid rgba(201,169,97,0.45); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  color: var(--b-text); font-family: var(--b-font); font-size: 14px; line-height: 1.4;
}
.align-panel *, .align-panel *::before, .align-panel *::after { box-sizing: border-box; }
html.props-docked #propsDock .align-panel { position: static; display: none; width: auto; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; }
html.props-docked.props-align:not(.props-collapsed) #propsDock .align-panel { display: flex; flex: 1 1 auto; min-height: 0; }
html.props-docked.props-align #propsDock #layersPanel, html.props-docked.props-align #propsDock #crossSectionPanel { display: none !important; }
@media (max-width: 700px), (max-height: 500px) { .align-panel { left: 8px; right: 8px; width: auto; top: auto; bottom: calc(var(--dock-h, 0px) + 8px); max-height: 62vh; } }

.align-top { flex: none; display: grid; gap: 8px; padding: 12px 14px 10px; }
.align-title { display: flex; align-items: center; gap: 10px; }
.align-title .sheet-title { font-size: 17px; }
.align-title .sheet-close { width: 30px; height: 30px; }
.align-cards { display: flex; gap: 6px; }
.align-card { flex: 1 1 0; min-width: 0; display: grid; gap: 1px; padding: 7px 10px; text-align: left; cursor: pointer; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: var(--b-text); font: 700 14px var(--b-font); }
.align-card small { font-size: 12px; font-weight: 500; color: var(--b-muted); }
.align-card.done small { color: #7fd19b; }
.align-card[aria-pressed="true"] { border-color: var(--b-gold); background: rgba(201,169,97,0.13); color: var(--b-gold); }
.align-msg { padding: 8px 10px; border-radius: 8px; background: rgba(201,169,97,0.12); font-size: 13px; line-height: 1.35; color: #e7e3d8; }
.align-link { display: block; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--b-gold); font: 700 13px var(--b-font); text-decoration: underline; cursor: pointer; }
.align-link[hidden] { display: none; }
.align-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 14px 10px; display: grid; gap: 10px; align-content: start; }
.align-group, .align-editors, .align-cmd { display: grid; gap: 8px; }
.align-group.inline { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; }
.align-cmd[hidden] { display: none; }
.size-label { font-size: 12px; font-weight: 600; color: var(--b-muted); }
.align-eyes { display: flex; gap: 6px; }
.align-eye { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; cursor: pointer; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14); background: none; color: var(--b-muted); font: 600 13px var(--b-font); }
.align-eye svg { width: 17px; height: 17px; flex: none; opacity: 0.55; }
.align-eye[aria-pressed="true"] { border-color: rgba(201,169,97,0.6); color: var(--b-text); }
.align-eye[aria-pressed="true"] svg { opacity: 1; color: var(--b-gold); }
.align-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.align-quick .button { min-height: 46px; padding: 4px 6px; font-size: 13px; line-height: 1.2; white-space: normal; }
.align-show { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.06); }
.align-show button {
  flex: 1; min-height: 32px; border: none; border-radius: 999px; background: none; cursor: pointer;
  color: var(--b-muted); font: inherit; font-size: 13px;
}
.align-show button[aria-pressed="true"] { background: var(--b-text); color: #16181c; font-weight: 600; }
.align-cmds button { font-weight: 600; }
.align-hint { margin: 0; font-size: 13px; color: var(--b-muted); }
.align-size { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--b-gold); border-radius: 10px; }
.align-size .align-hint { color: inherit; }
.align-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.align-actions .button { flex: 1; }
.align-panel .check-line { margin: 0; }
.align-panel .button:disabled, .align-panel button:disabled { opacity: 0.4; cursor: not-allowed; }
.align-foot { flex: none; flex-wrap: nowrap; gap: 6px; padding: 10px 14px; }
.align-foot .button { min-height: 36px; padding: 0 10px; font-size: 13px; white-space: nowrap; }

/* The move tool's distance, beside the pointer while dragging (js/portal/move-gizmo.js). */
.tape-tag { transform: translate(-50%, -50%); z-index: 34; }
.gizmo-dim { position: fixed; z-index: 70; pointer-events: none; padding: 4px 9px; border-radius: 8px; background: rgba(14,15,18,0.92); border: 1px solid var(--b-gold); color: var(--b-gold); font: 700 14px var(--b-font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.axis-more { font-size: 12.5px; color: var(--b-muted); }
.axis-more[hidden] { display: none; }
.axis-more summary { cursor: pointer; padding: 2px 0; }
.axis-more p { margin: 2px 0 6px; font-size: 12.5px; }
.axis-more .button { min-height: 32px; padding: 0 8px; font-size: 12.5px; }

/* ---------- "Viewing as client" (admin only) ----------
   Top centre; app.js moves it to just under the logo once that shows. */
.admin-top {
  position: fixed; z-index: 60; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + var(--top-h, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  max-width: max(150px, calc(50vw - 270px));
}
@media (max-width: 700px), (max-height: 500px) { .admin-top { max-width: calc(100vw - 32px); } }
html.has-banner .admin-top { z-index: 30; }
@media (min-width: 701px) and (min-height: 501px) { html.has-banner .admin-top { display: none !important; } }   /* computers: the switch is in the banner (js/site-bar.js) */   /* under a panel sliding out, so it never sits on the panel's title */
.client-view-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap;
  max-width: calc(100vw - 24px); padding: 7px 8px 7px 16px; box-sizing: border-box;
  background: rgba(20,22,26,0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(201,169,97,0.55); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  color: var(--b-text); font-family: var(--b-font); font-size: 14px;
}
.client-view-bar > span:first-child { font-weight: 700; color: var(--b-gold); }

.client-view-bar a { padding: 6px 14px; border-radius: 999px; background: var(--b-gold); color: #1b1710; font-weight: 700; text-decoration: none; }
 /* keeps it small and clear of the switch and the ViewCube */
@media (max-width: 1450px) { .client-view-bar > span:first-child { display: none; } .client-view-bar { padding-left: 8px; } }

@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
}

/* Drawings panel: project block, schedules, construction documents. */
.pd-block { margin-bottom: 22px; }
.dr-schedules:not(:empty) { margin-bottom: 22px; }
.dr-schedule-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-back { margin-left: auto; margin-right: 8px; padding: 6px 12px; font-size: 13px; }
.dr-docs .pd-h { margin-bottom: 4px; }

/* Piece info card: details of the piece under a tap while Layers is open. */
.info-card { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(64px + var(--top-h, 0px)); max-width: 360px; padding: 10px 12px; border-radius: 14px;
  background: rgba(14,15,18,0.94); border: 1px solid rgba(255,255,255,0.14); color: var(--b-text, #f2f2f2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 28px rgba(0,0,0,0.45); font-size: 13px; pointer-events: auto; }
.info-card { max-height: calc(100dvh - 88px - var(--top-h, 0px) - var(--dock-h, 0px)); overflow-y: auto; }
.info-card[hidden] { display: none; }
.info-card.phone-sheet { top: auto; left: 0; right: 0; bottom: var(--dock-h, 0px); max-width: none; max-height: 45dvh; padding: 12px 14px 14px; border-radius: 16px 16px 0 0; border-width: 1px 0 0; animation: dockUp 0.2s ease-out; }
.info-card.phone-sheet .info-actions { margin-top: 8px; }
.info-card.floating { right: auto; width: 360px; }
.info-head { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
@media (hover:hover) and (min-width: 701px) and (min-height: 501px) { .info-card.floating .info-head { cursor: grab; touch-action: none; user-select: none; } .info-card.dragging .info-head { cursor: grabbing; } .info-card.dragging { box-shadow: 0 0 0 2px rgba(201,169,97,.55), 0 12px 32px rgba(0,0,0,0.5); } }
.info-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-name { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.info-cat { color: var(--b-gold, #c9a961); font-size: 12px; font-weight: 600; }
.info-close { appearance: none; flex: none; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; background: rgba(255,255,255,0.08);
  color: inherit; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; cursor: pointer; }
.info-close { width: 28px; height: 28px; padding: 0; line-height: 1; }
.info-rows { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0 0; }
.info-rows dt { color: rgba(255,255,255,0.6); }
.info-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.info-note { margin: 8px 0 0; font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.35; }

/* The tapped piece's finish in the info card. */
.info-adjust { margin-top: 8px; }
.info-adjust > summary { cursor: pointer; font-size: 12px; color: rgba(255,255,255,0.7); padding: 4px 0; }
.info-picks { display: grid; gap: 6px; margin-top: 10px; }
.info-pick { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 8px; }
.info-pick > span { color: rgba(255,255,255,0.6); font-size: 12px; }
.info-pick .lf-layer-select { margin: 0; min-height: 34px; padding: 3px 8px; font-size: 13px; }
.info-pick .fpk-btn { width: 100%; max-width: none; min-width: 0; }
.info-pick .fpk-list { grid-column: 1 / -1; }
.info-pick .fpk-box { max-height: 240px; }
.info-pick .fpk-search { font-size: 16px; }   /* iPhones zoom the page on anything smaller */

/* Click-to-assign block inside the info card (admin, Configure mode). */






.layers-h + .layers-fine + .check-line { color: inherit; }

/* The info card's layer buttons (the Layers list's hide and show-only, for the tapped piece's layer). */
.save-as { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.12); }
.save-as .info-note { margin: 0 0 6px; color: rgba(255,255,255,0.75); }
.save-as-row { display: flex; gap: 6px; align-items: center; }
.save-as-name { flex: 1; min-width: 0; min-height: 34px; padding: 3px 8px; font-size: 13px; }
.save-as-row .info-act { flex: none; }
/* The finish the element shows (chosen in the Finishes tab): its picture and name, then its scale, colour and Rotate. */
.info-finish { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 13px; }
.info-finish b { flex: 1; min-width: 0; font-weight: 600; }
.info-finish-pic { position: relative; flex: none; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.info-finish-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-finish-pic.orig { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.10) 0 4px, rgba(255,255,255,0.03) 4px 8px); }
.info-finish-tint { position: absolute; inset: 0; mix-blend-mode: multiply; }
.info-reach { flex: none; font-size: 11px; color: var(--b-gold, #c9a961); }
/* The row of buttons, all one size: Match finish, Hide, Rotate (a client's Reset finish), and the scale in the right corner */
/* Under the finish: four buttons on the left (2 by 2), the Scale over the Colour presets on the right */
.info-tools { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 64px); gap: 8px 4px; justify-items: center; flex: none; }
.info-side { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.info-presets { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.info-presets .fa-colours { display: grid; grid-template-columns: repeat(6, 22px); gap: 6px 5px; justify-content: center; }
.info-presets .fa-orig { grid-column: 1 / -1; justify-self: center; }
.info-presets .fa-swatch { width: 22px; height: 22px; }
.info-presets .fa-orig { min-height: 24px; padding: 0 10px; font-size: 12px; }
.fa-any-btn { position: relative; overflow: hidden; }
.fa-any-btn .fa-any { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.fa-any-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px #15171b; pointer-events: none; }
.fa-any-dot:not([style*="background"]) { display: none; }
.fa-any-btn.on { border-color: var(--b-gold); }
.info-icon, .info-tools .fa-step { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; padding: 0; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07); color: inherit; cursor: pointer; }
.info-icon svg { width: 28px; height: 28px; display: block; }
.info-icon[aria-pressed="true"] svg { transform: rotate(90deg); transition: transform .2s; }
.info-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.info-tool-cap { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.65); line-height: 1.1; text-align: center; }
/* The scale's − 100% + sit together in one box of their own */
.info-tools .fa-scales { gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.25); }
.info-tools .fa-scales .fa-step { width: 38px; height: 38px; border-radius: 9px; border-color: transparent; background: rgba(255,255,255,0.08); font-size: 20px; font-weight: 500; line-height: 1; }
.fa-scale-box { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; height: 38px; padding: 0 4px 0 0; font-size: 12px; color: rgba(255,255,255,0.6); }
.fa-scale-num { display: inline-flex; align-items: center; }
.fa-scale-reset { margin: 1px 0 0 6px; padding: 0 4px; border: 0; border-radius: 4px; background: none; color: var(--b-gold, #c9a961); font: inherit; font-size: 10px; font-weight: 600; line-height: 13px; cursor: pointer; }
.fa-scale-reset.off { visibility: hidden; }
@media (hover:hover) { .fa-scale-reset:hover { text-decoration: underline; } }
.fa-scale-reset:focus-visible { outline: 2px solid var(--b-gold); }
.info-tools .fa-scale { width: 36px; min-height: 0; height: 24px; padding: 0 2px; border: 0; background: none; text-align: right; font-size: 14px; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.info-tools .fa-scale::-webkit-inner-spin-button, .info-tools .fa-scale::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
@media (hover:hover) { .info-icon:hover, .info-tools .fa-step:hover { border-color: var(--b-gold); color: var(--b-gold); } }
.info-icon:focus-visible, .info-tools .fa-step:focus-visible { outline: 2px solid var(--b-gold); outline-offset: 2px; }
.info-tools .sel-count { margin: 0; }
.info-adjust-box { margin-top: 8px; }
.info-act[disabled] { opacity: .45; pointer-events: none; }
.moved-pill { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 26; display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 16px; border-radius: 999px;
  background: rgba(20,20,20,0.82); border: 1px solid var(--b-gold); color: #fff; font-size: 13px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.moved-pill[hidden] { display: none; }
.moved-pill button { min-height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--b-gold); background: transparent; color: var(--b-gold); font-weight: 700; cursor: pointer; }
.info-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.info-act { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07); color: inherit; font: 600 12.5px inherit; cursor: pointer; white-space: nowrap; }
.info-act svg { width: 20px; height: 20px; flex: none; display: block; }
.info-act.on, .info-act:hover { border-color: var(--b-gold); color: var(--b-gold); }
.info-act:focus-visible { outline: 2px solid var(--b-gold); outline-offset: 2px; }

/* The Comments panel holds the board, which scrolls its own feed. */
.sheet-body.board-host { display: flex; flex-direction: column; overflow: hidden; padding: 12px 14px 14px; }
.sheet-body.board-host .board { flex: 1 1 auto; height: auto; }

/* The comments floating over the model (js/portal/live-chat.js): small see-through bubbles, older ones fading. */
.lc { position: fixed; z-index: 35; left: calc(var(--rail-w, 0px) + var(--side-w, 0px) + 16px); bottom: var(--chat-bottom, 150px); width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 6px; pointer-events: none; font-family: var(--b-font); }
.lc[hidden] { display: none; }
html:not(.props-docked) .lc { left: 112px; }
.lc.folded { width: auto; }
.lc > * { pointer-events: auto; }
.lc > .lc-list { pointer-events: none; }
.lc-list { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.lc-msg { pointer-events: auto; display: flex; gap: 7px; align-items: flex-start; max-width: 100%; text-align: left; cursor: pointer; border: 0;
  background: rgba(14,15,18,0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 14px; padding: 6px 11px 6px 7px;
  color: #f2f1ee; font: 400 13px/1.35 var(--b-font); text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.lc-msg.in { animation: lcIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes lcIn { from { opacity: 0; transform: translateY(18px); } }
.lc-av { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 12px; text-shadow: none; }
.lc-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.lc-text b { font-weight: 800; }
.lc-compose { display: flex; gap: 6px; align-items: center; }
.lc-input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); background: rgba(14,15,18,0.62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f2f1ee; font: 400 14px var(--b-font); }
.lc-input::placeholder { color: rgba(242,241,238,0.65); }
.lc-input:focus { outline: none; border-color: var(--b-gold); }
.lc-send { flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--b-gold); color: #1b1710; font: 800 13px var(--b-font); cursor: pointer; }
.lc-send:disabled { opacity: 0.45; cursor: default; }
.lc-full { flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: rgba(14,15,18,0.62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f2f1ee; cursor: pointer; }
.lc-full svg { width: 18px; height: 18px; }
.lc-full:hover, .lc-send:hover { box-shadow: 0 0 0 1.5px var(--b-gold), 0 0 10px rgba(201,169,97,0.5); }
.lc-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(14,15,18,0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f2f1ee; font: 700 12px var(--b-font); text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.lc-dot { width: 7px; height: 7px; border-radius: 50%; background: #4cc38a; box-shadow: 0 0 0 3px rgba(76,195,138,0.25); }
.lc-chev svg { width: 14px; height: 14px; display: block; transition: transform 0.15s ease; }
.lc.folded .lc-chev svg { transform: rotate(180deg); }
.lc.folded .lc-list, .lc.folded .lc-compose { display: none; }
/* Folded: the same pill as the folded Views row (size, type, corner, shadow), on the same baseline. */
.lc.folded .lc-tag { padding: 9px 14px 9px 12px; gap: 8px; border-radius: 16px; background: var(--dock-bg, rgba(14,15,18,0.94)); border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); -webkit-backdrop-filter: none; backdrop-filter: none; font: 800 14px var(--b-font); letter-spacing: 0.03em; text-transform: uppercase; text-shadow: none; }
.lc.folded .lc-count { color: #c9a961; font-weight: 700; }
.lc.folded .lc-chev { color: #c9a961; }
.lc.folded .lc-chev svg { width: 16px; height: 16px; }
@media (max-width: 700px), (max-height: 500px) {
  .lc { left: 10px; width: min(300px, calc(100vw - 92px)); bottom: var(--chat-bottom, calc(var(--dock-h, 0px) + 12px)); }   /* stops short of the Walk and Orbit stack */
  html:not(.props-docked) .lc { left: 10px; }
  .lc.folded .lc-tag { min-height: 44px; }
  .lc-input, .lc-send { height: 44px; }
  .lc-full { width: 44px; height: 44px; }
  /* Every control a thumb can hit. */
  .info-act, .fpk-btn, .layer-mat-btn, .layer-show-all, .lf-layer-select, .menu-list-item, .settings-tool, .cmd-btn, .segmented button, .view-thumb-btn { min-height: 44px; }
  .info-close, .layer-btn, .cmd-btn { min-width: 44px; min-height: 44px; }
  .info-pick .lf-layer-select, #restoreEyes .eye-btn { min-height: 44px; }
  .lf-tabs button, .board-act, .board-chip, .board-pin-btn, .board-post { min-height: 44px; }
  .sheet-close, .board-act, .eye-btn.in-panel { min-width: 44px; min-height: 44px; }
}
body.dock-open .lc { display: none; }




/* The command bar: Undo, Redo, Measure, Show all, Reset moves, Home. */
.cmd-bar { position: fixed; z-index: 27; left: calc(var(--rail-w, 0px) + 16px); top: calc(var(--top-h, 0px) + 88px); display: flex; gap: 4px; padding: 4px; border-radius: 14px;
  background: rgba(20,20,20,0.82); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cmd-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 52px; min-height: 46px; padding: 4px 8px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.cmd-btn svg { width: 20px; height: 20px; }
.cmd-bar[hidden], .cmd-btn[hidden] { display: none; }
.cmd-btn:disabled { opacity: .35; cursor: default; }
.cmd-btn:not(:disabled):active { background: rgba(255,255,255,0.1); }
@media (hover:hover) { .cmd-btn:not(:disabled):hover { border-color: var(--b-gold); box-shadow: 0 0 0 2px rgba(201,169,97,.25); } }
.cmd-btn:focus-visible { outline: 2px solid var(--b-gold); outline-offset: 1px; }
@media (max-width: 700px), (max-height: 500px) {
  .cmd-bar { left: 8px; top: 116px; gap: 2px; }
  .cmd-btn { min-width: 42px; min-height: 42px; padding: 3px 5px; }
  .cmd-btn span { display: none; }   /* icons only on a phone */
}

/* ---------- Finish setup tab (admin, js/portal/finish-setup.js): the Finishes section of the Insert page in the dock ---------- */
.fs-panel { display: none; }
.fs-saved { margin: 12px 0; }
.fs-saved > summary { cursor: pointer; }
.fs-saved-list { display: grid; gap: 8px; margin-top: 8px; }
.fs-saved-row { display: flex; gap: 8px; align-items: center; }
.fs-saved-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fs-saved-name { width: 100%; min-height: 32px; padding: 3px 8px; font-size: 13px; }
.fs-swatch { flex: none; width: 32px; height: 32px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,0.08); }
.fs-swatch img { display: block; width: 100%; height: 100%; object-fit: cover; }
:root.props-docked.props-setup:not(.props-collapsed) { --props-w: 540px; }
html.props-docked.props-setup #propsDock #layersPanel, html.props-docked.props-setup #propsDock #crossSectionPanel { display: none !important; }
html.props-docked.props-setup:not(.props-collapsed) #propsDock .fs-panel { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 16px 28px; color: var(--b-text); }
.fs-panel .finish-section { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.fs-panel .admin-h2 { font-size: 18px; margin-top: 8px; }
.fs-panel .finish-row { padding: 8px 0; }
   /* the group cards keep their words clear of the gold border */
.fs-panel .finish-controls .select { max-width: 200px; }
.fs-panel .finish-controls { flex: 1 1 auto; }   /* the full width of the dock once it wraps under the name */
.fs-panel .fs-texture { margin-top: 20px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 14px; line-height: 1.4; }
.fs-panel .fs-texture summary { font-weight: 700; cursor: pointer; }
.fs-panel .fs-texture .config-body { padding: 4px 0 12px; overflow: visible; }
.fs-panel .fs-texture .config-foot { padding: 10px 0 0; }
