/* SPDX-License-Identifier: Apache-2.0 */
/* PanSteel modifications, 2026-11-04. Palette copied from Pan BIM globals.css;
   the application keeps its existing modeling controls and panel layout. */
:root[data-space="paper"], :root:not([data-space]) {
  color-scheme: light;
  --background: #ffffff; --foreground: #1e1e1e;
  --card: #ffffff; --secondary: #f7f7f7; --muted-foreground: #606060;
  --primary: #07c160; --primary-foreground: #ffffff;
  --accent: #e8f7ed; --border: #dedede; --ribbon: #f5f5f5;
  --sheet: var(--background); --sheet-2: var(--card);
  --ink: var(--foreground); --ink-2: var(--muted-foreground);
  --grid: var(--border); --line: var(--border);
  --action: var(--primary); --on-action: var(--primary-foreground);
  --layer: var(--primary); --layer-blue: var(--primary); --layer-violet: var(--primary);
}
:root[data-space="model"] {
  color-scheme: dark;
  --background: #222933; --foreground: #d9d9d9;
  --card: #2c3440; --secondary: #3b4453; --muted-foreground: #b0b0b0;
  --primary: #07c160; --primary-foreground: #081a10;
  --accent: #46566a; --border: #546174; --ribbon: #3b4453;
  --sheet: var(--background); --sheet-2: var(--card);
  --ink: var(--foreground); --ink-2: var(--muted-foreground);
  --grid: var(--border); --line: var(--border);
  --action: var(--primary); --on-action: var(--primary-foreground);
  --layer: var(--primary); --layer-blue: var(--primary); --layer-violet: var(--primary);
}
:root { --font: 'Inter Variable', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif; --radius: 6px; --pen-2: 1px; --pen-3: 2px; }
html { font-size: 16px; }
body.app-shell { font-family: var(--font); background: var(--background); color: var(--foreground); }
.app-bar { background: var(--card); border-color: var(--border); min-height: 44px; padding: 5px 12px; gap: 10px; }
.pansteel-logo { flex: 0 0 28px; object-fit: contain; }
.app-bar-name { gap: 8px; font-size: 17px; letter-spacing: .01em; }
.app-bar-area { color: var(--muted-foreground); border: 0; font-size: 12px; font-weight: 400; }
.app-bar .app-bar-btn, .app-bar .app-bar-fs { border: 1px solid transparent; border-radius: var(--radius); font-size: 12px; }
.app-bar .app-bar-btn:hover, .app-bar .app-bar-fs:hover { background: var(--accent); border-color: var(--border); }
.dc-tools { background: var(--ribbon); border-color: var(--border); }
.dc-tool-group { border-color: var(--border); }
.dc-tool { border-radius: 4px; }
.dc-tool:hover, .dc-tool[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--primary); }
.dc-left, .dc-right, .dc-reports { background: var(--card); border-color: var(--border); }
/* Docking applies shell borders after the app panel styles. Use the Steel theme for every panel edge. */
body.app-shell main.shell-panels-managed > aside[data-shell-dock],
body.app-shell > main > aside.shell-float { border-color: var(--border); }
html.cc-phone body.app-shell > main > aside.shell-sheet { border-color: var(--border) !important; }
.shell-pintabs[data-shell-dock] .shell-pintab {
  writing-mode: horizontal-tb; flex-direction: row; gap: 6px;
  min-height: 30px; padding: 4px 8px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--card); color: var(--ink);
}
.shell-pintabs[data-shell-dock] .shell-pintab:is(:hover, [aria-expanded="true"]) {
  border-color: var(--primary); background: var(--accent);
}
.dc-panel-h, .dc-section > summary { background: var(--card); border-color: var(--border); }
.dc-input, .dc-select { background: var(--secondary); border-color: var(--border); border-radius: 4px; }
.dc-input:focus, .dc-select:focus { border-color: var(--primary); outline: 1px solid var(--primary); }
.dc-rep-tabs button, .dc-viewbar button { border-radius: 4px 4px 0 0; }
.space-toggle { border-color: var(--border); border-radius: var(--radius); overflow: hidden; }
.space-toggle button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); }
dialog { color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px #0003; }
dialog::backdrop { background: #0006; }
#pansteel-about dt:has(+ dd[data-about-version]),
#pansteel-about dd[data-about-version],
#pansteel-about > p:not([data-about-status]) { display: none; }
@media (max-width: 760px) { .app-bar-area { display: none; } .app-bar { gap: 6px; } }

/* PanSteel professional workspace — ribbon, model browser, property palette. */
.ps-icon { width:24px;height:24px;flex-shrink:0;color:#387cab; }
.ps-icon-column,.ps-icon-brace { color:#248a66; }
.ps-icon-plate,.ps-icon-baseplate,.ps-icon-endplate,.ps-icon-gusset { color:#ab7b33; }
:root[data-space="model"] .ps-icon { color:#80b6df; }
:root[data-space="model"] :is(.ps-icon-column,.ps-icon-brace) { color:#7ac8a4; }
:root[data-space="model"] :is(.ps-icon-plate,.ps-icon-baseplate,.ps-icon-endplate,.ps-icon-gusset) { color:#d3b276; }
body.ws-on { --ws-chrome:var(--ribbon);--ws-panel-bg:var(--card);--ws-line:var(--border);--ws-blue:var(--primary); }
.ws-titlebar { height:42px;min-height:42px;background:var(--card);padding:0 14px;gap:14px; }
.ws-brand { font-size:15px;font-weight:650;gap:8px; }
.ws-brand .pansteel-logo { width:24px;height:24px; }
.ws-project { color:var(--muted-foreground);font-size:12px; }
.ws-quick .ws-tool { padding:5px;width:30px;height:30px;border-radius:4px; }
.ws-quick .ps-icon,.ws-shell-btn .ps-icon { width:18px;height:18px; }
.ws-ribbon { border-bottom:1px solid var(--border);background:var(--ribbon); }
.ws-ribbon-tabs { background:var(--card);padding-left:10px; }
.ws-ribbon-tabs > .ps-ai-open { flex:none; padding-inline:12px; white-space:nowrap; }
.ws-view-top:has(> .shell-pintabs[data-shell-dock="right"]) { flex-direction:row; }
.ws-view-top > .ws-drawing-tabs { flex:1;min-width:0; }
.ws-view-top > .shell-pintabs[data-shell-dock="right"] {
  position:static;flex-direction:row;align-items:center;padding-inline:4px;
  background:var(--ribbon);border-bottom:1px solid var(--border);
}
.ws-view-top > .shell-pintabs .shell-pintab { min-height:0;height:calc(1.8125rem - 5px); }
.ws-ribbon-tab { min-width:70px;font-size:13px;padding:7px 16px!important; }
.ws-ribbon-tab[aria-selected="true"] { background:var(--ribbon);color:var(--primary);box-shadow:inset 0 -2px var(--primary); }
.ws-ribbon-box { padding:4px 10px 0; }
.ws-group { height:88px;border-color:var(--border);padding-inline:9px; }
.ws-group-title { font-size:11px;color:var(--muted-foreground);font-weight:400; }
.ws-ribbon .ws-tool { min-width:56px;height:64px;padding:6px 9px;gap:6px;border:0;border-radius:4px;background:transparent; }
.ws-ribbon .ws-tool .ps-icon { width:30px;height:30px; }
.ws-ribbon .ws-tool span { font-size:12px;font-weight:500; }
.ws-stack .ws-tool,.ws-ribbon .ws-tool.ws-compact { height:25px;min-width:86px;padding:3px 7px;gap:7px; }
.ws-stack .ws-tool .ps-icon,.ws-tool.ws-compact .ps-icon { width:19px;height:19px; }
.ws-ribbon .ws-tool[aria-disabled="true"] { opacity:.4; }
.ws-ribbon .ws-tool[aria-pressed="true"] { box-shadow:inset 0 0 0 1px var(--primary);background:var(--accent); }
.ps-header-actions { display:flex;align-items:center;gap:6px;margin-left:8px; }
.ps-header-icon,.ps-ai-open,.ps-ai-connect { display:inline-flex;align-items:center;gap:6px;font-size:12px;border:0;background:transparent;color:var(--ink);padding:5px 8px;border-radius:4px;cursor:pointer; }
.ps-header-icon .ps-icon,.ps-ai-open .ps-icon { width:18px;height:18px; }
.ps-ai-open { background:var(--accent); }
body.ws-on .dc { grid-template-rows:auto minmax(0,1fr) 34px auto; }
body.ws-on .dc.ps-report-open { grid-template-rows:auto minmax(0,1fr) minmax(210px,31vh) auto; }
.dc-reports { overflow:hidden;border-top:1px solid var(--border); }
.dc-tabs { min-height:34px;height:34px;gap:4px;align-items:center;padding:0 8px;background:var(--card);border-bottom:1px solid var(--border); }
.dc-tab { font-size:12px;padding:8px 12px;font-weight:500;white-space:nowrap; }
.ps-secondary-report { display:none!important; }
.ps-report-more { max-width:130px;font:12px var(--font);color:var(--ink-2);background:transparent;border:0;cursor:pointer; }
.ps-report-toggle { margin-left:auto;flex-shrink:0;border:0;background:transparent;color:var(--ink-2);font:12px var(--font);cursor:pointer;padding:6px 10px; }
.dc:not(.ps-report-open) [data-report] { visibility:hidden; }
.dc-rep { height:calc(100% - 34px);overflow:auto;padding:12px 16px; }
.ws-browser-hint { display:none; }
.dc-left,.dc-right { border-color:var(--border); }
:root { --ps-panel-header-height:32px; }
.ws-palette-heading,.shell-grip { min-height:var(--ps-panel-header-height)!important;font-size:12px!important;background:var(--ribbon)!important;border-color:var(--border)!important; }
.ws-palettes,.ws-palette-scroll { background:var(--card); }
.ws-lower-tabs { gap:12px; }
.ws-lower-tabs button { padding:6px 3px;font-size:12px; }
.ps-tree-search { width:calc(100% - 8px);margin:8px 4px 12px;padding:7px 9px;background:var(--secondary);color:var(--ink);font:12px var(--font);border:1px solid var(--border);border-radius:5px; }
.dc-ws-browser { padding:0 8px 8px; }
.dc-ws-br>summary { padding:8px 4px;font-size:12px;font-weight:600; }
.dc-ws-br-sub h3 { color:var(--ink-2);font-size:11px;font-weight:500;padding-left:12px; }
.dc-ws-br-item { font-size:12px;padding:5px 8px 5px 20px;border:0;line-height:1.45; }
.dc-ws-br-item[aria-current="true"] { background:var(--accent);color:var(--ink);font-weight:500;border:0; }
.dc-right .dc-sec { padding:12px; }
.dc-right .dc-h { font-size:13px; }
.dc-right { font-size:12px;line-height:1.5; }
.dc-right :is(input,select,textarea,button) { font-family:inherit;font-size:inherit;line-height:inherit; }
.dc-right :is(h3,h4) { font-size:13px;font-weight:600;line-height:1.4;margin:12px 0 6px; }
.dc-right summary { font-size:12px;font-weight:600;line-height:1.5; }
.dc-right p { font-size:12px;line-height:1.5; }
.dc-right .dc-props { font-size:12px;gap:9px 10px; }
.dc-right .dc-props .k { font-weight:400; }
.dc-left .dc-sec { padding:12px; }
.ps-explanation { margin:6px 0;color:var(--muted-foreground);font-size:11px; }
.ps-explanation>summary { cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:5px; }
.ps-explanation>summary:before { content:'ⓘ';font-size:12px; }
.ps-explanation[open] { border-left:2px solid var(--border);padding:4px 8px; }
.ps-explanation .dc-note,.ps-explanation .fa-aid,.ps-explanation .fa-note { font-size:12px;line-height:1.65;margin:6px 0;border:0;background:transparent;padding:0; }
.ws-statusbar { font-size:11px;min-height:24px;background:var(--card);border-top:1px solid var(--border); }
.ws-statusbar [data-ws-status-text] { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.dc-hint { box-shadow:none;background:transparent;border:0;text-align:center; }
.ps-empty-title { font-size:24px;font-weight:600;letter-spacing:.02em; }
.ps-empty-actions { display:flex;justify-content:center;gap:12px;margin-top:18px; }
.ps-start { display:flex;align-items:center;gap:8px;border:1px solid var(--border);background:var(--card);color:var(--ink);border-radius:6px;padding:12px;font:13px var(--font);cursor:pointer; }
.ps-start:hover { border-color:var(--primary); }
@media(max-width:760px){.ps-empty-actions{flex-direction:column}.dc{grid-template-rows:auto 62vh auto auto auto auto}.dc-reports{min-height:34px}.ps-header-actions{margin-left:auto}.ps-report-more{max-width:100px}}
.ps-ai-connect .ps-icon{width:17px;height:17px}.ps-api-dialog{width:430px;max-width:calc(100vw - 32px);padding:24px;font:13px var(--font)}
.ps-api-dialog h2{font-size:18px;margin:0 0 20px}.ps-api-dialog form>label{display:flex;flex-direction:column;gap:7px;margin:15px 0;color:var(--ink-2)}
.ps-api-dialog input,.ps-api-dialog select{width:100%;padding:9px 10px;background:var(--secondary);color:var(--ink);border:1px solid var(--border);border-radius:5px;font:13px var(--font)}
.ps-api-status{font-size:12px;min-height:20px;color:var(--ink-2)}.ps-api-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.ps-api-actions button{padding:8px 14px;border:1px solid var(--border);background:var(--card);color:var(--ink);border-radius:4px;cursor:pointer}
.ps-api-actions button[type=submit]{background:var(--primary);color:var(--primary-foreground);border-color:var(--primary)}
.cct-ask{font-family:var(--font);border-color:var(--border);background:var(--card)}
.ws-ribbon-tabs button[role=tab]{min-width:70px;font-size:13px;padding:7px 16px!important}
.ws-ribbon-tabs button[role=tab][aria-selected=true]{background:var(--ribbon);color:var(--primary);border:0;box-shadow:inset 0 -2px var(--primary)}
.ws-stage>.dc-hint{z-index:3;pointer-events:auto;top:45%;left:50%;transform:translate(-50%,-50%);max-width:calc(100% - 40px);width:max-content}
.dc-ws-br-item{display:flex;align-items:center;gap:7px}.dc-ws-br-item .ps-icon{width:15px;height:15px;flex-shrink:0}
.ws-tear .ps-icon,.ws-drawing-tab .ps-icon,.ws-view-controls .ps-icon{display:inline-block;width:15px;height:15px;vertical-align:middle}
:root .ccp-mark .ps-icon,:root .ccp-ico .ps-icon{display:block;width:15px;height:15px;color:inherit}
.ws-shell-btn i{display:flex}.ws-shell-btn i:before,.ws-tear i:before{display:none}
.ps-features-open{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:0;border-radius:4px;background:transparent;color:var(--ink);font:12px var(--font);cursor:pointer;white-space:nowrap}
.ps-features-open .ps-icon{width:17px;height:17px}
.ps-features{width:840px;max-width:calc(100vw - 32px);max-height:85vh;padding:20px;font:13px var(--font)}
.ps-features>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.ps-features h2{font-size:18px;margin:0}
.ps-features>header button{border:1px solid var(--border);background:var(--card);color:var(--ink);padding:5px 10px;border-radius:4px;cursor:pointer}
.ps-features>input{width:100%;padding:10px 12px;background:var(--secondary);border:1px solid var(--border);border-radius:5px;color:var(--ink);font:13px var(--font)}
.ps-features-body{max-height:calc(85vh - 130px);overflow:auto}.ps-features-body h3{font-size:12px;color:var(--ink-2);font-weight:600;margin:20px 0 8px}
.ps-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.ps-feature-grid>button{display:flex;align-items:center;gap:9px;text-align:left;min-height:40px;padding:8px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--ink);font:12px var(--font);cursor:pointer}
.ps-feature-grid>button:hover:enabled{background:var(--accent);border-color:var(--border)}.ps-feature-grid>button:disabled{opacity:.45;cursor:default}.ps-feature-grid .ps-icon{width:20px;height:20px}.ps-feature-grid kbd{margin-left:auto;font:10px var(--font);color:var(--muted-foreground);white-space:nowrap}
@media(max-width:760px){.ps-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ps-features-open{font-size:11px;padding:4px}.ps-features-open .ps-icon{display:none}}
.ps-features-body h4{font-size:11px;font-weight:500;color:var(--muted-foreground);margin:10px 0 5px}
/* Two-line canonical command names and three-row stacks must clear group captions. */
.ws-group{height:104px}
.ws-ribbon .ws-group-tools > .ws-tool{height:80px;gap:4px}
.ws-ribbon .ws-group-tools > .ws-tool .ps-icon{width:28px;height:28px}
.ws-ribbon .ws-tool span{line-height:14px}
.ps-cad-dialog,.ps-cad-manager{width:680px;max-width:calc(100vw - 32px);max-height:85vh;overflow:auto;padding:22px;font:13px var(--font)}
.ps-cad-dialog h2,.ps-cad-manager h2{font-size:18px;margin:0 0 14px}.ps-cad-status{font-size:12px;line-height:1.6;color:var(--ink-2)}
.ps-cad-error{color:var(--layer-red);font-size:12px}.ps-cad-controls,.ps-cad-card-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ps-cad-controls>label,.ps-cad-card-options>label{display:flex;flex-direction:column;gap:6px;color:var(--ink-2);font-size:12px}
.ps-cad-dialog input:not([type=checkbox]),.ps-cad-dialog select,.ps-cad-manager input:not([type=checkbox]),.ps-cad-manager select{padding:7px 9px;border:1px solid var(--border);background:var(--secondary);color:var(--ink);border-radius:4px;font:12px var(--font);width:100%}
.ps-cad-dialog details,.ps-cad-manager details{font-size:12px;margin:12px 0}.ps-cad-dialog summary,.ps-cad-manager summary{cursor:pointer}.ps-cad-controls>details{grid-column:1/-1}
.ps-cad-layers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px 0;max-height:200px;overflow:auto}.ps-cad-layers label{display:flex;align-items:center;gap:6px;overflow-wrap:anywhere}
.ps-cad-dialog pre,.ps-cad-manager pre{font:11px ui-monospace,monospace;white-space:pre-wrap;max-height:220px;overflow:auto;color:var(--ink-2)}
.ps-cad-card{padding:12px 0;border-top:1px solid var(--border)}.ps-cad-card h3{font-size:14px}.ps-cad-manager>button{padding:7px 12px;border:1px solid var(--border);background:var(--card);color:var(--ink);border-radius:4px;cursor:pointer}
.ps-cad-tree{border-top:1px solid var(--border);font-size:12px;padding-top:8px;margin-top:8px}.ps-cad-tree>summary{font-weight:600;cursor:pointer;margin-bottom:6px}.ps-cad-tree>button{display:block;border:0;background:transparent;color:var(--ink);font:12px var(--font);padding:6px 8px;cursor:pointer;text-align:left;width:100%}
/* Layout-only Pan assistant adaptation; existing Ask engine and permissions are retained. */
:root{--ps-assistant-width:360px}
body.ps-assistant-open .dc{width:calc(100% - var(--ps-assistant-width));align-self:flex-start}
.cct.cct-ask{position:fixed!important;top:var(--ps-assistant-top,182px)!important;right:0!important;bottom:24px!important;width:var(--ps-assistant-width)!important;height:auto!important;max-height:none!important;max-width:100vw;display:flex;flex-direction:column;border:0;border-left:1px solid var(--border);border-radius:0;background:var(--card);color:var(--ink);box-shadow:none;z-index:25}
.cct.cct-ask[hidden]{display:none!important}
.cct-ask .cct-head{display:flex;align-items:center;gap:6px;box-sizing:border-box;flex:none;height:var(--ps-panel-header-height);padding:0 12px;border-bottom:1px solid var(--border);background:var(--card)}
.ps-assistant-logo{width:22px;height:22px;object-fit:contain}.cct-ask .cct-title{font:600 14px var(--font);margin:0 auto 0 2px;white-space:nowrap}
.cct-ask .cct-sum{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--muted-foreground);font-size:0;padding:0}.cct-ask .cct-sum.is-ready{background:var(--primary)}
.ps-assistant-icon,.cct-ask .cct-x{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:0!important;background:transparent!important;color:var(--ink-2);cursor:pointer;border-radius:4px;font-size:20px}
.ps-assistant-icon .ps-icon{width:17px;height:17px;color:var(--ink-2)}.ps-assistant-icon:hover,.cct-ask .cct-x:hover{background:var(--secondary)!important}.ps-assistant-icon:disabled{opacity:.35;cursor:default}
.cct-ask>.cct-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0}
.ps-assistant-messages{flex:1;min-height:0;overflow-y:auto;padding:16px;scrollbar-width:thin}
.ps-assistant-empty>span{font-size:11px;color:var(--muted-foreground)}.ps-assistant-empty h3{font:500 14px var(--font);margin-top:24px}
.cct-ask .cct-ask-list{display:flex;flex-direction:column;gap:18px;padding:0;margin:0;list-style:none}
.cct-ask .cct-ask-item{border:0;padding:0;margin:0;overflow-wrap:anywhere}.cct-ask .cct-ask-q{margin:0 0 12px 20px;background:var(--secondary);border-radius:9px;padding:10px 12px;font-size:12px;white-space:pre-wrap}
.cct-ask .cct-ask-a{font-size:12px;line-height:1.75;white-space:pre-wrap;margin:8px 0}.cct-ask .cct-ask-steps{font-size:11px;color:var(--muted-foreground)}
.ps-assistant-context{padding:6px 14px 0;font-size:11px;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-assistant-composer{margin:8px 12px 4px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--card);flex-shrink:0}
.cct-ask .ps-assistant-composer textarea{display:block;width:100%;height:92px;min-height:72px;max-height:180px;resize:vertical;background:transparent;border:0;outline:0;color:var(--ink);font:12px/1.65 var(--font);padding:0;box-shadow:none}
.ps-assistant-footer{display:flex;align-items:center;gap:8px;margin-top:10px}.ps-assistant-model{min-width:0;max-width:calc(100% - 42px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--border);border-radius:5px;background:var(--secondary);color:var(--ink);padding:5px 8px;font:11px var(--font);cursor:pointer}
.ps-assistant-send{margin-left:auto;width:32px;height:32px;background:var(--primary);color:var(--primary-foreground);border:0;border-radius:6px;font:22px var(--font);cursor:pointer}.ps-assistant-send:disabled{opacity:.35;cursor:default}
.ps-assistant-info{margin:0 14px 8px;font-size:10px;color:var(--muted-foreground)}.ps-assistant-info summary{cursor:pointer}.ps-assistant-info p{font-size:11px}
@media(max-width:1050px){body.ps-assistant-open .dc{width:100%}.cct.cct-ask{width:var(--ps-assistant-width)!important;bottom:0!important}}
.ps-assistant-upload{border:0;background:transparent;color:var(--ink-2);font:11px var(--font);white-space:nowrap;padding:5px 0;cursor:pointer}
.ps-assistant-attachments:empty{display:none}.ps-assistant-attachments{display:flex;flex-direction:column;gap:5px;max-height:160px;overflow:auto;margin-bottom:8px}
.ps-attachment-chip{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--border);border-radius:5px;background:var(--secondary);font-size:11px}.ps-attachment-chip>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.ps-attachment-chip small{font-size:10px;color:var(--muted-foreground);white-space:nowrap}.ps-attachment-chip button{border:0;background:transparent;color:var(--ink);cursor:pointer;font-size:16px}.ps-attachment-chip[data-attachment-state=failed]{border-color:var(--layer-red)}
.ps-message-attachments{display:flex;flex-wrap:wrap;gap:5px;margin:4px 0 8px;font-size:10px;color:var(--muted-foreground)}.ps-message-attachments span{border:1px solid var(--border);border-radius:4px;padding:3px 6px}
.ps-assistant-footer .ps-assistant-model{max-width:calc(100% - 110px)}
/* Keep long conversations inside the message scroller, including shell/browser zoom. */
.cct.cct-ask{height:calc(100dvh - var(--ps-assistant-top,182px) - 24px)!important;overflow:hidden;min-height:0;zoom:1}
.cct-ask>.cct-body{height:0;flex:1 1 0;min-height:0;overflow:hidden}
.cct-ask .ps-assistant-messages{height:0;flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.cct-ask .ps-assistant-context,.cct-ask .ps-assistant-composer{flex:0 0 auto}
@media(max-width:1050px){.cct.cct-ask{height:calc(100dvh - var(--ps-assistant-top,182px))!important}}

.ps-ifc-import-tree{margin-top:10px;padding-top:6px;border-top:1px solid var(--border);font-size:12px}.ps-ifc-import-tree summary{cursor:pointer;padding:5px 0;font-weight:600;color:var(--ink)}.ps-ifc-import-tree details{margin-left:8px}.ps-ifc-import-tree button{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;border:0;background:transparent;color:var(--ink-2);padding:4px 2px;font:inherit}.ps-ifc-import-tree button:hover{background:var(--secondary)}
/* Source IFC dimensions use the existing compact property panel. */
.dc-ifc-parameters .dc-props{display:grid;grid-template-columns:1fr;gap:6px}
.dc-ifc-parameters label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:normal}
.dc-ifc-parameters input{width:110px;min-width:70px}
.dc-ifc-parameters button{margin:8px 5px 0 0}
.ps-assistant-delivery{padding:12px;margin:4px 0 14px;border:1px solid var(--border);border-radius:6px;color:var(--ink);font-size:12px}
.ps-assistant-delivery>small,.ps-assistant-delivery>strong{display:block;margin-bottom:7px}
.ps-assistant-delivery>small{color:var(--ink-2)}
.ps-assistant-delivery p{margin:7px 0;line-height:1.5}
.ps-delivery-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.ps-delivery-actions button,.ps-delivery-actions a{font:inherit;padding:6px;border:1px solid var(--border);border-radius:4px;color:var(--ink);background:transparent;text-decoration:none;cursor:pointer}
.ps-assistant-delivery summary{cursor:pointer;color:var(--ink-2)}
.ps-family-dialog{width:min(900px,90vw);max-height:85vh;border:1px solid var(--border);border-radius:6px;background:var(--card,#fff);color:var(--ink);padding:18px}
.ps-family-head,.ps-family-filters{display:flex;align-items:center;gap:8px;margin-bottom:12px}.ps-family-head{justify-content:space-between}.ps-family-head h2{font-size:17px;margin:0}
.ps-family-list{max-height:58vh;overflow:auto}.ps-family-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-size:13px}.ps-family-row>div{flex:1;min-width:0}.ps-family-row strong,.ps-family-row small{display:block;overflow-wrap:anywhere}.ps-family-row small{margin-top:5px;color:var(--ink-2)}.ps-family-row button,.ps-family-row a{flex-shrink:0}
.ps-export-formats{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ps-export-formats button{padding:12px;text-align:left;background:transparent;color:var(--ink);border:1px solid var(--border);border-radius:4px}
.dc-qto-pager{display:flex;align-items:center;gap:10px;margin-top:10px}
/* Complete conversation records; only the conversation viewport scrolls. */
.cct-ask .cct-ask-q,.cct-ask .cct-ask-a,.cct-ask .cct-ask-steps,.cct-ask .cct-ask-step{max-height:none!important;overflow:visible!important;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-line-clamp:unset}
.cct-ask .ps-tool-result{margin:6px 0;padding:8px;border-left:2px solid var(--border);font:11px/1.65 var(--font);white-space:pre-wrap;overflow-wrap:anywhere;max-height:none;overflow:visible;color:var(--ink-2)}

/* Keep the active floor/grid selectors available without duplicate mode buttons. */
.ws-layout-pansteel .ws-view-controls .dc-seg{display:none}
.ws-layout-pansteel .ws-view-controls select{max-width:16rem}

/* Empty-project shortcuts must not intercept precision placement clicks. */
[data-stage].is-placing [data-hint]{display:none!important}
/* Company library: one isolated, reusable preview scene. */
.ps-family-dialog{width:min(1250px,94vw)}
.ps-family-filters{flex-wrap:wrap}.ps-family-body{display:grid;grid-template-columns:minmax(260px,1fr) minmax(340px,1.15fr);gap:16px}.ps-family-body>.ps-family-list{max-height:61vh;overflow:auto}.ps-family-row{width:100%;text-align:left;background:var(--card);color:var(--ink);border:0;border-bottom:1px solid var(--border);cursor:pointer}.ps-family-row:hover{background:var(--secondary)}.ps-family-preview{min-width:0}.ps-family-preview h3{font-size:13px;margin:0 0 8px}.ps-family-preview>p,.ps-family-details p{font-size:12px;margin:5px 0;color:var(--ink-2)}.ps-family-preview canvas{display:block;width:100%;height:280px;border:1px solid var(--border);background:var(--card)}.ps-family-details a{display:inline-block;margin-right:14px;font-size:12px}.ps-family-preview fieldset{border:1px solid var(--border);display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding:8px;font-size:12px}.ps-family-preview legend{font-size:12px}.ps-family-preview fieldset label{display:flex;flex-direction:column;gap:3px;flex:1;min-width:60px}.ps-family-preview input{width:100%;box-sizing:border-box;font-size:12px;background:var(--secondary);color:var(--ink);border:1px solid var(--border);padding:5px}.ps-family-preview fieldset button{font-size:12px}
@media(max-width:800px){.ps-family-body{grid-template-columns:1fr}.ps-family-body>.ps-family-list{max-height:25vh}.ps-family-preview canvas{height:220px}}

.ps-family-dialog { box-sizing: border-box; }
.ps-family-filters { padding: 8px 0 12px; border-bottom: 1px solid var(--border); }
.ps-family-filters :is(select, input[type="search"]),
.ps-family-preview input[type="number"],
.ps-family-dialog .ps-family-button {
  box-sizing: border-box;
  block-size: 32px;
  min-inline-size: 0;
  max-inline-size: 100%;
  margin: 0;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.ps-family-filters input[type="search"] { flex: 1 1 220px; }
.ps-family-filters select { flex: 0 1 auto; }
.ps-family-filters label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 6px;
  padding-inline: 4px;
  font-size: 13px;
}
.ps-family-filters input[type="checkbox"] { margin: 0; accent-color: var(--action); }
.ps-family-filters select:disabled,
.ps-family-dialog .ps-family-button:disabled {
  opacity: 1;
  color: var(--ink-2);
  background: var(--secondary);
  cursor: not-allowed;
}
.ps-family-dialog :is(.ps-family-button, input, select):focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
.ps-family-dialog .ps-family-button { cursor: pointer; }
.ps-family-dialog .ps-family-close {
  inline-size: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-color: transparent;
}
.ps-family-dialog .ps-family-button:enabled:hover { background: var(--secondary); }
.ps-family-dialog .ps-family-primary:enabled {
  border-color: var(--action);
  color: var(--action);
  font-weight: 600;
}
.ps-family-preview fieldset { min-inline-size: 0; }
.ps-family-preview .ps-family-actions {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 540px) {
  .ps-family-filters input[type="search"] { flex-basis: 100%; }
  .ps-family-filters select { flex: 1 1 40%; }
  .ps-family-preview fieldset label { flex: 1 0 40%; }
}
/* an icon-font glyph the product replaced with its own SVG line icon (pansteel-workspace.js refine): one icon, not both */
i.bi:has(> svg.ps-icon)::before { content: none !important; display: none !important; }

/* start-up splash while the workspace layout is being built (html[data-cc-ws-boot], pansteel-init.js): no frame of the classic layout */
html[data-cc-ws-boot] body::after { content: ''; position: fixed; inset: 0; z-index: 2147483646; background: var(--sheet, #F3F6F8) url('boot-splash.svg') 50% 42% / min(80vw, 24rem) auto no-repeat; }
html[data-cc-ws-boot] body::before { content: '正在启动 Arch-GPT Steel'; position: fixed; left: 0; right: 0; top: calc(42% + min(80vw, 24rem) * 0.46 + .5rem); z-index: 2147483647; text-align: center; font-size: .875rem; color: var(--ink-2, #34404E); }
/* Two-row ribbon (owner 2026-11-11, "从三行调整为两行"): a stack of three or more small commands runs in columns of two (2+1, 2+2 …),
   large commands are as tall as two small rows, the label keeps up to two lines; the panel area is about 30 px lower. */
.ws-group{height:76px}
.ws-group-title{line-height:15px}
.ws-ribbon .ws-stack{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,26px);grid-auto-columns:max-content;gap:4px 2px}
.ws-ribbon .ws-stack .ws-tool{height:26px}
.ws-ribbon .ws-group-tools > .ws-tool{height:56px;gap:2px;padding:3px 7px}
.ws-ribbon .ws-group-tools > .ws-tool .ps-icon{width:24px;height:24px}
.ws-ribbon .ws-group-tools > .ws-tool span{line-height:13px}
.app-bar-btn .ps-icon-brand{width:16px;height:16px}
.ws-ribbon .ws-group-tools > .ws-tool:has(.ps-icon-brand){max-width:none;white-space:nowrap}
html[lang="en"][data-cc-ws-boot] body::before { content: 'Starting Arch-GPT Steel'; }

.ps-deepening-tasks { padding: 10px; overflow: auto; }
.ps-deepening-tasks nav { display: flex; gap: 8px; padding-bottom: 8px; }
.ps-deepening-tasks [aria-current="step"] { font-weight: 700; }
.ps-deepening-tasks table { width: 100%; margin: 8px 0; border-collapse: collapse; }
.ps-deepening-tasks th, .ps-deepening-tasks td {
  padding: 4px 8px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.ps-deepening-tasks button { margin-right: 6px; }

.cct-fields .cct-body { padding: 12px; gap: 8px; }
.cct-fields .cct-body > .cct-note:is(:first-child, :last-child),
.cct-fields .cct-lesson > small { display: none; }
.cct-fields .cct-win { font-weight: 400; }
.cct-fields .cct-sub { margin-top: 6px; }
.cct-fields .cct-body :is([data-pack], [data-template], [data-checklist], [data-table]) {
  min-width: 0; padding: 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--secondary); overflow-wrap: anywhere;
}
.cct-fields :is([data-template], [data-checklist], [data-table]) > .cct-note { margin: 4px 0 8px; }
.cct-fields .cct-btn:not(.cct-primary) { border-color: var(--border); }
.cct-fields [data-checklist] label { display: flex; align-items: baseline; gap: 6px; }
.cct-fields [data-checklist] input { flex: none; }
.cct-fields .cct-table { width: 100%; table-layout: fixed; }
.cct-fields .cct-table th:first-child { width: 24%; }
.cct-fields .cct-table :is(th, td) { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }

/* The project settings palette can dock much narrower than the viewport. */
.dc-left :is([data-grid-form], [data-level-form], [data-phases]) {
  container: steel-project-form / inline-size;
}
.dc-left :is([data-grid-form], [data-levels], [data-phases]) :is(.dc-input, .dc-select) {
  box-sizing: border-box;
  min-height: 26px;
}
.dc-left :is([data-grid-form] + .dc-note, [data-phases] > .dc-note) {
  font-size: .75rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.dc-left :is([data-levels], .dc-phases) > li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.dc-left [data-phases] > .dc-props { margin-top: 8px; }
.dc-left [data-phases] input[type="checkbox"] { accent-color: var(--action); }
.dc-left [data-phases] input[data-phase-per] { justify-self: start; }

.dc-grid-form .dc-grid-tables { display: grid; gap: 12px; margin-bottom: 10px; }
.dc-grid-form fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.dc-grid-form legend { padding: 0; margin-bottom: 4px; font-size: .8125rem; font-weight: 600; }
.dc-grid-form table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .75rem; }
.dc-grid-form th { color: var(--ink-2); font-weight: 500; text-align: start; overflow-wrap: anywhere; }
.dc-grid-form :is(th, td) { padding: 3px 3px 3px 0; border-bottom: 1px solid var(--border); }
.dc-grid-form th:first-child { width: 33%; }
.dc-grid-form th:last-child { width: 24px; }
.dc-grid-form td:last-child { padding-right: 0; }
.dc-grid-form .dc-linkbtn { margin-top: 5px; }
.dc-left .dc-grid-error { margin: 8px 0 0; color: var(--layer-red); overflow-wrap: anywhere; }
.dc-grid-form input[type="number"] { appearance: textfield; }
.dc-grid-form input[type="number"]::-webkit-inner-spin-button { appearance: none; }

@container steel-project-form (min-width: 320px) {
  .dc-grid-form .dc-grid-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container steel-project-form (max-width: 220px) {
  .dc-left [data-levels] li {
    grid-template-columns: auto minmax(0, 1fr) 24px;
    grid-template-areas: "name name name" "kind elevation remove";
  }
  .dc-left [data-levels] [data-lname] { grid-area: name; }
  .dc-left [data-levels] [data-lz] { grid-area: elevation; }
  .dc-left [data-levels] li:not(:has(.dc-level-kind)) [data-lz] { grid-column: 1 / 3; }
  .dc-left [data-levels] .dc-level-kind { grid-area: kind; }
  .dc-left [data-levels] .shell-x { grid-area: remove; }

  .dc-left .dc-phases li { grid-template-columns: auto auto minmax(0, 1fr) 24px; }
  .dc-left .dc-phases [data-phase-name] { grid-column: 1 / -1; grid-row: 2; }
  .dc-left .dc-phases .dc-muted { justify-self: end; text-align: end; }
  .dc-left .dc-phases li:has([data-phase-show="unassigned"]) > span { grid-column: 2 / -1; }
  .dc-left [data-phases] > .dc-props { grid-template-columns: minmax(0, 1fr) auto; }
  .dc-left [data-phases] label[for="dc-phase-cur"],
  .dc-left [data-phases] [data-phase-current] { grid-column: 1 / -1; }
}
