/* SPDX-License-Identifier: Apache-2.0 */
/* ModelCraft — toolbar | outliner · 3D view · entity info, style, scenes | status with the value box.
 * Tokens only (paper/model aware); hierarchy by line weight; no shadows. */

.mc {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr) 17.5rem;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "tools tools tools"
    "left stage right"
    "left timeline right"
    "status status status";
  height: 100%;
  min-height: 0;
}

/* ---- Toolbar ---- */
.mc-tools { grid-area: tools; display: flex; flex-wrap: wrap; background: var(--sheet-2); border-bottom: var(--pen-2) solid var(--ink); scrollbar-width: thin; }
.mc-tool-group { display: flex; flex-direction: column; padding: .25rem .35rem .3rem; border-right: var(--pen-1) solid var(--line); flex: 0 0 auto; }
.mc-tool-group:last-of-type { border-right: 0; }
.mc-tool-label { font-size: .75rem; font-weight: 600; color: var(--ink-2); padding: 0 .2rem .15rem; }
.mc-tool-row { display: flex; gap: .1rem; align-items: stretch; }
.mc-tool {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  min-width: 2.6rem; padding: .25rem .2rem .2rem;
  font: inherit; font-size: .71875rem; font-weight: 600; color: var(--ink);
  background: transparent; border: var(--pen-1) solid transparent; border-radius: var(--radius);
  cursor: pointer; white-space: nowrap; list-style: none;
}
.mc-tool::-webkit-details-marker { display: none; }
.mc-tool .bi { font-size: 1.15rem; line-height: 1; color: var(--layer); }
.mc-tool:hover { border-color: var(--line); background: var(--sheet); }
.mc-tool:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 1px; }
.mc-tool[aria-pressed="true"] { border-color: var(--ink); background: var(--sheet); }
.mc-tool:disabled { opacity: .45; cursor: default; }
.mc-menu { position: relative; }
.mc-menu[open] > summary { border-color: var(--ink); background: var(--sheet); }
.mc-menu-list {
  position: absolute; z-index: 30; top: calc(100% + .25rem); left: 0; min-width: 14rem;
  display: flex; flex-direction: column; padding: .25rem 0;
  background: var(--sheet-2); border: var(--pen-2) solid var(--ink); border-radius: var(--radius);
}
.mc-menu-list button { font: inherit; font-size: .875rem; font-weight: 500; text-align: left; color: var(--ink); background: none; border: 0; padding: .35rem .8rem; cursor: pointer; }
.mc-menu-list button:hover, .mc-menu-list button:focus-visible { background: var(--sheet); text-decoration: underline; outline: none; }
.mc-menu-list button:disabled { opacity: .45; cursor: default; text-decoration: none; background: none; }
.mc-menu-list button kbd { margin-left: 1.25rem; float: right; font: inherit; font-size: .75rem; color: var(--ink-2); background: none; border: 0; padding: 0; }
.mc-menu-list hr { margin: .25rem 0; border: 0; border-top: var(--pen-1) solid var(--line); }
.mc-menu-list [aria-checked="true"]::before { content: "✓ "; }
.mc-menu-list [aria-checked="false"]::before { content: "   "; white-space: pre; }

body.app-shell .sp-tab { bottom: 3.25rem; }

