:root {
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #111827;
  color-scheme: light;
  background: #f5f7fb;
  --brand: #006fd6;
  --brand-hover: #0057aa;
  --brand-mark: #0788d4;
  --focus: #38bdf8;
  --shell: #0b1220;
  --border: #d4dce7;
  --muted: #4b5b70;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, input { font: inherit; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); border-radius: 3px; background: #fff; color: #243044; padding: 8px 11px; white-space: nowrap; cursor: pointer; font-weight: 500; }
button:hover:enabled { background: #eaf3ff; border-color: #8ab9ed; }
button:disabled { color: #748092; background: transparent; cursor: default; }
button:focus-visible, summary:focus-visible, input:focus-visible, [tabindex="-1"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover:enabled { background: var(--brand-hover); border-color: var(--brand-hover); }
button.primary:disabled { background: #334155; border-color: #475569; color: #a6b3c5; }
button[aria-pressed="true"] { background: #dcebff; border-color: var(--brand); color: var(--brand-hover); }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.topbar { min-height: 32px; flex: 0 0 auto; background: var(--shell); color: #f8fafc; display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: stretch; gap: 10px; padding: 0 6px; border-bottom: 1px solid #243044; }
.topbar-leading, .topbar-actions, .quick-access { display: flex; align-items: center; min-width: 0; }
.topbar-leading { gap: 5px; }
.topbar-actions { justify-content: flex-end; gap: 8px; overflow: hidden; }
.quick-access { gap: 1px; }
.quick-button { width: 27px; height: 27px; min-width: 27px; min-height: 27px; padding: 4px; border: 1px solid transparent; border-radius: 1px; background: transparent; color: #cbd5e1; }
.quick-button .icon { width: 17px; height: 17px; }
.quick-button:hover:enabled { color: #fff; background: #243044; border-color: #334155; }
.quick-button:disabled { color: #6f7c8f; }
.quick-button.planned-command:disabled { color: #627086; opacity: .72; }
.quick-history { position: relative; display: inline-flex; align-items: center; }
.quick-history-main { width: 24px; min-width: 24px; border-radius: 1px 0 0 1px; }
.quick-history-toggle { width: 12px; min-width: 12px; padding: 0; border-radius: 0 1px 1px 0; font-size: 8px; }
.quick-history-toggle:hover:enabled, .quick-history-toggle[aria-expanded="true"] { color: #fff; background: #243044; border-color: #334155; }
.quick-history-menu { position: absolute; z-index: 60; top: calc(100% + 3px); left: 0; width: 244px; max-height: min(430px,calc(100dvh - 48px)); overflow: auto; padding: 3px; background: #344154; color: #fff; border: 1px solid #7b8798; border-radius: 1px; box-shadow: 0 9px 24px #03071280; }
.quick-history-menu button { display: flex; width: 100%; min-height: 24px; justify-content: flex-start; padding: 3px 8px; overflow: hidden; border: 0; border-radius: 0; background: transparent; color: #fff; font-size: 12px; font-weight: 400; text-align: left; text-overflow: ellipsis; }
.quick-history-menu button:hover, .quick-history-menu button:focus-visible, .quick-history-menu button.selected { background: #245f94; color: #fff; outline: 0; }
.quick-history-summary { position: sticky; bottom: -3px; display: block; margin: 3px -3px -3px; padding: 6px 10px; background: #273446; border-top: 1px solid #6d798a; color: #e5edf6; font-size: 11px; }
.quick-separator { width: 1px; height: 18px; margin: 0 3px; background: #334155; }
.language-switch { display: inline-flex; height: 24px; border: 1px solid #334155; }
.language-switch button { min-width: 31px; padding: 0 7px; border: 0; border-radius: 0; background: transparent; color: #91a4bd; font-size: 9px; font-weight: 700; }
.language-switch button + button { border-left: 1px solid #334155; }
.language-switch button[aria-pressed="true"] { background: #13243a; color: #38bdf8; }
.language-switch button:hover { color: #f8fafc; background: #1f2937; }
.logout-button { height: 24px; min-width: 45px; padding: 0 9px; border: 1px solid #334155; border-radius: 2px; background: #13243a; color: #cbd5e1; font-size: 10px; font-weight: 700; }
.logout-button:hover:enabled { border-color: #38bdf8; background: #1f2937; color: #fff; }
.app-menu { position: relative; flex: 0 0 auto; }
.app-menu > .brand-mark { display: flex; width: 58px; height: 28px; align-items: center; justify-content: center; position: relative; background: transparent; border: 1px solid transparent; color: #fff; cursor: pointer; list-style: none; }
.app-menu > .brand-mark::-webkit-details-marker { display: none; }
.brand-mark img { display: block; width: 49px; height: 22px; object-fit: contain; filter: brightness(0) saturate(100%) invert(53%) sepia(84%) saturate(1472%) hue-rotate(168deg) brightness(92%) contrast(96%); }
.brand-mark:hover { border-color: #b1e7ff; }
.brand-mark:focus-visible { outline-color: var(--focus); }
.menu-caret { position: absolute; right: 3px; bottom: 0; font-size: 9px; font-weight: 400; }
.app-menu-panel { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: 280px; padding: 8px; background: #fff; color: #243044; border: 1px solid var(--border); box-shadow: 0 10px 28px #05070b40; }
.menu-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 8px 13px; margin-bottom: 5px; border-bottom: 1px solid #e3e9f1; }
.menu-heading strong { font-weight: 700; color: #111827; }
.menu-heading span { font-size: 11px; color: var(--muted); }
.app-menu-panel button { width: 100%; justify-content: flex-start; border-color: transparent; padding: 10px 8px; }
.app-menu-panel .icon { color: var(--brand); }
.app-menu-panel button:disabled .icon { color: #748092; }
.shortcut { margin-left: auto; font-size: 10px; color: #62728a; }
.app-menu-panel p { margin: 9px 0 0; border-top: 1px solid #e3e9f1; padding: 12px 8px 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.product-name { flex: 0 0 auto; padding: 0 5px; color: #77d0ff; font-size: 10px; font-weight: 600; white-space: nowrap; }
.topbar-runtime { min-width: 0; max-width: 390px; display: flex; align-items: center; gap: 16px; overflow: hidden; color: #aebdd0; font-size: 10px; white-space: nowrap; }
.topbar-runtime span { overflow: hidden; text-overflow: ellipsis; }
#plugin-status { flex: 0 0 auto; min-width: 52px; margin-left: 3px; padding: 2px 7px; border: 1px solid #526173; border-radius: 10px; background: #263244; color: #e2e8f0; font-size: 11px; font-weight: 700; line-height: 15px; text-align: center; overflow: visible; white-space: nowrap; }
#plugin-status[data-state="ready"] { border-color: #0e7490; background: #083344; color: #67e8f9; }
#plugin-status[data-state="absent"] { border-color: #0e7490; background: #083344; color: #67e8f9; }
#plugin-status[data-state="absent"] a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#plugin-status[data-state="absent"] a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#plugin-status[data-state="unavailable"] { border-color: #a16207; background: #422006; color: #fde68a; }
#cache-status, #version { flex: 0 1 auto; min-width: 0; }
.ribbon { flex: 0 0 auto; background: #111827; border-bottom: 1px solid #334155; color: #cbd5e1; }
#ribbon-tabs { display: flex; align-items: stretch; justify-content: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#ribbon-tabs::-webkit-scrollbar { display: none; }
#ribbon-tabs > button { flex: 0 0 auto; min-height: 31px; padding: 3px 14px; border: 0; border-radius: 0; color: #cbd5e1; background: transparent; font-size: 11px; }
#ribbon-tabs > button span { font-size: 10px; opacity: .75; }
#ribbon-tabs > button:hover { background: #243044; color: #fff; }
#ribbon-tabs > button[aria-selected="true"] { color: #38bdf8; background: #111827; box-shadow: inset 0 -2px 0 var(--brand-mark); }
#ribbon-tabs > button.contextual-tab { color: #f0b9ff; border-left: 1px solid #713c80; border-right: 1px solid #713c80; }
#ribbon-tabs > button.contextual-tab[aria-selected="true"] { color: #fff; background: #46204f; box-shadow: inset 0 -2px 0 #d66df2; }
#ribbon-tabs > button:focus-visible { outline-color: var(--focus); outline-offset: -3px; }
.chrome-button { padding: 3px 7px; min-width: 28px; min-height: 26px; flex: 0 0 auto; font-size: 11px; border-color: transparent; background: transparent; color: inherit; }
.chrome-button .icon { width: 15px; height: 15px; }
.topbar .chrome-button:hover { color: #fff; background: #243044; }
.topbar .chrome-button:focus-visible { outline-color: var(--focus); outline-offset: -2px; }
#toggle-ribbon { width: 22px; min-width: 22px; padding: 2px; font-size: 16px; line-height: 1; color: #91a4bd; }
.ribbon-panel { display: flex; align-items: stretch; overflow-x: hidden; min-width: 0; min-height: 88px; padding: 3px 6px 0; }
.ribbon-group { flex: 0 0 auto; padding: 0 7px; border-right: 1px solid #334155; }
.ribbon-group:first-child { padding-left: 0; }
.ribbon-group:last-child { border-right: 0; }
.ribbon-group-body { display: flex; align-items: stretch; gap: 2px; min-height: 58px; }
.ribbon-group h2, .ribbon-group-title { height: 17px; min-height: 17px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 4px; color: #b8c5d6; font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: .1px; }
.ribbon-group-title { width: 100%; padding: 0 5px; border: 0; border-radius: 0; background: transparent; }
.group-caret { color: #91a4bd; font-size: 11px; transition: transform .12s ease; }
.ribbon-group-title[aria-expanded="true"] .group-caret { transform: rotate(180deg); }
.ribbon-large { flex-direction: column; gap: 3px; align-self: stretch; min-width: 48px; padding: 3px 5px; border-color: transparent; background: transparent; color: #cbd5e1; font-size: 11px; }
.ribbon-large .icon { width: 22px; height: 22px; color: #38bdf8; }
.ribbon-panel button:hover:enabled { color: #f8fafc; background: #243044; border-color: #475569; }
.ribbon-panel button[aria-pressed="true"] { color: #f8fafc; background: #243044; border-color: #0788d4; }
.ribbon-panel button:focus-visible { outline-color: var(--focus); outline-offset: -2px; }
.ribbon-panel button:disabled { color: #91a4bd; }
.ribbon-large:disabled .icon { color: #8d99aa; }
.ribbon-large small { color: #91a4bd; font-size: 9px; line-height: 1.15; font-weight: 400; }
.ribbon-stack { display: flex; justify-content: center; flex-direction: column; gap: 3px; padding: 2px 0; }
.ribbon-stack button { min-height: 25px; justify-content: flex-start; font-size: 11px; padding: 3px 5px; border-color: transparent; background: transparent; color: #cbd5e1; }
.ribbon-stack .icon { width: 16px; height: 16px; color: #38bdf8; }
.ribbon-stack button:disabled .icon { color: #8d99aa; }
.block-ribbon-controls { width: 190px; }
.block-ribbon-controls select { width: 190px; height: 24px; background: #343c49; color: #edf3fb; border: 1px solid #536176; border-radius: 2px; font-size: 11px; }
.ribbon-context { flex: 0 0 370px; max-width: 370px; padding: 5px 16px; font-size: 11px; color: #91a4bd; }
.ribbon-context strong { color: #cbd5e1; font-weight: 700; }
.ribbon-context p { line-height: 1.5; margin: 4px 0 0; }
.contextual-ribbon { background: linear-gradient(90deg,#25152b 0,#111827 48%); box-shadow: inset 0 2px 0 #8c459e; }
.mtext-style-controls,.mtext-format-controls { display: grid; grid-template-columns: 154px; gap: 3px; padding: 2px 3px; }
.mtext-format-controls { grid-template-columns: 181px 154px 154px; align-items: center; }
.mtext-inline-format { grid-row: 1 / span 2; display: flex; align-items: center; gap: 2px; padding-right: 4px; border-right: 1px solid #536176; }
.mtext-inline-format button { width: 25px; min-width: 25px; height: 27px; padding: 2px; border-color: transparent; background: transparent; color: #e2e8f0; font-family: Arial,sans-serif; }
.mtext-inline-format input[type="color"] { width: 24px; min-width: 24px; height: 25px; padding: 1px; border: 1px solid #536176; background: #343c49; }
.mtext-inline-format button[aria-pressed="true"] { background: #5b2c66; border-color: #d66df2; color: #fff; }
.overline-glyph { text-decoration: overline; }
.mtext-style-controls label,.mtext-format-controls label { display: grid; grid-template-columns: 55px minmax(0,1fr); align-items: center; gap: 4px; color: #cbd5e1; font-size: 10px; }
.mtext-style-controls select,.mtext-style-controls input,.mtext-format-controls input,.mtext-format-controls select { min-width: 0; height: 23px; border: 1px solid #536176; border-radius: 1px; background: #343c49; color: #edf3fb; padding: 2px 5px; font-size: 11px; }
.mtext-format-controls > label:nth-child(3) { grid-template-columns: 55px minmax(0,1fr) 9px; }
.mtext-format-controls small { color: #91a4bd; }
.mtext-run-advanced { grid-row: 1 / span 2; display: grid; gap: 3px; padding-left: 4px; border-left: 1px solid #536176; }
.mtext-run-advanced label { grid-template-columns: 47px minmax(0,1fr) 9px; }
.mtext-character-tools { display: grid; grid-template-columns: 116px 92px; grid-template-rows: 18px 18px 18px; gap: 2px 3px; align-items: center; padding: 1px 4px; }
.mtext-stack-actions { grid-row: 1 / span 3; display: grid; grid-template-rows: repeat(3,18px); gap: 1px; padding-right: 4px; border-right: 1px solid #536176; }
.mtext-stack-actions button { justify-content: flex-start; min-height: 25px; padding: 2px 7px; border-color: #536176; background: transparent; color: #e2e8f0; font-size: 10px; }
.mtext-stack-actions button { min-height: 18px; height: 18px; padding: 0 5px; font-size: 9px; }
.mtext-character-tools label { display: grid; grid-template-columns: 36px 43px 10px; align-items: center; gap: 2px; color: #cbd5e1; font-size: 9px; }
.mtext-character-tools input { width: 43px; height: 22px; border: 1px solid #536176; background: #343c49; color: #edf3fb; padding: 2px 3px; }
.mtext-character-tools small { color: #91a4bd; }
.mtext-character-tools .mtext-autostack { grid-template-columns: 15px auto; }
.mtext-character-tools .mtext-autostack input { width: 13px; height: 13px; accent-color: #a855c7; }
.mtext-background-format { display: grid; grid-template-columns: auto auto 26px; gap: 4px 7px; align-items: center; padding: 2px 6px; color: #cbd5e1; font-size: 10px; }
.mtext-background-format > label { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.mtext-background-format > label:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 36px 62px; }
.mtext-background-format input[type="checkbox"] { width: 13px; height: 13px; accent-color: #a855c7; }
.mtext-background-format > input[type="color"] { width: 24px; height: 23px; padding: 1px; border: 1px solid #536176; background: #343c49; }
.mtext-background-format input[type="number"] { width: 62px; height: 22px; border: 1px solid #536176; background: #343c49; color: #edf3fb; padding: 2px 4px; }
.mtext-alignment { align-items: center; gap: 2px; padding: 0 4px; }
.mtext-alignment button { width: 31px; min-width: 31px; height: 29px; padding: 2px 5px; color: #d9e2ee; background: transparent; border-color: transparent; font-family: monospace; }
#mtext-align-left { justify-content: flex-start; }
#mtext-align-center { justify-content: center; }
#mtext-align-right { justify-content: flex-end; }
.mtext-paragraph-panel { display: grid; grid-template-columns: 99px 92px; gap: 3px; align-items: center; padding: 2px 3px; }
.mtext-paragraph-panel .mtext-alignment { grid-row: 1 / span 2; padding: 0; }
.mtext-paragraph-panel select,.mtext-paragraph-panel input { width: 92px; height: 23px; min-width: 0; border: 1px solid #536176; background: #343c49; color: #edf3fb; font-size: 10px; }
.mtext-paragraph-panel label { display: grid; grid-template-columns: 43px 49px; align-items: center; color: #cbd5e1; font-size: 9px; }
.mtext-paragraph-panel label input { width: 49px; }
.mtext-insert-tools { display: grid; grid-template-columns: 86px 112px; grid-template-rows: 25px 25px; gap: 3px; align-items: center; padding: 2px 3px; }
.mtext-symbols { display: flex; gap: 2px; }
.mtext-symbols button { width: 26px; min-width: 26px; height: 24px; padding: 1px; background: transparent; color: #edf3fb; border-color: #536176; font-size: 14px; }
.mtext-insert-tools label { display: grid; grid-template-columns: 48px 60px; gap: 3px; align-items: center; color: #cbd5e1; font-size: 9px; }
.mtext-insert-tools input { width: 60px; height: 22px; border: 1px solid #536176; background: #343c49; color: #edf3fb; padding: 2px 4px; }
#mtext-find-toggle { width: 82px; height: 24px; padding: 2px 4px; border-color: #536176; background: transparent; color: #cbd5e1; font-size: 9px; }
.contextual-check,.contextual-cancel { font-size: 24px; line-height: 21px; color: #64d98b; }
.contextual-cancel { color: #f09aa2; }
.workspace { --properties-width: 350px; --xref-width: 360px; --ai-width: 380px; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0,1fr) 25px; min-height: 0; position: relative; }
.workspace.sidebar-open.sidebar-left { grid-template-columns: var(--properties-width) minmax(0, 1fr); }
.workspace.sidebar-open.sidebar-right { grid-template-columns: minmax(0, 1fr) var(--properties-width); }
.workspace.sidebar-open.sidebar-left #tool-sidebar { grid-column: 1; grid-row: 1; border-right: 1px solid #172131; border-left: 0; }
.workspace.sidebar-open.sidebar-left .drawing { grid-column: 2; grid-row: 1; }
.workspace.sidebar-open.sidebar-right .drawing { grid-column: 1; grid-row: 1; }
.workspace.sidebar-open.sidebar-right #tool-sidebar { grid-column: 2; grid-row: 1; }
.workspace.xref-palette-open { grid-template-columns: minmax(0,1fr) var(--xref-width); }
.workspace.xref-palette-open .drawing { grid-column: 1; grid-row: 1; }
.workspace.xref-palette-open #xref-palette { grid-column: 2; grid-row: 1; }
.workspace.sidebar-open.sidebar-left.xref-palette-open { grid-template-columns: var(--properties-width) minmax(0,1fr) var(--xref-width); }
.workspace.sidebar-open.sidebar-left.xref-palette-open #tool-sidebar { grid-column: 1; }
.workspace.sidebar-open.sidebar-left.xref-palette-open .drawing { grid-column: 2; }
.workspace.sidebar-open.sidebar-left.xref-palette-open #xref-palette { grid-column: 3; }
.workspace.sidebar-open.sidebar-right.xref-palette-open { grid-template-columns: minmax(0,1fr) var(--properties-width) var(--xref-width); }
.workspace.sidebar-open.sidebar-right.xref-palette-open .drawing { grid-column: 1; }
.workspace.sidebar-open.sidebar-right.xref-palette-open #tool-sidebar { grid-column: 2; }
.workspace.sidebar-open.sidebar-right.xref-palette-open #xref-palette { grid-column: 3; }
.workspace.ai-palette-open.ai-left { grid-template-columns: var(--ai-width) minmax(0,1fr); }
.workspace.ai-palette-open.ai-left #ai-palette { grid-column: 1; grid-row: 1; }
.workspace.ai-palette-open.ai-left .drawing { grid-column: 2; grid-row: 1; }
.workspace.ai-palette-open.ai-right { grid-template-columns: minmax(0,1fr) var(--ai-width); }
.workspace.ai-palette-open.ai-right .drawing { grid-column: 1; grid-row: 1; }
.workspace.ai-palette-open.ai-right #ai-palette { grid-column: 2; grid-row: 1; }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-left { grid-template-columns: var(--ai-width) var(--properties-width) minmax(0,1fr); }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-left #tool-sidebar { grid-column: 2; }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-left .drawing { grid-column: 3; }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-left { grid-template-columns: var(--ai-width) minmax(0,1fr) var(--properties-width); }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-left .drawing { grid-column: 2; }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-left #tool-sidebar { grid-column: 3; }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-right { grid-template-columns: var(--properties-width) minmax(0,1fr) var(--ai-width); }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-right #tool-sidebar { grid-column: 1; }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-right .drawing { grid-column: 2; }
.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-right #ai-palette { grid-column: 3; }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-right { grid-template-columns: minmax(0,1fr) var(--properties-width) var(--ai-width); }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-right .drawing { grid-column: 1; }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-right #tool-sidebar { grid-column: 2; }
.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-right #ai-palette { grid-column: 3; }
.drawing { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.drawing-tab { height: 24px; min-height: 24px; background: #1b2330; border-bottom: 1px solid #111923; display: flex; align-items: stretch; gap: 3px; padding: 0 4px; flex: 0 0 auto; }
.drawing-tabs { display: flex; align-items: stretch; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.drawing-tab-name { display: flex; align-items: center; gap: 5px; min-width: 104px; max-width: 230px; padding: 1px 4px 1px 8px; border: 0; border-right: 1px solid #111923; border-left: 1px solid transparent; border-radius: 0; background: #263143; color: #b8c3d1; font-size: 11px; }
.drawing-tab-name[aria-selected="true"] { background: #3c4759; border-top: 2px solid #38bdf8; border-left-color: #4a586d; color: #fff; }
.drawing-tab-name:hover { background: #334054; color: #f3f6fa; }
.drawing-tab-name:focus-visible { outline: 1px solid var(--focus); outline-offset: -2px; }
.drawing-tab-close { flex: 0 0 auto; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #9eabbc; font-size: 14px; line-height: 14px; }
.drawing-tab-close:hover { background: #4a586d; color: #ff9aa5; }
.drawing-tab-name[aria-selected="true"] .drawing-tab-close:hover { background: #526176; }
.drawing-tab-add { align-self: center; flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; color: #c8d2df; font-size: 17px; }
.drawing-tab-add:hover { background: #334054; color: #fff; }
.drawing-tab-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.drawing-tab-tools { margin-left: auto; }
.drawing-tab-name .icon { width: 14px; height: 14px; color: var(--brand); }
#drawing-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.space-label { align-self: center; color: #93a1b4; font-size: 9px; letter-spacing: .8px; white-space: nowrap; }
.drawing-tab-tools .chrome-button { height: 22px; min-height: 22px; padding: 1px 6px; border-color: transparent; background: transparent; color: #c8d2df; font-size: 10px; }
.drawing-tab-tools .chrome-button:hover { background: #334054; color: #fff; }
#canvas-wrap { flex: 1; position: relative; min-height: 0; overflow: hidden; contain: layout paint; isolation: isolate; background: #000; }
.open-progress { position: absolute; z-index: 8; inset: 0; display: grid; place-items: start center; padding: clamp(20px,8vh,76px) 16px 16px; pointer-events: none; background: linear-gradient(180deg,rgba(8,15,23,.42),transparent 52%); }
.open-progress[hidden] { display: none; }
.open-progress.preview-ready { place-items: start start; padding: 12px; background: none; }
.open-progress.preview-ready .open-progress-card { width: min(430px,calc(100% - 20px)); padding: 10px 12px; }
.open-progress.preview-ready .open-progress-heading > div > span { display: none; }
.open-progress-card { width: min(590px,calc(100% - 20px)); padding: 16px 18px 14px; border: 1px solid #527a99; border-radius: 8px; background: rgba(18,31,43,.97); color: #eef7ff; box-shadow: 0 18px 48px rgba(0,0,0,.48); pointer-events: auto; }
.open-progress-heading { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.open-progress-heading strong,.open-progress-heading span { display: block; }
.open-progress-heading strong { font-size: 14px; }
.open-progress-heading span { margin-top: 2px; overflow: hidden; color: #a9bfd1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.open-progress-heading b { color: #7bd3ff; font-size: 16px; font-variant-numeric: tabular-nums; }
.open-progress-spinner { width: 20px; height: 20px; border: 2px solid #3a5f78; border-top-color: #60c9ff; border-radius: 50%; animation: open-progress-spin .8s linear infinite; }
@keyframes open-progress-spin { to { transform: rotate(360deg); } }
.open-progress progress { display: block; width: 100%; height: 9px; margin: 13px 0 9px; overflow: hidden; border: 0; border-radius: 6px; accent-color: #32b8f5; background: #0c1721; }
.open-progress progress::-webkit-progress-bar { background: #0c1721; }
.open-progress progress::-webkit-progress-value { background: linear-gradient(90deg,#168fd0,#56cdfc); }
.open-progress p { min-height: 18px; margin: 0; color: #e5f3fd; font-size: 12px; }
.open-progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; color: #92a9bb; font-size: 10px; font-variant-numeric: tabular-nums; }
.open-progress button { display: block; min-width: 105px; margin: 12px 0 0 auto; padding: 6px 12px; border-color: #55758c; background: #263c4e; color: #edf7ff; }
.drawing-viewport { display: block; width: 100%; height: 100%; cursor: none; touch-action: none; outline: none; background: #000; }
.drawing-viewport.file-drop-active { outline: 2px dashed #24b8eb; outline-offset: -7px; }
.drawing-viewport[hidden] { display: block; visibility: hidden; pointer-events: none; position: absolute; inset: 0; }
.drawing-preview-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.drawing-viewport[hidden] + .drawing-preview-overlay { display: none; }
.mtext-editor { position: absolute; z-index: 8; top: 14%; left: 22%; width: min(520px,58%); min-width: 280px; border: 1px solid #77aee5; background: #f7fbff; box-shadow: 0 8px 26px #0008; }
.mtext-editor.single-line { top: 42%; width: min(440px,52%); }
.mtext-editor.single-line .mtext-ruler,.mtext-editor.single-line .mtext-editor-preview { display: none; }
.mtext-editor.single-line #mtext-editor-content { height: 44px; min-height: 44px; max-height: 44px; resize: horizontal; white-space: nowrap; overflow-x: auto; }
.mtext-ruler { height: 19px; display: grid; grid-template-columns: repeat(8,1fr); align-items: end; background: #dbe5ef; border-bottom: 1px solid #9cabb9; padding: 0 8px; }
.mtext-ruler span { position: absolute; left: 8px; top: 14px; width: calc(100% - 16px); height: 1px; background: #718096; }
.mtext-ruler i { height: 6px; border-left: 1px solid #718096; z-index: 1; }
#mtext-editor-content { display: block; width: 100%; height: 126px; resize: both; min-width: 278px; min-height: 68px; max-width: calc(100vw - 40px); max-height: calc(100vh - 260px); padding: 10px 12px; border: 0; outline: 0; background: #fdfefe; color: #111827; font: 14px/1.45 Arial,sans-serif; tab-size: 4; }
.mtext-editor-preview { min-height: 50px; max-height: 105px; overflow: auto; padding: 7px 12px; border-top: 1px dashed #91a4bd; background: #fff; color: #111827; font: 14px/1.45 Arial,sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.mtext-editor-preview:empty::before { content: "Formatted preview"; color: #91a4bd; font-style: italic; }
.mtext-editor-preview .mtext-scaled-run { display: inline-block; transform-origin: left bottom; }
.mtext-editor-preview .mtext-stack { position: relative; display: inline-grid; grid-template-rows: auto auto; place-items: center; vertical-align: middle; padding: 0 .08em; font-size: .72em; line-height: 1.02; transform: none; }
.mtext-editor-preview .mtext-stack.horizontal > span:first-child { width: 100%; border-bottom: 1px solid currentColor; text-align: center; }
.mtext-editor-preview .mtext-stack.diagonal { grid-template-columns: auto .35em auto; grid-template-rows: auto auto; }
.mtext-editor-preview .mtext-stack.diagonal > span:first-child { grid-column: 1; grid-row: 1; }
.mtext-editor-preview .mtext-stack.diagonal > span:last-child { grid-column: 3; grid-row: 2; }
.mtext-editor-preview .mtext-stack.diagonal::after { content: '/'; grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 1.3em; }
.mtext-editor-preview .mtext-stack.top { vertical-align: text-top; }
.mtext-editor-preview .mtext-stack.bottom { vertical-align: text-bottom; }
.mtext-editor-preview .mtext-stack.decimal { place-items: start; }
.mtext-editor-preview .mtext-stack.decimal > span { text-align: left; font-variant-numeric: tabular-nums; }
.mtext-editor-preview .mtext-stack.decimal-aligned { grid-template-columns: max-content max-content; }
.mtext-editor-preview .mtext-stack.decimal-aligned > .mtext-decimal-prefix { justify-self: end; text-align: right; }
.mtext-stack-properties { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 8px; padding: 8px; border-top: 1px solid #9cabb9; background: #e5edf5; color: #334155; font: 11px Arial,sans-serif; }
.mtext-stack-properties[hidden] { display: none; }
.mtext-stack-properties label { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: 4px; }
.mtext-stack-properties input,.mtext-stack-properties select { min-width: 0; height: 25px; border: 1px solid #94a3b8; background: #fff; color: #111827; padding: 3px 5px; }
.mtext-stack-properties > div { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 5px; }
.mtext-stack-properties button { min-height: 24px; padding: 3px 9px; border: 1px solid #94a3b8; background: #f8fafc; color: #1e293b; }
.mtext-find-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 7px; border-top: 1px solid #9cabb9; background: #e5edf5; color: #334155; font: 11px Arial,sans-serif; }
.mtext-find-panel[hidden] { display: none; }
.mtext-find-panel > input { min-width: 0; height: 25px; border: 1px solid #94a3b8; background: #fff; color: #111827; padding: 3px 6px; }
.mtext-find-panel > label { display: flex; align-items: center; gap: 4px; }
.mtext-find-panel > div { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 4px; }
.mtext-find-panel button { min-height: 24px; padding: 3px 7px; border: 1px solid #94a3b8; background: #f8fafc; color: #1e293b; }
.mtext-editor-status { min-height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 2px 7px; border-top: 1px solid #c8d3df; background: #edf3f8; color: #526174; font-size: 10px; }
#cad-cursor { position: absolute; top: 0; left: 0; pointer-events: none; width: 0; height: 0; color: #d2d6dc; }
#cad-cursor i { position: absolute; display: block; }
.cursor-horizontal { left: var(--crosshair-left,-80px); top: 0; width: var(--crosshair-width,161px); height: 1px; background: currentColor; }
.cursor-vertical { top: var(--crosshair-top,-80px); left: 0; height: var(--crosshair-height,161px); width: 1px; background: currentColor; }
.cursor-pickbox { left: -4px; top: -4px; width: 9px; height: 9px; border: 1px solid currentColor; }
#cad-cursor.selecting .cursor-horizontal, #cad-cursor.selecting .cursor-vertical { display: none; }
#cad-cursor.selecting .cursor-pickbox { left: -5px; top: -5px; width: 11px; height: 11px; background: rgba(0,0,0,.28); }
#cad-cursor.selecting.removing { color: #ff6868; }
.dynamic-input { position: absolute; z-index: 14; top: 0; left: 0; min-width: 148px; max-width: min(420px,calc(100% - 16px)); pointer-events: none; color: #111827; font: 12px/1.25 Consolas,monospace; filter: drop-shadow(0 2px 5px #02061788); }
.dynamic-input[hidden] { display: none; }
.dynamic-input-prompt { overflow: hidden; padding: 4px 7px; border: 1px solid #8c98a3; border-bottom: 0; background: rgba(51,67,83,.98); color: #f3f5f7; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dynamic-input-prompt[hidden] { display: none; }
.dynamic-input-row { display: flex; align-items: center; min-height: 25px; overflow: hidden; border: 1px solid #9aa5ad; background: #d9dddc; white-space: nowrap; }
.dynamic-input-field { display: flex; min-width: 0; pointer-events: auto; }
.dynamic-input:not(.point-mode) { display: flex; align-items: stretch; }
.dynamic-input:not(.point-mode) .dynamic-input-prompt { display: flex; align-items: center; max-width: 230px; border-bottom: 1px solid #8c98a3; }
.dynamic-input:not(.point-mode) .dynamic-input-row { flex: 0 0 auto; border-left: 0; }
.dynamic-input.selection-prompt-only { min-width: 0; }
.dynamic-input.selection-prompt-only .dynamic-input-prompt { padding: 3px 6px; border: 1px solid #9aa5ad; background: #d9dddc; color: #111827; font-weight: normal; }
.dynamic-input.selection-prompt-only .dynamic-input-row { display: none; }
.dynamic-input.point-mode { width: auto; max-width: min(420px,calc(100% - 16px)); display: flex; align-items: stretch; }
.dynamic-input.point-mode .dynamic-input-prompt { display: flex; align-items: center; max-width: 230px; border-bottom: 1px solid #8c98a3; overflow: hidden; }
.dynamic-input.point-mode .dynamic-input-prompt[hidden] { display: none; }
.dynamic-input.point-mode .dynamic-input-row { flex: 0 0 auto; border-left: 0; }
.dynamic-input.keyword-mode .dynamic-input-row { min-width: 148px; }
.dynamic-point-fields { display: flex; align-items: stretch; pointer-events: auto; }
.dynamic-point-fields[hidden] { display: none; }
.dynamic-point-fields input { box-sizing: border-box; width: 86px; min-width: 0; height: 24px; margin: 0; padding: 2px 5px; border: 0; border-left: 1px solid #a9b1b7; border-radius: 0; outline: none; background: #d9dddc; color: #17202a; font: 12px/1.25 Consolas,monospace; }
.dynamic-point-fields input[hidden] { display: none; }
.dynamic-input.point-ortho .dynamic-point-fields input:first-child { width: 154px; }
.inquiry-result { position: absolute; z-index: 14; top: 0; left: 0; max-width: min(560px,calc(100% - 16px)); padding: 5px 7px; border: 1px solid #68737d; background: #c8c8c8; color: #101820; box-shadow: 0 2px 5px #02061788; font: 12px/1.25 Consolas,monospace; white-space: pre; pointer-events: none; }
.inquiry-result[hidden] { display: none; }
.dynamic-point-fields input:focus { background: #f2f3f4; outline: 1px solid #1597d3; outline-offset: -1px; }
.dynamic-visibility-menu { position: absolute; z-index: 12; min-width: 124px; max-height: min(280px,60vh); overflow: auto; padding: 2px; border: 1px solid #617288; border-radius: 2px; background: #202a37; box-shadow: 0 8px 20px #020617a6; }
.dynamic-visibility-menu button { display: block; width: 100%; min-height: 24px; padding: 3px 18px 3px 7px; border: 0; border-radius: 1px; background: transparent; color: #e8eef6; font-size: 11px; text-align: left; white-space: nowrap; }
.dynamic-visibility-menu button:hover,.dynamic-visibility-menu button[aria-selected="true"] { background: #3b485b; }
.dynamic-visibility-menu button[aria-selected="true"]::after { content: '✓'; float: right; margin-right: -12px; color: #61c8ff; }
.leader-grip-menu { min-width: 154px; }
.leader-grip-menu button { padding-right: 9px; }
.canvas-context-menu { position: absolute; z-index: 46; width: 162px; padding: 2px; border: 1px solid #59616a; border-radius: 1px; background: #f2f2f2; color: #111; box-shadow: 2px 3px 7px #0007; font: 12px/1.2 "Segoe UI",Arial,sans-serif; }
.canvas-context-menu[hidden] { display: none; }
.canvas-context-menu button { display: block; width: 100%; min-height: 25px; padding: 3px 24px; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; }
.canvas-context-menu button:hover,.canvas-context-menu button:focus-visible { background: #0878d1; color: #fff; outline: 1px dotted #fff; outline-offset: -3px; }
.canvas-context-menu button:disabled { color: #8a8a8a; background: transparent; }
.drawing-viewport:focus-visible { outline: 1px solid var(--focus); outline-offset: -1px; }
.drawing-viewport.pan { cursor: grab; }
.drawing-viewport.dragging { cursor: grabbing; }
.layout-tabs { position:absolute; z-index:11; left:7px; bottom:7px; display:flex; align-items:end; max-width:42%; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; border:1px solid #4a5666; background:#1a222d; box-shadow:0 2px 8px #02061780; }
.layout-tabs:empty { display:none; }
.layout-tabs button { flex:0 0 auto; min-width:56px; height:25px; padding:3px 11px; border:0; border-right:1px solid #4a5666; border-radius:0; background:#2b3644; color:#c4ceda; font:10px/1 "Segoe UI",Arial,sans-serif; white-space:nowrap; }
.layout-tabs button:last-child { border-right:0; }
.layout-tabs button:hover:not(:disabled) { background:#3a485a; color:#fff; }
.layout-tabs button[aria-selected="true"] { background:#f6f7f9; color:#17202c; box-shadow:inset 0 3px 0 #2f91d1; }
.layout-tabs button:disabled:not([aria-selected="true"]) { color:#7d8998; }
html.layout-active .drawing-viewport { background:#000; }
html.layout-active .axis { opacity:.35; }
#xref-notice { position: absolute; z-index: 4; top: 12px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); min-height: 48px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #3e789f; border-radius: 4px; background: rgba(17,38,55,.96); color: #edf7ff; box-shadow: 0 4px 16px rgba(0,0,0,.28); }
#xref-notice > .icon { width: 24px; height: 24px; color: #62c5ff; }
#xref-notice strong, #xref-notice span { display: block; }
#xref-notice strong { font-size: 12px; font-weight: 600; }
#xref-notice span { margin-top: 3px; color: #b8ccda; font-size: 10px; line-height: 1.35; }
.xref-notice-actions { display: flex; align-items: center; gap: 6px; }
.xref-notice-actions button { min-height: 30px; white-space: nowrap; }
.xref-notice-actions button:not(.primary) { color: #d3e3ef; border-color: #567087; background: #263d50; }
@media (max-width: 760px) { #xref-notice { grid-template-columns: 22px minmax(0,1fr); } #xref-notice > .icon { width: 20px; height: 20px; } .xref-notice-actions { grid-column: 2; justify-self: start; } }
#empty-view { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #e4edf5; pointer-events: none; padding: 24px; }
.empty-symbol { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; padding: 0; pointer-events: auto; border: 1px solid #335062; border-radius: 3px; background: #183044; color: #6cbcec; }
.empty-symbol:hover:enabled { border-color: #54b9ee; background: #1d4058; color: #8bd7ff; box-shadow: 0 0 0 1px #17384d,0 5px 16px #0007; }
.empty-symbol:active:enabled { transform: translateY(1px); background: #15364c; }
.empty-symbol:focus-visible { outline-color: #6ccfff; outline-offset: 3px; }
.empty-symbol:disabled { border-color: #2d4656; background: #172b3b; color: #587f96; }
.empty-symbol .icon { width: 32px; height: 32px; stroke-width: 1.35; }
h1 { font-size: clamp(19px, 2vw, 25px); font-weight: 500; margin: 19px 0 0; }
#empty-view p { max-width: 420px; color: #a2b6c7; line-height: 1.9; font-size: 13px; margin: 12px 0; }
#empty-view strong { color: #d4e4f0; font-weight: 500; }
#empty-view > span { color: #91a4b5; font-size: 10px; border: 1px solid #304757; border-radius: 3px; padding: 6px 10px; margin-top: 12px; letter-spacing: .25px; }
.axis { position: absolute; bottom: 17px; left: 20px; color: #6f929e; font: 11px/1.3 monospace; pointer-events: none; }
#view-scale { position: absolute; bottom: 17px; right: 18px; color: #7795a7; font: 11px monospace; pointer-events: none; }
.drawing-help { grid-column: 1 / -1; grid-row: 2; z-index: 7; width: 100%; height: 25px; min-height: 25px; background: #1b2430; color: #b8c3cf; display: flex; align-items: stretch; gap: 0; padding: 0; border-top: 1px solid #445263; font-size: 10px; }
.model-chip { flex: 0 0 auto; display: flex; align-items: center; padding: 0 13px; border-right: 1px solid #4b5868; border-top: 2px solid #38bdf8; background: #344152; color: #f4f7fa; font-size: 10px; font-weight: 700; letter-spacing: .15px; }
.drawing-help .command-message { min-width: 0; flex: 1 1 auto; }
.drafting-status { flex: 0 0 auto; display: grid; grid-template-columns: auto auto auto auto 17px; height: 24px; border-left: 1px solid #4b5868; }
.drafting-status button { min-height: 24px; height: 24px; border: 0; border-radius: 0; background: transparent; color: #bac5d1; padding: 1px 6px; font: 10px/1 "Segoe UI",Arial,sans-serif; }
.drafting-status button:hover { background: #344152; color: #fff; border-color: transparent; }
.drafting-toggle { display: flex; align-items: center; gap: 5px; }
.drafting-toggle[aria-pressed="true"] { background: #263e52; color: #73d2ff; box-shadow: inset 0 -2px #38bdf8; }
.drafting-toggle[aria-pressed="false"] { color: #8d9aa8; }
.drafting-menu-toggle { width: 17px; padding: 0 !important; }
.grid-glyph { width: 15px; height: 15px; display: inline-block; background-image: linear-gradient(to right,currentColor 1px,transparent 1px),linear-gradient(to bottom,currentColor 1px,transparent 1px); background-size: 5px 5px; background-position: 0 0; opacity: .95; }
.osnap-glyph { position: relative; width: 13px; height: 13px; display: inline-block; border: 1.5px solid currentColor; }
.osnap-glyph::after { content: ''; position: absolute; width: 5px; height: 5px; right: -4px; bottom: -4px; border: 1px solid currentColor; background: #1b2430; transform: rotate(45deg); }
.ortho-glyph { position: relative; width: 14px; height: 14px; display: inline-block; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; box-sizing: border-box; }
.ortho-glyph::after { content: ''; position: absolute; left: 3px; bottom: 3px; width: 7px; height: 7px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.dynamic-input-glyph { display: inline-flex; align-items: center; justify-content: center; height: 13px; padding: 0 2px; border: 1px solid currentColor; font: 700 7px/1 "Segoe UI",Arial,sans-serif; letter-spacing: -.2px; }
.osnap-menu { position: fixed; z-index: 45; width: 224px; max-height: min(520px,calc(100vh - 30px)); overflow: auto; padding: 4px 0; border: 1px solid #8793a3; border-radius: 1px; background: #f3f3f3; color: #1f2937; box-shadow: 0 5px 18px #0005; font: 12px/1.2 "Segoe UI",Arial,sans-serif; }
.osnap-menu[hidden] { display: none; }
.osnap-menu button { width: 100%; min-height: 28px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 5px; padding: 3px 9px 3px 5px; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; }
.osnap-menu button:hover,.osnap-menu button:focus-visible { background: #dbeaf5; outline: 0; }
.osnap-menu .osnap-check { color: #1876aa; font-size: 14px; text-align: center; }
.osnap-menu .osnap-mode-icon { width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; color: #148a4c; font: 13px/1 Consolas,monospace; }
.osnap-menu .osnap-shortcut { color: #687386; font-size: 10px; }
.osnap-menu hr { height: 1px; margin: 4px 0; border: 0; background: #c7cdd5; }
.osnap-menu .osnap-menu-action { grid-template-columns: 25px minmax(0,1fr); color: #334155; }
.osnap-override-menu { position: absolute; z-index: 30; width: 210px; }
.drafting-settings-dialog { width: min(630px,calc(100vw - 24px)); padding: 0; border: 1px solid #687384; border-radius: 2px; background: #f2f2f2; color: #111; box-shadow: 0 20px 55px #020617a6; font: 12px/1.25 "Segoe UI",Arial,sans-serif; }
.drafting-settings-dialog::backdrop { background: #02061780; }
.drafting-settings-dialog form { display: grid; grid-template-rows: 34px 31px minmax(365px,auto) 52px; max-height: calc(100vh - 24px); }
.drafting-settings-header { display: flex; align-items: center; gap: 7px; padding-left: 9px; background: #fff; }
.drafting-settings-header h2 { flex: 1; margin: 0; font-size: 12px; font-weight: 400; }
.drafting-settings-app-icon { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 2px; background: #b80f35; color: #fff; font: 700 10px/1 Arial,sans-serif; }
.drafting-settings-header button { align-self: stretch; width: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #111; font-size: 20px; font-weight: 300; }
.drafting-settings-header button:hover { border: 0; background: #e81123; color: #fff; }
.drafting-settings-tabs { display: flex; align-items: end; gap: 1px; padding: 3px 9px 0; border-bottom: 1px solid #9ba0a7; background: #f2f2f2; overflow: hidden; }
.drafting-settings-tabs button { min-width: max-content; min-height: 27px; padding: 3px 8px; border: 1px solid transparent; border-bottom: 0; border-radius: 0; background: transparent; color: #111; font-size: 11px; }
.drafting-settings-tabs button[aria-selected="true"] { border-color: #9ba0a7; background: #fff; }
.drafting-settings-tabs button:disabled { color: #737373; opacity: 1; }
.drafting-settings-panel { padding: 12px 15px 10px; overflow: auto; background: #fff; }
.drafting-settings-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.drafting-settings-dialog label { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; color: #111; font-size: 12px; }
.drafting-settings-dialog input[type="checkbox"] { width: 14px; height: 14px; min-width: 14px; margin: 0; padding: 0; accent-color: #1673c4; }
.drafting-setting-planned { color: #696969 !important; }
.drafting-osnap-modes { position: relative; min-height: 304px; margin: 0; padding: 12px 105px 12px 13px; border: 1px solid #b7b7b7; }
.drafting-osnap-modes legend { padding: 0 4px; font-size: 12px; }
.drafting-osnap-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(7,30px); column-gap: 35px; }
.drafting-osnap-mode { min-width: 0; }
.drafting-osnap-mode .osnap-mode-icon { width: 18px; flex: 0 0 18px; display: inline-flex; justify-content: center; color: #111; font: 15px/1 Consolas,monospace; }
.drafting-osnap-mode span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drafting-osnap-actions { position: absolute; top: 11px; right: 10px; display: grid; gap: 8px; }
.drafting-osnap-actions button { width: 82px; min-height: 25px; padding: 3px 7px; border: 1px solid #9b9b9b; border-radius: 0; background: #e6e6e6; color: #111; font-size: 11px; }
.drafting-osnap-actions button:hover { background: #d8ecfb; border-color: #2b79b9; }
.drafting-osnap-information { display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 9px; min-height: 45px; margin: 8px 0 0 4px; }
.drafting-osnap-information > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #168bd2; color: #fff; font: 700 17px/1 Georgia,serif; }
.drafting-osnap-information p { margin: 0; font-size: 11px; line-height: 1.25; }
.drafting-settings-footer { display: grid; grid-template-columns: auto 1fr repeat(3,76px); align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid #c4c4c4; background: #f2f2f2; }
.drafting-settings-footer button { min-height: 28px; padding: 4px 10px; border: 1px solid #a0a0a0; border-radius: 0; background: #e9e9e9; color: #111; font-size: 11px; }
.drafting-settings-footer button:hover:enabled { background: #d8ecfb; border-color: #277bb9; }
.drafting-settings-footer button.primary { outline: 1px solid #1673c4; background: #f5f5f5; }
@media (max-width: 600px) {
  .drafting-settings-dialog form { grid-template-rows:34px 31px minmax(310px,1fr) 52px }.drafting-settings-tabs{overflow-x:auto}.drafting-settings-switches{grid-template-columns:1fr}.drafting-osnap-modes{padding-right:13px}.drafting-osnap-grid{column-gap:10px}.drafting-osnap-actions{position:static;display:flex;margin:8px 0}.drafting-settings-footer{grid-template-columns:auto 1fr repeat(2,65px)}#drafting-settings-help{display:none}
}
aside { background: #fff; border-left: 1px solid #c8d2df; overflow: auto; min-width: 0; }
#tool-sidebar { position: relative; }
.sidebar-resize-handle { position: absolute; z-index: 8; top: 28px; bottom: 0; width: 7px; outline: 0; touch-action: none; cursor: ew-resize; }
#tool-sidebar[data-dock="left"] .sidebar-resize-handle { right: 0; }
#tool-sidebar[data-dock="right"] .sidebar-resize-handle { left: 0; }
.sidebar-resize-handle::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .12s, box-shadow .12s; }
.sidebar-resize-handle:hover::after,.sidebar-resize-handle:focus-visible::after,.workspace.sidebar-resizing .sidebar-resize-handle::after { background: #26b9ff; box-shadow: 0 0 5px #26b9ff; }
.workspace.sidebar-resizing { cursor: ew-resize; user-select: none; }
.workspace.sidebar-resizing iframe,.workspace.sidebar-resizing canvas { pointer-events: none; }
.aside-heading { position: sticky; top: 0; z-index: 3; min-height: 28px; padding: 1px 4px 1px 8px; background: #263143; border-bottom: 1px solid #172131; display: grid; grid-template-columns: 1fr auto 24px 24px; align-items: center; gap: 4px; color: #f2f5fa; font-size: 10px; font-weight: 500; letter-spacing: .2px; }
.aside-heading > span { color: #f2f5fa; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.aside-heading > span:nth-child(2) { color: #b5c0cf; font-size: 9px; }
.aside-heading .chrome-button { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; color: #dce5ef; font-size: 15px; }
.aside-heading .chrome-button:hover { background: #3c4b60; color: #fff; }
aside > section, aside > .tool-section { padding: 12px; border-bottom: 1px solid #e1e7ef; scroll-margin-top: 32px; }
.ai-palette { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid #111923; background: #232d3a; color: #2a364a; box-shadow: -3px 0 10px #05070b38; font-family: 'Segoe UI',Arial,sans-serif; font-size: 13.333px; }
.workspace.ai-left .ai-palette { border-left: 0; border-right: 1px solid #111923; box-shadow: 3px 0 10px #05070b38; }
.ai-palette[hidden] { display: none; }
.ai-palette-heading { flex: 0 0 25px; display: flex; align-items: center; justify-content: space-between; padding-left: 9px; background: #303946; color: #f5f7fa; font-size: 11px; }
.ai-palette-heading strong { flex: 1; font-weight: 400; }
.ai-palette-heading button { height: 24px; width: 28px; min-width: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 19px; }
.ai-palette-heading button:hover { background: #3c4b60; }
.ai-palette-heading #close-ai-palette:hover { background: #c64242; }
/* Form_AI_Chat.ApplyVisualStyle / LayoutAccordionSections: logical pixels, no extra DPI multiplier. */
.ai-palette-accordion { flex: 1; min-height: 0; overflow: auto; }
.ai-palette-accordion > section { min-width: 0; margin: 0 0 2px; padding: 0; overflow: hidden; }
.ai-palette-accordion > section:last-child { margin-bottom: 0; }
.ai-palette h2 { height: 34px; margin: 0; padding: 0; font-size: 12px; }
.ai-palette .ai-section-toggle { display: flex; width: 100%; height: 34px; justify-content: flex-start; gap: 5px; padding: 0 8px; border: 1px solid #465465; border-radius: 0; background: #2b3949; color: white; font: 700 12px 'Segoe UI Semibold','Segoe UI',sans-serif; text-align: left; overflow: hidden; }
.ai-palette .ai-section-toggle > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ai-palette .ai-section-toggle[aria-expanded="true"] { background: #2f4863; border-color: #537699; }
.ai-palette .ai-section-toggle:hover { background: #3b526c; }
.ai-palette .ai-section-toggle:active { background: #1c5797; }
.ai-section-arrow { flex: 0 0 8px; width: 8px; height: 8px; background: currentColor; clip-path: polygon(15% 0,100% 50%,15% 100%); }
[aria-expanded="true"] > .ai-section-arrow { transform: rotate(90deg); }
.ai-section-body { min-height: 0; overflow: hidden; background: #f7f9fc; border: 1px solid #adb6c2; }
#ai-explorer-body { padding: 12px 17px; }
#ai-palette-tree { height: 100%; overflow: auto; background: #fff; padding: 1px 3px; }
.ai-palette-tree-branch { width: max-content; min-width: 100%; margin: 0; padding: 0; list-style: none; }
.ai-palette-tree-branch .ai-palette-tree-branch { min-width: 0; padding-left: 19px; }
.ai-palette-tree-branch li { position: relative; margin: 0; padding: 0; }
.ai-palette-tree-row { display: flex; align-items: center; min-height: 20px; position: relative; }
.ai-palette-tree-branch li::before { content: ''; position: absolute; top: 0; bottom: 0; left: 8px; border-left: 1px dotted #b9c2cb; }
.ai-palette-tree-branch li:last-child::before { height: 10px; bottom: auto; }
.ai-palette-tree-row::before { content: ''; position: absolute; left: 8px; width: 11px; top: 10px; border-top: 1px dotted #b9c2cb; }
.ai-palette .ai-tree-toggle { position: relative; flex: 0 0 10px; width: 10px; min-width: 10px; height: 10px; padding: 0; margin: 0 5px 0 3px; border: 1px solid #9ba8b7; border-radius: 0; background: white; }
.ai-tree-toggle::before { content: ''; position: absolute; width: 6px; height: 1px; background: #728095; }
.ai-tree-toggle[aria-expanded="false"]::after { content: ''; position: absolute; width: 1px; height: 6px; background: #728095; }
.ai-tree-spacer { flex: 0 0 18px; }
.ai-palette-tree-branch button[data-ai-node] { position: relative; display: block; width: auto; min-height: 20px; padding: 0 2px; border: 0; border-radius: 0; background: transparent; color: #2a364a; font: inherit; text-align: left; white-space: nowrap; }
.ai-palette-tree-branch button[data-ai-node]:hover { background: #eaf0f7; }
.ai-palette-tree-branch button[data-ai-node][aria-selected="true"] { background: #e4e8ed; outline: 1px dotted #9aa9ba; outline-offset: -1px; }
.ai-palette-tree-branch button[data-ai-node]:focus-visible { outline: 1px solid #1c5797; }
#ai-chat-body { display: flex; flex-direction: column; }
.ai-palette-chat-toolbar { display: flex; flex: 0 0 52px; min-height: 52px; }
.ai-palette-chat-toolbar > * { flex: 1 1 50%; min-width: 0; }
.ai-palette-chat-toolbar button { border: 0; border-radius: 0; background: #ecf0f5; color: #2a4563; white-space: normal; padding: 4px 12px; font: 700 12.667px 'Segoe UI Semibold','Segoe UI',sans-serif; }
#ai-palette-subtitle { padding: 5px 12px; color: #606c80; font-size: 12.667px; overflow: auto; }
#ai-palette-context { flex: 0 0 36px; padding: 8px 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #111; font-size: 12px; font-weight: 700; }
#ai-palette-examples-panel { flex: 0 1 150px; min-height: 55px; margin: 0 17px 12px; overflow: auto; background: #f5f8fc; }
#ai-palette-examples { white-space: pre-wrap; margin: 6px 0 0; font: inherit; }
#ai-palette-log { flex: 1; min-height: 24px; overflow: auto; margin: 0 17px 17px; padding: 2px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.333px/1.3 'Segoe UI',sans-serif; }
.ai-chat-message { margin: 0 0 10px; }
.ai-chat-message strong { display: block; font-weight: 700; }
.ai-chat-system { text-align: center; }
.ai-chat-system strong { color: gray; }
.ai-chat-user { text-align: right; }
.ai-chat-user strong { color: #1c5797; }
.ai-chat-assistant strong { color: #20a162; }
#ai-prompt-body { display: flex; flex-direction: column; padding: 12px 17px 9px; }
#ai-palette-prompt-status { display: block; flex: 0 0 auto; min-height: 20px; line-height: 18px; margin: 0 0 4px; color: #111; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-palette-compose { display: flex; flex: 1; min-width: 0; min-height: 68px; gap: 19px; }
#ai-palette-input { flex: 1 1 0; width: 0; min-width: 0; resize: none; border: 0; padding: 3px; background: #fff; color: #2a364a; font: inherit; overflow-y: auto; }
.ai-palette-actions { display: flex; flex: 0 0 99px; flex-direction: column; justify-content: space-between; gap: 6px; width: 99px; }
.ai-palette-actions button,.ai-palette-account .ai-section-body button,.ai-palette-shared-actions button { min-height: 34px; padding: 4px 8px; border: 0; border-radius: 0; background: #ecf0f5; color: #2a4563; font: 700 12.667px 'Segoe UI Semibold','Segoe UI',sans-serif; }
.ai-palette-actions button { height: 42px; flex-shrink: 1; }
.ai-palette-prompt-footer { flex: 0 0 22px; display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 6px; }
#ai-palette-reselect-row { display: flex; flex-direction: row; align-items: center; gap: 3px; margin: 0; font-size: 12px; white-space: nowrap; }
#ai-palette-reselect { margin: 0; width: 13px; height: 13px; accent-color: #1c5797; }
#ai-palette-progress { min-width: 0; flex: 1; height: 8px; }
.ai-palette-shared-actions { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 6px; margin-top: 3px; }
.ai-palette-shared-actions:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
.ai-palette-shared-actions button { min-height: 25px; }
.ai-palette #ai-palette-send { background: #1c5797; color: #fff; }
.ai-palette #ai-palette-send:hover:enabled { background: #2466ac; }
.ai-palette button:disabled { opacity: .55; }
.ai-palette #ai-palette-voice-command[data-recording="true"],.ai-palette #ai-palette-voice-prompt[data-recording="true"] { background: #a52037; color: #fff; }
#ai-account-body { padding: 10px 17px; overflow: auto; }
.ai-palette-account .ai-section-body button { display: block; width: 100%; margin: 7px 0 0; white-space: normal; }
.ai-palette-account p { margin: 5px 0; color: #9b3b08; line-height: 1.35; }
.ai-palette-error { flex: 0 0 auto; max-height: 100px; overflow: auto; margin: 0; padding: 7px 9px; background: #ffe6e8; color: #a51e2a; font-size: 12px; }
.ai-guide-dialog { width: min(840px,95vw); max-height: 90dvh; padding: 0; border: 1px solid #537699; border-radius: 0; background: #f7f9fc; color: #2a364a; font: 13.333px 'Segoe UI',sans-serif; }
.ai-guide-dialog::backdrop { background: #07122180; }
.ai-guide-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: #2f4863; color: white; }
.ai-guide-dialog h2 { font-size: 15px; margin: 0; }
.ai-guide-dialog > header button { padding: 2px 7px; background: transparent; color: white; border: 0; }
.ai-guide-content { max-height: 72dvh; overflow: auto; padding: 15px 20px; }
.ai-guide-content section { margin: 0 0 20px; }
.ai-guide-content h3 { font-size: 14px; margin: 0 0 6px; }
.ai-guide-content p { white-space: pre-wrap; margin: 5px 0 10px; line-height: 1.5; }
.ai-guide-content button { display: block; text-align: left; white-space: normal; margin: 5px 0; background: white; color: #1c5797; border-radius: 0; }
.ai-guide-dialog footer { padding: 10px 20px; border-top: 1px solid #c9d3df; color: #606c80; }
.xref-palette { min-width: 300px; display: grid; grid-template-rows: 26px 34px minmax(180px,44%) 10px minmax(160px,1fr); overflow: hidden; border-left: 1px solid #111923; background: #303b4d; color: #eef3f8; box-shadow: -3px 0 10px #05070b38; }
.xref-palette[hidden] { display: none; }
.xref-palette-heading { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; border-bottom: 1px solid #111923; background: #263143; }
.xref-palette-heading button { width: 24px; min-width: 24px; height: 25px; min-height: 25px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #dce5ef; font-size: 18px; }
.xref-palette-heading button:hover { background: #c64242; color: #fff; }
.xref-palette-heading strong { padding-left: 4px; overflow: hidden; color: #f4f7fb; font-size: 10px; font-weight: 500; letter-spacing: .2px; text-overflow: ellipsis; white-space: nowrap; }
.xref-palette-toolbar { display: flex; align-items: center; gap: 2px; padding: 3px 6px; border-bottom: 1px solid #1c2634; background: #354154; }
.xref-palette-toolbar button { width: 25px; min-width: 25px; height: 25px; min-height: 25px; padding: 3px; border-color: transparent; background: transparent; }
.xref-palette-toolbar button:hover:enabled { border-color: #5f7188; background: #46546a; }
.xref-palette-toolbar .icon { width: 17px; height: 17px; color: #84d1ff; }
.xref-toolbar-separator { width: 1px; height: 19px; margin: 0 3px; background: #1d2735; }
.xref-palette > section { min-height: 0; padding: 5px 8px 7px; border: 0; background: #303b4d; }
.xref-file-section,.xref-details-section { display: grid; grid-template-rows: 24px minmax(0,1fr); }
.xref-file-section > header,.xref-details-section > header { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; border: 1px solid #17202d; background: #1f2a39; color: #f4f7fb; font-size: 11px; }
.xref-reference-table { min-height: 0; overflow: auto; border: 1px solid #182230; border-top: 0; background: #3a4659; scrollbar-color: #65738a #303b4d; }
.xref-reference-header,.xref-reference-row { min-width: 330px; display: grid; grid-template-columns: minmax(124px,1fr) 70px 58px 66px; }
.xref-reference-header { position: sticky; top: 0; z-index: 1; min-height: 24px; background: #465267; color: #fff; font-size: 10px; }
.xref-reference-header span { display: flex; align-items: center; min-width: 0; padding: 3px 7px; border-right: 1px solid #263142; white-space: nowrap; }
.xref-reference-row { width: 100%; min-height: 23px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #f1f5f9; font-size: 10px; text-align: left; }
.xref-reference-row:hover { border: 0; background: #46556b; }
.xref-reference-row[aria-selected="true"] { background: #176a9b; }
.xref-reference-row span { min-width: 0; overflow: hidden; padding: 4px 6px; text-overflow: ellipsis; white-space: nowrap; }
.xref-reference-row .xref-reference-name > span { padding: 0; }
.xref-reference-name { display: flex; align-items: center; gap: 5px; }
.xref-reference-name .icon { width: 15px; min-width: 15px; height: 15px; color: #8bd3ff; }
.xref-reference-status.loaded { color: #b6f2cb; }
.xref-reference-status.unresolved,.xref-reference-status.unloaded { color: #ffd37a; }
.xref-palette-splitter { display: flex; align-items: center; justify-content: center; border-top: 1px solid #121a25; border-bottom: 1px solid #121a25; background: #202b39; color: #8c9aad; font-size: 8px; letter-spacing: 1px; }
.xref-reference-details { min-height: 0; overflow: auto; border: 1px solid #182230; border-top: 0; background: #3a4659; }
.xref-reference-details.empty { display: flex; align-items: center; justify-content: center; padding: 16px; color: #aab7c8; font-size: 10px; text-align: center; }
.xref-reference-details dl { display: grid; grid-template-columns: 92px minmax(0,1fr); margin: 0; font-size: 10px; }
.xref-reference-details dt,.xref-reference-details dd { min-height: 24px; margin: 0; padding: 5px 7px; border-bottom: 1px solid #303b4d; }
.xref-reference-details dt { color: #c7d0dd; background: #344052; }
.xref-reference-details dd { overflow-wrap: anywhere; color: #f3f6fa; }
h2 { margin: 0 0 12px; font-size: 13px; font-weight: 700; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section-title > span { font-size: 11px; color: #627086; }
.muted, .hint { font-size: 12px; color: var(--muted); line-height: 1.65; }
.hint { margin: 11px 0 0; font-size: 11px; }
aside details > summary { font-size: 12px; font-weight: 500; color: #285785; cursor: pointer; line-height: 1.5; }
aside details:not(.tool-section) { margin-top: 12px; }
pre { font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: #52647c; max-height: 240px; overflow: auto; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); margin-top: 12px; }
input { min-width: 0; max-width: 100%; border: 1px solid #c9d4e2; border-radius: 3px; padding: 8px; color: #243044; background: #fbfcfe; }
input:disabled { color: #748092; background: #f1f4f8; }
input[type="file"] { padding: 5px; font-size: 10px; }
input[type="file"]::file-selector-button { border: 1px solid #c9d4e2; border-radius: 2px; padding: 5px; background: #fff; color: #243044; font: inherit; }
.parameters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 13px; }
.actions button { font-size: 11px; padding: 7px 9px; }
.property { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; font-size: 12px; margin: 8px 0; line-height: 1.5; }
.property span { color: #67768b; }
.property strong { font-weight: 500; color: #243044; overflow-wrap: anywhere; }
.block-attribute-editor { border-top: 1px solid #d7deea; margin-top: 10px; padding-top: 10px; display: grid; gap: 7px; }
.block-attribute-editor>label { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 7px; align-items: center; font-size: 11px; }
.block-attribute-editor>b { margin-top: 3px; color: #52647a; font-size: 10px; text-transform: uppercase; letter-spacing: .35px; }
.block-attribute-editor input, .block-attribute-editor select { min-width: 0; width: 100%; padding: 5px 6px; border: 1px solid #b8c3d2; border-radius: 2px; background: #fbfcfe; color: #243044; }
.block-editor-panel { background:#eef3f8; color:#243044; }
.block-editor-panel .section-title h2 { margin:0; }
.block-editor-panel .section-title button { width:24px; min-width:24px; height:24px; min-height:24px; padding:0; }
.block-editor-panel select { width:100%; min-width:0; padding:5px; border:1px solid #b8c3d2; background:#fff; color:#243044; }
.block-editor-panel #block-editor-entity { font:11px/1.4 Consolas,monospace; }
.block-editor-panel .actions button { flex:1 1 auto; }
.block-editor-context { position:absolute; z-index:12; top:10px; left:50%; transform:translateX(-50%); max-width:calc(100% - 24px); display:flex; align-items:center; gap:7px; padding:6px 8px 6px 11px; border:1px solid #826400; border-radius:3px; background:#fff3b8; color:#2d2715; box-shadow:0 3px 14px #0008; }
.block-editor-context[hidden] { display:none; }
.block-editor-context > div { min-width:150px; display:grid; line-height:1.2; }
.block-editor-context strong { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.block-editor-context span { color:#6c5a20; font-size:10px; }
.block-editor-context button { min-height:26px; padding:4px 9px; white-space:nowrap; }
.block-editor-context button.primary { border-color:#1976b8; background:#1688cf; color:#fff; }
.block-editor-attribute { display:grid; gap:7px; margin-top:12px; padding-top:10px; border-top:1px solid #c5cfdb; }
.block-editor-attribute[hidden] { display:none; }
.block-editor-attribute label { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:7px; margin:0; }
.block-editor-attribute input { padding:5px 6px; }
.block-editor-attribute button { justify-self:end; }
.cad-properties { padding: 5px 16px 10px !important; background: #3c4759; color: #f4f7fb; border-bottom-color: #202a38; }
.cad-property-toolbar { height: 25px; display: grid; grid-template-columns: minmax(0,1fr) 24px 24px 24px; align-items: center; gap: 2px; margin: 5px 0 6px; }
.cad-object-type { min-width: 0; height: 23px; padding: 3px 22px 3px 5px; border: 1px solid #1e2a3a; background: #58677b; color: #fff; font-size: 11px; line-height: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.cad-object-type::after { content:'▾'; position:absolute; right:6px; color:#dbe4ef; }
.cad-property-toolbar button { width: 24px; min-width: 24px; height: 23px; min-height: 23px; padding: 0; border: 0; background: transparent; color: #dce8f6; font-size: 17px; font-weight: 400; }
.cad-property-toolbar button:hover:enabled { background:#526278; border-color:transparent; }
.cad-property-toolbar button:disabled { color:#8390a2; }
.cad-property-empty { min-height: 66px; padding: 12px 6px; color: #c2cbd8; font-size: 11px; line-height: 1.5; }
.cad-property-group { margin-top: 5px; }
.cad-property-group-title { width: 100%; height: 20px; min-height: 20px; justify-content: space-between; padding: 1px 5px; border: 0; border-radius: 0; background: #253143; color: #fff; font-size: 11px; font-weight: 700; text-align: left; }
.cad-property-group-title:hover:enabled { background:#2c394d; border-color:transparent; }
.cad-property-group-title::after { content:'▾'; color:#e5ebf3; font-size:10px; }
.cad-property-group.collapsed .cad-property-group-title::after { content:'▸'; }
.cad-property-group.collapsed .cad-property-grid { display:none; }
.cad-property-grid { border-left: 1px solid #273244; border-top: 1px solid #273244; }
.cad-property-row { min-height: 20px; display:grid; grid-template-columns: 46% 54%; font-size:11px; line-height:18px; }
.cad-property-row > label,.cad-property-row > .cad-property-label { min-width:0; margin:0; padding:0 4px 0 20px; border-right:1px solid #273244; border-bottom:1px solid #273244; color:#e8edf5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cad-property-value { min-width:0; min-height:20px; padding:0 4px; border-right:1px solid #273244; border-bottom:1px solid #273244; background:#455165; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cad-property-value.readonly { color:#aeb9c8; background:#3e495b; }
.cad-property-value input,.cad-property-value select,.cad-property-value button { width:100%; height:19px; min-height:19px; margin:0; padding:0 3px; border:0; border-radius:0; background:transparent; color:#fff; font-size:11px; font-weight:400; text-align:left; }
.cad-property-value input:focus,.cad-property-value select:focus { outline:1px solid #55a9ee; outline-offset:-1px; background:#f8fbff; color:#111827; }
.cad-property-value select option { background:#eef2f7; color:#111827; }
.cad-property-value button { display:flex; justify-content:flex-start; gap:5px; }
.cad-property-value button:hover:enabled { background:#536177; border:0; }
.cad-property-value .property-color-chip { width:14px; height:14px; }
.cad-property-value:has(.cad-property-text-editor-button) { display:flex; align-items:center; padding-right:0; }
.cad-property-value .cad-property-editor-value { min-width:0; flex:1; cursor:pointer; }
.cad-property-value .cad-property-text-editor-button { width:19px; min-width:19px; height:19px; justify-content:center; padding:0; border-left:1px solid #69798d; color:#dceafa; font-size:14px; }
.property-attribute-text-dialog { width:min(470px,calc(100vw - 32px)); padding:0; border:1px solid #94a6bb; background:#eef3f8; color:#172334; box-shadow:0 12px 32px #0008; }
.property-attribute-text-dialog::backdrop { background:#10192377; }
.property-attribute-text-header { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:#344256; color:#fff; }
.property-attribute-text-header h2 { margin:0; font-size:14px; font-weight:600; }
.property-attribute-text-header button { border:0; background:transparent; color:#fff; font-size:20px; }
.property-attribute-text-tools { display:flex; align-items:center; gap:18px; padding:10px 12px 5px; font-size:12px; }
.property-attribute-text-tools label { display:flex; align-items:center; gap:6px; }
.property-attribute-text-tools input[type=number] { width:75px; height:25px; }
.property-attribute-text-content-label { display:block; margin:7px 12px 3px; font-size:12px; }
#property-attribute-text-content { display:block; width:calc(100% - 24px); min-height:90px; margin:0 12px; padding:8px; resize:vertical; border:1px solid #99a8ba; background:#fff; color:#172334; font:14px/1.4 Arial,sans-serif; }
#property-attribute-text-message { min-height:18px; margin:5px 12px; font-size:11px; color:#9b2929; }
.property-attribute-text-actions { display:flex; justify-content:flex-end; gap:7px; padding:7px 12px 10px; }
.property-attribute-text-actions button { min-width:65px; }
.statline { font-size: 12px; line-height: 1.9; color: #52647a; }
.statline strong { font-weight: 700; color: #243044; }
.font-need { margin: 0 0 9px; line-height: 1.6; }
.font-need strong { display: block; color: #243044; font-size: 12px; font-weight: 500; }
.font-need div { font-size: 11px; color: var(--muted); }
#font-status { overflow-wrap: anywhere; }
.font-access { max-width: 100%; white-space: normal; margin-top: 12px; font-size: 11px; line-height: 1.5; text-align: left; }
#font-fallback { padding: 11px; background: #eff6ff; border-left: 2px solid var(--brand); line-height: 1.5; }
#font-fallback .hint { margin-top: 4px; }
#font-fallback[hidden] { display: none; }
.modal-dialog { width: min(480px,calc(100vw - 28px)); padding: 24px; border: 1px solid #48657f; border-radius: 8px; background: #172230; color: #edf5fc; box-shadow: 0 24px 70px #020617e6; font: 13px/1.5 "Segoe UI",Arial,sans-serif; text-align: center; }
.modal-dialog::backdrop { background: #020617c7; }
.modal-dialog-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border: 1px solid #39bdf8; border-radius: 10px; color: #6bd2ff; font-size: 25px; font-weight: 800; }
.modal-dialog h2 { margin: 0 0 10px; color: #fff; font-size: 20px; }
.modal-dialog p { margin: 7px 0; }
.modal-dialog-note { color: #91a4bd; }
.modal-dialog-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.session-dialog-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: min(300px,100%); margin: 20px auto 0; }
.session-dialog-actions > * { box-sizing: border-box; width: 100%; }
.session-dialog-actions #session-account { grid-column: 1 / -1; }
.save-error-detail { max-width: min(620px,75vw); max-height: 180px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #ffd4d4; background: #381c22; border: 1px solid #8b3d4a; border-radius: 4px; padding: 9px 11px; font: 12px/1.45 Consolas,monospace; }
.recovery-drawing-list { display: grid; gap: 8px; max-height: 40vh; overflow: auto; padding: 8px 0; }
.recovery-drawing-list label { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.recovery-drawing-list input { flex: none; }
.recovery-storage-notice { position: fixed; bottom: 30px; left: 10px; right: 10px; z-index: 40; margin: 0; padding: 8px 12px; border: 1px solid #a8772d; border-radius: 4px; background: #382b15; color: #ffdc98; font: 12px/1.4 Arial,sans-serif; }
.open-error-dialog { width: min(600px,calc(100vw - 28px)); text-align: left; }
.open-error-dialog .modal-dialog-mark,.open-error-dialog h2,.open-error-dialog > p { text-align: center; }
.open-error-context { margin: 14px 0; border: 1px solid #344c60; border-radius: 5px; overflow: hidden; }
.open-error-context div { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 8px; padding: 7px 10px; border-bottom: 1px solid #2a3e50; }
.open-error-context div:last-child { border-bottom: 0; }
.open-error-context dt { color: #91a9bc; }
.open-error-context dd { margin: 0; overflow-wrap: anywhere; color: #edf5fc; }
.open-error-dialog details { margin-top: 10px; }
.open-error-dialog summary { cursor: pointer; color: #a9c3d6; }
.open-error-dialog .save-error-detail { max-width: 100%; margin: 8px 0 0; }
.modal-dialog-actions button,.modal-dialog-actions a { min-width: 100px; padding: 8px 14px; border: 1px solid #4e718d; border-radius: 4px; background: #24364a; color: #edf5fc; font: inherit; text-decoration: none; }
.modal-dialog-actions button:hover:enabled,.modal-dialog-actions a:hover { border-color: #40bff8; background: #29445c; }
.modal-dialog-actions button:disabled { opacity: .45; }
.update-required-dialog { position: fixed; inset: 0; width: min(560px,calc(100vw - 28px)); margin: auto; border: 2px solid #39bdf8; box-shadow: 0 0 0 1px #07131f,0 28px 90px #000; }
.update-required-dialog::backdrop { background: #02070ded; }
.update-required-dialog .modal-dialog-mark { width: 58px; height: 58px; border-width: 2px; border-radius: 50%; background: #112e43; font-size: 34px; }
.update-required-shortcut { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 22px 0 14px !important; color: #cfeeff; font-size: 20px; font-weight: 700; }
.update-required-shortcut kbd { min-width: 58px; padding: 10px 14px; border: 1px solid #8db2cf; border-bottom-width: 4px; border-radius: 6px; background: #284b66; color: #fff; box-shadow: 0 3px 0 #08131d; font: 700 18px/1 "Segoe UI",Arial,sans-serif; }
.update-mobile-reload { width: min(320px,100%); min-height: 52px; margin: 18px auto 12px; padding: 10px 18px; border: 1px solid #83d9ff; border-radius: 7px; background: #087caf; color: #fff; box-shadow: 0 3px 0 #064969; font: 700 16px/1.2 "Segoe UI",Arial,sans-serif; }
.update-mobile-reload:hover:enabled,.update-mobile-reload:focus-visible { border-color: #d8f5ff; background: #0794d0; outline: 2px solid #d8f5ff; outline-offset: 2px; }
.update-mobile-reload:disabled { opacity: .7; cursor: wait; }
@media (max-width: 600px) {
  .update-required-dialog { width: calc(100vw - 24px); padding: 22px 18px; }
  .update-required-dialog h2 { font-size: 19px; }
  .update-required-dialog .modal-dialog-mark { width: 52px; height: 52px; font-size: 30px; }
}
.command-console { position: absolute; z-index: 10; left: 50%; bottom: 8px; width: 52%; height: 30px; min-width: min(360px,calc(100% - 24px)); max-width: calc(100% - 24px); min-height: 30px; max-height: calc(100% - 24px); transform: translateX(-50%); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #536174; border-radius: 1px; background: rgba(20,28,38,.96); color: #dbe4ef; box-shadow: 0 3px 12px #02061773; font: 11px/1.35 "Segoe UI",Arial,sans-serif; }
.command-console.expanded { background: rgba(27,36,47,.98); }
.command-transcript { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; border-bottom: 1px solid #536174; }
.command-console:not(.expanded) .command-transcript { display: none; }
.command-message { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; overflow: hidden; background: #1b2430; }
#command-message { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b8c3cf; font: 10px/1.2 Consolas,monospace; }
#lts-value { flex: 0 0 auto; color: #55c8fb; font: 10px/1.2 Consolas,monospace; }
.command-row { display: flex; align-items: center; min-height: 28px; flex: 0 0 28px; gap: 3px; padding: 1px 3px; }
.command-row label { margin: 0 2px; color: #dbe4ef; font: 11px/1.3 Consolas,monospace; flex: 0 1 auto; white-space: nowrap; }
.command-grip { width: 10px; overflow: hidden; color: #91a4bd; font-size: 13px; cursor: ew-resize; }
#command-history { width: 18px; min-width: 18px; height: 23px; min-height: 23px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #b8c5d6; font-size: 15px; font-weight: 400; }
#command-history:hover { background: #334155; color: #fff; }
#command-history[aria-expanded="true"] { transform: rotate(180deg); }
.command-input-home { position: relative; flex: 1 1 auto; align-self: stretch; display: flex; min-width: 0; }
#command-input-standby { display: none; position: absolute; inset: 1px; z-index: 0; align-items: center; padding: 2px 6px; overflow: hidden; color: #6e7780; background: #d6d9dc; font: italic 12px/1.3 Consolas,monospace; text-overflow: ellipsis; white-space: nowrap; }
#command-input { flex: 1 1 auto; width: 0; height: 24px; min-height: 24px; padding: 2px 6px; background: #d6d9dc; color: #111827; border: 1px solid #8c969f; border-radius: 0; font: italic 12px/1.3 Consolas, monospace; }
#command-input:focus { background: #f2f3f4; font-style: normal; outline: 1px solid #59b9ef; outline-offset: -1px; }
#command-input::placeholder { color: #91a4bd; }
.command-console[data-input-location="dynamic"] #command-input-standby { display: flex; }
.command-console[data-input-location="dynamic"] #command-prompt { display: none; }
.command-console[data-input-location="dynamic"] { display: none; }
.dynamic-input-field #command-input { width: 100%; min-width: 146px; height: 23px; min-height: 23px; border: 0; background: #d9dddc; color: #17202a; font-style: normal; outline: none; }
.dynamic-input-field #command-input:focus { background: #e7e9e7; outline: none; }
.command-suggestions { position: absolute; z-index: 13; max-height: min(190px,48%); overflow: auto; padding: 1px; border: 1px solid #a1a9b0; background: rgba(69,82,96,.97); color: #f3f5f7; box-shadow: 0 5px 13px #0206178f; font: 13px/1.2 Consolas,monospace; scrollbar-color: #b8bec3 #596775; scrollbar-width: thin; }
.command-suggestions[hidden] { display: none; }
.command-suggestion { width: 100%; min-height: 27px; display: block; overflow: hidden; padding: 5px 16px; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.command-suggestion:hover,.command-suggestion[aria-selected="true"] { background: #334353; color: #fff; outline: 1px solid #89949e; outline-offset: -1px; }
.command-suggestion-name { color: inherit; font-weight: 600; }
#command-log { flex: 1 1 auto; width: 100%; min-height: 0; margin: 0; padding: 7px 8px; border: 0; background: #d6d9dc; color: #18202a; overflow: auto; font: 12px/1.35 Consolas,monospace; white-space: pre-wrap; }
.command-resize-handle { position: absolute; z-index: 2; touch-action: none; }
.command-resize-handle:focus-visible { outline: 1px solid var(--focus); outline-offset: -1px; }
.command-resize-top { top: -4px; left: 8px; right: 8px; height: 8px; cursor: ns-resize; }
.command-resize-left,.command-resize-right { top: 5px; bottom: 5px; width: 8px; cursor: ew-resize; }
.command-resize-left { left: -4px; }
.command-resize-right { right: -4px; }
.command-console.resizing { user-select: none; box-shadow: 0 0 0 1px #38bdf8,0 4px 16px #02061799; }
@media (max-width: 1100px) {
  .topbar-runtime, #plugin-status:not([data-state="absent"]), .planned-command { display: none; }
  .ribbon-group { padding-right: 7px; padding-left: 7px; }
}
@media (max-width: 800px) {
  .topbar { grid-template-columns: auto minmax(150px, 1fr) auto; gap: 4px; padding-right: 4px; padding-left: 4px; }
  .product-name { display: none; }
  .workspace.sidebar-open.sidebar-left,.workspace.sidebar-open.sidebar-right { grid-template-columns: minmax(0, 1fr); }
  .workspace.sidebar-open.sidebar-left .drawing,.workspace.sidebar-open.sidebar-right .drawing { grid-column: 1; }
  #tool-sidebar { position: absolute; z-index: 5; top: 24px; bottom: 25px; width: min(var(--properties-width), 94%); }
  .workspace.sidebar-left #tool-sidebar { left: 0; right: auto; box-shadow: 5px 0 20px #05070b66; }
  .workspace.sidebar-right #tool-sidebar { right: 0; left: auto; box-shadow: -5px 0 20px #05070b66; }
  aside > section, aside > .tool-section { padding: 13px; }
  .aside-heading { padding-right: 13px; padding-left: 13px; }
  #ribbon-tabs > button { padding-right: 12px; padding-left: 12px; }
}
@media (max-width: 1000px) {
  .workspace.xref-palette-open,.workspace.sidebar-open.sidebar-left.xref-palette-open,.workspace.sidebar-open.sidebar-right.xref-palette-open,.workspace.ai-palette-open.ai-left,.workspace.ai-palette-open.ai-right,.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-left,.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-left,.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-right,.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-right { grid-template-columns: minmax(0,1fr); }
  .workspace.xref-palette-open .drawing,.workspace.sidebar-open.sidebar-left.xref-palette-open .drawing,.workspace.sidebar-open.sidebar-right.xref-palette-open .drawing,.workspace.ai-palette-open.ai-left .drawing,.workspace.ai-palette-open.ai-right .drawing,.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-left .drawing,.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-left .drawing,.workspace.sidebar-open.sidebar-left.ai-palette-open.ai-right .drawing,.workspace.sidebar-open.sidebar-right.ai-palette-open.ai-right .drawing { grid-column: 1; }
  .workspace.sidebar-open.ai-palette-open #tool-sidebar { position: absolute; z-index: 5; top: 24px; bottom: 25px; width: min(var(--properties-width),94%); }
  .workspace.sidebar-open.sidebar-left.ai-palette-open #tool-sidebar { left: 0; right: auto; }
  .workspace.sidebar-open.sidebar-right.ai-palette-open #tool-sidebar { right: 0; left: auto; }
  .workspace.sidebar-open:is(.sidebar-left,.sidebar-right).ai-palette-open:is(.ai-left,.ai-right) #tool-sidebar,
  .workspace.ai-palette-open:is(.ai-left,.ai-right) #ai-palette,
  .workspace.sidebar-open:is(.sidebar-left,.sidebar-right).ai-palette-open:is(.ai-left,.ai-right) #ai-palette { grid-column: 1; }
  #xref-palette,#ai-palette { position: absolute; z-index: 6; top: 24px; right: 0; bottom: 25px; width: min(var(--xref-width),94%); box-shadow: -5px 0 20px #05070b66; }
  #ai-palette { width: min(var(--ai-width),94%); }
  .workspace.ai-left #ai-palette { left: 0; right: auto; box-shadow: 5px 0 20px #05070b66; }
}
@media (max-width: 620px) {
  .topbar { grid-template-columns: auto minmax(110px, 1fr) auto; }
  .app-menu > .brand-mark { width: 35px; }
  .brand-mark img { width: 31px; height: 20px; object-position: left center; }
  .quick-access .planned-command, .quick-access .quick-history, .quick-separator { display: none; }
  #ribbon-tabs { min-width: 0; }
  #ribbon-tabs > button { flex: 1 0 auto; padding-right: 8px; padding-left: 8px; }
  #ribbon-tabs > button span { display: none; }
  .ribbon-context { flex-basis: 290px; padding: 5px 12px; }
  .space-label { display: none; }
  .drawing-help { padding-right: 8px; gap: 8px; }
  .command-console { min-width: min(280px,calc(100% - 16px)); max-width: calc(100% - 16px); bottom: 6px; }
}
@media (max-width: 370px) {
  .quick-access #document-save, .quick-access #document-save-as { display: none; }
  .language-switch { display: none; }
}
html.phone-client,html.phone-client body { width: 100%; height: 100%; height: 100dvh; overscroll-behavior: none; background: #0b1220; }
html.phone-client body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
html.phone-client .ribbon { display: none; }
html.phone-client .workspace,
html.phone-client .workspace.sidebar-open.sidebar-left,
html.phone-client .workspace.sidebar-open.sidebar-right,
html.phone-client .workspace.xref-palette-open,
html.phone-client .workspace.ai-palette-open { grid-template-columns: minmax(0,1fr) !important; }
html.phone-client .workspace .drawing { grid-column: 1 !important; grid-row: 1; }
html.phone-client #tool-sidebar,
html.phone-client #xref-palette,
html.phone-client #ai-palette { display: none; }
html.phone-client .topbar { min-height: 30px; grid-template-columns: minmax(0,1fr) auto; gap: 3px; padding: 0 3px; }
html.phone-client .topbar-tabs,
html.phone-client #ribbon-tabs,
html.phone-client .topbar-runtime,
html.phone-client #plugin-status,
html.phone-client .product-name { display: none; }
html.phone-client .topbar-leading { min-width: 0; overflow: hidden; }
html.phone-client .topbar-actions { grid-column: 2; }
html.phone-client .app-menu > .brand-mark { width: 35px; }
html.phone-client .brand-mark img { width: 31px; height: 20px; object-position: left center; }
html.phone-client .quick-access .planned-command,
html.phone-client .quick-access .quick-history,
html.phone-client .quick-separator,
html.phone-client #toggle-ribbon { display: none; }
html.phone-client .drawing-tab { height: 22px; min-height: 22px; }
html.phone-client .drawing-tab-tools .space-label,
html.phone-client #toggle-sidebar { display: none; }
html.phone-client .drawing-help { height: 24px; min-height: 24px; }
html.phone-client .model-chip { padding-inline: 8px; }
html.phone-client .drafting-status { grid-template-columns: repeat(5,auto); }
html.phone-client .drafting-status button { padding-inline: 5px; }
html.phone-client .command-console { width: min(70%,560px); min-width: min(280px,calc(100% - 16px)); bottom: 5px; }
@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  .ribbon { display: none; }
  .workspace,.workspace.sidebar-open.sidebar-left,.workspace.sidebar-open.sidebar-right,.workspace.xref-palette-open,.workspace.ai-palette-open { grid-template-columns: minmax(0,1fr) !important; }
  .workspace .drawing { grid-column: 1 !important; grid-row: 1; }
  #tool-sidebar,#xref-palette,#ai-palette { display: none; }
  .topbar { min-height: 30px; grid-template-columns: minmax(0,1fr) auto; gap: 3px; padding: 0 3px; }
  .topbar-tabs,#ribbon-tabs,.topbar-runtime,.product-name { display: none; }
  .topbar-leading { min-width: 0; overflow: hidden; }
  .topbar-actions { grid-column: 2; }
  .app-menu > .brand-mark { width: 35px; }
  .brand-mark img { width: 31px; height: 20px; object-position: left center; }
  .quick-access .planned-command,.quick-access .quick-history,.quick-separator,#toggle-ribbon { display: none; }
  .drawing-tab { height: 22px; min-height: 22px; }
  .drawing-tab-tools .space-label,#toggle-sidebar { display: none; }
  .drawing-help { height: 24px; min-height: 24px; }
  .model-chip { padding-inline: 8px; }
  .drafting-status { grid-template-columns: repeat(5,auto); }
  .drafting-status button { padding-inline: 5px; }
  .command-console { width: min(70%,560px); min-width: min(280px,calc(100% - 16px)); bottom: 5px; }
}
/* Compact CAD groups: major drawing tools + a two-row secondary grid. */
select { font: inherit; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.draw-home .ribbon-large .icon { width: 30px; height: 30px; stroke-width: 1.1; }
.draw-home .ribbon-large { min-width: 48px; }
.draw-home .ribbon-stack { gap: 0; padding: 0; }
.draw-home .ribbon-stack button { min-height: 22px; padding: 2px 5px; }
.draw-small { display: grid; grid-template-columns: repeat(2,minmax(66px,72px)); grid-template-rows: repeat(2,22px); grid-auto-flow: column; align-content: center; overflow: hidden; }
.draw-small button { min-height: 22px; justify-content: flex-start; gap: 4px; padding: 1px 5px; border-color: transparent; background: transparent; color: #cbd5e1; font-size: 11px; }
.draw-small .icon { width: 15px; height: 15px; color: #38bdf8; }
.modify-group { position: relative; }
.modify-group .ribbon-group-body { gap: 0; }
.modify-small { display: grid; grid-template-columns: repeat(3,minmax(62px,68px)); grid-template-rows: repeat(3,22px); grid-auto-flow: column; align-content: center; overflow: hidden; }
.modify-small button { min-height: 22px; justify-content: flex-start; gap: 4px; padding: 1px 5px; border-color: transparent; background: transparent; color: #cbd5e1; font-size: 11px; }
.modify-small .icon { width: 15px; height: 15px; color: #38bdf8; }
.modify-small button:disabled .icon { color: #8d99aa; }
.modify-flyout { position: fixed; z-index: 18; left: var(--modify-flyout-left, 0); top: var(--modify-flyout-top, 0); width: 270px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; padding: 6px; border: 1px solid #41516a; background: #18212d; box-shadow: 0 10px 24px #02061780; }
.modify-flyout:not([hidden]) { display: grid; }
.modify-flyout button { min-height: 29px; justify-content: flex-start; gap: 7px; padding: 4px 8px; color: #d7e0ec; border-color: transparent; background: transparent; font-size: 11px; }
.modify-flyout .icon { width: 16px; height: 16px; color: #38bdf8; }
.modify-flyout button:hover:enabled { background: #263447; }
.annotation-group { position: relative; }
.annotation-group .ribbon-group-body { gap: 0; }
.annotation-group .ribbon-large { min-width: 54px; }
.annotation-large-label { display: inline-flex; align-items: center; gap: 3px; }
.annotation-text-split { position: relative; width: 58px; display: grid; grid-template-rows: minmax(0,1fr) 14px; }
.annotation-text-split .annotation-text-command { width: 58px; min-width: 58px; padding-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.annotation-text-more { width: 58px; min-height: 14px; padding: 0; justify-content: center; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; color: #a9b6c7; background: #283342; font-size: 9px; line-height: 1; }
.annotation-text-menu { position: fixed; z-index: 24; left: var(--annotation-text-left,0); top: var(--annotation-text-top,0); width: 210px; padding: 4px; border: 1px solid #41516a; background: #18212d; box-shadow: 0 10px 24px #02061780; }
.annotation-text-menu:not([hidden]) { display: grid; gap: 2px; }
.annotation-text-menu button { min-height: 39px; display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: center; gap: 7px; padding: 4px 8px; color: #d7e0ec; border-color: transparent; background: transparent; text-align: left; }
.annotation-text-menu button:hover:enabled { background: #263447; }
.annotation-text-menu .icon { width: 22px; height: 22px; color: #9dd9ff; }
.annotation-text-menu button > span { display: grid; gap: 1px; }
.annotation-text-menu strong { font-size: 11px; font-weight: 600; }
.annotation-text-menu small { color: #93a4b8; font-size: 9px; }
.dimension-chain-split { position: relative; width: 68px; display: grid; grid-template-rows: minmax(0,1fr) 14px; }
.dimension-chain-split .dimension-chain-command { width: 68px; min-width: 68px; padding-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.dimension-chain-more { width: 68px; min-height: 14px; padding: 0; justify-content: center; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; color: #a9b6c7; background: #283342; font-size: 9px; line-height: 1; }
.dimension-chain-menu { position: fixed; z-index: 24; left: var(--dimension-chain-left,0); top: var(--dimension-chain-top,0); width: 240px; padding: 4px; border: 1px solid #41516a; background: #18212d; box-shadow: 0 10px 24px #02061780; }
.dimension-chain-menu:not([hidden]) { display: grid; gap: 2px; }
.dimension-chain-menu button { min-height: 43px; display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: center; gap: 7px; padding: 4px 8px; color: #d7e0ec; border-color: transparent; background: transparent; text-align: left; }
.dimension-chain-menu button:hover:enabled { background: #263447; }
.dimension-chain-menu .icon { width: 22px; height: 22px; color: #9dd9ff; }
.dimension-chain-menu button > span { display: grid; gap: 1px; }
.dimension-chain-menu strong { font-size: 11px; font-weight: 600; }
.dimension-chain-menu small { color: #93a4b8; font-size: 9px; }
.command-caret { margin-left: auto; color: #a9b6c7; font-size: 9px; line-height: 1; }
.annotation-small { display: grid; grid-template-rows: repeat(3,22px); align-content: center; min-width: 83px; overflow: hidden; }
.annotation-small button { min-height: 22px; justify-content: flex-start; gap: 5px; padding: 1px 4px; border-color: transparent; background: transparent; color: #cbd5e1; font-size: 11px; }
.annotation-small .icon { width: 16px; height: 16px; color: #9dd9ff; }
.annotation-small button:disabled .icon { color: #8d99aa; }
.annotation-small button span:not(.command-caret) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Full Annotate ribbon: three AutoCAD-like groups with one stable Home-sized band. */
#ribbon-home,#ribbon-insert,#ribbon-annotate,#ribbon-view { height: 90px; min-height: 90px; max-height: 90px; overflow-y: hidden; }
#ribbon-katapro { height: 90px; min-height: 90px; max-height: 90px; overflow: hidden; }
#ribbon-home > .ribbon-group > .ribbon-group-body,
#ribbon-insert > .ribbon-group > .ribbon-group-body,
#ribbon-annotate > .ribbon-group > .ribbon-group-body,
#ribbon-view > .ribbon-group > .ribbon-group-body { height: 70px; min-height: 70px; max-height: 70px; overflow: hidden; }
#ribbon-katapro > .katapro-ribbon-groups > .ribbon-group > .ribbon-group-body { height: 70px; min-height: 70px; max-height: 70px; overflow: hidden; }
#ribbon-insert > .ribbon-context,#ribbon-view > .ribbon-context { height: 70px; max-height: 70px; overflow: hidden; }
.katapro-ribbon { display: grid; grid-template-columns: 20px minmax(0,1fr) 20px; align-items: stretch; padding-right: 2px; padding-left: 2px; }
.katapro-ribbon-groups { min-width: 0; display: flex; align-items: stretch; overflow: hidden; scroll-behavior: smooth; }
.katapro-ribbon-group { position: relative; padding-right: 5px; padding-left: 5px; }
.katapro-command-grid { display: grid; grid-template-rows: repeat(3,22px); grid-auto-flow: column; grid-auto-columns: minmax(122px,148px); align-content: center; gap: 1px 2px; }
.katapro-command { min-width: 0; min-height: 22px; height: 22px; justify-content: flex-start; gap: 5px; padding: 1px 5px; border-color: transparent; background: transparent; color: #d5deea; font-size: 10px; text-align: left; }
.katapro-command-icon { flex: 0 0 16px; width: 16px; height: 16px; display: grid; place-items: center; overflow: hidden; border-radius: 2px; color: #8fdbff; background: #27384b; font-size: 10px; font-weight: 800; }
.katapro-command-icon img { display: block; width: 16px; height: 16px; object-fit: contain; }
.katapro-command-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.katapro-ribbon-scroll { align-self: stretch; min-width: 20px; width: 20px; padding: 0; border: 0; border-radius: 0; background: #172131; color: #b9c8d9; font-size: 20px; }
.katapro-ribbon-scroll:hover:enabled { background: #29384b; color: #fff; }
.katapro-ribbon-scroll:disabled { opacity: .25; }
.katapro-command-menu { position: fixed; z-index: 24; left: var(--katapro-menu-left,0); top: var(--katapro-menu-top,0); width: 420px; max-height: min(520px,70vh); grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; overflow-y: auto; padding: 6px; border: 1px solid #41516a; background: #18212d; box-shadow: 0 10px 24px #02061780; }
.katapro-command-menu:not([hidden]) { display: grid; }
.katapro-command-menu .katapro-command { min-height: 29px; height: 29px; padding: 4px 8px; }
.katapro-command-menu .katapro-command:hover:enabled { background: #263447; }
.insert-workspace { padding-left: 4px; }
.insert-workspace .ribbon-group { padding-right: 7px; padding-left: 7px; }
.insert-workspace .ribbon-group-body { align-items: stretch; gap: 3px; }
.insert-workspace .insert-primary { width: 68px; min-width: 68px; padding: 2px 3px; white-space: normal; line-height: 1.12; text-align: center; }
.insert-workspace .insert-primary .icon { width: 29px; height: 29px; color: #73cbff; stroke-width: 1.25; }
.insert-workspace .insert-primary small { color: #7fcfff; font-size: 8px; letter-spacing: .25px; }
.insert-command-stack { width: 137px; display: grid; grid-template-rows: repeat(3,22px); gap: 1px; padding-top: 1px; }
.insert-command-stack button { min-height: 22px; justify-content: flex-start; gap: 5px; padding: 1px 4px; border-color: transparent; background: transparent; color: #d7e0eb; font-size: 11px; white-space: nowrap; }
.insert-command-stack .icon { width: 16px; height: 16px; color: #75ccff; }
.insert-definition-select { width: 142px; height: 22px; align-self: flex-start; margin-top: 2px; border: 1px solid #58667a; background: #343d4c; color: #eef3f8; font-size: 10px; }
.insert-definition-info { display: none; }
.insert-block-definition-group .insert-primary { width: 74px; min-width: 74px; }
.attribute-display-command { position: relative; width: 74px; min-width: 74px; }
.attribute-display-command > .insert-primary { width: 74px; min-width: 74px; height: 66px; }
.attribute-display-menu { position: fixed; z-index: 32; width: 260px; padding: 4px; border: 1px solid #435269; background: #18212d; color: #dce6f3; box-shadow: 0 12px 28px #020617a6; }
.attribute-display-menu:not([hidden]) { display: grid; gap: 2px; }
.attribute-display-menu button { display: grid; grid-template-columns: 17px 53px minmax(0,1fr); align-items: center; gap: 6px; min-height: 36px; padding: 4px 7px; border: 1px solid transparent; background: transparent; color: inherit; text-align: left; }
.attribute-display-menu button:hover,.attribute-display-menu button:focus-visible { border-color: #47627f; background: #263447; }
.attribute-display-menu button > span { color: #64c8ff; }
.attribute-display-menu b { font-size: 11px; font-weight: 600; }
.attribute-display-menu small { color: #99aabd; font-size: 9px; line-height: 1.2; }
.insert-xref-group { margin-left: 0; }
.insert-xref-group .insert-primary { width: 76px; min-width: 76px; }
.insert-xref-group .insert-command-stack { width: 142px; }
.insert-workspace .planned-command:disabled { opacity: .48; }
.annotate-workspace { padding-right: 4px; padding-left: 4px; }
.annotate-workspace .ribbon-group { padding-right: 6px; padding-left: 6px; }
.annotate-workspace .ribbon-group:first-child { padding-left: 0; }
.annotate-workspace .ribbon-group-body { align-items: stretch; gap: 2px; }
.annotate-workspace .annotate-primary { width: 62px; min-width: 62px; padding: 3px 2px; white-space: normal; line-height: 1.08; text-align: center; }
.annotate-workspace .annotate-primary .icon { width: 31px; height: 31px; stroke-width: 1.25; }
.annotate-icon-column { width: 27px; display: grid; grid-template-rows: repeat(3,22px); align-content: center; gap: 0; }
.annotate-icon-column button,.annotate-icon-grid button { min-width: 0; min-height: 22px; padding: 1px 3px; border-color: transparent; background: transparent; color: #9dd9ff; }
.annotate-icon-column .icon,.annotate-icon-grid .icon { width: 17px; height: 17px; }
.annotate-letter-icon { font: 12px/1 Arial,sans-serif; color: #dce8f7; }
.annotate-control-stack { width: 190px; display: grid; grid-template-rows: repeat(3,22px); align-content: center; gap: 0; }
.annotate-control-stack > select { width: 100%; height: 21px; min-width: 0; padding: 1px 22px 1px 5px; border: 1px solid #536176; border-radius: 1px; background: #343c49; color: #edf3fb; font-size: 11px; }
.annotate-control-stack > button,.annotate-inline-actions > button,.annotate-control-stack > .dimension-chain-split > button,.annotate-tool-grid button { min-width: 0; min-height: 22px; justify-content: flex-start; gap: 4px; padding: 1px 4px; border-color: transparent; border-radius: 1px; background: transparent; color: #cbd5e1; font-size: 10px; }
.annotate-control-stack .icon,.annotate-inline-actions .icon,.annotate-tool-grid .icon { width: 16px; height: 16px; color: #9dd9ff; }
.annotate-inline-actions,.annotate-control-stack > .dimension-chain-split { display: grid; grid-template-columns: minmax(0,1fr) 20px; min-width: 0; }
.annotate-control-stack > .dimension-chain-split { width: auto; grid-template-rows: 22px; }
.annotate-inline-actions .dimension-chain-more,.annotate-control-stack > .dimension-chain-split .dimension-chain-more { width: 20px; min-width: 20px; min-height: 22px; padding: 0; border: 0; background: transparent; }
.annotate-dimension-controls { width: 188px; margin-left: 3px; }
.annotate-tool-grid { width: 194px; display: grid; grid-template-columns: 78px 116px; grid-template-rows: repeat(3,22px); grid-auto-flow: column; align-content: center; overflow: hidden; }
.annotate-tool-grid button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.annotate-leader-main { width: 164px; display: grid; grid-template-rows: 22px 44px; align-content: center; overflow: hidden; }
.annotate-leader-main > select { width: 100%; height: 21px; min-width: 0; padding: 1px 22px 1px 5px; border: 1px solid #536176; border-radius: 1px; background: #343c49; color: #edf3fb; font-size: 11px; }
.annotate-leader-command-grid { display: grid; grid-template-columns: repeat(2,82px); grid-template-rows: repeat(2,22px); align-content: start; overflow: hidden; }
.annotate-leader-command-grid button,.annotate-leader-classic button { min-width: 0; min-height: 22px; justify-content: flex-start; gap: 4px; padding: 1px 4px; border-color: transparent; border-radius: 1px; background: transparent; color: #cbd5e1; font-size: 10px; white-space: nowrap; overflow: hidden; }
.annotate-leader-command-grid button span,.annotate-leader-classic button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.annotate-leader-command-grid .icon,.annotate-leader-classic .icon { width: 16px; height: 16px; flex: 0 0 16px; color: #9dd9ff; }
.annotate-leader-classic { width: 88px; display: grid; grid-template-rows: repeat(3,22px); align-content: center; overflow: hidden; border-left: 1px solid #344154; padding-left: 3px; }
.annotate-text-group { width: 292px; }
.annotate-dimension-group { width: 650px; }
.annotate-leader-group { width: 330px; }
.annotate-workspace button:disabled .icon { color: #718096; }
.annotate-workspace select:disabled { color: #91a4bd; opacity: 1; }
.layer-group { position: relative; }
.layer-group .ribbon-group-body { gap: 2px; }
.layer-ribbon { width: 218px; display: flex; justify-content: center; flex-direction: column; gap: 2px; }
.layer-command-grid { display: grid; grid-template-columns: repeat(5,21px) 113px; grid-template-rows: repeat(2,22px); grid-auto-flow: row; align-content: center; }
.layer-command-grid button { min-width: 0; min-height: 22px; padding: 1px 3px; justify-content: center; gap: 4px; border-color: transparent; background: transparent; color: #cbd5e1; font-size: 11px; }
.layer-command-grid button:hover:enabled { background: #344154; }
.layer-command-grid .layer-label-command { justify-content: flex-start; padding-left: 5px; white-space: nowrap; }
.layer-label-command .icon { width: 16px; height: 16px; color: #80cfff; }
.layer-command-icon { width: 17px; height: 17px; display: inline-grid; place-items: center; color: #73c9ff; font-size: 15px; line-height: 1; text-shadow: 0 0 2px #07111f; }
.layer-command-icon .layer-state-icon { width: 19px; height: 19px; }
.layer-command-icon .layer-state-svg { width: 17px; height: 17px; }
.layer-command-icon.bulb,.layer-command-icon.sun,.layer-command-icon.lock { color: #ffad19; }
.layer-command-icon.off { color: #8090a3; text-decoration: line-through; }
.layer-command-icon.snow { color: #8bd5ff; }
.layer-command-icon.previous { color: #76d7ff; font-size: 18px; }
.layer-command-icon.current { color: #17c9c1; }
.layer-picker { position: relative; }
.layer-picker-toggle { width: 218px; height: 22px; display: grid; grid-template-columns: 57px 14px minmax(0,1fr) 10px; align-items: center; gap: 2px; padding: 1px 4px; color: #edf3fb; background: #333d4b; border: 1px solid #536176; border-radius: 2px; font-size: 11px; text-align: left; }
.layer-picker-toggle:hover:enabled,.layer-picker-toggle[aria-expanded="true"] { background: #414d5f; }
.layer-status-preview { height: 20px; display: grid; grid-template-columns: repeat(3,19px); align-items: center; justify-items: center; white-space: nowrap; }
.layer-state-svg { display: block; width: 17px; height: 17px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.layer-state-icon { width: 19px; height: 20px; display: grid; place-items: center; color: #ffad19; }
.layer-state-icon.inactive { color: #7c8999; }
.layer-state-icon.frozen { color: #7fd6ff; }
.layer-swatch { width: 12px; height: 12px; border: 1px solid #101820; background: #fff; }
#current-layer-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.layer-picker-caret { justify-self: end; color: #bdc8d6; }
.layer-dropdown { position: fixed; z-index: 24; left: var(--layer-dropdown-left,0); top: var(--layer-dropdown-top,0); width: 218px; max-height: min(420px,60vh); overflow: auto; padding: 2px; border: 1px solid #4e5d71; border-radius: 2px; background: #222c39; box-shadow: 0 12px 28px #020617a0; }
.layer-dropdown-row { width: 100%; height: 25px; display: grid; grid-template-columns: repeat(3,19px) 15px minmax(0,1fr); align-items: center; column-gap: 1px; padding: 0 2px; color: #e6edf6; background: transparent; border: 0; border-radius: 2px; font-size: 11px; text-align: left; }
.layer-dropdown-row:hover,.layer-dropdown-row.current { background: #3a4556; }
.layer-dropdown-row .state { display: grid; place-items: center; color: #ffad19; }
.layer-dropdown-row button { min-width: 0; height: 23px; padding: 0; border: 0; background: transparent; color: inherit; }
.layer-dropdown-row button:hover { background: #4b586b; }
.layer-dropdown-row .state.inactive { color: #748397; }
.layer-dropdown-row .state.frozen { color: #7fd6ff; }
.layer-dropdown-row .name { display: flex; align-items: center; justify-content: flex-start; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; padding-left: 3px; }
.layer-dropdown-row .layer-swatch { width: 12px; height: 12px; justify-self: center; }
.layer-ribbon select { color-scheme: dark; background: #343c49; border: 1px solid #475569; border-radius: 2px; color: #e2e8f0; height: 22px; font-size: 11px; }
.block-home-group .ribbon-group-body { gap: 0; }
.block-home-group .ribbon-large { width: 52px; min-width: 52px; padding-left: 3px; padding-right: 3px; }
.block-home-group .ribbon-large .icon { color: #b8d7ef; }
.block-home-group .ribbon-large .command-caret { position: absolute; margin: 43px 0 0 37px; }
.block-home-small { display: grid; grid-template-rows: repeat(3,22px); align-content: center; min-width: 124px; overflow: hidden; }
.block-home-small button { min-height: 22px; justify-content: flex-start; gap: 5px; padding: 1px 4px; border-color: transparent; background: transparent; color: #cbd5e1; font-size: 11px; white-space: nowrap; }
.block-home-small .icon { width: 16px; height: 16px; color: #b8d7ef; }
.block-home-small button:disabled .icon { color: #8d99aa; }
.block-home-small .command-caret { margin-left: auto; }
.property-ribbon { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: 190px; }
.property-group .ribbon-group-body { gap: 2px; }
.property-match-command { min-width: 58px; }
.property-ribbon label { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; margin: 0; font-size: 10px; color: #cbd5e1; }
.draw-home .ribbon-group-body { height: 70px; }
.property-combo-toggle { width: 132px; height: 22px; display: grid; grid-template-columns: 48px minmax(0,1fr) 9px; align-items: center; gap: 4px; padding: 1px 4px; border: 1px solid #536176; border-radius: 2px; background: #343c49; color: #edf3fb; font-size: 11px; font-weight: 400; text-align: left; }
.property-combo-toggle:hover:enabled,.property-combo-toggle[aria-expanded="true"] { background: #414d5f; border-color: #6b7b91; }
.property-combo-toggle:disabled { border-color: #3d4857; color: #78869a; }
.property-combo-value { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.property-combo-caret { justify-self: end; color: #bdc8d6; }
.property-color-chip { width: 16px; height: 14px; border: 1px solid #111827; background: #fff; }
.property-line-sample,.property-weight-sample { display: block; width: 46px; height: 8px; align-self: center; background-position: center; background-repeat: repeat-x; }
.property-line-sample.continuous { background-image: linear-gradient(#dce5ef,#dce5ef); background-size: 100% 1px; }
.property-line-sample.hidden { background-image: linear-gradient(90deg,#dce5ef 0 8px,transparent 8px 13px); background-size: 13px 1px; }
.property-line-sample.center { background-image: linear-gradient(90deg,#dce5ef 0 14px,transparent 14px 18px,#dce5ef 18px 21px,transparent 21px 25px); background-size: 25px 1px; }
.property-line-sample.other { background-image: linear-gradient(90deg,#dce5ef 0 6px,transparent 6px 9px); background-size: 9px 1px; }
.property-weight-sample { height: 1px; background: #f3f6fa; }
.property-dropdown { position: fixed; z-index: 28; left: var(--property-left,0); top: var(--property-top,0); width: 206px; max-height: calc(100vh - var(--property-top,0px) - 8px); overflow: auto; padding: 3px; border: 1px solid #516075; border-radius: 2px; background: #222c39; color: #eef3f8; box-shadow: 0 12px 28px #020617b8; }
.property-option { width: 100%; min-height: 23px; display: grid; grid-template-columns: 54px minmax(0,1fr); align-items: center; gap: 4px; padding: 1px 5px; border: 0; border-radius: 1px; background: transparent; color: inherit; font-size: 11px; font-weight: 400; text-align: left; }
.property-option:hover,.property-option.current { background: #3a4556; border: 0; }
.property-option .property-color-chip { width: 18px; height: 17px; }
.property-option .property-line-sample { width: 50px; }
.property-option .property-weight-sample { width: 50px; }
.property-menu-separator { height: 1px; margin: 3px 2px; background: #465468; }
.property-menu-heading { padding: 5px 5px 3px; color: #cbd5e1; font-size: 11px; }
.color-property-dropdown { width: 206px; overflow: visible; }
.color-property-dropdown .property-option { grid-template-columns: 22px minmax(0,1fr); }
.color-palette { display: grid; grid-template-columns: repeat(10,16px); gap: 3px; padding: 6px 5px; }
.color-palette.index-colors { grid-template-columns: repeat(9,16px); padding-top: 3px; }
.color-cell { width: 16px; height: 16px; min-height: 16px; padding: 0; border: 1px solid #d8e0ea; border-radius: 0; box-shadow: inset 0 0 0 1px #11182770; }
.color-cell:hover,.color-cell.current { outline: 2px solid #43b8ff; outline-offset: 0; border-color: #fff; }
.linetype-property-dropdown { width: 184px; padding: 2px; }
.linetype-property-dropdown .property-option { min-height: 21px; grid-template-columns: 50px minmax(0,1fr); gap: 3px; padding: 0 4px; }
.linetype-property-dropdown .property-option .property-line-sample { width: 46px; height: 5px; }
.linetype-property-dropdown .property-menu-separator { margin: 2px 1px; }
.weight-property-dropdown { width: 190px; }
.color-dialog { width: min(548px,calc(100vw - 24px)); padding: 0; border: 1px solid #657489; border-radius: 3px; background: #263140; color: #eef3f8; box-shadow: 0 22px 55px #020617d9; }
.color-dialog::backdrop { background: #0206178c; }
.color-dialog form { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; max-height: min(620px,calc(100vh - 24px)); }
.color-dialog-header { height: 35px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 12px; border-bottom: 1px solid #151d29; background: #354255; }
.color-dialog-header h2 { margin: 0; font-size: 12px; font-weight: 600; }
.color-dialog-close { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; color: #dce5ef; font-size: 20px; font-weight: 300; }
.color-dialog-close:hover:enabled { border: 0; background: #c64242; color: #fff; }
.color-dialog-tabs { display: flex; gap: 1px; padding: 7px 9px 0; border-bottom: 1px solid #59677a; background: #202a37; }
.color-dialog-tabs button { min-height: 27px; padding: 3px 13px; border: 1px solid transparent; border-bottom: 0; border-radius: 2px 2px 0 0; background: transparent; color: #bfcbd9; font-size: 11px; font-weight: 500; }
.color-dialog-tabs button[aria-selected="true"] { border-color: #59677a; background: #334155; color: #fff; }
.color-dialog-tabs button:hover:enabled { border-color: #59677a; background: #3b495c; }
.color-dialog-panel { min-height: 325px; padding: 12px; overflow: auto; background: #334155; }
.color-selection-row,.true-color-editor { display: grid; grid-template-columns: 40px minmax(150px,1fr) auto; align-items: end; gap: 10px; margin-bottom: 11px; }
.color-dialog-preview { display: block; width: 40px; height: 40px; border: 1px solid #dbe4ef; box-shadow: inset 0 0 0 1px #11182780; background: #fff; }
.color-selection-row label,.true-color-editor label,.true-color-channels label { display: grid; gap: 3px; color: #cbd5e1; font-size: 10px; }
.color-selection-row input,.true-color-editor input,.true-color-channels input { height: 25px; min-width: 0; padding: 3px 6px; border: 1px solid #66758a; border-radius: 1px; background: #f8fafc; color: #182235; font-size: 12px; }
.color-selection-row output { align-self: center; min-width: 70px; color: #e7edf5; font: 12px Consolas,monospace; }
.aci-color-grid { display: grid; grid-template-columns: repeat(25,16px); gap: 2px; align-content: start; width: max-content; max-width: 100%; padding: 7px; border: 1px solid #1a2432; background: #202a37; }
.aci-color-cell { width: 16px; height: 16px; min-height: 16px; padding: 0; border: 1px solid #bdc8d6; border-radius: 0; box-shadow: inset 0 0 0 1px #1118275c; }
.aci-color-cell:hover,.aci-color-cell[aria-selected="true"] { z-index: 1; outline: 2px solid #43b8ff; outline-offset: 0; border-color: #fff; }
.true-color-editor { grid-template-columns: 40px minmax(0,1fr); align-items: end; }
.true-color-channels { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.true-color-channels label { grid-template-columns: 16px minmax(0,1fr); align-items: center; }
.color-dialog input[aria-invalid="true"] { border-color: #ff6b6b; outline: 1px solid #ff6b6b; }
.color-dialog-actions { display: flex; justify-content: flex-end; gap: 7px; padding: 8px 10px; border-top: 1px solid #17202c; background: #263140; }
.color-dialog-actions button { min-width: 76px; min-height: 28px; padding: 4px 12px; font-size: 11px; }
.leader-settings-dialog { width: min(570px,calc(100vw - 24px)); padding: 0; border: 1px solid #69788b; border-radius: 3px; background: #e9edf2; color: #182235; box-shadow: 0 22px 55px #020617d9; }
.leader-settings-dialog::backdrop { background: #0206178c; }
.insert-attributes-dialog { width:min(455px,calc(100vw - 24px)); padding:0; border:1px solid #858585; border-radius:1px; background:#f4f4f4; color:#111; box-shadow:0 18px 48px #020617b8; font:12px/1.25 "Segoe UI",Arial,sans-serif; }
.insert-attributes-dialog::backdrop { background:#02061773; }
.insert-attributes-dialog form { display:grid; grid-template-rows:35px auto auto minmax(160px,1fr) 52px; max-height:min(620px,calc(100vh - 24px)); }
.insert-attributes-header { display:grid; grid-template-columns:22px 1fr 30px; align-items:center; gap:7px; padding:0 5px 0 9px; border-bottom:1px solid #d0d0d0; background:#fff; }
.insert-attributes-header h2 { margin:0; font-size:12px; font-weight:400; }
.insert-attributes-mark { display:grid; place-items:center; width:15px; height:18px; border-radius:2px; background:#cf174c; color:#fff; font-size:10px; font-weight:800; }
.insert-attributes-header button { width:29px; min-width:29px; height:29px; min-height:29px; padding:0; border:0; background:transparent; color:#333; font-size:20px; font-weight:300; }
.insert-attributes-header button:hover { background:#e81123; color:#fff; }
.insert-attributes-block { display:grid; grid-template-columns:150px minmax(0,1fr); gap:8px; padding:12px 11px 8px; }
.insert-attributes-tabs { display:flex; gap:3px; padding:0 11px; border-bottom:1px solid #c8c8c8; }
.insert-attributes-tabs[hidden],.insert-attributes-text-options[hidden],.insert-attributes-fields[hidden] { display:none; }
.insert-attributes-tabs button { padding:5px 10px; border:1px solid transparent; border-bottom:0; background:transparent; color:#111; font:12px "Segoe UI",Arial,sans-serif; }
.insert-attributes-tabs button[aria-selected="true"] { border-color:#c8c8c8; background:#fff; }
.insert-attributes-body { min-height:160px; overflow:auto; background:#fff; }
.insert-attributes-fields { padding:11px 11px 8px; }
.insert-attributes-text-options { display:grid; gap:12px; padding:14px 11px; }
.insert-attributes-text-options label { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:center; gap:8px; }
.insert-attributes-text-options select { width:100%; min-width:0; height:26px; border:1px solid #a6a6a6; background:#fff; color:#111; font:12px "Segoe UI",Arial,sans-serif; }
.insert-attributes-text-options p { margin:0; padding-left:158px; }
.insert-attributes-field { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:center; gap:8px; margin:0 0 7px; }
.insert-attributes-field span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.insert-attributes-field input { width:100%; min-width:0; height:24px; padding:2px 5px; border:1px solid #a6a6a6; border-radius:0; background:#fff; color:#111; font:12px "Segoe UI",Arial,sans-serif; }
.insert-attributes-field input:focus { border-color:#1976b8; outline:1px solid #1976b8; }
.insert-attributes-membership { display:flex; gap:8px; padding:10px 11px 0; }
.insert-attributes-membership[hidden] { display:none; }
.insert-attributes-membership select { flex:1; min-width:0; }
.insert-attributes-field.attribute-membership-field { grid-template-columns:120px minmax(0,1fr) auto; }
.attribute-membership-field button { padding:3px 5px; }
.insert-attributes-actions { display:flex; align-items:center; gap:12px; padding:8px 11px; border-top:1px solid #d0d0d0; }
.insert-attributes-actions button { min-width:74px; height:25px; padding:2px 12px; border:1px solid #a6a6a6; border-radius:0; background:#eee; color:#111; }
.insert-attributes-actions button.primary { border-color:#777; background:#eee; color:#111; }
.insert-attributes-actions button:hover { border-color:#1976b8; background:#e8f2fa; }
.attribute-definition-dialog,.block-attribute-manager-dialog,.battman-settings-dialog { padding:0; border:1px solid #7c8794; border-radius:2px; background:#f4f4f4; color:#111; box-shadow:0 20px 52px #020617b8; font:12px/1.3 "Segoe UI",Arial,sans-serif; }
.attribute-definition-dialog { width:min(690px,calc(100vw - 24px)); }
.attribute-definition-edit-dialog { width:min(390px,calc(100vw - 24px)); padding:0; border:1px solid #7c8794; border-radius:2px; background:#f4f4f4; color:#111; box-shadow:0 20px 52px #020617b8; font:12px/1.3 "Segoe UI",Arial,sans-serif; }
.attribute-definition-edit-dialog::backdrop { background:#02061773; }
.attribute-definition-edit-body { display:grid; gap:9px; padding:16px 14px 10px; }
.attribute-definition-edit-body label { display:grid; grid-template-columns:96px minmax(0,1fr); align-items:center; gap:6px; }
.attribute-definition-edit-body input { min-width:0; width:100%; height:24px; padding:2px 5px; border:1px solid #9c9c9c; background:#fff; color:#111; font:12px "Segoe UI",Arial,sans-serif; }
.block-attribute-manager-dialog { width:min(850px,calc(100vw - 24px)); }
.battman-settings-dialog { width:min(430px,calc(100vw - 24px)); }
.attribute-definition-dialog::backdrop,.block-attribute-manager-dialog::backdrop,.battman-settings-dialog::backdrop { background:#02061773; }
.attribute-definition-dialog form,.attribute-definition-edit-dialog form,.block-attribute-manager-dialog form { display:grid; grid-template-rows:35px minmax(0,1fr) 47px; max-height:min(760px,calc(100vh - 24px)); }
.battman-settings-dialog form { display:grid; grid-template-rows:35px minmax(0,1fr) 47px; max-height:min(560px,calc(100vh - 24px)); }
.cad-dialog-header { display:flex; align-items:center; justify-content:space-between; padding-left:11px; border-bottom:1px solid #c9c9c9; background:#fff; }
.cad-dialog-header h2 { margin:0; font-size:12px; font-weight:400; }
.cad-dialog-header button { width:34px; min-width:34px; height:34px; min-height:34px; padding:0; border:0; border-radius:0; background:transparent; color:#333; font-size:20px; }
.cad-dialog-header button:hover { background:#e81123; color:#fff; }
.attribute-definition-body,.block-attribute-manager-body { overflow:auto; padding:12px; }
.attribute-definition-body { display:grid; grid-template-columns:1fr 1.45fr; gap:10px 12px; }
.attribute-definition-body fieldset { min-width:0; margin:0; padding:9px 11px 11px; border:1px solid #a7a7a7; }
.attribute-definition-body legend { padding:0 5px; }
.attribute-mode-fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 10px; }
.attribute-mode-fieldset label,.attribute-check-wide,.attribute-align-below,.battman-mode-grid label { display:flex; align-items:center; gap:6px; }
.attribute-entry-fieldset,.attribute-text-fieldset { display:grid; gap:7px; }
.attribute-entry-fieldset label,.attribute-text-fieldset label,.battman-editor-panel>label { display:grid; grid-template-columns:105px minmax(0,1fr); align-items:center; gap:7px; }
.attribute-point-fieldset { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.attribute-point-fieldset .attribute-check-wide { grid-column:1/-1; }
.attribute-point-fieldset label:not(.attribute-check-wide) { display:grid; grid-template-columns:14px minmax(0,1fr); align-items:center; gap:4px; }
.attribute-definition-dialog input[type="text"],.attribute-definition-dialog input[type="number"],.attribute-definition-dialog select,.block-attribute-manager-dialog input[type="text"],.block-attribute-manager-dialog input[type="number"],.block-attribute-manager-dialog select { min-width:0; width:100%; height:25px; padding:2px 5px; border:1px solid #9c9c9c; border-radius:0; background:#fff; color:#111; font:12px "Segoe UI",Arial,sans-serif; }
.attribute-align-below { grid-column:1/-1; }
.cad-dialog-message { min-height:18px; margin:0; color:#4a5664; font-size:10px; }
.attribute-definition-body>.cad-dialog-message { grid-column:1/-1; }
.cad-dialog-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:8px 11px; border-top:1px solid #c9c9c9; background:#eee; }
.cad-dialog-actions button { min-width:80px; height:27px; border:1px solid #999; border-radius:0; background:#f5f5f5; color:#111; }
.cad-dialog-actions button.primary { border-color:#2478b5; box-shadow:inset 0 0 0 1px #fff; }
.block-attribute-manager-body { display:grid; grid-template-rows:auto minmax(150px,1fr) auto auto auto; gap:9px; }
.battman-block-row { display:flex; align-items:end; gap:8px; }
.battman-block-row label { display:grid; grid-template-columns:52px minmax(220px,1fr); align-items:center; gap:7px; flex:1; }
.battman-table-wrap { min-height:150px; overflow:auto; border:1px solid #999; background:#fff; }
.battman-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.battman-table th,.battman-table td { padding:5px 7px; border-right:1px solid #d1d1d1; border-bottom:1px solid #d8d8d8; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; }
.battman-table th { position:sticky; top:0; z-index:1; background:#e9e9e9; font-weight:600; }
.battman-table tr[aria-selected="true"] { background:#cce8ff; outline:1px solid #2684c4; outline-offset:-1px; }
.battman-table[data-emphasize-duplicates="true"] tr[data-duplicate="true"] td:first-child { color:#b42318; font-weight:700; }
.battman-main-actions { display:flex; gap:7px; }
.battman-main-actions button { min-width:88px; }
.battman-editor { border:1px solid #aaa; background:#fff; }
.battman-tabs { display:flex; gap:1px; padding:5px 7px 0; border-bottom:1px solid #a7a7a7; background:#ececec; }
.battman-tabs button { min-width:105px; padding:5px 10px; border:1px solid transparent; border-bottom:0; border-radius:0; background:transparent; }
.battman-tabs button[aria-selected="true"] { border-color:#aaa; background:#fff; }
.battman-editor-panel { display:grid; grid-template-columns:1fr 1fr; gap:7px 14px; padding:11px; }
.battman-editor-panel[hidden] { display:none; }
.battman-editor-panel input[readonly] { background:#ececec; color:#555; }
.battman-editor-panel .battman-check { grid-template-columns:auto 1fr; justify-content:start; }
.battman-mode-grid { grid-column:1/-1; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; padding-top:4px; }
.battman-editor-actions { display:flex; justify-content:flex-end; gap:7px; padding:0 11px 10px; }
.battman-counts { min-height:17px; margin:0; color:#1f2937; font-size:11px; }
.battman-footer { display:grid; grid-template-columns:auto auto 1fr repeat(4,auto); }
.battman-settings-body { display:grid; gap:13px; padding:14px; overflow:auto; }
.battman-settings-body fieldset { display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; margin:0; padding:10px 12px 12px; border:1px solid #999; }
.battman-settings-body legend { padding:0 5px; }
.battman-settings-body label { display:flex; align-items:center; gap:7px; }
.battman-settings-body fieldset div { grid-column:1/-1; display:flex; gap:8px; padding-top:3px; }
.battman-settings-body button { min-width:86px; height:26px; border:1px solid #999; border-radius:0; background:#f5f5f5; color:#111; }
.leader-settings-dialog form { display: grid; grid-template-rows: 35px 34px minmax(260px,auto) 45px; }
.leader-settings-header { display: flex; align-items: center; justify-content: space-between; padding-left: 12px; background: #354255; color: #eef3f8; }
.leader-settings-header h2 { margin: 0; font-size: 12px; font-weight: 600; }
.leader-settings-header button { width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: #eef3f8; font-size: 20px; }
.leader-settings-header button:hover { background: #c64242; color: #fff; }
.leader-settings-tabs { display: flex; align-items: end; gap: 1px; padding: 5px 8px 0; border-bottom: 1px solid #8c98a8; background: #d6dde5; }
.leader-settings-tabs button { min-height: 28px; padding: 4px 14px; border: 1px solid transparent; border-bottom: 0; background: transparent; color: #334155; font-size: 11px; }
.leader-settings-tabs button[aria-selected="true"] { border-color: #8c98a8; background: #f4f6f8; color: #111827; }
.leader-settings-panel { padding: 14px 16px; background: #f4f6f8; font-size: 11px; }
.leader-settings-panel[hidden] { display: none; }
.leader-settings-panel fieldset { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px 12px 12px; border: 1px solid #9ca8b6; }
.leader-settings-panel legend { padding: 0 5px; color: #263548; font-weight: 600; }
.leader-settings-panel label { display: flex; align-items: center; gap: 7px; }
.leader-setting-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.leader-setting-grid label { display: grid; gap: 4px; }
.leader-setting-grid select { width: 100%; height: 27px; border: 1px solid #8795a6; background: #fff; color: #182235; }
.attachment-grid { grid-template-columns: 1fr 1fr; margin-top: 18px; }
.leader-settings-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 11px; border-top: 1px solid #a6b0bd; background: #e1e6ec; }
.leader-settings-actions button { min-width: 78px; min-height: 28px; }
.layer-create { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.layer-create input { min-width: 0; }
.layer-create button { padding: 4px 6px; }
.layer-manager-tools { display: grid; gap: 5px; margin-bottom: 7px; }
.layer-manager-tools > input,.layer-state-tools select { min-width: 0; height: 24px; padding: 3px 5px; border: 1px solid #b9c4d2; background: #fff; color: #243044; font-size: 10px; }
.layer-state-tools { display: grid; grid-template-columns: minmax(74px,1fr) repeat(4,auto); gap: 3px; }
.layer-state-tools button { min-height: 24px; padding: 3px 5px; font-size: 10px; }
.layer-table { overflow-x: auto; border: 1px solid #aeb9c7; background: #fff; }
.layer-list-header,.layer-row { display: grid; grid-template-columns: 38px 150px 42px 54px 42px 54px 100px 92px 86px 42px 86px 180px; min-width: 966px; align-items: center; }
.layer-list-header { position: sticky; top: 0; z-index: 2; background: #e3e8ee; border-bottom: 1px solid #9eabb9; }
.layer-list-header button { min-width: 0; height: 25px; padding: 2px 5px; border: 0; border-right: 1px solid #bdc6d1; border-radius: 0; background: transparent; color: #263548; font-size: 9px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-list-header button:hover { background: #d5e5f6; }
#layer-list { max-height: 340px; min-width: 966px; overflow-y: auto; }
.layer-row { min-height: 27px; border-bottom: 1px solid #d9e0e8; }
.layer-row.selected { background: #cfe8ff; outline: 1px solid #73a9dc; outline-offset: -1px; }
.layer-row:focus-visible { outline: 2px solid #2379c9; outline-offset: -2px; }
.layer-row > * { min-width: 0; height: 25px; border: 0; border-right: 1px solid #e0e5eb; border-radius: 0; background: transparent; }
.layer-row button { justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; padding: 3px 5px; font-size: 10px; }
.layer-row > button:nth-child(n+3):nth-child(-n+5),.layer-row > button:nth-child(n+10):nth-child(-n+11) { justify-content: center; }
.layer-usage { display: grid; place-items: center; color: #2674b8; font-size: 11px; }
.layer-row input[type=color] { width: 25px; height: 22px; padding: 0; border: 0; }
#property-scope { max-width: 205px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-style-layout { display: grid; gap: 8px; }
.text-style-layout > label,.text-style-fields label { display: grid; gap: 3px; color: #526174; font-size: 10px; }
#text-style-list,#dimension-style-list,#mleader-style-list { width: 100%; min-height: 112px; }
.text-style-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.text-style-fields label:first-child,.text-style-fields label:nth-child(2) { grid-column: 1 / -1; }
.text-style-fields input,.text-style-fields select,#text-style-list,#dimension-style-list,#mleader-style-list,.mleader-style-editor>label input { min-width: 0; padding: 4px; border: 1px solid #b9c4d2; border-radius: 2px; background: #fff; color: #1f2937; }
#text-style-status,#dimension-style-status,#mleader-style-status { min-height: 28px; margin: 7px 0; }
#text-style-panel .actions,#dimension-style-panel .actions,#mleader-style-panel .actions { flex-wrap: wrap; }
.text-style-fields .dimension-style-toggle { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.dimension-style-toggle input { width: auto; }
.mleader-style-editor { display:grid; gap:7px; }
.mleader-style-editor>label { display:grid; gap:3px; color:#526174; font-size:10px; }
.mleader-style-tabs { display:flex; gap:1px; border-bottom:1px solid #98a5b5; }
.mleader-style-tabs button { flex:1; min-height:29px; padding:4px; border:1px solid transparent; border-bottom:0; background:#e7ebf0; color:#425166; font-size:10px; }
.mleader-style-tabs button[aria-selected="true"] { border-color:#98a5b5; background:#fff; color:#111827; }
.layer-row select,.layer-row input[type=number],.layer-row input[type=text] { width: 100%; height: 25px; padding: 2px 4px; background: transparent; color: #243044; border: 0; border-right: 1px solid #e0e5eb; font-size: 10px; }
/* Giữ file input tiêu chuẩn có thể được keyboard/automation kích hoạt, nhưng không làm thay đổi bố cục ribbon. */
.file-input-proxy{position:fixed;left:-10000px;top:0;width:1px;height:1px;opacity:.001;pointer-events:none}
.quick-select-dialog { width:min(440px,calc(100vw - 32px)); }
.quick-select-dialog form>label { display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;align-items:center;margin:12px 0; }
.quick-select-dialog select,.quick-select-dialog input:not([type=checkbox]) { width:100%;min-width:0;padding:6px; }
.quick-select-dialog form>.quick-select-check { display:flex;gap:8px; }
