
:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #17191e;
  --panel: #20232a;
  --panel-2: #282c34;
  --line: #343944;
  --muted: #9da6b5;
  --text: #eef2f7;
  --accent: #4f8cff;
  --accent-2: #6ea0ff;
  --danger: #ef5f6c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
.app-shell { display: grid; grid-template-rows: 44px 42px minmax(0, 1fr); }
.topbar, .optionsbar { display: flex; align-items: center; border-bottom: 1px solid var(--line); background: #1d2026; }
.topbar { padding: 0 10px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 126px; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; overflow: hidden; background: #151923; box-shadow: 0 4px 14px #0005; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.ui-icon, .tool-icon { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ui-icon { width: 17px; height: 17px; }
.tool-icon { width: 21px; height: 21px; }
.brand-name { letter-spacing: .2px; white-space: nowrap; }
.menu-bar { display: flex; align-items: center; gap: 1px; }
.menu-button, .icon-button, .panel-actions button, .layer-order-actions button, .zoom-controls button { background: transparent; border-radius: 6px; padding: 7px 9px; }
.menu-button:hover, .icon-button:hover, .panel-actions button:hover, .layer-order-actions button:hover, .zoom-controls button:hover { background: #ffffff12; }
.menu-button.active, .menu-button[aria-expanded="true"] { background: #ffffff18; color: #fff; }
.menu-button:focus-visible, .tool:focus-visible, .icon-button:focus-visible, .primary-button:focus-visible, .option-icon-button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.document-title { flex: 1; min-width: 0; text-align: center; color: #cfd6e2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.primary-button { background: var(--accent); padding: 8px 14px; border-radius: 7px; font-weight: 650; }
.primary-button:hover { background: var(--accent-2); }
.optionsbar { padding: 5px 10px; gap: 10px; overflow-x: auto; white-space: nowrap; }
.removal-reset { flex-shrink: 0; padding: 7px 10px; border-radius: 6px; background: #ffffff12; }
.removal-reset:hover { background: #ffffff20; }
.removal-reset:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
#removeObjectApply { flex-shrink: 0; }
.option-group { display: inline-flex; gap: 6px; align-items: center; color: #cbd2de; font-size: 13px; }
.option-group input[type="range"] { width: 96px; }
.option-group input[type="number"], .option-group select, .layers-toolbar select { background: #111318; border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; }
.option-group input[type="number"] { width: 66px; }
.move-options { gap: 5px; }
.snap-toggle { min-height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; border-radius: 5px; cursor: pointer; }
.snap-toggle:hover { background: #ffffff0a; }
.snap-toggle input { margin: 0; accent-color: var(--accent); }
.option-divider { width: 1px; height: 20px; margin: 0 2px; background: var(--line); }
.option-caption { color: var(--muted); font-size: 11px; }
.option-icon-button { width: 30px; height: 28px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #cbd4e1; }
.option-icon-button:hover:not(:disabled) { background: #ffffff0e; border-color: #3d4655; color: #fff; }
.option-icon-button:active:not(:disabled) { background: #4f8cff28; border-color: #4f8cff66; }
.option-icon-button:disabled { opacity: .35; cursor: not-allowed; }
.workspace { display: grid; grid-template-columns: 86px minmax(0, 1fr) 286px; min-height: 0; }
.toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 40px; align-content: start; gap: 4px; padding: 7px; background: #1c1f25; border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.toolbar { position: relative; }
.tool { position: relative; min-width: 32px; min-height: 40px; display: grid; place-items: center; border-radius: 8px; background: transparent; color: #c9d1dd; font-size: 17px; }
.tool small { position: absolute; right: 3px; bottom: 1px; max-width: 18px; overflow: hidden; font-size: 8px; line-height: 1; color: var(--muted); }
.tool:hover { background: #ffffff10; }
.tool[draggable="true"] { cursor: grab; }
.tool[draggable="true"]:active { cursor: grabbing; }
.tool.active { background: #4f8cff2c; color: #f4f8ff; outline: 1px solid #4f8cff88; }
.tool.tool-dragging { opacity: .38; transform: scale(.94); }
.toolbar-drop-slot { position: absolute; z-index: 4; box-sizing: border-box; border: 2px dashed #8fb5ff; border-radius: 8px; background: #4f8cff24; box-shadow: inset 0 0 0 1px #4f8cff55; pointer-events: none; }
.tool-tooltip { position: fixed; z-index: 1000; width: min(310px, calc(100vw - 20px)); padding: 11px 12px 10px; border: 1px solid #556176; border-radius: 9px; background: #11151df5; color: #edf3ff; box-shadow: 0 12px 32px #000a; pointer-events: none; white-space: normal; }
.tool-tooltip strong { display: block; margin-bottom: 5px; color: #fff; font-size: 13px; }
.tool-tooltip span { display: block; color: #c5cfde; font-size: 12px; line-height: 1.42; }
.tool-tooltip kbd { display: inline-block; margin-top: 8px; padding: 2px 6px; border: 1px solid #556176; border-bottom-color: #77849a; border-radius: 5px; background: #242b37; color: #9fc0ff; font: 600 10px/1.4 inherit; }
.developer-card { display: grid; gap: 5px; margin-top: 16px; padding: 12px 14px; border: 1px solid #3d4657; border-radius: 9px; background: #181c24; }
.developer-card > span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.developer-card > strong { margin-bottom: 2px; color: #fff; }
.developer-card a { width: fit-content; color: #8fb5ff; text-decoration: none; }
.developer-card a:hover { color: #b7d0ff; text-decoration: underline; }
.developer-card a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 2px; }
.toolbar-spacer { grid-column: 1 / -1; min-height: 0; }
.color-chip { grid-column: 1 / -1; width: 34px; height: 34px; border: 2px solid #dce4ef; border-radius: 8px; margin: 5px auto 2px; background: #4f8cff; box-shadow: 0 0 0 1px #000; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 50px minmax(0, 1fr) 250px; }
  .toolbar { grid-template-columns: 1fr; grid-auto-rows: 38px; padding: 6px; gap: 3px; }
  .toolbar-spacer, .color-chip { grid-column: 1; }
}
.stage-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: 36px minmax(0,1fr) 34px; background: #111318; }
.stage-tabs, .statusbar { display: flex; align-items: center; padding: 0 10px; background: #1c1f25; border-bottom: 1px solid var(--line); font-size: 12px; }
.stage-tabs { justify-content: space-between; gap: 10px; }
.doc-tabs-wrap { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 6px; overflow: hidden; }
.doc-tabs-strip { flex: 0 1 auto; width: max-content; max-width: calc(100% - 30px); min-width: 0; display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.doc-tab-shell { flex: 0 0 auto; min-width: 0; max-width: 240px; display: flex; align-items: center; gap: 2px; background: #282c34; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; }
.doc-tab-shell.active { background: #313744; border-color: #485164; box-shadow: inset 0 1px 0 #5f6b83; }
.doc-tab { min-width: 0; max-width: 200px; background: transparent; padding: 7px 10px; color: #dbe3ef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tab[aria-selected="true"] { color: #fff; }
.doc-tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-tab-close, .doc-tab-add { flex: 0 0 auto; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0; border-radius: 6px; color: #cdd5e2; }
.doc-tab-close { margin-right: 4px; background: transparent; font-size: 15px; }
.doc-tab-close:hover, .doc-tab-add:hover { background: #ffffff16; }
.doc-tab-close:focus-visible, .doc-tab-add:focus-visible, .doc-tab:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.doc-tab-add { align-self: center; background: #282c34; border: 1px solid #394150; font-size: 16px; }
.dirty-dot { color: var(--accent); margin-left: 6px; font-size: 8px; }
.stage-meta { color: var(--muted); display: flex; gap: 7px; flex: 0 0 auto; }
.stage-viewport { position: relative; overflow: auto; background-color: #121419; background-image: radial-gradient(#343944 1px, transparent 1px); background-size: 18px 18px; outline: none; }
.canvas-shell { position: relative; margin: 44px auto; transform-origin: top left; box-shadow: 0 15px 50px #000a, 0 0 0 1px #ffffff15; background-color: #252a31; background-image: linear-gradient(45deg,#30363f 25%,transparent 25%),linear-gradient(-45deg,#30363f 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#30363f 75%),linear-gradient(-45deg,transparent 75%,#30363f 75%); background-size: 24px 24px; background-position: 0 0,0 12px,12px -12px,-12px 0; }
.canvas-shell canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; }
#editorCanvas { background: transparent; }
#overlayCanvas { touch-action: none; }
.stage-viewport.background-brush-active { cursor:default; touch-action:none; }
.empty-drop { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; color: var(--muted); gap: 6px; }
.empty-drop strong { color: #dce6f7; font-size: 15px; }
.empty-drop small { color: #778396; }
.statusbar { border-top: 1px solid var(--line); border-bottom: 0; gap: 14px; color: var(--muted); }
#statusText { flex: 1; color: #cfd6e2; }
.zoom-controls { display: flex; align-items: center; gap: 4px; }
.zoom-controls input { width: 120px; }
.zoom-controls button { color: #d9e0ea; padding: 4px 7px; }
.right-panel { min-height: 0; overflow: auto; background: #1b1e24; border-left: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 7px; }
.panel-card { background: #21252c; border: 1px solid #303540; border-radius: 8px; overflow: hidden; }
.panel-card > header { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px; background: #262a32; border-bottom: 1px solid var(--line); font-size: 12px; }
.panel-toggle { flex: 1; min-width: 0; min-height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 3px; background: transparent; color: inherit; text-align: left; }
.panel-toggle:hover { color: #fff; }
.panel-toggle:focus-visible, .prop-section-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -1px; border-radius: 5px; }
.panel-toggle-icon { display: inline-block; width: 12px; color: #9eabba; transform-origin: 50% 50%; transition: transform .12s ease; }
.panel-card.is-collapsed > header { border-bottom-color: transparent; }
.panel-card.is-collapsed > :not(header) { display: none !important; }
.panel-card.is-collapsed .panel-toggle-icon { transform: rotate(-90deg); }
.panel-card.is-collapsed { min-height: 0; flex: 0 0 auto; }
.panel-actions { display: flex; align-items: center; gap: 2px; }
.panel-content { padding: 9px; }
.muted { color: var(--muted); font-size: 12px; }
.properties-panel { flex: 0 0 auto; }
.effects-panel { flex: 0 0 auto; }
.layers-panel { min-height: 260px; flex: 1 1 auto; display: flex; flex-direction: column; }
.paths-panel { flex: 0 0 176px; min-height: 116px; display: flex; flex-direction: column; }
.history-panel { flex: 0 0 160px; min-height: 110px; }
.layers-toolbar { display: flex; gap: 7px; align-items: center; padding: 7px; font-size: 11px; border-bottom: 1px solid var(--line); }
.layers-toolbar select { min-width: 100px; max-width: 130px; }
.layers-toolbar input { width: 78px; }
.layers-list, .history-list, .paths-list { overflow: auto; }
.paths-list { min-height: 72px; flex: 1; }
.paths-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; border-bottom: 1px solid var(--line); }
.paths-toolbar button { min-height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 7px; border-radius: 6px; background: #2b3038; color: #d7deea; font-size: 11px; }
.paths-toolbar button:hover:not(:disabled) { background: #ffffff12; }
.paths-toolbar button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.path-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 9px; border-bottom: 1px solid #2d323b; background: transparent; color: #dce4ef; text-align: left; }
.path-row:hover { background: #ffffff09; }
.path-row.selected { background: #3f72d62c; outline: 1px solid #4f8cff55; outline-offset: -1px; }
.path-row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.path-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.path-row-meta { color: var(--muted); font-size: 9px; white-space: nowrap; }
.paths-empty { padding: 12px 9px; color: var(--muted); font-size: 11px; text-align: center; }
.layers-list { flex: 1; min-height: 130px; }
.layers-list.drop-root { outline: 1px dashed var(--accent-2); outline-offset: -4px; background: #315dbe14; }
.layer-row, .layer-group-row { display: grid; align-items: center; gap: 5px; min-height: 42px; padding: 4px 7px; border-bottom: 1px solid #2d323b; cursor: default; }
.layer-row { grid-template-columns: 24px 35px minmax(0,1fr) 24px; }
.layer-group-row { grid-template-columns: 24px 24px 35px minmax(0,1fr) 24px 24px; }
.layer-row:hover, .layer-group-row:hover { background: #ffffff09; }
.layer-row.selected { background: #3f72d62c; outline: 1px solid #4f8cff55; outline-offset: -1px; }
.layer-row:focus-visible, .layer-group-row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.layer-row.in-group { padding-left: calc(7px + var(--layer-depth, 1) * 17px); background-image: linear-gradient(90deg, transparent 0 14px, #39404a 14px 15px, transparent 15px); }
.layer-group-row { padding-left: calc(7px + var(--group-depth, 0) * 17px); }
.layer-row.in-group:hover { background-color: #ffffff09; }
.layer-row.dragging, .layer-group-row.dragging { opacity: .45; }
.layer-row.drop-before { box-shadow: inset 0 2px 0 var(--accent-2); }
.layer-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent-2); }
.layer-group-row { background: #232832; font-weight: 600; }
.layer-row.group-hidden .layer-thumb, .layer-row.group-hidden .layer-name { opacity: .45; }
.layer-group-row.group-hidden .layer-group-thumb, .layer-group-row.group-hidden .layer-group-name { opacity: .55; }
.layer-row.group-locked .layer-name { color: #aeb7c4; }
.layer-group-row.drop-into { background: #315dbe3d; outline: 1px solid var(--accent-2); outline-offset: -1px; }
.layer-group-toggle, .layer-group-remove { background: transparent; color: #c6ced9; padding: 3px; min-width: 24px; min-height: 24px; }
.layer-group-toggle { font-size: 13px; }
.layer-group-remove { font-size: 18px; line-height: 1; opacity: .72; }
.layer-group-remove:hover { opacity: 1; color: #fff; }
.layer-group-thumb { background: #222b3d; color: #8fb2ff; font-size: 15px; }
.layer-group-name { color: #e8edf5; background: transparent; padding: 0; text-align: left; font: inherit; min-width: 0; }
.layer-thumb { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; background: #15171b; border: 1px solid #3a404a; font-size: 12px; color: #c9d0da; overflow: hidden; }
.layer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.layer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.layer-eye, .layer-lock { background: transparent; color: #c6ced9; padding: 3px; min-width: 24px; min-height: 24px; }
.layer-lock:disabled { opacity: .65; cursor: not-allowed; }
.layer-order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; border-top: 1px solid var(--line); }
.layer-order-actions button { background: #2b3038; font-size: 11px; }
.history-row { padding: 6px 9px; border-bottom: 1px solid #2d323b; font-size: 11px; color: #bac2ce; }
.history-row.current { color: white; background: #ffffff0b; }
.prop-grid { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 7px 8px; align-items: center; font-size: 11px; }
.prop-grid label { color: var(--muted); }
.prop-grid input, .prop-grid select, .prop-grid textarea { width: 100%; background: #15171b; border: 1px solid var(--line); border-radius: 5px; padding: 5px 6px; }
.prop-grid textarea { min-height: 72px; resize: vertical; }
.prop-grid button[data-local-fonts] { width: 100%; text-align: left; }
.prop-grid .wide { grid-column: 1 / -1; }
.smart-object-link-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.smart-filter-stack { display: grid; gap: 5px; margin-top: 4px; padding-top: 8px; border-top: 1px solid #303641; }
.smart-filter-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.smart-filter-heading strong { font-size: 11px; color: #eef2f7; }
.smart-filter-heading span { color: var(--muted); font-size: 9px; text-align: right; }
.smart-filter-mask { display: grid; gap: 6px; padding: 7px; border: 1px solid #3a4350; border-radius: 6px; background: #14181e; }
.smart-filter-mask.is-disabled { opacity: .62; }
.smart-filter-mask-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; }
.smart-filter-mask-title span { color: var(--muted); }
.smart-filter-mask-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.smart-filter-mask-range { display: grid; grid-template-columns: 72px minmax(80px,1fr) 54px; gap: 6px; align-items: center; font-size: 10px; color: #cbd4e1; }
.smart-filter-mask-range input[type="range"] { min-width: 0; padding: 0; border: 0; background: transparent; }
.smart-filter-mask-range output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.smart-filter-row { display: grid; grid-template-columns: 24px minmax(0,1fr) 24px 24px 24px; gap: 3px; align-items: center; min-height: 29px; padding: 2px; border: 1px solid #343b47; border-radius: 5px; background: #191d24; }
.smart-filter-row.is-disabled { opacity: .58; }
.smart-filter-row button { min-width: 24px; min-height: 24px; padding: 2px; border-radius: 4px; background: transparent; color: #cbd4e1; }
.smart-filter-row button:hover:not(:disabled) { background: #ffffff10; color: #fff; }
.smart-filter-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.smart-filter-remove:hover:not(:disabled) { color: #ff9ba5; }
.smart-filter-actions { display: flex; gap: 5px; }
.smart-filter-empty { padding: 6px; border: 1px dashed #3b4350; border-radius: 5px; color: var(--muted); text-align: center; font-size: 10px; }
.menu-popover { position: fixed; z-index: 100; min-width: 238px; max-width: calc(100vw - 12px); max-height: calc(100vh - 12px); overflow-y: auto; background: #252932; border: 1px solid #434957; border-radius: 8px; padding: 5px; box-shadow: 0 14px 35px #000a; }
.menu-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: transparent; padding: 8px 9px; border-radius: 5px; text-align: left; font-size: 12px; }
.menu-item:hover { background: #ffffff10; }
.menu-item:focus-visible { outline: 1px solid var(--accent-2); background: #ffffff10; }
.menu-item:disabled { color: #697386; }
.menu-sep { border-top: 1px solid var(--line); margin: 5px 0; }
.menu-shortcut { color: var(--muted); font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: transparent; display: grid; place-items: center; padding: 18px; }
.modal-backdrop.text-modal-backdrop { background: transparent; }
.modal { width: min(480px, 95vw); max-height: 90vh; overflow: auto; background: #242830; border: 1px solid #464d5a; border-radius: 12px; box-shadow: 0 20px 70px #000c; }
.modal.text-modal { position: fixed; width: min(560px, calc(100vw - 24px)); height: min(720px, calc(100vh - 24px)); min-width: min(360px, calc(100vw - 24px)); min-height: 280px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden; resize: both; }
.text-modal .modal-body { min-height: 0; overflow-y: auto; }
.text-modal header, .text-modal footer { flex: 0 0 auto; }
.text-modal header { cursor: grab; user-select: none; touch-action: none; }
.text-modal header:active { cursor: grabbing; }
.text-preview { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 6px; width: 100%; height: 200px; min-height: 140px; max-height: 70vh; padding: 9px; border: 1px solid #465060; border-radius: 8px; background: #1b2028; resize: vertical; overflow: hidden; }
.text-preview strong { font-size: 12px; }
.text-preview canvas { display: block; width: 100%; height: 100%; min-height: 0; border-radius: 5px; background-color: #252a31; background-image: linear-gradient(45deg,#30363f 25%,transparent 25%),linear-gradient(-45deg,#30363f 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#30363f 75%),linear-gradient(-45deg,transparent 75%,#30363f 75%); background-size: 24px 24px; background-position: var(--preview-bg-x,0px) var(--preview-bg-y,0px), var(--preview-bg-x,0px) calc(var(--preview-bg-y,0px) + 12px), calc(var(--preview-bg-x,0px) + 12px) calc(var(--preview-bg-y,0px) - 12px), calc(var(--preview-bg-x,0px) - 12px) var(--preview-bg-y,0px); }
.text-preview small { color: #aeb9ca; font-size: 11px; }
.modal header { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px; display: grid; gap: 12px; }
.modal-row { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; align-items: center; font-size: 13px; }
.modal-row input, .modal-row select, .modal-row textarea { width: 100%; background: #15171b; border: 1px solid #3a404b; padding: 8px; border-radius: 6px; }
.modal-row input[type="color"] { height: 36px; padding: 3px; cursor: pointer; }
.modal-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.modal-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.modal-row input[type="color"]::-moz-color-swatch { border: 0; border-radius: 3px; }
.modal-row textarea { min-height: 110px; resize: vertical; }
.selection-refine-modal { width: min(720px, 96vw); }
.selection-refine-preview { display: grid; grid-template-rows: auto minmax(120px,1fr) auto; gap: 7px; min-height: 190px; padding: 10px; border: 1px solid #465060; border-radius: 8px; background: #1b2028; overflow: hidden; }
.selection-refine-preview strong { font-size: 12px; }
.selection-refine-preview canvas { display: block; width: 100%; height: min(240px, 32vh); min-height: 120px; object-fit: contain; border: 1px solid #39424f; border-radius: 5px; background: #090b0e; }
.selection-refine-preview small { color: #aeb9ca; font-size: 11px; line-height: 1.35; }
.blending-modal { width: min(860px, 96vw); }
.modal.blending-modal { position: fixed; width: min(860px, calc(100vw - 24px)); height: min(535px, calc(100vh - 24px)); min-width: min(400px, calc(100vw - 24px)); min-height: min(350px, calc(100vh - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden; resize: both; }
.blending-modal header { cursor: grab; user-select: none; touch-action: none; }
.blending-modal header:active { cursor: grabbing; }
.blending-modal header, .blending-modal footer { flex: 0 0 auto; }
.blending-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); flex: 1; min-height: 0; }
.blending-list { overflow-y: auto; padding: 8px; border-right: 1px solid var(--line); background: #20242b; }
.blending-style-row { display: flex; align-items: center; gap: 5px; min-height: 32px; }
.blending-style-row input { margin: 0 0 0 6px; accent-color: var(--accent); }
.blending-style-select { flex: 1; min-width: 0; padding: 7px 8px; border-radius: 5px; background: transparent; text-align: left; font-size: 12px; }
.blending-style-select:hover, .blending-style-select.active { background: #4f8cff2a; color: #fff; }
.blending-style-select:focus-visible, .blending-style-row input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.blending-details { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; padding: 17px 20px; }
.blending-hint { margin: 0 0 16px; line-height: 1.45; overflow-wrap: anywhere; }
.blending-fields { display: grid; align-content: start; gap: 14px; }
.blending-fields h3 { margin: 0 0 3px; font-size: 15px; }
.blending-field { display: grid; grid-template-columns: 160px minmax(0, 1fr) 54px; gap: 9px; align-items: center; font-size: 12px; }
.blending-field > span { color: #c8d1dd; }
.blending-field input[type="range"] { width: 100%; min-width: 0; accent-color: var(--accent); }
.blending-field input[type="color"] { width: 64px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: #15171b; }
.blending-field select { grid-column: 2 / 4; width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: #15171b; }
.blending-field output { text-align: right; font-variant-numeric: tabular-nums; }
.blending-note { margin: 0; line-height: 1.45; }
.blending-canvas-preview { display: flex; flex: 1 0 195px; flex-direction: column; gap: 7px; margin-top: auto; padding-top: 18px; min-height: 195px; }
.blending-canvas-preview strong { font-size: 12px; }
.blending-canvas-preview canvas { display: block; flex: 1; width: 100%; height: 170px; min-height: 170px; border: 1px solid #465060; border-radius: 6px; background-color: #252a31; background-image: linear-gradient(45deg,#30363f 25%,transparent 25%),linear-gradient(-45deg,#30363f 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#30363f 75%),linear-gradient(-45deg,transparent 75%,#30363f 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.blending-preview { display: flex; align-items: center; gap: 6px; margin-right: auto; font-size: 12px; }
.blending-preview input { accent-color: var(--accent); }
@media (max-width: 620px) {
  .blending-layout { grid-template-columns: 1fr; grid-template-rows: minmax(90px, 130px) minmax(0, 1fr); }
  .blending-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); }
  .blending-details { min-height: 210px; }
  .blending-field { grid-template-columns: 1fr 50px; }
  .blending-field > span { grid-column: 1 / -1; }
  .blending-field select { grid-column: 1 / -1; }
}
.info-modal { color: #d5dce8; font-size: 13px; line-height: 1.55; }
.recovery-modal { width: min(760px, 96vw); overflow: hidden; }
.recovery-modal-body { max-height: min(560px, 66vh); overflow-y: auto; align-content: start; }
.recovery-intro { margin: 0; color: #cbd4e1; line-height: 1.5; }
.recovery-intro:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 3px; }
.recovery-project-list { display: grid; gap: 8px; }
.recovery-project { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: start; min-width: 0; padding: 11px 12px; border: 1px solid #3b4350; border-radius: 8px; background: #1b1f26; cursor: pointer; }
.recovery-project:hover { border-color: #536078; background: #202630; }
.recovery-project.selected { border-color: #6b9fff; background: #26344a; box-shadow: inset 0 0 0 1px #4f8cff55; }
.recovery-project:focus-within { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.recovery-project > input { margin: 3px 0 0; accent-color: var(--accent); }
.recovery-project-content { display: grid; gap: 4px; min-width: 0; }
.recovery-project-title { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.recovery-project-meta, .recovery-project-documents { overflow: hidden; color: #aeb8c7; font-size: 11px; line-height: 1.4; text-overflow: ellipsis; }
.recovery-project-documents { color: #8f9bad; white-space: nowrap; }
.recovery-project-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 150px; }
.recovery-badge { padding: 3px 6px; border: 1px solid #485467; border-radius: 999px; background: #2b3340; color: #c8d2e2; font-size: 10px; white-space: nowrap; }
.recovery-badge.warning { border-color: #80632f; background: #40351f; color: #f0ce8a; }
.modal footer.recovery-footer { justify-content: space-between; flex-wrap: wrap; }
.recovery-footer-start, .recovery-footer-end { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 620px) {
  .recovery-project { grid-template-columns: auto minmax(0,1fr); }
  .recovery-project-badges { grid-column: 2; justify-content: flex-start; max-width: none; }
  .recovery-footer-start, .recovery-footer-end { width: 100%; }
  .recovery-footer-start button, .recovery-footer-end button { flex: 1 1 145px; }
}

.modal.learning-center-modal { width: min(1180px, 96vw); height: min(880px, 94vh); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; }
.learning-center-modal > header, .learning-center-modal > footer { flex: 0 0 auto; }
.learning-center-modal .info-modal { flex: 1 1 auto; min-height: 0; padding: 0; display: block; overflow: hidden; }
.learning-center-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); background: #1d222a; color: #d9e2ef; }
.learning-hero { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(330px,.8fr); gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,#242b37,#20252e 58%,#1d2635); }
.learning-eyebrow { color: #8fb7ff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.learning-hero h2 { margin: 5px 0; color: #fff; font-size: 21px; }
.learning-hero p { margin: 0; max-width: 720px; color: #b9c6d9; font-size: 12px; line-height: 1.55; }
.learning-level-progress { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.learning-level-progress > span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #3f4d61; border-radius: 999px; background: #17202dcc; color: #b7c8df; font-size: 10px; }
.learning-level-progress strong { color: #eef5ff; font-size: 10px; }
.learning-level-progress small { min-width: 25px; color: #8fb7ff; text-align: right; font-weight: 800; }
.learning-progress-panel { align-self: stretch; display: grid; align-content: center; gap: 8px; padding: 12px; border: 1px solid #3d4960; border-radius: 10px; background: #161b22aa; }
.learning-progress-row { display: flex; justify-content: space-between; gap: 12px; color: #fff; font-size: 12px; }
.learning-progress-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #0e1218; box-shadow: inset 0 0 0 1px #394250; }
.learning-progress-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#4f8cff,#7fb0ff); transition: width .2s ease; }
.learning-progress-metrics { display: flex; flex-wrap: wrap; gap: 7px; }
.learning-progress-metrics > span { padding: 4px 7px; border: 1px solid #344257; border-radius: 6px; background: #10172080; color: #93a4ba; font-size: 10px; }
.learning-progress-metrics strong { color: #dce8fa; font-variant-numeric: tabular-nums; }
.learning-progress-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.learning-progress-actions button { min-height: 34px; }
.learning-progress-panel small { color: #8f9caf; font-size: 10px; }
.learning-layout { min-height: 0; display: grid; grid-template-columns: 300px minmax(0,1fr); }
.learning-nav { min-height: 0; overflow-y: auto; padding: 10px; border-right: 1px solid var(--line); background: #191e25; }
.learning-nav-item { width: 100%; min-height: 49px; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 9px; align-items: center; margin: 0 0 5px; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #cbd5e4; text-align: left; cursor: pointer; }
.learning-nav-item:hover { background: #ffffff0b; border-color: #3a4453; }
.learning-nav-item:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.learning-nav-item.is-active { border-color: #537fc5; background: #23334a; color: #fff; }
.learning-nav-item.is-complete .learning-nav-number { border-color: #4d856c; background: #244b3b; color: #a8e4c5; }
.learning-nav-item.is-ready .learning-nav-number { border-color: #6386c2; background: #243d64; color: #c8dcff; }
.learning-nav-item.is-progress .learning-nav-number { border-color: #8a6a35; background: #483920; color: #f4d69a; }
.learning-nav-number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #465164; border-radius: 50%; color: #b7c3d3; font-size: 11px; font-weight: 800; }
.learning-nav-copy { min-width: 0; display: grid; gap: 2px; }
.learning-nav-copy strong { overflow: hidden; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; }
.learning-nav-copy small { color: #8997ab; font-size: 9px; }
.learning-content { min-height: 0; overflow-y: auto; padding: 18px 20px 24px; scroll-padding-top: 18px; }
.learning-lesson { width: min(780px,100%); margin: 0 auto; display: grid; gap: 12px; }
.learning-lesson-heading { padding-bottom: 2px; }
.learning-lesson-heading > div { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.learning-level, .learning-time, .learning-status-badge { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 7px; border: 1px solid #45546a; border-radius: 999px; background: #232d3b; color: #bcd0ef; font-size: 10px; font-weight: 700; }
.learning-time { background: transparent; color: #98a6ba; }
.learning-status-badge { min-height: 20px; border-color: #425066; background: #1c2430; color: #9bacbf; white-space: nowrap; font-variant-numeric: tabular-nums; }
.learning-status-badge.is-progress { border-color: #735b32; background: #3d321f; color: #e7c987; }
.learning-status-badge.is-ready { border-color: #4c6895; background: #253b5e; color: #bfd7ff; }
.learning-status-badge.is-complete, .learning-status-badge.is-success { border-color: #3f755d; background: #213f33; color: #a9dfc4; }
.learning-lesson h2 { margin: 7px 0 5px; color: #fff; font-size: 19px; line-height: 1.25; }
.learning-lesson-heading p { margin: 0; color: #b7c3d4; font-size: 12px; line-height: 1.55; }
.learning-card { padding: 13px 14px; border: 1px solid #394453; border-radius: 9px; background: #222831; }
.learning-card h3 { margin: 0 0 8px; color: #eef4ff; font-size: 12px; }
.learning-card p { margin: 0; color: #b9c5d5; font-size: 11px; line-height: 1.55; }
.learning-card ul, .learning-card ol { margin: 0; padding-left: 19px; color: #c3cddd; font-size: 11px; line-height: 1.55; }
.learning-card li + li { margin-top: 5px; }
.learning-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.learning-concept { border-color: #525f82; background: linear-gradient(135deg,#252b3d,#232831); }
.learning-concept > p:first-of-type { color: #d4deed; font-size: 12px; }
.learning-decision { margin-top: 10px !important; padding: 9px 10px; border-left: 3px solid #8d7df0; border-radius: 4px; background: #1a1d31; color: #cfd2f8 !important; }
.learning-section-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 9px; }
.learning-section-heading h3 { margin-bottom: 3px; }
.learning-section-heading p { color: #8f9db1; font-size: 10px; line-height: 1.45; }
.learning-practice { border-color: #42649a; background: #222c3a; }
.learning-checklist { display: grid; gap: 7px; }
.learning-check-row { display: grid; grid-template-columns: 18px 26px minmax(0,1fr); gap: 8px; align-items: start; padding: 8px 9px; border: 1px solid #3e4c60; border-radius: 7px; background: #19212c; color: #c9d4e4; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.learning-check-row:hover { border-color: #536983; background: #1d2836; }
.learning-check-row:focus-within { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.learning-check-row.is-checked { border-color: #416c5a; background: #1d302a; color: #bfe1d1; }
.learning-check-row input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--accent); }
.learning-check-number, .learning-check-mark { display: grid; place-items: center; width: 22px; height: 22px; margin-top: -2px; border: 1px solid #4c607b; border-radius: 50%; color: #9ab5d9; font-size: 10px; font-weight: 800; }
.learning-check-mark { color: #62816f; }
.learning-check-row.is-checked .learning-check-number, .learning-check-row.is-checked .learning-check-mark { border-color: #4d856c; background: #244b3b; color: #b6e8cf; }
.learning-check-copy { font-size: 11px; line-height: 1.5; }
.learning-callout { margin: 11px 0 0 !important; padding: 9px 10px; border-left: 3px solid #5c92eb; border-radius: 4px; background: #172238; color: #cfe0fb !important; font-size: 11px; line-height: 1.5; }
.learning-practice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 10px; }
.learning-practice-actions small { color: #8998ab; font-size: 10px; }
.learning-quiz-card { border-color: #514d78; background: #26283a; }
.learning-quiz-list { display: grid; gap: 10px; }
.learning-quiz-question { margin: 0; padding: 10px; border: 1px solid #414760; border-radius: 8px; background: #1c2030; }
.learning-quiz-question legend { padding: 0 5px; color: #e1e6f7; font-size: 11px; font-weight: 700; line-height: 1.45; }
.learning-quiz-option { display: flex; gap: 7px; align-items: flex-start; margin-top: 6px; padding: 6px 7px; border: 1px solid transparent; border-radius: 6px; color: #b9c4d5; font-size: 11px; line-height: 1.4; cursor: pointer; }
.learning-quiz-option:hover { background: #ffffff08; }
.learning-quiz-option:focus-within { border-color: #5d82bd; background: #243149; }
.learning-quiz-option input { margin: 2px 0 0; accent-color: var(--accent); }
.learning-quiz-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.learning-quiz-feedback { flex: 1 1 280px; min-height: 18px; color: #a9dfc4; font-size: 10px; line-height: 1.45; }
.learning-quiz-feedback.is-error { color: #f0c28d; }
.learning-quiz-passed { padding: 10px; border: 1px solid #3f755d; border-radius: 7px; background: #1d332a; color: #bfe7d2; font-size: 11px; line-height: 1.5; }
.learning-quiz-passed:focus { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.learning-shortcuts { display: flex; flex-wrap: wrap; gap: 7px; }
.learning-shortcut { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid #3c4757; border-radius: 7px; background: #181d24; color: #aeb9ca; font-size: 10px; }
.learning-shortcut kbd { padding: 2px 5px; border: 1px solid #536175; border-bottom-width: 2px; border-radius: 4px; background: #272f3a; color: #fff; font: 700 10px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; }
.learning-completion-hint { margin: 0; padding: 9px 11px; border: 1px solid #5b4c33; border-radius: 8px; background: #332b1e; color: #e4c78c; font-size: 10px; line-height: 1.45; }
.learning-completion-hint.is-ready { border-color: #416c5a; background: #1d302a; color: #bfe1d1; }
.learning-lesson-actions { display: grid; grid-template-columns: auto minmax(230px,1fr) auto; gap: 8px; padding-top: 2px; }
.learning-lesson-actions button { min-height: 38px; }
.learning-lesson-actions button:disabled { opacity: .48; cursor: not-allowed; }
@media (max-width: 820px) {
  .modal.learning-center-modal { width: min(780px, 98vw); height: min(900px, 96vh); max-height: 96vh; }
  .learning-hero { grid-template-columns: 1fr; gap: 12px; }
  .learning-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .learning-nav { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .learning-nav-item { flex: 0 0 220px; margin: 0; }
}
@media (max-width: 560px) {
  .learning-hero, .learning-content { padding-left: 12px; padding-right: 12px; }
  .learning-card-grid { grid-template-columns: 1fr; }
  .learning-lesson-actions { grid-template-columns: 1fr; }
  .learning-section-heading, .learning-quiz-actions, .learning-practice-actions { align-items: stretch; flex-direction: column; }
  .learning-quiz-feedback { flex-basis: auto; }
  .learning-check-row { grid-template-columns: 18px 24px minmax(0,1fr); padding-left: 7px; padding-right: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .learning-progress-bar > span, .learning-check-row { transition: none; }
}

.shortcut-list { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px 16px; align-items: baseline; }
.shortcut-list b { color: #fff; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.about-copy p { margin: 8px 0 0; color: #b9c2d0; }
.about-copy code { background: #15171b; border: 1px solid #353b46; border-radius: 4px; padding: 1px 5px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.secondary-button { background: #333843; padding: 8px 12px; border-radius: 6px; }
.danger-button { background: #7a3038; padding: 8px 12px; border-radius: 6px; }
.drop-active { outline: 3px solid var(--accent); outline-offset: -3px; }
.drop-overlay { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; pointer-events: none; background: #0b1020bb; backdrop-filter: blur(2px); }
.drop-overlay-card { width: min(620px, calc(100vw - 40px)); padding: 30px; border: 2px dashed #79a7ff; border-radius: 18px; background: #1e2532ee; box-shadow: 0 24px 80px #000b; text-align: center; display: grid; gap: 10px; }
.drop-overlay-card strong { font-size: 20px; color: #fff; }
.drop-overlay-card span { color: #b8c6df; font-size: 13px; }
.toast-region { position: fixed; right: 18px; bottom: 48px; z-index: 600; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 240px; max-width: min(420px, calc(100vw - 36px)); padding: 10px 12px; border-radius: 9px; border: 1px solid #465268; background: #242b37f2; color: #eef4ff; box-shadow: 0 10px 35px #0008; font-size: 12px; animation: toast-in .16s ease-out; }
.toast.error { border-color: #a54f5a; background: #48272df2; }
.toast.warn { border-color: #9a7839; background: #44371ff2; }
.toast.success { border-color: #437b61; background: #223b31f2; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.workspace.panels-hidden { grid-template-columns: minmax(0, 1fr); }
.workspace.panels-hidden .toolbar, .workspace.panels-hidden .right-panel { display: none; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 44px minmax(0,1fr) 220px; }
  .brand-name, .document-title { display: none; }
  .brand { min-width: auto; }
  .right-panel { padding: 4px; }
}
@media (max-width: 680px) {
  .workspace { grid-template-columns: 44px minmax(0,1fr); }
  .right-panel { display: none; }
  .menu-bar .menu-button:nth-child(n+4) { display: none; }
}
.fatal-error { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 1000; max-width: min(760px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #b4535e; border-radius: 10px; background: #4a252cf2; color: #fff; box-shadow: 0 14px 45px #0009; font: 13px/1.45 system-ui, sans-serif; }

/* History rows are interactive state buttons, not passive labels. */
.history-row { width: 100%; border: 0; border-bottom: 1px solid #2d323b; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.history-row:hover:not(:disabled) { background: #ffffff10; color: #eef3fb; }
.history-row:disabled { opacity: 1; cursor: default; }

/* Color correction */
.prop-effects-grid { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 7px 8px; align-items: center; font-size: 11px; }
.prop-effects-grid > label { color: var(--muted); line-height: 1.2; }
.prop-effect-group { grid-column: 1 / -1; margin-top: 3px; padding-top: 5px; border-top: 1px solid #303641; color: #cfd6e2; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.prop-effect-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.panel-actions .mini-button, .mini-button { background: #303641; border: 1px solid #424a57; border-radius: 5px; padding: 4px 7px; font-size: 10px; color: #dbe3ef; }
.panel-actions .mini-button:hover, .mini-button:hover { background: #39414e; }
.mini-button:focus-visible, .secondary-button:focus-visible, .danger-button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.range-with-value { display: grid; grid-template-columns: minmax(0,1fr) 52px; gap: 6px; align-items: center; min-width: 0; }
.prop-grid .range-with-value input[type="range"], .prop-effects-grid .range-with-value input[type="range"] { padding: 0; border: 0; background: transparent; min-width: 0; }
.range-with-value output { color: #c7d0dd; font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.color-correction-modal { width: min(620px, 96vw); }
.smart-filter-modal { width: min(640px, 96vw); }
.smart-filter-body { gap: 8px; }
.smart-filter-hint { margin: 0 0 4px; line-height: 1.45; }
.smart-filter-dialog-name { display: grid; grid-template-columns: 140px minmax(150px,1fr); gap: 10px; align-items: center; font-size: 12px; }
.smart-filter-dialog-name > span { color: #c3ccd9; }
.smart-filter-dialog-name input { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 5px; background: #15171b; }
.color-correction-body { gap: 8px; }
.color-correction-hint { margin: 0 0 4px; line-height: 1.45; }
.color-correction-group { margin-top: 6px; padding-top: 9px; border-top: 1px solid var(--line); color: #e3e9f2; font-size: 12px; font-weight: 700; }
.color-correction-row { display: grid; grid-template-columns: 140px minmax(150px,1fr) 72px; gap: 10px; align-items: center; min-height: 32px; font-size: 12px; }
.color-correction-row > span { color: #c3ccd9; }
.color-correction-row input[type="range"] { width: 100%; }
.color-correction-row output { color: #eef2f7; text-align: right; font-variant-numeric: tabular-nums; }
.modal-footer-spacer { flex: 1; }
@media (max-width: 620px) {
  .color-correction-row { grid-template-columns: 110px minmax(100px,1fr) 58px; gap: 7px; }
}

/* Settings is an accessible native dialog with a separate model installer. */
.editor-settings { width:min(620px,calc(100vw - 32px)); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:1px solid var(--line); border-radius:14px; color:var(--text); background:#20232c; box-shadow:0 24px 90px #0009; }
.editor-settings::backdrop { background:#06080eb8; }
.editor-settings header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.editor-settings h2 { margin:0; font-size:21px; }
.editor-settings h3 { margin:0 0 12px; font-size:16px; }
.editor-settings section { padding:18px 0; border-top:1px solid var(--line); }
.editor-settings p { line-height:1.6; margin:8px 0 14px; }
.editor-settings .settings-models { display:flex; flex-direction:column; gap:16px; }
.settings-models > .settings-kicker { margin-bottom:0; }
.editor-settings .settings-model { background:#7785ff0c; border:1px solid #7785ff40; padding:20px; border-radius:10px; }
.editor-settings .settings-model-selected { border-color:var(--accent-2); box-shadow:inset 3px 0 var(--accent-2); }
.settings-background-choice { min-width:0; }
.settings-background-choice .settings-note { margin-bottom:0; }
.editor-settings .settings-actions { flex-wrap:wrap; }
.editor-settings .settings-actions button { max-width:100%; white-space:normal; }
#removeBackgroundFeather { width:64px; }
#removeBackgroundFeatherValue { min-width:28px; }
.settings-model-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; margin-bottom:12px; }
.editor-settings .settings-model-header h3 { margin:0; }
.settings-model-badge { flex-shrink:0; padding:4px 8px; border:1px solid #7785ff40; border-radius:6px; color:#b4bdff; font-size:11px; white-space:nowrap; }
.editor-settings .settings-model > .settings-note:last-child { margin-bottom:0; }
.settings-kicker { color:#9ba9ff; letter-spacing:.08em; font-size:10px; margin-bottom:10px; }
.settings-note { color:var(--muted); font-size:12px; }
.settings-actions { display:flex; gap:10px; flex-wrap:wrap; }
.settings-row { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:8px 0; }
.settings-row select { max-width:65%; padding:8px; }
.settings-row input[type=number] { width:75px; padding:7px; }
.editor-settings progress { width:100%; height:12px; margin-top:14px; accent-color:var(--accent); }
#modelStatus { color:#bcc6ff; font-size:13px; }
#modelProgressText { font-size:12px; }
#editorSettingsBtn { white-space:nowrap; }
@media(max-width:900px) { .menu-bar #editorSettingsBtn { display:block; } .editor-settings { padding:16px; } .settings-row { flex-wrap:wrap; } .settings-row select { max-width:100%; } }
@media(max-width:480px) { .editor-settings .settings-model { padding:14px; } .settings-model-header { align-items:flex-start; } }

.settings-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:0 0 20px; overflow-x:auto; }
.settings-tabs button { background:transparent; color:var(--muted); padding:11px 13px; border-bottom:2px solid transparent; white-space:nowrap; }
.settings-tabs button[aria-selected=true] { color:#c4ceff; border-bottom-color:#8191ff; background:#7785ff0c; }
.settings-tabs button:focus-visible { outline:2px solid var(--accent-2); outline-offset:-3px; }

.removal-model-notice { background:#e7b75822; color:#f1cb79; border:1px solid #e7b75855; border-radius:6px; padding:7px 10px; flex-shrink:0; }

/* Prominent, dismissible installation guidance; ordinary status toasts keep their size. */
.toast.removal-install-toast { position:relative; width:min(440px,calc(100vw - 36px)); min-width:0; padding:22px; border:2px solid #dbb65c; border-left-width:6px; background:#302b20; color:#fff4d9; box-shadow:0 12px 44px #000b; pointer-events:auto; }
.removal-install-toast strong { display:block; padding-right:30px; color:#ffe09a; font-size:20px; line-height:1.3; }
.removal-install-toast p { margin:12px 0 18px; font-size:15px; line-height:1.55; }
.removal-install-toast .primary-button { min-height:40px; font-size:15px; padding:10px 16px; }
.removal-install-close { position:absolute; top:12px; right:12px; width:30px; height:30px; border-radius:6px; background:#ffffff10; color:#fff4d9; font-size:16px; }
.removal-install-close:hover { background:#ffffff25; }
.removal-install-close:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }

.tool-tooltip[data-action]:not([data-action=""]) { pointer-events:auto; }
.tool-help-action { display:block; margin-top:12px; min-height:34px; font-size:12px; }
.tool-help-action:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }

.object-removal-progress { position:fixed; left:50%; bottom:50px; transform:translateX(-50%); z-index:610; width:min(440px,calc(100vw - 36px)); border:1px solid #7785ff88; border-radius:12px; background:#242938; padding:20px; box-shadow:0 12px 44px #000b; }
.object-removal-progress strong { font-size:18px; color:#edf1ff; }
.object-removal-progress p { font-size:14px; margin:12px 0; color:#cbd5ff; }
.object-removal-progress progress { width:100%; height:14px; accent-color:#8092ff; }
.removal-progress-timing { display:flex; flex-wrap:wrap; gap:8px 16px; margin:10px 0 15px; font-size:12px; color:var(--muted); }