/* ---- Panels ---- */
.mc-panel { overflow-y: auto; min-height: 0; background: var(--sheet-2); }
.mc-left { grid-area: left; border-right: var(--pen-2) solid var(--ink); }
.mc-right { grid-area: right; border-left: var(--pen-2) solid var(--ink); }
.mc-sec { padding: .9rem 1rem; border-bottom: var(--pen-1) solid var(--line); }
.mc-sec:last-child { border-bottom: 0; }
.mc-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.mc-h { font-size: var(--fs-sm); font-weight: 700; font-stretch: 112%; margin: 0 0 .5rem; }
.mc-sec-head .mc-h { margin: 0; }
.mc-note { color: var(--ink-2); font-size: .875rem; margin: .5rem 0 0; }
.mc-linkbtn { font: inherit; font-size: .875rem; font-weight: 600; color: var(--action); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.mc-linkbtn:hover { text-decoration-thickness: 2px; }
.mc-linkbtn:disabled { color: var(--ink-2); cursor: default; text-decoration: none; }
.mc kbd { font-family: inherit; font-size: .8125rem; font-weight: 700; padding: 0 .3rem; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }

.mc-input, .mc-select {
  width: 100%; min-width: 0; font: inherit; font-size: .875rem; font-weight: 500; color: var(--ink);
  background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius);
  padding: .2rem .4rem; font-variant-numeric: tabular-nums;
}
.mc-input:focus, .mc-select:focus { outline: var(--pen-2) solid var(--action); outline-offset: 0; border-color: var(--action); }
.mc-num { width: 4.5rem; flex: 0 0 auto; }
.mc-props { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: .4rem .6rem; align-items: center; font-size: .875rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.mc-props > label, .mc-props .k { color: var(--ink-2); font-weight: 500; }
.mc-props .v { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mc-props .span { grid-column: 1 / -1; }
.mc-props + .mc-props { margin-top: .75rem; padding-top: .75rem; border-top: var(--pen-1) solid var(--grid); }
.mc-props:disabled { opacity: .55; }
.mc-check { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.mc-check input, .mc-props input[type="range"] { accent-color: var(--action); }
.mc-row { display: flex; gap: .4rem; align-items: center; min-width: 0; }
.mc-row input[type="range"] { flex: 1 1 auto; min-width: 0; }
.mc-out { font-variant-numeric: tabular-nums; min-width: 3.5rem; text-align: right; }
.mc-actions { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .6rem; }

/* outliner + components */
.mc-crumbs { margin: 0 0 .4rem; font-size: .8125rem; color: var(--ink-2); }
.mc-crumbs:empty { display: none; }
.mc-tree, .mc-list { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.mc-tree ul { list-style: none; margin: 0; padding-left: 1rem; }
.mc-tree li, .mc-list li { border-top: var(--pen-1) solid var(--grid); }
.mc-tree > li:first-child, .mc-list > li:first-child { border-top: 0; }
.mc-node { display: flex; align-items: center; gap: .4rem; width: 100%; padding: .22rem .2rem; font: inherit; color: var(--ink); background: none; border: 0; border-left: var(--pen-3) solid transparent; text-align: left; cursor: pointer; }
.mc-node:hover { background: var(--sheet); }
.mc-node.is-sel { border-left-color: var(--action); font-weight: 700; }
.mc-node.is-open { border-left-color: var(--layer); }
.mc-node .bi { color: var(--layer); flex: 0 0 auto; }
.mc-node .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; align-items: baseline; padding: .25rem 0; }
.mc-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-list .n { color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* an input with its buttons on one line (Soften up to, 0.4 M18) */
.mc-inline { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.mc-inline .mc-input { width: 4.5rem; }
/* Outliner rows (0.4 M22): the row button, then its eye; search; where a dragged row would go */
.mc-node-row { display: flex; align-items: center; min-width: 0; }
.mc-node-row .mc-node { flex: 1 1 auto; min-width: 0; }
.mc-tree .mc-eye { border: 0; background: none; padding: .125rem .375rem; color: var(--ink-2); cursor: pointer; line-height: 1; opacity: .55; }
.mc-node-row:hover .mc-eye, .mc-tree .mc-eye:focus-visible, .mc-tree .mc-eye[aria-pressed="false"] { opacity: 1; }
.mc-tree .mc-eye:focus-visible { outline: var(--pen-2, 2px) solid var(--layer-blue); outline-offset: 1px; }
.mc-tree-search { width: 100%; margin: .25rem 0 .375rem; }
.mc-node.is-match .nm { font-weight: 600; }
.mc-node.is-drop, [data-tree-top].is-drop { outline: 2px dashed var(--layer-blue); outline-offset: -2px; }
/* 0.6.1: a drop between rows (the order) shows as a line on that edge of the row */
.mc-node.is-drop-before { box-shadow: inset 0 2px 0 var(--layer-blue); }
.mc-node.is-drop-after { box-shadow: inset 0 -2px 0 var(--layer-blue); }
.mc-tree .mc-node { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mc.mc-tree-dragging, .mc.mc-tree-dragging .mc-node { cursor: grabbing; }
.mc-tree-name { min-width: 0; flex: 1 1 auto; padding-block: 0; }
.mc.is-touch .mc-tree .mc-eye { min-width: 2.25rem; min-height: 2.25rem; }
/* IFC storeys dialog (0.4 M12): name, elevation, remove */
.mc-storey { display: grid; grid-template-columns: minmax(0, 1fr) 7rem auto; gap: .375rem; align-items: center; margin-bottom: .25rem; }
.mc-storey-head span { font-size: .8125rem; color: var(--ink-2); }
/* the starter library (0.4 M25) */
.mc-dialog-wide { max-width: min(46rem, 94vw); }
.mc-starter + .mc-starter { margin-top: .5rem; }
.mc-starter-grid { display: flex; flex-wrap: wrap; gap: .375rem; }
/* the rules of a part inside a stretching component (0.4 M26) */
.mc-rules { margin-top: .5rem; }
.mc-rules-h { grid-column: 1 / -1; font-weight: 600; color: var(--ink); }
/* Tags (0.4 M6): eye, name (retype to rename), how many use it, delete */
.mc-tags li { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; }
.mc-tags .mc-input { min-width: 0; padding-block: .125rem; }
.mc-tags .mc-eye, .mc-tags .mc-del { border: 0; background: none; padding: .25rem; color: var(--ink); cursor: pointer; line-height: 1; }
.mc-tags .mc-eye[aria-pressed="false"] { color: var(--ink-2); }
.mc-tags li.is-off .mc-input { color: var(--ink-2); font-style: italic; }
.mc-tags .mc-eye:focus-visible, .mc-tags .mc-del:focus-visible { outline: var(--pen-2, 2px) solid var(--layer-blue); outline-offset: 1px; }
.mc-tags .nm { padding-inline: .375rem; }
.mc.is-touch .mc-tags .mc-eye, .mc.is-touch .mc-tags .mc-del { min-width: 2.25rem; min-height: 2.25rem; }

/* scenes */
.mc-scenes { list-style: none; margin: 0; padding: 0; font-size: .875rem; counter-reset: sc; }
.mc-scenes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; align-items: center; padding: .25rem 0; border-top: var(--pen-1) solid var(--grid); }
.mc-scenes li:first-child { border-top: 0; }
.mc-scenes li.is-cur .mc-scene-go { font-weight: 700; border-left-color: var(--action); }
.mc-scene-go { font: inherit; text-align: left; color: var(--ink); background: none; border: 0; border-left: var(--pen-3) solid transparent; padding: .1rem .4rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-scene-go:hover { text-decoration: underline; }
.mc-scene-acts { display: flex; gap: .15rem; }
.mc-icon { font: inherit; color: var(--ink-2); background: none; border: var(--pen-1) solid transparent; border-radius: var(--radius); padding: 0 .3rem; cursor: pointer; line-height: 1.5; }
.mc-icon:hover { color: var(--ink); border-color: var(--line); }
.mc-scene-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.mc-scene-nav .btn-sm-cc { min-height: 2rem; padding: .25rem .6rem; font-size: .8125rem; }

/* ---- Stage ---- */
.mc-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--sheet); }
.mc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mc-over { touch-action: none; cursor: crosshair; }
.mc-over:focus { outline: none; }
.mc-over:focus-visible { outline: var(--pen-2) solid var(--action); outline-offset: -3px; }
.mc-over.is-orbit { cursor: grab; }
/* touch: the loupe above a drawing finger (modelcraft.js) */
.mc-loupe { position: absolute; z-index: 5; border-radius: 50%; pointer-events: none; border: var(--pen-2) solid var(--ink); }
.mc-over.is-select { cursor: default; }
.mc-hint {
  position: absolute; z-index: 2; top: 1rem; left: 1rem; max-width: min(31rem, calc(100% - 2rem));
  padding: .75rem 1rem; font-size: .875rem; background: var(--sheet-2);
  border: var(--pen-2) solid var(--ink); border-radius: var(--radius); pointer-events: none;
}
.mc-hint-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.mc-hint-head .mc-hint-h { margin: 0; }
.mc-hint-h { margin: 0 0 .35rem; font-weight: 700; font-stretch: 112%; }
.mc-hint-close { pointer-events: auto; padding: .15rem .35rem; font-size: .8125rem; line-height: 1; color: var(--ink); background: transparent; border: var(--pen-1) solid transparent; border-radius: var(--radius); cursor: pointer; }
.mc-hint-close:hover { border-color: var(--line); background: var(--sheet); }
.mc-hint-close:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 1px; }
.mc-hint ul { margin: 0; padding-left: 1.1rem; }
.mc-hint li + li { margin-top: .2rem; }
.mc-drop {
  position: absolute; inset: .75rem; z-index: 3; display: grid; place-items: center; font-weight: 700;
  background: color-mix(in srgb, var(--sheet) 85%, transparent); border: var(--pen-3) dashed var(--action); border-radius: var(--radius);
}
.mc-scenebar { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; gap: 0; overflow-x: auto; background: color-mix(in srgb, var(--sheet-2) 92%, transparent); border-bottom: var(--pen-1) solid var(--line); scrollbar-width: thin; }
.mc-scenebar button { font: inherit; font-size: .8125rem; font-weight: 600; color: var(--ink-2); background: none; border: 0; border-bottom: var(--pen-3) solid transparent; padding: .3rem .8rem .2rem; white-space: nowrap; cursor: pointer; }
.mc-scenebar button:hover { color: var(--ink); }
.mc-scenebar button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--action); }
.mc-scenebar .mc-scene-lockmark { margin-left: .3rem; font-size: .7rem; }

/* ask() dialog */
.mc-dialog { width: min(30rem, calc(100vw - 2rem)); padding: 0; color: var(--ink); background: var(--sheet-2); border: var(--pen-2) solid var(--ink); border-radius: var(--radius); }
.mc-dialog::backdrop { background: color-mix(in srgb, var(--ink) 35%, transparent); }
.mc-dialog-head, .mc-dialog-foot { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; }
.mc-dialog-head { border-bottom: var(--pen-1) solid var(--line); }
.mc-dialog-head .mc-h { margin: 0; }
.mc-dialog-foot { justify-content: flex-end; flex-wrap: wrap; border-top: var(--pen-1) solid var(--line); }
.mc-dialog-text { margin: 0; padding: 1rem; }

/* ---- Status bar ---- */
.mc-status { grid-area: status; display: flex; align-items: center; gap: .9rem; padding: .3rem 1rem; font-size: .8125rem; background: var(--sheet-2); border-top: var(--pen-2) solid var(--ink); min-width: 0; }
.mc-tip { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; max-width: 45%; }
.mc-msg { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.mc-vcb { display: flex; align-items: center; gap: .4rem; margin-left: auto; flex: 0 0 auto; }
.mc-vcb-label { font-weight: 700; white-space: nowrap; }
.mc-vcb-input { width: 10rem; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); padding: .1rem .4rem; font-variant-numeric: tabular-nums; }
.mc-vcb-input:focus { outline: var(--pen-2) solid var(--action); outline-offset: 0; border-color: var(--action); }
.mc-units { width: auto; flex: 0 0 auto; }
.mc-toggle { flex: 0 0 auto; padding: .1rem .5rem; font: inherit; color: var(--ink-2); background: transparent; border: var(--pen-1) solid var(--line); border-radius: var(--radius); text-decoration: line-through; }
.mc-toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); text-decoration: none; font-weight: 600; }
.mc-toggle:hover { border-color: var(--ink); }
/* the value field's keyboard switch (touch): numbers unless pressed; never struck through like an off toggle */
.mc-vcb-kbd { text-decoration: none; color: var(--ink); }
.mc-vcb-kbd[hidden] { display: none; }
/* Settings › ModelCraft (settings.inc lives in the shell's dialog) */
.mc-set-seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .mc { grid-template-columns: 12.5rem minmax(0, 1fr) 15.5rem; }
}
@media (max-width: 760px) {
  body.app-shell .sp-tab { bottom: .75rem; }
  .mc-tools { flex-wrap: nowrap; overflow-x: auto; }
  .mc-menu-list { position: fixed; top: auto; left: 1rem; right: 1rem; min-width: 0; }
  .mc {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 60vh auto auto auto auto;
    grid-template-areas: "tools" "stage" "timeline" "status" "right" "left";
    height: auto;
  }
  .mc-left, .mc-right { border: 0; border-top: var(--pen-2) solid var(--ink); }
  .mc-status { flex-wrap: wrap; gap: .4rem .75rem; }
  .mc-tip { max-width: 100%; flex-basis: 100%; }
  .mc-vcb { margin-left: 0; }
  .mc-vcb-input { width: 8rem; }
  .mc-hint { font-size: .8125rem; top: .5rem; left: .5rem; max-width: calc(100% - 1rem); padding: .5rem .75rem; }
  .mc-hint li:nth-child(n+3) { display: none; }
}
/* view cube (viewcube.js): clear of the scene tabs when they show */
.mc-scenebar:not([hidden]) ~ .cc-vc.at-top-right { top: 2.4rem; }

