.paper-content table,.tiptap-editor table{--table-border-color:var(--border);--table-horizontal-border-width:1px;--table-vertical-border-width:1px;width:100%;margin:16px 0;border-collapse:collapse;table-layout:fixed}.paper-content table[data-table-horizontal-lines=false],.tiptap-editor table[data-table-horizontal-lines=false]{--table-horizontal-border-width:0px}.paper-content table[data-table-vertical-lines=false],.tiptap-editor table[data-table-vertical-lines=false]{--table-vertical-border-width:0px}.paper-content table[data-table-horizontal-lines=false] td,.paper-content table[data-table-horizontal-lines=false] th,.rich-editor-style-scope .ProseMirror table[data-table-horizontal-lines=false] td,.rich-editor-style-scope .ProseMirror table[data-table-horizontal-lines=false] th{border-top-width:0!important;border-bottom-width:0!important}.paper-content table[data-table-vertical-lines=false] td,.paper-content table[data-table-vertical-lines=false] th,.rich-editor-style-scope .ProseMirror table[data-table-vertical-lines=false] td,.rich-editor-style-scope .ProseMirror table[data-table-vertical-lines=false] th{border-left-width:0!important;border-right-width:0!important}.paper-content table[data-table-border-color] td,.paper-content table[data-table-border-color] th,.rich-editor-style-scope .ProseMirror table[data-table-border-color] td,.rich-editor-style-scope .ProseMirror table[data-table-border-color] th{border-color:var(--table-border-color)!important}.toolbar{height:auto;min-height:45px;flex-wrap:wrap;align-content:center;padding-block:7px}.editor-toolbar-stack{position:relative;z-index:5;min-width:0}.toolbar-inline-select{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 10px;border:1px solid transparent;border-radius:8px;color:var(--text-secondary);font-size:12px}.toolbar-inline-select:focus-within,.toolbar-inline-select:hover{background:var(--surface-hover);color:var(--text-primary)}.toolbar-inline-select>span{white-space:nowrap}.toolbar-inline-select>select{min-width:64px;border:0;outline:0;background:transparent;color:var(--text-primary);font:inherit}.chart-insert-control,.math-insert-control,.table-insert-control{position:relative;display:inline-flex}.toolbar .chart-insert-control>button,.toolbar .math-insert-control>button,.toolbar .table-insert-control>button{position:relative;width:38px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0}.toolbar .chart-insert-control>button.active,.toolbar .math-insert-control>button.active,.toolbar .table-insert-control>button.active{background:var(--surface-hover);color:var(--text-primary)}.chart-insert-chevron,.math-insert-chevron,.table-insert-chevron{position:static;transform:none;flex:0 0 auto;pointer-events:none}.table-insert-popover{position:absolute;top:calc(100% + 8px);left:-110px;z-index:30;width:320px;padding:13px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-soft-flat);color:var(--text-primary)}.math-insert-popover{left:-164px;width:392px}.chart-insert-popover,.math-insert-popover{position:absolute;top:calc(100% + 8px);z-index:30;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-soft-flat);color:var(--text-primary)}.chart-insert-popover{left:-132px;width:300px}.chart-checkbox-list,.chart-dataset-header,.chart-editor-actions,.chart-editor-header,.chart-editor-mode-switch,.chart-insert-actions,.chart-insert-header,.chart-node-toolbar,.math-insert-actions,.math-insert-header,.math-template-card{display:flex}.chart-insert-header{align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:12px}.chart-insert-header strong{font-size:13px}.chart-insert-header span{color:var(--text-tertiary)}.chart-insert-actions{gap:8px}.toolbar .chart-insert-actions>button{display:inline-flex;align-items:center;gap:7px;width:calc(50% - 4px);min-width:0;min-height:76px;padding:12px;border:1px solid var(--border);border-radius:9px;background:var(--surface-subtle);color:var(--text-primary);font-size:12px;font-weight:700}.toolbar .chart-insert-actions>button:hover{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}.chart-node{margin:18px 0}.chart-node-surface,.chart-surface-frame{position:relative;padding:0;border:0;border-radius:12px;background:transparent}.chart-node-surface.has-background,.chart-surface-frame.has-background{background:var(--surface-subtle)}.chart-node-surface.has-border,.chart-surface-frame.has-border{border:1px solid var(--border)}.chart-node-surface:hover,.chart-node.is-selected .chart-node-surface{box-shadow:none}.chart-node-toolbar{position:absolute;top:12px;right:12px;z-index:1;align-items:center;opacity:0;pointer-events:none;transition:opacity .16s ease}.chart-dataset-header button,.chart-editor-actions button,.chart-editor-header button,.chart-editor-mode-switch button,.chart-node-toolbar button{min-height:30px;padding:0 10px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text-secondary);font-size:12px}.chart-canvas,.chart-render{width:100%}.chart-canvas canvas,.chart-canvas svg,.chart-render svg{display:block;width:100%!important;max-width:100%}.chart-render{margin:18px 0}.chart-render.chart-render-error{display:grid;place-items:center;border:1px dashed var(--border);border-radius:10px;color:var(--text-tertiary)}.chart-modal-backdrop{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.4);animation:chartModalFadeIn .18s cubic-bezier(.16,1,.3,1)}@keyframes chartModalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes chartModalScaleIn{0%{opacity:0;transform:scale(.97) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}.chart-editor-modal{position:relative;display:flex;flex-direction:column;width:100%;max-width:980px;max-height:calc(100vh - 48px);background:var(--surface);border:1px solid rgba(226,232,240,.9);border-radius:16px;box-shadow:var(--shadow-soft-flat);overflow:hidden;animation:chartModalScaleIn .22s cubic-bezier(.16,1,.3,1)}.chart-modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;background:var(--surface);border-bottom:1px solid var(--border)}.chart-modal-header-left{display:flex;align-items:center;gap:12px;min-width:0}.chart-modal-icon-badge{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--surface-hover);color:var(--text-primary);flex-shrink:0}.chart-modal-title-wrap{display:flex;flex-direction:column;gap:2px;min-width:0}.chart-modal-title-row{display:flex;align-items:center;gap:8px}.chart-modal-title{margin:0;font-size:15px;font-weight:700;color:var(--text-primary);letter-spacing:-.01em}.chart-source-tag{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;background:var(--surface-hover);border:1px solid var(--border);color:var(--text-secondary);font-size:11px;font-weight:500}.chart-modal-sub{margin:0;font-size:12px;color:var(--text-secondary)}.chart-modal-header-right{display:flex;align-items:center;gap:10px}.chart-mode-segmented-control{display:inline-flex;align-items:center;gap:2px;padding:3px;background:var(--surface-hover);border-radius:9px;border:1px solid var(--border)}.chart-mode-tab{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border:none;border-radius:6px;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease}.chart-mode-tab:hover{color:var(--text-primary)}.chart-mode-tab.is-active{background:var(--surface);color:var(--text-primary);font-weight:600;box-shadow:var(--shadow-soft-flat)}.chart-modal-close-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-secondary);cursor:pointer;transition:all .15s ease}.chart-modal-close-btn:hover{background:var(--surface-hover);color:var(--text-primary);border-color:var(--border-strong)}.chart-modal-body{flex:1 1;min-height:0;overflow-y:auto;padding:20px 24px;background:var(--surface-subtle)}.chart-modal-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,1fr);grid-gap:20px;gap:20px;align-items:start}.chart-editor-fields-col,.chart-editor-preview-col{min-width:0}.chart-editor-fields-col{display:flex;flex-direction:column;gap:16px}.chart-section-card{display:flex;flex-direction:column;gap:14px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.02)}.chart-section-title{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700}.chart-section-title,.chart-section-title svg{color:var(--text-primary)}.chart-section-title-text{display:flex;align-items:baseline;gap:8px}.chart-section-title-text small{font-size:11px;font-weight:400;color:var(--text-tertiary)}.chart-type-selector{display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));grid-gap:8px;gap:8px}.chart-type-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text-secondary);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease}.chart-type-btn:hover{background:var(--surface-subtle)}.chart-type-btn.is-active,.chart-type-btn:hover{border-color:var(--border-strong);color:var(--text-primary)}.chart-type-btn.is-active{background:var(--surface-hover);font-weight:600;box-shadow:0 0 0 2px var(--border-strong)}.chart-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px;gap:12px}.chart-field-grid.single-col{grid-template-columns:1fr}.chart-field-item{display:flex;flex-direction:column;gap:6px}.chart-field-item>span,.chart-field-label-row>span{font-size:12px;font-weight:600;color:var(--text-secondary)}.chart-toggle-group{display:flex;flex-wrap:wrap;gap:10px}.chart-surface-style-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px;gap:12px}.chart-surface-style-card{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.chart-surface-style-card.is-active{border-color:var(--border-strong)}.chart-toggle-chip{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 12px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-secondary);font-size:13px;transition:all .15s ease}.chart-toggle-chip-indicator{width:20px;height:20px;border-radius:999px;border:1px solid var(--border-strong);background:transparent}.chart-toggle-chip.is-active,.chart-toggle-chip:hover{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}.chart-toggle-chip.is-active .chart-toggle-chip-indicator{background:var(--text-primary)}.chart-surface-color-control{display:flex;flex-direction:column;gap:6px}.chart-surface-color-control>span{font-size:12px;font-weight:600;color:var(--text-secondary)}.chart-surface-color-inputs{display:flex;align-items:center;gap:8px}.chart-surface-color-picker{min-width:0}.chart-surface-color-picker.is-disabled{opacity:.5;pointer-events:none}.chart-surface-color-picker .color-picker-menu{width:auto}.chart-surface-color-picker .color-picker-trigger{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-secondary)}.chart-padding-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px;gap:12px}.chart-padding-field{display:flex;flex-direction:column;gap:6px}.chart-padding-field>span{font-size:12px;font-weight:600;color:var(--text-secondary)}.chart-surface-color-inputs input[type=text]{flex:1 1;height:36px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-secondary);font-size:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.chart-surface-color-inputs input:disabled{opacity:.5}.chart-field-label-row{display:flex;align-items:center;justify-content:space-between}.chart-field-subval{font-size:11px;color:var(--text-tertiary);font-family:monospace}.chart-field-item input[type=text],.chart-field-item select{width:100%;height:36px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-primary);font-size:13px;transition:all .15s ease}.chart-field-item input[type=text]:focus,.chart-field-item select:focus{outline:none;border-color:var(--border-strong);box-shadow:0 0 0 2px var(--border-strong)}.chart-slider-row{display:flex;align-items:center;gap:12px}.chart-slider-row input[type=range]{flex:1 1;accent-color:var(--text-primary)}.chart-number-input{width:72px;height:32px;padding:0 8px;border:1px solid var(--border);border-radius:6px;font-size:12px;text-align:center}.chart-palette-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:8px;gap:8px}.chart-palette-chip{display:flex;flex-direction:column;gap:8px;padding:10px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface-subtle);cursor:pointer;transition:all .15s ease;text-align:left}.chart-palette-chip.is-selected,.chart-palette-chip:hover{border-color:var(--border-strong);background:var(--surface)}.chart-palette-chip.is-selected{box-shadow:0 0 0 2px var(--border-strong)}.chart-palette-chip-header{display:flex;align-items:center;justify-content:space-between}.chart-palette-name{font-size:12px;font-weight:600}.chart-palette-check,.chart-palette-name{color:var(--text-primary)}.chart-palette-dots{display:flex;align-items:center;gap:4px}.chart-color-dot{width:12px;height:12px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}.chart-custom-palette-box{display:flex;flex-direction:column;gap:12px;padding:12px;background:var(--surface-subtle);border:1px solid var(--border);border-radius:10px}.chart-custom-palette-header{display:flex;align-items:center;justify-content:space-between}.chart-custom-title-row{display:flex;align-items:baseline;gap:8px}.chart-custom-title-row>span{font-size:12px;font-weight:600;color:var(--text-primary)}.chart-custom-sub{font-size:11px;color:var(--text-tertiary)}.chart-custom-toggle-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:none;background:transparent;color:var(--text-primary);font-size:11px;font-weight:500;cursor:pointer}.chart-custom-toggle-btn .chevron{transition:transform .15s ease}.chart-custom-toggle-btn .chevron.rotate{transform:rotate(90deg)}.chart-series-color-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:8px;gap:8px}.chart-color-slot{display:flex;align-items:center;gap:8px;padding:6px 8px;background:var(--surface);border:1px solid var(--border);border-radius:8px;transition:all .15s ease}.chart-color-slot.is-active,.chart-color-slot:hover{border-color:var(--border-strong)}.chart-color-slot.is-active{box-shadow:0 0 0 2px var(--border-strong)}.chart-color-swatch-wrapper{position:relative;width:22px;height:22px;border-radius:6px;overflow:hidden;cursor:pointer;flex-shrink:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}.chart-color-swatch-preview{display:block;width:100%;height:100%}.chart-native-color-input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.chart-color-slot-meta{display:flex;flex-direction:column;min-width:0}.chart-color-slot-label{font-size:10px;color:var(--text-tertiary)}.chart-color-hex-input{width:58px;padding:0;border:none;background:transparent;color:var(--text-primary);font-size:11px;font-weight:600;font-family:monospace}.chart-color-hex-input:focus{outline:none}.chart-quick-swatches-panel{display:flex;flex-direction:column;gap:6px;padding-top:8px;border-top:1px dashed var(--border)}.chart-swatches-hint{font-size:11px;color:var(--text-secondary)}.chart-quick-swatches-grid{display:flex;flex-wrap:wrap;gap:6px}.chart-quick-swatch-btn{width:18px;height:18px;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:4px;cursor:pointer;transition:transform .1s ease}.chart-quick-swatch-btn:hover{transform:scale(1.2);box-shadow:var(--shadow-soft-flat)}.chart-checkbox-pills{display:flex;flex-wrap:wrap;gap:6px}.chart-pill-checkbox{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-secondary);font-size:12px;cursor:pointer;transition:all .15s ease}.chart-pill-checkbox:hover{border-color:var(--border-strong);background:var(--surface-subtle)}.chart-pill-checkbox.is-checked{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary);font-weight:600}.chart-pill-box{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:3px;border:1px solid var(--border-strong);background:var(--surface)}.chart-pill-checkbox.is-checked .chart-pill-box{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}.chart-dataset-header-row{display:flex;align-items:center;justify-content:space-between}.chart-dataset-actions{display:flex;align-items:center;gap:6px}.chart-dataset-add-btn{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface-subtle);color:var(--text-secondary);font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease}.chart-dataset-add-btn:hover{border-color:var(--border-strong);background:var(--surface);color:var(--text-primary)}.chart-dataset-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:8px}.chart-spreadsheet{width:100%;border-collapse:collapse;font-size:12px}.chart-spreadsheet td,.chart-spreadsheet th{padding:4px 6px;border:1px solid var(--border);background:var(--surface)}.chart-td-idx,.chart-th-idx{width:32px;text-align:center;color:var(--text-tertiary);font-size:11px}.chart-td-idx,.chart-th-header,.chart-th-idx{background:var(--surface-subtle)!important}.chart-th-content{display:flex;align-items:center;gap:4px}.chart-th-input{width:100%;height:28px;padding:0 6px;border:1px solid transparent;border-radius:4px;background:transparent;font-weight:600;color:var(--text-primary);font-size:12px}.chart-th-input:focus{outline:none;background:var(--surface);border-color:var(--border-strong)}.chart-col-del-btn,.chart-row-del-btn{display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;background:transparent;color:var(--text-tertiary);cursor:pointer;border-radius:4px}.chart-col-del-btn:hover,.chart-row-del-btn:hover{background:#FDEBEC;color:var(--danger)}.chart-cell-input{width:100%;height:28px;padding:0 6px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--text-primary);font-size:12px}.chart-cell-input:focus{outline:none;background:var(--surface);border-color:var(--border-strong);box-shadow:0 0 0 2px var(--border-strong)}.chart-td-del,.chart-th-actions{width:32px;text-align:center}.chart-preview-card{position:-webkit-sticky;position:sticky;top:0;display:flex;flex-direction:column;gap:12px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.02)}.chart-preview-header{display:flex;align-items:center;justify-content:space-between}.chart-preview-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--text-primary)}.chart-preview-title .sparkle-icon{color:#eab308}.chart-preview-pill{font-size:11px;color:var(--text-secondary);background:var(--surface-hover);padding:2px 8px;border-radius:999px}.chart-preview-canvas-container{min-height:280px;padding:8px;background:var(--surface);border:1px dashed var(--border);border-radius:8px}.chart-surface-frame-preview{width:100%}.chart-preview-footer{font-size:11px;color:var(--text-tertiary);text-align:center}.chart-modal-footer{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;background:var(--surface);border-top:1px solid var(--border)}.chart-modal-footer-tip{font-size:11px;color:var(--text-tertiary)}.chart-modal-actions{display:flex;align-items:center;gap:10px}.chart-btn-secondary{height:36px;padding:0 16px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-secondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease}.chart-btn-secondary:hover{background:var(--surface-subtle);color:var(--text-primary);border-color:var(--border-strong)}.chart-btn-primary{height:36px;padding:0 20px;border:1px solid transparent;border-radius:8px;background:var(--text-primary);color:var(--surface);font-size:13px;font-weight:600;cursor:pointer;box-shadow:var(--shadow-soft-flat);transition:all .15s ease}.chart-btn-primary:hover:not(:disabled){background:#000000;box-shadow:var(--shadow-soft-flat)}.chart-btn-primary:disabled{opacity:.5;cursor:not-allowed}:root[data-theme=dark] .chart-modal-backdrop{background:rgba(0,0,0,.7)}:root[data-theme=dark] .chart-editor-modal{box-shadow:var(--shadow-soft-flat)}:root[data-theme=dark] .chart-editor-modal,:root[data-theme=dark] .chart-modal-footer,:root[data-theme=dark] .chart-modal-header{background:var(--surface);border-color:var(--border)}:root[data-theme=dark] .chart-modal-body{background:var(--background)}:root[data-theme=dark] .chart-modal-title,:root[data-theme=dark] .chart-preview-title,:root[data-theme=dark] .chart-section-title{color:var(--text-primary)}:root[data-theme=dark] .chart-preview-card,:root[data-theme=dark] .chart-section-card{background:var(--surface);border-color:var(--border)}:root[data-theme=dark] .chart-mode-segmented-control{background:var(--background);border-color:var(--border)}:root[data-theme=dark] .chart-mode-tab.is-active{background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .chart-type-btn{background:var(--surface);border-color:var(--border);color:var(--text-tertiary)}:root[data-theme=dark] .chart-type-btn.is-active,:root[data-theme=dark] .chart-type-btn:hover{background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .chart-type-btn.is-active{border-color:var(--border-strong)}:root[data-theme=dark] .chart-palette-chip{background:var(--background);border-color:var(--border)}:root[data-theme=dark] .chart-palette-chip:hover{background:var(--surface-subtle)}:root[data-theme=dark] .chart-palette-chip.is-selected{background:var(--surface-subtle);border-color:var(--border-strong)}:root[data-theme=dark] .chart-palette-name{color:var(--text-primary)}:root[data-theme=dark] .chart-custom-palette-box{background:var(--background);border-color:var(--border)}:root[data-theme=dark] .chart-color-slot{background:var(--surface);border-color:var(--border)}:root[data-theme=dark] .chart-color-hex-input{color:var(--text-primary)}:root[data-theme=dark] .chart-field-item input[type=text],:root[data-theme=dark] .chart-field-item select,:root[data-theme=dark] .chart-number-input{background:var(--background);border-color:var(--border);color:var(--text-primary)}:root[data-theme=dark] .chart-toggle-chip{color:var(--text-tertiary)}:root[data-theme=dark] .chart-surface-color-inputs input[type=text],:root[data-theme=dark] .chart-surface-color-picker .color-picker-trigger,:root[data-theme=dark] .chart-surface-style-card,:root[data-theme=dark] .chart-toggle-chip{background:var(--background);border-color:var(--border)}:root[data-theme=dark] .chart-toggle-chip.is-active,:root[data-theme=dark] .chart-toggle-chip:hover{background:var(--surface-hover);border-color:var(--border-strong);color:var(--text-primary)}:root[data-theme=dark] .chart-toggle-chip-indicator{border-color:var(--border-strong)}:root[data-theme=dark] .chart-toggle-chip.is-active .chart-toggle-chip-indicator{background:var(--text-primary)}:root[data-theme=dark] .chart-surface-color-inputs input[type=text]{color:var(--text-primary)}:root[data-theme=dark] .chart-pill-checkbox{background:var(--surface);border-color:var(--border);color:var(--text-tertiary)}:root[data-theme=dark] .chart-pill-box{background:var(--background);border-color:var(--border-strong)}:root[data-theme=dark] .chart-btn-secondary,:root[data-theme=dark] .chart-dataset-add-btn,:root[data-theme=dark] .chart-modal-close-btn{background:var(--surface);border-color:var(--border);color:var(--text-tertiary)}:root[data-theme=dark] .chart-btn-secondary:hover,:root[data-theme=dark] .chart-dataset-add-btn:hover,:root[data-theme=dark] .chart-modal-close-btn:hover{background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .chart-spreadsheet td,:root[data-theme=dark] .chart-spreadsheet th{background:var(--surface);border-color:var(--border)}:root[data-theme=dark] .chart-td-idx,:root[data-theme=dark] .chart-th-header,:root[data-theme=dark] .chart-th-idx{background:var(--background)!important}:root[data-theme=dark] .chart-cell-input,:root[data-theme=dark] .chart-th-input{color:var(--text-primary)}:root[data-theme=dark] .chart-preview-canvas-container{background:var(--surface);border-color:var(--border)}.math-insert-header{align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:12px}.math-insert-header strong{font-size:13px}.math-insert-header span{color:var(--text-tertiary)}.math-insert-actions{gap:8px;margin-bottom:12px}.toolbar .math-insert-actions>button{display:inline-flex;align-items:center;gap:7px;width:auto;min-width:0;height:34px;padding:0 11px;border:1px solid var(--border);border-radius:7px;background:var(--surface-subtle);color:var(--text-primary);font-size:12px;font-weight:700}.toolbar .math-insert-actions>button:hover{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}.math-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;gap:8px}.math-template-card{flex-direction:column;align-items:flex-start;gap:8px;min-height:90px;padding:10px 11px;border:1px solid var(--border);border-radius:9px;background:var(--surface-subtle);color:inherit;text-align:left}.toolbar .math-template-card:hover{border-color:var(--border-strong);background:var(--surface-subtle);color:inherit}.math-template-name{color:var(--text-secondary);font-size:12px;font-weight:700}.math-template-preview{display:block;width:100%;overflow-x:auto;font-size:14px}.math-template-card.is-block .math-template-preview .katex-display{margin:0;text-align:left}.table-dialog-actions,.table-dialog-heading,.table-grid-heading,.table-size-fields{display:flex;align-items:center;justify-content:space-between;gap:12px}.table-grid-heading{margin-bottom:11px;font-size:13px}.table-grid-heading span{color:var(--text-primary);font-size:12px;font-weight:700}.table-size-grid{display:grid;grid-template-columns:repeat(10,1fr);grid-gap:4px;gap:4px;padding:2px;border-radius:6px;outline:none}.table-size-grid:focus-visible{box-shadow:0 0 0 2px var(--border-strong)}.toolbar .table-size-grid>button{width:25px;height:22px;border:1px solid var(--border);border-radius:3px;background:var(--surface-subtle)}.toolbar .table-size-grid>button.selected{border-color:var(--text-primary);background:var(--surface-hover)}.toolbar .table-custom-size{display:block;width:100%;height:34px;margin-top:12px;border:0;border-top:1px solid var(--border);border-radius:0;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:700;text-align:left}.toolbar .table-custom-size:hover{background:transparent;color:var(--text-primary)}.table-dialog-heading{margin-bottom:14px}.toolbar .table-dialog-heading>button{width:28px;height:28px;font-size:20px;font-weight:400}.table-size-fields label{display:grid;flex:1 1;grid-gap:6px;gap:6px;color:var(--text-secondary);font-size:12px;font-weight:700}.table-size-fields input,.table-width-input{width:100%;height:34px;padding:0 9px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text-primary)}.table-layout-options{margin:15px 0 12px}.table-border-options,.table-layout-options{display:grid;grid-gap:9px;gap:9px;padding:12px;border:1px solid var(--border);border-radius:7px}.table-border-options{margin:12px 0 0}.table-border-options legend,.table-layout-options legend{padding:0 5px;color:var(--text-secondary);font-size:12px;font-weight:800}.table-header-option,.table-layout-options label{display:flex;align-items:center;gap:7px;color:var(--text-primary);font-size:12px}.table-border-color-field{display:grid;grid-gap:6px;gap:6px;color:var(--text-primary);font-size:12px}.table-border-color-field>div{display:flex;align-items:center;gap:8px}.table-header-option input,.table-layout-options input[type=radio]{accent-color:var(--text-primary)}.table-border-color-field input[type=text]{width:100%;height:34px;padding:0 9px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text-primary)}.table-border-color-field input[type=color]{width:40px;height:34px;padding:3px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.table-layout-options .table-width-input{width:66px;height:28px;margin-left:auto}.table-field-error,.table-field-warning{margin:8px 0 0;font-size:11px;line-height:1.45}.table-field-error{color:var(--danger)}.table-field-warning{color:#a66c00}.table-dialog-actions{justify-content:flex-end;margin-top:16px}.toolbar .table-dialog-actions button{width:auto;min-width:68px;height:32px;padding:0 13px;border:1px solid var(--border);background:var(--surface);font-size:12px}.toolbar .table-dialog-actions button.primary{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}.toolbar .table-dialog-actions button:disabled{opacity:.45;cursor:not-allowed}.table-context-toolbar{display:flex;align-items:center;gap:3px;min-height:39px;padding:4px 10px;overflow-x:auto;background:var(--surface-subtle)}.table-context-toolbar strong{margin-right:4px;color:var(--text-primary);font-size:12px;white-space:nowrap}.table-context-toolbar button{display:grid;flex:0 0 30px;width:30px;height:30px;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--text-primary)}.table-context-toolbar button.active,.table-context-toolbar button:hover:not(:disabled){background:var(--surface-hover);color:var(--text-primary)}.table-context-toolbar button.destructive:hover:not(:disabled){background:#FDEBEC;color:var(--danger)}.table-context-toolbar button:disabled{opacity:.3;cursor:not-allowed}.table-selection-toolbar{position:fixed;z-index:110;border-radius:9px;border:1px solid var(--border);border-bottom:0;background:var(--surface);box-shadow:var(--shadow-soft-flat);overscroll-behavior-x:contain}.table-hover-toolbar-divider{width:1px;height:14px;margin:0 2px;background:var(--surface-hover)}:root[data-theme=dark] .table-selection-toolbar{border-color:var(--border);background:var(--surface);box-shadow:var(--shadow-soft-flat)}:root[data-theme=dark] .table-hover-toolbar-divider{background:var(--border)}.table-context-menu{position:fixed;z-index:120;width:236px;max-height:calc(100vh - 16px);padding:7px;overflow-y:auto;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-soft-flat)}.table-context-menu>strong{display:block;padding:6px 9px 7px;color:var(--text-tertiary);font-size:11px;letter-spacing:.04em;text-transform:uppercase}.table-context-menu-group{display:grid;grid-gap:2px;gap:2px}.table-context-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:33px;padding:6px 9px;border:0;border-radius:5px;background:transparent;color:inherit;font-size:12px;text-align:left}.table-context-menu button.active,.table-context-menu button:hover:not(:disabled){background:var(--surface-hover);color:var(--text-primary)}.table-context-menu button.active{font-weight:700}.table-context-menu button:disabled{cursor:not-allowed;opacity:.34}.table-context-menu button.destructive{color:var(--danger)}.table-context-menu button.destructive:hover:not(:disabled){background:#FDEBEC;color:var(--danger)}.table-context-menu-separator{height:1px;margin:5px 3px;background:var(--surface-hover)}.table-context-menu-fill{padding:2px 0}.table-context-menu-fill-stack{display:grid;grid-gap:6px;gap:6px}.table-context-menu-label{padding:2px 9px 0;color:var(--text-tertiary);font-size:11px;font-weight:700}:root[data-theme=dark] .table-context-menu{border-color:var(--border);background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-soft-flat)}:root[data-theme=dark] .table-context-menu-label,:root[data-theme=dark] .table-context-menu>strong{color:var(--text-tertiary)}:root[data-theme=dark] .table-context-menu-separator{background:var(--border)}:root[data-theme=dark] .table-context-menu button.destructive{color:#ff9da8}:root[data-theme=dark] .table-context-menu button.destructive:hover:not(:disabled){background:#4b2831;color:#ffb4bd}.tiptap-editor .tableWrapper{margin:16px 0;overflow-x:auto}.tiptap-editor .tableWrapper table{margin:0}.tiptap-editor .selectedCell{position:relative}.tiptap-editor .selectedCell:after{position:absolute;inset:0;z-index:2;background:rgba(17,17,17,.08);content:"";pointer-events:none}.tiptap-editor .column-resize-handle{position:absolute;top:0;right:-2px;bottom:-2px;width:4px;background:var(--text-primary);pointer-events:none}.tiptap-editor .resize-cursor{cursor:col-resize}.paper-content table[data-table-layout=content],.tiptap-editor table[data-table-layout=content]{width:auto;table-layout:auto}:root[data-theme=dark] .chart-insert-popover,:root[data-theme=dark] .math-insert-popover,:root[data-theme=dark] .table-insert-popover{border-color:var(--border);background:var(--surface);box-shadow:var(--shadow-soft-flat);color:var(--text-primary)}:root[data-theme=dark] .chart-dataset-header strong,:root[data-theme=dark] .chart-editor-header span,:root[data-theme=dark] .chart-editor-preview>strong,:root[data-theme=dark] .chart-field-grid label>span,:root[data-theme=dark] .chart-insert-header span,:root[data-theme=dark] .chart-multi-column-field>span,:root[data-theme=dark] .chart-node-toolbar span,:root[data-theme=dark] .math-insert-header span,:root[data-theme=dark] .math-template-name{color:var(--text-secondary)}:root[data-theme=dark] .math-template-card,:root[data-theme=dark] .toolbar .math-insert-actions>button{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .toolbar .math-template-card:hover{border-color:var(--border-strong);background:var(--surface-hover)}:root[data-theme=dark] .chart-checkbox-list label,:root[data-theme=dark] .chart-dataset-header button,:root[data-theme=dark] .chart-dataset-panel,:root[data-theme=dark] .chart-dataset-table td,:root[data-theme=dark] .chart-dataset-table th,:root[data-theme=dark] .chart-editor-actions button,:root[data-theme=dark] .chart-editor-header button,:root[data-theme=dark] .chart-editor-mode-switch button,:root[data-theme=dark] .chart-editor-overlay,:root[data-theme=dark] .chart-editor-preview,:root[data-theme=dark] .chart-node-toolbar button,:root[data-theme=dark] .toolbar .chart-insert-actions>button{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .chart-dataset-table th{background:var(--surface-hover)}:root[data-theme=dark] .chart-dataset-table input,:root[data-theme=dark] .chart-field-grid input,:root[data-theme=dark] .chart-field-grid select,:root[data-theme=dark] .chart-json-editor textarea{border-color:var(--border-strong);background:var(--surface);color:var(--text-primary)}:root[data-theme=dark] .chart-node-surface:hover,:root[data-theme=dark] .chart-node.is-selected .chart-node-surface{box-shadow:none}.chart-node.is-selected .chart-node-toolbar{opacity:1;pointer-events:auto}:root[data-theme=dark] .chart-editor-actions button.primary,:root[data-theme=dark] .chart-editor-mode-switch button.active{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}:root[data-theme=dark] .chart-render.chart-render-error{border-color:var(--border-strong);color:var(--text-secondary)}:root[data-theme=dark] .toolbar .table-size-grid>button{border-color:var(--border-strong);background:var(--surface-hover)}:root[data-theme=dark] .toolbar .table-size-grid>button.selected{border-color:var(--text-primary);background:var(--surface-hover)}:root[data-theme=dark] .toolbar .table-custom-size{border-top-color:var(--border);color:var(--text-secondary)}:root[data-theme=dark] .table-border-options legend,:root[data-theme=dark] .table-layout-options legend,:root[data-theme=dark] .table-size-fields label{color:var(--text-secondary)}:root[data-theme=dark] .table-border-color-field input[type=color],:root[data-theme=dark] .table-border-color-field input[type=text],:root[data-theme=dark] .table-size-fields input,:root[data-theme=dark] .table-width-input,:root[data-theme=dark] .toolbar .table-dialog-actions button{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .table-border-options,:root[data-theme=dark] .table-layout-options{border-color:var(--border)}:root[data-theme=dark] .table-border-color-field,:root[data-theme=dark] .table-header-option,:root[data-theme=dark] .table-layout-options label{color:var(--text-secondary)}:root[data-theme=dark] .toolbar .table-dialog-actions button.primary{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}:root[data-theme=dark] .table-context-toolbar{background:var(--surface)}:root[data-theme=dark] .table-context-toolbar button{color:var(--text-secondary)}:root[data-theme=dark] .table-context-toolbar button.destructive:hover:not(:disabled){background:#4b2831;color:#ff9da8}@media (max-width:820px){.chart-insert-popover,.math-insert-popover,.table-insert-popover{position:fixed;top:72px;right:12px;left:12px;width:auto}.toolbar .table-size-grid>button{width:100%}.chart-editor-layout,.chart-field-grid,.math-template-grid{grid-template-columns:1fr}}.paper-content td,.paper-content th,.tiptap-editor td,.tiptap-editor th{min-width:84px;height:44px;padding:8px 10px;border-style:solid;border-color:var(--cell-border-top-color,var(--table-border-color,var(--border))) var(--cell-border-right-color,var(--table-border-color,var(--border))) var(--cell-border-bottom-color,var(--table-border-color,var(--border))) var(--cell-border-left-color,var(--table-border-color,var(--border)));border-width:var(--table-horizontal-border-width,1px) var(--table-vertical-border-width,1px);vertical-align:top}.paper-content td[data-border-top-hidden=true],.paper-content th[data-border-top-hidden=true],.rich-editor-style-scope .ProseMirror td[data-border-top-hidden=true],.rich-editor-style-scope .ProseMirror th[data-border-top-hidden=true]{border-top-width:0!important}.paper-content td[data-border-right-hidden=true],.paper-content th[data-border-right-hidden=true],.rich-editor-style-scope .ProseMirror td[data-border-right-hidden=true],.rich-editor-style-scope .ProseMirror th[data-border-right-hidden=true]{border-right-width:0!important}.paper-content td[data-border-bottom-hidden=true],.paper-content th[data-border-bottom-hidden=true],.rich-editor-style-scope .ProseMirror td[data-border-bottom-hidden=true],.rich-editor-style-scope .ProseMirror th[data-border-bottom-hidden=true]{border-bottom-width:0!important}.paper-content td[data-border-left-hidden=true],.paper-content th[data-border-left-hidden=true],.rich-editor-style-scope .ProseMirror td[data-border-left-hidden=true],.rich-editor-style-scope .ProseMirror th[data-border-left-hidden=true]{border-left-width:0!important}.paper-content td[data-border-top-color],.paper-content th[data-border-top-color],.rich-editor-style-scope .ProseMirror td[data-border-top-color],.rich-editor-style-scope .ProseMirror th[data-border-top-color]{border-top-color:var(--cell-border-top-color)!important}.paper-content td[data-border-right-color],.paper-content th[data-border-right-color],.rich-editor-style-scope .ProseMirror td[data-border-right-color],.rich-editor-style-scope .ProseMirror th[data-border-right-color]{border-right-color:var(--cell-border-right-color)!important}.paper-content td[data-border-bottom-color],.paper-content th[data-border-bottom-color],.rich-editor-style-scope .ProseMirror td[data-border-bottom-color],.rich-editor-style-scope .ProseMirror th[data-border-bottom-color]{border-bottom-color:var(--cell-border-bottom-color)!important}.paper-content td[data-border-left-color],.paper-content th[data-border-left-color],.rich-editor-style-scope .ProseMirror td[data-border-left-color],.rich-editor-style-scope .ProseMirror th[data-border-left-color]{border-left-color:var(--cell-border-left-color)!important}.paper-content td[data-vertical-align=top],.paper-content th[data-vertical-align=top],.rich-editor-style-scope .ProseMirror td[data-vertical-align=top],.rich-editor-style-scope .ProseMirror th[data-vertical-align=top],.tiptap-editor td[data-vertical-align=top],.tiptap-editor th[data-vertical-align=top]{vertical-align:top!important}.paper-content td[data-vertical-align=middle],.paper-content th[data-vertical-align=middle],.rich-editor-style-scope .ProseMirror td[data-vertical-align=middle],.rich-editor-style-scope .ProseMirror th[data-vertical-align=middle],.tiptap-editor td[data-vertical-align=middle],.tiptap-editor th[data-vertical-align=middle]{vertical-align:middle!important}.paper-content td[data-vertical-align=bottom],.paper-content th[data-vertical-align=bottom],.rich-editor-style-scope .ProseMirror td[data-vertical-align=bottom],.rich-editor-style-scope .ProseMirror th[data-vertical-align=bottom],.tiptap-editor td[data-vertical-align=bottom],.tiptap-editor th[data-vertical-align=bottom]{vertical-align:bottom!important}.paper-content th,.tiptap-editor th{background:var(--surface-hover);color:var(--text-primary);font-weight:700}.paper-content td>p,.paper-content th>p,.tiptap-editor td>p,.tiptap-editor th>p{margin:0}.editor-scroll.html-scroll{overflow:hidden;padding:0}.html-code-shell{display:grid;grid-template-rows:44px minmax(0,1fr);height:100%;min-height:0;overflow:hidden}.html-editor-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 12px;border-bottom:1px solid var(--border);background:var(--surface-subtle)}.html-editor-tabs{display:inline-flex;align-items:center;gap:3px;padding:3px;border-radius:8px;background:var(--surface-hover)}.html-editor-tabs button{height:30px;min-width:56px;padding:0 12px;border:0;border-radius:6px;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:800}.html-editor-tabs button.active{background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-soft-flat)}.html-theme-switch{display:inline-grid;place-items:center;width:84px;height:36px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--text-secondary)}.html-theme-switch:focus-visible,.html-theme-switch:hover{color:var(--text-primary)}.html-theme-switch:focus-visible{outline:2px solid var(--border-strong);outline-offset:2px}.html-theme-switch-track{position:relative;display:grid;grid-template-columns:1fr 1fr;align-items:center;width:74px;height:32px;border-radius:999px;background:var(--surface-hover);box-shadow:inset 0 0 0 1px rgba(56,58,66,.08);transition:background .18s ease}.html-theme-switch-icon{position:relative;z-index:2;justify-self:center;transition:color .18s ease,opacity .18s ease}.html-theme-switch-sun{grid-column:1}.html-theme-switch-moon{grid-column:2}.html-theme-switch-thumb{position:absolute;top:3px;left:3px;z-index:1;width:32px;height:26px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow-soft-flat);transition:transform .18s ease}.html-theme-switch[aria-checked=true] .html-theme-switch-track{background:#3e4451}.html-theme-switch[aria-checked=true] .html-theme-switch-thumb{transform:translateX(36px)}.html-theme-switch[aria-checked=false] .html-theme-switch-sun,.html-theme-switch[aria-checked=true] .html-theme-switch-moon{color:var(--text-primary)}.html-theme-switch[aria-checked=false] .html-theme-switch-moon,.html-theme-switch[aria-checked=true] .html-theme-switch-sun{opacity:.58}.html-code-area{position:relative;min-height:0;overflow:hidden}.editor-panel.html-panel{grid-template-rows:minmax(0,1fr);border-color:var(--border);border-radius:4px;background:var(--surface-subtle)}.html-highlight,.html-scroll .html-editor{font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:14px;line-height:1.7;-moz-tab-size:2;tab-size:2}.html-highlight{position:absolute;top:0;right:0;left:0;z-index:0;box-sizing:border-box;min-height:100%;margin:0;padding:24px 32px 50px 28px;overflow:visible;transform:translate(calc(-1 * var(--html-scroll-left, 0px)),calc(-1 * var(--html-scroll-top, 0px)));white-space:pre-wrap;overflow-wrap:break-word;pointer-events:none;color:var(--text-primary)}.html-scroll .html-editor{position:relative;z-index:1;display:block;width:100%;height:100%;min-height:0;padding:24px 32px 50px 28px;overflow-y:auto;overflow-x:hidden;border:0;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#4078f2}.html-scroll .html-editor::selection{background:#d7e5f7}.code-completion-menu{position:absolute;z-index:4;width:260px;max-height:224px;margin:0;padding:5px;overflow-y:auto;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:var(--shadow-soft-flat);list-style:none}.code-completion-menu li{margin:0;padding:0}.code-completion-menu button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:32px;padding:5px 9px;border:0;border-radius:5px;background:transparent;color:var(--text-primary);font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;text-align:left}.code-completion-menu button.active,.code-completion-menu button:hover{background:#e5efff;color:#265aa8}.code-completion-menu small{overflow:hidden;color:var(--text-tertiary);font-size:11px;text-overflow:ellipsis;white-space:nowrap}:root[data-theme=dark] .editor-panel.html-panel{border-color:#181a1f;background:#282c34}:root[data-theme=dark] .html-editor-bar{border-bottom-color:#181a1f;background:#21252b}:root[data-theme=dark] .html-editor-tabs{background:#282c34}:root[data-theme=dark] .html-editor-tabs button{color:#9ba3b4}:root[data-theme=dark] .html-editor-tabs button.active{background:#3e4451;color:#61afef}:root[data-theme=dark] .html-theme-switch{color:#9ba3b4}:root[data-theme=dark] .html-highlight{color:#abb2bf}:root[data-theme=dark] .html-scroll .html-editor{background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#61afef}:root[data-theme=dark] .html-scroll .html-editor::selection{background:#3e4451}.editor-scroll.html-scroll.html-theme-dark .code-completion-menu,:root[data-theme=dark] .code-completion-menu{border-color:#181a1f;background:#21252b;box-shadow:var(--shadow-soft-flat)}.editor-scroll.html-scroll.html-theme-dark .code-completion-menu button,:root[data-theme=dark] .code-completion-menu button{color:#abb2bf}.editor-scroll.html-scroll.html-theme-dark .code-completion-menu button.active,.editor-scroll.html-scroll.html-theme-dark .code-completion-menu button:hover,:root[data-theme=dark] .code-completion-menu button.active,:root[data-theme=dark] .code-completion-menu button:hover{background:#3e4451;color:#61afef}.editor-scroll.html-scroll.html-theme-dark .code-completion-menu small,:root[data-theme=dark] .code-completion-menu small{color:#7f8796}.html-token-comment{color:#a0a1a7;font-style:italic}.html-token-tag{color:#a626a4}.html-token-attribute{color:#986801}.html-token-string{color:#50a14f}.css-token-property{color:#986801}.css-token-value{color:#4078f2}:root[data-theme=dark] .html-token-comment{color:#5c6370}:root[data-theme=dark] .html-token-tag{color:#c678dd}:root[data-theme=dark] .html-token-attribute{color:#d19a66}:root[data-theme=dark] .html-token-string{color:#98c379}:root[data-theme=dark] .css-token-property{color:#d19a66}:root[data-theme=dark] .css-token-value{color:#61afef}.work-grid .editor-panel.html-panel.html-theme-light{border-color:var(--border);background:var(--surface-subtle)}.editor-scroll.html-scroll.html-theme-light .html-editor-bar{border-bottom-color:var(--border);background:var(--surface-subtle)}.editor-scroll.html-scroll.html-theme-light .html-editor-tabs{background:var(--surface-hover)}.editor-scroll.html-scroll.html-theme-light .html-editor-tabs button{color:var(--text-secondary)}.editor-scroll.html-scroll.html-theme-light .html-editor-tabs button.active{background:var(--surface);color:var(--text-primary)}.editor-scroll.html-scroll.html-theme-light .html-theme-switch{color:var(--text-secondary)}.editor-scroll.html-scroll.html-theme-light .html-highlight{color:var(--text-primary)}.editor-scroll.html-scroll.html-theme-light .html-editor{background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#4078f2}.editor-scroll.html-scroll.html-theme-light .html-editor::selection{background:#d7e5f7}.editor-scroll.html-scroll.html-theme-light .code-completion-menu{border-color:var(--border);background:var(--surface);box-shadow:var(--shadow-soft-flat)}.editor-scroll.html-scroll.html-theme-light .code-completion-menu button{color:var(--text-primary)}.editor-scroll.html-scroll.html-theme-light .code-completion-menu button.active,.editor-scroll.html-scroll.html-theme-light .code-completion-menu button:hover{background:#e5efff;color:#265aa8}.editor-scroll.html-scroll.html-theme-light .code-completion-menu small{color:var(--text-tertiary)}.editor-scroll.html-scroll.html-theme-light .html-token-comment{color:#a0a1a7}.editor-scroll.html-scroll.html-theme-light .html-token-tag{color:#a626a4}.editor-scroll.html-scroll.html-theme-light .html-token-attribute{color:#986801}.editor-scroll.html-scroll.html-theme-light .html-token-string{color:#50a14f}.editor-scroll.html-scroll.html-theme-light .css-token-property{color:#986801}.editor-scroll.html-scroll.html-theme-light .css-token-value{color:#4078f2}.work-grid .editor-panel.html-panel.html-theme-dark{border-color:#181a1f;background:#282c34}.editor-scroll.html-scroll.html-theme-dark .html-editor-bar{border-bottom-color:#181a1f;background:#21252b}.editor-scroll.html-scroll.html-theme-dark .html-editor-tabs{background:#282c34}.editor-scroll.html-scroll.html-theme-dark .html-editor-tabs button{color:#9ba3b4}.editor-scroll.html-scroll.html-theme-dark .html-editor-tabs button.active{background:#3e4451;color:#61afef}.editor-scroll.html-scroll.html-theme-dark .html-theme-switch{color:#9ba3b4}.editor-scroll.html-scroll.html-theme-dark .html-highlight{color:#abb2bf}.editor-scroll.html-scroll.html-theme-dark .html-editor{background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#61afef}.editor-scroll.html-scroll.html-theme-dark .html-editor::selection{background:#3e4451}.editor-scroll.html-scroll.html-theme-dark .html-token-comment{color:#5c6370}.editor-scroll.html-scroll.html-theme-dark .html-token-tag{color:#c678dd}.editor-scroll.html-scroll.html-theme-dark .html-token-attribute{color:#d19a66}.editor-scroll.html-scroll.html-theme-dark .html-token-string{color:#98c379}.editor-scroll.html-scroll.html-theme-dark .css-token-property{color:#d19a66}.editor-scroll.html-scroll.html-theme-dark .css-token-value{color:#61afef}.image-input{display:none}.color-picker{position:relative;display:inline-flex;min-width:0}.color-picker-trigger{position:relative;display:grid;place-items:center;padding:0}.color-picker-toolbar .color-picker-trigger{width:38px}.color-picker-trigger>i{position:absolute;right:13px;bottom:3px;left:7px;height:3px;border:1px solid rgba(31,41,55,.16);border-radius:1px}.color-picker-trigger>svg:last-child{position:absolute;top:50%;right:-5px;transform:translateY(-50%)}.color-picker-trigger.active{background:var(--surface-hover);color:var(--text-primary)}.text-color-icon{display:inline-grid;place-items:center;font-size:17px;font-weight:650;line-height:1}.color-picker-menu,.table-context-menu .color-picker-menu .color-picker-trigger{display:flex;width:100%}.color-picker-menu .color-picker-trigger>span{margin-right:auto}.color-picker-menu .color-picker-trigger>i{position:static;width:24px;height:11px;margin-left:8px;border-radius:3px}.color-picker-menu .color-picker-trigger>svg:last-child{position:static;flex:0 0 auto}.color-picker-popover{position:fixed;z-index:10020;max-height:calc(100vh - 16px);padding:12px;overflow-y:auto;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-soft-flat)}.color-picker-popover section+section{padding-top:12px;border-top:1px solid var(--border);margin-top:12px}.color-picker-popover section>strong{display:block;margin-bottom:8px;color:var(--text-secondary);font-size:11px;font-weight:600}.color-picker-defaults{display:grid;grid-template-columns:repeat(10,24px);grid-gap:4px;gap:4px}.color-picker-swatch{display:grid;width:24px;height:24px;padding:0;place-items:center;border:1px solid rgba(0,0,0,.15);border-radius:3px;color:var(--surface);cursor:pointer;text-shadow:0 1px 2px rgba(0,0,0,.7)}.color-picker-swatch:focus-visible,.color-picker-swatch:hover{border-color:var(--border-strong);outline:2px solid var(--border-strong);outline-offset:1px}.color-picker-input{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;grid-gap:7px;gap:7px;height:34px;padding:3px 3px 3px 7px;border:1px solid var(--border);border-radius:6px}.color-picker-input.invalid{border-color:var(--danger)}.color-picker-input>span{width:18px;height:18px;border:1px solid var(--border);border-radius:3px}.color-picker-input input{min-width:0;border:0;outline:0;background:transparent;color:inherit;font:12px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace}.color-picker-input button{height:26px;padding:0 9px;border:0;border-radius:4px;background:var(--text-primary);color:var(--surface);font-size:11px}.color-picker-popover small{display:block;margin-top:5px;color:var(--danger);font-size:10px}.color-picker-popover .color-picker-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.color-picker-native-actions{display:inline-flex;align-items:center;gap:5px}.color-picker-clear,.color-picker-native,.color-picker-native-confirm{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 9px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text-primary);font-size:11px;cursor:pointer}.color-picker-clear:hover,.color-picker-native-confirm:hover,.color-picker-native:hover{border-color:var(--border-strong);color:var(--text-primary)}.color-picker-native>i{width:14px;height:14px;border:1px solid rgba(31,41,55,.2);border-radius:3px}.color-picker-native-confirm{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}.color-picker-native-confirm:hover{background:var(--text-primary);color:var(--surface);filter:brightness(.9)}.color-picker-native input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.paper-content img,.tiptap-editor img{display:block;max-width:100%;height:auto;margin:18px 0;border-radius:4px}.paper-content blockquote,.tiptap-editor blockquote{margin:18px 0;padding:4px 16px;border-left:3px solid var(--border-strong);color:var(--text-secondary)}.paper-content hr,.tiptap-editor hr{margin:28px 0;border:0;border-top:1px solid var(--border)}.paper-content a,.tiptap-editor a{color:var(--text-primary);text-decoration:underline}.math-node{font-family:inherit}.math-node-inline{display:inline;vertical-align:baseline}.math-inline-chip{display:inline-flex;align-items:baseline;min-height:0;max-width:100%;padding:0 2px;border:0;border-radius:4px;background:transparent;color:inherit;line-height:inherit;vertical-align:baseline}.math-inline-chip.is-empty{padding:1px 6px;border:1px dashed var(--border-strong);background:var(--surface-hover)}.math-inline-preview{display:inline-flex;align-items:baseline;max-width:100%;overflow:visible}.math-inline-preview .katex{max-width:none;overflow:visible}.math-inline-chip:hover,.math-node-inline.is-editing .math-inline-chip,.math-node-inline.is-selected .math-inline-chip{background:var(--surface-hover);box-shadow:none}.math-node-block{margin:18px 0}.math-block-surface{position:relative;display:block;width:100%;padding:18px 14px;border:1px solid transparent;border-radius:10px;background:transparent;color:inherit;text-align:center}.math-block-surface:hover,.math-node-block.is-editing .math-block-surface,.math-node-block.is-selected .math-block-surface{border-color:var(--border-strong);box-shadow:0 0 0 2px var(--border-strong)}.math-block-surface.is-empty{text-align:left}.math-block-edit-hint{position:absolute;top:8px;right:10px;display:inline-flex;align-items:center;gap:4px;color:var(--text-tertiary);font-size:11px;opacity:0;transition:opacity .16s ease}.math-block-surface:hover .math-block-edit-hint,.math-node-block.is-selected .math-block-edit-hint{opacity:1}.math-block-rendered{display:block;overflow-x:auto}.math-block-rendered .katex-display{margin:0}.math-editor-overlay{position:fixed;z-index:220;display:grid;grid-gap:10px;gap:10px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-subtle);box-shadow:var(--shadow-soft-flat)}.math-editor-overlay.is-inline{max-width:calc(100vw - 24px)}.math-editor-overlay-header{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--text-secondary);font-size:12px;font-weight:700}.math-editor-overlay-actions button,.math-editor-overlay-delete{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;padding:0 10px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text-secondary)}.math-editor-overlay-delete{min-width:30px;padding:0}.math-editor-overlay-actions button:hover,.math-editor-overlay-delete:hover{border-color:var(--border-strong);color:var(--text-primary)}.math-editor-overlay-field{display:grid;grid-gap:6px;gap:6px}.math-editor-overlay-field>span{color:var(--text-tertiary);font-size:12px;font-weight:700}.math-editor-overlay input,.math-editor-overlay textarea{width:100%;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-primary);font:500 13px/1.6 Cascadia Code,SFMono-Regular,Consolas,monospace}.math-editor-overlay input{min-height:40px;padding:0 11px}.math-editor-overlay textarea{min-height:88px;padding:10px 12px;resize:vertical}.math-editor-overlay-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}.math-editor-overlay-error{display:grid;grid-gap:5px;gap:5px;padding:10px 11px;border:1px solid rgba(197,60,73,.2);border-radius:8px;background:rgba(197,60,73,.08);color:var(--danger)}.math-editor-overlay-error p,.math-editor-overlay-error small,.math-editor-overlay-error strong{margin:0}.math-editor-overlay-error strong{font-size:12px}.math-editor-overlay-error p{font:500 12px/1.55 Cascadia Code,SFMono-Regular,Consolas,monospace}.math-editor-overlay-error small{color:var(--danger);font-size:12px;line-height:1.55}.math-editor-overlay-actions button:disabled{opacity:.45;cursor:not-allowed}.math-editor-overlay-actions button.primary{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}.math-editor-overlay-actions button.secondary{background:var(--surface)}.math-editor-overlay.is-inline .math-editor-overlay-actions{justify-content:flex-end}.math-render{color:inherit}.math-render-inline{display:inline-flex;align-items:center;vertical-align:middle;margin:0 .08em}.math-render-block{display:block;margin:22px auto;overflow-x:auto;text-align:center}.math-render-block .katex-display{margin:0}.math-katex-error,.math-katex-placeholder{display:inline-block;padding:2px 6px;border-radius:6px;font:500 12px/1.5 Cascadia Code,SFMono-Regular,Consolas,monospace}.math-katex-placeholder{background:var(--surface-hover);color:var(--text-secondary)}.math-katex-error{background:rgba(197,60,73,.12);color:var(--danger)}.work-grid{position:relative}.rail-panel{position:absolute;z-index:4;top:10px;right:79px;width:400px;max-height:calc(100% - 20px);padding:16px;overflow:auto;border:0;border-radius:7px;background:var(--surface);box-shadow:0 0 0 1px rgba(17,17,17,.08),0 10px 24px rgba(17,17,17,.08),0 2px 8px rgba(17,17,17,.05);color:var(--text-primary);font-size:13px}.rail-panel p{margin:9px 0 0;color:var(--text-tertiary);line-height:1.6}.rail-panel ol{margin:12px 0 0;padding-left:18px}.rail-panel li{margin:7px 0}.rail-panel li.level-2{padding-left:10px}.rail-panel li.level-3{padding-left:20px}.rail-panel ol button{display:block;width:100%;padding:3px 0;border:0;background:transparent;color:inherit;font-size:13px;line-height:1.5;text-align:left;cursor:pointer}.rail-panel ol button:hover{color:var(--text-primary)}.rail-panel label{display:flex;gap:8px;align-items:center;margin-top:13px}.tone-options{display:grid;grid-template-columns:1fr 1fr;grid-gap:8px;gap:8px;margin-top:12px}.tone-options button{height:34px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text-secondary)}.tone-options button.active{border-color:var(--border-strong);color:var(--text-primary);background:var(--surface-hover)}.paper-soft .pdf-render-source{background:#fbfaf6}@media (max-width:820px){.rail-panel{display:none}}:root[data-theme=dark] .tiptap-editor td,:root[data-theme=dark] .tiptap-editor th{border-color:var(--table-border-color,var(--line))}:root[data-theme=dark] .tiptap-editor th{background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .color-picker-popover{border-color:var(--border-strong);background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-soft-flat)}:root[data-theme=dark] .color-picker-popover section+section{border-color:var(--border)}:root[data-theme=dark] .color-picker-popover section>strong{color:var(--text-secondary)}:root[data-theme=dark] .color-picker-input{border-color:var(--border-strong);background:var(--surface)}:root[data-theme=dark] .color-picker-input>span{border-color:var(--border-strong)}:root[data-theme=dark] .color-picker-clear,:root[data-theme=dark] .color-picker-native{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .tiptap-editor blockquote{color:var(--muted)}:root[data-theme=dark] .math-inline-chip{background:transparent}:root[data-theme=dark] .math-inline-chip.is-empty{border-color:var(--border-strong);background:var(--surface-hover)}:root[data-theme=dark] .math-editor-overlay{border-color:var(--border);background:var(--surface);box-shadow:var(--shadow-soft-flat)}:root[data-theme=dark] .math-editor-overlay input,:root[data-theme=dark] .math-editor-overlay textarea{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}:root[data-theme=dark] .math-editor-overlay-actions button,:root[data-theme=dark] .math-editor-overlay-delete{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-secondary)}:root[data-theme=dark] .math-editor-overlay-error{border-color:rgba(255,157,168,.24);background:rgba(197,60,73,.14);color:#ffb4bd}:root[data-theme=dark] .math-editor-overlay-error small{color:#ffc5cb}:root[data-theme=dark] .math-block-edit-hint,:root[data-theme=dark] .math-editor-overlay-field>span,:root[data-theme=dark] .math-editor-overlay-header{color:var(--text-secondary)}:root[data-theme=dark] .math-inline-chip:hover,:root[data-theme=dark] .math-node-inline.is-editing .math-inline-chip,:root[data-theme=dark] .math-node-inline.is-selected .math-inline-chip{background:var(--surface-hover)}:root[data-theme=dark] .math-editor-overlay-actions button.primary{border-color:var(--border-strong);background:var(--text-primary);color:var(--surface)}:root[data-theme=dark] .math-katex-placeholder{background:var(--surface-hover);color:var(--text-secondary)}:root[data-theme=dark] .math-katex-error{background:rgba(197,60,73,.18);color:#ff9da8}:root[data-theme=dark] .rail-panel{border-color:var(--line);background:var(--panel);box-shadow:var(--shadow-soft-flat);color:var(--ink)}:root[data-theme=dark] .rail-panel p{color:var(--muted)}:root[data-theme=dark] .tone-options button{border-color:var(--line);background:var(--panel);color:var(--text-secondary)}:root[data-theme=dark] .tone-options button.active{border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}.app-shell .work-grid,.app-shell .work-main{position:relative}.app-shell .editor-panel,.app-shell .preview-panel,.app-shell .right-rail{border-radius:0;border:0;box-shadow:none}.app-shell .rail-panel{border-radius:10px;border:0;box-shadow:0 0 0 1px rgba(17,17,17,.08),0 10px 24px rgba(17,17,17,.08),0 2px 8px rgba(17,17,17,.05)}.app-shell .preview-panel{background:transparent}.app-shell .toolbar{gap:8px;min-height:var(--toolbar-height);padding:6px 12px;border-bottom:1px solid var(--border);background:var(--surface)}.app-shell .toolbar-group{flex-wrap:wrap}.app-shell .toolbar-more{margin-left:auto}.app-shell .color-picker-toolbar .color-picker-trigger,.app-shell .toolbar .chart-insert-control>button,.app-shell .toolbar .math-insert-control>button,.app-shell .toolbar .table-insert-control>button{width:32px;height:32px;border-radius:8px}.app-shell .chart-editor-overlay,.app-shell .chart-insert-popover,.app-shell .color-picker-popover,.app-shell .math-editor-overlay,.app-shell .math-insert-popover,.app-shell .table-context-menu,.app-shell .table-insert-popover,.app-shell .table-selection-toolbar{border-color:var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-soft-flat)}.app-shell .table-context-toolbar{background:var(--surface-subtle)}.app-shell .table-context-toolbar strong{color:var(--text-secondary)}.app-shell .chart-editor-actions button.primary,.app-shell .chart-editor-mode-switch button.active,.app-shell .math-editor-overlay-actions button.primary,.app-shell .table-context-menu button.active,.app-shell .table-context-toolbar button.active,.app-shell .toolbar .table-dialog-actions button.primary{background:var(--text-primary);color:var(--surface)}.app-shell .chart-dataset-header button:hover,.app-shell .chart-editor-actions button:hover,.app-shell .chart-editor-header button:hover,.app-shell .chart-editor-mode-switch button:hover,.app-shell .chart-node-toolbar button:hover,.app-shell .color-picker-clear:hover,.app-shell .color-picker-native:hover,.app-shell .math-editor-overlay-actions button:hover,.app-shell .math-editor-overlay-delete:hover,.app-shell .table-context-menu button:hover:not(:disabled),.app-shell .table-context-toolbar button:hover:not(:disabled),.app-shell .toolbar .chart-insert-actions>button:hover,.app-shell .toolbar .math-insert-actions>button:hover,.app-shell .toolbar .table-dialog-actions button:hover:not(:disabled){border-color:var(--border-strong);background:var(--surface-hover);color:var(--text-primary)}.app-shell .editor-panel.html-panel{background:var(--surface)}.app-shell .html-code-shell{grid-template-rows:44px minmax(0,1fr)}.app-shell .html-editor-bar{border-bottom:1px solid var(--border);background:var(--surface-subtle)}.app-shell .html-editor-tabs{background:var(--surface-hover)}.app-shell .html-editor-tabs button{color:var(--text-secondary)}.app-shell .html-editor-tabs button.active{background:var(--surface);color:var(--text-primary);box-shadow:none}.app-shell .html-theme-switch-track{background:var(--surface-hover);box-shadow:inset 0 0 0 1px var(--border)}.app-shell .html-theme-switch-thumb{background:var(--surface);box-shadow:var(--shadow-soft-flat)}.app-shell .html-highlight,.app-shell .html-scroll .html-editor{padding:24px 28px 48px}.app-shell .code-completion-menu{border-color:var(--border);border-radius:var(--radius-md);background:var(--surface);box-shadow:0 4px 16px rgba(0,0,0,.05)}.app-shell .code-completion-menu button.active,.app-shell .code-completion-menu button:hover{background:var(--surface-hover);color:var(--text-primary)}.app-shell .paper-content table,.app-shell .tiptap-editor table{margin:18px 0}.app-shell .paper-content td,.app-shell .paper-content th,.app-shell .tiptap-editor td,.app-shell .tiptap-editor th{border-color:var(--table-border-color,var(--border))}.app-shell .paper-content table[data-table-horizontal-lines=false] td,.app-shell .paper-content table[data-table-horizontal-lines=false] th,.app-shell .rich-editor-style-scope .ProseMirror table[data-table-horizontal-lines=false] td,.app-shell .rich-editor-style-scope .ProseMirror table[data-table-horizontal-lines=false] th{border-top-width:0!important;border-bottom-width:0!important}.app-shell .paper-content table[data-table-vertical-lines=false] td,.app-shell .paper-content table[data-table-vertical-lines=false] th,.app-shell .rich-editor-style-scope .ProseMirror table[data-table-vertical-lines=false] td,.app-shell .rich-editor-style-scope .ProseMirror table[data-table-vertical-lines=false] th{border-left-width:0!important;border-right-width:0!important}.app-shell .paper-content table[data-table-border-color] td,.app-shell .paper-content table[data-table-border-color] th,.app-shell .rich-editor-style-scope .ProseMirror table[data-table-border-color] td,.app-shell .rich-editor-style-scope .ProseMirror table[data-table-border-color] th{border-color:var(--table-border-color)!important}.app-shell .paper-content blockquote,.app-shell .tiptap-editor blockquote{border-left-color:var(--border-strong);color:var(--text-secondary)}.app-shell .paper-content hr,.app-shell .tiptap-editor hr{border-top-color:var(--border)}.app-shell .chart-dataset-panel,.app-shell .chart-editor-preview,.app-shell .math-template-card{border-color:var(--border);background:var(--surface-subtle)}.app-shell .chart-node-surface{background:transparent}.app-shell .chart-node-surface.has-background,.app-shell .chart-surface-frame.has-background{background:var(--surface-subtle)}.app-shell .chart-node-surface.has-border,.app-shell .chart-surface-frame.has-border{border-color:var(--border)}.app-shell .chart-node-surface:hover,.app-shell .chart-node.is-selected .chart-node-surface,.app-shell .math-block-surface:hover,.app-shell .math-node-block.is-editing .math-block-surface,.app-shell .math-node-block.is-selected .math-block-surface{box-shadow:none}:root[data-theme=dark] .app-shell .chart-editor-overlay,:root[data-theme=dark] .app-shell .chart-insert-popover,:root[data-theme=dark] .app-shell .code-completion-menu,:root[data-theme=dark] .app-shell .color-picker-popover,:root[data-theme=dark] .app-shell .math-editor-overlay,:root[data-theme=dark] .app-shell .math-insert-popover,:root[data-theme=dark] .app-shell .table-context-menu,:root[data-theme=dark] .app-shell .table-insert-popover,:root[data-theme=dark] .app-shell .table-selection-toolbar{border-color:var(--border);background:var(--surface);box-shadow:0 4px 16px rgba(0,0,0,.16)}:root[data-theme=dark] .app-shell .chart-dataset-panel,:root[data-theme=dark] .app-shell .chart-dataset-table th,:root[data-theme=dark] .app-shell .chart-editor-preview,:root[data-theme=dark] .app-shell .html-editor-bar,:root[data-theme=dark] .app-shell .math-template-card,:root[data-theme=dark] .app-shell .table-context-toolbar,:root[data-theme=dark] .app-shell .toolbar .chart-insert-actions>button,:root[data-theme=dark] .app-shell .toolbar .math-insert-actions>button{background:var(--surface-subtle)}:root[data-theme=dark] .app-shell .chart-node-surface{background:transparent}:root[data-theme=dark] .app-shell .chart-node-surface.has-background,:root[data-theme=dark] .app-shell .chart-surface-frame.has-background{background:var(--surface-subtle)}:root[data-theme=dark] .app-shell .chart-node-surface.has-border,:root[data-theme=dark] .app-shell .chart-surface-frame.has-border{border-color:var(--border)}:root[data-theme=dark] .app-shell .html-editor-tabs,:root[data-theme=dark] .app-shell .html-theme-switch-track{background:var(--surface-hover)}:root[data-theme=dark] .app-shell .html-editor-tabs button.active{background:var(--surface);color:var(--text-primary)}