.data-card,.quiz-card{position:relative;display:flex;justify-content:space-between;gap:12px;margin:10px 0;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fbfdff}.data-card div{display:grid;gap:4px;min-width:0}.data-card a{overflow:hidden;text-overflow:ellipsis;color:var(--blue);font-size:.8rem}.data-card button,.quiz-card>button{border:0;background:transparent;color:var(--muted)}.quiz-card{display:block}.quiz-card>button{position:absolute;right:8px;top:8px}.quiz-card>strong{display:block;padding-right:24px}.quiz-card p{line-height:1.7}.editor-toolbar label{display:flex;align-items:center;gap:3px;padding:0 4px;font-size:.68rem;color:#56687c}.editor-toolbar input[type=color]{width:22px;height:24px;padding:0;border:0;background:none}
.action-dialog{width:min(430px,calc(100% - 28px));max-height:calc(100dvh - 28px);padding:0;border:0;border-radius:16px;box-shadow:0 24px 80px rgba(13,40,76,.28)}.action-dialog::backdrop{background:rgba(15,29,47,.35);backdrop-filter:blur(2px)}.action-dialog form{max-height:calc(100dvh - 28px);padding:22px;overflow:auto}.action-dialog header{display:flex;align-items:center;justify-content:space-between}.action-dialog header strong{font-size:1.15rem}.action-dialog p{color:var(--muted);line-height:1.65;white-space:pre-wrap}.action-dialog label{display:grid;gap:7px;margin:18px 0}.action-dialog input{width:100%;padding:12px;border:1px solid #cbd8e7;border-radius:9px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.context-menu.context-pointer-locked{pointer-events:none}
.node.context-pressed:not(.selected):not(.multi-selected){outline:3px solid rgba(8,119,249,.18)}
:root{--safe-dialog-top:env(safe-area-inset-top,0px)}
@media(max-width:900px){.action-dialog[open]{position:fixed;top:var(--dialog-visual-top,50%);left:50%;margin:0;transform:translate(-50%,-50%);max-height:calc(var(--visual-height,100dvh) - 24px - env(safe-area-inset-top,0px))}.action-dialog[open] form{max-height:calc(var(--visual-height,100dvh) - 24px - env(safe-area-inset-top,0px))}}
.paste-debug-panel{position:fixed;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:120;width:min(440px,calc(100vw - 24px));max-height:min(70dvh,620px);overflow:auto;padding:12px;border:1px solid #b8cce2;border-radius:12px;background:#fff;box-shadow:0 16px 48px rgba(13,40,76,.24);font-size:12px}.paste-debug-panel header{display:flex;align-items:center;justify-content:space-between}.paste-debug-panel header button{border:0;background:transparent;font-size:22px}.paste-debug-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.paste-debug-panel>button{padding:8px 10px;border:1px solid #cfe0f4;border-radius:8px;background:#eaf4ff;color:#0769dc}
.two-factor-qr{width:min(250px,100%);margin:16px auto;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff}.two-factor-qr svg{display:block;width:100%;height:auto}.two-factor-guide{margin:12px 0 8px;font-size:.88rem}.two-factor-key-label{display:block;margin-bottom:6px;color:var(--muted);font-size:.78rem;font-weight:700}.two-factor-key{display:block;padding:11px;border:1px solid #cbd8e7;border-radius:9px;background:#f7faff;overflow-wrap:anywhere;font-size:.9rem;letter-spacing:.08em;text-align:center;user-select:all}
.mindmap{position:relative;isolation:isolate}.tree li:before,.tree ul:before{display:none!important}.map-connectors{display:block;position:absolute;z-index:1;inset:0;overflow:visible;pointer-events:none}.map-connectors path{fill:none;stroke:#8fb1d5;stroke-width:2;stroke-linecap:round;vector-effect:non-scaling-stroke}.tree{z-index:2}.rich-editor a[data-memo-id]{color:#0769dc;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}.dialog-select,.memo-link-picker select,.memo-link-picker input{width:100%;padding:11px;border:1px solid #cbd8e7;border-radius:9px;background:#fff;font:inherit}.memo-link-picker{display:grid;gap:10px;margin-top:14px}.memo-link-picker select{min-height:190px}.setting-group>p{margin:0;color:var(--muted);line-height:1.7}
.workspace{--note-panel-width:390px;grid-template-columns:minmax(340px,1fr) 8px minmax(300px,var(--note-panel-width))}.workspace-resizer{position:relative;z-index:10;width:8px;margin-left:-4px;cursor:col-resize;touch-action:none}.workspace-resizer:after{content:"";position:absolute;inset:0 3px;background:#dce6f1;opacity:0;transition:.15s}.workspace-resizer:hover:after,.resizing-workspace .workspace-resizer:after{opacity:1}.resizing-workspace,.resizing-workspace *{cursor:col-resize!important;user-select:none!important}.map-viewport{cursor:grab;touch-action:none}.map-viewport.panning{cursor:grabbing;user-select:none}.map-viewport .node{cursor:pointer}.rich-editor{overflow-x:auto}.rich-editor table{width:max-content;min-width:100%;table-layout:fixed}.rich-editor th,.rich-editor td{position:relative;min-width:64px}.rich-editor.table-resize-ready{cursor:col-resize}.resizing-table,.resizing-table *{cursor:col-resize!important;user-select:none!important}.rich-editor pre{background:#f3f4f6!important;color:#1f2937!important;border:1px solid #e1e5ea}.rich-editor pre code{background:transparent;color:inherit}.rich-editor code{padding:.08em .32em;border-radius:4px;background:#f1f3f5;color:#27364a}
@media(max-width:900px){.workspace{grid-template-columns:1fr}.workspace-resizer{display:none}.map-viewport{touch-action:none}}
.history-actions{display:flex;gap:5px}.history-actions .icon-button{width:34px;height:34px;font-size:1.25rem}.history-actions button:disabled{cursor:not-allowed;opacity:.35}.mindmap,.mindmap .node{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.rich-editor{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}.node.multi-selected{outline:3px solid #0a73e8;outline-offset:3px;background:#e4f1ff;box-shadow:0 0 0 6px rgba(8,119,249,.12)}.node.multi-selected:after{content:"✓";position:absolute;right:3px;top:2px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#0877f9;color:#fff;font-size:10px}.node.touch-drop-target{outline:4px solid rgba(18,167,104,.35);border-color:#12a768}.selection-rectangle{position:fixed;z-index:90;border:1.5px solid #0877f9;background:rgba(8,119,249,.13);box-shadow:0 0 0 1px rgba(255,255,255,.7) inset;pointer-events:none}.editor-toolbar{position:relative}.color-tool{display:flex!important;align-items:center;gap:4px;padding:0 6px!important}.color-preview{width:14px;height:14px;border:1px solid #9aa8b8;border-radius:2px;background:linear-gradient(135deg,#ffdc62 50%,#5b8ef1 50%)}.color-palette{position:absolute;z-index:120;top:calc(100% + 6px);right:6px;width:292px;padding:13px;border:1px solid #cbd8e7;border-radius:12px;background:#fff;box-shadow:0 18px 48px rgba(13,40,76,.22)}.color-palette>strong{display:block;margin:7px 0;font-size:.78rem}.color-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:3px}.color-grid button{min-width:0!important;width:23px;height:23px!important;padding:0;border:1px solid rgba(19,34,56,.2)!important;border-radius:2px!important;background:var(--swatch)!important}.color-grid button:hover{outline:2px solid #0877f9}.color-palette .no-color,.color-palette .other-color{width:100%;height:auto;margin:2px 0 7px;padding:7px;border:1px solid #d8e2ee;background:#f7faff;text-align:left}.custom-color{position:absolute;width:1px;height:1px;opacity:0}.rich-editor .block-background{display:block;margin:12px 0;padding:14px 16px;border-radius:8px;background:#f3f5f8}.rich-editor .block-background>:first-child{margin-top:0}.rich-editor .block-background>:last-child{margin-bottom:0}.rich-editor .block-background>ul,.rich-editor .block-background>ol{padding-left:1.6em}.rich-editor mark{padding:.04em .12em}.note-fullscreen .note-panel .rich-editor .block-background{box-decoration-break:clone;-webkit-box-decoration-break:clone}
@media(max-width:900px){.top-actions{gap:6px;margin-left:6px}.history-actions .icon-button{width:32px;height:32px}.color-palette{position:fixed;top:auto;right:10px;bottom:12px;left:10px;width:auto;max-height:55vh;overflow:auto}.node.multi-selected:after{right:2px;top:1px}}
.brand-logo{gap:8px;min-width:0}.brand-icon{display:block;width:42px;height:42px;border-radius:11px;object-fit:cover}.brand-wordmark{display:block;width:146px;height:30px;border-radius:7px;object-fit:contain}.topbar-right{justify-self:end;display:flex;align-items:center;gap:10px;min-width:0}.topbar-right .top-actions{margin-left:0}.topbar-right .view-switcher{justify-self:auto}
.app-shell{height:var(--visual-height,100dvh);padding-top:calc(env(safe-area-inset-top,0px) + 68px)}.topbar{position:fixed;top:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px));right:0;left:0;z-index:70;background:#fff}.workspace{height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - 68px)}.note-panel.fullscreen{top:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px) + 68px);bottom:auto;height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - 68px)}.category-panel{top:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px) + 76px)}.backdrop{inset:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px) + 68px) 0 0}
.node-wrap{position:relative;display:inline-flex;align-items:center;z-index:3}.collapse-toggle{position:absolute;z-index:5;right:-44px;top:50%;display:grid;place-items:center;width:24px;height:24px;padding:0;transform:translateY(-50%);border:1px solid #8fb1d5;border-radius:50%;background:#fff;color:#416589;font-size:16px;line-height:1;opacity:0;transition:.15s;box-shadow:0 2px 7px rgba(27,64,109,.12)}.node-wrap:hover .collapse-toggle,.node.selected+.collapse-toggle,.collapse-toggle:focus,.collapse-toggle.collapsed{opacity:1}.collapse-toggle.collapsed{right:-32px;width:26px;height:26px;color:#0769dc;font-size:12px;font-weight:800}.map-fullscreen .workspace{grid-template-columns:1fr}.map-fullscreen .note-panel,.map-fullscreen .workspace-resizer{display:none}.toolbar-placeholder{width:100%}.editor-toolbar.mobile-fixed-toolbar{position:fixed;z-index:75;top:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px) + 68px);right:16px;left:16px;max-height:126px;overflow:auto;border-radius:0 0 10px 10px;background:rgba(248,250,252,.98);box-shadow:0 8px 22px rgba(13,40,76,.2)}.top-back-button{height:40px;padding:0 12px;border:1px solid #cfe0f4;border-radius:10px;background:#eaf4ff;color:#0769dc;font-weight:700;white-space:nowrap}.back-short-label{display:none}.move-mode-banner{position:absolute;z-index:15;top:72px;left:50%;display:flex;align-items:center;gap:14px;transform:translateX(-50%);padding:10px 12px;border:1px solid #9bc8fa;border-radius:12px;background:#fff;box-shadow:0 8px 24px rgba(13,40,76,.18);white-space:nowrap}.move-mode-banner button{padding:7px 10px;border:0;border-radius:8px;background:#edf5ff;color:#0769dc;font-weight:700}.choosing-move-target .node{cursor:crosshair}.choosing-move-target .node:not(.invalid-move-target):hover{outline:3px solid rgba(18,167,104,.3);border-color:#12a768}.choosing-move-target .node.invalid-move-target{cursor:not-allowed;opacity:.42}
.node.drop-child{outline:4px solid rgba(8,119,249,.32);outline-offset:3px;border-color:#0877f9;box-shadow:0 0 0 7px rgba(8,119,249,.1)}.node.drop-forbidden{cursor:not-allowed!important;outline:3px solid rgba(217,45,32,.42);border-color:#d92d20;filter:saturate(.45)}.drop-insertion-indicator{position:fixed;z-index:95;height:4px;transform:translateY(-2px);border-radius:999px;background:#0877f9;box-shadow:0 0 0 2px rgba(255,255,255,.92),0 3px 12px rgba(8,119,249,.4);pointer-events:none}.drop-insertion-indicator:before,.drop-insertion-indicator:after{content:"";position:absolute;top:50%;width:9px;height:9px;transform:translateY(-50%);border-radius:50%;background:#0877f9}.drop-insertion-indicator:before{left:-2px}.drop-insertion-indicator:after{right:-2px}
@media(max-width:1100px){.brand-wordmark{width:115px;height:24px}.brand-icon{width:36px;height:36px}.topbar{grid-template-columns:minmax(220px,1fr) minmax(220px,360px) auto}.topbar-right{gap:7px}.top-actions{gap:7px}.history-actions .icon-button{width:32px;height:32px}}
@media(max-width:1600px){.top-back-button .back-long-label{display:none}.top-back-button .back-short-label{display:inline}}
@media(max-width:900px){.topbar{grid-template-columns:auto 1fr auto}.brand-wordmark{display:none}.brand-icon{width:46px;height:46px;border-radius:12px}.brand-group{gap:5px}.topbar-right{gap:0}.topbar-right .top-actions{gap:2px}.topbar-right .history-actions{display:flex;gap:2px}.topbar-right .avatar,.topbar-right .view-switcher{display:none}.topbar-right .icon-button,.topbar-right .history-actions .icon-button,.menu-button{width:44px;height:44px;border-radius:12px;font-size:28px;font-weight:700}.editor-tools-button{font-size:28px!important}.top-back-button{position:absolute;left:103px;max-width:82px;height:44px;padding:0 8px;font-size:.83rem}.note-panel{top:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px) + 68px);bottom:auto;height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - 68px)}.collapse-toggle{opacity:.72}.collapse-toggle.collapsed{opacity:1}.editor-toolbar.mobile-fixed-toolbar{right:8px;left:8px}.move-mode-banner{top:72px;max-width:calc(100% - 20px);font-size:.84rem}}
@media(max-width:520px){.brand-icon{width:46px;height:46px}.topbar{padding-right:6px;padding-left:6px}.topbar-right .top-actions{gap:1px}.topbar-right .icon-button,.topbar-right .history-actions .icon-button,.menu-button{width:44px;height:44px}.top-back-button{left:101px}}
.note-header>.note-title-group{display:flex;align-items:center;min-width:0;flex:1}.note-header>.note-actions{min-width:auto;flex:0 0 auto}.topbar{grid-template-columns:minmax(360px,auto) minmax(220px,430px) minmax(430px,1fr);column-gap:12px}.top-actions{flex-wrap:nowrap}.view-switcher button{white-space:nowrap}
.editor-toolbar .color-tool{display:inline-flex!important;align-items:center;gap:0;height:31px;padding:0!important;border-radius:5px}.editor-toolbar .color-tool:focus-within,.editor-toolbar .color-tool:hover{background:#e7f1fc}.editor-toolbar .color-tool button{min-width:0;padding:0;background:transparent}.editor-toolbar .color-palette-button{padding:0 3px 0 6px}.editor-toolbar .color-repeat-button{display:grid;place-items:center;width:25px;padding:0 6px 0 3px}.color-repeat-button.has-color .color-preview{background:var(--last-color)}
@media(max-width:1100px) and (min-width:901px){.view-switcher button{padding:9px 9px;font-size:.78rem}}
@media(max-width:1100px) and (min-width:901px){.topbar{grid-template-columns:minmax(300px,auto) minmax(180px,1fr) auto}.brand-group{gap:10px}.brand-wordmark{width:105px}.top-back-button{padding:0 9px}.topbar-right{gap:5px}.top-actions{gap:5px}}
@media(max-width:900px){.brand-group{gap:5px}.brand-group .top-back-button{position:static;left:auto;margin-left:5px;max-width:82px;height:44px;padding:0 8px;font-size:.83rem}.note-header>.note-title-group{width:auto}}
@media(max-width:520px){.brand-group .top-back-button{position:static;left:auto;margin-left:5px}}
@media(max-width:900px){.topbar{display:flex;align-items:center;gap:0}.brand-group{flex:0 0 auto}.topbar-right{position:absolute;right:6px;width:182px;flex:0 0 182px}.brand-group .top-back-button{max-width:72px}.topbar-right .top-actions{width:100%;margin:0}.topbar-right .icon-button,.topbar-right .history-actions .icon-button{flex:0 0 44px}}
@media(max-width:380px){.topbar{padding-right:4px;padding-left:4px}.brand-icon{width:40px;height:40px}.brand-group{gap:4px}.brand-group .top-back-button{width:64px;max-width:64px;margin-left:4px;padding:0 4px;font-size:.76rem}.topbar-right{right:4px;width:171px;flex-basis:171px}.topbar-right .top-actions,.topbar-right .history-actions{gap:1px}.topbar-right .icon-button,.topbar-right .history-actions .icon-button,.menu-button{width:42px;height:44px;flex-basis:42px}}
.tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.tabs button>span:first-child{display:inline-block;padding:7px 14px;border-radius:9px}.tabs button.has-content>span:first-child{background:#eaf4ff;color:#0769dc}.open-detail-window{display:inline-grid!important;place-items:center;margin-left:4px;width:26px;height:26px;padding:0!important;border:1px solid #cfe0f4!important;border-radius:7px!important;background:#fff!important;color:#0769dc!important;font-size:.78rem}.rich-editor img{display:block;max-width:100%;height:auto;cursor:zoom-in}.image-size-menu{position:fixed;z-index:130;display:flex;gap:3px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:var(--shadow)}.image-size-menu button{min-width:42px;height:36px;border:0;border-radius:6px;background:#f0f6ff;color:#075fca;font-weight:700}.image-lightbox{max-width:calc(100vw - 30px);max-height:calc(100vh - 30px);padding:12px;border:0;border-radius:12px;background:#fff}.image-lightbox::backdrop{background:rgba(5,15,31,.83)}.image-lightbox img{display:block;max-width:calc(100vw - 56px);max-height:calc(100vh - 88px);object-fit:contain}.image-lightbox button{display:block;margin-left:auto;border:0;background:transparent;font-size:28px;color:#152337}@media(max-width:900px){.tabs button>span:first-child{padding:6px 9px}.open-detail-window{display:none!important}.image-lightbox{max-height:calc(var(--visual-height,100vh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)}}

.color-palette.floating-palette{position:fixed;top:var(--palette-top);right:auto;left:var(--palette-left);max-height:calc(100vh - var(--palette-top) - 10px);overflow:auto}.detail-readonly-page{min-height:100vh;background:#f8fbfe}.detail-readonly-page main{width:min(980px,calc(100% - 32px));margin:32px auto}.detail-readonly-page header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.detail-readonly-page header small{color:var(--muted)}.detail-readonly-page header h1{margin:8px 0 22px}.detail-readonly-page header button{padding:9px 13px;border:1px solid #cfe0f4;border-radius:9px;background:#fff;color:#0769dc}.detail-readonly{min-height:300px;padding:24px;border:1px solid var(--line);border-radius:12px;background:#fff}.detail-readonly img{cursor:zoom-in}
.data-settings{gap:8px}.data-settings h3{margin:22px 0 2px}.settings-data-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);text-align:left;text-decoration:none}.settings-data-row small{max-width:55%;color:var(--muted);text-align:right}.settings-data-row:hover{border-color:#a8cfff;background:#f8fbff}@media(max-width:600px){.settings-data-row{align-items:flex-start;flex-direction:column}.settings-data-row small{max-width:none;text-align:left}}
.import-target-label{display:grid;gap:7px;margin:10px 0!important;font-weight:700}.import-target-label select{width:100%;min-width:0;padding:11px;border:1px solid #cbd8e7;border-radius:9px;background:#fff;color:var(--ink)}

@media(min-width:901px){.note-panel .editor-panel:not(.hidden)>.editor-toolbar:not(.mobile-fixed-toolbar){position:sticky;z-index:25;top:0;background:rgba(248,250,252,.98);box-shadow:0 5px 15px rgba(13,40,76,.08);backdrop-filter:blur(8px)}}
.table-grid-picker{position:fixed;z-index:130;width:286px;padding:12px;border:1px solid #cbd8e7;border-radius:12px;background:#fff;box-shadow:0 18px 48px rgba(13,40,76,.22)}.table-grid-size{display:block;margin-bottom:9px;color:#334860;font-size:.85rem}.table-grid-cells{display:grid;grid-template-columns:repeat(10,1fr);gap:4px}.table-grid-cells button{width:22px;height:22px;min-width:0;padding:0;border:1px solid #9eacbc;border-radius:2px;background:#fff}.table-grid-cells button.selected{border-color:#0877f9;background:#dceeff;box-shadow:0 0 0 1px rgba(8,119,249,.18) inset}.table-grid-cells button:focus-visible{outline:2px solid #0877f9;outline-offset:1px}
.table-context-menu,.table-menu-submenu{position:fixed;z-index:135;width:196px;padding:7px;border:1px solid #cbd8e7;border-radius:11px;background:#fff;box-shadow:0 16px 42px rgba(13,40,76,.2)}.table-context-menu button,.table-menu-submenu button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 11px;border:0;border-radius:7px;background:transparent;color:#263a52;text-align:left}.table-context-menu button:hover,.table-context-menu button:focus-visible,.table-menu-submenu button:hover,.table-menu-submenu button:focus-visible{outline:0;background:#eaf4ff;color:#0769dc}.table-menu-group{position:relative}.table-menu-submenu{display:none;position:absolute;z-index:1;top:-7px;left:calc(100% + 7px)}.table-menu-group.open>.table-menu-submenu{display:block}.table-menu-submenu.open-left{right:calc(100% + 7px);left:auto}.table-menu-submenu [data-table-action="table-delete"]{color:var(--danger)}
.alignment-tool{display:grid!important;place-items:center;padding:0!important}.alignment-tool svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}.editor-toolbar .alignment-tool.active,.editor-toolbar .alignment-tool[aria-pressed="true"]{background:#dcecff;color:#0769dc;box-shadow:0 0 0 1px rgba(8,119,249,.16) inset}.rich-editor :where(p,h1,h2,h3,h4,h5,h6,li,blockquote,td,th)[data-align="left"]{text-align:left}.rich-editor :where(p,h1,h2,h3,h4,h5,h6,li,blockquote,td,th)[data-align="center"]{text-align:center}.rich-editor :where(p,h1,h2,h3,h4,h5,h6,li,blockquote,td,th)[data-align="right"]{text-align:right}.rich-editor img[data-align="left"],.rich-editor :where(td,th)[data-align="left"] img:not([data-align]){margin-left:0;margin-right:auto}.rich-editor img[data-align="center"],.rich-editor :where(td,th)[data-align="center"] img:not([data-align]){margin-left:auto;margin-right:auto}.rich-editor img[data-align="right"],.rich-editor :where(td,th)[data-align="right"] img:not([data-align]){margin-left:auto;margin-right:0}
.save-conflict-dialog{width:min(920px,calc(100% - 28px));max-height:min(760px,calc(100dvh - 28px));padding:22px;border:0;border-radius:18px;color:var(--ink);box-shadow:0 24px 70px rgba(13,40,76,.28)}.save-conflict-dialog::backdrop{background:rgba(9,24,43,.45)}.save-conflict-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.save-conflict-dialog>header>div{display:grid;gap:5px}.save-conflict-dialog>header strong{font-size:1.15rem}.save-conflict-dialog>header p,.save-conflict-dialog>p{margin:0;color:var(--muted)}.save-conflict-actions{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0 12px}.save-conflict-actions button{min-height:42px;padding:9px 13px;border-radius:9px}.save-conflict-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.save-conflict-comparison article{min-width:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}.save-conflict-comparison article>header{display:grid;gap:2px;padding:11px 13px;border-bottom:1px solid var(--line);background:#f7faff}.save-conflict-comparison article small{color:var(--muted)}.save-conflict-preview{max-height:330px;overflow:auto;padding:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.save-conflict-note{margin-top:14px!important;font-size:.84rem}.save-status.conflict{color:#b54708;font-weight:700}
@media(max-width:700px){.save-conflict-dialog{padding:16px}.save-conflict-actions{display:grid}.save-conflict-actions button{width:100%}.save-conflict-comparison{grid-template-columns:1fr}.save-conflict-preview{max-height:210px}}
.category-panel{height:min(680px,calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - 90px));max-height:none;padding:0;overflow:hidden}.panel-heading{flex:none;padding:14px 16px 10px}.panel-heading>span{display:flex;align-items:center;gap:8px}.panel-heading #editCategories{padding:7px 11px;border:1px solid #cfe0f4;border-radius:8px;background:#fff;color:#0769dc;font-weight:700}.category-list{flex:1;min-height:0;padding:0 12px;overscroll-behavior:contain}.category-footer{flex:none;display:grid;gap:7px;padding:10px 16px 14px;border-top:1px solid var(--line);background:#fff}.category-footer .add-category{margin:0}.category-footer .parent-add{border-color:#f0ca72;color:#8a6000}.category-trash-button{padding:7px;border:0;background:transparent;color:var(--muted);font-size:.82rem}.category-item{display:block;padding:0}.category-row{display:flex;align-items:center;border-radius:10px}.category-row.drop-folder{outline:2px solid var(--blue);background:#eaf4ff}.category-item.drop-forbidden>.category-row{outline:2px solid #ef4444;background:#fff0f0}.category-child>.category-row{padding-left:24px}.category-children{list-style:none;margin:0;padding:0}.category-drag-handle{flex:none;width:40px;height:40px;border:0;background:transparent;color:#344a62;touch-action:none;cursor:grab}.category-drag-handle:active{cursor:grabbing}.category-drop-line{height:6px;margin:0 8px;list-style:none;border-radius:4px}.category-drop-line.active{height:4px;margin-top:2px;margin-bottom:2px;background:var(--blue);box-shadow:0 0 0 2px rgba(8,119,249,.13)}body.category-dragging{user-select:none}body.category-dragging .category-select{pointer-events:none}.category-trash-dialog{width:min(520px,calc(100% - 24px));padding:20px;border:0;border-radius:16px}.category-trash-dialog header,.category-edit-dialog header{display:flex;align-items:center;justify-content:space-between}.category-trash-dialog>p{color:var(--muted)}.category-trash-dialog ul{max-height:50vh;overflow:auto;list-style:none;padding:0}.category-trash-dialog li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px;border-bottom:1px solid var(--line)}.category-trash-dialog li span{display:grid;gap:3px}.category-trash-dialog small{color:var(--muted)}.category-trash-dialog li button{padding:7px 12px;border:1px solid #bed8fa;border-radius:8px;background:#fff;color:var(--blue)}.category-edit-dialog{width:min(520px,calc(100% - 24px));padding:20px;border:0;border-radius:16px}.category-edit-dialog form{display:grid;gap:16px}.category-edit-dialog label{display:grid;gap:7px}.category-edit-dialog input{padding:11px;border:1px solid #cbd8e7;border-radius:8px}.category-edit-actions{display:flex;align-items:center}.category-edit-actions>span{flex:1}.danger-outline{padding:10px;border:1px solid #f2b8b5;border-radius:8px;background:#fff;color:var(--danger)}
@media(max-width:900px){.category-panel{height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - 88px)}.category-drop-line{height:10px}.category-drag-handle{width:46px;height:44px}}
.category-panel{height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 90px)}
@media(max-width:900px){.category-panel{height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 88px)}}

.search-shell{position:relative;min-width:0}.search-shell .search-box{width:100%;padding-right:40px}.search-close{position:absolute;z-index:2;right:5px;top:5px;width:33px;height:33px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:20px}.search-close:hover{background:#e7f1fc}.mobile-search-button{display:none!important}.global-search-results{position:absolute;z-index:95;top:calc(100% + 8px);left:0;width:min(620px,calc(100vw - 24px));max-height:min(68vh,620px);overflow:auto;padding:8px;border:1px solid var(--line);border-radius:13px;background:#fff;box-shadow:0 18px 52px rgba(13,40,76,.24)}.global-search-status{margin:0;padding:14px;color:var(--muted);font-size:.86rem}.global-search-result{display:grid;gap:4px;width:100%;padding:11px 12px;border:0;border-radius:9px;background:transparent;color:var(--ink);text-align:left}.global-search-result:hover,.global-search-result:focus-visible{outline:0;background:#edf5ff}.global-search-result strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-search-result small{overflow:hidden;color:var(--muted);font-size:.74rem;text-overflow:ellipsis;white-space:nowrap}.global-search-result span{display:-webkit-box;overflow:hidden;color:#3f5269;font-size:.82rem;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2}.global-search-result em{margin-right:7px;padding:2px 6px;border-radius:5px;background:#eaf4ff;color:#0769dc;font-size:.7rem;font-style:normal}.node.search-target{animation:search-target-pulse 2.8s ease-out}.node.search-target:after{content:"";position:absolute;inset:-6px;border:3px solid #ffbf24;border-radius:16px;pointer-events:none}@keyframes search-target-pulse{0%,35%{filter:brightness(1.08);box-shadow:0 0 0 8px rgba(255,191,36,.25)}100%{filter:none}}::highlight(rakulearn-search-match){background:#ffe66d;color:inherit}.search-highlight-overlay{position:fixed;z-index:140;border-radius:2px;background:rgba(255,230,75,.72);box-shadow:0 0 0 1px rgba(230,185,0,.18);pointer-events:none;mix-blend-mode:multiply}.subtree-clipboard-banner{position:absolute;z-index:18;top:72px;left:50%;display:flex;align-items:center;gap:10px;max-width:calc(100% - 24px);transform:translateX(-50%);padding:9px 10px;border:1px solid #9bc8fa;border-radius:12px;background:#fff;box-shadow:0 8px 24px rgba(13,40,76,.18)}.subtree-clipboard-banner>span{display:grid;min-width:0}.subtree-clipboard-banner strong,.subtree-clipboard-banner small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subtree-clipboard-banner small{color:var(--muted);font-size:.73rem}.subtree-clipboard-banner button{flex:none;padding:7px 10px;border:0;border-radius:8px;background:#edf5ff;color:#0769dc;font-weight:700}.subtree-clipboard-banner #cancelSubtreeCopy{width:34px;padding:7px}.subtree-clipboard-banner.pasting{opacity:.72;pointer-events:none}
@media(max-width:900px){.mobile-search-button{display:grid!important}.topbar-right .top-actions>.icon-button,.topbar-right .history-actions .icon-button{width:38px;height:42px}.search-shell{display:none;position:fixed;z-index:110;top:calc(var(--visual-top,0px) + env(safe-area-inset-top,0px) + 72px);left:8px;right:8px}.search-shell.mobile-open{display:block}.search-shell .search-box{display:flex;height:48px;background:#fff;box-shadow:0 9px 28px rgba(13,40,76,.2)}.search-shell kbd{display:none}.global-search-results{position:relative;top:6px;left:0;width:100%;max-height:calc(var(--visual-height,100dvh) - 145px)}.subtree-clipboard-banner{top:70px;width:calc(100% - 18px);font-size:.82rem}.subtree-clipboard-banner #pasteSubtree{max-width:150px;white-space:normal}.subtree-clipboard-banner small{display:none}}
.rich-editor mark[data-search-highlight]{background:#ffe66d;color:inherit;padding:0}
