@import "./button-style.css";

:root { font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif; font-size: 13px; color: #263343; background: #eef1f5; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; border: 1px solid #b9c5d2; background: #f8fafc; padding: 4px 8px; border-radius: var(--ui-button-radius); font: 600 var(--ui-button-font-size)/16px var(--ui-button-font); }
button:hover:not(:disabled) { background: #e4eefb; border-color: #7fa3cd; }
button:focus-visible { outline: 2px solid #397fc2; outline-offset: 1px; }
button:disabled { opacity: .42; cursor: default; }
button[aria-pressed="true"], button[aria-selected="true"] { background: #d9e9fb; border-color: #6f9ed2; color: #164d83; }
.app-title { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; background: #edf2f8; border-bottom: 1px solid #c6d1dd; flex-shrink: 0; }
h1 { font-size: 15px; margin: 0; font-weight: 600; }
.app-title span { color: #6a7989; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-actions button { padding: 2px 6px; font-size: 12px; background: transparent; border-color: transparent; white-space: nowrap; }
.app-title a { color: #366b9e; text-decoration: none; }
.menu { padding: 4px; min-width: 210px; background: #fafbfd; border: 1px solid #a9b7c7; box-shadow: 2px 4px 12px #23344733; border-radius: 3px; }
.menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 24px; border-color: transparent; background: transparent; padding: 6px 10px; text-align: left; white-space: nowrap; }
.menu button span { color: #738396; font-size: 11px; }
.menu hr { margin: 4px 6px; border: 0; border-top: 1px solid #d4dce6; }
.top-tools { display: flex; align-items: center; min-height: 44px; background: #f2f5f9; border-bottom: 1px solid #b7c4d3; gap: 8px; padding: 4px 8px; flex-shrink: 0; flex-wrap: wrap; }
.tool-group { display: flex; gap: 2px; padding-right: 8px; border-right: 1px solid #c7d0dc; }
.top-tools button { display: flex; align-items: center; gap: 4px; background: transparent; border-color: transparent; height: 28px; padding: 2px 6px; }
body:not([data-interaction-mode="direct"]) #selection-append { display: none; }
#selection-append[aria-pressed="true"] { background: #d6e7ff; border-color: #75a4e2; }
.tool-icon { width: 22px; height: 22px; flex-shrink: 0; }
.local-note { margin-left: auto; color: #6b7c8f; font-size: 11px; white-space: nowrap; }
main { --modeling-left-default: 280px; display: grid; grid-template-columns: var(--modeling-left-width, var(--modeling-left-default)) 7px minmax(0, 1fr) 7px var(--modeling-right-width, 224px); flex: 1; min-height: 0; overflow: hidden; }
aside { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #adbccc; background: #f8fafc; }
.dock-title { min-height: 27px; display: flex; align-items: center; gap: 6px; background: #dce5ef; padding: 4px 8px; font-weight: 600; border-bottom: 1px solid #bccad8; flex-shrink: 0; }
.dock-title span { margin-left: auto; font-size: 11px; color: #5e7286; font-weight: 400; }
.tree-dock { height: var(--modeling-project-height, 156px); min-height: 88px; display: flex; flex-direction: column; border-bottom: 1px solid #aebccd; flex-shrink: 0; }
.dock-tabs { display: flex; gap: 2px; background: #eaf0f7; padding: 3px 4px; }
.dock-tabs button { border-radius: 2px; border-color: transparent; padding: 4px 12px; background: transparent; }
[role="tabpanel"] { flex: 1; min-height: 0; overflow: auto; }
#project-tree { padding: 8px 6px; line-height: 25px; }
.tree-root { font-weight: 600; }
.tree-branch { padding-left: 16px; }
#tree-model { display: block; margin-left: 29px; width: calc(100% - 29px); text-align: left; padding: 3px 7px; border: 1px solid transparent; background: transparent; }
#tree-model[aria-selected="true"] { background: #d9e9fb; border-color: #94b6da; }
#tree-empty { margin-left: 33px; color: #8a96a4; font-size: 12px; }
#history-list { list-style: none; margin: 0; padding: 4px; }
#history-list button { display: flex; align-items: center; width: 100%; border-color: transparent; background: transparent; border-radius: 2px; text-align: left; padding: 5px 8px; }
#history-list .history-future { color: #8897a6; }
#history-list small { margin-left: auto; color: #738395; font-size: 11px; }
.property-dock { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.property-content { padding: 7px; overflow: auto; min-height: 0; }
.property-tabs { flex-shrink: 0; }
.property-tabs button { flex: 1; min-width: 0; padding: 4px 6px; white-space: nowrap; }
fieldset { border: 1px solid #ced8e3; margin: 3px 0 9px; padding: 7px; border-radius: 2px; }
legend { color: #3a607f; font-weight: 600; padding: 0 4px; }
label { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin: 7px 0; }
input[type="number"], select { width: 117px; max-width: 100%; border: 1px solid #b6c4d4; padding: 4px 5px; background: #fff; color: #293e53; border-radius: 2px; }
.check { justify-content: flex-start; }
.scope { color: #697d90; font-size: 11px; line-height: 1.65; margin: 6px 0; }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; font-size: 11px; font-variant-numeric: tabular-nums; }
dd { margin: 0; text-align: right; }
.face-panel h2 { font-size: 12px; margin: 9px 0 5px; }
#face-select { width: 100%; }
#face-detail { font-size: 11px; line-height: 1.6; color: #59738b; }
.center-workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.document-tab { height: 28px; background: #f4f7fb; border-bottom: 1px solid #b8c7d8; padding: 5px 13px; color: #3c638b; flex-shrink: 0; }
.document-tab span { margin-left: 12px; font-size: 11px; color: #8695a5; }
#viewport { position: relative; min-height: 0; flex: 1; min-width: 0; overflow: hidden; background: linear-gradient(#b3c7e0, #edede5); }
#viewport canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#model-info { position: absolute; left: 10px; bottom: 9px; font-size: 11px; color: #526b81; pointer-events: none; }
#viewport-context { position: absolute; z-index: 8; }
#snap-marker { position: absolute; width: 12px; height: 12px; border: 2px solid #cf8513; transform: translate(-50%, -50%); pointer-events: none; z-index: 3; background: #ffcd6640; }
#snap-marker[data-type] { border-radius: 50%; }
#snap-marker[data-type="vertex"] { border-color: #00cc00; background: #00cc0040; }
#snap-marker[data-type="midpoint"] { border-color: #cc0000; background: #cc000040; }
#snap-marker[data-type="grid"] { border-color: #0000cc; background: #0000cc40; }
#snap-marker[data-type="edge"] { border-color: #cccc00; background: #cccc0040; box-shadow: 0 0 0 1px #6b701866; }
#snap-info { position: absolute; bottom: 30px; left: 10px; padding: 4px 7px; background: #ffffffe0; color: #815512; border: 1px solid #d9c390; pointer-events: none; z-index: 3; font-size: 11px; }
#viewport[data-mouse-tool]:not([data-mouse-tool="navigate"]) canvas { cursor: crosshair; }
.message-dock { height: var(--modeling-message-height, 101px); min-height: 74px; border-top: 1px solid #aabbce; background: #fafbfd; display: flex; flex-direction: column; flex-shrink: 0; }
.message-dock .dock-title button { font-weight: normal; font-size: 11px; padding: 0 6px; background: transparent; border-color: transparent; }
.message-dock .dock-title button:first-of-type { margin-left: auto; }
#message-log { list-style: none; margin: 0; padding: 3px 10px; overflow: auto; flex: 1; font-size: 11px; color: #6a7e91; }
#message-log li { padding: 2px 0; }
#message-log [data-error="true"], #status[data-error="true"] { color: #b63434; }
#status { margin: 0; padding: 4px 10px; min-height: 24px; font-size: 12px; color: #315f86; background: #f2f6fa; border-top: 1px solid #e0e7ee; }
#source-retention { margin: 0; padding: 4px 10px; font-size: 12px; color: #315f86; overflow-wrap: anywhere; }
.right-tools { display: flex; flex-direction: column; gap: 6px; border-left: 1px solid #b4c2d2; padding: 6px; background: #f3f6fa; min-height: 0; min-width: 0; overflow: hidden; }
.right-tools button { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 3px; border-color: transparent; padding: 4px 2px; min-height: 28px; font-size: 11px; line-height: 16px; white-space: nowrap; background: transparent; }
.right-tools button .tool-icon { width: 24px; height: 24px; }
.tool-caption { grid-column: 1 / -1; flex: 0 0 auto; color: #8697a8; font-size: 10px; text-align: center; padding: 3px 0; border-bottom: 1px solid #d0d9e3; }
.statusbar { display: flex; gap: 10px; align-items: center; padding: 3px 7px; background: #eef3f9; border-top: 1px solid #b5c5d7; min-height: 32px; flex-shrink: 0; flex-wrap: wrap; }
#mouse-hint { flex: 1; min-width: 220px; margin: 0; color: #3d6285; font-size: 11px; }
.snap-options { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.snap-options label { margin: 0; gap: 2px; font-size: 11px; white-space: nowrap; }
#cancel-mouse { padding: 3px 8px; font-size: 11px; }
dialog { border: 1px solid #9fb0c4; border-radius: 5px; width: 370px; max-width: calc(100vw - 30px); padding: 18px; background: #fafbfd; color: #2c4258; box-shadow: 0 10px 45px #24374c55; }
dialog::backdrop { background: #33465c55; }
dialog h2 { margin: 0 0 14px; font-size: 16px; }
dialog p { font-size: 12px; line-height: 1.7; }
#height-error { color: #b63434; min-height: 18px; margin: 6px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
dialog button { height: var(--ui-button-height); padding: 0 var(--ui-button-padding); }
#height-confirm { background: #3f78ad; border-color: #3f78ad; color: #fff; min-width: 70px; }
@media (max-width: 1000px) { .local-note { display: none; } .top-tools { gap: 3px; } .top-tools button { font-size: 11px; } main { --modeling-left-default: 255px; } }
@media (max-width: 680px) { .header-actions { flex-wrap: wrap; } }
@media (max-width: 700px) {
  body { height: auto; overflow: auto; }
  main { display: flex; flex-direction: column; overflow: visible; }
  .right-tools { order: 0; border-left: 0; border-bottom: 1px solid #b4c2d2; max-height: 42dvh; flex-shrink: 0; }
  .right-tools button { min-width: 34px; }
  .tool-caption { display: none; }
  .center-workspace { order: 1; }
  #viewport { flex: none; height: 55dvh; }
  aside { order: 2; border-right: 0; }
  .property-content { overflow: visible; }
  .tree-dock { height: 160px; }
  .modeling-resizer { display: none; }
  .statusbar { flex-direction: column; align-items: flex-start; }
  #mouse-hint { min-width: 0; }
  .top-tools { padding: 4px; }
}

.selection-properties { padding: 8px; border-bottom: 1px solid #c7d2df; }
.selection-properties h2 { margin: 0 0 8px; font-size: 12px; }
#selection-properties { display: grid; grid-template-columns: 90px 1fr; gap: 5px; font-size: 11px; margin: 0; }
#selection-properties dt { color: #53657a; }
#selection-properties dd { margin: 0; overflow-wrap: anywhere; }

#project-tree [data-object-id] { display: block; width: calc(100% - 25px); margin-left: 25px; text-align: left; }
#selection-rectangle { position: absolute; z-index: 8; pointer-events: none; border: 1px solid #2873d2; background: #2873d225; }
#selection-rectangle[data-crossing="true"] { border: 1px dashed #168548; background: #16854825; }
#transform-dialog fieldset { margin-top: 10px; }
#transform-error { color: #b22; }
#object-appearance { margin-top: 10px; }

#axis-indicator { position: absolute; right: 12px; bottom: 12px; width: 120px; height: 120px; pointer-events: none; z-index: 4; }
#advanced-dialog { width: 430px; max-height: 90dvh; overflow: auto; }
#sweep-path { width: 100%; box-sizing: border-box; font: 12px Consolas, monospace; resize: vertical; }
#advanced-error { color: #b22; min-height: 18px; }
#bevel-edges { width: 117px; }
#edit-feature { margin-bottom: 8px; }

#modeling-startup { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: #e8eff6cc; }
#modeling-startup[hidden] { display: none; }
.startup-card { width: min(360px, calc(100% - 40px)); box-sizing: border-box; padding: 22px; border: 1px solid #a9bfd5; border-radius: 6px; background: #f8fbff; box-shadow: 0 5px 24px #395c7b26; }
.startup-card strong { display: block; font-size: 15px; color: #234865; }
.startup-card progress { display: block; width: 100%; height: 14px; margin: 16px 0 12px; accent-color: #367bbb; }
.startup-card p { margin: 0; line-height: 1.6; font-size: 12px; color: #4d6275; }
.startup-card button { margin-top: 14px; }

#construction-dialog { width: 440px; max-height: 90dvh; overflow: auto; }
#parametric-part-dialog { width: 430px; max-height: 85dvh; overflow: auto; }
#parametric-part-form > label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
#parametric-part-form input { width: 150px; max-width: 45%; }
#parametric-part-error { color: #b22; min-height: 18px; }
#feature-graph-dialog { width: 480px; max-height: 85dvh; overflow: auto; }
#feature-graph-form fieldset { margin: 12px 0; border: 1px solid #bfd0df; }
#feature-graph-form fieldset label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
#feature-graph-concentric-row[hidden],#feature-graph-wall-row[hidden],#feature-graph-diameter-row[hidden] { display: none; }
#feature-graph-form legend label { display: inline-flex; justify-content: flex-start; }
#feature-graph-form input:not([type="checkbox"]),#feature-graph-form select { width: 150px; max-width: 45%; }
#feature-graph-error { color: #b22; min-height: 18px; }
#construction-inputs label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
#construction-inputs input:not([type="checkbox"]), #construction-inputs select { width: 180px; }
#construction-inputs textarea { min-height: 95px; width: 220px; font: inherit; }
#construction-inputs label:has(textarea) { flex-direction: column; align-items: stretch; }
#construction-inputs label:has(textarea) textarea { width: 100%; }
#construction-error { color: #b53329; }
#construction-result { display: block; white-space: pre-wrap; margin: 12px 0; }

/* Keep dock controls compact without changing their data or numeric precision. */
.modeling-resizer { background: #dce5ef; touch-action: none; flex-shrink: 0; }
#modeling-sidebar-resizer { cursor: col-resize; border-inline: 1px solid #b8c7d8; }
#modeling-right-resizer { cursor: col-resize; border-inline: 1px solid #b8c7d8; }
#modeling-dock-resizer, #modeling-message-resizer { height: 7px; cursor: row-resize; border-block: 1px solid #b8c7d8; }
.modeling-resizer:hover, .modeling-resizer:focus-visible, .modeling-resizer.is-dragging { background: #7fa8cf; outline: none; }
body[data-modeling-resize] { user-select: none; }
body[data-modeling-resize="width"], body[data-modeling-resize="width"] * { cursor: col-resize !important; }
body[data-modeling-resize="height"], body[data-modeling-resize="height"] * { cursor: row-resize !important; }
.property-content { padding: 5px; }
.property-content fieldset { padding: 4px 5px 5px; margin: 3px 0 5px; min-width: 0; }
.property-content label { margin: 3px 0; gap: 4px; min-width: 0; }
.property-content input, .property-content select { min-width: 0; max-width: 100%; padding: 2px 4px; min-height: 24px; }
.property-content button { padding: 3px 6px; min-height: 24px; }
.property-content .scope { margin: 3px 0; line-height: 1.45; }
.selection-properties { padding: 3px 3px 5px; }
.selection-properties h2, #model-form h2, #construction-properties h2 { font-size: 12px; margin: 4px 0; }
#selection-properties { grid-template-columns: 80px minmax(0, 1fr); gap: 2px 6px; line-height: 15px; }
#object-appearance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; margin-top: 5px; }
#object-appearance label { margin: 0; }
#object-appearance label:first-of-type, #object-appearance .check, #apply-object-properties { grid-column: 1 / -1; }
#object-name { flex: 1; width: 100%; }
#object-color { width: 36px; height: 24px; padding: 1px; }
#object-opacity { width: 52px; }
#model-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
#model-form fieldset > label { margin: 0; }
#model-form input[type="number"] { width: 64px; }
#model-form label:has(select), #model-form .check, #model-form label:has([name="angle"]), #model-form fieldset > .scope, #model-form fieldset > button, #hole-fields { grid-column: 1 / -1; }
#model-form label:has([name="angle"]) input, #hole-fields input[type="number"] { width: 117px; }
#model-form .scope { font-size: 11px; }
@media (max-width: 700px) { .modeling-resizer { display: none; } }

#modeling-sidebar { container-type: inline-size; container-name: modeling-sidebar; }
@container modeling-sidebar (max-width: 260px) {
  #model-form fieldset { grid-template-columns: minmax(0, 1fr); }
  #model-form input[type="number"] { width: 117px; }
}

@media (max-width: 700px) {
  .app-title { height: auto; min-height: 32px; flex-wrap: wrap; gap: 4px 8px; padding: 4px 8px; }
  .header-actions { gap: 6px; }
  .tool-group { flex-wrap: wrap; max-width: 100%; }
}

#parameter-inputs label { display: grid; grid-template-columns: minmax(0, 1fr) 100px; align-items: center; }
#parameter-inputs input, #parameter-inputs select { width: 100%; box-sizing: border-box; }
#parameter-inputs .check { display: flex; }
#parameter-inputs input[type="checkbox"] { width: auto; }
#parameter-inputs label:has(textarea), #parameter-inputs label:has(select), #parameter-inputs label:has(input[type="text"]) { grid-template-columns: minmax(0, 1fr); }
#parameter-inputs textarea { width: 100%; min-width: 0; height: 70px; box-sizing: border-box; resize: vertical; }
#parameter-error { color: #b42318; font-size: 12px; overflow-wrap: anywhere; margin: 3px 0; }
#parameter-error:empty { display: none; }

#feature-properties h2, #array-properties h2 { font-size: 12px; margin: 4px 0; }
.geometry-node { min-width: 0; border-left: 1px solid #b5c9df; padding-left: 4px; margin: 4px 0; }
.geometry-node summary { cursor: pointer; font-weight: 600; font-size: 12px; overflow-wrap: anywhere; }
.geometry-fields label, #array-inputs label { display: grid; grid-template-columns: minmax(0, 1fr) 90px; }
.geometry-fields input, .geometry-fields select, #array-inputs input { width: 100%; box-sizing: border-box; }
.geometry-fields .check { display: flex; }
.geometry-fields input[type="checkbox"] { width: auto; }
.geometry-fields label:has(textarea), .geometry-fields label:has(select), .geometry-fields label:has(input[type="text"]), #array-inputs label:has(input[type="text"]) { grid-template-columns: minmax(0, 1fr); }
.geometry-fields textarea { width: 100%; min-width: 0; height: 70px; box-sizing: border-box; resize: vertical; }
#feature-parameter-error, #array-error { color: #b42318; font-size: 12px; overflow-wrap: anywhere; margin: 3px 0; }
#feature-parameter-error:empty, #array-error:empty { display: none; }

.user-dialog { color: #e2eaf3; }
.user-dialog button { color: #e2eaf3; background: #1686bb; }
.user-dialog input { color: #e2eaf3; background: #101923; border: 1px solid #8b9ead; }
.user-dialog-heading { margin-bottom: 12px; }
.user-dialog .dialog-actions { margin-top: 12px; }
#cloud-project-status { font-size: 12px; padding: 0 8px; }
#cloud-project-dialog { width: min(700px,calc(100vw - 32px)); max-height: 80vh; border: 1px solid #a4b6c9; border-radius: 8px; }
.cloud-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cloud-project-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0; border-bottom: 1px solid #d1dbe5; }
.cloud-project-row span { flex: 1; min-width: 160px; }
.cloud-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
#cloud-account-transition { position: fixed; inset: 0; background: #eef1f5; z-index: 10000; display: grid; place-items: center; }

/* SMLib command adapters; workspace layout and view styling follow FasCAD Web. */

#sketch-dialog { width: 700px; }
.sketch-header { display:flex;justify-content:space-between;align-items:center;gap:12px; }
.sketch-header span { font-size:11px;color:#697d90; }
.sketch-content { display:grid;grid-template-columns:minmax(0,400px) minmax(0,190px);gap:20px;margin-top:15px; }
.sketch-content label { display:block; }
#profile-preview { width:100%;height:320px;background:#f5f8fc;border:1px solid #ced8e3;cursor:crosshair; }
#profile-points { width:100%;font:12px/1.6 Consolas,monospace; }
.sketch-buttons { display:flex;gap:4px;flex-wrap:wrap; }
.dialog-footer { display:flex;justify-content:flex-end;gap:8px;margin-top:14px; }
.hint { font-size:11px;color:#697d90;line-height:1.6; }
#profile-error { color:#b63434; }
#construction-inputs button { margin:8px 0; }
#construction-properties input { min-width:0; }
#parameter-inputs input { width:100px; }
#name-input { width:100%;padding:6px;border:1px solid #b6c4d4; }
#toast { position:fixed;bottom:40px;left:50%;transform:translateX(-50%);padding:10px;background:#fafbfd;border:1px solid #9fb0c4;z-index:50; }
@media(max-width:700px){.sketch-content{grid-template-columns:minmax(0,1fr);}#profile-preview{height:240px;}}

.view-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:3px; padding:4px 6px; border-bottom:1px solid #b8c7d8; background:#f2f5f9; flex-shrink:0; }
.view-toolbar button { padding:3px 6px; font-size:12px; white-space:nowrap; }
.view-divider { width:1px; height:20px; background:#c7d0dc; margin:0 3px; }
@media(max-width:700px){.view-toolbar{gap:2px;padding:3px;}.view-toolbar button{padding:3px 5px;}.view-divider{display:none;}}

#feature-command-dialog { width:520px; max-height:85vh; overflow:auto; }
#feature-command-inputs label:has(textarea) { display:block; }
#feature-command-inputs textarea { width:100%; resize:vertical; font:12px/1.5 Consolas,monospace; }
#feature-command-inputs input:not([type="checkbox"]) { width:170px; max-width:55%; }
#feature-command-error { color:#b42318; }

#modeling-command-search { width:100%; min-width:0; flex-shrink:0; background:white; padding:6px; font-size:12px; }
.right-tools button[hidden], .right-tools .tool-caption[hidden] { display:none; }
#geometry-report-dialog { width:600px; max-height:85vh; overflow:auto; }
#geometry-report-body > div { display:grid; grid-template-columns:minmax(150px, 40%) minmax(0, 1fr); gap:12px; padding:7px 0; border-bottom:1px solid #e0e5ec; }
#geometry-report-body dt { color:#43566b; }
#geometry-report-body dd { margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
#geometry-report-body dl { margin:0; }
#geometry-report-body dl dt { font-size:11px; }
@media(max-width:700px){#geometry-report-body > div{grid-template-columns:minmax(120px,40%) minmax(0,1fr);}}
.right-tools [data-feature-command] { min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:15px; }
.tool-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; flex-shrink:0; padding-bottom:6px; border-bottom:1px solid #c6d1dd; }
.right-tools .tool-tabs button { justify-content:center; font-size:11px; min-width:0; white-space:normal; line-height:15px; border:1px solid #d4dde7; border-radius:3px; padding:5px 2px; }
.right-tools .tool-tabs button[aria-selected="true"] { background:#d9e9fb; border-color:#6f9ed2; color:#164d83; }
.tool-tab-content { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.tool-group-panel { overflow:visible; }
.tool-group-panel .tool-caption { display:block; color:#536b82; font-size:12px; text-align:left; margin-bottom:6px; padding:3px 2px 6px; }
.tool-commands { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:4px; padding:2px; }
.right-tools .tool-commands button { min-width:0; white-space:normal; overflow-wrap:anywhere; min-height:36px; border:1px solid #dbe3ed; border-radius:3px; }
.tool-search-status { flex-shrink:0; margin:0; color:#536b82; font-size:11px; }
@media(max-width:700px){.tool-tabs{grid-template-columns:repeat(4,minmax(0,1fr));}.tool-commands{grid-template-columns:repeat(3,minmax(0,1fr));}.tool-tab-content{flex:0 1 auto;}}

/* The modeling page owns its language independently of the viewer. */
.modeling-language { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.modeling-language select { width: auto; max-width: 96px; min-height: 24px; font-size: 12px; }
html[lang="en"] .right-tools button { white-space: normal; overflow-wrap: anywhere; height: auto; }
html[lang="en"] .tool-tabs [role="tab"] { min-height: 34px; }
html[lang="en"] .top-tools { flex-wrap: wrap; }

.tool-more-options { grid-column:1 / -1; min-width:0; border-top:1px solid #d0d9e3; margin-top:4px; padding-top:6px; }
.tool-more-options summary { cursor:pointer; padding:6px 2px; color:#43566b; font-size:12px; }
.tool-more-commands { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding-top:4px; }
#direct-workspace { border-top: 1px solid #aabbce; background: #f6f9fc; flex-shrink: 0; padding: 6px 10px; }
#direct-workspace[hidden],#direct-mouse-panel[hidden] { display: none; }
#direct-command-form { display: flex; align-items: center; gap: 8px; }
#direct-command-input { flex: 1; min-width: 90px; font-family: ui-monospace, Consolas, monospace; }
#direct-command-feedback { margin: 3px 0 0; font-size: 12px; color: #375672; }
#direct-command-feedback[data-error="true"] { color: #b22; }
#direct-mouse-panel { max-height: 34vh; overflow: auto; border-bottom: 1px solid #cbd6e2; margin-bottom: 6px; padding-bottom: 6px; }
#direct-mouse-panel .dock-title { display: flex; align-items: center; justify-content: space-between; }
#direct-panel-content form > label,#direct-panel-content fieldset label,#direct-panel-content > label { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
#direct-panel-content fieldset { margin: 6px 0; }
#direct-panel-content input:not([type="checkbox"]),#direct-panel-content select { max-width: 160px; }
#direct-panel-content textarea { max-width: min(100%,420px); }
#direct-panel-content .mouse-step { min-width: 24px; padding: 1px 4px; }
#direct-panel-content .mouse-pick { padding: 2px 5px; }
.mouse-step,.mouse-pick { display: none; }
#direct-panel-content .mouse-step,#direct-panel-content .mouse-pick { display: inline-block; }
.interaction-mode-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.interaction-mode-label select { font-size: 12px; max-width: 160px; }
@media (max-width: 680px) { .app-title { height: auto; min-height: 32px; flex-wrap: wrap; padding: 4px 8px; } .header-actions { flex-wrap: wrap; } #direct-command-form { flex-wrap: wrap; } #direct-command-input { flex-basis: 100%; } }
.document-tab { height: 28px; background: #f4f7fb; border-bottom: 1px solid #b8c7d8; padding: 5px 13px; color: #3c638b; flex-shrink: 0; }
.document-tab span { margin-left: 12px; font-size: 11px; color: #8695a5; }
#viewport { position: relative; min-height: 0; flex: 1; min-width: 0; overflow: hidden; background: linear-gradient(#b3c7e0, #edede5); }
#viewport canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#model-info { position: absolute; left: 10px; bottom: 9px; font-size: 11px; color: #526b81; pointer-events: none; }
#viewport-context { position: absolute; z-index: 8; }
#snap-marker { position: absolute; width: 12px; height: 12px; border: 2px solid #cf8513; transform: translate(-50%, -50%); pointer-events: none; z-index: 3; background: #ffcd6640; }
#snap-marker[data-type] { border-radius: 50%; }
#snap-marker[data-type="vertex"] { border-color: #00cc00; background: #00cc0040; }
#snap-marker[data-type="midpoint"] { border-color: #cc0000; background: #cc000040; }
#snap-marker[data-type="grid"] { border-color: #0000cc; background: #0000cc40; }
#snap-marker[data-type="edge"] { border-color: #cccc00; background: #cccc0040; box-shadow: 0 0 0 1px #6b701866; }
#snap-info { position: absolute; bottom: 30px; left: 10px; padding: 4px 7px; background: #ffffffe0; color: #815512; border: 1px solid #d9c390; pointer-events: none; z-index: 3; font-size: 11px; }
#viewport[data-mouse-tool]:not([data-mouse-tool="navigate"]) canvas { cursor: crosshair; }
.message-dock { height: var(--modeling-message-height, 101px); min-height: 74px; border-top: 1px solid #aabbce; background: #fafbfd; display: flex; flex-direction: column; flex-shrink: 0; }
.message-dock .dock-title button { font-weight: normal; font-size: 11px; padding: 0 6px; background: transparent; border-color: transparent; }
.message-dock .dock-title button:first-of-type { margin-left: auto; }
#message-log { list-style: none; margin: 0; padding: 3px 10px; overflow: auto; flex: 1; font-size: 11px; color: #6a7e91; }
#message-log li { padding: 2px 0; }
#message-log [data-error="true"], #status[data-error="true"] { color: #b63434; }
#status { margin: 0; padding: 4px 10px; min-height: 24px; font-size: 12px; color: #315f86; background: #f2f6fa; border-top: 1px solid #e0e7ee; }
#source-retention { margin: 0; padding: 4px 10px; font-size: 12px; color: #315f86; overflow-wrap: anywhere; }
.right-tools { display: flex; flex-direction: column; gap: 6px; border-left: 1px solid #b4c2d2; padding: 6px; background: #f3f6fa; min-height: 0; min-width: 0; overflow: hidden; }
.right-tools button { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 3px; border-color: transparent; padding: 4px 2px; min-height: 28px; font-size: 11px; line-height: 16px; white-space: nowrap; background: transparent; }
.right-tools button .tool-icon { width: 24px; height: 24px; }
.tool-caption { grid-column: 1 / -1; flex: 0 0 auto; color: #8697a8; font-size: 10px; text-align: center; padding: 3px 0; border-bottom: 1px solid #d0d9e3; }
.statusbar { display: flex; gap: 10px; align-items: center; padding: 3px 7px; background: #eef3f9; border-top: 1px solid #b5c5d7; min-height: 32px; flex-shrink: 0; flex-wrap: wrap; }
#mouse-hint { flex: 1; min-width: 220px; margin: 0; color: #3d6285; font-size: 11px; }
.snap-options { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.snap-options label { margin: 0; gap: 2px; font-size: 11px; white-space: nowrap; }
#cancel-mouse { padding: 3px 8px; font-size: 11px; }
dialog { border: 1px solid #9fb0c4; border-radius: 5px; width: 370px; max-width: calc(100vw - 30px); padding: 18px; background: #fafbfd; color: #2c4258; box-shadow: 0 10px 45px #24374c55; }
dialog::backdrop { background: #33465c55; }
dialog h2 { margin: 0 0 14px; font-size: 16px; }
dialog p { font-size: 12px; line-height: 1.7; }
#height-error { color: #b63434; min-height: 18px; margin: 6px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
dialog button { height: var(--ui-button-height); padding: 0 var(--ui-button-padding); }
#height-confirm { background: #3f78ad; border-color: #3f78ad; color: #fff; min-width: 70px; }
@media (max-width: 1000px) { .local-note { display: none; } .top-tools { gap: 3px; } .top-tools button { font-size: 11px; } main { --modeling-left-default: 255px; } }
@media (max-width: 680px) { .header-actions { flex-wrap: wrap; } }
@media (max-width: 700px) {
  body { height: auto; overflow: auto; }
  main { display: flex; flex-direction: column; overflow: visible; }
  .right-tools { order: 0; border-left: 0; border-bottom: 1px solid #b4c2d2; max-height: 42dvh; flex-shrink: 0; }
  .right-tools button { min-width: 34px; }
  .tool-caption { display: none; }
  .center-workspace { order: 1; }
  #viewport { flex: none; height: 55dvh; }
  aside { order: 2; border-right: 0; }
  .property-content { overflow: visible; }
  .tree-dock { height: 160px; }
  .modeling-resizer { display: none; }
  .statusbar { flex-direction: column; align-items: flex-start; }
  #mouse-hint { min-width: 0; }
  .top-tools { padding: 4px; }
}

.selection-properties { padding: 8px; border-bottom: 1px solid #c7d2df; }
.selection-properties h2 { margin: 0 0 8px; font-size: 12px; }
#selection-properties { display: grid; grid-template-columns: 90px 1fr; gap: 5px; font-size: 11px; margin: 0; }
#selection-properties dt { color: #53657a; }
#selection-properties dd { margin: 0; overflow-wrap: anywhere; }

#project-tree [data-object-id] { display: block; width: calc(100% - 25px); margin-left: 25px; text-align: left; }
#selection-rectangle { position: absolute; z-index: 8; pointer-events: none; border: 1px solid #2873d2; background: #2873d225; }
#selection-rectangle[data-crossing="true"] { border: 1px dashed #168548; background: #16854825; }
#transform-dialog fieldset { margin-top: 10px; }
#transform-error { color: #b22; }
#object-appearance { margin-top: 10px; }

#axis-indicator { position: absolute; right: 12px; bottom: 12px; width: 120px; height: 120px; pointer-events: none; z-index: 4; }
#advanced-dialog { width: 430px; max-height: 90dvh; overflow: auto; }
#sweep-path { width: 100%; box-sizing: border-box; font: 12px Consolas, monospace; resize: vertical; }
#advanced-error { color: #b22; min-height: 18px; }
#bevel-edges { width: 117px; }
#edit-feature { margin-bottom: 8px; }

#modeling-startup { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: #e8eff6cc; }
#modeling-startup[hidden] { display: none; }
.startup-card { width: min(360px, calc(100% - 40px)); box-sizing: border-box; padding: 22px; border: 1px solid #a9bfd5; border-radius: 6px; background: #f8fbff; box-shadow: 0 5px 24px #395c7b26; }
.startup-card strong { display: block; font-size: 15px; color: #234865; }
.startup-card progress { display: block; width: 100%; height: 14px; margin: 16px 0 12px; accent-color: #367bbb; }
.startup-card p { margin: 0; line-height: 1.6; font-size: 12px; color: #4d6275; }
.startup-card button { margin-top: 14px; }

#construction-dialog { width: 440px; max-height: 90dvh; overflow: auto; }
#parametric-part-dialog { width: 430px; max-height: 85dvh; overflow: auto; }
#parametric-part-form > label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
#parametric-part-form input { width: 150px; max-width: 45%; }
#parametric-part-error { color: #b22; min-height: 18px; }
#feature-graph-dialog { width: 480px; max-height: 85dvh; overflow: auto; }
#feature-graph-form fieldset { margin: 12px 0; border: 1px solid #bfd0df; }
#feature-graph-form fieldset label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
#feature-graph-concentric-row[hidden],#feature-graph-wall-row[hidden],#feature-graph-diameter-row[hidden] { display: none; }
#feature-graph-form legend label { display: inline-flex; justify-content: flex-start; }
#feature-graph-form input:not([type="checkbox"]),#feature-graph-form select { width: 150px; max-width: 45%; }
#feature-graph-error { color: #b22; min-height: 18px; }
#construction-inputs label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
#construction-inputs input:not([type="checkbox"]), #construction-inputs select { width: 180px; }
#construction-inputs textarea { min-height: 95px; width: 220px; font: inherit; }
#construction-inputs label:has(textarea) { flex-direction: column; align-items: stretch; }
#construction-inputs label:has(textarea) textarea { width: 100%; }
#construction-error { color: #b53329; }
#construction-result { display: block; white-space: pre-wrap; margin: 12px 0; }

/* Keep dock controls compact without changing their data or numeric precision. */
.modeling-resizer { background: #dce5ef; touch-action: none; flex-shrink: 0; }
#modeling-sidebar-resizer { cursor: col-resize; border-inline: 1px solid #b8c7d8; }
#modeling-right-resizer { cursor: col-resize; border-inline: 1px solid #b8c7d8; }
#modeling-dock-resizer, #modeling-message-resizer { height: 7px; cursor: row-resize; border-block: 1px solid #b8c7d8; }
.modeling-resizer:hover, .modeling-resizer:focus-visible, .modeling-resizer.is-dragging { background: #7fa8cf; outline: none; }
body[data-modeling-resize] { user-select: none; }
body[data-modeling-resize="width"], body[data-modeling-resize="width"] * { cursor: col-resize !important; }
body[data-modeling-resize="height"], body[data-modeling-resize="height"] * { cursor: row-resize !important; }
.property-content { padding: 5px; }
.property-content fieldset { padding: 4px 5px 5px; margin: 3px 0 5px; min-width: 0; }
.property-content label { margin: 3px 0; gap: 4px; min-width: 0; }
.property-content input, .property-content select { min-width: 0; max-width: 100%; padding: 2px 4px; min-height: 24px; }
.property-content button { padding: 3px 6px; min-height: 24px; }
.property-content .scope { margin: 3px 0; line-height: 1.45; }
.selection-properties { padding: 3px 3px 5px; }
.selection-properties h2, #model-form h2, #construction-properties h2 { font-size: 12px; margin: 4px 0; }
#selection-properties { grid-template-columns: 80px minmax(0, 1fr); gap: 2px 6px; line-height: 15px; }
#object-appearance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; margin-top: 5px; }
#object-appearance label { margin: 0; }
#object-appearance label:first-of-type, #object-appearance .check, #apply-object-properties { grid-column: 1 / -1; }
#object-name { flex: 1; width: 100%; }
#object-color { width: 36px; height: 24px; padding: 1px; }
#object-opacity { width: 52px; }
#model-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
#model-form fieldset > label { margin: 0; }
#model-form input[type="number"] { width: 64px; }
#model-form label:has(select), #model-form .check, #model-form label:has([name="angle"]), #model-form fieldset > .scope, #model-form fieldset > button, #hole-fields { grid-column: 1 / -1; }
#model-form label:has([name="angle"]) input, #hole-fields input[type="number"] { width: 117px; }
#model-form .scope { font-size: 11px; }
@media (max-width: 700px) { .modeling-resizer { display: none; } }

#modeling-sidebar { container-type: inline-size; container-name: modeling-sidebar; }
@container modeling-sidebar (max-width: 260px) {
  #model-form fieldset { grid-template-columns: minmax(0, 1fr); }
  #model-form input[type="number"] { width: 117px; }
}

@media (max-width: 700px) {
  .app-title { height: auto; min-height: 32px; flex-wrap: wrap; gap: 4px 8px; padding: 4px 8px; }
  .header-actions { gap: 6px; }
  .tool-group { flex-wrap: wrap; max-width: 100%; }
}

#parameter-inputs label { display: grid; grid-template-columns: minmax(0, 1fr) 100px; align-items: center; }
#parameter-inputs input, #parameter-inputs select { width: 100%; box-sizing: border-box; }
#parameter-inputs .check { display: flex; }
#parameter-inputs input[type="checkbox"] { width: auto; }
#parameter-inputs label:has(textarea), #parameter-inputs label:has(select), #parameter-inputs label:has(input[type="text"]) { grid-template-columns: minmax(0, 1fr); }
#parameter-inputs textarea { width: 100%; min-width: 0; height: 70px; box-sizing: border-box; resize: vertical; }
#parameter-error { color: #b42318; font-size: 12px; overflow-wrap: anywhere; margin: 3px 0; }
#parameter-error:empty { display: none; }

#feature-properties h2, #array-properties h2 { font-size: 12px; margin: 4px 0; }
.geometry-node { min-width: 0; border-left: 1px solid #b5c9df; padding-left: 4px; margin: 4px 0; }
.geometry-node summary { cursor: pointer; font-weight: 600; font-size: 12px; overflow-wrap: anywhere; }
.geometry-fields label, #array-inputs label { display: grid; grid-template-columns: minmax(0, 1fr) 90px; }
.geometry-fields input, .geometry-fields select, #array-inputs input { width: 100%; box-sizing: border-box; }
.geometry-fields .check { display: flex; }
.geometry-fields input[type="checkbox"] { width: auto; }
.geometry-fields label:has(textarea), .geometry-fields label:has(select), .geometry-fields label:has(input[type="text"]), #array-inputs label:has(input[type="text"]) { grid-template-columns: minmax(0, 1fr); }
.geometry-fields textarea { width: 100%; min-width: 0; height: 70px; box-sizing: border-box; resize: vertical; }
#feature-parameter-error, #array-error { color: #b42318; font-size: 12px; overflow-wrap: anywhere; margin: 3px 0; }
#feature-parameter-error:empty, #array-error:empty { display: none; }

.user-dialog { color: #e2eaf3; }
.user-dialog button { color: #e2eaf3; background: #1686bb; }
.user-dialog input { color: #e2eaf3; background: #101923; border: 1px solid #8b9ead; }
.user-dialog-heading { margin-bottom: 12px; }
.user-dialog .dialog-actions { margin-top: 12px; }
#cloud-project-status { font-size: 12px; padding: 0 8px; }
#cloud-project-dialog { width: min(700px,calc(100vw - 32px)); max-height: 80vh; border: 1px solid #a4b6c9; border-radius: 8px; }
.cloud-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cloud-project-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0; border-bottom: 1px solid #d1dbe5; }
.cloud-project-row span { flex: 1; min-width: 160px; }
.cloud-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
#cloud-account-transition { position: fixed; inset: 0; background: #eef1f5; z-index: 10000; display: grid; place-items: center; }

/* SMLib command adapters; workspace layout and view styling follow FasCAD Web. */

#sketch-dialog { width: 700px; }
.sketch-header { display:flex;justify-content:space-between;align-items:center;gap:12px; }
.sketch-header span { font-size:11px;color:#697d90; }
.sketch-content { display:grid;grid-template-columns:minmax(0,400px) minmax(0,190px);gap:20px;margin-top:15px; }
.sketch-content label { display:block; }
#profile-preview { width:100%;height:320px;background:#f5f8fc;border:1px solid #ced8e3;cursor:crosshair; }
#profile-points { width:100%;font:12px/1.6 Consolas,monospace; }
.sketch-buttons { display:flex;gap:4px;flex-wrap:wrap; }
.dialog-footer { display:flex;justify-content:flex-end;gap:8px;margin-top:14px; }
.hint { font-size:11px;color:#697d90;line-height:1.6; }
#profile-error { color:#b63434; }
#construction-inputs button { margin:8px 0; }
#construction-properties input { min-width:0; }
#parameter-inputs input { width:100px; }
#name-input { width:100%;padding:6px;border:1px solid #b6c4d4; }
#toast { position:fixed;bottom:40px;left:50%;transform:translateX(-50%);padding:10px;background:#fafbfd;border:1px solid #9fb0c4;z-index:50; }
@media(max-width:700px){.sketch-content{grid-template-columns:minmax(0,1fr);}#profile-preview{height:240px;}}

.view-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:3px; padding:4px 6px; border-bottom:1px solid #b8c7d8; background:#f2f5f9; flex-shrink:0; }
.view-toolbar button { padding:3px 6px; font-size:12px; white-space:nowrap; }
.view-divider { width:1px; height:20px; background:#c7d0dc; margin:0 3px; }
@media(max-width:700px){.view-toolbar{gap:2px;padding:3px;}.view-toolbar button{padding:3px 5px;}.view-divider{display:none;}}

#feature-command-dialog { width:520px; max-height:85vh; overflow:auto; }
#feature-command-inputs label:has(textarea) { display:block; }
#feature-command-inputs textarea { width:100%; resize:vertical; font:12px/1.5 Consolas,monospace; }
#feature-command-inputs input:not([type="checkbox"]) { width:170px; max-width:55%; }
#feature-command-error { color:#b42318; }

#modeling-command-search { width:100%; min-width:0; flex-shrink:0; background:white; padding:6px; font-size:12px; }
.right-tools button[hidden], .right-tools .tool-caption[hidden] { display:none; }
#geometry-report-dialog { width:600px; max-height:85vh; overflow:auto; }
#geometry-report-body > div { display:grid; grid-template-columns:minmax(150px, 40%) minmax(0, 1fr); gap:12px; padding:7px 0; border-bottom:1px solid #e0e5ec; }
#geometry-report-body dt { color:#43566b; }
#geometry-report-body dd { margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
#geometry-report-body dl { margin:0; }
#geometry-report-body dl dt { font-size:11px; }
@media(max-width:700px){#geometry-report-body > div{grid-template-columns:minmax(120px,40%) minmax(0,1fr);}}
.right-tools [data-feature-command] { min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:15px; }
.tool-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; flex-shrink:0; padding-bottom:6px; border-bottom:1px solid #c6d1dd; }
.right-tools .tool-tabs button { justify-content:center; font-size:11px; min-width:0; white-space:normal; line-height:15px; border:1px solid #d4dde7; border-radius:3px; padding:5px 2px; }
.right-tools .tool-tabs button[aria-selected="true"] { background:#d9e9fb; border-color:#6f9ed2; color:#164d83; }
.tool-tab-content { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.tool-group-panel { overflow:visible; }
.tool-group-panel .tool-caption { display:block; color:#536b82; font-size:12px; text-align:left; margin-bottom:6px; padding:3px 2px 6px; }
.tool-commands { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:4px; padding:2px; }
.right-tools .tool-commands button { min-width:0; white-space:normal; overflow-wrap:anywhere; min-height:36px; border:1px solid #dbe3ed; border-radius:3px; }
.tool-search-status { flex-shrink:0; margin:0; color:#536b82; font-size:11px; }
@media(max-width:700px){.tool-tabs{grid-template-columns:repeat(4,minmax(0,1fr));}.tool-commands{grid-template-columns:repeat(3,minmax(0,1fr));}.tool-tab-content{flex:0 1 auto;}}

/* The modeling page owns its language independently of the viewer. */
.modeling-language { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.modeling-language select { width: auto; max-width: 96px; min-height: 24px; font-size: 12px; }
html[lang="en"] .right-tools button { white-space: normal; overflow-wrap: anywhere; height: auto; }
html[lang="en"] .tool-tabs [role="tab"] { min-height: 34px; }
html[lang="en"] .top-tools { flex-wrap: wrap; }

.tool-more-options { grid-column:1 / -1; min-width:0; border-top:1px solid #d0d9e3; margin-top:4px; padding-top:6px; }
.tool-more-options summary { cursor:pointer; padding:6px 2px; color:#43566b; font-size:12px; }
.tool-more-commands { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding-top:4px; }

.tree-assembly-row { color: #48617b; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }