/* 1.1.1 — compact reading-first workspace. Load after the typography preferences. */
:root{--navy:#285f85;--blue:#326b94;--blue-soft:#e8f2fa;--ink:#233c50;--muted:#60778a;--line:#dce6ed;--bg:#f5f8fa;--sidebar:#f1f6fa;--danger:#ae414b;--accent-teal:#237c77}
button{transition:background-color .12s,color .12s,border-color .12s;touch-action:manipulation}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #347eaa;outline-offset:2px}
button:disabled{opacity:.45}
.primary{background:var(--navy);border:1px solid var(--navy);color:#fff}.primary:hover{background:#1c4e72}
.secondary{background:#eaf3fa;border-color:#c6ddea;color:#285f85}.secondary:hover{background:#dcecf7}
.icon-button{border-radius:8px;color:#62798b;background:transparent;width:32px;height:32px;min-width:32px;display:inline-flex;align-items:center;justify-content:center;padding:5px}
.icon-button .moa-icon{width:17px;height:17px;stroke-width:1.8}
.icon-button:hover{background:#edf2f6;color:#425e74}
.icon-button.danger{background:#fbeef0;color:#aa4652}.icon-button.danger:hover{background:#f6dde1;color:#923544}
/* Focus and pointer hover must never masquerade as a selected bookmark. */
.editor-actions .toggle-favorite[aria-pressed=false],.editor-actions .toggle-pin[aria-pressed=false]{background:#f3f6f8;color:#728594;box-shadow:none;border:1px solid #e1e8ed}
.editor-actions .toggle-favorite[aria-pressed=true]{background:#fff0c7;color:#986512;border:1px solid #e7c673;box-shadow:none}
.editor-actions .toggle-pin[aria-pressed=true]{background:#e3eafa;color:#4c63a3;border:1px solid #b9c8e8;box-shadow:none}
.editor-actions .toggle-favorite[aria-pressed=false] svg,.editor-actions .toggle-pin[aria-pressed=false] svg{fill:none}
.editor-actions .toggle-favorite[aria-pressed=true] svg{fill:currentColor;fill-opacity:.2}
.editor-actions .info-button{color:#467b87;background:#eaf5f6}.editor-actions .info-button[aria-expanded=true]{background:#cce7eb}
.sidebar{padding-top:18px}.brand{margin-bottom:16px;gap:9px}.brand strong{font-size:1.05rem;color:#28546f}.brand small{display:none}.brand-symbol{width:32px;height:32px;font-size:1.6rem;background:#2c678e;border-radius:10px}
.new-note{min-height:36px;margin-bottom:12px;font-size:.84rem;border-radius:8px}.main-nav{gap:2px}.nav-item{min-height:33px;padding-top:5px;padding-bottom:5px;border-radius:7px;font-size:.83rem}.nav-item.active{color:#24597c;background:#deecf6;font-weight:600}.nav-item[data-view=favorites] .nav-icon{color:#a67825}.nav-item[data-view=pinned] .nav-icon{color:#6c7fb1}.nav-item[data-view=trash] .nav-icon{color:#af6972}
.sidebar-section{margin-top:16px}.folder-glyph{color:#6089a6}.folder-row.active .folder-glyph{color:#226394}.folder-row.active{background:#e0edf7}.section-label h2{font-size:.76rem}.folder-open{font-size:.8rem}.tag-cloud button{color:#548078;background:#e7f1ee;border-color:transparent}.tag-cloud button.active{color:#fff;background:#377c75}
.collection-action{min-height:28px;padding:3px 7px;border-radius:6px;font-size:.7rem}.collection-action[data-mode=delete],.selection-delete{color:#a44854;background:#fbeef0;border:1px solid #efcdd3}.collection-action[data-mode=move],.selection-move{color:#286d88;background:#e7f4f8;border:1px solid #c5e0eb}.collection-action:hover{filter:brightness(.97)}
.list-header{padding:10px 14px 0;flex:none;border-bottom:1px solid var(--line);background:#f9fbfd;z-index:2}
.list-heading{margin:0 0 7px;gap:5px;min-height:32px}.list-title-wrap{min-width:0;flex:1}.list-heading h1{font-size:1.08rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.025em}.list-add{background:#e0edf7;color:#28658f}.list-heading>.icon-button{width:30px;height:30px;min-width:30px}
.search-box{min-height:34px;gap:5px;padding:0 8px;background:#fff;border-radius:7px}.search-box input{padding:6px 0;font-size:.78rem;width:0;flex:1;min-width:0}.search-box>span{color:#6d91ac}
.search-help-inline{position:relative;margin:0;flex:none}.search-help-inline summary{list-style:none;width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:1px solid #d9e4eb;border-radius:50%;font:600 12px system-ui;color:#69869d;cursor:pointer}.search-help-inline summary::-webkit-details-marker{display:none}.search-help-inline[open] summary{background:#e6f0f7}.search-help-inline p{position:absolute;right:-6px;top:28px;z-index:20;width:244px;max-width:calc(100vw - 48px);background:#fff;border:1px solid #d3e1eb;box-shadow:0 8px 25px #254f6a22;border-radius:8px;padding:12px;margin:0;font-size:.74rem;color:#557085}
.list-tools{display:flex;gap:6px;align-items:center;justify-content:space-between;padding:5px 0 6px;flex-wrap:wrap}.list-context{min-height:28px;font-size:.68rem;display:flex;align-items:center;gap:5px;flex:1;white-space:nowrap;padding:0;margin:0}.list-context .text-button{font-size:.68rem}.note-selection-tools{padding:0;margin:0;border:0}.note-selection-tools:has(.selection-mode-heading){flex:1 0 100%;padding:8px;margin:0;background:#eaf1f7}.list-footer{display:none}
.note-list{padding:5px 9px 18px}.note-card{padding:10px 10px 9px;margin-bottom:3px;border-radius:8px;border-bottom-color:#e9eef3}.note-card h2{font-size:.9rem;line-height:1.5;letter-spacing:-.02em}.note-card p{font-size:.75rem;line-height:1.55;margin:4px 0 7px;max-height:2.33rem}.note-card.active{border-color:#bdd4e5;background:#eaf3fa;box-shadow:inset 3px 0 #4784ad}.note-card:hover{background:#f0f5fa}.card-foot{font-size:.64rem;color:#657e90}.card-tags{margin-bottom:5px}.card-tags span{background:#e8f1f2;color:#587f82}.card-pin{color:#617ab3}.card-star{color:#af7b28}.note-check{top:10px}
.editor-topbar{min-height:43px;padding:5px 20px;gap:8px;flex:none}.breadcrumb{flex:1;min-width:0;font-size:.7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6a8497;display:block}.breadcrumb>svg{width:14px;height:14px;vertical-align:-2px;margin-right:4px}.editor-actions{gap:5px;flex:none}
.editor-header{padding:9px 24px 5px}.note-title{font-size:1.38rem;line-height:1.4;padding:0;min-height:32px;letter-spacing:-.035em;background:transparent}.note-title[readonly]{cursor:text}
.note-details{margin:0 24px 6px;padding:10px 12px;background:#f4f8fb;border:1px solid #e0eaf1;border-radius:8px;max-height:30dvh;overflow:auto;flex:none}.note-details .note-organizer{margin:0;padding:0;gap:8px;flex-wrap:nowrap}.folder-select,.tags-input{font-size:.73rem;min-height:30px;padding:5px 7px;border-radius:5px;background:#fff}.folder-select{max-width:45%;min-width:0}.tags-input{flex:1;min-width:0;width:0}.editor-meta{margin:7px 0 0;font-size:.65rem;gap:5px 12px}.history-button{display:inline-flex;gap:4px;align-items:center;font-size:.67rem;color:#536f9c;padding:2px}.history-button svg{width:13px;height:13px}
.editor-controls{margin:0 24px;padding:4px 0 6px;gap:7px;min-height:36px;flex-wrap:nowrap;border-top:0;flex:none}.view-toggle{padding:2px;background:#edf3f7;display:flex;gap:1px;border:1px solid #e1eaf1}.view-toggle button{display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:.71rem;padding:4px 9px;line-height:1.4;color:#607b8e}.view-toggle button svg{width:13px;height:13px}.view-toggle button.active{background:#2b658e;color:#fff;box-shadow:none}.view-toggle button[data-mode=edit].active{background:#247b75}.toolbar-toggle{font-size:.69rem;display:inline-flex;align-items:center;gap:2px;color:#537890;margin-right:auto;padding:4px}.toolbar-toggle svg{width:12px;height:12px}.save-state{font-size:.63rem;white-space:nowrap;margin-left:auto;line-height:1.4;color:#517d6e}.save-state svg{width:12px;height:12px}
.format-toolbar{display:flex;align-items:center;gap:3px;margin:0 24px;padding:4px 0 6px;border-bottom:1px solid #e5edf2;flex:none;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.format-toolbar button{min-width:30px;min-height:30px;width:30px;height:30px;padding:5px;border:1px solid #dce8ef;border-radius:6px;background:#f3f8fc;color:#51758e;flex:none}.format-toolbar button[data-format=table],.format-toolbar button[data-action=attach]{background:#eaf5f2;color:#3e7a70;border-color:#d1e7df}.format-toolbar button[aria-pressed=true]{background:#d5e8f7;color:#235b82;border-color:#86b3d0}.format-toolbar button:hover{background:#e7f0f6}.format-toolbar button[aria-pressed=true]:hover{background:#d5e8f7}.format-toolbar .toolbar-divider{margin:0 2px;height:18px}
.editor-scroll{padding:0 24px 18px;overscroll-behavior:contain;scroll-padding:10px}.writing-area{min-height:180px;gap:20px}.body-edit-surface{flex:1;min-width:0;display:flex;flex-direction:column}.body-editor{padding:12px 0 16px;min-height:180px;font-size:1rem;line-height:1.85}.markdown-preview{padding:12px 0 18px;font-size:1rem;line-height:1.85}.markdown-preview>:first-child{margin-top:0}.markdown-preview h1,.markdown-preview h2,.markdown-preview h3{color:#284c67}.markdown-preview blockquote{background:#f1f7fa;border-left-color:#81b0c8}.markdown-preview table{font-size:.9rem}.markdown-preview th{background:#eaf3f8;color:#355f7c}.markdown-preview td,.markdown-preview th{padding:8px 11px;border-color:#d6e4ed}
.writing-area.split>.body-edit-surface{width:50%;padding-right:16px;border-right:1px solid #e3ebf1}.writing-area.split .body-editor{width:100%;border:0;padding-right:0}.writing-area.split>.markdown-preview{width:50%}.editor-statusbar{padding:5px 24px;font-size:.61rem;min-height:25px;flex:none;background:#fbfcfe}
.source-section{margin-top:12px;border-radius:8px}.source-section summary{padding:9px 12px;font-size:.75rem}.source-body.markdown-preview{padding:14px}.personal-label{margin:12px 0 0;font-size:.69rem}.attachment-section{padding:0;margin-top:12px;border-top:1px solid #e4ecf2}.attachment-heading{cursor:pointer;padding:10px 0;font-size:.72rem;display:flex;align-items:center;justify-content:flex-start;gap:5px;color:#5b8198;list-style:none}.attachment-heading::after{content:'›';margin-left:auto;transform:rotate(90deg)}.attachment-section[open]>.attachment-heading::after{transform:rotate(-90deg)}.attachment-heading::-webkit-details-marker{display:none}.attachment-heading svg{width:14px;height:14px}.attachment-drop{padding:10px;margin:8px 0 0!important;background:#eef7f5;color:#4b827a;border-color:#cce1dc}.attachment-drop svg{width:13px;height:13px}.trash-banner,.conflict-banner{margin:8px 24px;padding:8px 12px;font-size:.76rem}
/* Text surrounding a table remains Markdown; tables themselves are real cells. */
.table-editor{width:100%;padding-top:6px}.text-segment{display:block;width:100%;min-height:54px;padding:6px 0 12px;resize:none;overflow:hidden}.visual-table{border:1px solid #cbdfe9;border-radius:8px;background:#fff;overflow:hidden;margin:3px 0 8px}.table-tools{display:flex;justify-content:space-between;gap:6px;padding:6px 8px;align-items:center;background:#edf5f9;flex-wrap:wrap}.table-tools>span{font-size:.72rem;color:#35617c;display:flex;gap:6px;align-items:center}.table-tools small{color:#6b8899;font-size:.64rem}.table-tools>div{display:flex;flex-wrap:wrap;gap:4px}.table-tools button{font-size:.65rem;line-height:1.4;padding:4px 6px;min-height:27px;border-radius:5px;background:#fff;border:1px solid #d0e1eb;color:#3e6b86}.table-tools [data-table-action^=remove]{color:#a15c64;background:#fff6f7;border-color:#eddae0}.table-tools [data-table-action=plain]{color:#64748d;background:#f5f5fb}.table-grid-wrap{overflow-x:auto}.visual-table table{width:100%;border-collapse:collapse;table-layout:fixed;min-width:220px}.visual-table th,.visual-table td{border:1px solid #d6e4ec;padding:0;vertical-align:top;min-width:100px}.visual-table th{background:#f3f8fb}.visual-table th:focus-within,.visual-table td:focus-within{outline:2px solid #6eacc9;outline-offset:-2px}.table-cell{border:0;border-radius:0;background:transparent;display:block;width:100%;min-width:90px;min-height:36px;padding:7px 9px;resize:none;overflow:hidden;font-family:var(--font);font-size:.88rem;line-height:1.6;outline:none!important;color:#314f64}.table-cell::placeholder{color:#8ba1af}.visual-table th .table-cell{font-weight:600}.table-cell:focus{background:#f5fbff}
@media(max-width:1100px){.editor-topbar{padding-left:16px;padding-right:16px}.editor-header{padding:9px 18px 5px}.editor-controls,.format-toolbar{margin-left:18px;margin-right:18px}.note-details{margin-left:18px;margin-right:18px}.editor-scroll{padding-left:18px;padding-right:18px}.editor-statusbar{padding-left:18px;padding-right:18px}.split-toggle{display:none!important}}
@media(max-width:900px){.writing-area.split{flex-direction:column}.writing-area.split>.body-edit-surface,.writing-area.split>.markdown-preview{width:100%;border:0;padding-right:0}.list-header{padding:9px 12px 0}}
@media(max-width:650px){.sidebar{padding-top:18px}.list-header{padding:8px 14px 0}.list-heading{min-height:34px;margin-bottom:6px}.list-heading h1{font-size:1.05rem}.list-heading>.mobile-menu{display:inline-flex;margin-right:3px}.list-heading>.icon-button{width:34px;height:34px;min-width:34px}.search-box{min-height:36px}.list-tools{padding:4px 0 5px}.list-context{min-height:30px;font-size:.7rem}.collection-action{min-height:30px;font-size:.72rem}.note-list{padding:5px 9px 15px}.note-card{padding:11px 12px}.note-card h2{font-size:.98rem}.note-card p{font-size:.8rem;margin-bottom:6px}.card-foot{font-size:.68rem}.note-check{top:13px}.editor-topbar{padding:4px 12px;min-height:44px;gap:6px}.mobile-back{display:inline-flex}.editor-actions{gap:4px}.editor-actions .icon-button{width:32px;height:32px;min-width:32px}.breadcrumb{font-size:.66rem}.editor-header{padding:8px 16px 4px}.note-title{font-size:1.22rem;min-height:30px}.editor-controls{margin:0 16px;min-height:34px;padding:3px 0 5px;gap:4px}.view-toggle button{font-size:.7rem;padding:4px 8px}.toolbar-toggle{padding:3px;font-size:.66rem}.save-state{font-size:.6rem;max-width:95px}.format-toolbar{margin:0 16px;padding:4px 0 5px;gap:3px}.format-toolbar button{width:30px;height:30px;min-width:30px;min-height:30px}.format-toolbar .toolbar-divider{display:none}.editor-scroll{padding:0 16px 14px}.body-editor,.markdown-preview{font-size:1rem;line-height:1.85;padding-top:10px}.note-details{margin:0 16px 6px;padding:8px}.note-details .note-organizer{flex-wrap:wrap}.folder-select{max-width:100%;flex:1}.tags-input{min-width:120px}.editor-meta{font-size:.63rem}.editor-statusbar{padding:5px 16px}.source-section summary{font-size:.72rem}.source-body.markdown-preview{padding:10px}.trash-banner,.conflict-banner{margin:6px 16px}.table-cell{font-size:.87rem}.table-tools{padding:6px}.table-tools button{min-height:30px}.table-tools small{display:none}.text-segment{min-height:54px}.sidebar-foot{padding-bottom:env(safe-area-inset-bottom)}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
/* hidden always wins over component display rules, including details/toolbars. */
[hidden]{display:none!important}
.editor-actions .toggle-favorite,.editor-actions .toggle-pin{transition:none}
.icon-button.mobile-menu,.icon-button.mobile-back{display:none}
.text-segment:placeholder-shown{min-height:28px;padding-top:3px;padding-bottom:5px}
@media(max-width:900px){.icon-button.mobile-menu{display:inline-flex}}
@media(max-width:650px){.icon-button.mobile-back{display:inline-flex}}
/* 1.2 — line preview, natural-size grids and a full-height writing surface. */
.search-sort-row{display:flex;align-items:center;gap:5px}.search-sort-row .search-box{flex:1;min-width:0}.note-sort{width:92px;min-width:0;max-width:35%;height:34px;padding:3px 4px;background:#eaf3fa;color:#285f85;border:1px solid #cddfe9;border-radius:7px;font-size:.65rem;flex:none}
.trash-nav{margin-top:18px;padding-top:9px;border-top:1px solid var(--line)}.tag-section{margin-top:12px}.folder-tree-actions{display:flex;align-items:center;gap:4px;flex-wrap:nowrap!important}.folder-tree-actions .text-button{font-size:.65rem;white-space:nowrap;padding:4px}.folder-tree-actions .collection-action{font-size:.65rem;white-space:nowrap;padding:3px 5px;min-height:27px}.folder-tree-actions .moa-icon{width:12px;height:12px}
.note-card-shell{position:relative}.note-card-shell:has(.note-drag-handle) .note-card{padding-left:23px}.note-drag-handle{position:absolute;left:0;top:12px;width:23px;height:32px;z-index:1;padding:3px;color:#91a8b7;border-radius:5px;cursor:grab;touch-action:none;background:transparent}.note-drag-handle:hover,.note-drag-handle:focus-visible{color:#34769c;background:#e4eef6}.note-drag-handle svg{width:14px;height:17px}.reordering-notes{cursor:grabbing;user-select:none}.note-dragging{opacity:.45}.drop-before:before,.drop-after:after{content:'';position:absolute;height:3px;left:3px;right:3px;background:#348ab7;border-radius:2px;z-index:3}.drop-before:before{top:0}.drop-after:after{bottom:0}
.attachments-button{position:relative;background:#e6f4f0;color:#367b72}.attachments-button span{position:absolute;right:-3px;top:-3px;min-width:14px;height:14px;line-height:14px;font-size:9px;border-radius:7px;background:#347a72;color:white}.attachments-popup{min-height:150px}.attachment-summary{font-size:.8rem;color:#608497;margin:0 0 12px}.attachments-popup .attachment-drop{min-height:100px;width:100%;border:1px dashed #88bdb0;border-radius:9px}.format-toolbar button[data-format=timestamp]{color:#82703b;background:#fbf6e8;border-color:#e9dfbb}
.editor-scroll{display:flex;flex-direction:column;padding-bottom:8px}.writing-area{flex:1;align-items:stretch;min-height:0}.body-edit-surface{min-height:100%;flex:1}.live-editor{min-height:100%;padding:9px 0 80px;flex:1;cursor:text}.live-line{min-height:30px;max-width:100%;position:relative}.live-render.markdown-preview{padding:0;margin:0;min-height:30px;outline:none;overflow-wrap:anywhere}.live-render.markdown-preview>*{margin-top:0;margin-bottom:0}.live-render.markdown-preview p,.live-render.markdown-preview li{min-height:30px;line-height:1.85}.live-render.markdown-preview ul,.live-render.markdown-preview ol{padding-left:1.6em}.live-render.markdown-preview h1{font-size:1.8em;line-height:1.6}.live-render.markdown-preview h2{font-size:1.5em;line-height:1.6}.live-render.markdown-preview h3{font-size:1.2em;line-height:1.6}.live-render.markdown-preview pre{margin:4px 0}.live-render.markdown-preview hr{margin:14px 0}.live-render:focus-visible{outline:1px dashed #9ab9ca;outline-offset:1px}.live-input.text-segment{display:block;box-sizing:border-box;min-height:30px!important;width:100%;padding:0 0 0 3px!important;margin:0;border:0;border-left:2px solid #7baac4;resize:none;overflow:hidden;outline:none;box-shadow:none;border-radius:0;background:#f4f9fc;font-family:var(--font);font-size:1rem;line-height:1.85;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}.task-line{display:flex;align-items:flex-start;gap:8px}.task-line>.live-render,.task-line>.live-input{flex:1;min-width:0}.task-checkbox{appearance:auto;flex:none;width:16px;height:16px;accent-color:#2e8879;margin:7px 0 0;cursor:pointer}.preview-task{list-style:none}.preview-task>input,.preview-task>p>input{appearance:auto;accent-color:#2e8879;width:16px;height:16px;margin-right:8px;vertical-align:-2px;opacity:1}.task-line:has(.task-checkbox:checked) .live-render{color:#788e98}.visual-table{max-width:100%;width:max-content;flex:none;align-self:flex-start;margin:6px 0;box-sizing:border-box}.visual-table table{min-width:0;width:auto;max-width:none;table-layout:fixed}.visual-table th,.visual-table td{width:160px;min-width:160px}.visual-table .table-cell{width:100%;min-width:0;max-width:100%;min-height:36px;height:auto}.table-grid-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}.table-tools{padding:5px;gap:4px;flex-wrap:wrap}.table-tools>span{font-size:.65rem}.table-tools>div{gap:3px}.table-tools button{font-size:.6rem;padding:3px 4px;min-height:25px}
@media(max-width:650px){.search-sort-row{gap:4px}.note-sort{width:88px;height:36px;font-size:.65rem}.editor-actions{gap:3px}.editor-actions .icon-button{width:30px;height:30px;min-width:30px}.live-input.text-segment{font-size:1rem}.note-drag-handle{height:40px;top:10px}.live-editor{padding-bottom:60px}}

/* Unfocused cells display inline Markdown; focus exposes the cell source. */
.visual-table td,.visual-table th{position:relative}.cell-preview{position:absolute;inset:0;padding:7px 9px;pointer-events:none;font-family:var(--font);font-size:.88rem;line-height:1.6;overflow:hidden;overflow-wrap:anywhere;text-align:inherit;color:#314f64}.cell-preview p{margin:0}.table-cell:not(:focus){color:transparent}.table-cell:focus+.cell-preview{display:none}.cell-preview img{max-width:100%;max-height:50px}.cell-preview a{color:#397da3}
/* 1.2.1 — visible organization, content selection and resizable images. */
:root{font-synthesis:weight style}.markdown-preview strong,.markdown-preview b,.cell-preview strong,.cell-preview b{font-weight:700;font-synthesis:weight style}
.editor-controls{flex-wrap:wrap;gap:6px}.inline-organizer{display:flex;align-items:center;gap:6px;flex:1;min-width:240px}.inline-folder,.inline-tags{display:flex;gap:5px;align-items:center;min-width:0;background:#f1f7fb;border:1px solid #d6e5ef;border-radius:6px;padding:0 6px}.inline-folder{flex:0 1 42%}.inline-tags{flex:1}.inline-folder>svg,.inline-tags>svg{width:14px;height:14px;flex:none;color:#50849e}.inline-organizer .folder-select,.inline-organizer .tags-input{border:0;background:transparent;padding:4px 0;margin:0;min-height:29px;height:29px;max-width:100%;width:100%;font-size:.7rem;color:#3c627c}.inline-organizer .folder-select{flex:1;min-width:65px}.inline-organizer .tags-input{min-width:55px}.toolbar-toggle{margin-right:0}.status-updated{margin-left:auto;white-space:nowrap}.status-history{font-size:.63rem;display:inline-flex;align-items:center;gap:3px;color:#3d738d;padding:0 3px}.status-history svg{width:12px;height:12px}.editor-statusbar{gap:10px;align-items:center}.word-count{white-space:nowrap}.format-toolbar button[data-editor-action=select]{background:#eaf5f1;color:#347c6e}.content-selection-tools{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:6px;padding:6px 8px;background:#ecf5fc;border:1px solid #c2dcea;border-radius:6px;font:12px/1.5 var(--font);flex-wrap:wrap}.content-selection-tools span{margin-right:auto;color:#3f6c85}.content-selection-tools button{padding:3px 6px;border:1px solid #bad3e3;border-radius:4px;background:#fff;font-size:11px;color:#346787}.content-selection-tools [data-selection=delete],.table-tools [data-table-action=delete]{background:#fae8eb;border:1px solid #e9bcc5;color:#ab4354}.live-editor{outline:none}.live-line,.visual-table{position:relative}.visual-table{overflow:visible}.table-grid-wrap{border-radius:0 0 8px 8px}.table-tools{border-radius:8px 8px 0 0}.content-selected{background:#ddecf8!important;outline:1px solid #99bfd9;border-radius:3px}.content-selected .live-render,.content-selected .live-input{background:transparent}.selecting-content{user-select:none}.content-selected .live-input{pointer-events:none}.selecting-content .live-render{cursor:default}.live-render{user-select:text}
.markdown-preview img{max-width:min(100%,360px);max-height:280px;width:auto;height:auto;object-fit:contain;vertical-align:top}.markdown-preview img[data-moa-width]{max-width:100%;max-height:none;width:revert;height:auto}.resizable-image{position:relative;display:inline-flex;vertical-align:top;max-width:100%;line-height:0;border-radius:6px;margin:4px 0;outline:1px solid transparent}.resizable-image:hover,.resizable-image:focus-within,.resizable-image.image-selected{outline-color:#83b6d2}.resizable-image img{margin:0}.image-tools{position:absolute;left:5px;top:5px;display:flex;gap:4px;align-items:center;background:#ffffffed;border:1px solid #d4e4ef;border-radius:5px;padding:3px;opacity:0;z-index:3;line-height:1.4;white-space:nowrap;max-width:calc(100% - 10px);overflow-x:auto}.resizable-image:hover .image-tools,.resizable-image:focus-within .image-tools,.resizable-image.image-selected .image-tools{opacity:1}.image-tools button{font:10px/1.5 var(--font);padding:3px 5px;border-radius:3px;background:#edf5fa;color:#39728d;white-space:nowrap}.image-tools [data-image-action=delete]{background:#fbedef;color:#a44453}.image-width{font:10px/1.5 system-ui;color:#4f7487;padding:0 3px}.image-resize-handle{position:absolute;right:-1px;bottom:-1px;width:24px;height:24px;border:1px solid #3e87ad;border-radius:5px 0 5px 0;background:#3488b2;color:white;font:18px/1 system-ui;padding:1px;cursor:nwse-resize;touch-action:none;z-index:4}.resizable-image.resizing{user-select:none}.resizable-image.resizing img{pointer-events:none}
@media(max-width:1100px){.inline-organizer{min-width:220px}.inline-folder{flex-basis:45%}.status-updated{display:none}}
@media(max-width:650px){.editor-controls{gap:5px}.inline-organizer{order:3;flex:1 0 100%;min-width:0}.inline-organizer .folder-select,.inline-organizer .tags-input{font-size:.72rem;min-height:28px}.editor-controls .save-state{margin-left:auto}.editor-controls .toolbar-toggle{margin-right:0}.status-history{font-size:.61rem}.content-selection-tools{font-size:11px}.image-tools{opacity:1}.image-resize-handle{width:28px;height:28px}.editor-statusbar{gap:6px}}

.content-selection-tools{position:absolute;top:auto;bottom:36px;left:24px;right:24px;box-shadow:0 6px 22px #254f6a22}.resizable-image img[data-moa-width]{flex:none}
@media(max-width:650px){.content-selection-tools{left:16px;right:16px}}

.resizable-image{width:360px}.resizable-image img,.resizable-image img[data-moa-width]{display:block;width:100%!important;max-width:100%;max-height:none;height:auto;flex:none}

/* 1.2.2 — intentional range selection, one-row controls and a sticky format bar. */
.editor-scroll{padding:0;scroll-padding-top:50px;touch-action:auto}
.editor-scroll>.editor-topbar,.editor-scroll>.editor-header,.editor-scroll>.editor-controls,.editor-scroll>.trash-banner,.editor-scroll>.conflict-banner{flex:none}
.editor-content{display:flex;flex-direction:column;flex:1 0 auto;padding:0 24px 8px;min-height:200px;min-width:0}
.editor-content .writing-area{flex:1 0 auto}.live-editor{padding-left:0;touch-action:auto}
.editor-controls{flex-wrap:nowrap;align-items:center;gap:6px}.editor-controls .view-toggle{margin-left:0;flex:none}
.editor-controls .split-toggle{display:flex!important}
.inline-organizer{order:0;flex:1 1 0;min-width:0;gap:5px}
.inline-folder{flex:0.9 1 0}.inline-tags{flex:1.1 1 0}
.inline-organizer .folder-select,.inline-organizer .tags-input{min-width:0;width:100%;height:30px;min-height:30px;font-size:clamp(10px,.7rem,13px)}
.inline-folder,.inline-tags{padding:0 5px;gap:4px;overflow:hidden}
.inline-folder>svg,.inline-tags>svg{width:12px;height:12px}
.editor-controls .view-toggle button{font-size:clamp(10px,.7rem,13px);padding:4px 7px}
.editor-topbar>.toolbar-toggle{flex:none;white-space:nowrap;margin:0;padding:4px;font-size:11px}
.editor-statusbar .save-state{margin-left:auto;font-size:10px;max-width:none}
.editor-statusbar .status-updated{margin-left:0}
.format-toolbar{position:sticky;top:0;z-index:8;background:#fff;box-shadow:0 3px 5px #254f6a0a;touch-action:pan-x pinch-zoom;padding-top:5px;padding-bottom:5px}
.format-toolbar button.select-content{width:auto;gap:3px;padding:5px 7px;font-size:11px}
.selecting-content .live-line,.selecting-content .visual-table{cursor:crosshair}
.selecting-content .live-input,.selecting-content .table-cell{pointer-events:none}
.content-selection-tools{z-index:9}.content-selection-tools span{flex:1 1 100%;font-size:11px}
@media(max-width:1100px){.editor-content{padding-left:18px;padding-right:18px}.editor-controls .view-toggle button{padding-left:5px;padding-right:5px}.editor-controls .view-toggle button svg{display:none}}
@media(max-width:650px){
  .editor-controls{margin:0 12px;gap:4px;padding:3px 0 5px}
  .inline-organizer{flex:1 1 0;min-width:0;gap:4px;order:0}
  .editor-controls .view-toggle{padding:2px;gap:0}
  .editor-controls .view-toggle button{padding:5px 4px;line-height:1.4;min-height:29px}
  .inline-folder,.inline-tags{padding:0 4px;gap:3px}
  .inline-organizer .folder-select,.inline-organizer .tags-input{height:32px;min-height:32px}
  .editor-header{padding-left:12px;padding-right:12px}.format-toolbar{margin:0 12px}
  .editor-content{padding:0 12px 8px}.editor-scroll{padding:0}
  .editor-topbar{padding-left:10px;padding-right:10px;gap:4px}.editor-topbar>.toolbar-toggle{font-size:10px;padding:3px}
  .editor-statusbar{padding-left:12px;padding-right:12px;gap:5px}.editor-statusbar #note-version{font-size:10px}.editor-statusbar .word-count{display:none}
  .format-toolbar button{height:32px;min-height:32px}
}
