.panel-tabs.five-tabs .panel-tab::before { content: none !important; }
.panel-tabs.five-tabs .panel-tab svg, .rail-action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel-tabs.five-tabs .panel-tab span, .rail-action span { font-size: 10px; font-weight: 700; }
.panel-tabs.five-tabs { overflow-y: auto; scrollbar-width: none; }
.panel-tabs.five-tabs::-webkit-scrollbar { display: none; }
.rail-actions { display: grid; gap: 4px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); }
.rail-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 54px; min-height: 54px; padding: 4px 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.rail-action:hover { background: var(--accent-soft); color: var(--accent); }
.library-mode-tabs { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; padding: 0 14px 4px; }
.library-mode-tabs button { min-height: 34px; font-size: 10px; }
.library-mode-tabs button:nth-child(-n+3) { grid-column: span 2; }
.library-mode-tabs button:nth-child(n+4) { grid-column: span 3; }
.library-mode-tabs button:nth-child(n+4) { min-height: 28px; border-color: transparent; background: transparent; color: var(--muted); }
.library-mode-tabs button:nth-child(n+4):hover { color: var(--accent); background: var(--accent-soft); }
.library-pane.active[data-library-pane="elements"] { display: flex; flex-direction: column; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(3) { order: 1; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(4) { order: 2; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(2) { order: 3; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(1) { order: 4; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(5) { order: 5; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(6) { order: 6; }
.library-pane[data-library-pane="elements"] > .library-section:nth-child(7) { order: 7; }
.library-intro { padding-bottom: 14px; }
.library-section { padding-top: 17px; padding-bottom: 11px; border-top: 1px solid var(--line-soft); }
.library-title { margin-bottom: 12px; font-size: 10px; letter-spacing: .08em; }
.element-grid { gap: 9px; }
.element-card { min-height: 72px; }
.canva-element-grid .element-card { min-height: 77px; }
.element-card .element-preview { background: var(--accent); color: #fff; }
.element-card .text-large, .element-card .text-small, .element-card .shape-star { background: transparent; color: var(--accent); }
.element-card .frame-square, .element-card .frame-rounded, .element-card .frame-circle, .element-card .frame-portrait { border-color: var(--accent); background: repeating-linear-gradient(135deg,var(--panel-2) 0 5px,var(--panel-3) 5px 10px); }
.frame-card .element-preview { position: relative; font-size: 0; }
.frame-card .element-preview::after { content: ''; width: 14px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; background: linear-gradient(140deg,transparent 0 49%,currentColor 50% 55%,transparent 56%); }
.asset-card { padding-bottom: 2px; }
.asset-delete { position: absolute; left: 5px; top: 5px; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(8,10,15,.84); color: #fff; cursor: pointer; }
.asset-delete:hover { background: #a33548; }
.asset-delete svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.resize-handle.n { left: 50%; top: -5px; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.w { left: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.resize-handle.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.resize-handle.nw { left: -5px; top: -5px; cursor: nwse-resize; }
.resize-handle.sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.wb-node[data-type="imageFrame"] > .frame-image, .wb-node[data-type="imageFrame"] > .frame-placeholder { overflow: hidden; border-radius: inherit; }
.wb-node[data-type="imageFrame"] > .frame-placeholder { height: 100%; min-height: 100%; }
.theme-modal { max-width: 430px; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px 12px; }
.theme-options button { min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.theme-options button.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-accent-label { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; color: var(--text); font-size: 12px; }
.theme-accent-label input { width: 54px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); cursor: pointer; }
.theme-presets { display: flex; gap: 10px; padding: 6px 20px 12px; }
.theme-presets button { width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.4); border-radius: 50%; cursor: pointer; }
.theme-presets button:nth-child(1) { background: #987cff; }.theme-presets button:nth-child(2) { background: #3d86e8; }.theme-presets button:nth-child(3) { background: #0c9f82; }.theme-presets button:nth-child(4) { background: #df7145; }
.theme-note { margin: 0; padding: 4px 20px 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
body.theme-light { color-scheme: light; --bg:#eef1f6; --panel:#fff; --panel-2:#f3f5f9; --panel-3:#e7ebf3; --line:#d3dae7; --line-soft:#e5e9f0; --text:#202b40; --muted:#64718a; --muted-2:#8995aa; --accent-soft:rgba(113,85,216,.12); }
body.theme-light, body.theme-light .app-shell { background: var(--bg); color: var(--text); }
body.theme-light .appbar.custom-titlebar, body.theme-light .editor-toolbar, body.theme-light .panel-tabs.five-tabs, body.theme-light .panel, body.theme-light .left-view, body.theme-light .inspector-body, body.theme-light .inspector-header, body.theme-light .panel-section-head, body.theme-light .layer-toolbar, body.theme-light .statusbar { background: var(--panel); color: var(--text); border-color: var(--line); }
body.theme-light .editor-toolbar { background: #f7f9fc; }
body.theme-light .brand-name, body.theme-light .library-intro strong, body.theme-light .panel-section-head strong, body.theme-light .inspector-title, body.theme-light .element-card span { color: var(--text); }
body.theme-light .appbar .labeled-action, body.theme-light .appbar .top-action, body.theme-light .appbar .window-btn, body.theme-light .panel-tabs.five-tabs .panel-tab, body.theme-light .rail-action, body.theme-light .toolbar-group-label { color: var(--muted); }
body.theme-light .panel-tabs.five-tabs .panel-tab.active { background: var(--accent-soft); color: var(--accent); }
body.theme-light .element-card, body.theme-light .library-mode-tabs button, body.theme-light .search-wrap, body.theme-light .field input, body.theme-light .field select, body.theme-light .field textarea, body.theme-light .editor-toolbar .viewport-input, body.theme-light .editor-toolbar .grid-size-control { background: var(--panel-2); border-color: var(--line); color: var(--text); }
body.theme-light .element-card { background-image: none; transition: none; }
body.theme-light .element-card:hover, body.theme-light .library-mode-tabs button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
body.theme-light .search-wrap input, body.theme-light .editor-toolbar .viewport-input input, body.theme-light .editor-toolbar .grid-size-control input { color: var(--text); }
body.theme-light .inspector-section > summary, body.theme-light .inspector-mode-tabs, body.theme-light .simple-choice, body.theme-light .asset-card, body.theme-light .asset-dropzone, body.theme-light .help-card, body.theme-light .help-step { background: var(--panel-2); border-color: var(--line); color: var(--text); }
body.theme-light .inspector-mode-tabs button.active, body.theme-light .simple-choice.active, body.theme-light .editor-toolbar .device-btn.active, body.theme-light .editor-toolbar .tool-pill.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
body.theme-light .editor-toolbar .device-switcher, body.theme-light .inspector-actions .icon-btn, body.theme-light .modal-card input, body.theme-light .modal-card select { background: var(--panel-2); color: var(--text); border-color: var(--line); }
body.theme-light .field label, body.theme-light .asset-meta small { color: var(--muted); }
body.theme-light .asset-dropzone span, body.theme-light .asset-meta strong, body.theme-light .page-copy strong, body.theme-light .layer-name { color: var(--text); }
body.theme-light .asset-dropzone:hover, body.theme-light .asset-card:hover, body.theme-light .help-step:hover { background: var(--accent-soft); border-color: var(--accent); }
body.theme-light .more-tools-menu > .grid-size-control, body.theme-light .snap-menu { background: var(--panel-2); color: var(--text); }
body.theme-light .library-mode-tabs button:nth-child(n+4) { background: transparent; border-color: transparent; color: var(--muted); }
body.theme-light .library-mode-tabs button:nth-child(n+4):hover { background: var(--accent-soft); color: var(--accent); }
body.theme-light .inspector-mode-tabs button, body.theme-light .inspector-section > summary, body.theme-light .simple-choice, body.theme-light .help-card h3, body.theme-light .help-step strong, body.theme-light .help-hero strong { color: var(--text); }
body.theme-light .help-card p, body.theme-light .help-card li, body.theme-light .help-card dd, body.theme-light .help-step small, body.theme-light .help-hero small { color: var(--muted); }
body.theme-light .canvas-area, body.theme-light .canvas-scroller { background-color: #e8edf5; }
body.theme-light .canvas-scroller { background-image: radial-gradient(rgba(55,70,102,.18) .7px,transparent .7px); }
body.theme-light .canvas-ruler { background-color: #dce3ef; color: #60708b; border-color: var(--line); }
body.theme-light .more-tools-menu, body.theme-light .snap-menu { background: var(--panel); border-color: var(--line); color: var(--text); }
body.theme-light .more-tools-heading strong { color: var(--text); }
body.theme-light .modal-card { background: var(--panel); color: var(--text); }
body.theme-light .statusbar { border-top-color: var(--line); }
.panel-tabs.five-tabs .panel-tab.active, .library-mode-tabs button.active, .inspector-mode-tabs button.active, .editor-toolbar .device-btn.active, .element-card:hover, .rail-action:hover { color: var(--accent); }
.wb-node.is-selected { outline-color: var(--accent); }
.resize-handle { border-color: var(--accent); }

/* One deliberate, discoverable menu group instead of loose text in the titlebar. */
.appbar .appbar-menu-group { gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }
.appbar .menu-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--text); font-size: 11px; font-weight: 650; }
.appbar .menu-tool > svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.appbar .menu-tool > svg.menu-chevron { width: 12px; height: 12px; flex-basis: 12px; }
.appbar .menu-tool > span { margin: 0; color: inherit; }
.appbar .menu-tool:hover, .appbar .menu-tool:focus-visible { background: var(--accent-soft); color: var(--accent); }
.appbar .menu-tool:hover > svg, .appbar .menu-tool:focus-visible > svg { color: var(--accent); }
.appbar .menu-tool kbd { margin-left: 4px; padding: 2px 5px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 10px; }
#projectMenu { min-width: 248px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 18px 50px rgba(0,0,0,.27); }
#projectMenu .menu-section-label { padding: 10px 10px 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
#projectMenu button { display: flex; align-items: center; justify-content: flex-start; gap: 11px; width: 100%; min-height: 38px; padding: 0 10px; color: var(--text); font-size: 12px; text-align: left; }
#projectMenu button:hover { background: var(--accent-soft); color: var(--accent); }
#projectMenu button:focus-visible, .page-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#projectMenu .menu-divider { margin: 7px 4px; background: var(--line); }
.ui-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ui-icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#projectMenu button .ui-icon { color: var(--muted); }
#projectMenu button:hover .ui-icon, #projectMenu button:focus-visible .ui-icon { color: var(--accent); }
.page-icon .ui-icon { width: 16px; height: 16px; }
.page-menu-btn { display: inline-grid; place-items: center; color: var(--muted); }
.page-menu-btn .ui-icon { width: 15px; height: 15px; }
.page-menu-btn:hover, .page-menu-btn:focus-visible { background: var(--accent-soft); color: var(--accent); }
.page-menu-btn[data-page-action="delete"]:hover { background: rgba(220, 74, 91, .14); color: #f0717e; }
.inspector-mode-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.inspector-mode-tabs button { font-size: 9px; letter-spacing: 0; }
.motion-panel-intro { margin: 12px 12px 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.motion-search { padding: 0 12px 10px; }
.motion-search input { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); outline: none; }
.motion-search input:focus { border-color: var(--accent); }
.motion-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0 12px 12px; }
.motion-preset[hidden] { display: none; }
.motion-preset { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 11px; text-align: left; cursor: pointer; }
.motion-preset:hover, .motion-preset:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.motion-preset.active { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.motion-preset-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; opacity: .65; }
.motion-actions { display: flex; gap: 7px; }
.motion-actions button { flex: 1; }
.photo-background-actions { display: grid; gap: 7px; }
.photo-background-actions .btn { width: 100%; justify-content: center; }
.photo-background-actions small { color: var(--muted); font-size: 10px; line-height: 1.4; }
@media (max-width: 1400px) {
  .appbar .menu-tool { gap: 5px; padding-inline: 7px; }
  .appbar .menu-tool kbd { display: none; }
  .appbar .menu-tool.shortcut-action > span { display: none; }
}
