:root {
  color-scheme: dark;
  --bg: #0e1219;
  --panel: #151922;
  --panel-strong: #181e28;
  --panel-light: #1e2531;
  --edge: #2a313d;
  --edge-soft: #232a35;
  --text: #ebedf4;
  --muted: #9aA5b6;
  --dim: #687689;
  --accent: #af91fb;
  --accent-soft: #a38ee4;
  --accent-bg: #29233d;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; min-width: 810px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app { display: flex; flex-direction: column; height: 100vh; min-height: 520px; overflow: hidden; }
.app-header { flex: 0 0 66px; display: flex; gap: 15px; align-items: center; justify-content: space-between; padding: 0 22px; background: #141820; border-bottom: 1px solid var(--edge-soft); }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: flex; height: 29px; width: 29px; align-items: center; justify-content: center; color: var(--accent); }
.brand-mark svg { width: 27px; height: 27px; }
.brand-word { font-size: 19px; font-weight: 650; letter-spacing: -.85px; }
.brand-dot { color: var(--accent); }
.app-divider { height: 22px; border-left: 1px solid #39404c; margin: 0 8px; }
.project-name { font-size: 13px; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c9cfdb; }
.prototype-chip { background: #27213a; border: 1px solid #3d3359; color: #c1b0ed; font-size: 9px; font-weight: 700; letter-spacing: 1px; border-radius: 5px; padding: 6px 8px; margin-left: 8px; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 7px; padding: 9px 14px; font-size: 12px; font-weight: 560; border: 1px solid transparent; white-space: nowrap; }
.button-symbol { font-size: 17px; font-weight: 400; line-height: 12px; }
.button.quiet { background: transparent; color: #c5cbd7; }
.button.quiet:hover { background: #242a35; }
.button.primary { background: var(--accent); color: #171420; font-weight: 690; border-color: #c1aaff; }
.button.primary:hover { background: #c5afff; }
.workflow-nav { background: #131820; border-bottom: 1px solid var(--edge); height: 54px; flex: 0 0 54px; display: flex; align-items: stretch; justify-content: space-between; padding: 0 21px; }
.workflow-tabs { display: flex; align-items: stretch; gap: 4px; }
.workflow-tab { display: flex; align-items: center; gap: 10px; padding: 0 26px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 13px; font-weight: 560; color: #8e99ab; }
.workflow-tab:hover { color: #dee3eb; background: #1b2029; }
.workflow-tab.active { color: #e6ddff; border-bottom-color: var(--accent); background: linear-gradient(180deg, transparent, #241f35 100%); }
.mode-symbol { color: #98a0b0; font-size: 20px; font-weight: 350; }
.workflow-tab.active .mode-symbol { color: var(--accent); }
.workflow-hint { display: flex; align-items: center; color: #778498; font-size: 11px; letter-spacing: .05px; }
.workspace-grid { display: grid; grid-template-columns: 258px minmax(300px, 1fr) 276px; min-height: 0; flex: 1; }
.sidebar { background: #161b24; min-height: 0; display: flex; flex-direction: column; }
.left-sidebar { border-right: 1px solid var(--edge); }
.inspector { border-left: 1px solid var(--edge); }
.panel-section { padding: 22px 19px; border-bottom: 1px solid var(--edge-soft); }
.section-heading { display: flex; align-items: center; justify-content: space-between; height: 19px; color: #778499; font-size: 10px; font-weight: 760; letter-spacing: 1.45px; }
.project-heading { font-size: 16px; font-weight: 620; letter-spacing: -.25px; margin-top: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.project-meta { margin-top: 5px; color: var(--accent-soft); font-size: 11px; }
.project-caption { margin-top: 18px; font-size: 11px; line-height: 1.7; color: #808b9b; }
.icon-button { padding: 0; width: 24px; height: 24px; background: #252b35; border: 1px solid #343d4b; border-radius: 5px; color: #d2d8e1; font-size: 17px; line-height: 1; }
.icon-button:hover { background: #333846; }
.icon-button.subtle { background: transparent; border-color: transparent; font-size: 14px; }
.small-count { margin-left: 5px; color: #9da5b5; }
.parts-browser { border-bottom: 0; padding-top: 21px; overflow-y: auto; flex: 1; }
.parts-list { display: flex; flex-direction: column; gap: 5px; margin-top: 17px; }
.part-row { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 11px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; text-align: left; }
.part-row:hover { background: #202632; }
.part-row.selected { background: #29263b; border-color: #544270; }
.part-icon { width: 30px; height: 30px; border: 1px solid #3d4553; border-radius: 6px; display: flex; justify-content: center; align-items: center; color: #bcb5dd; flex: 0 0 auto; }
.part-row.selected .part-icon { color: #cab9fa; border-color: #6a558c; }
.part-details { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.part-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #d8dee8; font-size: 12px; font-weight: 590; }
.part-dimensions { color: #8793a6; font-size: 11px; }
.sidebar-bottom { border-top: 1px solid var(--edge-soft); padding: 18px 19px 23px; background: #151a22; }
.help-heading { display: flex; gap: 9px; align-items: center; color: #b9c1cf; font-size: 12px; font-weight: 620; }
.help-icon { border: 1px solid #737e91; border-radius: 50%; color: #9ba5b5; height: 15px; width: 15px; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-bottom p { color: #8390a2; font-size: 11px; line-height: 1.75; margin: 10px 0 13px; }
.text-link { display: inline-flex; gap: 7px; align-items: center; background: none; border: 0; padding: 0; color: #b9a1fa; font-weight: 590; font-size: 11px; }
.text-link:hover { color: #ddcfff; }
.editor { display: flex; flex-direction: column; min-width: 0; background: #10151d; }
.editor-toolbar { height: 63px; flex: 0 0 63px; background: #161b23; border-bottom: 1px solid var(--edge); display: flex; align-items: center; padding: 0 21px; justify-content: space-between; gap: 12px; }
.tool-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tool-title strong { font-size: 12px; font-weight: 650; white-space: nowrap; }
.active-indicator { background: #aa8cf2; box-shadow: 0 0 0 4px #aa8cf21a; width: 6px; height: 6px; border-radius: 50%; margin-right: 3px; }
.tool-subtitle { color: #7a8798; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canvas-tools { display: flex; gap: 6px; align-items: center; }
.toolbar-caption { color: #788498; font-size: 10px; letter-spacing: 1.1px; font-weight: 640; margin-right: 7px; }
.tool-button { background: #242b36; border: 1px solid #3a4251; width: 27px; height: 27px; border-radius: 5px; color: #dae1eb; font-size: 16px; }
.tool-button:hover { background: #353d4b; }
.tool-button.fit-button { width: auto; padding: 0 9px; font-size: 11px; }
.zoom-text { font-size: 11px; min-width: 42px; text-align: center; color: #b7c1cf; }
.tool-separator { border-left: 1px solid #3b4350; height: 20px; margin: 0 6px; }
.canvas-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; background-color: #101721; background-image: radial-gradient(#63708426 1px, transparent 1px); background-size: 18px 18px; }
#canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#canvas.panning { cursor: grabbing; }
#canvas .vector-part { cursor: pointer; }
#canvas .vector-part:hover .part-contour { stroke: #d7c8ff; }
#canvas .vector-part.selected .part-contour { stroke: #c6afff; stroke-width: 1.8; }
.canvas-top-left { position: absolute; top: 19px; left: 19px; display: flex; gap: 7px; pointer-events: none; }
.canvas-pill { display: inline-flex; height: 25px; align-items: center; padding: 0 10px; background: #26243d; border: 1px solid #41395b; border-radius: 4px; color: #c1b2ef; font-size: 9px; letter-spacing: 1.1px; font-weight: 680; }
.canvas-pill.muted-pill { background: #202833; color: #9aa6b9; border-color: #37404d; letter-spacing: .2px; }
.canvas-bottom-left { position: absolute; bottom: 19px; left: 19px; color: #9ba6b6; font-size: 11px; display: flex; align-items: center; gap: 9px; background: #171e29dd; border: 1px solid #303948; border-radius: 5px; padding: 9px 11px; pointer-events: none; }
.dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.canvas-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); text-align: center; width: min(330px,90%); padding: 25px; border: 1px solid #394354; background: #18202bdd; border-radius: 12px; }
.canvas-empty[hidden] { display: none; }
.empty-symbol { color: var(--accent); font-size: 42px; }
.canvas-empty h2 { font-size: 18px; margin: 8px 0; }
.canvas-empty p { color: #a0abbc; font-size: 12px; line-height: 1.6; margin-bottom: 20px; }
.editor-status { flex: 0 0 37px; height: 37px; background: #171c25; border-top: 1px solid var(--edge); padding: 0 17px; display: flex; align-items: center; justify-content: space-between; color: #8390a2; font-size: 10px; }
.editor-status > div { display: flex; align-items: center; gap: 9px; }
.status-diamond { color: var(--accent); font-size: 18px; }
.status-split { margin: 0 7px; color: #525c6a; }
.inspector-heading { padding-bottom: 20px; }
.inspector-heading h2 { font-size: 16px; margin: 14px 0 4px; font-weight: 630; letter-spacing: -.2px; }
.inspector-heading p { font-size: 11px; line-height: 1.6; color: #8592a5; margin: 0; }
.inspector-content { flex: 1; min-height: 0; overflow: auto; padding: 20px 19px; }
.property-group { margin-bottom: 24px; }
.property-heading { color: #7c889a; font-size: 10px; letter-spacing: 1.35px; font-weight: 740; margin-bottom: 11px; }
.property-input { width: 100%; background: #202731; color: #e3e6ed; border: 1px solid #3a4553; border-radius: 6px; padding: 9px 10px; height: 35px; outline: none; font-size: 12px; }
.property-label { display: block; font-size: 10px; color: #8390a0; margin-bottom: 7px; }
.property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.property-value { padding: 11px; background: #202631; border: 1px solid #343e4e; border-radius: 6px; }
.property-number { color: #e1e5ec; font-size: 15px; font-weight: 560; }
.property-unit { font-size: 11px; font-weight: 400; color: #8490a1; padding-left: 2px; }
.property-small { font-size: 10px; color: #8b96a6; margin-bottom: 7px; }
.property-line { display: flex; justify-content: space-between; color: #a8b4c4; font-size: 11px; padding: 9px 0; border-bottom: 1px solid #29313f; }
.property-line strong { color: #dce2ec; font-weight: 550; }
.verified { color: #a9d4be !important; }
.unverified { color: #f1c189 !important; }
.inspector-empty { color: #8f9aad; font-size: 12px; line-height: 1.8; }
.mode-information { margin-top: auto; padding: 20px 19px 22px; border-top: 1px solid var(--edge); background: #181d27; }
.mode-info-label { color: #8986aa; font-size: 10px; letter-spacing: 1.1px; font-weight: 760; }
.mode-info-title { margin: 11px 0 6px; color: #d5c7fa; font-size: 12px; font-weight: 650; }
.mode-info-text { line-height: 1.75; color: #8d9aaa; font-size: 11px; }
.toast { position: fixed; z-index: 10; bottom: 54px; right: 297px; padding: 11px 15px; font-size: 12px; background: #342b4b; color: #e4daff; border: 1px solid #69528e; border-radius: 7px; box-shadow: 0 12px 30px #0007; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
@media(max-width: 1240px) {
  .workspace-grid { grid-template-columns: 218px minmax(320px, 1fr) 240px; }
  .prototype-chip, .tool-subtitle { display: none; }
  .workflow-hint { font-size: 10px; }
}
@media(max-width: 930px) {
  .workspace-grid { grid-template-columns: 170px minmax(320px,1fr) 190px; }
  .panel-section { padding-left: 12px; padding-right: 12px; }
  .inspector-content, .mode-information, .sidebar-bottom { padding-left: 12px; padding-right: 12px; }
  .app-header { padding: 0 12px; }
  .workflow-tab { padding: 0 13px; }
  .button { padding: 9px 8px; }
  .header-actions .button.quiet:first-child { display: none; }
}
