/* Vector Editor — tools panel, document tabs, rulers, stage and overlay */
/* ---------- toolbar ---------- */
.toolbar { background: var(--bg-panel); border-right: 1px solid var(--border-dark); display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 10px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; min-height: 0; }
.tools { display: grid; grid-template-columns: repeat(2, 28px); gap: 2px; }
.tool { width: 28px; height: 28px; border: 0; background: transparent; color: var(--text-dim); border-radius: var(--radius-s); display: grid; place-items: center; padding: 0; position: relative; }
.tool:hover { background: var(--bg-hover); color: var(--text); }
.tool.on { background: var(--accent-soft); color: var(--accent-line); box-shadow: inset 0 0 0 1px rgba(231, 239, 255, .45); }
.tool .ic, .tool .ic-fill { width: 17px; height: 17px; }
.fswidget { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 2px; }
.fs-stack { position: relative; width: 50px; height: 50px; }
.fs { position: absolute; width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); background: var(--bg-input); border-radius: 2px; box-shadow: var(--bevel-in); }
.fs .chip-in { inset: 3px; }
.fs.fill { left: 2px; top: 2px; z-index: 1; }
.fs.stroke { right: 2px; bottom: 2px; z-index: 0; }
.fs.front { z-index: 2; border-color: var(--accent-line); }
.fs.stroke .hole { position: absolute; inset: 9px; background: var(--bg-panel); border: 1px solid var(--border); }
.fs-mini { position: absolute; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--text-dim); }
.fs-mini svg { width: 14px; height: 14px; }
.fs-mini:hover { color: var(--text); }
.swapb { right: 0; top: 0; }
.defb { left: 0; bottom: 0; }
.fs-modes { display: flex; gap: 2px; }
.fs-mode { width: 16px; height: 16px; padding: 0; border: 1px solid var(--border); background: var(--bg-input); border-radius: 2px; display: grid; place-items: center; }
.fs-mode span { width: 10px; height: 10px; display: block; }
.m-solid { background: var(--text-dim); }
.m-grad { background: linear-gradient(90deg, #fff, #0a0a0a); }
.m-none { background: #fff; position: relative; overflow: hidden; }
.m-none::after { content: ''; position: absolute; left: -2px; right: -2px; top: 4px; height: 1.5px; background: #ff2b2b; transform: rotate(-45deg); }

/* ---------- center / canvas ---------- */
.center { display: grid; grid-template-rows: var(--tab-h) minmax(0, 1fr); min-width: 0; min-height: 0; background: var(--bg-app); }
.doctabs { display: flex; align-items: flex-end; background: var(--bg-app); border-bottom: 1px solid var(--border-dark); padding: 0 6px; min-width: 0; overflow: hidden; }
.doctab { height: calc(var(--tab-h) - 4px); display: flex; align-items: center; gap: 2px; padding: 0 12px; background: var(--doctab-bg); color: var(--doctab-fg); border: 1px solid var(--border-dark); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-s); }
.dt-name { font-weight: 600; }
.dt-meta { color: inherit; opacity: .65; font-size: 10.5px; margin-left: 6px; }
.dt-dirty { color: var(--accent-line); margin-left: 6px; font-size: 9px; }
.workspace { position: relative; display: grid; grid-template-columns: var(--ruler) minmax(0, 1fr); grid-template-rows: var(--ruler) minmax(0, 1fr); min-height: 0; min-width: 0; }
.workspace.no-rulers { grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 0 minmax(0, 1fr); }
.workspace.no-rulers .ruler, .workspace.no-rulers .ruler-corner { display: none; }
.ruler-corner { background: var(--ruler-bg); border-right: 1px solid var(--ruler-tick); border-bottom: 1px solid var(--ruler-tick); }
.ruler { display: block; width: 100%; height: 100%; background: var(--ruler-bg); cursor: default; touch-action: none; }
.ruler-h { grid-column: 2; grid-row: 1; cursor: row-resize; }
.ruler-v { grid-column: 1; grid-row: 2; cursor: col-resize; }
.stage { grid-column: 2; grid-row: 2; position: relative; overflow: hidden; background: var(--pasteboard); touch-action: none; outline: none; user-select: none; -webkit-user-select: none; }
.docsvg, .overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.overlay { pointer-events: none; }
#artboard { fill: #fff; }
#artShadow { fill: var(--artboard-shadow); }
:root[data-theme="classic"] #artboard { stroke: #000; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.grid-minor { fill: none; stroke: rgba(0, 0, 0, .075); stroke-width: 1; }
.grid-major { fill: none; stroke: rgba(0, 0, 0, .17); stroke-width: 1; }
.text-editor {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; display: none; z-index: 4;
  margin: 0; padding: 0; border: 0; outline: 1px dashed rgba(79, 139, 255, .65); outline-offset: 2px; background: transparent;
  resize: none; overflow: hidden; white-space: pre; caret-color: #ff2d9a; font-kerning: normal; font-variant-ligatures: normal;
}
.drop-hint { position: absolute; inset: 10px; border: 2px dashed var(--tlbx); border-radius: 10px; display: none; place-items: center; pointer-events: none; background: rgba(231, 239, 255, .06); z-index: 6; }
.drop-hint span { background: var(--tlbx); color: var(--ink); font-weight: 700; padding: 8px 14px; border-radius: 999px; }
.app.dropping .drop-hint { display: grid; }

/* overlay graphics */
.overlay .selo { fill: none; stroke-width: 1; }
.overlay .hover { fill: none; stroke-width: 2; opacity: .9; }
.overlay .bbox { fill: none; stroke-width: 1; }
.overlay .handle { fill: #fff; stroke-width: 1; }
.overlay .anchor { fill: #fff; stroke-width: 1; }
.overlay .hline { stroke-width: 1; }
.overlay .hdot { fill: #fff; stroke-width: 1; }
.overlay .rubber { fill: none; stroke: #4f8bff; stroke-width: 1; }
.overlay .pencil { fill: none; stroke: #ff2d9a; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.overlay .marquee { fill: rgba(79, 139, 255, .08); stroke: #4f8bff; stroke-width: 1; stroke-dasharray: 4 3; }
.overlay .marquee.zoom { fill: rgba(231, 239, 255, .08); stroke: #417dff; }
.overlay .smart { stroke: #ff2dd4; stroke-width: 1; }
.overlay .guide { stroke: #00b8f0; stroke-width: 1; }
.overlay .guide.active { stroke: #ff2dd4; stroke-dasharray: 4 3; }
.overlay .guide.preview { stroke: #ff2dd4; stroke-dasharray: 5 4; }
.overlay .origin circle { fill: rgba(255, 255, 255, .6); stroke: #ff2dd4; stroke-width: 1.5; }
.overlay .origin path { stroke: #ff2dd4; stroke-width: 1.5; }
.overlay .gradline { stroke: #0a0a0a; stroke-width: 1.5; }
.overlay .gradend { fill: #fff; stroke: #0a0a0a; stroke-width: 1.5; }
.overlay .readout rect { fill: rgba(18, 18, 18, .88); }
.overlay .readout text { fill: #f2f2f2; font: 11px var(--mono); }

/* Drop strip at the foot of the stage (shared/drop, compact) */
.sv-dropstrip { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; max-height: 40%; overflow: auto; background: var(--bg-panel, #fff); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
