:root {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: #24252b;
  background: #f5f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #24252b;
  --muted: #92939c;
  --line: #e9e9ed;
  --purple: #6656e8;
  --panel-width: 244px;
  --surface: #fff;
  --surface-soft: #fcfcfd;
  --canvas: #f4f5f7;
  --text: #24252b;
  --text-muted: #92939c;
}
@media (min-width: 821px) {
  .properties-panel { display: flex; }
}

* { box-sizing: border-box; }
.is-number-scrubbing, .is-number-scrubbing * { user-select: none !important; cursor: ew-resize !important; }
body { margin: 0; min-width: 850px; min-height: 100vh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100vh; min-height: 600px; display: flex; flex-direction: column; }

.topbar {
  height: 64px; flex: 0 0 64px; display: flex; align-items: center; padding: 0 22px;
  background: var(--surface); border-bottom: 1px solid var(--line); gap: 20px; z-index: 4;
}
.brand { display: flex; align-items: center; gap: 9px; color: #22232a; text-decoration: none; font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -.7px; }
.brand-light { font-weight: 500; color: #898992; }
.brand-mark { width: 23px; height: 23px; display: inline-flex; gap: 2px; align-items: center; justify-content: center; background: #6554e8; border-radius: 7px; transform: rotate(-7deg); }
.brand-mark i { width: 3px; border-radius: 3px; background: #fff; display: block; }
.brand-mark i:nth-child(1) { height: 8px; opacity: .8; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 6px; opacity: .7; }
.topbar-divider { height: 25px; width: 1px; background: var(--line); }
.project-name { min-width: 0; display: flex; align-items: center; gap: 12px; }
.project-name input { width: 205px; border: 0; outline: 0; color: #46464e; font-size: 13px; font-weight: 600; background: transparent; }
.save-status { display: flex; align-items: center; gap: 6px; color: #9899a1; font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #55b888; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.button { height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #565760; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border .15s, transform .15s; }
.button:hover { background: #f7f7fa; border-color: #ececf0; }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { padding: 0 13px; background: #6656e8; color: #fff; box-shadow: 0 2px 6px #6656e832; }
.button-primary:hover { background: #5948d5; border-color: #5948d5; }
.button-primary .chevron { width: 13px; height: 13px; }
.export-wrap { position: relative; }
.export-menu { position: absolute; right: 0; top: 43px; width: 205px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 32px #20202b1a; z-index: 10; }
.export-menu button { width: 100%; padding: 10px 9px; border: 0; border-radius: 5px; background: transparent; display: flex; justify-content: space-between; cursor: pointer; text-align: left; font-size: 12px; }
.export-menu button:hover { background: #f6f5fc; }
.export-menu button span { color: #a2a2ab; }

.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 58px var(--panel-width) minmax(350px, 1fr) var(--panel-width); }
.tool-rail { display: flex; flex-direction: column; align-items: center; padding: 17px 0 12px; background: var(--surface); border-right: 1px solid var(--line); }
.tool-group { display: flex; flex-direction: column; gap: 5px; }
.tool-button, .icon-button { display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #84858d; cursor: pointer; transition: color .12s, background .12s; }
.tool-button { width: 36px; height: 36px; border-radius: 8px; }
.tool-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.tool-button:first-child svg path { fill: currentColor; stroke: #fff; stroke-width: 1; }
.tool-button:hover, .icon-button:hover { color: #4d3fd0; background: #f5f3ff; }
.tool-button.is-active { color: #6454e5; background: #f0edff; }
.rail-divider { width: 25px; height: 1px; margin: 14px 0; background: var(--line); }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; }
.layers-panel, .properties-panel { min-width: 0; position: relative; display: flex; flex-direction: column; background: var(--surface); }
.layers-panel { border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 17px 17px; }
.eyebrow { color: #a0a0a8; font-size: 9px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; }
.panel-heading h1 { margin: 4px 0 0; font-family: Manrope, sans-serif; font-size: 16px; line-height: 1.2; letter-spacing: -.3px; }
.icon-button { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 6px; color: #8d8e96; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#add-layer { border: 1px solid #e8e7ed; }
#add-layer svg { width: 15px; height: 15px; }
.layers-search { height: 32px; margin: 0 14px 17px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid #ececf0; border-radius: 6px; background: #fcfcfd; }
.layers-search svg { width: 15px; height: 15px; fill: none; stroke: #a2a3aa; stroke-width: 1.6; }
.layers-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.layers-search input::placeholder { color: #a5a5ad; }
.layers-search kbd { color: #b0b0b8; white-space: nowrap; font-family: inherit; font-size: 9px; }
.layers-subheading { display: flex; align-items: center; justify-content: space-between; padding: 0 17px 8px; color: #a2a2aa; font-size: 10px; font-weight: 600; }
.layers-subheading button { padding: 0 3px; border: 0; background: none; color: #a2a2aa; cursor: pointer; font-size: 15px; }
.layers-list { min-height: 0; overflow: auto; padding: 0 7px 10px; }
.layer-row { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border-radius: 5px; cursor: pointer; color: #62636c; font-size: 11px; user-select: none; }
.layer-row:hover { background: #f8f8fa; }
.layer-row.is-selected { background: #f1efff; color: #5043c8; }
.layer-row.is-hidden { opacity: .46; }
.layer-kind { flex: 0 0 17px; width: 17px; height: 17px; display: grid; place-items: center; color: #85858e; }
.layer-kind svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.layer-row.is-selected .layer-kind { color: #6554e8; }
.layer-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-badges { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.layer-badge { display: inline-flex; align-items: center; min-height: 16px; padding: 0 4px; border-radius: 4px; font-size: 7px; font-weight: 700; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
.layer-badge-mask { background: #fff1cf; color: #80621d; }
.layer-badge-clipped { background: #e4f5f2; color: #23776d; }
.layer-badge-pathfinder { min-width: 16px; justify-content: center; background: #e9e5ff; color: #5143c8; }
body[data-theme="dark"] .layer-badge-mask { background: #4d4021; color: #f5d477; }
body[data-theme="dark"] .layer-badge-clipped { background: #20413d; color: #78d7ca; }
body[data-theme="dark"] .layer-badge-pathfinder { background: #3b3654; color: #d4ceff; }
.layer-eye { flex: 0 0 20px; width: 20px; height: 24px; padding: 0; border: 0; opacity: 0; color: #9696a0; background: transparent; cursor: pointer; }
.layer-row:hover .layer-eye, .layer-row.is-selected .layer-eye { opacity: 1; }
.layer-eye svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.layers-footer { height: 53px; margin-top: auto; flex: 0 0 53px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border-top: 1px solid var(--line); }
.avatar { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #f0b37f; color: #fff; font-size: 11px; font-weight: 700; }
.profile-name { flex: 1; color: #777780; font-size: 11px; }
.more-button { width: 24px; }

.canvas-area { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--canvas); }
.canvas-toolbar { height: 49px; flex: 0 0 49px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #e9eaed; background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #a0a0a8; font-size: 11px; }
.breadcrumb strong { color: #575861; font-weight: 600; }
.breadcrumb-slash { color: #c9c9cf; }
.canvas-actions { display: flex; align-items: center; gap: 2px; }
.canvas-actions .icon-button { width: 28px; height: 28px; }
.canvas-actions .icon-button svg { width: 15px; height: 15px; }
.toolbar-separator { height: 17px; width: 1px; margin: 0 7px; background: #e9e9ed; }
.zoom-button { font-size: 18px; font-weight: 400; }
.zoom-label { min-width: 43px; padding: 4px 3px; border: 0; border-radius: 4px; background: transparent; color: #777780; cursor: pointer; font-size: 10px; }
.zoom-label:hover { background: #f3f2f8; }
.view-options-wrap { position: relative; }
.view-options-menu { position: absolute; z-index: 15; top: calc(100% + 8px); right: 0; width: 210px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 26px #17182324; color: var(--text); font-size: 11px; }
.view-options-menu[hidden] { display: none; }
.view-options-menu > label:not(.view-grid-size) { display: flex; align-items: center; gap: 8px; min-height: 29px; padding: 0 5px; cursor: pointer; }
.view-options-menu input[type="checkbox"] { accent-color: #6554e8; }
.view-grid-size { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 5px; border-top: 1px solid var(--line); }
.view-grid-size select { width: 74px; height: 27px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font: inherit; }
.view-options-menu > button { width: 100%; padding: 8px 5px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; text-align: left; }
.view-options-menu > button:hover:not(:disabled) { color: #6554e8; }
.view-options-menu > button:disabled { opacity: .45; cursor: default; }
.canvas-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background-color: var(--canvas); }
.canvas-scroll { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-start; overflow: hidden; padding: 22px 25px 86px; }
.artboard-wrap { flex: 0 0 auto; width: min(100%, 960px); transform-origin: 0 0; will-change: transform; }
#artboard { display: block; width: 100%; height: auto; background: transparent; overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; }
.canvas-ruler, .canvas-ruler-corner { position: absolute; z-index: 3; background: var(--surface); }
.canvas-ruler[hidden], .canvas-ruler-corner[hidden] { display: none; }
.canvas-ruler-horizontal { top: 0; right: 0; left: 25px; width: calc(100% - 25px); height: 22px; cursor: crosshair; touch-action: none; }
.canvas-ruler-vertical { top: 22px; bottom: 0; left: 0; width: 25px; height: calc(100% - 22px); cursor: crosshair; touch-action: none; }
.canvas-ruler-corner { top: 0; left: 0; width: 25px; height: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.canvas-ruler { display: block; }
.canvas-ruler-horizontal { border-bottom: 1px solid var(--line); }
.canvas-ruler-vertical { border-right: 1px solid var(--line); }
#artboard .canvas-grid-background { pointer-events: none; }
#artboard .canvas-guide-line { stroke: #e45b6b; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: stroke; }
#artboard .canvas-guide-line.is-selected { stroke: #6554e8; stroke-width: 2; }
#artboard .canvas-guide-preview { stroke: #e45b6b; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
body[data-theme="dark"] .view-options-menu { box-shadow: 0 8px 26px #0007; }
body[data-theme="dark"] .canvas-ruler, body[data-theme="dark"] .canvas-ruler-corner { background: var(--surface); }
#artboard[data-tool="select"] { cursor: default; }
#artboard[data-tool="rect"], #artboard[data-tool="ellipse"], #artboard[data-tool="polygon"], #artboard[data-tool="star"] { cursor: crosshair; }
#artboard[data-tool="line"], #artboard[data-tool="frame"] { cursor: crosshair; }
#artboard[data-tool="pen"] { cursor: none; }
#artboard[data-tool="text"] { cursor: text; }
#artboard[data-tool="hand"] { cursor: grab; }
#artboard[data-tool="crop"] { cursor: crosshair; }
#artboard.is-panning { cursor: grabbing; }
#artboard [data-resize-handle="nw"], #artboard [data-resize-handle="se"] { cursor: nwse-resize; }
#artboard [data-resize-handle="ne"], #artboard [data-resize-handle="sw"] { cursor: nesw-resize; }
#artboard [data-resize-handle="n"], #artboard [data-resize-handle="s"] { cursor: ns-resize; }
#artboard [data-resize-handle="e"], #artboard [data-resize-handle="w"] { cursor: ew-resize; }
#pen-cursor { position: fixed; z-index: 20; pointer-events: none; transform: translate(1px, -1px); color: #6554e8; font-size: 17px; line-height: 1; }
#pen-cursor[hidden] { display: none; }
body[data-theme="dark"] #pen-cursor { color: #b7adff; }
.canvas-hint { position: absolute; left: 50%; bottom: 67px; transform: translateX(-50%); white-space: nowrap; color: #9c9da5; font-size: 10px; }
.canvas-stage:fullscreen { width: 100vw; height: 100vh; min-height: 0; background-color: var(--canvas); }
.canvas-stage:fullscreen::backdrop { background: var(--canvas); }
.canvas-stage:fullscreen .canvas-scroll { padding: 22px 25px 86px; }
.fullscreen-exit-button { display: none; position: absolute; z-index: 4; top: 14px; right: 14px; width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 3px 12px #24252b18; }
.canvas-stage:fullscreen .fullscreen-exit-button { display: flex; }
.hint-key { padding: 2px 5px; border: 1px solid #dedfe4; border-radius: 4px; background: #fff; color: #74757e; font-size: 9px; }
.hint-divider { padding: 0 5px; color: #c4c4ca; }
.statusbar { height: 29px; flex: 0 0 29px; display: flex; align-items: center; gap: 17px; padding: 0 14px; background: var(--surface); border-top: 1px solid var(--line); color: #92939b; font-size: 9px; }
.statusbar .status-dot { width: 5px; height: 5px; margin-right: 5px; }
.statusbar-right { margin-left: auto; }
.sparkle { padding-left: 4px; color: #816feb; }

.properties-panel { overflow: hidden; border-left: 1px solid var(--line); }
.properties-heading { height: 57px; flex: 0 0 57px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px 0 18px; border-bottom: 1px solid #f0f0f2; }
.properties-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 13px; font-weight: 700; }
.properties-heading .icon-button { width: 24px; }
.properties-heading .icon-button svg { width: 15px; }
.empty-properties { margin: auto; padding: 0 24px 50px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty-illustration { width: 82px; height: 68px; position: relative; margin-bottom: 20px; }
.empty-illustration span, .empty-illustration i, .empty-illustration b { position: absolute; display: block; border-radius: 7px; }
.empty-illustration span { width: 48px; height: 44px; left: 10px; top: 15px; transform: rotate(-12deg); background: #eeeaff; border: 1px solid #e2ddff; }
.empty-illustration i { width: 48px; height: 44px; right: 8px; top: 12px; transform: rotate(9deg); background: #fff1e9; border: 1px solid #f7ded0; }
.empty-illustration b { width: 44px; height: 40px; left: 20px; top: 8px; transform: rotate(-1deg); background: #fff; border: 1px solid #e5e4eb; box-shadow: 0 5px 13px #22212b0c; }
.empty-properties strong { font-size: 12px; font-weight: 600; }
.empty-properties p { max-width: 195px; margin: 8px 0; color: #9a9ba3; font-size: 10px; line-height: 1.65; }
.canvas-color-setting { width: 100%; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.canvas-color-setting > label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 10px; }
.canvas-color-setting > span { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.canvas-color-setting input[type="color"] { flex: 0 0 20px; width: 20px; height: 20px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.canvas-color-setting input[type="text"] { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 10px; }
#selected-properties { flex: 1; min-height: 0; overflow: auto; }
.selection-title { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 15px; border-bottom: 1px solid #f0f0f2; color: #53545c; font-size: 11px; font-weight: 600; }
.selection-icon { color: #7064d2; font-size: 17px; }
.selection-title #selected-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delete-button:hover { color: #d54d5e; background: #fff0f1; }
.property-section { padding: 15px 15px 16px; border-bottom: 1px solid #f0f0f2; }
.property-section h3 { display: flex; align-items: center; margin: 0 0 12px; color: #666770; font-size: 10px; font-weight: 600; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 9px; }
.field { min-width: 0; height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid #ececf0; border-radius: 5px; background: #fff; }
.field > span { flex: 0 0 auto; color: #a0a0a8; font-size: 9px; }
.field input, .color-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #62636b; font-size: 10px; }
.field:focus-within, .color-field:focus-within { border-color: #b9b1f5; box-shadow: 0 0 0 2px #7566e513; }
.text-value-field { margin-bottom: 7px; }
.text-value-field:last-child { margin-bottom: 0; }
.text-value-field input { font-size: 10px; }
.subtle-plus { margin-left: auto; border: 0; background: transparent; color: #aaaab2; font-size: 16px; line-height: 12px; }
.color-field { height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 7px; border: 1px solid #ececf0; border-radius: 5px; }
.color-swatch { flex: 0 0 17px; width: 17px; height: 17px; border: 1px solid #00000012; border-radius: 4px; background: #6554e8; }
.stroke-swatch { background: #fff; }
.color-swatch-picker { position: relative; flex: 0 0 20px; width: 20px; height: 20px; display: grid; place-items: center; cursor: pointer; }
.color-swatch-picker .color-swatch { width: 17px; height: 17px; }
.color-swatch-picker input[type="color"] { position: absolute; inset: -3px; width: 26px; height: 26px; padding: 0; opacity: 0; cursor: pointer; }
.color-field input { font-size: 10px; }
.color-field[hidden] { display: none; }
.gradient-toggle { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--text-muted); font-size: 10px; }
.gradient-toggle input { accent-color: #6556e8; }
.gradient-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.gradient-controls[hidden] { display: none; }
.gradient-type-field { grid-column: 1 / -1; }
.gradient-stop-track { position: relative; grid-column: 1 / -1; height: 23px; margin: 4px 8px 8px; border: 1px solid var(--line); border-radius: 4px; background-color: #fff; background-image: linear-gradient(90deg, transparent, transparent); }
.gradient-stop-handle { position: absolute; top: 50%; width: 13px; height: 19px; padding: 0; border: 2px solid #fff; border-radius: 4px; background: var(--stop-color); box-shadow: 0 0 0 1px #34323c, 0 1px 3px #0004; cursor: pointer; transform: translate(-50%, -50%); }
.gradient-stop-handle[aria-pressed="true"] { z-index: 1; width: 16px; height: 22px; box-shadow: 0 0 0 2px #6656e8, 0 1px 3px #0004; }
.gradient-stop-details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gradient-stop-field { min-width: 0; height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text-muted); font-size: 9px; }
.gradient-stop-field input { width: 18px; height: 18px; margin-left: auto; padding: 0; border: 0; background: transparent; cursor: pointer; }
.gradient-stop-details .field { min-width: 0; height: 30px; gap: 4px; padding: 0 6px; }
.gradient-stop-details .field input { flex: 1; width: 0; }
.gradient-stop-details .field b { color: var(--text-muted); font-size: 9px; font-weight: 500; }
.gradient-stop-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 6px; }
.gradient-stop-actions button { min-height: 26px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text-muted); font: inherit; font-size: 9px; cursor: pointer; }
.gradient-stop-actions button:hover:not(:disabled) { border-color: #b9b1f5; color: #6656e8; }
.gradient-stop-actions button:disabled { opacity: .45; cursor: not-allowed; }
.gradient-angle-field { grid-column: 1 / -1; display: flex; }
.gradient-angle-field[hidden] { display: none; }
.gradient-angle-field input { flex: 1; min-width: 0; accent-color: #6556e8; }
.gradient-angle-field output { color: var(--text-muted); font-size: 9px; }
.stroke-style-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.stroke-style-controls .field { min-width: 0; padding: 0 6px; }
.stroke-style-controls .field select { min-width: 0; width: 100%; }
.stroke-style-controls .field:last-child { grid-column: 1 / -1; }
.stroke-style-controls[hidden] { display: none; }
.stroke-marker-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.stroke-marker-controls .field { min-width: 0; padding: 0 6px; }
.stroke-marker-controls .field select { min-width: 0; width: 100%; }
.stroke-marker-controls[hidden] { display: none; }
.pathfinder-hint { margin: -4px 0 10px; color: var(--text-muted); font-size: 9px; line-height: 1.5; }
.pathfinder-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pathfinder-controls button { min-height: 30px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 9px; cursor: pointer; }
.pathfinder-controls button:hover:not(:disabled) { border-color: #b9b1f5; background: #f1efff; color: #5143c8; }
.pathfinder-controls button:disabled { opacity: .5; cursor: not-allowed; }
body[data-theme="dark"] .pathfinder-controls button:hover:not(:disabled) { background: #3b3654; color: #d4ceff; }
.clip-mask-controls { display: grid; gap: 6px; }
.clip-mask-controls button { min-height: 30px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 10px; cursor: pointer; }
.clip-mask-controls button:hover:not(:disabled) { border-color: #b9b1f5; background: #f1efff; color: #5143c8; }
.clip-mask-controls button:disabled { opacity: .5; cursor: not-allowed; }
body[data-theme="dark"] .clip-mask-controls button:hover:not(:disabled) { background: #3b3654; color: #d4ceff; }
.pathfinder-preview path { fill: #6556e8; fill-opacity: .72; stroke: #fff; stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.color-opacity, .px-label { color: #a3a3ab; font-size: 9px; }
.stroke-width { flex: 0 0 27px; width: 27px !important; text-align: right; }
.px-label { margin-left: -5px; }
.section-value { margin-left: auto; color: #92939b; font-size: 10px; font-weight: 400; }
.range-input { width: 100%; height: 3px; margin: 5px 0; accent-color: #6656e8; cursor: pointer; }
.properties-bottom { margin-top: auto; padding: 15px; border-top: 1px solid #f0f0f2; color: #a3a3aa; font-size: 9px; }
.properties-bottom > span:first-child { padding-right: 5px; color: #777881; }
.heart { color: #ed8e9a; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 48px; transform: translate(-50%, 10px); padding: 10px 15px; border: 1px solid #e9e8ef; border-radius: 8px; background: #fff; color: #484951; box-shadow: 0 5px 24px #24252b17; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1150px) {
  :root { --panel-width: 205px; }
  .workspace { grid-template-columns: 54px var(--panel-width) minmax(310px, 1fr) var(--panel-width); }
  .canvas-toolbar { padding: 0 13px; }
  .canvas-stage { padding-left: 22px; padding-right: 22px; }
  .project-name input { width: 170px; }
}
@media (max-width: 950px) {
  :root { --panel-width: 190px; }
  .workspace { grid-template-columns: 50px var(--panel-width) minmax(280px, 1fr); }
  .properties-panel { display: none; }
  .topbar { padding: 0 14px; }
  .project-name input { width: 145px; }
  .canvas-hint { font-size: 9px; }
}

.project-browser { padding: 14px 13px 10px; border-bottom: 1px solid var(--line); }
.project-browser-heading { display: flex; align-items: center; justify-content: space-between; }
.project-browser-heading .icon-button { width: 25px; height: 25px; color: var(--text-muted); }
.project-browser-heading .icon-button i { font-size: 13px; }
.project-browser-list { max-height: 135px; overflow: auto; margin: 7px 0; }
.project-page { position: relative; width: 100%; min-height: 29px; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); text-align: left; font: inherit; font-size: 10px; cursor: pointer; }
.project-page > i { flex: 0 0 14px; color: #8d8e98; text-align: center; }
.project-page > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-page:hover, .project-page.is-current { background: #f3f1ff; color: #5b4bcf; }
.project-page.is-current > i { color: #6656e8; }
.page-folder-row { min-height: 31px; display: flex; align-items: center; gap: 7px; margin-top: 5px; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; color: var(--text-muted); font-size: 10px; transition: background .12s, border-color .12s; }
.page-folder-row:hover { background: var(--surface-soft); }
.page-folder-row.is-drop-target { border-color: #9c91ed; background: #f1efff; }
.page-folder-toggle { flex: 0 0 13px; width: 13px; height: 18px; padding: 0; border: 0; background: transparent; color: #9696a0; cursor: pointer; }
.page-folder-toggle i { font-size: 9px; }
.page-folder-row > .fa-folder { flex: 0 0 14px; width: 14px; font-size: 12px; text-align: center; color: #d3a44d; }
.page-folder-row > span:not(.page-folder-count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-folder-count { margin-left: auto; color: var(--text-muted); font-size: 9px; }
.page-folder-pages { margin-left: 13px; padding: 2px 0 3px 8px; border-left: 1px solid var(--line); }
.page-folder-pages .project-page { padding-left: 8px; }
.page-folder-empty { padding: 8px; color: var(--text-muted); font-size: 9px; font-style: italic; }
.project-page.is-dragging { opacity: .4; }
.project-page.is-drop-before::before, .project-page.is-drop-after::after { position: absolute; right: 3px; left: 3px; height: 2px; border-radius: 2px; background: #6656e8; content: ""; pointer-events: none; }
.project-page.is-drop-before::before { top: 0; }
.project-page.is-drop-after::after { bottom: 0; }
.layers-subheading > div { display: flex; gap: 4px; }
.layers-subheading #group-layers { font-size: 13px; }
.layer-row.is-multiselected { background: #e8e4ff; color: #5043c8; }
.layer-row.is-group { margin-top: 3px; font-weight: 600; }
.layer-row.is-child { padding-left: 23px; }
.layer-row.is-nested-child { padding-left: 38px; }
.layer-lock-indicator { flex: 0 0 16px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #a0a0a9; font-size: 10px; cursor: pointer; }
.layer-lock-indicator:hover { color: #6554e8; }
.layer-row.is-dragging { opacity: .4; }
.layer-row.is-drop-before::before,
.layer-row.is-drop-after::after { position: absolute; right: 7px; left: 7px; height: 2px; border-radius: 2px; background: #6656e8; content: ""; pointer-events: none; }
.layer-row.is-drop-before::before { top: -1px; }
.layer-row.is-drop-after::after { bottom: -1px; }
.layer-row.is-drop-inside { box-shadow: inset 0 0 0 2px #6656e8; background: #f1efff; }
.layer-row[draggable="true"] { position: relative; }
.axis-guide-line { stroke: #6656e8; stroke-width: 1.5; stroke-dasharray: 6 4; pointer-events: none; }
.group-toggle { flex: 0 0 14px; border: 0; background: none; color: #8c8d95; cursor: pointer; }
.layer-eye:disabled { display: none; }
.guide-line { stroke: #00a6a6; stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.crop-preview { pointer-events: none; }
.account-settings-help { margin: -7px 0 17px; color: var(--text-muted); font-size: 10px; line-height: 1.5; }
body[data-theme="dark"] .canvas-color-setting > span { background: var(--surface-soft); }
.auth-screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: #f3f2f8; }
.auth-card { width: min(100%, 380px); padding: 35px; border: 1px solid #e8e6ef; border-radius: 16px; background: #fff; box-shadow: 0 18px 70px #26203216; }
.auth-brand-mark { margin-bottom: 20px; }
.auth-card .eyebrow { margin: 0 0 7px; color: #7567d2; }
.auth-card h1 { margin: 0; font-family: Manrope, sans-serif; font-size: 23px; letter-spacing: -.7px; }
.auth-card > p:not(.eyebrow) { margin: 10px 0 22px; color: #888993; font-size: 12px; line-height: 1.55; }
.auth-field { display: block; margin: 14px 0; color: #686971; font-size: 11px; font-weight: 600; }
.auth-field input { width: 100%; height: 39px; margin-top: 6px; padding: 0 10px; border: 1px solid #e5e5eb; border-radius: 6px; outline: 0; background: #fff; color: #24252b; }
.auth-field input:focus { border-color: #9c91ed; box-shadow: 0 0 0 3px #6656e81c; }
.auth-submit { width: 100%; margin-top: 9px; }
.auth-mode-toggle { width: 100%; margin-top: 13px; border: 0; background: none; color: #6656e8; font-size: 11px; cursor: pointer; }
.auth-card .auth-message, .auth-card .auth-config-help { min-height: 15px; margin: 13px 0 0; color: #b64657; font-size: 10px; }
.auth-card .auth-config-help { padding: 10px; border-radius: 6px; background: #fff6eb; color: #785c32; line-height: 1.6; }
.auth-config-help code { font-size: 10px; }
body.is-authenticated .auth-screen { display: none; }
body.is-authenticated .app-shell { display: flex; }
body:not(.is-authenticated) .app-shell { visibility: hidden; }
body[data-theme="dark"] {
  color-scheme: dark;
  --surface: #22232a;
  --surface-soft: #2b2c34;
  --canvas: #191a20;
  --text: #f0eff7;
  --text-muted: #a4a4b1;
  --ink: #e8e7ef;
  --line: #3a3b46;
  background: var(--canvas);
  color: var(--text);
}
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .tool-rail,
body[data-theme="dark"] .layers-panel,
body[data-theme="dark"] .properties-panel,
body[data-theme="dark"] .canvas-toolbar,
body[data-theme="dark"] .statusbar { color: var(--text); background: var(--surface); }
body[data-theme="dark"] .canvas-stage { background-color: var(--canvas); }
body[data-theme="dark"] .project-name input,
body[data-theme="dark"] .breadcrumb strong,
body[data-theme="dark"] .properties-heading h2,
body[data-theme="dark"] .selection-title,
body[data-theme="dark"] .empty-properties strong { color: var(--text); }
body[data-theme="dark"] .brand { color: #f2f1f8; }
body[data-theme="dark"] .button-quiet,
body[data-theme="dark"] .field input,
body[data-theme="dark"] .color-field input,
body[data-theme="dark"] .field select,
body[data-theme="dark"] .text-dialog .auth-field input,
body[data-theme="dark"] .text-dialog .auth-field select { color: var(--text); }
body[data-theme="dark"] .layers-search,
body[data-theme="dark"] .field,
body[data-theme="dark"] .color-field,
body[data-theme="dark"] .text-dialog .auth-field input,
body[data-theme="dark"] .text-dialog .auth-field select { background: var(--surface-soft); border-color: var(--line); }
body[data-theme="dark"] .layer-row { color: #b9b9c3; }
body[data-theme="dark"] .layer-row:hover,
body[data-theme="dark"] .project-page:hover { background: #30313b; }
body[data-theme="dark"] .layer-row.is-selected,
body[data-theme="dark"] .layer-row.is-multiselected,
body[data-theme="dark"] .project-page.is-current { background: #39344f; color: #d4ceff; }
body[data-theme="dark"] .layer-row.is-drop-inside { background: #39344f; }
body[data-theme="dark"] .layer-lock-indicator { color: #b7b7c2; }
body[data-theme="dark"] .page-folder-row.is-drop-target { border-color: #796ae8; background: #39344f; }
body[data-theme="dark"] .layers-search input::placeholder { color: #858692; }
body[data-theme="dark"] .layers-search kbd { color: #888995; }
body[data-theme="dark"] .field > span,
body[data-theme="dark"] .property-section h3,
body[data-theme="dark"] .layers-subheading { color: #aaaab7; }
body[data-theme="dark"] .properties-heading,
body[data-theme="dark"] .selection-title,
body[data-theme="dark"] .property-section,
body[data-theme="dark"] .properties-bottom { border-color: var(--line); }
body[data-theme="dark"] .empty-properties p { color: #a2a3ae; }
body[data-theme="dark"] .empty-illustration span { background: #343149; border-color: #45405e; }
body[data-theme="dark"] .empty-illustration i { background: #3d302f; border-color: #55403a; }
body[data-theme="dark"] .empty-illustration b { background: #30313a; border-color: #4a4b55; }
body[data-theme="dark"] .canvas-hint { color: #aaabb6; }
body[data-theme="dark"] .hint-key { border-color: var(--line); background: var(--surface); color: var(--text); }
body[data-theme="dark"] .zoom-label,
body[data-theme="dark"] .button-quiet { color: #d1d0dd; }
body[data-theme="dark"] .button-quiet:hover,
body[data-theme="dark"] .zoom-label:hover { background: #30313a; border-color: #444550; }
body[data-theme="dark"] .tool-button { color: #b7b6c4; }
body[data-theme="dark"] .tool-button:hover,
body[data-theme="dark"] .icon-button:hover { color: #d4ceff; background: #38344c; }
body[data-theme="dark"] .floating-tools { border-color: #42434e; box-shadow: 0 8px 26px #05050966; }
body[data-theme="dark"] .floating-tools .tool-button { color: #c5c4d0; }
body[data-theme="dark"] .floating-tools .tool-button.is-active { color: #fff; background: #6656e8; }
body[data-theme="dark"] .tool-caret { color: #c5c4d0; }
body[data-theme="dark"] .distribution-controls button { background: #353640; color: #c0bfca; }
body[data-theme="dark"] .distribution-controls button:hover { background: #3b3654; color: #d4ceff; }
body[data-theme="dark"] .text-value-field textarea { background: var(--surface-soft); color: var(--text); }
body[data-theme="dark"] .export-section button { background: #30313a; color: var(--text); }
body[data-theme="dark"] .home-welcome p:not(.eyebrow),
body[data-theme="dark"] .project-card-meta span,
body[data-theme="dark"] .home-folder-card span { color: var(--text-muted); }
body[data-theme="dark"] .home-search input { color: var(--text); }
body[data-theme="dark"] .home-empty { border-color: var(--line); }
body[data-theme="dark"] .auth-card { background: var(--surface); border-color: var(--line); color: var(--text); }
body[data-theme="dark"] .auth-card > p:not(.eyebrow),
body[data-theme="dark"] .auth-field { color: var(--text-muted); }
body[data-theme="dark"] .auth-field input { background: var(--surface-soft); border-color: var(--line); color: var(--text); }
body[data-theme="dark"] .export-menu { background: var(--surface); border-color: var(--line); }
body[data-theme="dark"] .export-menu button { color: var(--text); }
body[data-theme="dark"] .export-menu button:hover { background: #343240; }
body[data-theme="dark"] .toast { background: var(--surface); border-color: var(--line); color: var(--text); }
body[data-theme="dark"] .auth-screen { background: #17181e; }
.text-dialog { width: min(100% - 32px, 360px); padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 16px 70px #17151e35; }
.print-editor-dialog { box-sizing: border-box; width: min(100% - 32px, 960px); max-height: min(calc(100vh - 32px), 900px); padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 16px 70px #17151e35; }
.print-editor-dialog::backdrop { background: #15141d75; backdrop-filter: blur(2px); }
.print-editor-heading, .print-editor-footer, .print-frames-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.print-editor-heading { margin-bottom: 18px; }
.print-editor-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 17px; }
.print-editor-heading p { margin: 5px 0 0; color: var(--text-muted); font-size: 10px; }
.print-editor-body { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); gap: 22px; max-height: calc(100vh - 230px); min-height: 320px; }
.print-settings { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; padding-right: 5px; }
.print-settings .auth-field, .print-preview-panel .auth-field { display: grid; gap: 5px; margin: 0; color: var(--text-muted); font-size: 10px; }
.print-settings .auth-field input, .print-settings .auth-field select, .print-preview-panel select { width: 100%; min-width: 0; height: 33px; margin: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 10px; }
.print-dimensions, .print-margins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.print-scale-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; align-items: end; }
.print-scale-row #print-custom-scale-wrap[hidden] { display: none; }
.print-settings h3 { margin: 2px 0 -4px; color: var(--text); font-size: 11px; }
.print-prepress-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; }
.print-check { display: flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 10px; }
.print-check input, .print-frame-choice input { accent-color: #6656e8; }
.print-frames-heading { margin-top: 2px; }
.print-frames-heading button { padding: 0; border: 0; background: transparent; color: #6656e8; font: inherit; font-size: 9px; cursor: pointer; }
.print-frame-list { display: grid; gap: 5px; max-height: 145px; overflow: auto; }
.print-frame-choice { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 9px; }
.print-frame-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.print-frame-choice small { margin-left: auto; color: var(--text-muted); white-space: nowrap; }
.print-frame-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 6px; color: var(--text-muted); font-size: 10px; line-height: 1.5; }
.print-preview-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.print-preview { display: grid; flex: 1; min-height: 260px; place-items: center; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.print-preview > svg { display: block; width: auto; max-width: 100%; max-height: 100%; height: auto; box-shadow: 0 4px 18px #17151e2a; }
.print-preview > p { max-width: 280px; color: var(--text-muted); font-size: 11px; line-height: 1.6; text-align: center; }
.print-preview-status { min-height: 16px; margin: 0; color: var(--text-muted); font-size: 9px; line-height: 1.5; }
.print-preview-status[data-error="true"] { color: #c74646; }
.print-preview-note { margin: 0; color: var(--text-muted); font-size: 9px; line-height: 1.5; }
.print-editor-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 10px; }
.print-editor-footer > div { display: flex; gap: 8px; }
.print-editor-footer .button { min-height: 34px; }
.print-editor-footer .button:disabled { opacity: .5; cursor: not-allowed; }
.print-editor-dialog[open] { overflow: auto; }
.component-library-dialog { width: min(100% - 32px, 560px); max-height: min(82vh, 720px); }
.component-library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.component-library-heading h2 { margin: 0; font-size: 17px; }
.component-library-heading p { margin: 6px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.component-library-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.component-library-filter { min-width: 0; flex: 1; display: grid; gap: 5px; color: var(--text-muted); font-size: 9px; }
.component-library-filter select { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 10px; }
.component-library-toolbar .button { min-height: 32px; white-space: nowrap; font-size: 9px; }
.component-library-folders { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.component-library-folder { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text-muted); font-size: 8px; }
.component-library-folder button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.component-library-folder button:hover { color: #6656e8; }
.component-library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; max-height: 55vh; overflow: auto; }
.component-library-card { min-width: 0; display: grid; grid-template-columns: 39px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.component-library-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-soft); color: #6656e8; font-size: 16px; }
.component-library-meta { min-width: 0; }
.component-library-meta strong { display: block; overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.component-library-meta span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 9px; }
.component-library-card-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 31px; gap: 5px; }
.component-library-card-actions button { min-width: 0; min-height: 29px; padding: 5px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font: inherit; font-size: 9px; cursor: pointer; }
.component-library-card-actions button:hover { border-color: #b9b1f5; color: #6656e8; }
.component-library-card-actions .component-library-delete { color: var(--text-muted); }
.component-library-card select { grid-column: 1 / -1; width: 100%; height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font: inherit; font-size: 9px; }
.component-library-empty { grid-column: 1 / -1; padding: 26px 15px; border: 1px dashed var(--line); border-radius: 8px; color: var(--text-muted); font-size: 11px; line-height: 1.6; text-align: center; }
.library-edit-bar { position: absolute; z-index: 5; top: 13px; left: 50%; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 7px 9px 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 5px 22px #18172522; transform: translateX(-50%); }
.library-edit-bar[hidden] { display: none; }
.library-edit-bar span { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.library-edit-bar .button { min-height: 29px; padding: 5px 9px; font-size: 9px; white-space: nowrap; }
.text-dialog::backdrop { background: #15141d75; backdrop-filter: blur(2px); }
.text-dialog h2 { margin: 0 0 17px; font-family: Manrope, sans-serif; font-size: 16px; }
.text-dialog .auth-field { margin: 0; }
.text-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
body[data-theme="dark"] .text-dialog { border-color: var(--line); }
body[data-theme="dark"] .print-editor-dialog { border-color: var(--line); }
body[data-theme="dark"] .print-frame-choice { background: var(--surface); }

body { min-width: 760px; }
.workspace { grid-template-columns: minmax(220px, 250px) minmax(350px, 1fr) minmax(245px, 270px); }
.topbar { height: 54px; flex-basis: 54px; }
.layers-panel { border-right: 1px solid var(--line); }
.properties-panel { border-left: 1px solid var(--line); }
.brand, .panel-heading h1, .properties-heading h2, .auth-card h1, .text-dialog h2 { font-family: "Montserrat", sans-serif; }
.canvas-stage { isolation: isolate; padding: 0; }
.canvas-scroll { z-index: 0; }
.floating-tools, .canvas-hint { z-index: 2; }
.canvas-area { position: relative; }
.button > i, .icon-button > i { font-size: 14px; }
.layers-search > i { flex: 0 0 15px; color: #a2a3aa; font-size: 13px; text-align: center; }
.layers-subheading button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); cursor: pointer; }
.layers-subheading button:hover { color: #6656e8; background: #f1efff; }
.layers-subheading button i { font-size: 12px; }
.layer-kind > i { font-size: 12px; }
.layer-eye > i { font-size: 11px; }
.group-toggle { padding: 0; }
.selection-icon > i { font-size: 14px; }
.project-page.is-current { font-weight: 600; }
.tool-caret > i { font-size: 9px; }
.home-search > i { flex: 0 0 16px; color: var(--text-muted); text-align: center; }
.home-folder-card > i { font-size: 18px; color: #8c7be9; }
.text-dialog .auth-field select { width: 100%; height: 39px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; }
body[data-theme="dark"] .project-page:hover { background: #30313b; }
body[data-theme="dark"] .project-page.is-current { background: #39344f; color: #d4ceff; }
body[data-theme="dark"] .project-page.is-current > i { color: #c3b9ff; }
body[data-theme="dark"] .layers-subheading button:hover { background: #38344c; color: #d4ceff; }
@media (max-width: 950px) {
  .workspace { grid-template-columns: minmax(180px, 210px) minmax(260px, 1fr) minmax(215px, 245px); }
  .properties-panel { display: flex; }
  .topbar { gap: 12px; padding: 0 12px; }
  .topbar-actions { gap: 3px; }
  .button { padding-left: 8px; padding-right: 8px; }
}
.custom-frame-button i, .text-button i { margin-right: 4px; }
@media (max-width: 820px) {
  .workspace { grid-template-columns: minmax(180px, 210px) minmax(260px, 1fr) minmax(215px, 245px); }
  .properties-panel { display: flex; }
}
.floating-tools { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 6px; border: 1px solid #e6e5ec; border-radius: 12px; background: var(--surface); box-shadow: 0 8px 26px #2524331d; }
.floating-tools .tool-button { width: 36px; height: 36px; color: #555660; }
.floating-tools .tool-button svg, .floating-tools .tool-button > i { width: 19px; height: 19px; font-size: 17px; }
.floating-tools .direct-selection-icon .direct-cursor { fill: currentColor; stroke: var(--surface); stroke-width: 1.1; }
.floating-tools .direct-selection-icon .direct-link { fill: none; stroke: currentColor; stroke-width: 1.6; }
.floating-tools .direct-selection-icon .direct-anchor { fill: var(--surface); stroke: currentColor; stroke-width: 1.5; }
.floating-tools .tool-button.is-active { color: #fff; background: #6656e8; }
.floating-tools .tool-button.is-active svg, .floating-tools .tool-button.is-active > i { color: #fff; }
.floating-tools .tool-button:first-child svg path { fill: currentColor; stroke: var(--surface); }
.floating-divider { width: 1px; height: 22px; margin: 0 4px; background: var(--line); }

.property-section { padding: 12px 14px 13px; }
.property-section h3 { margin-bottom: 9px; font-size: 10px; letter-spacing: .01em; }
.alignment-controls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 8px 14px 0; }
.alignment-controls[hidden] { display: none; }
.alignment-controls button { min-width: 0; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text-muted); cursor: pointer; }
.alignment-controls button:hover:not(:disabled) { border-color: #b9b1f5; background: #f1efff; color: #5143c8; }
.alignment-controls button:focus-visible { outline: 2px solid #8b7ced; outline-offset: 1px; }
.alignment-controls button:disabled { opacity: .45; cursor: not-allowed; }
.alignment-controls button i { font-size: 11px; }
.alignment-controls .alignment-icon-vertical { transform: rotate(90deg); }
.pathfinder-controls button { display: grid; place-items: center; font-size: 18px; line-height: 1; }
.pathfinder-controls button span { font-family: "Segoe UI Symbol", sans-serif; }
.pathfinder-controls button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body[data-theme="dark"] .alignment-controls button:hover { background: #3b3654; color: #d4ceff; }
body[data-theme="dark"] .alignment-controls button { background: var(--surface-soft); }
.tool-menu-wrap { position: relative; display: flex; align-items: center; }
.tool-menu-wrap .tool-button { border-radius: 7px 3px 3px 7px; }
.tool-caret { width: 13px; height: 26px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #777780; font-size: 11px; cursor: pointer; }
.tool-caret:hover { background: #f2f1f8; }
.tool-popover { position: absolute; z-index: 8; bottom: 48px; left: 0; width: 245px; max-height: min(64vh, 500px); overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 35px #1817252b; color: var(--text); }
.popover-heading { padding: 7px 8px 10px; font-size: 12px; font-weight: 700; }
.preset-group { padding: 7px 0; border-top: 1px solid var(--line); }
.preset-group strong { display: block; padding: 2px 8px 5px; color: var(--text-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.preset-group button, .shape-menu button, .vector-tools-menu button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 7px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font-size: 10px; text-align: left; cursor: pointer; }
.preset-group button:hover, .shape-menu button:hover, .vector-tools-menu button:hover { background: var(--surface-soft); }
.preset-group button > i, .shape-menu button > i, .vector-tools-menu button > i { flex: 0 0 16px; color: #7669d8; text-align: center; }
.preset-group button > span, .shape-menu button > span, .vector-tools-menu button > span { flex: 1; }
.preset-group button > span { color: var(--text-muted); font-family: inherit; font-size: 9px; text-align: right; }
.shape-menu kbd, .vector-tools-menu kbd { color: var(--text-muted); font-family: inherit; font-size: 9px; }
.shape-menu { width: 170px; }
.vector-tools-menu { width: 220px; }
.tool-popover button:focus-visible { outline: 2px solid #8b7ced; outline-offset: -2px; }
.tool-popover button > i { font-size: 12px; }
.custom-frame-button { width: 100%; padding: 9px 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: #6656e8; text-align: left; font-size: 10px; cursor: pointer; }
.custom-frame-button i { width: 16px; text-align: center; }
.custom-frame-presets > button { width: 100%; display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); font-size: 10px; text-align: left; cursor: pointer; }
.custom-frame-presets > button:hover { background: var(--surface-soft); }
.custom-frame-presets > button > i { flex: 0 0 16px; color: #7669d8; text-align: center; }
.custom-frame-presets .preset-remove { margin-left: auto; color: var(--text-muted); font-size: 14px; }
#artboard.outline-mode .canvas-object:not(g) { fill: none !important; stroke: var(--text-muted) !important; stroke-width: 1 !important; filter: none !important; }
#artboard.outline-mode .canvas-object > rect:first-of-type,
#artboard.outline-mode .canvas-object > text { fill: none !important; stroke: var(--text-muted) !important; stroke-width: 1 !important; }
#artboard.outline-mode .canvas-object image,
#artboard.outline-mode image.canvas-object { opacity: .16 !important; }
.custom-frame-presets:empty { display: none; }
.distribution-controls { display: flex; align-items: center; gap: 5px; padding: 8px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; color: var(--text-muted); font-size: 9px; }
.distribution-controls span { flex: 1; }
.distribution-controls button { width: 28px; height: 26px; border: 0; border-radius: 4px; background: var(--surface-soft); color: var(--text-muted); cursor: pointer; font-size: 14px; }
.distribution-controls button:hover { color: #6656e8; background: #f1efff; }
.distribution-controls[hidden] { display: none; }
.frame-margin-band { fill: #ec4899; fill-opacity: .14; }
.frame-margin-boundary { fill: none; stroke: #ec4899; stroke-opacity: .82; }
.frame-margins { margin-top: 12px; }
.frame-margins h4 { margin: 0 0 7px; color: var(--text-muted); font-size: 9px; font-weight: 600; }
.frame-margin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.frame-margin-mode { margin-top: 7px; }
.property-secondary-grid { margin-top: 8px; }
.property-section h3 .section-action { margin-left: auto; color: var(--text-muted); }
.property-section select { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 10px; outline: 0; }
.frame-clip-toggle, .custom-frame-save { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 10px; }
.frame-clip-toggle input, .custom-frame-save input { accent-color: #6656e8; }
.path-edit-hint { margin: 8px 0 0; color: var(--text-muted); font-size: 9px; line-height: 1.5; }
.path-anchor-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.path-anchor-actions button { min-height: 28px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 9px; cursor: pointer; }
.path-anchor-actions button:hover:not(:disabled) { border-color: #b9b1f5; color: #5143c8; }
.path-anchor-actions button:disabled { opacity: .5; cursor: not-allowed; }
.path-cut-button { width: 100%; min-height: 28px; display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 9px; cursor: pointer; }
.path-cut-button:hover:not(:disabled) { border-color: #b9b1f5; color: #5143c8; }
.path-cut-button:disabled { opacity: .5; cursor: not-allowed; }
.text-value-field textarea { width: 100%; resize: vertical; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; outline-color: #9c91ed; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 10px; }
.text-canvas-editor::selection { color: inherit; background: #c9c1ff; }
.text-value-field:has(textarea) { height: auto; align-items: flex-start; }
.custom-frame-dimensions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.custom-frame-save { margin-top: 12px; }
.home-screen { display: none; min-height: 100vh; overflow: auto; background: var(--canvas); color: var(--text); }
.home-topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: var(--surface); }
.home-account { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 11px; }
.home-content { width: min(100% - 48px, 1100px); margin: 0 auto; padding: 54px 0 70px; }
.home-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.home-welcome .eyebrow { margin: 0 0 13px; color: #7567d2; }
.home-welcome h1 { margin: 0; font-size: clamp(29px, 4vw, 42px); line-height: 1.15; letter-spacing: -1.6px; }
.home-welcome p:not(.eyebrow) { margin: 12px 0 0; color: var(--text-muted); font-size: 12px; }
.home-actions { display: flex; gap: 9px; }
.home-search { width: min(100%, 390px); height: 40px; display: flex; align-items: center; gap: 9px; margin-bottom: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.home-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 11px; }
.home-section { margin: 0 0 35px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.home-section-heading h2 { margin: 0; font-size: 14px; font-weight: 700; }
.home-section-heading > span { color: var(--text-muted); font-size: 10px; }
.home-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; }
.home-project-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: transform .16s, box-shadow .16s; }
.home-project-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px #24252b16; }
.project-preview { height: 136px; display: grid; place-items: center; overflow: hidden; background: #f0eff5; }
.project-thumbnail-svg { display: block; width: 100%; height: 100%; }
.project-preview.is-empty { color: var(--text-muted); font-size: 10px; }
.project-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; }
.project-card-meta strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-meta span { color: var(--text-muted); font-size: 9px; white-space: nowrap; }
.home-folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.home-folder-card { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.home-folder-card:hover { border-color: #c8c0f7; background: var(--surface-soft); }
.home-folder-card strong { display: block; font-size: 10px; }
.home-folder-card span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.text-button { border: 0; background: transparent; color: #6656e8; font: inherit; font-size: 10px; cursor: pointer; }
.home-empty { grid-column: 1 / -1; padding: 26px; border: 1px dashed var(--line); border-radius: 8px; color: var(--text-muted); font-size: 11px; text-align: center; }
.selection-colors { display: flex; flex-direction: column; gap: 6px; }
.selection-color-row { min-height: 36px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 25px; align-items: center; gap: 8px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.selection-color-row:hover { border-color: #9a8df0; }
.selection-color-swatch { width: 16px; height: 16px; border: 1px solid #0002; border-radius: 4px; }
.selection-color-details { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.selection-color-value { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.selection-color-count { color: var(--text-muted); font-size: 9px; }
.selection-color-picker { width: 25px; height: 25px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); cursor: pointer; }
.context-menu { position: fixed; z-index: 20; width: 250px; max-height: min(78vh, 620px); overflow: auto; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 12px 35px #1817252b; color: var(--text); }
.context-menu[hidden] { display: none; }
.context-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; border-radius: 5px; background: transparent; color: inherit; text-align: left; font: inherit; font-size: 11px; line-height: 1.35; cursor: pointer; }
.context-menu button:hover:not(:disabled) { background: var(--surface-soft); color: #6656e8; }
.context-menu button:disabled { opacity: .45; cursor: not-allowed; }
.context-menu button:focus-visible { outline: 2px solid #8b7ced; outline-offset: -2px; }
.context-menu button > i:first-child { flex: 0 0 16px; width: 16px; color: var(--text-muted); text-align: center; }
.context-menu button > span { flex: 1; min-width: 0; }
.context-menu button .context-menu-caret { flex: 0 0 12px; width: 12px; margin-left: auto; font-size: 9px; }
.context-menu-submenu.is-open > .context-menu-trigger { background: var(--surface-soft); color: #6656e8; }
.context-menu-divider { height: 1px; margin: 4px 5px; background: var(--line); }
.context-submenu { position: fixed; z-index: 21; width: 235px; max-height: min(70vh, 560px); overflow: auto; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 12px 35px #1817252b; color: var(--text); }
.context-submenu[hidden] { display: none; }
.context-menu button.is-danger { color: #bd3948; }
.context-menu button.is-danger > i:first-child { color: inherit; }
.context-menu button.is-danger:hover:not(:disabled) { background: #fff0f1; color: #a92334; }
body[data-theme="dark"] .context-menu button.is-danger:hover:not(:disabled) { background: #482d35; color: #ffabb4; }
.layout-guide-line { stroke: #22a8ff; stroke-width: 1; stroke-dasharray: 4 4; opacity: .45; pointer-events: none; }
.export-section > div { display: flex; gap: 7px; }
.export-section button { flex: 1; padding: 7px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 10px; cursor: pointer; }
.export-section button:hover { border-color: #b9b1f5; color: #6656e8; }
body.is-authenticated:not(.is-editor) .home-screen { display: block; }
body.is-authenticated:not(.is-editor) .app-shell { display: none; }
body.is-editor .home-screen { display: none; }
body[data-theme="dark"] .home-topbar,
body[data-theme="dark"] .home-project-card,
body[data-theme="dark"] .home-folder-card,
body[data-theme="dark"] .home-search { background: var(--surface); color: var(--text); }
body[data-theme="dark"] .project-preview { background: #2b2c33; }
body[data-theme="dark"] .floating-tools { border-color: var(--line); }
body[data-theme="dark"] .tool-popover { background: var(--surface); }
body[data-theme="dark"] .preset-group button:hover,
body[data-theme="dark"] .shape-menu button:hover,
body[data-theme="dark"] .vector-tools-menu button:hover { background: #30313a; }
body[data-theme="dark"] .custom-frame-presets > button:hover { background: #30313a; }
body[data-theme="dark"] .preset-group button > i,
body[data-theme="dark"] .shape-menu button > i,
body[data-theme="dark"] .vector-tools-menu button > i,
body[data-theme="dark"] .custom-frame-presets > button > i { color: #b7adff; }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 200px minmax(330px, 1fr) 230px; }
  .floating-tools { gap: 0; padding: 5px; }
  .floating-tools .tool-button { width: 32px; height: 34px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: 185px minmax(330px, 1fr); }
  .properties-panel { display: none; }
  .topbar { padding: 0 12px; gap: 10px; }
  .home-welcome { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 950px) {
  .workspace { grid-template-columns: minmax(180px, 210px) minmax(260px, 1fr) minmax(215px, 245px); }
  .properties-panel { display: flex; }
}