/* Colors (0.4 M8): swatches are the model's own colours (data), so they carry inline backgrounds; the ring is a token */
.mc-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(1.75rem, 1fr)); gap: .375rem; margin-bottom: .5rem; }
.mc-swatch { width: 100%; aspect-ratio: 1; border: var(--pen-1) solid var(--line); border-radius: var(--radius); padding: 0; cursor: pointer; position: relative; }
.mc-swatch[aria-checked="true"] { outline: var(--pen-3) solid var(--action); outline-offset: 2px; }
.mc-swatch:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 2px; }
.mc-swatch { overflow: hidden; }
.mc-swatch.is-default { background: var(--sheet); }
/* Materials (0.5 RC.7): texture swatches drawn on idle, a small heading per category */
.mc-swatch.is-mat { background-size: cover; background-position: center; image-rendering: auto; }
.mc-matcat { margin: .5rem 0 .25rem; font-size: var(--fs-sm); color: var(--ink-2); }
.mc-matlib .mc-matcat:first-child { margin-top: 0; }
.mc-swatch.is-default::after { content: ''; position: absolute; left: 50%; top: -20%; height: 140%; border-left: var(--pen-1) solid var(--ink-2); transform: rotate(45deg); }
.mc-swatch input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.mc-swatch.is-custom { background: var(--sheet); }
.mc-swatch.is-custom i { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); pointer-events: none; }

/* hidden placements in the outliner (0.4 M17) */
.mc-node.is-hidden .nm { color: var(--ink-2); font-style: italic; }
.mc-hidden-tag { margin-left: auto; color: var(--ink-2); }

/* touch (0.4 S.8): bigger targets; a small bar of Done / Cancel / Undo over the bottom of the view */
.mc.is-touch .mc-tool { min-height: 2.75rem; min-width: 2.75rem; }
.mc.is-touch .mc-swatch { min-height: 2.25rem; }
.mc-touchbar { position: absolute; left: 50%; bottom: .75rem; transform: translateX(-50%); display: flex; gap: .25rem; padding: .25rem; background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); z-index: 3; }
.mc-touchbar[hidden] { display: none; }

/* ---- Check for 3D printing (0.5 SG.4) ---- */
.mc-print p, .mc-print ul { margin: 0 0 .6rem; }
.mc-print ul { padding-left: 1.1rem; }
.mc-print-verdict { font-weight: 700; }
.mc-print-verdict[data-print-ok="1"] { color: var(--layer-green); }
.mc-print-verdict[data-print-ok="0"], .mc-print-problems { color: var(--layer-red); }
.mc-print-facts { color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* print prep (0.6 LC.21): each row = what is wrong · why it matters · what to do; the parts with problems */
.mc-prep-h { margin: .7rem 0 .3rem; font-size: .875rem; font-weight: 700; }
.mc-print ul.mc-print-problems, .mc-print ul.mc-print-warnings { color: var(--ink); }
.mc-prep-row { margin-bottom: .45rem; }
.mc-prep-row > span { display: block; }
.mc-prep-what { font-weight: 600; }
.mc-print-problems .mc-prep-what { color: var(--layer-red); }
.mc-prep-why, .mc-prep-todo { color: var(--ink-2); }
.mc-prep-todo::before { content: "\2713\00a0"; color: var(--layer-green); }
.mc-prep-parts li { margin-bottom: .2rem; }
/* the guided first model (0.6 LC.21): a card where the Start modeling card was */
.mc-hint-guide { margin: .6rem 0 0; }
.mc-hint-guide button { pointer-events: auto; }
.mc-guide {
  position: absolute; z-index: 2; top: 1rem; left: 1rem; width: min(24rem, calc(100% - 2rem));
  padding: .75rem 1rem; font-size: .875rem; background: var(--sheet-2);
  border: var(--pen-2) solid var(--ink); border-radius: var(--radius);
}
.mc-guide-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.mc-guide-step { margin: 0; color: var(--ink-2); font-size: .8125rem; }
.mc-guide-h { margin: .2rem 0 .4rem; font-size: 1rem; font-weight: 700; font-stretch: 112%; }
.mc-guide p { margin: 0 0 .5rem; }
.mc-guide-list { margin: 0 0 .6rem; padding-left: 1.2rem; color: var(--ink-2); font-size: .8125rem; }
.mc-guide-list .is-done { text-decoration: line-through; }
.mc-guide-list .is-now { color: var(--ink); font-weight: 700; }
/* 3D-print tools card (0.7 LC.21, print-ui.js): the guide's card, with a few fields */
.mc-ptool { max-height: calc(100% - 2rem); overflow: auto; }
.mc-ptool-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; margin: 0 0 .5rem; padding: 0; border: 0; }
.mc-ptool-row legend { float: left; margin: 0 .25rem 0 0; padding: 0; font-size: inherit; }
.mc-ptool-num input { width: 5rem; }
.mc-ptool-list { margin: 0 0 .5rem; padding-left: 1.2rem; }
.mc-ptool .mc-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.mc-prep-tools { display: flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: baseline; }
/* Lights (0.5 RC.11 (d)) */
.mc-lights-add { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .5rem; }
.mc-lights li { display: flex; align-items: center; gap: .35rem; }
.mc-lights li.is-sel .mc-linkbtn { font-weight: 700; }
.mc-light-presets { display: flex; flex-wrap: wrap; gap: .25rem; }

/* ---- MonzDraw WebXR (xr.js) ---- */
.mz-xr-bar { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 5; }
.mz-xr-bar[hidden], .mz-xr-btn[hidden], .mz-xr-overlay[hidden], .mz-xr-hint[hidden] { display: none; }
.mz-xr-btn { font: inherit; font-weight: 600; padding: 10px 16px; min-height: 44px; border-radius: 8px; border: 0; cursor: pointer;
  background: #0f766e; color: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.mz-xr-btn:hover { background: #115e59; }
.mz-xr-btn:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; }
.mz-xr-overlay { position: fixed; z-index: 2147483000; inset: auto 0 0 0; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mz-xr-overlay-row { display: flex; gap: 10px; }
.mz-xr-hint { background: rgb(0 0 0 / .6); color: #fff; padding: 8px 12px; border-radius: 8px; }
.mz-xr-overlay-row { flex-wrap: wrap; justify-content: center; }
.mz-xr-btn-sm { padding: 8px 12px; min-height: 44px; font-size: 14px; background: rgb(15 23 42 / .85); }
.mz-xr-btn.is-on { background: #0f766e; outline: 2px solid #5eead4; }
.mz-xr-overlay-row[hidden] { display: none; }
.mz-xr-type { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 12px; font-size: 16px; border-radius: 10px; border: 1px solid rgb(94 234 212 / .6); background: rgb(15 23 42 / .85); color: #f8fafc; }

/* ---- MonzDraw BIM / IFC in Entity info (bim.js) ---- */
.mc-bim-h { font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.mc-bim .mc-row .mc-input { flex: 1 1 auto; min-width: 0; }
.mc-flash { outline: 3px solid var(--action); outline-offset: 2px; }

/* ---- MonzDraw workspace modes (workspace.js): Model | BIM | Drafting ---- */
.mz-ws { display: inline-flex; margin-left: auto; margin-right: .75rem; border: var(--pen-1) solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mz-ws button { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .8125rem; font-weight: 600; color: var(--ink-2); background: transparent; border: 0; border-right: var(--pen-1) solid var(--line); padding: .25rem .7rem; cursor: pointer; }
.mz-ws button:last-child { border-right: 0; }
.mz-ws button:hover { color: var(--ink); background: var(--sheet); }
.mz-ws button[aria-pressed="true"] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 -3px 0 var(--action); }
.mz-ws button:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: -2px; }
.mz-bim, .mz-draft { display: none; }

/* BIM: the schedule under the 3D view */
.mc[data-ws="bim"] {
  grid-template-rows: auto minmax(8rem, 1fr) minmax(12rem, 44%) auto;
  grid-template-areas: "tools tools tools" "left stage right" "bim bim bim" "status status status";
}
.mc[data-ws="bim"] .mz-bim { display: flex; flex-direction: column; grid-area: bim; min-height: 0; background: var(--sheet-2); border-top: var(--pen-2) solid var(--ink); }
.mz-bim-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .45rem .75rem; border-bottom: var(--pen-1) solid var(--line); }
.mz-bim-head .mc-h { margin: 0 .5rem 0 0; }
.mz-bim-head .mc-select, .mz-bim-head .mc-input { width: auto; min-width: 10rem; }
.mz-bim-n { color: var(--ink-2); font-size: .8125rem; margin-right: auto; }
.mz-bim-body { display: flex; min-height: 0; flex: 1 1 auto; }
.mz-bim-table { flex: 1 1 auto; overflow: auto; min-width: 0; }
.mz-bim-sum { flex: 0 0 22rem; overflow: auto; border-left: var(--pen-1) solid var(--line); padding: .5rem .75rem; }
.mz-table { border-collapse: collapse; width: 100%; font-size: .8125rem; }
.mz-table th { position: sticky; top: 0; z-index: 1; background: var(--sheet-2); text-align: left; font-weight: 700; color: var(--ink-2); padding: .3rem .4rem; border-bottom: var(--pen-1) solid var(--ink); white-space: nowrap; }
.mz-table td { padding: .15rem .4rem; border-bottom: var(--pen-1) solid var(--line); vertical-align: middle; }
.mz-table tr.is-on td { background: var(--sheet); }
.mz-table tr.is-total td { font-weight: 700; border-top: var(--pen-2) solid var(--ink); }
.mz-table .mc-select, .mz-table .mc-input { padding-block: .1rem; min-width: 7rem; }
.mz-table .mz-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mz-c-name { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Drafting: the views over the 3D area */
.mc[data-ws="draft"] .mz-draft { display: grid; grid-template-columns: 16rem minmax(0, 1fr); grid-row: 2; grid-column: 1 / -1; z-index: 5; min-height: 0; background: var(--sheet-2); }
.mc[data-ws="draft"] .mc-tool-group:not(:has([data-act="save"], [data-act="undo"])) { display: none; }   /* File and Edit stay (labels are translated) */
.mz-draft-side { overflow-y: auto; padding: .75rem 1rem; border-right: var(--pen-2) solid var(--ink); display: flex; flex-direction: column; gap: .6rem; }
.mz-draft-side .mc-h { margin: .4rem 0 0; }
.mz-views { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.mz-view-btn { width: 100%; text-align: left; font: inherit; font-size: .875rem; color: var(--ink); background: none; border: var(--pen-1) solid transparent; border-radius: var(--radius); padding: .25rem .4rem; cursor: pointer; }
.mz-view-btn:hover { border-color: var(--line); }
.mz-view-btn[aria-current="true"] { border-color: var(--ink); background: var(--sheet); font-weight: 700; }
.mz-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mz-tools .mc-tool { flex: 1 1 0; }
.mz-hint { margin: 0; }
.mz-draft-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.mz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.mz-draft-msg { position: absolute; top: .5rem; right: .75rem; font-size: .8125rem; background: var(--sheet-2); border: var(--pen-1) solid var(--line); border-radius: var(--radius); padding: .2rem .6rem; }
.mz-textin { position: absolute; width: 16rem; z-index: 2; }

@media (max-width: 760px) {
  .mz-ws { margin-right: .25rem; }
  .mz-ws button span { display: none; }
  .mc[data-ws="bim"] { grid-template-rows: auto 45vh auto auto auto auto; grid-template-areas: "tools" "stage" "bim" "status" "right" "left"; }
  .mz-bim-body { flex-direction: column; }
  .mz-bim-sum { flex-basis: auto; border-left: 0; border-top: var(--pen-1) solid var(--line); }
  .mc[data-ws="draft"] .mz-draft { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 60vh; grid-column: 1; }
  .mz-draft-side { border-right: 0; border-bottom: var(--pen-2) solid var(--ink); }
}

/* ---- MonzDraw live render (live-render.js) ---- */
.mz-live { position: absolute; left: 12px; bottom: 68px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mz-live-btn { font: inherit; font-weight: 600; padding: 8px 14px; min-height: 40px; border-radius: 8px; border: 1px solid var(--grid); cursor: pointer;
  background: var(--sheet); color: var(--ink); box-shadow: 0 2px 8px rgb(0 0 0 / .2); }
.mz-live-btn.is-on { background: #b45309; color: #fff; border-color: #b45309; }
.mz-live-btn:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.mz-live-panel { background: var(--sheet); color: var(--ink); border: 1px solid var(--grid); border-radius: 8px; padding: 10px 12px; box-shadow: 0 4px 16px rgb(0 0 0 / .25);
  display: grid; gap: 6px; min-width: 220px; font-size: .85rem; }
.mz-live-panel[hidden] { display: none; }
.mz-live-row { display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: center; gap: 6px; }
.mz-live-row.mc-check { display: flex; }
.mz-live-out { font-variant-numeric: tabular-nums; min-width: 3rem; text-align: right; }

/* ---- MonzDraw AI Render (ai-render-ui.js) ---- */
.mz-ai { position: absolute; right: 12px; bottom: 12px; z-index: 5; }
.mz-ai-btn { font: inherit; font-weight: 600; padding: 8px 14px; min-height: 40px; border-radius: 8px; border: 1px solid #6d28d9; cursor: pointer;
  background: #6d28d9; color: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .2); }
.mz-ai-btn:focus-visible, .mz-ai-go:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.mz-ai-dlg { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--grid); border-radius: 10px;
  background: var(--sheet); color: var(--ink); box-shadow: 0 10px 40px rgb(0 0 0 / .35); }
.mz-ai-dlg::backdrop { background: rgb(0 0 0 / .45); }
.mz-ai-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--grid); }
.mz-ai-head h2 { margin: 0; font-size: 1.05rem; }
.mz-ai-x { font: inherit; font-size: 1.4rem; line-height: 1; width: 36px; height: 36px; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 6px; }
.mz-ai-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; padding: 14px; }
@media (max-width: 760px) { .mz-ai-body { grid-template-columns: 1fr; } }
.mz-ai-pics { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mz-ai-img { width: 100%; max-height: 62vh; object-fit: contain; background: #111; border-radius: 6px; }
.mz-ai-img[hidden] { display: none; }
.mz-ai-picbar { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mz-ai-form { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.mz-ai-lab { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.mz-ai-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.mz-ai-chip { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1px solid var(--grid); border-radius: 999px; cursor: pointer; }
.mz-ai-chip:has(input:checked) { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.mz-ai-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mz-ai-chip:has(input:focus-visible) { outline: 3px solid var(--action); outline-offset: 2px; }
.mz-ai-prompt { font: inherit; font-weight: 400; resize: vertical; padding: 6px 8px; border: 1px solid var(--grid); border-radius: 6px; background: var(--sheet); color: var(--ink); }
.mz-ai-go { font: inherit; font-weight: 700; padding: 10px; border-radius: 8px; border: 0; background: #6d28d9; color: #fff; cursor: pointer; }
.mz-ai-go:disabled { opacity: .6; cursor: progress; }
.mz-ai-bar { width: 100%; }
.mz-ai-bar[hidden] { display: none; }
.mz-ai-status { margin: 0; min-height: 1.4em; }

/* ---- MonzDraw Drafting: 2D drawing tools' layer picker ---- */
.mz-layer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; font-size: .85rem; margin: 4px 0; }

/* ---- MonzDraw Drafting: CAD tools, options, details and sheets (draft-panel.js) ---- */
.mz-toolbox { display: flex; flex-direction: column; gap: .45rem; }
.mz-toolbox[hidden] { display: none; }
.mz-tools { flex-wrap: wrap; }
.mz-tools .mc-tool { flex: 1 1 4.2rem; min-width: 0; }
.mz-opts { display: grid; gap: .3rem; }
.mz-layer { grid-template-columns: 6.5rem minmax(0, 1fr); }
.mz-num { width: 100%; }
.mz-sub { padding-left: 1rem; }
.mz-scale { color: var(--ink-2, #666); font-weight: 400; font-size: .8em; }
.mz-selh { font-weight: 700; }
.mz-vprops[hidden] { display: none; }

/* ---- MonzDraw BIM coordination (coord-panel.js) ---- */
.mz-tabs { display: inline-flex; border: var(--pen-1) solid var(--ink); border-radius: var(--radius); overflow: hidden; margin-right: .5rem; }
.mz-tab { font: inherit; font-size: .875rem; font-weight: 600; padding: .3rem .8rem; border: 0; background: var(--sheet); color: var(--ink); cursor: pointer; }
.mz-tab[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.mz-bim-tools { flex: 1 1 auto; }
.mz-bim-tools[hidden], .mz-bim-body[hidden], .mz-coord[hidden] { display: none; }
.mz-coord { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(18rem, 1.6fr) minmax(16rem, 1fr); gap: 0; min-height: 0; flex: 1 1 auto; }
.mz-coord-col { overflow: auto; padding: .5rem .75rem; border-right: var(--pen-1) solid var(--line); display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.mz-coord-col:last-child { border-right: 0; }
.mz-coord-col .mc-h { margin: .2rem 0 0; }
.mz-coord-list { display: flex; flex-direction: column; gap: .25rem; }
.mz-link { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: .3rem .4rem; font-size: .85rem; padding: .2rem 0; border-bottom: var(--pen-1) solid var(--line); }
.mz-link .mc-select { grid-column: 3; }
.mz-link-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mz-link-name small { font-weight: 400; color: var(--ink-2); }
.mz-swatch { width: 1.6rem; height: 1.6rem; padding: 0; border: 0; background: none; }
.mz-coord-run { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; }
.mz-issue-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1 1 auto; }
.mz-issue { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; width: 100%; text-align: left; font: inherit; font-size: .85rem; color: var(--ink); background: none; border: var(--pen-1) solid transparent; border-bottom-color: var(--line); padding: .3rem .35rem; cursor: pointer; }
.mz-issue:hover { border-color: var(--line); }
.mz-issue[aria-current="true"] { border-color: var(--ink); background: var(--sheet); }
.mz-pri { width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.mz-chips { margin-left: auto; display: inline-flex; gap: .25rem; }
.mz-chip { font-size: .72rem; padding: .05rem .4rem; border-radius: 999px; border: var(--pen-1) solid var(--line); white-space: nowrap; }
.mz-chip.st-open { background: #ffebee; color: #b71c1c; border-color: #ef9a9a; }
.mz-chip.st-progress { background: #fff8e1; color: #8d6e00; border-color: #ffe082; }
.mz-chip.st-closed { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.mz-chip.gone { background: #eceff1; color: #455a64; }
.mz-shot { width: 100%; border-radius: var(--radius); border: var(--pen-1) solid var(--line); }
.mz-els, .mz-hist { margin: 0; padding-left: 1.1rem; font-size: .82rem; }
.mz-els small, .mz-hist small { color: var(--ink-2); }
.mz-coord-detail textarea.mc-input { resize: vertical; font: inherit; }
@media (max-width: 900px) { .mz-coord { grid-template-columns: 1fr; } .mz-coord-col { border-right: 0; border-bottom: var(--pen-1) solid var(--line); } }
.mz-coord.is-drop { outline: 3px dashed var(--action); outline-offset: -6px; }

/* ---- MonzDraw Drafting: the cut hatch standard (draft-panel.js) ---- */
.mz-hatchstd summary { cursor: pointer; font-weight: 600; font-size: .875rem; }
.mz-hatchstd .mc-props { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }

/* ---- MonzDraw Drafting: icon toolbar, command bar, cards (draft-panel.js, draft-icons.js) ---- */
.mz-draft-stage { --mz-glass: color-mix(in srgb, var(--sheet) 88%, transparent); --mz-acc: var(--action, #1565c0); }
.mz-cadbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 6px; align-items: center; max-width: calc(100% - 20px); flex-wrap: wrap; justify-content: center;
  padding: 5px; border-radius: 14px; background: var(--mz-glass); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid color-mix(in srgb, var(--line) 45%, transparent); box-shadow: 0 6px 24px rgb(15 23 42 / .14), 0 1px 2px rgb(15 23 42 / .08); }
.mz-cadbar[hidden], .mz-cmdbar[hidden] { display: none; }
.mz-tb-group { display: flex; gap: 2px; padding: 0 4px; }
.mz-tb-group + .mz-tb-group { border-left: 1px solid color-mix(in srgb, var(--line) 40%, transparent); padding-left: 8px; }
.mz-tb { position: relative; width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer;
  transition: background .12s, color .12s, transform .08s; }
.mz-tb:hover { background: color-mix(in srgb, var(--mz-acc) 12%, transparent); color: var(--mz-acc); }
.mz-tb:active { transform: scale(.94); }
.mz-tb[aria-pressed="true"] { background: var(--mz-acc); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--mz-acc) 45%, transparent); }
.mz-tb:focus-visible { outline: 2px solid var(--mz-acc); outline-offset: 2px; }
.mz-tb-key { position: absolute; right: 2px; bottom: 1px; font: 600 8.5px/1 ui-monospace, monospace; color: currentColor; opacity: .55; background: none; padding: 0; pointer-events: none; }
.mz-tb[aria-pressed="true"] .mz-tb-key { opacity: .85; }
.mz-tb::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); white-space: nowrap; pointer-events: none;
  font: 500 12px/1.2 system-ui, sans-serif; color: #fff; background: rgb(17 24 39 / .92); padding: 5px 8px; border-radius: 6px; opacity: 0; transition: opacity .12s, transform .12s; z-index: 4; }
.mz-tb:hover::after, .mz-tb:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; }
.mz-cmdbar { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 10px; border-radius: 12px;
  background: var(--mz-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  box-shadow: 0 4px 18px rgb(15 23 42 / .12); font-size: .82rem; color: var(--ink); }
.mz-cmd-tool { display: inline-flex; align-items: center; gap: 6px; color: var(--mz-acc); white-space: nowrap; }
.mz-cmdbar .mz-hint { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); opacity: .85; }
.mz-cmd-sp { flex: 0 0 4px; }
.mz-chip-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; font: 600 .75rem/1 system-ui, sans-serif; letter-spacing: .02em;
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); background: transparent; color: var(--ink); cursor: pointer; white-space: nowrap; }
.mz-chip-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--mz-acc) 14%, transparent); border-color: var(--mz-acc); color: var(--mz-acc); }
.mz-chip-btn[hidden] { display: none; }
.mz-chip-btn[data-axis="x"] { border-color: #d32f2f; color: #d32f2f; background: rgb(211 47 47 / .08); }
.mz-chip-btn[data-axis="y"] { border-color: #2e7d32; color: #2e7d32; background: rgb(46 125 50 / .08); }
.mz-coords { font: 500 .75rem/1 ui-monospace, monospace; min-width: 12.5rem; text-align: right; opacity: .75; white-space: pre; }
.mz-card { background: var(--sheet); border: 1px solid color-mix(in srgb, var(--line) 40%, transparent); border-radius: 12px; padding: .65rem .75rem; box-shadow: 0 1px 3px rgb(15 23 42 / .06); }
.mz-card-h { display: flex; align-items: center; gap: 6px; margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: var(--mz-acc, var(--ink)); text-transform: uppercase; }
.mz-opt { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); align-items: center; gap: 6px; font-size: .82rem; margin: 0 0 .35rem; }
.mz-opt[hidden], .mz-opts .mc-linkbtn[hidden] { display: none; }
.mz-draft-side .mz-view-btn { border-radius: 8px; padding: .35rem .5rem; }
.mz-draft-side .mz-view-btn[aria-current="true"] { border-color: transparent; background: color-mix(in srgb, var(--action, #1565c0) 14%, var(--sheet)); color: var(--action, #1565c0); }
.mz-draft-stage .mz-draft-msg { top: 62px; }
@media (max-width: 700px) { .mz-coords { display: none; } .mz-cadbar { top: 6px; } .mz-tb { width: 32px; height: 32px; } }
/* the tool rail: a vertical strip on the drawing's left, two columns, so it never covers the middle of the sheet */
.mz-cadbar { top: 10px; left: 10px; transform: none; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px; max-width: none; max-height: calc(100% - 70px); overflow-y: auto; scrollbar-width: none; }
.mz-tb-group { display: grid; grid-template-columns: repeat(2, 36px); gap: 2px; padding: 2px; }
.mz-tb-group + .mz-tb-group { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--line) 40%, transparent); padding: 6px 2px 2px; }
.mz-tb::after { top: 50%; left: calc(100% + 10px); transform: translate(-4px, -50%); }
.mz-tb:hover::after, .mz-tb:focus-visible::after { transform: translate(0, -50%); }
.mz-draft-stage .mz-draft-msg { top: 10px; }
.mz-cadbar { overflow: visible; max-height: none; }

/* ==== MonzDraw modern shell: Model and BIM in the same language as Drafting (icon tools, cards, chips) ==== */
.mc { --mz-acc: var(--action, #1565c0); --mz-soft: color-mix(in srgb, var(--line) 30%, transparent); }
/* the top toolbar: compact icon buttons in rounded groups; each button's name becomes its tooltip */
.mc .mc-tools.shell-tb { gap: 6px; padding: 6px 10px; align-items: center; border-bottom: 1px solid var(--mz-soft); }
.mc .mc-tool-group { position: relative; gap: 0; padding: 3px; border-radius: 12px; border: 1px solid var(--mz-soft); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.mc .mc-tool-group > .mc-tool-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mc .mc-tool-group > .mc-tool-row { gap: 2px; }
.mc .mc-tools .mc-tool { position: relative; width: 36px; min-width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink); box-shadow: none; transition: background .12s, color .12s, transform .08s; }
.mc .mc-tools .mc-tool > i { font-size: 18px; line-height: 1; color: inherit; margin: 0; }
.mc .mc-tools .mc-tool:hover { background: color-mix(in srgb, var(--mz-acc) 12%, transparent); color: var(--mz-acc); }
.mc .mc-tools .mc-tool:active { transform: scale(.94); }
.mc .mc-tools .mc-tool[aria-pressed="true"] { background: var(--mz-acc); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--mz-acc) 45%, transparent); outline: 0; }
.mc .mc-tools .mc-tool:focus-visible { outline: 2px solid var(--mz-acc); outline-offset: 2px; }
.mc .mc-tools .mc-tool > span { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 30; transform: translate(-50%, -4px); white-space: nowrap; pointer-events: none;
  font: 500 12px/1.2 system-ui, sans-serif; color: #fff; background: rgb(17 24 39 / .92); padding: 5px 8px; border-radius: 6px; opacity: 0; transition: opacity .12s, transform .12s; }
.mc .mc-tools .mc-tool:hover > span, .mc .mc-tools .mc-tool:focus-visible > span { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; }
/* the workspace switch: a segmented control */
.mz-ws { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid var(--mz-soft, rgb(122 135 150 / .3)); background: color-mix(in srgb, var(--ink, #17202b) 4%, transparent); }
.mz-ws button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 9px; padding: 5px 12px; font: 600 .82rem/1.1 system-ui, sans-serif; background: transparent; color: inherit; cursor: pointer; }
.mz-ws button:hover { background: color-mix(in srgb, var(--action, #1565c0) 12%, transparent); }
.mz-ws button[aria-pressed="true"] { background: var(--action, #1565c0); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--action, #1565c0) 40%, transparent); }
/* side panels: sections as cards */
.mc .mc-panel { padding: 6px; }
.mc .mc-panel .mc-sec { margin: 0 0 8px; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--mz-soft); background: color-mix(in srgb, var(--sheet) 70%, transparent); }
.mc .mc-panel .mc-h, .mc .mz-draft-side > .mc-h, .mc .mz-coord .mc-h, .mc .mz-bim-sum .mc-h { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mz-acc); }
.mc .mc-input, .mc .mc-select { border-radius: 8px; }
.mc .mc-tree li > *:hover, .mc .mc-list li > *:hover { border-radius: 8px; }
/* the status bar: the same chips as Drafting's command bar */
.mc .mc-status { gap: 8px; padding: 6px 10px; border-top: 1px solid var(--mz-soft); }
.mc .mc-status .mc-vcb { border-radius: 999px; overflow: hidden; border: 1px solid var(--mz-soft); padding-left: 10px; }
.mc .mc-status .mc-vcb-input { border: 0; background: transparent; }
.mc .mc-status .mc-toggle, .mc .mc-status .mc-units { border-radius: 999px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); font-weight: 600; font-size: .78rem; }
.mc .mc-status .mc-toggle[aria-pressed="true"] { background: color-mix(in srgb, var(--mz-acc) 14%, transparent); border-color: var(--mz-acc); color: var(--mz-acc); }
/* floating buttons on the 3D view */
.mz-live-btn, .mz-ai-btn { border-radius: 12px; }
.mz-live-panel { border-radius: 12px; }
/* BIM: the schedule as a clean table */
.mc .mz-bim-head { gap: .5rem .6rem; padding: .5rem .75rem; }
.mc .mz-bim-table { padding: 0 .5rem .5rem; }
.mc .mz-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .82rem; }
.mc .mz-table thead th { position: sticky; top: 0; z-index: 1; background: var(--sheet); font-weight: 700; font-size: .74rem; letter-spacing: .03em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 70%, transparent);
  border-bottom: 1px solid var(--mz-soft); padding: .45rem .5rem; text-align: left; }
.mc .mz-table td { border-bottom: 1px solid color-mix(in srgb, var(--line) 18%, transparent); padding: .3rem .5rem; }
.mc .mz-table tbody tr:hover td { background: color-mix(in srgb, var(--mz-acc) 7%, transparent); }
.mc .mz-table tbody tr:has(input[type="checkbox"]:checked) td { background: color-mix(in srgb, var(--mz-acc) 12%, transparent); }
.mc .mz-bim-sum { border-radius: 12px; margin: 0 .5rem .5rem 0; border: 1px solid var(--mz-soft); }
.mc .mz-coord-col { padding: .6rem .8rem; }
.mc .mz-link { border-radius: 10px; padding: .35rem .4rem; border: 1px solid transparent; border-bottom-color: var(--mz-soft); }
.mc .mz-issue { border-radius: 10px; }
.mc .btn-line.btn-sm-cc { border-radius: 9px; }
/* the side panels hold their absolutely placed bits (a visually hidden legend stretched the page and cut the top bar) */
.mc .mc-panel { position: relative; }
/* without the icon font (it failed to load), the toolbar shows its names instead of empty buttons */
.mz-noicons .mc .mc-tools .mc-tool { width: auto; min-width: 36px; padding: 0 8px; }
.mz-noicons .mc .mc-tools .mc-tool > span { position: static; opacity: 1; transform: none; background: none; color: inherit; padding: 0; font-size: 12px; }
.mz-noicons .mc .mc-tools .mc-tool > i { display: none; }

/* ---- MonzDraw Drafting: the layer manager (draft-panel.js) ---- */
.mz-layer-list { list-style: none; margin: 0 0 .4rem; padding: 0; max-height: 18rem; overflow-y: auto; }
.mz-layer-list li { display: grid; grid-template-columns: 28px 46px minmax(0, 1fr) auto 20px; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 8px; font-size: .8rem; }
.mz-layer-list li:hover { background: color-mix(in srgb, var(--action, #1565c0) 8%, transparent); }
.mz-layer-list li.is-off .mz-layer-name, .mz-layer-list li.is-off small { opacity: .45; }
.mz-layer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, monospace; font-size: .78rem; }
.mz-layer-list small { opacity: .6; font-variant-numeric: tabular-nums; }
.mz-eye { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.mz-eye:hover { background: color-mix(in srgb, var(--action, #1565c0) 14%, transparent); }
.mz-eye[aria-pressed="false"] { opacity: .5; }
.mz-swatch-sel { width: 46px; height: 24px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--line) 50%, transparent); background: var(--sheet); color: var(--sw);
  font: 700 .72rem/1 ui-monospace, monospace; padding: 0 2px; cursor: pointer; box-shadow: inset 4px 0 0 var(--sw); }

/* MonzDraw: VITURE glasses (viture.js) — the button above AI Render, its card, and the stage while the glasses lead */
.mz-vit { position: absolute; right: 12px; bottom: 60px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mc[data-ws="draft"] .mz-vit { display: none; }   /* above the Drafting panel otherwise */
.mz-vit-btn { font: inherit; font-weight: 600; padding: 8px 14px; min-height: 40px; border-radius: 12px; border: 1px solid var(--grid); cursor: pointer;
  background: var(--sheet); color: var(--ink); box-shadow: 0 2px 8px rgb(0 0 0 / .2); }
.mz-vit-btn.is-on { background: #0f766e; border-color: #0f766e; color: #fff; }
.mz-vit-btn:focus-visible, .mz-vit-go:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.mz-vit-card { width: min(300px, calc(100vw - 24px)); padding: 12px 14px; border: 1px solid var(--grid); border-radius: 12px; background: var(--sheet);
  color: var(--ink); box-shadow: 0 8px 28px rgb(0 0 0 / .28); display: flex; flex-direction: column; gap: 8px; }
.mz-vit-card[hidden] { display: none; }
.mz-vit-card h3 { margin: 0; font-size: 1rem; }
.mz-vit-card .mz-ai-lab { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; }
.mz-vit-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.mz-vit-row .mz-ai-lab { flex: 1; min-width: 0; }
.mz-vit-row .mc-input { width: 100%; box-sizing: border-box; }
.mz-vit-status { margin: 0; font-size: .85rem; color: var(--ink-2); }
.mz-vit-help { margin: 0; font-size: .78rem; color: var(--ink-2); line-height: 1.4; }
.mz-vit-go { font: inherit; font-weight: 600; padding: 8px 12px; min-height: 38px; border-radius: 10px; border: 1px solid #0f766e; background: #0f766e; color: #fff; cursor: pointer; }
.mc-stage.mz-vit-full > :not(.mc-canvas) { display: none !important; }

/* MonzDraw: drawing BIM (bim-author.js): the bar of levels and tools above the BIM tabs, and the selected wall's card */
.mz-bim-author { padding: 6px 10px; border-bottom: 1px solid var(--grid); gap: 6px; align-items: center; flex-wrap: wrap; }
.mz-bim-author .mz-tbtn { display: inline-flex; align-items: center; gap: 5px; font: inherit; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--grid); background: var(--sheet); color: var(--ink); cursor: pointer; }
.mz-bim-author .mz-tbtn[aria-pressed="true"] { background: var(--action, #1565c0); border-color: var(--action, #1565c0); color: #fff; }
.mz-bim-opts { gap: 8px; align-items: center; flex-wrap: wrap; }
.mz-fld { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; }
.mz-fld > span { color: var(--ink-2); }
.mz-len { width: 6.5em; }
.mz-bim-card { padding: 8px 10px; overflow: auto; }
.mz-bim-card[hidden] { display: none; }
.mz-bim-card > .mz-row { gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mz-bim-card td .mz-fld > span { display: none; }
.mz-bim-card td { vertical-align: middle; }

/* MonzDraw: the BIM type library (bim-types-ui.js) */
.mz-bim-types { padding: 8px 10px; overflow: auto; }
.mz-bim-types[hidden] { display: none; }
.mz-bim-types > .mz-row { gap: 8px; align-items: center; flex-wrap: wrap; }
.mz-type { border: 1px solid var(--grid); border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: var(--sheet); }
.mz-type > .mz-row { gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.mz-type .mz-table input.mc-input { width: 100%; box-sizing: border-box; }
.mz-paint { display: inline-flex; align-items: center; gap: 4px; }
.mz-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--grid); flex: none; }
.mz-color { width: 34px; height: 24px; padding: 0; border: 1px solid var(--grid); border-radius: 4px; background: none; }
.mz-tpick { max-width: 16em; }

/* MonzDraw: Parts (part-panel.js): SolidCraft over the 3D area, a bar beside it */
.mz-part { display: none; }
.mc[data-ws="part"] .mz-part { display: grid; grid-template-columns: 17rem minmax(0, 1fr); grid-row: 2; grid-column: 1 / -1; z-index: 5; min-height: 0; background: var(--sheet-2); }
.mc[data-ws="part"] .mc-tool-group:not(:has([data-act="save"], [data-act="undo"])) { display: none; }
.mc[data-ws="part"] .mz-vit { display: none; }
.mz-part-side { overflow-y: auto; padding: .75rem 1rem; border-right: var(--pen-2) solid var(--ink); display: flex; flex-direction: column; gap: .6rem; }
.mz-part-side .mz-row { gap: 6px; flex-wrap: wrap; }
.mz-part-main { min-height: 0; display: flex; }
.mz-part-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #1e2227; }
.mz-part-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px; border: 2px dashed var(--grid); border-radius: 12px; cursor: pointer; background: var(--sheet); }
.mz-part-drop .bi { font-size: 1.6rem; color: var(--action, #1565c0); }
.mz-part-drop span { font-size: .78rem; color: var(--ink-2); }
.mz-part-drop.is-over, .mz-part-drop:hover { border-color: var(--action, #1565c0); }
.mz-part-drop:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.mz-part-keep { margin-top: auto; }
@media (max-width: 760px) {
  .mc[data-ws="part"] .mz-part { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 70vh; grid-column: 1; }
  .mz-part-side { border-right: 0; border-bottom: var(--pen-2) solid var(--ink); }
}
.mz-part-check { display: flex; gap: 6px; align-items: flex-start; font-size: .85rem; }
.mz-part-check[hidden] { display: none; }

/* MonzDraw: a Revit file's card (rvt-card.js) */
.mz-rvt { display: flex; flex-direction: column; gap: 8px; max-width: min(720px, 86vw); max-height: 60vh; overflow: auto; }
.mz-rvt-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.mz-rvt-preview { width: 200px; max-width: 100%; height: auto; border: 1px solid var(--grid); border-radius: 6px; background: #fff; }
.mz-rvt-table { border-collapse: collapse; font-size: .85rem; }
.mz-rvt-table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 2px 10px 2px 0; vertical-align: top; white-space: nowrap; }
.mz-rvt-table td { padding: 2px 0; word-break: break-word; }
.mz-rvt-warn { color: #a15c00; background: #fff4e0; padding: 6px 8px; border-radius: 6px; }
.mz-rvt-cmd { display: inline-block; margin: 4px 0 8px; padding: 4px 10px; border-radius: 6px; background: var(--sheet-2, #eee); font-family: ui-monospace, Consolas, monospace; user-select: all; }
/* ---- Animation timeline (0.6 LC.10, timeline.js): a bar under the view; a name column, then the time lanes ---- */
.mc-timeline { grid-area: timeline; --tl-name: 9.5rem; min-width: 0; background: var(--sheet-2); border-top: var(--pen-2) solid var(--ink); font-size: .8125rem; }
.mc-timeline[hidden] { display: none; }
.mc-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .35rem; padding: .25rem .5rem; border-bottom: var(--pen-1) solid var(--line); }
.mc-tl-head .mc-tool { flex-direction: row; gap: .3rem; min-height: 1.9rem; padding: .15rem .45rem; }
.mc-tl-head .mc-select, .mc-tl-head .mc-input { width: auto; min-height: 1.9rem; }
.mc-tl-head .mc-num { width: 4.5rem; }
.mc-tl-time { font-variant-numeric: tabular-nums; min-width: 8.5rem; padding: 0 .35rem; }
.mc-tl-field { display: inline-flex; align-items: center; gap: .3rem; margin: 0; }
.mc-tl-sep { width: var(--pen-1); align-self: stretch; background: var(--line); margin: 0 .2rem; }
.mc-tl-head [data-tl-close] { margin-left: auto; }
.mc-tl-lanes { position: relative; max-height: 9rem; overflow-y: auto; padding-bottom: .25rem; }
.mc-tl-ruler, .mc-tl-row { display: grid; grid-template-columns: var(--tl-name) minmax(0, 1fr); align-items: center; }
.mc-tl-ruler { position: sticky; top: 0; z-index: 2; background: var(--sheet-2); }
.mc-tl-scrubwrap { position: relative; padding: 0 .7rem; }   /* the range thumb (1rem) centres 1.2rem in, as the lanes do */
.mc-tl-scrub { width: 100%; margin: .2rem 0 0; accent-color: var(--action); }
.mc-tl-ticks { position: relative; height: 1rem; margin: 0 .5rem; color: var(--ink-2); font-size: .6875rem; font-variant-numeric: tabular-nums; }
.mc-tl-ticks span { position: absolute; left: calc(var(--k) * 100%); transform: translateX(-50%); }
.mc-tl-row { min-height: 1.6rem; border-top: var(--pen-1) solid var(--grid); }
.mc-tl-row.is-gone .mc-tl-name { color: var(--ink-2); font-style: italic; }
.mc-tl-name { display: flex; align-items: center; gap: .25rem; padding: 0 .5rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mc-tl-name .mc-icon { margin-left: auto; }
.mc-tl-lane { position: relative; height: 1.6rem; margin: 0 1.2rem; cursor: pointer; }
.mc-tl-key { position: absolute; top: 50%; left: calc(var(--k) * 100%); width: .8rem; height: .8rem; padding: 0; transform: translate(-50%, -50%) rotate(45deg);
  background: var(--sheet); border: var(--pen-2) solid var(--ink); border-radius: 1px; cursor: grab; touch-action: none; }
.mc-tl-key.is-hold { background: var(--ink-2); }
.mc-tl-key.is-sel, .mc-tl-key:focus-visible { background: var(--action); border-color: var(--action); outline: var(--pen-2) solid var(--action); outline-offset: 2px; }
.mc-tl-playhead { position: absolute; top: 0; bottom: 0; width: var(--pen-2); background: var(--layer-red); pointer-events: none; z-index: 3;
  left: calc(var(--tl-name) + 1.2rem + (100% - var(--tl-name) - 2.4rem) * var(--tl-at, 0)); }
.is-touch .mc-tl-key { width: 1.1rem; height: 1.1rem; }
@media (max-width: 760px) {
  .mc-timeline { --tl-name: 6rem; }
  .mc-tl-head .mc-tool span { display: none; }
}
/* 0.6.1 FIX-TIMELINE-PHONE: on a phone (app-phone.js) the timeline sits under the view; its controls are one row that scrolls
   sideways and the rows scroll inside a shorter box, so the view keeps most of the screen */
html.cc-phone .mc-tl-head { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
html.cc-phone .mc-tl-head > * { flex: 0 0 auto; }
html.cc-phone .mc-tl-head [data-tl-close] { position: sticky; right: 0; background: var(--sheet-2); }
html.cc-phone .mc-tl-head .mc-tool { min-height: 2.5rem; min-width: 2.5rem; justify-content: center; }
html.cc-phone .mc-tl-time { min-width: 0; }
html.cc-phone .mc-tl-lanes { max-height: 6.5rem; }
html.cc-compact.cc-land .mc-tl-lanes { max-height: 4rem; }

/* ---- Issues (0.6 LC.19, xr-mc.js): placed in VR, each with its picture ---- */
.mc-issues li { grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; }
.mc-issues img, .mc-issue-noimg { display: block; width: 3.5rem; height: 2.625rem; object-fit: cover; border: var(--pen-1) solid var(--line); background: var(--sheet-2); }
.mc-issue-text { display: grid; min-width: 0; }
.mc-issue-text strong, .mc-issue-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-issue-text small { color: var(--ink-2); }
.mc-tools [data-xr-enter][aria-disabled="true"] { color: var(--ink-2); }

/* 0.7 workspaces (workspaces.js) and the Mesh workspace (ws-mesh.js) */
.mc-tool-group[hidden] { display: none; }
.mc-ws-group .mc-tool-row { align-items: center; }
.mc-ws-select { min-width: 7rem; }
.mc-ws-panel { display: flex; flex-direction: column; gap: .5rem; }
.mc-ws-panel .mc-seg { display: flex; gap: .25rem; flex-wrap: wrap; }
.mc-ws-panel .mc-seg [aria-pressed="true"] { background: var(--action); color: var(--on-action); border-color: var(--action); }
.mc-ws-panel .mc-check { display: flex; gap: .4rem; align-items: center; }
.mc-ws-panel .mc-mesh-add { display: flex; flex-wrap: wrap; gap: .3rem; }
.mc-tools [data-cmd]:disabled { opacity: .45; }
/* 0.7 MD.3: the modifier stack (mesh/mod-panel.js) */
.mc-mods { display: flex; flex-direction: column; gap: .5rem; }
.mc-mod { border-top: var(--pen-1) solid var(--line); padding-top: .4rem; display: flex; flex-direction: column; gap: .3rem; }
.mc-mod-head { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.mc-mod-head .mc-mod-name { flex: 1 1 auto; min-width: 6rem; font-weight: 600; }
.mc-mod-head .mc-linkbtn[aria-pressed="false"] { opacity: .45; }
.mc-mod-props { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .3rem .5rem; align-items: center; }
.mc-mod-props .v > * { width: 100%; }
.mc-mod-props .mc-note { grid-column: 1 / -1; margin: 0; }
/* 0.7 MD.5: the UV workspace — the 3D view on the left, the UV editor on the right */
.mc-stage-uv .mc-canvas { width: 50%; }
.mc-uv { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; border-left: var(--pen-2) solid var(--line); background: var(--sheet-2); }
.mc-uv-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.mc-uv-canvas:focus-visible { outline: var(--pen-2) solid var(--action); outline-offset: -2px; }
.mc-stage-uv .cc-vc.at-top-right, .mc-stage-uv .cc-axes.at-top-right { right: calc(50% + .5rem); }
.mc-stage-uv .cc-vc.at-bottom-right, .mc-stage-uv .cc-axes.at-bottom-right { right: calc(50% + .5rem); }
.mc-stage-uv .mc-scenebar { right: 50%; }

/* ---- Workspace layouts (0.7 WS.9, session ws-modelcraft; the shell's engine, workspace-modelcraft.js) ----
   Only what ModelCraft's own controls need in the engine's blocks: the Faces select and the units keep their own width in a bar,
   the browser palette (Scenes, Components, Tags) at the palettes' text size, as the engine does for the panel's own content. */
:is(.ws-view-controls, .tbx-quick, .tbx-info) .mc-select { width: auto; flex: 0 0 auto; }
/* the view's canvases sit between the blocks (the engine sizes a canvas under .ws-fill); the UV workspace's editor takes the right half
   of that same box */
.mc-stage-uv.ws-stage > .mc-canvas.ws-fill { width: calc((100% - var(--ws-sl, 0px) - var(--ws-sr, 0px)) / 2) !important; }
.mc-stage-uv.ws-stage > .mc-uv { top: calc(var(--ws-st, 0px) + var(--ws-vt, 0px)); bottom: calc(var(--ws-sb, 0px) + var(--ws-vb, 0px)); right: var(--ws-sr, 0px); width: calc((100% - var(--ws-sl, 0px) - var(--ws-sr, 0px)) / 2); }
.mc-lay-browser { zoom: .85; }
.ws-status-slot > .mc-status { display: flex; gap: .75rem; }
.ws-status-slot .mc-vcb-input { width: 8rem; font-size: .75rem; }
.ws-palette-scroll > [data-info] { zoom: .85; padding: .5rem .75rem; }
