*{box-sizing:border-box}body{margin:0;color:#292a29;background:#faf9f6;font:15px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0;background:transparent;color:inherit;border-radius:8px;padding:9px 12px}button:hover{background:#ece8df}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #bc8c20;outline-offset:2px}[hidden]{display:none!important}.primary{background:#f2c44b!important;color:#3a2d0a;font-weight:600;padding:12px 17px}.brandmark{font-size:44px;background:#f2c44b;color:#5b4210;width:76px;height:76px;display:grid;place-items:center;border-radius:21px}.brandmark.small{font-size:26px;width:40px;height:40px;border-radius:12px}#app{display:flex;height:100dvh}aside{width:290px;flex-shrink:0;background:#f2efe8;border-right:1px solid #e6e2d9;display:flex;flex-direction:column;padding:26px 20px}aside header{display:flex;align-items:center;gap:12px;margin-bottom:32px}aside strong{font-size:23px;letter-spacing:-1px}.badge{font-size:9px;letter-spacing:1px;background:#e7e1d5;padding:4px 6px;border-radius:4px;color:#817765}#search{border:1px solid #dfd9cf;background:#fcfbf8;padding:11px;border-radius:9px;width:100%;margin:20px 0 15px}nav{display:grid;gap:4px}nav button{text-align:left}nav .selected{background:#e7e2d8}nav span{float:right}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:600;color:#8a8174;margin:27px 0 13px}#noteList{overflow:auto;flex:1}.noteitem{width:100%;text-align:left;padding:16px 13px;display:block;border-bottom:1px solid #e4dfd5;border-radius:9px}.noteitem.active{background:#fffdf8;box-shadow:0 2px 6px #44331409;border-color:transparent}.noteitem strong{font-size:14px;display:block;letter-spacing:0}.noteitem p{font-size:12px;color:#929087;margin:7px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.noteitem small{font-size:10px;color:#a39888}footer{padding-top:18px;font-size:11px;color:#888478;display:flex;align-items:center;gap:6px}footer button{margin-left:auto}.serverdot{width:6px;height:6px;background:#77a386;border-radius:50%}main{flex:1;min-width:0;overflow:auto;position:relative}.topbar{position:sticky;top:0;z-index:3;background:#faf9f6ed;backdrop-filter:blur(12px);display:flex;align-items:center;gap:8px;border-bottom:1px solid #e9e5dd;padding:15px 28px;min-height:66px;font-size:12px}#status{margin-left:auto;color:#78907a;font-size:11px}#breadcrumb{color:#898379}#menu{display:none}#empty{min-height:80%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center}h1{font-weight:600;letter-spacing:-1.3px;font-size:34px;margin:10px 0}#empty p{line-height:1.8;color:#8a847a}#empty .primary{margin:16px 0}.hint{font-size:11px;color:#9b9588}.notehead,#textPanel,#inkPanel{max-width:1000px;margin:auto;padding:0 56px}.notehead{padding-top:22px}#title{font-size:36px;font-weight:650;letter-spacing:-1px;border:0;background:transparent;width:100%;outline:none;padding:7px 0 24px}.tabs{display:flex;gap:8px;align-items:center;border-bottom:1px solid #e6e1d6;padding-bottom:14px}.tabs button{font-size:13px;padding:9px 18px}.tabs .active{background:#eee7d8;color:#7e6019}#layers{margin-left:auto;color:#a09a8d;font-size:11px}.formatbar{display:flex;align-items:center;gap:12px;margin-top:19px;color:#a19b8e;font-size:10px;letter-spacing:1px}#text{width:100%;min-height:55vh;resize:vertical;border:none;background:transparent;padding:24px 0;line-height:1.9;font-size:16px;color:#464640;outline:none}#preview{min-height:55vh;line-height:1.85;white-space:pre-wrap;padding-top:18px}#attachments{padding-bottom:32px;display:grid;gap:12px}#attachments img{max-width:100%;max-height:600px;object-fit:contain;border-radius:8px}#attachments a{color:#92711f}.tools{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:18px 0 10px;font-size:12px}.tools .active{background:#eadfbf}.divider{border-left:1px solid #ddd4c3;height:22px;margin:0 6px}.color{font-size:22px;padding:2px 7px;border:1px solid transparent}.color.chosen{border-color:#998c70}.color[data-color="#242424"]{color:#242424}.color[data-color="#b64434"]{color:#b64434}.color[data-color="#3465a4"]{color:#3465a4}.color[data-color="#38815c"]{color:#38815c}.color[data-color="#e5ac28"]{color:#e5ac28}select{border:1px solid #ded8cb;background:#faf8f3;border-radius:6px;padding:5px}.paperOptions{display:flex;justify-content:space-between;gap:14px;font-size:10px;color:#928c80;padding:8px 0 16px}#paper{margin-bottom:40px;background-color:white;background-image:radial-gradient(#d5d2cb .8px,transparent .8px);background-size:22px 22px;border:1px solid #e4dfd5;border-radius:8px;box-shadow:0 5px 22px #2c231008}canvas{width:100%;aspect-ratio:5/7;display:block;touch-action:none;user-select:none;-webkit-user-select:none}canvas.finger{touch-action:none}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#403b31;color:white;padding:16px 22px;border-radius:12px;max-width:90%;z-index:20}#login{height:100dvh;display:grid;place-items:center}#loginForm{max-width:440px;padding:32px;width:100%}#loginForm h1{font-size:30px}#loginForm p{line-height:1.6;color:#8a8174}#loginForm label{display:block;margin:20px 0 12px;color:#797467;font-size:12px}#loginForm input{display:block;width:100%;padding:12px;background:white;border:1px solid #ddd5c6;border-radius:8px;margin-top:8px}#loginForm .primary{width:100%}#loginError{color:#ad4030!important}@media(max-width:1050px){aside{width:240px;padding:20px 14px}.notehead,#textPanel,#inkPanel{padding-left:28px;padding-right:28px}#layers{display:none}.topbar{padding:12px 18px}}@media(max-width:760px){aside{display:none;position:fixed;inset:0 auto 0 0;width:280px;z-index:10;box-shadow:10px 0 30px #0002}aside.open{display:flex}#menu{display:block}#breadcrumb{display:none}.topbar{gap:2px;padding:12px 9px}.topbar button{font-size:11px;padding:8px}#title{font-size:29px}.notehead,#textPanel,#inkPanel{padding-left:18px;padding-right:18px}.paperOptions span{display:none}#empty{padding:24px}h1{font-size:28px}}
.aiBar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:22px;padding:10px 12px;background:#f2eee5;border-radius:10px;font-size:12px}.aiBar span{margin-right:auto;font-size:10px;color:#94876c}button:disabled{opacity:.45;cursor:wait}dialog{border:1px solid #e1d8c5;border-radius:18px;max-width:750px;width:90%;padding:28px;box-shadow:0 15px 80px #0003}dialog::backdrop{background:#24242466}dialog textarea{width:100%;min-height:40vh;padding:16px;line-height:1.7;border:1px solid #e3dece;border-radius:10px;margin:16px 0}dialog p{color:#867e6e;font-size:13px}dialog>div{text-align:right}
.comparison{display:grid;grid-template-columns:1fr 1fr;gap:14px;text-align:left!important;margin:16px 0}.comparison canvas{width:100%;height:auto;border:1px solid #e1d9ca;background:white}.comparison small{color:#94876c;font-size:10px;letter-spacing:1px}#inkDialog{max-width:1000px}

/* Keep Safari selection and callouts away from the ink surface. */
#paper,#paper canvas{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:none}

/* One document surface: ink stays visible while typing, text while drawing. */
.topbar .formatbar{margin-top:0}#textPanel .aiBar{margin-top:10px}.topbar .tools{padding-top:10px}
#paper{position:relative;overflow:hidden;background-color:#fffdf9;background-image:none;margin-bottom:12px;min-height:300px}
#pageText{position:absolute;inset:0 auto auto 0;width:1000px;transform-origin:top left;z-index:1;-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#paper #text,#paper #preview{width:1000px;margin:0;padding:40px;min-height:1400px;font-size:25px;line-height:1.65;border:0;border-radius:0;background:transparent;resize:none;overflow:hidden;-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;outline:none}
#paper #preview{white-space:pre-wrap}#paper #canvas{position:absolute;left:0;top:0;z-index:2;aspect-ratio:auto}
#paper.typing #canvas{pointer-events:none}#paper.drawing #pageText{pointer-events:none;-webkit-user-select:none;user-select:none}#paper.drawing #text{-webkit-user-select:none;user-select:none}
#extendPage{margin-bottom:35px;color:#92711f}.paperOptions{padding-bottom:10px}#attachments:empty{display:none}#attachments{padding-bottom:10px}

.tabs{flex-wrap:wrap}.tabs button{padding:9px 12px}#convertControls{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:12px;background:#f4edda;border-radius:9px;margin:8px 0}#convertControls span{flex:1;font-size:12px;color:#7e6019}#transcriptionText{width:100%;min-height:260px;padding:14px;border:1px solid #ded8cb;border-radius:8px;font:inherit;font-size:16px;line-height:1.6}

/* Familiar note controls, with more room for the document on a tablet. */
.formatbar{flex-wrap:wrap;gap:4px;letter-spacing:0;font-size:13px;padding:8px 0}.formatbar button{min-height:40px}.formatbar #previewBtn{margin-left:auto;color:#92711f}
#editor:not(.drawingMode) .tools,#editor:not(.drawingMode) .paperOptions{display:none}
.checkline{display:flex;align-items:flex-start;gap:16px;min-height:42px;cursor:pointer}.checkline input{appearance:none;-webkit-appearance:none;flex-shrink:0;width:27px;height:27px;border:2px solid #bc8c20;border-radius:50%;margin:7px 0 0;cursor:pointer}.checkline input:checked{background:#eabb3e}.checkline input:checked:after{content:'✓';display:block;color:#fff;text-align:center;font-size:22px;line-height:23px}.checkline.done span{text-decoration:line-through;color:#928c80}
#preview a{color:#957015}#preview code{background:#f1eadb;padding:2px 5px;border-radius:4px;font-size:.9em}#preview h1,#preview h2,#preview h3{margin:10px 0;font-size:1.3em;line-height:1.4}
@media(max-width:1050px){aside header{margin-bottom:18px}.notehead{padding-top:8px}#title{padding-bottom:15px}.aiBar{padding:4px 8px}.tabs{gap:2px}.tabs button{min-height:42px}}
@media(max-width:600px){.formatbar button{padding:8px}dialog{max-height:85dvh;overflow:auto;padding:18px}}
#paper.typing{touch-action:pan-x pan-y;-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* Preserve the contrast of typed text under translucent highlights. */
#paper #canvas{mix-blend-mode:multiply}
.noteRow{display:flex;align-items:flex-start;min-width:0}.noteRow .noteitem{min-width:0;flex:1}.treeToggle{padding:15px 3px;min-width:22px;color:#987220}
#pageFamily{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:8px}#pageFamily:empty{display:none}#pageFamily a,.noteLink{color:#9a7117;text-decoration:none;border-bottom:1px solid #d7c58e}#pageFamily a{padding:7px 10px;border-radius:7px;background:#f2ecdd;font-size:12px}
.chapter{margin:8px 0}.chapterTitle{cursor:pointer;color:#302e27;font-weight:650;line-height:1.5;white-space:normal;min-height:44px;padding:5px 0}.chapterTitle::marker{color:#b18a2b}.chapterTitle.level1{font-size:1.4em}.chapterTitle.level2{font-size:1.2em}.chapterTitle.level3{font-size:1.05em}.chapterBody{padding-left:12px}.chapterBody:empty{min-height:12px}
#outlineHint{font-size:12px;color:#8a7954;padding:9px 0}#outlineHint button{color:#957015}
#structureDialog>label{display:block;font-size:13px;margin:12px 0 6px}#structureTitle{width:100%;padding:12px;border:1px solid #d8ccac;border-radius:8px}#linkChoices{display:grid;max-height:220px;overflow:auto;gap:3px;margin:12px 0;text-align:left}#linkChoices button{text-align:left;padding:12px;background:#f7f3e9}.structureActions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.folderHeading{display:flex;align-items:center;gap:4px;margin-top:18px;color:#8a8174;font-size:10px;letter-spacing:1px}.folderHeading span{margin-right:auto}.folderHeading button{font-size:20px;padding:2px 7px;min-width:32px}#folderTree{max-height:230px;overflow:auto;flex-shrink:0}.folderRow{display:flex;align-items:center;min-width:0}.folderPick{font-size:12px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:9px 8px}.folderPick.selected{background:#e7e2d8;color:#6e5114}.folderToggle{padding:7px 2px;min-width:18px}.folderToggle:disabled{cursor:default;opacity:.4}#folderMindmap{font-size:11px;text-align:left;color:#92711f}#folderTree+.eyebrow{margin-top:15px}
#folderDialog label,#moveDialog label{display:grid;gap:7px;margin:16px 0;font-size:13px}#folderDialog input,#folderDialog select,#moveDialog select{width:100%;padding:12px;border:1px solid #dbd2bc;border-radius:8px}#folderError{color:#ad4030}#folderDelete{color:#ad4030}
#mapDialog{width:96vw;max-width:1500px;height:90dvh;max-height:96dvh;padding:20px;overflow:hidden}#mapDialog[open]{display:flex;flex-direction:column}#mapDialog header{display:flex;align-items:flex-start;gap:10px}#mapDialog header>div{flex:1;min-width:0}#mapDialog h2{font-size:20px;margin:0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#mapDialog p{margin:6px 0 12px}#mapClose{font-size:20px}.mapToolbar{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:12px;text-align:left!important;margin-bottom:10px}#mapStage{flex:1;min-height:200px;overflow:hidden;border:1px solid #e2d8c2;border-radius:12px;background:#fffdf8;text-align:left!important}#mapStage svg{display:block;touch-action:none;user-select:none;-webkit-user-select:none}#mapStage [data-map-node]{cursor:pointer}#mapStage [data-map-node]:focus-visible rect{stroke:#9a6c10;stroke-width:3}#mapStatus{font-size:11px!important;color:#8e836e;flex-shrink:0}
@media(max-width:760px){#mapDialog{padding:12px}#mapDialog h2{font-size:17px}.mapToolbar button{padding:8px}#folderTree{max-height:190px}.tabs #moveNote{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
#searchStatus{font-size:11px;color:#806d42;margin:0 0 12px}#backlinks{font-size:12px;margin:2px 0 12px;color:#806620}#backlinks summary{cursor:pointer;padding:8px 0}#backlinkList{display:flex;gap:8px;flex-wrap:wrap}#backlinkList a{color:#806620;padding:8px;border-radius:6px;background:#f4efdf;text-decoration:none}
#trashHint{padding:12px;border-radius:9px;background:#f8ecd4;color:#7b5c26;font-size:13px}#resolveConflict{background:#f6dfb3;color:#694716}.topbar{flex-wrap:wrap}.topbar button{white-space:nowrap}
#historyDialog,#conflictDialog{width:min(1100px,94vw);max-width:1100px;max-height:92dvh;overflow:auto}#historyDialog label{display:grid;gap:8px;text-align:left;font-size:13px}#revisionSelect{width:100%;padding:10px}.snapshotGrid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0;text-align:left!important}.snapshot{min-width:0;background:#faf7f0;padding:14px;border-radius:10px}.snapshot h3{margin:0 0 10px;font-size:14px}.snapshot strong{display:block;overflow-wrap:anywhere}.snapshot p{font-size:12px;overflow-wrap:anywhere}.snapshot textarea{width:100%;min-height:0;height:220px;resize:vertical;border:1px solid #ded6c6;border-radius:7px;padding:12px;font:inherit;font-size:14px;background:white}.snapshot canvas{width:100%;max-height:280px;object-fit:contain;background:white;border:1px solid #eee3cf}.recoveryActions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}#historyError,#conflictError{color:#a24b2e}
@media(max-width:700px){.snapshotGrid{grid-template-columns:1fr}.snapshot textarea{height:160px}.topbar{gap:4px}.topbar button{font-size:12px;padding:7px}}
.noteDragGrip{flex-shrink:0;align-self:center;font-size:22px;padding:12px 6px;color:#a0957b;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.noteDragging,.noteDragging *{cursor:grabbing!important}.folderPick.dropTarget{background:#f5d775!important;outline:2px solid #b88a1c;outline-offset:-2px}.noteDragging .folderPick{box-shadow:inset 0 0 0 1px #d9ca9c}.noteDragGhost{position:fixed;z-index:100;pointer-events:none;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:12px 16px;border-radius:10px;background:#f2c44b;color:#392d13;box-shadow:0 5px 20px #0003;font-size:14px}

.folderHeading #toggleFolders{margin-right:auto;text-align:left;font-size:11px;letter-spacing:1px;min-height:44px;padding:8px 3px;flex:1}

#speechDialog{width:min(700px,94vw);max-height:90dvh;overflow:auto}#speechDialog textarea{display:block;width:100%;min-height:200px}#speechDialog audio,#attachments audio{display:block;width:100%;max-width:540px;margin:12px 0}.speechActions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}#speechLabels label{display:block;margin:8px 0}#speechLabels input{max-width:220px}#speechDialog p{line-height:1.5}

/* Modes share the fixed header, independent of title and document length. */
.topbar{z-index:4}
.topbar>.tabs{flex:0 0 100%;width:100%;margin:0;padding:8px 0 0;border-bottom:0;border-top:1px solid #e6e1d6;gap:4px;background:transparent}
.topbar>.tabs button{font-size:13px;min-height:42px;padding:8px 10px}
#paper{scroll-margin-top:var(--topbar-height,160px)}

#inlineImages{position:absolute;inset:0;pointer-events:none;z-index:2}.inlineImage{position:absolute;left:40px;width:920px;background:#fffdf9;overflow:hidden;display:flex;align-items:flex-start}.inlineImage img,.inlineImagePreview img{display:block;max-width:100%;object-fit:contain;object-position:left top}.inlineImagePreview{overflow:hidden}

#reloadUpdate{background:#f2c44b;font-weight:600;color:#3a2d0a}

#paper.typing .resizableNoteImage{pointer-events:auto;cursor:zoom-in;touch-action:pan-y}#paper.typing .resizableNoteImage:focus-visible{outline:3px solid #bc8c20;outline-offset:3px}#imageSizeDialog{max-width:600px;max-height:85dvh;overflow:auto}#imageSizeRange{display:block;width:100%;min-height:44px;margin:10px 0}#imageSizeValue{display:block;color:#867e6e;font-size:13px}.imageSizePreview{height:230px;display:flex;align-items:center;justify-content:flex-start;overflow:hidden;background:#fffdf9;border:1px solid #e6e1d6;border-radius:8px;margin:15px 0}.imageSizePreview img{max-height:100%;object-fit:contain;object-position:left center}.imageSizeActions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-top:12px}#imageSizeError{color:#ad4030}

.topbar>#convertControls{flex:0 0 100%;width:100%;margin:0;padding:8px 10px}.topbar>#convertControls span{font-size:12px}.topbar>#convertControls button{min-height:42px;flex-shrink:0}

#imagePasteDialog{max-width:600px;max-height:85dvh;overflow:auto}#imagePasteTarget{min-height:100px;height:100px;font-size:16px;-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* Keep a usable note list below large imported folder trees. */
#sidebar{width:330px;padding:18px 16px;overflow:auto;min-height:0}
#sidebar>header{margin-bottom:16px}#sidebar>header,#sidebar>nav,#sidebar>.folderHeading,#sidebar>.eyebrow,#sidebar>footer,#sidebar>#newNote,#sidebar>#search{flex-shrink:0}
#sidebar #search{margin:12px 0}#folderTree{max-height:18dvh;min-height:0}#noteList{flex:1 0 0;min-height:min(280px,35dvh)}
#sidebar>.eyebrow{margin:14px 0 8px}#sidebar footer{padding-top:10px}
.noteitem strong{font-size:17px;line-height:1.35;overflow-wrap:anywhere}.noteitem p{font-size:14px;line-height:1.45;color:#68665f;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.noteitem small{font-size:12px;color:#776f61}
.folderPick{font-size:14px;min-height:38px}#searchStatus,#imageIndexStatus{font-size:12px;line-height:1.4;margin:6px 0;flex-shrink:0}
.markdownTable{max-width:100%;overflow-x:auto;margin:18px 0;white-space:normal}.markdownTable table{border-collapse:collapse;width:100%;font-size:.9em}.markdownTable th,.markdownTable td{border:1px solid #ddd5c5;padding:10px 14px;min-width:100px;vertical-align:top}.markdownTable th{background:#f2ecdf;text-align:left}
#preview pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:#f2ecdf;border-radius:8px}#preview blockquote{border-left:4px solid #cfb779;padding-left:20px;margin:10px 0;color:#716a5a}
@media(max-width:1050px){#sidebar{width:300px;padding:16px 12px}}
@media(max-width:760px){#sidebar{width:min(350px,92vw)}}

#sidebar nav{gap:0}#sidebar nav button{padding:7px 10px}#sidebar .folderHeading{margin-top:8px}#folderTree{max-height:min(150px,14dvh)}#folderMindmap{padding:5px 8px}#noteList{min-height:min(240px,32dvh)}#closeSidebar{display:none;margin-left:auto}
@media(max-width:760px){#closeSidebar{display:block;min-height:40px;min-width:40px}}

/* One scrollable hierarchy contains folders and their notes. */
#sidebar #folderTree{flex:1 1 auto;min-height:180px;max-height:none;overflow:auto;padding-bottom:12px}
.folderContents{padding-left:14px;border-left:1px solid #ddd5c6;margin-left:9px}.folderContents .noteitem{padding:10px 8px}.folderContents .noteitem strong{font-size:16px}.folderContents .noteitem p{margin:4px 0;font-size:13px;-webkit-line-clamp:1}.folderContents .noteitem small{font-size:11px}.folderRow{min-height:40px}.folderToggle{min-width:26px;min-height:36px}.folderEmpty{font-size:12px;color:#8a8174;margin:8px}.folderContents .noteRow{align-items:center}

.noteZoom{display:flex;align-items:center;gap:7px;margin-left:auto;min-height:42px;white-space:nowrap;font-size:12px}.noteZoom>span{font-size:11px}.noteZoom .zoomLarge{font-size:18px}.noteZoom input{width:110px;min-height:36px;margin:0;accent-color:#ac8120}.tabs .noteZoom button{font-size:12px;min-width:58px;padding:6px}.topbar{left:0}
@media(max-width:760px){.noteZoom{margin-left:0}.noteZoom input{width:100px}}

#aiDialog{max-height:88dvh;overflow:auto}#aiLayoutPreview{padding:20px;background:#fffdf9;border:1px solid #e5ddcc;border-radius:8px;font-size:16px;line-height:1.6;white-space:pre-wrap}#aiLayoutPreview .inlineImagePreview{height:auto!important;min-height:0}#aiLayoutPreview img{max-width:100%;height:auto!important;cursor:default}#aiLayoutPreview .chapterTitle{font-size:1.2em}#aiLayoutPreview pre{white-space:pre-wrap;overflow-wrap:anywhere}#aiSource{margin:14px 0}#aiSource summary{cursor:pointer;color:#8c6a20}.aiBar{flex-wrap:wrap}

/* Compact navigation keeps space for folders and notes. */
#sidebar header #newNote{padding:0;width:44px;height:44px;flex-shrink:0;cursor:pointer}
#sidebar .noteNav{display:flex;gap:6px}
#sidebar .noteNav button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:44px;padding:8px}
#sidebar .noteNav svg{width:22px;height:22px;flex-shrink:0}
#sidebar .noteNav #count{float:none;font-size:11px}
/* Separate source icons from archive/trash state. */
#sidebar #sourceNav{display:flex;gap:4px;flex-shrink:0;border-top:1px solid #ded9d0;padding-top:8px}
#sourceNav button{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:44px;padding:6px;font-size:23px}
#sourceNav svg{width:24px;height:24px}
#sourceNav [data-source=obsidian]{color:#7954b2}
#sourceNav [data-source=onenote]{color:#8535a5;font-weight:bold;opacity:.4}
#sourceNav button.selected{background:#ebe3d4;box-shadow:inset 0 -2px #b58529}
.sourceSummary{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:24px;font-size:12px;color:#716b60;flex-shrink:0}
.sourceSummary button{padding:4px 7px;font-size:12px}
#obsidianDialog{max-width:600px;width:calc(100% - 32px);max-height:88dvh;overflow:auto}
#obsidianDialog label{display:grid;gap:5px;margin:12px 0}
#obsidianReport{overflow-wrap:anywhere}
#obsidianReport ul{padding-left:20px}
#sourceSearchScope{display:flex;align-items:center;gap:6px;font-size:12px;flex-shrink:0}
#sourceSearchScope[hidden]{display:none}
#sourceSearchScope input{width:16px;height:16px;margin:0}
#adoptDialog{max-width:520px;width:calc(100% - 32px)}
#adoptDialog label{display:grid;gap:6px}
#adoptSource{background:#ede4fa;color:#613e86}

.folderRow .folderPick{flex:1;min-width:0;width:auto}
.folderRename{flex:0 0 40px;min-height:44px;padding:4px;font-size:23px;color:#817564;letter-spacing:0}
.folderRename:hover,.folderRename:focus-visible{background:#e7e2d8;color:#6e5114}

.noteTrash{flex:0 0 36px;min-height:44px;padding:6px;display:flex;align-items:center;justify-content:center;color:#927f72;font-size:22px}
.noteTrash svg{width:19px;height:19px}
.noteTrash:hover,.noteTrash:focus-visible{color:#b64434;background:#f3e4de}
.noteRow .noteitem{min-width:0;flex:1}

/* Use the available document width, with one vertical document scroll. */
.notehead,#textPanel,#inkPanel{max-width:none;width:100%;padding-left:clamp(8px,1.5vw,24px);padding-right:clamp(8px,1.5vw,24px)}
#paper{border:0;border-radius:0;box-shadow:none;background:transparent}
#paper #preview{overflow-wrap:anywhere}
.markdownTable{overflow-x:visible}
.markdownTable table{table-layout:fixed}
.markdownTable th,.markdownTable td{min-width:0;overflow-wrap:anywhere}
#menu{display:block}
@media(min-width:761px){#app.sidebarHidden #sidebar{display:none}}
#collapseFolders{display:flex;align-items:center;justify-content:center;min-height:44px}
#collapseFolders svg{width:20px;height:20px}
/* Compact typography for notes in the sidebar tree. */
#sidebar .noteitem strong{font-size:14px;line-height:1.3;font-weight:600}
#sidebar .noteitem p{font-size:12px;line-height:1.35;margin:3px 0}
#sidebar .noteitem small{font-size:11px}

.noteTitleRow{display:flex;align-items:center;gap:12px}.noteTitleRow #title{flex:1;min-width:0}.sourceBadge{font-size:12px;white-space:nowrap;padding:4px 8px;border-radius:7px;background:#ece8dd;color:#685d49}#noteToc{margin:8px 0 14px;border:1px solid #ddd7ca;border-radius:9px;padding:8px 12px}#noteToc>summary{cursor:pointer;font-size:13px;color:#685d49}#noteTocLinks{display:flex;flex-direction:column;align-items:stretch;max-height:220px;overflow:auto;margin-top:2px;gap:0}#noteTocLinks button{text-align:left;background:transparent;border:0;border-radius:5px;font-size:13px;line-height:1.3;padding:4px 8px;white-space:normal;overflow-wrap:anywhere}#noteTocLinks button:hover{background:#eee8db}#speechLiveText,#speechSummary{width:100%;box-sizing:border-box;resize:vertical}#speechLiveStatus,#speechSummaryStatus{font-size:13px;color:#685d49}#speechContentLabel{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#speechContent{max-width:100%}#speechLiveText{background:#f7f5ef}

.notehead,#textPanel,#inkPanel{padding-left:8px;padding-right:8px}#paper #text,#paper #preview{padding:16px 0;font-size:var(--note-font-size,16px)}#paper #text{white-space:pre-wrap;overflow-wrap:anywhere}#paper{width:100%}

.inlineImage{left:0;width:1000px}
#imageZoomDialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-width:none;max-height:none;padding:0;border:0;overflow:hidden;background:#f6f3ec}#imageZoomDialog[open]{display:flex;flex-direction:column}.imageZoomToolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:8px;border-bottom:1px solid #ded8cb;flex-shrink:0}.imageZoomToolbar input{flex:1;min-width:90px;max-width:320px;accent-color:#ac8120}.imageZoomToolbar output{min-width:58px;font-size:13px}#imageZoomClose{margin-left:auto}#imageZoomViewport{flex:1;min-height:0;overflow:auto;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}#imageZoomViewport:active{cursor:grabbing}#imageZoomStage{display:grid;place-items:center}#imageZoomPhoto{max-width:none;max-height:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;pointer-events:none}.imageZoomHint{font-size:12px;padding:8px;margin:0;text-align:center;color:#685d49}#imageOriginal{display:inline-block;margin:8px}
/* Compact phone controls: scroll tools sideways instead of covering the note. */
@media(max-width:760px){
 .topbar{padding:5px 8px;gap:2px;min-height:0}
 .topbar>button{font-size:11px;min-height:32px;padding:5px 7px}
 .topbar #status{font-size:10px}
 .topbar>.tabs{flex-wrap:nowrap;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;gap:2px;padding:3px 0 0;scrollbar-width:thin;overscroll-behavior-x:contain}
 .topbar>.tabs>button{flex:0 0 auto;font-size:11px;min-height:36px;padding:6px 8px;border-radius:6px}
 .topbar>.tabs .noteZoom{flex:0 0 auto;min-height:36px;gap:5px;font-size:10px;margin-left:6px}
 .topbar>.tabs .noteZoom input{width:80px;min-height:30px}
 .topbar>.tabs .noteZoom button{min-height:32px;min-width:48px;font-size:10px;padding:4px}
 .topbar>#convertControls{padding:4px 6px;gap:6px}
 .topbar>#convertControls span{font-size:11px}
 .topbar>#convertControls button{min-height:34px;font-size:11px;padding:5px 8px}
 .topbar .formatbar,#textPanel .aiBar,.topbar .tools{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:2px;padding:4px 0;scrollbar-width:thin;overscroll-behavior-x:contain}
 .topbar .formatbar button,#textPanel .aiBar button,.topbar .tools button{flex:0 0 auto;white-space:nowrap;font-size:11px;min-height:34px;padding:5px 7px}
 #textPanel .aiBar>span{flex:0 0 auto;font-size:10px;padding:0 6px}
 .topbar .tools .color{font-size:20px}
 .topbar .tools select{flex:0 0 auto;font-size:11px}
}

#sidebar header{gap:8px}#closeSidebar{display:block;flex:0 0 32px;min-width:32px;min-height:36px;padding:0;font-size:28px;line-height:1;margin-left:auto}#menu{display:flex;align-items:center;gap:6px;flex-shrink:0}.sidebarToggleLabel{font-size:11px}@media(max-width:760px){.sidebarToggleLabel{display:none}#closeSidebar{min-height:40px}}
/* A cell editor for Markdown tables, with a scrollable grid on phones. */
#tableDialog{width:min(1000px,96vw);max-width:96vw;max-height:92dvh;padding:20px;border:1px solid #ded8cb;border-radius:12px;background:#faf9f6}#tableDialog[open]{display:flex;flex-direction:column;gap:8px}#tableDialog h2{margin:0;font-size:21px}.tableHint{font-size:12px;line-height:1.5;color:#817765;margin:0}.tableToolbar,.tableActions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;flex-shrink:0}.tableToolbar button,.tableToolbar select{font-size:12px;min-height:36px}.tableToolbar label{display:flex;align-items:center;gap:5px;font-size:12px}.tableActions{justify-content:flex-end}.tableActions #tableDelete{margin-right:auto;color:#a24132}.tableActions button{min-height:40px}#tableSelection{font-size:12px;color:#817765;margin:0;flex-shrink:0}#tableGridScroll{overflow:auto;min-height:100px;max-height:58dvh;flex:1;border:1px solid #ddd5c5;border-radius:6px}#tableGrid{border-collapse:separate;border-spacing:0;min-width:100%;table-layout:fixed}#tableGrid th,#tableGrid td{padding:0;min-width:150px;border-right:1px solid #ddd5c5;border-bottom:1px solid #ddd5c5;vertical-align:top}#tableGrid th{background:#f2ecdf;position:sticky;top:0;z-index:1}#tableGrid textarea{display:block;width:100%;min-width:150px;min-height:42px;resize:none;margin:0;border:0;border-radius:0;outline:none;box-shadow:none;padding:9px;font-size:16px;line-height:1.5;background:transparent;color:#464640;overflow:hidden}#tableGrid th textarea{font-weight:600}#tableGrid textarea.selectedCell{background:#fff4cf;box-shadow:inset 0 0 0 2px #ba902c}#tableError{font-size:13px;color:#a24132;margin:0}#tableError:empty{display:none}.editNoteTable{font-size:12px;margin:5px 0;padding:5px 8px;color:#92711f}.markdownTable th,.markdownTable td{white-space:pre-wrap}@media(max-width:760px){#tableDialog{width:96vw;padding:12px;gap:6px}#tableDialog h2{font-size:18px}.tableToolbar{gap:2px}.tableToolbar button{font-size:11px;padding:5px 7px}.tableHint{font-size:11px}.tableActions button{font-size:12px;padding:7px 9px}#tableGridScroll{max-height:52dvh}}
.markdownTable:has(.tableTypingArea){margin-top:0;margin-bottom:0}.tableTypingArea{height:1.75em;width:100%;cursor:text;outline:none;border-radius:4px}.tableTypingArea:hover,.tableTypingArea:focus-visible{background:#eadfbf55;box-shadow:inset 2px 0 #bc8c20}#preview:has(.markdownTable) .previewTextLine{cursor:text}

#preview .editNoteTable{font-size:.8em;min-height:2.2em}

/* Search results use the full sidebar width rather than nested folder indents. */
#sidebar .searchResults .noteitem{padding:12px 8px}
#sidebar .searchResults .noteitem p{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.5;color:#514e47;margin:6px 0}
#sidebar .searchResults .noteitem strong{line-height:1.4}
.searchContext{display:block;font-size:11px;color:#766d5b;line-height:1.45;margin-top:4px;overflow-wrap:anywhere}
.searchResults mark{background:#ffe395;color:#30260e;border-radius:2px;font-weight:600}
.searchEmpty{font-size:13px;line-height:1.6;padding:12px 8px;color:#756d60}
.topbar .formatbar{flex-basis:100%;min-width:0;margin:0;padding:4px 0;border-top:1px solid #e6e1d6}
main:has(#editor[hidden]) .formatbar,main:has(#trashHint:not([hidden])) .formatbar{display:none}

/* Drawing controls share the sticky header with the mode and text controls. */
.topbar .tools{flex-basis:100%;min-width:0;margin:0;padding:4px 0;border-top:1px solid #e6e1d6}
main:not(:has(#editor.drawingMode:not([hidden]))) .topbar .tools,main:has(#trashHint:not([hidden])) .topbar .tools{display:none}
.topbar .tools .color{font-size:22px;min-width:34px;padding:2px 7px}
@media(max-width:760px){.topbar .tools .color{font-size:20px}}

.notePurge{font-size:17px;font-weight:600}
.notePurge:hover,.notePurge:focus-visible{color:#fff;background:#b64434}
.dangerAction{color:#b64434;border-color:#e3b9ae}
.dangerAction:hover,.dangerAction:focus-visible{color:#fff;background:#b64434;border-color:#b64434}
/* Zeichenraster (in allen Ansichten sichtbar, --grid = 25/1000 Seitenbreite) */
#paper.grid-kaestchen{background-image:linear-gradient(#d9e2ec 1px,transparent 1px),linear-gradient(90deg,#d9e2ec 1px,transparent 1px);background-size:var(--grid,22px) var(--grid,22px)}
#paper.grid-punkte{background-image:radial-gradient(#b9b5ac 1.1px,transparent 1.3px);background-size:var(--grid,22px) var(--grid,22px)}
#paper.grid-linien{background-image:linear-gradient(transparent calc(var(--grid,22px)*2 - 1px),#d9e2ec calc(var(--grid,22px)*2 - 1px));background-size:100% calc(var(--grid,22px)*2)}
.gridOption select{margin-left:4px;font-size:11px}
/* Vollbild / Fokusmodus */
body.focusMode aside,body.focusMode #menu,body.focusMode #breadcrumb,body.focusMode .topbar>button:not(#fullscreenBtn),body.focusMode .notehead,body.focusMode #layers{display:none!important}
body.focusMode .notehead,body.focusMode #textPanel,body.focusMode #inkPanel{max-width:none;padding-left:12px;padding-right:12px}

#fullscreenBtn[aria-pressed="true"]{background:#eadfbf}
#paperZoom{position:relative}#paperZoom #paper{transform-origin:0 0}
#inkZoomReset{font-size:11px;padding:4px 8px;background:#eadfbf}
#deleteSelection{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:32;background:#fff;color:#a24132;border:1px solid #e3b9ae;border-radius:22px;padding:10px 18px;box-shadow:0 6px 20px #2c231026}
/* Werkzeugleiste als Seitenleiste rechts über die volle Höhe (body.sideBar: ab 700 px immer, sonst im Vollbild), oben bleibt frei.
   Offen: das Blatt rückt um die Leistenbreite nach links (ab 700 px), eingeklappt: volle Breite. */
body.sideBar{--focus-bar:280px}
body.sideBar .topbar{position:fixed;top:0;right:0;bottom:0;left:auto;width:var(--focus-bar);z-index:30;display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start;align-items:center;gap:10px;padding:14px 12px;border:0;border-left:1px solid #e2dccf;border-radius:0;box-shadow:-8px 0 28px #2c231014;overflow-y:auto;transition:transform .2s ease}
body.sideBar .topbar>*{flex:none;flex-wrap:wrap;margin-left:0;max-width:100%}
body.sideBar .topbar .tabs,body.sideBar .topbar .formatbar,body.sideBar .topbar .tools,body.sideBar .topbar .aiBar,body.sideBar .topbar .paperOptions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px;border-bottom:1px solid #e9e4d9;padding:0 0 10px;margin:0;width:100%}
body.sideBar .topbar .tabs{border-bottom:1px solid #e9e4d9}
body.sideBar .topbar .noteZoom{width:100%}
body.sideBar .topbar #status{margin-left:0}
body.sideBar.toolbarHidden .topbar{display:flex;transform:translateX(100%);box-shadow:none;visibility:hidden;transition:transform .2s ease,visibility 0s .2s}
@media(min-width:1200px){body.sideBar:not(.toolbarHidden) main{padding-right:var(--focus-bar)}}
body.focusMode:not(.toolbarHidden) main{padding-right:var(--focus-bar)}
#focusToggle{position:fixed;top:50%;right:calc(var(--focus-bar,0px) - 1px);transform:translateY(-50%);z-index:31;width:30px;height:64px;border-radius:10px 0 0 10px;padding:0;font-size:18px;background:#f2c44b;color:#3a2d0a;box-shadow:-3px 0 10px #2c231026}
body.sideBar.toolbarHidden #focusToggle{right:0}
#focusToggle:hover{background:#e9b93a}
body.sideBar .topbar{touch-action:pan-y}
/* im Vollbild in die schwebende Leiste verschoben */
.topbar .aiBar.inFloatingBar,.topbar .paperOptions.inFloatingBar{margin:6px 0 0;padding:6px 10px;width:100%}
.topbar .paperOptions.inFloatingBar{align-items:center}
main:not(:has(#editor.drawingMode)) .topbar .paperOptions{display:none}
body.sideBar .topbar>button{padding:7px 9px;font-size:12px}body.sideBar .topbar #status{width:100%}
/* Lasche der linken Notizliste – Gegenstück zu #focusToggle */
#sidebarTab{position:fixed;top:50%;transform:translateY(-50%);z-index:31;width:30px;height:64px;border-radius:0 10px 10px 0;padding:0;font-size:18px;background:#f2c44b;color:#3a2d0a;box-shadow:3px 0 10px #2c231026}
#sidebarTab:hover{background:#e9b93a}
body.focusMode #sidebarTab{display:none}
@media(min-width:761px){#closeSidebar{display:none}body.sideBar .topbar #menu{display:none}}
#liveBtn.active{background:#f2c44b;color:#3a2d0a;font-weight:600}

/* === Icons (Linien-SVG als CSS-Maske, überstehen textContent-Wechsel; CSP erlaubt data:-Bilder) – 15.10.2026 === */
#importBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3 M7 8l5-5 5 5 M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E")}
#exportBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12 M7 10l5 5 5-5 M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E")}
#historyBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8 M3 3v5h5 M12 7v5l3 2'/%3E%3C/svg%3E")}
#trashBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18 M8 6V4h8v2 M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14 M10 11v6 M14 11v6'/%3E%3C/svg%3E")}
#archiveBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h18v4H3z M5 8v11a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8 M10 12h4'/%3E%3C/svg%3E")}
#resolveConflict{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l10 18H2z M12 10v4 M12 17.5v.5'/%3E%3C/svg%3E")}
#previewBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h6a4 4 0 0 1 4 4v12a3 3 0 0 0-3-3H2z M22 5h-6a4 4 0 0 0-4 4v12a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E")}
#textTab{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z M6 10h.01 M10 10h.01 M14 10h.01 M18 10h.01 M7 14h10'/%3E%3C/svg%3E")}
#inkTab{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.8 2.8 0 0 1 4 4L7.5 20.5 2 22l1.5-5.5z M15 5l4 4'/%3E%3C/svg%3E")}
#convertTab{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h2 M17 3h2a2 2 0 0 1 2 2v2 M21 17v2a2 2 0 0 1-2 2h-2 M7 21H5a2 2 0 0 1-2-2v-2 M7 8h8 M7 12h10 M7 16h6'/%3E%3C/svg%3E")}
#pasteImageBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z M21 15l-5-5L5 21'/%3E%3C/svg%3E")}
#recordBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z M19 10v2a7 7 0 0 1-14 0v-2 M12 19v3'/%3E%3C/svg%3E")}
#moveNote{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E")}
#mindmapBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M5 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M12 9v3 M12 12l-5.5 3.5 M12 12l5.5 3.5'/%3E%3C/svg%3E")}
#fullscreenBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3 M21 8V5a2 2 0 0 0-2-2h-3 M3 16v3a2 2 0 0 0 2 2h3 M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E")}
#inkZoomReset{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14z M21 21l-5-5 M11 8v6 M8 11h6'/%3E%3C/svg%3E")}
#tableBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M3 9h18 M3 15h18 M9 3v18 M15 3v18'/%3E%3C/svg%3E")}
[data-format="code"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 18l6-6-6-6 M8 6l-6 6 6 6'/%3E%3C/svg%3E")}
[data-format="list"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13 M8 12h13 M8 18h13 M3 6h.01 M3 12h.01 M3 18h.01'/%3E%3C/svg%3E")}
[data-format="checklist"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l2 2 4-4 M3 16l2 2 4-4 M13 6h8 M13 12h8 M13 18h8'/%3E%3C/svg%3E")}
[data-tool="pen"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9 M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E")}
[data-tool="marker"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l-6 6v3h9l3-3 M22 12l-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4'/%3E%3C/svg%3E")}
[data-tool="eraser"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 21l-4.3-4.3a1 1 0 0 1 0-1.4l10-10a1 1 0 0 1 1.4 0l5.6 5.6a1 1 0 0 1 0 1.4L11 21 M7 21h14 M5.5 12.5l6 6'/%3E%3C/svg%3E")}
[data-tool="select"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3a2 2 0 0 0-2 2 M19 3a2 2 0 0 1 2 2 M21 19a2 2 0 0 1-2 2 M5 21a2 2 0 0 1-2-2 M9 3h1 M14 3h1 M9 21h1 M14 21h1 M3 9v1 M21 9v1 M3 14v1 M21 14v1'/%3E%3C/svg%3E")}
#drawingAI{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E")}
#improve{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E")}
#layoutImprove{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E")}
#expand{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'/%3E%3C/svg%3E")}
#assistStop{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6h12v12H6z'/%3E%3C/svg%3E")}
#liveBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9z'/%3E%3C/svg%3E")}
#recognize{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h2 M17 3h2a2 2 0 0 1 2 2v2 M21 17v2a2 2 0 0 1-2 2h-2 M7 21H5a2 2 0 0 1-2-2v-2 M7 8h8 M7 12h10 M7 16h6'/%3E%3C/svg%3E")}
body.sideBar .topbar [data-format="heading"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4v16 M18 4v16 M6 12h12'/%3E%3C/svg%3E")}
body.sideBar .topbar [data-format="bold"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h7a4 4 0 0 1 0 8H6z M6 12h8a4 4 0 0 1 0 8H6z'/%3E%3C/svg%3E")}
body.sideBar .topbar [data-format="italic"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 4h-9 M14 20H5 M15 4L9 20'/%3E%3C/svg%3E")}
body.sideBar .topbar [data-format="indent"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l4 4-4 4 M11 6h10 M11 12h10 M11 18h10'/%3E%3C/svg%3E")}
body.sideBar .topbar [data-format="outdent"]{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8l-4 4 4 4 M11 6h10 M11 12h10 M11 18h10'/%3E%3C/svg%3E")}
body.sideBar .topbar #structureBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7 M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E")}
body.sideBar .topbar #undo{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14L4 9l5-5 M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E")}
body.sideBar .topbar #redo{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14l5-5-5-5 M20 9H9.5a5.5 5.5 0 0 0 0 11H13'/%3E%3C/svg%3E")}
:where(#importBtn,#exportBtn,#historyBtn,#trashBtn,#archiveBtn,#resolveConflict,#previewBtn,#textTab,#inkTab,#convertTab,#pasteImageBtn,#recordBtn,#moveNote,#reminderBtn,#mindmapBtn,#fullscreenBtn,#inkZoomReset,#tableBtn,[data-format="code"],[data-format="list"],[data-format="checklist"],[data-tool="pen"],[data-tool="marker"],[data-tool="eraser"],[data-tool="select"],#drawingAI,#improve,#layoutImprove,#expand,#translate,#assistStop,#liveBtn,#recognize)::before,:where(body.sideBar .topbar [data-format="heading"],body.sideBar .topbar [data-format="bold"],body.sideBar .topbar [data-format="italic"],body.sideBar .topbar [data-format="indent"],body.sideBar .topbar [data-format="outdent"],body.sideBar .topbar #structureBtn,body.sideBar .topbar #undo,body.sideBar .topbar #redo)::before{content:"";display:inline-block;width:1.2em;height:1.2em;vertical-align:-.25em;margin-right:.4em;background:currentColor;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat;flex:none}
/* === Rechte Leiste als Kachel-Palette (15.10.2026): Abschnitte, Segment-Umschalter, Kacheln mit Icon über Beschriftung,
   echte Farbkreise und Strichstärken, KI-Karte. Gilt nur in body.sideBar; oben (Handy) bleibt die Zeile. === */
.barLabel,.widthPicker{display:none}
body.sideBar{--bar-bg:#fbfaf6;--bar-card:#fff;--bar-line:#ece6d9;--bar-ink:#3d3a31;--bar-muted:#a0967f;--bar-accent:#f2c44b;--bar-accent-ink:#5b4210}
body.sideBar .topbar{background:linear-gradient(180deg,#fdfcf9 0%,#f7f4ec 100%);gap:8px;padding:16px 14px 28px;color:var(--bar-ink);scrollbar-width:thin}
body.sideBar .topbar .barLabel{display:flex;align-items:center;gap:8px;width:100%;margin:10px 2px 0;font-size:10px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;color:var(--bar-muted)}
body.sideBar .topbar .barLabel::after{content:"";flex:1;height:1px;background:var(--bar-line)}
body.sideBar .topbar #breadcrumb{display:block;width:100%;font-weight:650;font-size:13px;color:var(--bar-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.sideBar .topbar #status{display:inline-flex;align-items:center;gap:6px;width:auto;padding:4px 10px 4px 8px;border-radius:99px;background:#eef4ef;color:#4f7a5b;font-size:11px}
body.sideBar .topbar #status::before{content:"";width:7px;height:7px;border-radius:50%;background:#6aa57b;box-shadow:0 0 0 3px #6aa57b2e}
/* Kachel: Icon oben, Beschriftung darunter */
body.sideBar .topbar :is(#importBtn,#exportBtn,#historyBtn,#trashBtn,#archiveBtn,#resolveConflict),
body.sideBar .topbar .tabs>button:not(#previewBtn,#textTab,#inkTab),
body.sideBar .topbar .tools>button[data-tool]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:9px 4px 7px;min-height:58px;font-size:10.5px;line-height:1.15;text-align:center;background:var(--bar-card);border:1px solid var(--bar-line);border-radius:12px;box-shadow:0 1px 2px #2c23100a;transition:transform .12s ease,box-shadow .12s ease,background .12s}
body.sideBar .topbar :is(#importBtn,#exportBtn,#historyBtn,#trashBtn,#archiveBtn,#resolveConflict)::before,
body.sideBar .topbar .tabs>button:not(#previewBtn,#textTab,#inkTab)::before,
body.sideBar .topbar .tools>button[data-tool]::before{width:20px;height:20px;margin:0}
body.sideBar .topbar :is(#importBtn,#exportBtn,#historyBtn,#trashBtn,#archiveBtn,#resolveConflict,.tabs>button,.tools>button[data-tool]):hover{transform:translateY(-1px);box-shadow:0 4px 12px #2c231014;background:#fffdf7}
body.sideBar .topbar :is(#importBtn,#exportBtn,#historyBtn,#trashBtn,#archiveBtn,#resolveConflict){flex:1 1 0;min-width:0;padding:8px 2px 6px;min-height:52px;font-size:9.5px;overflow:hidden;text-overflow:ellipsis}
body.sideBar .topbar #trashBtn:hover{color:#b64434}
body.sideBar .topbar #resolveConflict{color:#b64434;border-color:#e7b9ae}
/* Ansicht: Segment-Umschalter Lesen | Tippen | Zeichnen, darunter Kacheln */
body.sideBar .topbar .tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;border:0;padding:0}
body.sideBar .topbar .tabs>:is(#previewBtn,#textTab,#inkTab){display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px 8px;font-size:11.5px;font-weight:600;border-radius:12px;background:#efe9dc;color:#7a705c;transition:background .15s,color .15s,box-shadow .15s}
body.sideBar .topbar .tabs>:is(#previewBtn,#textTab,#inkTab)::before{width:22px;height:22px;margin:0}
body.sideBar .topbar .tabs>:is(#previewBtn,#textTab,#inkTab).active{background:var(--bar-accent);color:var(--bar-accent-ink);box-shadow:0 6px 16px #e5ac2855,inset 0 -2px 0 #0000000f}
body.sideBar .topbar .tabs>#convertTab.active{background:#fff4d2;border-color:#ecd28a;color:var(--bar-accent-ink)}
body.sideBar .topbar .tabs>.noteZoom{grid-column:1/-1;margin:2px 0 0;padding:8px 10px;background:var(--bar-card);border:1px solid var(--bar-line);border-radius:12px;font-size:11px;gap:6px}
body.sideBar .topbar .tabs>.noteZoom label{font-weight:600;color:var(--bar-muted);font-size:10px;letter-spacing:.4px}
body.sideBar .topbar .tabs>.noteZoom input{flex:1;width:auto;min-width:0}
body.sideBar .topbar .tabs>#layers{display:none}
body.sideBar .topbar #inkZoomReset{background:#fff4d2;border-color:#ecd28a}
body.sideBar .topbar #recordBtn:hover{color:#b64434}
/* Format: Icon-Raster, Text unsichtbar (aria-label bleibt) */
body.sideBar .topbar .formatbar{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;border:0;padding:0;color:var(--bar-ink)}
body.sideBar .topbar .formatbar>button{display:flex;align-items:center;justify-content:center;height:40px;padding:0;font-size:0;background:var(--bar-card);border:1px solid var(--bar-line);border-radius:10px}
body.sideBar .topbar .formatbar>button::before{width:18px;height:18px;margin:0}
body.sideBar .topbar .formatbar>button:hover{background:#fff7df;border-color:#ecd28a}
/* Stift: Werkzeug-Kacheln, Farbkreise, Strichstärke als Punkte */
body.sideBar .topbar .tools{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;border:0;padding:0}
body.sideBar .topbar .tools>button[data-tool].active{background:var(--bar-accent);border-color:#e3b43a;color:var(--bar-accent-ink);box-shadow:0 6px 16px #e5ac2855}
body.sideBar .topbar .tools>.divider{display:none}
body.sideBar .topbar .tools .color{width:auto;height:34px;padding:0;font-size:0;border:0;border-radius:99px;background:var(--swatch);box-shadow:inset 0 0 0 1px #0000001a;transition:transform .12s,box-shadow .12s}
body.sideBar .topbar .tools .color:hover{transform:scale(1.06)}
body.sideBar .topbar .tools .color.chosen{box-shadow:0 0 0 3px var(--bar-bg),0 0 0 5px var(--swatch),0 4px 10px #0002}
body.sideBar .topbar .tools{grid-template-columns:repeat(20,1fr)}
body.sideBar .topbar .tools>button[data-tool]{grid-column:span 5}
body.sideBar .topbar .tools .color{grid-column:span 4;margin:4px 6px}
.color[data-color="#242424"]{--swatch:#242424}.color[data-color="#b64434"]{--swatch:#b64434}.color[data-color="#3465a4"]{--swatch:#3465a4}.color[data-color="#38815c"]{--swatch:#38815c}.color[data-color="#e5ac28"]{--swatch:#e5ac28}
body.sideBar .topbar .tools>#width{display:none}
body.sideBar .topbar .tools>.widthPicker{display:flex;grid-column:span 12;gap:4px;padding:3px;background:#efe9dc;border-radius:12px}
.widthPicker button{flex:1;display:flex;align-items:center;justify-content:center;height:36px;padding:0;border-radius:9px}
.widthPicker button i{display:block;width:22px;border-radius:9px;background:var(--bar-ink,#333)}
.widthPicker button.active{background:#fff;box-shadow:0 2px 6px #2c23101a}
body.sideBar .topbar .tools>:is(#undo,#redo){grid-column:span 4;height:42px;padding:0;font-size:0;display:flex;align-items:center;justify-content:center;background:var(--bar-card);border:1px solid var(--bar-line);border-radius:12px}
body.sideBar .topbar .tools>:is(#undo,#redo)::before{width:19px;height:19px;margin:0}
body.sideBar .topbar .tools>#drawingAI{grid-column:1/-1}
/* KI-Karte */
body.sideBar .topbar #drawingAI,body.sideBar .topbar .aiBar>button{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;font-size:12px;font-weight:600;text-align:left;color:#4b3a7a;background:#ffffffb3;border:1px solid #e3d9f5;border-radius:11px}
body.sideBar .topbar #drawingAI{background:linear-gradient(120deg,#fff6dc,#f1eaff);border-color:#e6dcf3}
body.sideBar .topbar :is(#drawingAI,.aiBar>button):hover{background:#fff;box-shadow:0 4px 14px #6b4fd01f}
body.sideBar .topbar .aiBar{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:12px;border:1px solid #e6dcf3;border-radius:16px;background:radial-gradient(120% 90% at 0% 0%,#fff3cf 0%,transparent 55%),radial-gradient(120% 100% at 100% 100%,#ebe2ff 0%,transparent 60%),#fbf9ff}
body.sideBar .topbar .aiBar>.barLabel{margin:0 0 2px;color:#7b62b8}
body.sideBar .topbar .aiBar>.barLabel::after{background:#e3d9f5}
body.sideBar .topbar .aiBar>#aiState{margin:0;font-size:10.5px;color:#8a7cb0}
body.sideBar .topbar .aiBar>#assistStop{color:#b64434;border-color:#efc6bd}
/* Blatt-Optionen: Schalter */
body.sideBar .topbar .paperOptions{display:flex;flex-direction:column;align-items:stretch;gap:6px;border:0;padding:0}
body.sideBar .topbar .paperOptions>.barLabel{margin-top:10px}
body.sideBar .topbar .paperOptions>label{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;font-size:12px;color:var(--bar-ink);background:var(--bar-card);border:1px solid var(--bar-line);border-radius:12px}
body.sideBar .topbar .paperOptions>label:has(#finger){flex-direction:row-reverse;justify-content:flex-end}
body.sideBar .topbar #finger{appearance:none;-webkit-appearance:none;margin:0 0 0 auto;width:38px;height:22px;border-radius:99px;background:#ddd5c4;position:relative;cursor:pointer;transition:background .15s;flex:none}
body.sideBar .topbar #finger::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:left .15s}
body.sideBar .topbar #finger:checked{background:var(--bar-accent)}
body.sideBar .topbar #finger:checked::after{left:18px}
body.sideBar .topbar .paperOptions>.gridOption select{margin:0;padding:5px 8px;border-radius:8px;border-color:var(--bar-line);background:#faf8f3}
body.sideBar .topbar .paperOptions>#liveBtn{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:12px;font-weight:600;background:var(--bar-card);border:1px solid var(--bar-line);border-radius:12px}
body.sideBar .topbar .paperOptions>#liveBtn.active{background:linear-gradient(120deg,#f2c44b,#f7d97c);border-color:#e3b43a;color:var(--bar-accent-ink);box-shadow:0 6px 16px #e5ac2855}
body.sideBar .topbar .paperOptions>span{font-size:10.5px;line-height:1.4;color:var(--bar-muted);padding:0 2px}
body.sideBar .topbar>#reloadUpdate{width:100%;background:var(--bar-accent);color:var(--bar-accent-ink);font-weight:600;border-radius:12px}
@media (prefers-reduced-motion:reduce){body.sideBar .topbar *{transition:none!important}}
body.sideBar .topbar :is(#importBtn,#exportBtn,#historyBtn){flex:1 1 calc(33.33% - 6px)}
body.sideBar .topbar :is(#trashBtn,#archiveBtn,#resolveConflict){flex:1 1 calc(50% - 4px);flex-direction:row;min-height:40px;gap:8px;font-size:11px}
body.sideBar .topbar :is(#trashBtn,#archiveBtn,#resolveConflict)::before{width:17px;height:17px}
main:not(:has(#editor.drawingMode:not([hidden]))) .topbar .barLabel.forTools,main:has(#editor[hidden]) .topbar .barLabel:not(.forNote){display:none}
body.sideBar .topbar .tools>*{min-width:0}body.sideBar .topbar .tools>button[data-tool]{overflow:hidden;padding-left:2px;padding-right:2px}
body.sideBar .topbar .tabs{grid-template-columns:repeat(3,minmax(0,1fr))}body.sideBar .topbar .formatbar{grid-template-columns:repeat(5,minmax(0,1fr))}body.sideBar .topbar .tools{grid-template-columns:repeat(20,minmax(0,1fr))}
body.sideBar .topbar .tabs>*{min-width:0;overflow-wrap:anywhere}
body.focusMode .topbar .barLabel.forNote{display:none}
body.sideBar .topbar .paperOptions>*{min-width:0;max-width:100%}
/* Gastansicht: Knopf neben „Live“ und Dialog mit dem Link */
#guestBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
#guestBtn::before{content:"";display:inline-block;width:1.2em;height:1.2em;vertical-align:-.25em;margin-right:.4em;background:currentColor;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat;flex:none}
#guestBtn.active{background:#e3f1e7;color:#2d6f45;font-weight:600}
#guestBtn.active::after{content:"";width:8px;height:8px;border-radius:50%;background:#3f9a62;margin-left:6px;display:inline-block;animation:guestPulse 1.6s infinite}
@keyframes guestPulse{0%{box-shadow:0 0 0 0 #3f9a6288}70%{box-shadow:0 0 0 7px #3f9a6200}100%{box-shadow:0 0 0 0 #3f9a6200}}
body.sideBar .topbar>#guestBtn{width:100%;justify-content:center;display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:12px;font-weight:600;background:var(--bar-card);border:1px solid var(--bar-line);border-radius:12px}
body.sideBar .topbar>#guestBtn.active{background:linear-gradient(120deg,#d8efdf,#eaf6ee);border-color:#9fd0ae;color:#2d6f45}
#guestDialog{max-width:520px;width:calc(100% - 32px);border:1px solid #e6e1d6;border-radius:14px;padding:22px}
#guestDialog h2{margin:0 0 8px}#guestDialog p{color:#6f685c;line-height:1.5}
.guestLinkRow{display:flex;gap:8px}.guestLinkRow input{flex:1;min-width:0;padding:10px;border:1px solid #ddd5c6;border-radius:8px;background:#faf8f3;font-size:13px}
.guestActions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}.guestActions label{margin-right:auto;font-size:12px;color:#6f685c;display:flex;gap:6px;align-items:center}
#guestStop{color:#9a3b2b}
#guestQr{display:block;margin:14px auto 4px;padding:0;width:200px;height:200px;border:1px solid #e6e1d6;border-radius:12px;overflow:hidden;background:#fff;cursor:zoom-in}#guestQr svg{display:block;width:100%;height:100%}
.guestQrHint{text-align:center;font-size:12px;margin:0 0 6px}
#guestQrBig{width:fit-content;max-width:95vw;max-height:none;border:0;padding:24px;background:#fff;border-radius:18px;text-align:center;cursor:zoom-out;max-width:none}#guestQrBig::backdrop{background:#000c}
#guestQrBig svg{display:block;margin:0 auto;width:min(80vw,80vh);height:min(80vw,80vh)}#guestQrBig p{margin:12px 0 0;color:#555;font-size:14px}

/* Papierkorb leeren */
#emptyTrash{width:100%;margin:4px 0 10px;padding:9px 12px;border:1px solid #e3c2ba;border-radius:10px;background:#fbefec;color:#9a3b2b;font-size:12px;font-weight:600;text-align:center}#emptyTrash:hover{background:#f6e0da}#emptyTrash:disabled{opacity:.5;cursor:progress}

/* ===== Linke Leiste als Palette (17.10.2026) – passend zur rechten Leiste ===== */
#app #sidebar{--l-card:#fff;--l-line:#e9e2d3;--l-ink:#34312a;--l-muted:#9c927d;--l-accent:#f2c44b;--l-accent-ink:#5b4210;--l-soft:#efe9dc;
 background:linear-gradient(180deg,#fbf9f4 0%,#f4f0e6 100%);border-right:1px solid var(--l-line);gap:0}
#app #sidebar>header{margin-bottom:12px;align-items:center}
#app #sidebar>header strong{font-size:22px;letter-spacing:-.8px;color:var(--l-ink)}
#app #sidebar>header .badge{background:var(--l-soft);color:var(--l-muted);border-radius:6px}
#app #sidebar header #newNote{width:40px;height:40px;border-radius:12px;font-size:22px;box-shadow:0 4px 12px #e5ac2840}
/* Neue Notiz */
#newNoteWide{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;flex-shrink:0;margin:0 0 12px;padding:11px 14px;border-radius:12px;font-weight:650;font-size:14px;color:var(--l-accent-ink);
 background:linear-gradient(120deg,#f2c44b,#f7d97c);box-shadow:0 6px 16px #e5ac2840,inset 0 1px 0 #fff8}
#newNoteWide::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat;
 --ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
#newNoteWide:hover{background:linear-gradient(120deg,#ecb93a,#f4d06a)}#newNoteWide:active{transform:translateY(1px)}
/* Suche mit Lupe */
#app #sidebar #search{margin:0 0 12px;padding:11px 12px 11px 38px;border-radius:12px;border:1px solid var(--l-line);box-shadow:0 1px 2px #2c23100a;
 background:#fff url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0967f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center/17px no-repeat}
#app #sidebar #search:focus{outline:none;border-color:#e3b43a;box-shadow:0 0 0 3px #f2c44b40}
/* Abschnittstitel wie rechts */
#sidebar .sideLabel{display:flex;align-items:center;gap:8px;margin:6px 2px 7px;font-size:10px;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;color:var(--l-muted);flex-shrink:0}
#sidebar .sideLabel::after{content:"";flex:1;height:1px;background:var(--l-line)}
/* Ansicht: Segment-Umschalter mit Beschriftung */
#app #sidebar .noteNav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;margin-bottom:10px;background:var(--l-soft);border-radius:12px}
#app #sidebar .noteNav button{flex-direction:column;gap:3px;min-height:52px;padding:7px 4px 6px;border-radius:9px;color:#7d735f;font-size:10.5px;font-weight:600;position:relative;background:transparent}
#app #sidebar .noteNav button::after{content:attr(data-label)}
#app #sidebar .noteNav button svg{width:20px;height:20px}
#app #sidebar .noteNav button:hover{background:#ffffff90}
#app #sidebar .noteNav button.selected{background:#fff;color:var(--l-accent-ink);box-shadow:0 2px 8px #2c231014}
#app #sidebar .noteNav #count{position:absolute;top:5px;right:8px;min-width:18px;padding:1px 5px;border-radius:99px;background:var(--l-accent);color:var(--l-accent-ink);font-size:9.5px;font-weight:700;line-height:14px}
#app #sidebar .noteNav #count:empty{display:none}
/* Quellen als Kacheln */
#app #sidebar #sourceNav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;border:0;padding:0;margin-bottom:6px}
#app #sidebar #sourceNav button{display:grid;place-items:center;height:40px;padding:0;border-radius:11px;background:var(--l-card);border:1px solid var(--l-line);font-size:17px;transition:transform .12s,box-shadow .12s}
#app #sidebar #sourceNav button svg{width:20px;height:20px}
#app #sidebar #sourceNav button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 10px #2c231014}
#app #sidebar #sourceNav button[aria-pressed="true"]{background:linear-gradient(120deg,#f2c44b,#f7d97c);border-color:#e3b43a;color:var(--l-accent-ink);box-shadow:0 4px 12px #e5ac2840}
#app #sidebar #sourceNav button:disabled{opacity:.45}
#app #sidebar .sourceSummary{display:flex;align-items:center;gap:6px;margin:0 2px 4px;font-size:11.5px;color:var(--l-muted)}
#app #sidebar .sourceSummary #sourceLabel{font-weight:600;color:#6f6553}
/* Ordner & Notizen */
#app #sidebar .folderHeading{margin:10px 0 6px;padding:0 2px;gap:2px}
#app #sidebar .folderHeading #toggleFolders{flex:1;text-align:left;padding:4px 2px;font-size:10px;font-weight:700;letter-spacing:1.6px;color:var(--l-muted);background:none}
#app #sidebar .folderHeading button:not(#toggleFolders){width:30px;height:30px;min-width:30px;padding:0;display:grid;place-items:center;border-radius:9px;font-size:17px;color:#7d735f}
#app #sidebar .folderHeading button:not(#toggleFolders):hover{background:#fff;box-shadow:0 2px 8px #2c231012}
#app #sidebar .folderHeading svg{width:17px;height:17px}
#app #sidebar #folderTree{padding:2px 2px 12px}
#app #sidebar .folderRow{display:flex;align-items:center;gap:2px;border-radius:10px;margin:1px 0}
#app #sidebar .folderToggle{width:22px;min-width:22px;padding:6px 0;font-size:11px;color:#b3a891;background:none}
#app #sidebar .folderPick{display:flex;align-items:center;gap:8px;min-height:36px;padding:7px 10px;border-radius:10px;font-size:13.5px;font-weight:600;color:var(--l-ink);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#app #sidebar .folderPick::before{content:"";flex:none;width:17px;height:17px;background:#c9a54a;-webkit-mask:var(--fico) center/contain no-repeat;mask:var(--fico) center/contain no-repeat;
 --fico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 6.5A2.5 2.5 0 0 1 5.5 4h4l2 2.2h7A2.5 2.5 0 0 1 21 8.7v8.8a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 17.5z'/%3E%3C/svg%3E")}
#app #sidebar .folderPick[data-folder="none"]::before{background:#b8ae9a}
#app #sidebar .folderPick:hover{background:#ffffffb0}
#app #sidebar .folderPick.selected{background:#fff;color:var(--l-accent-ink);box-shadow:0 2px 8px #2c231012,inset 3px 0 0 var(--l-accent)}
#app #sidebar .folderRename{width:28px;min-width:28px;height:28px;padding:0;border-radius:8px;color:#9c927d}
#app #sidebar .folderContents{margin-left:10px;padding-left:8px;border-left:1.5px solid #e6dfcf}
#app #sidebar .folderEmpty{font-size:11.5px;color:#b3a891;margin:4px 10px 8px}
/* Notizkarten */
#app #sidebar .noteRow{align-items:center;gap:0;margin:2px 0;border-radius:12px}
#app #sidebar .noteitem{padding:9px 11px;border:1px solid transparent;border-bottom:1px solid transparent;border-radius:12px;background:transparent;transition:background .12s,box-shadow .12s}
#app #sidebar .noteitem:hover{background:#ffffffc0}
#app #sidebar .noteitem.active{background:#fff;border-color:var(--l-line);box-shadow:0 4px 14px #2c231012,inset 3px 0 0 var(--l-accent)}
#app #sidebar .noteitem strong{font-size:13.5px;font-weight:650;color:var(--l-ink)}
#app #sidebar .noteitem p{font-size:12px;color:#8f8674;margin:2px 0 5px}
#app #sidebar .noteitem small{display:inline-block;font-size:10px;font-weight:600;color:#a0967f;background:var(--l-soft);padding:1px 7px;border-radius:99px}
#app #sidebar .noteitem.active small{background:#fbf0cf;color:#8a6a14}
#app #sidebar .treeToggle{color:#c9a54a;padding:10px 2px}
#app #sidebar .noteDragGrip{font-size:18px;padding:8px 4px;color:#b8ae9a}
#app #sidebar .noteTrash{width:30px;min-width:30px;height:30px;padding:0;display:grid;place-items:center;border-radius:9px;color:#b09a90}
#app #sidebar .noteTrash:hover{background:#fbe9e4;color:#9a3b2b}
#app #sidebar .noteTrash svg{width:17px;height:17px}
/* Griff und Löschen nur beim Überfahren (Maus); auf dem iPad dezent sichtbar */
@media (hover:hover){#app #sidebar :is(.noteRow,.folderRow) :is(.noteDragGrip,.noteTrash,.folderRename){opacity:0;transition:opacity .12s}
 #app #sidebar :is(.noteRow,.folderRow):is(:hover,:focus-within) :is(.noteDragGrip,.noteTrash,.folderRename){opacity:1}}
@media (hover:none){#app #sidebar :is(.noteDragGrip,.noteTrash,.folderRename){opacity:.55}}
/* Mindmap-Link und Fußzeile */
#app #sidebar #folderMindmap{display:inline-flex;align-items:center;gap:6px;margin:6px 2px;padding:6px 11px;border-radius:99px;background:#fff;border:1px solid var(--l-line);font-size:11.5px;font-weight:600;color:#8a6a14}
#app #sidebar footer{margin-top:8px;padding:10px 12px;border:1px solid var(--l-line);border-radius:12px;background:#ffffffc8;font-size:11.5px;color:#7d735f;gap:8px}
#app #sidebar footer .serverdot{width:8px;height:8px;background:#5fa877;box-shadow:0 0 0 3px #5fa87726}
#app #sidebar footer.offline .serverdot{background:#d08a2c;box-shadow:0 0 0 3px #d08a2c26}
#app #sidebar #logout{width:30px;height:30px;min-width:30px;padding:0;display:grid;place-items:center;border-radius:9px;font-size:0;color:#9c927d}
#app #sidebar #logout::before{content:"";width:17px;height:17px;background:currentColor;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat;
 --ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H3'/%3E%3C/svg%3E")}
#app #sidebar #logout:hover{background:#fff;color:#9a3b2b}
#app #sidebar #emptyTrash{border-radius:12px}
@media (prefers-reduced-motion:reduce){#app #sidebar *{transition:none!important}}
#app #sidebar #folderMindmap{align-self:flex-start;width:auto;flex-shrink:0}
#app #sidebar footer{min-height:0;align-items:center;padding:8px 8px 8px 12px}

/* Strichstärke: Schieberegler + Zoom-Ausgleich (17.10.2026) */
.widthSlider{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;font-size:11px;color:#8a8174}
.widthSlider input[type=range]{flex:1;min-width:90px;accent-color:#d9a92e}
.widthSlider output{min-width:30px;text-align:right;font-variant-numeric:tabular-nums;font-weight:600;color:#6f6553}
.widthSlider{flex-wrap:nowrap}.widthSlider .widthZoom{display:flex;align-items:center;gap:4px;white-space:nowrap;padding:3px 8px;border-radius:99px;border:1px solid #e3dccd;background:#fff;cursor:pointer;font-weight:600}
.widthSlider .widthZoom input{position:absolute;opacity:0;width:1px;height:1px}.widthSlider .widthZoom:has(input:checked){background:#fbf0cf;border-color:#e3b43a;color:#7a5c12}.widthSlider .widthZoom:has(input:focus-visible){outline:2px solid #bc8c20}
body.sideBar .topbar .tools>.widthSlider{grid-column:1/-1;padding:0 2px}
.widthPicker button i{min-height:1px}
/* Platz für den Regler: Farbreihe etwas flacher, damit der Stiftblock weiter in kleine Fenster passt */
body.sideBar .topbar .tools .color{margin:2px 7px;height:30px}
body.sideBar .topbar .tools>.widthSlider{margin:-2px 0}
body.sideBar .topbar .tools>#drawingAI{padding-top:8px;padding-bottom:8px}

/* ===== Linke Leiste kompakt: Fokus auf die Ordnerstruktur (17.10.2026) ===== */
#app #sidebar{padding:12px 12px 10px}
#app #sidebar>header{margin-bottom:8px;gap:8px}
#app #sidebar header #newNote{width:32px;height:32px;border-radius:10px;font-size:18px;box-shadow:none}
#app #sidebar>header strong{font-size:18px}
#app #sidebar>header .badge{display:none}
#app #sidebar header #newNoteWide{width:auto;margin:0 0 0 auto;padding:6px 12px 6px 9px;font-size:12.5px;border-radius:99px;box-shadow:0 3px 10px #e5ac2833;flex-shrink:0}
#app #sidebar header #newNoteWide::before{width:15px;height:15px}
#app #sidebar header #closeSidebar{margin-left:4px}
#app #sidebar #search{margin:0 0 8px;padding:7px 10px 7px 32px;font-size:13px;border-radius:10px;background-position:10px center;background-size:15px}
/* Ansicht + Quellen in einer Zeile */
#app #sidebar .sideStrip{display:flex;gap:6px;align-items:stretch;margin-bottom:4px;flex-shrink:0}
#app #sidebar .sideStrip .noteNav{flex:0 0 auto;display:flex;gap:2px;padding:2px;margin:0;border-radius:10px}
#app #sidebar .sideStrip .noteNav button{flex:0 0 auto;width:34px;min-height:32px;height:32px;padding:0;border-radius:8px}
#app #sidebar .sideStrip .noteNav button::after{content:none}
#app #sidebar .sideStrip .noteNav button svg{width:17px;height:17px}
#app #sidebar .sideStrip .noteNav #count{top:-4px;right:-4px;font-size:9px;line-height:13px;padding:0 4px;min-width:15px}
#app #sidebar .sideStrip #sourceNav{flex:1;display:flex;gap:3px;margin:0;min-width:0}
#app #sidebar .sideStrip #sourceNav button{flex:1;min-width:0;height:36px;border-radius:9px;font-size:14px}
#app #sidebar .sideStrip #sourceNav button svg{width:16px;height:16px}
#app #sidebar .sourceSummary{margin:2px 2px 2px;font-size:10.5px}
#app #sidebar .sourceSummary:has(#obsidianImport[hidden]) #sourceLabel{display:none}
#app #sidebar .sourceSummary:has(#obsidianImport[hidden]){display:none}
/* Ordnerbaum bekommt den Platz */
#app #sidebar .folderHeading{margin:6px 0 2px}
#app #sidebar #folderTree{flex:1 1 auto;min-height:0;max-height:none}
#app #sidebar .folderPick{min-height:32px;padding:5px 9px;font-size:13px}
#app #sidebar .noteitem{padding:6px 10px}
#app #sidebar .noteitem p{margin:1px 0 3px;font-size:11.5px}
#app #sidebar .noteitem small{font-size:9.5px;padding:0 6px}
#app #sidebar #folderMindmap{margin:4px 2px;padding:4px 10px;font-size:11px}
#app #sidebar footer{margin-top:4px;padding:5px 6px 5px 10px;border-radius:10px;font-size:11px}
#app #sidebar #logout{width:26px;height:26px;min-width:26px}
/* Datum in die Titelzeile – eine Zeile weniger je Notiz */
#app #sidebar #folderTree .noteitem{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:baseline}
#app #sidebar #folderTree .noteitem>strong{grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app #sidebar #folderTree .noteitem>small{grid-column:2;grid-row:1}
#app #sidebar #folderTree .noteitem>:not(strong):not(small){grid-column:1/-1}
#app #sidebar #folderTree .noteitem>p{margin:1px 0 0}
/* Fingerziel bleibt 44 px hoch (Apple-Richtlinie, Test layout_navigation) */
#app #sidebar .sideStrip .noteNav button{height:44px;min-height:44px;width:36px}
#app #sidebar .sideStrip #sourceNav button{height:48px}

/* Druck-Pille */
#pressureBtn{flex:none;padding:3px 9px;border-radius:99px;border:1px solid #e3b43a;background:#fbf0cf;color:#7a5c12;font-size:11px;font-weight:600;white-space:nowrap}
#pressureBtn.off{background:#fff;border-color:#e3dccd;color:#8a8174}
.widthSlider input[type=range]{min-width:56px}

/* Farbkugel: eigene Farbe neben den fünf Standardfarben (17.10.2026) */
.colorRow{display:flex;align-items:center;gap:4px}
body.sideBar .topbar .tools>.colorRow{grid-column:1/-1;justify-content:space-between;padding:2px 4px}
body.sideBar .topbar .tools .colorRow>.color{flex:0 0 30px;width:30px;height:30px;margin:0;grid-column:auto}
.colorWheel{position:relative;flex:0 0 30px;width:30px;height:30px;border-radius:50%;cursor:pointer;
 background:conic-gradient(from 90deg,#f44,#fb3,#ee4,#4d6,#3cf,#46f,#c4f,#f4a,#f44);box-shadow:inset 0 0 0 1px #0002;transition:transform .12s}
.colorWheel::after{content:"";position:absolute;inset:9px;border-radius:50%;background:var(--picked,#fff);box-shadow:0 0 0 2px #fff;pointer-events:none}
.colorWheel:hover{transform:scale(1.06)}
.colorWheel input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0;margin:0}
.colorWheel.chosen{box-shadow:0 0 0 3px var(--bar-bg,#fbfaf6),0 0 0 5px var(--picked,#998c70),0 4px 10px #0002}
.colorWheel:has(input:focus-visible){outline:2px solid #bc8c20;outline-offset:3px}
body.sideBar .topbar .tools .colorRow>.color{max-width:30px;min-width:30px;aspect-ratio:1;flex:0 0 30px}
/* Verschieben-Dialog mit Ordnersuche */
#moveDialog{width:min(480px,calc(100vw - 32px))}
#moveDialog>label{margin:16px 0 7px}
#moveSearch{width:100%;box-sizing:border-box;padding:12px;border:1px solid #dbd2bc;border-radius:8px;font-size:16px}
#moveList{display:grid;gap:2px;max-height:min(48vh,380px);overflow-y:auto;margin-top:8px;padding:4px;border:1px solid #ece4d0;border-radius:8px}
.moveOption{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-height:44px;width:100%;padding:8px 10px;border:0;border-radius:6px;background:none;text-align:left;cursor:pointer}
.moveOption:hover{background:#f5efe1}
.moveOption.selected{background:#2f2a22;color:#fff}
.moveOption.locked{opacity:.4;cursor:not-allowed}
.moveOption.locked:hover{background:none}
.moveOption small{flex-basis:100%;order:3;opacity:.65;font-size:12px}
.moveOption em{margin-left:auto;font-size:11px;font-style:normal;opacity:.7}
#moveCount{margin:6px 0 0;min-height:1em;font-size:13px;color:#8a7f69}
#moveDialog .moveActions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
#moveDialog label.moveAnywhere{display:flex;align-items:center;gap:8px;margin:6px 0 0;min-height:44px;font-size:14px;cursor:pointer}
#moveDialog label.moveAnywhere input{width:20px;height:20px;margin:0}
#moveDialog label.moveAnywhere[hidden]{display:none}
/* Teilen-Dialog: WhatsApp, Übersicht aller Links */
.guestSendRow{display:flex;gap:8px;margin:10px 0 2px}
.guestSendRow>*{flex:1;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:9px;font-size:14px}
#guestDialog a.whatsapp{background:#25d366;color:#fff;font-weight:650;text-decoration:none}
#guestDialog a.whatsapp:hover{background:#1fb457}
#guestDialog a.whatsapp::before{content:"💬"}
#guestAll{margin-top:14px;border-top:1px solid #ece4d0;padding-top:10px;font-size:13px}
#guestAll summary{cursor:pointer;color:#6f685c;min-height:32px;display:flex;align-items:center}
#guestAllList{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px;max-height:200px;overflow-y:auto}
#guestAllList li{display:flex;align-items:center;gap:8px;padding:4px 0}
#guestAllList li span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#guestAllList li small{color:#8a7f69;white-space:nowrap}
#guestAllList li button{min-height:36px;padding:4px 10px;font-size:12px}
/* Teilen-Dialog: Vorschaubild für WhatsApp wählen */
.guestIcons{margin:12px 0 4px;font-size:12px;color:#6f685c}
#guestIconList{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
#guestIconList button{min-width:40px;height:40px;padding:0 8px;border:1px solid #e3dccb;border-radius:9px;background:#fff;font-size:18px;line-height:1}
#guestIconList button[data-icon=""]{font-size:13px;font-weight:600}
#guestIconList button.chosen{border-color:#2f2a22;box-shadow:0 0 0 2px #2f2a22 inset}
#folderShareBtn{margin-right:auto}
/* Teilen-Dialog: Bearbeiten erlauben */
.guestEditToggle{display:flex;gap:10px;align-items:flex-start;margin:14px 0 4px;padding:10px 12px;border:1px solid #e3dccb;border-radius:10px;cursor:pointer}
.guestEditToggle input{width:22px;height:22px;margin:1px 0 0;flex:none}
.guestEditToggle span{display:grid;gap:2px;font-size:14px}.guestEditToggle small{font-size:12px;color:#6f685c}
.guestEditToggle:has(input:checked){border-color:#e0a91e;background:#fff8e3}
/* Teilen-Menü einrichten */
#shareSetupDialog{max-width:560px;width:calc(100% - 32px);border:1px solid #e6e1d6;border-radius:14px;padding:22px;max-height:calc(100dvh - 32px);overflow-y:auto}
#shareSetupDialog p{font-size:14px;line-height:1.5}
.shareKeyBox{border:1px solid #e3dccb;border-radius:10px;padding:10px 12px;margin:12px 0;background:#fffcf3}
.shareKeyBox p{margin:0 0 8px}
.shareKeyRow{display:flex;gap:8px;margin-top:6px}.shareKeyRow input{flex:1;min-width:0;padding:10px;border:1px solid #ddd5c6;border-radius:8px;font:13px ui-monospace,monospace}
#shareKeyShow label{display:block;font-size:13px}
.shareKeyActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.shareKeyActions button,.shareSetupClose button,.shareKeyRow button{min-height:44px;padding:6px 14px;border-radius:9px}
.shareSteps{padding-left:20px;font-size:14px;line-height:1.55}.shareSteps li{margin:0 0 9px}
.shareSteps code,#shareUrl{background:#f1ece2;border-radius:5px;padding:1px 5px;font-size:12.5px;overflow-wrap:anywhere}
.shareSteps button.mini{min-height:28px;padding:2px 8px;font-size:12px;border-radius:7px}
.shareHint{color:#6f685c;font-size:12.5px!important}
.shareSetupClose{display:flex;justify-content:flex-end}
#shareSetupBtn svg{width:17px;height:17px}
#shareSetupDialog h3{font-size:15px;margin:16px 0 6px}
.shareFlow{background:#f1ece2;border-radius:8px;padding:10px 12px;font:12.5px/1.5 ui-monospace,monospace;white-space:pre;overflow-x:auto}
/* Vorlagen-Menü (Neu lange drücken) */
#templateMenu{position:fixed;z-index:60;max-height:min(70dvh,520px);overflow-y:auto;padding:6px;background:#fff;border:1px solid #e3dccb;border-radius:14px;box-shadow:0 14px 40px #2c231033}
#templateMenu .templateHead{margin:8px 10px 4px;font-size:11px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#8a7f69}
#templateMenu .templateItem{display:flex;gap:10px;align-items:center;width:100%;min-height:48px;padding:8px 10px;border:0;border-radius:10px;background:none;text-align:left;cursor:pointer;font:inherit;color:inherit}
#templateMenu .templateItem:hover,#templateMenu .templateItem:focus-visible{background:#f5efe1;outline:none}
#templateMenu .ti{font-size:20px;width:28px;text-align:center}
#templateMenu .templateItem span:last-child{display:grid;gap:1px}#templateMenu small{color:#8a7f69;font-size:12px}
/* Stiftarten-Halbkreis (pens.js) */
#penArc{position:fixed;z-index:70;width:0;height:0}
#penArc .penItem{position:absolute;left:0;top:0;width:76px;height:76px;border-radius:50%;border:1px solid #e3dccb;background:#fff;box-shadow:0 8px 24px #2c231024;display:grid;place-content:center;justify-items:center;gap:1px;cursor:pointer;font:inherit;color:#3c372e;transition:transform .12s ease,box-shadow .12s ease}
#penArc .penItem .pi{font-size:26px;line-height:1}
#penArc .penItem .pn{font-size:10.5px;font-weight:700;letter-spacing:.1px;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#penArc .penItem[aria-checked="true"]{border:2px solid #e0a91e;background:#fff8e3}
#penArc .penItem.hot{box-shadow:0 0 0 4px #2f2a2240,0 10px 28px #2c231033;background:#fdf6e3}
#penArc .penTune{position:absolute;left:0;top:0;min-height:40px;padding:6px 16px;border-radius:99px;border:1px solid #e3dccb;background:#fff;font:600 13px inherit;box-shadow:0 6px 18px #2c23101c;white-space:nowrap;cursor:pointer}
#penArc .penLabel{position:absolute;left:0;top:0;width:220px;margin:0;text-align:center;font-size:12px;color:#6f685c;background:#fffffff0;border-radius:10px;padding:6px 8px;pointer-events:none}
#penTuneDialog{width:min(600px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;border:1px solid #e6e1d6;border-radius:14px;padding:22px}
#penTuneDialog h2{margin:0 0 12px;font-size:19px}
#penPreview{display:block;width:100%;height:120px;max-height:120px;background:#fffdf9;border:1px solid #ece4d0;border-radius:10px}
#penTuneDialog label{display:grid;grid-template-columns:1fr auto;gap:4px 10px;margin:14px 0 0;font-size:14px}
#penTuneDialog input[type=range]{grid-column:1/-1;width:100%}
#penTuneDialog output{font-variant-numeric:tabular-nums;color:#6f685c}
.penTuneHint{font-size:12px;color:#8a7f69;margin:10px 0 0}
.penTuneActions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.penTuneActions button{min-height:44px;padding:6px 16px;border-radius:9px}
@media (prefers-reduced-motion:reduce){#penArc .penItem{transition:none}}
/* Notiz-Kontextmenü (note-menu.js) */
.noteMore{width:30px;min-width:30px;height:30px;padding:0;display:grid;place-items:center;border-radius:9px;color:#9a8f7c;font-size:18px;line-height:1;background:none;border:0;cursor:pointer;opacity:.55}
.noteRow:hover .noteMore,.noteMore:focus-visible{opacity:1}
@media (hover:none){.noteMore{opacity:.8}}
#noteMenu{position:fixed;z-index:70;min-width:220px;padding:6px;background:#fff;border:1px solid #e3dccb;border-radius:14px;box-shadow:0 14px 40px #2c231033}
#noteMenu .noteMenuHead{margin:6px 10px 6px;font-size:12px;font-weight:700;color:#8a7f69;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#noteMenu .noteMenuItem{display:flex;gap:10px;align-items:center;width:100%;min-height:44px;padding:8px 12px;border:0;border-radius:10px;background:none;text-align:left;font:inherit;font-size:15px;color:inherit;cursor:pointer}
#noteMenu .noteMenuItem:hover,#noteMenu .noteMenuItem:focus-visible{background:#f5efe1;outline:none}
#noteMenu .noteMenuItem.danger{color:#ad4030}
.noteRename{width:100%;box-sizing:border-box;padding:4px 6px;font:inherit;font-weight:700;border:1px solid #e0a91e;border-radius:6px;background:#fffdf6}
/* Zeichenmodus: Text-Format ausblenden, damit die Stift-Werkzeuge im iPad-Querformat ganz sichtbar sind */
/* 13.11.2026: nur im echten Zeichenmodus ausblenden. body.drawingMode steht seit a894b64 bei jeder Notiz mit Tinte (für „Zoom“) – damit fehlte die Format-Leiste auch beim Tippen. */
body.sideBar:has(#editor.drawingMode:not([hidden])) .formatbar,body.sideBar:has(#editor.drawingMode:not([hidden])) .barLabel.forFormat{display:none!important}
/* Erweiterte Suche (search-ui.js) */
.searchWrap{position:relative;flex-shrink:0}
#app #sidebar .searchWrap #search{padding-right:42px}
#searchFilterBtn{position:absolute;right:4px;top:3px;width:34px;height:30px;padding:0;display:grid;place-items:center;border:0;border-radius:8px;background:none;color:#8a7f69;cursor:pointer}
#searchFilterBtn svg{width:17px;height:17px}
#searchFilterBtn.active{color:#7a5a08;background:#f6e3a6}
#searchFilterBtn .badge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:99px;background:#e0a91e;color:#fff;font:700 10px/16px inherit}
#searchPanel{flex-shrink:0;display:grid;gap:10px;margin:0 0 10px;padding:12px;border:1px solid #e3dccb;border-radius:12px;background:#fffdf7;font-size:12px;color:#6f685c;max-height:60dvh;overflow-y:auto}
#searchPanel .sp-row{display:grid;gap:5px;font-weight:700;letter-spacing:.2px}
#searchPanel select,#searchPanel input[type=date]{font:inherit;font-weight:400;font-size:13px;padding:6px 8px;border:1px solid #ddd5c6;border-radius:8px;background:#fff;color:#292a29;min-height:34px;min-width:0}
#searchPanel .sp-inline{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#searchPanel .sp-inline>*{flex:1}#searchPanel .sp-inline span{flex:0;font-weight:400}
#searchPanel .sp-chips,#searchPanel .sp-seg{display:flex;flex-wrap:wrap;gap:5px}
#searchPanel .sp-chips button,#searchPanel .sp-seg button{font:inherit;font-weight:600;font-size:12px;padding:5px 9px;min-height:32px;border:1px solid #e3dccb;border-radius:99px;background:#fff;color:#4a4438;cursor:pointer}
#searchPanel button[aria-pressed="true"]{background:#2f2a22;border-color:#2f2a22;color:#fff}
#searchPanel .sp-check{display:flex;gap:6px;align-items:center;font-weight:400;font-size:13px;color:#4a4438}
#searchPanel .sp-help{font-weight:400}#searchPanel .sp-help summary{cursor:pointer;font-weight:700}
#searchPanel .sp-help table{border-collapse:collapse;margin-top:6px;font-size:12px}#searchPanel .sp-help td{padding:3px 6px 3px 0;vertical-align:top}
#searchPanel .sp-help code{background:#f1ece2;border-radius:4px;padding:0 4px;white-space:nowrap}
#searchPanel .sp-actions{display:flex;justify-content:flex-end;gap:6px}#searchPanel .sp-actions button{min-height:34px;padding:4px 12px;border-radius:8px;font:inherit;font-weight:600}
/* Vollbild-Knopf ausgeblendet (18.10.2026): Leisten links/rechts lassen sich einklappen; Funktion (Esc, focusMode) bleibt */
#fullscreenBtn{display:none!important}
#searchPanel .sp-sem{display:flex;gap:9px;align-items:flex-start;padding:9px 10px;border:1px solid #d9cdf2;border-radius:10px;background:#f7f3ff;cursor:pointer;font-weight:400}
#searchPanel .sp-sem input{width:20px;height:20px;margin:1px 0 0;flex:none;accent-color:#6d4bc2}
#searchPanel .sp-sem span{display:grid;gap:2px}#searchPanel .sp-sem strong{color:#4c3593;font-size:13px}#searchPanel .sp-sem small{font-size:11.5px;color:#6f685c}
#searchPanel .sp-sem:has(input:checked){border-color:#8c6fe0;background:#efe8ff}
/* Verschieben: Umschalter Notizbuch / alle Ordner oben */
.moveScope{display:flex;margin:14px 0 4px;border:1px solid #e3dccb;border-radius:10px;overflow:hidden}
.moveScope button{flex:1;min-height:40px;padding:6px 10px;border:0;background:#fff;font:inherit;font-size:14px;font-weight:600;color:#4a4438;cursor:pointer}
.moveScope button+button{border-left:1px solid #e3dccb}
.moveScope button[aria-checked="true"]{background:#2f2a22;color:#fff}

/* Anmeldeseite: Teilwort statt Login (seit 18.10.2026) */
.loginStack{width:100%;max-width:440px}
#codeForm{margin:0 32px 32px;padding-top:18px;border-top:1px solid #e7e0d2}
#codeForm .codeLead{margin:0 0 10px;color:#8a8174;font-size:13px}
#codeForm .codeRow{display:flex;gap:8px}
#codeForm input{flex:1;min-width:0;padding:12px;background:white;border:1px solid #ddd5c6;border-radius:8px}
#codeForm button{padding:0 16px;border:1px solid #ddd5c6;border-radius:8px;background:#f3eee4;font-weight:600}
.guestCode{margin:10px 0 0;font-size:14px;color:#5a5245}.guestCode strong{font-family:ui-monospace,Menlo,monospace;font-size:16px;letter-spacing:.02em;color:#2f2a22;background:#f6efd9;padding:2px 8px;border-radius:6px}

/* Erinnerungen (reminders.js) */
#reminderBtn{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9 M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E")}
#reminderBtn.hasReminder{background:#fff4d1;color:#5b4210;border-color:#f2c44b}
#reminderDialog,#reminderPop{width:min(460px,calc(100vw - 32px));border:0;border-radius:16px;padding:20px;box-shadow:0 20px 60px rgba(40,30,10,.25)}
#reminderDialog h2,#reminderPop h2{margin:0 0 4px;font-size:20px}
#reminderDialog h3{margin:18px 0 6px;font-size:13px;letter-spacing:.6px;text-transform:uppercase;color:#9c927d}
#remNoteTitle{margin:0 0 12px;color:#6b6457;overflow-wrap:anywhere}
.remQuick{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.remQuick button{min-height:40px;padding:6px 12px;border:1px solid #e3dccb;border-radius:20px;background:#fff;font-size:14px}
.remQuick button.chosen{background:#2f2a22;color:#fff;border-color:#2f2a22}
#reminderDialog label{display:block;margin:10px 0 4px;font-size:13px;font-weight:600;color:#4a4438}
#reminderDialog input{width:100%;min-height:44px;padding:8px 10px;border:1px solid #ded9d0;border-radius:8px;background:#fff;font-size:16px}
#remError{min-height:1em;margin:8px 0 0;color:#b64434;font-size:14px}
.remActions,.popActions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
.remActions button,.popActions button{min-height:44px;padding:8px 16px}
#remList{list-style:none;margin:0;padding:0}
#remList li{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 0;border-top:1px solid #f0ebe0}
#remList li span{flex:1;overflow-wrap:anywhere}#remList li.empty{color:#9c927d}
#remList li button{min-width:40px;min-height:40px;border:0;background:none;font-size:16px;color:#9c927d}
.remPush{margin-top:16px;padding:12px;border-radius:10px;background:#f7f4ec;font-size:14px}
.remPush p{margin:0 0 8px}.remPush button{min-height:40px;margin-right:6px}
#reminderPop{text-align:center}
.popBell{font-size:40px;line-height:1;margin-bottom:6px}
#popText{margin:6px 0;font-size:16px;overflow-wrap:anywhere}#popWhen{margin:0 0 8px;color:#9c927d;font-size:13px}
.popActions{justify-content:center}
.popLater{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;margin-top:12px;font-size:14px;color:#6b6457}
.popLater button{min-height:40px;padding:6px 12px;border:1px solid #e3dccb;border-radius:20px;background:#fff}
#reminderPop .popBell{display:flex;justify-content:center}
#reminderDialog .remPush{display:block;text-align:left}
#reminderDialog .remPush p{text-align:left}
/* Schwebender Modus-Knopf (Tippen ↔ Zeichnen), verschiebbar */
#modeFab{position:fixed;right:22px;bottom:calc(28px + env(safe-area-inset-bottom));z-index:30;width:60px;height:60px;padding:0;border-radius:50%;border:1px solid #d9ca9c;background:#fffdf9ee;box-shadow:0 4px 16px #0000002e;font-size:24px;line-height:1;display:flex;align-items:center;justify-content:center;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:pointer}
#modeFab[hidden]{display:none}body.sideBar:not(.toolbarHidden) #modeFab{right:calc(var(--focus-bar) + 22px)}#modeFab.drawing{background:#f2c44bf0;border-color:#b88a1c;font-weight:700;font-size:21px;color:#3a2d0a}#modeFab.dragging{cursor:grabbing;box-shadow:0 8px 24px #00000040;transform:scale(1.06)}
#modeFab:focus-visible{outline:3px solid #bc8c20;outline-offset:3px}
/* Seitenleiste breiter ziehen + volle Notiztitel (25.10.2026) */
#sidebarResize{flex:0 0 8px;margin-left:-4px;margin-right:-4px;z-index:5;cursor:col-resize;touch-action:none;position:relative}
#sidebarResize::after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;border-radius:2px;background:transparent;transition:background .15s}
#sidebarResize:hover::after,#sidebarResize:focus-visible::after,body.sidebarResizing #sidebarResize::after{background:#d9b85a}
#sidebarResize:focus-visible{outline:none}
body.sidebarResizing{cursor:col-resize;-webkit-user-select:none;user-select:none}
#app.sidebarHidden #sidebarResize{display:none}
@media(max-width:760px){#sidebarResize{display:none}}
/* Titel bis zu zwei Zeilen statt nach wenigen Zeichen abgeschnitten */
#app #sidebar #folderTree .noteitem>strong,#app #sidebar .noteitem strong{white-space:normal;text-overflow:clip;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;line-height:1.3}
#app #sidebar #folderTree .noteitem>small{align-self:start;margin-top:2px}
#app #sidebar .folderPick{white-space:normal;overflow-wrap:anywhere;line-height:1.25}
/* Optionsmenü am schwebenden Knopf (25.10.2026) */
#fabMenu{position:fixed;z-index:40;max-width:min(340px,calc(100vw - 16px));padding:10px 12px;border-radius:16px;background:#fffdf9f5;border:1px solid #e3d9c3;box-shadow:0 10px 32px #2c231033;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;backdrop-filter:blur(10px)}
#fabMenu .fabSection+.fabSection{margin-top:8px;padding-top:8px;border-top:1px solid #efe8d9}
#fabMenu .fabSection>p{margin:0 0 5px;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:#a0967f}
#fabMenu .fabRow{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
#fabMenu .fabItem{min-width:44px;height:44px;padding:0 8px;border-radius:11px;background:#f4efe4;font-size:18px;line-height:1;color:#3a3226;display:flex;align-items:center;justify-content:center}
#fabMenu .fabItem:hover{background:#ece3cf}
#fabMenu .fabItem.on{background:#f2c44b;color:#3a2d0a;box-shadow:inset 0 0 0 1px #b88a1c}
#fabMenu .fabColor{width:36px;min-width:36px;height:36px;padding:0;border-radius:50%;background:var(--c,#ccc);box-shadow:inset 0 0 0 1px #0002}
#fabMenu .fabColor.on{background:var(--c,#ccc);box-shadow:0 0 0 3px #fffdf9,0 0 0 5px #8a6a14}
#fabMenu .fabWheel,#fabMenu .fabWheel.on{background:var(--c,conic-gradient(from 90deg,#f44,#fb3,#ee4,#4d6,#3cf,#46f,#c4f,#f4a,#f44))}
#fabMenu .fabWheel:not(.on){background:conic-gradient(from 90deg,#f44,#fb3,#ee4,#4d6,#3cf,#46f,#c4f,#f4a,#f44)}
#fabMenu .fabWidth{flex:1;min-width:140px;min-height:36px;accent-color:#ac8120}
#fabMenu output{min-width:30px;font-size:12px;color:#685d49;text-align:right}
#fabMenu .fabDot{flex:none;border-radius:50%;margin:0 4px}
/* Rückgängig / Wiederholen neben dem Speicherstatus (26.10.2026) */
#historyNav{display:inline-flex;align-items:center;gap:2px;flex:none}
#historyNav[hidden]{display:none}
#historyNav button{width:40px;height:36px;min-width:40px;padding:0;border-radius:10px;font-size:20px;line-height:1;color:#5b4210;background:#f4efe4}
#historyNav button:hover:not(:disabled){background:#ece3cf}
#historyNav button:disabled{opacity:.35;cursor:default}
body.sideBar .topbar>#historyNav{margin-left:auto}
/* „Zuletzt“ – zuletzt bearbeitete / neu angelegte Notizen (26.10.2026) */
.recentHidden{display:none!important}
#recentPanel{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin-top:6px}
#recentPanel[hidden]{display:none}
#recentPanel .recentTabs{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:3px;border-radius:12px;background:var(--l-soft,#ece8dd);flex-shrink:0;margin-bottom:6px}
#recentPanel .recentTabs button{min-height:36px;padding:6px;border-radius:9px;font-size:12.5px;font-weight:600;color:#7b705d}
#recentPanel .recentTabs button.on{background:#fff;color:#3a2d0a;box-shadow:0 1px 4px #2c231014}
#recentList{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:2px;padding-bottom:12px}
#recentList .recentItem{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:baseline;text-align:left;padding:8px 10px;border-radius:12px;border:1px solid transparent;min-height:44px}
#recentList .recentItem:hover{background:#ffffffc0}
#recentList .recentItem.active{background:#fff;border-color:var(--l-line,#e6dfcf);box-shadow:0 4px 14px #2c231012,inset 3px 0 0 var(--l-accent,#f2c44b)}
#recentList .recentItem strong{grid-column:1;font-size:13.5px;font-weight:650;line-height:1.3;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
#recentList .recentTime{grid-column:2;grid-row:1;font-size:10.5px;font-weight:600;color:#8a6a14;white-space:nowrap}
#recentList small{grid-column:1/-1;font-size:11px;color:#9a907c;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#recentList .recentEmpty{font-size:12px;color:#8a8174;margin:10px}
/* Nicht platzierte Anhänge entfernen (27.10.2026) */
#attachments .attachmentRemove{justify-self:start;font-size:12px;padding:6px 12px;border-radius:8px;color:#9a3b2b;background:#f7e9e5}
#attachments .attachmentRemove:hover{background:#f1d9d2}
/* Grundschrift der Notiz + Größe für markierten Text (29.10.2026) */
.noteFont{display:inline-flex;align-items:center;gap:4px;flex:none;font-size:12px;white-space:nowrap}
.noteFont .noteFontLabel{font-size:11px;color:#8a8174;margin-right:2px}
.noteFont button{min-width:36px;height:34px;padding:0 6px;border-radius:9px;background:#f4efe4;font-weight:700;color:#5b4210}
.noteFont button:disabled{opacity:.35}
.noteFont output{min-width:44px;text-align:center;font-variant-numeric:tabular-nums;color:#5b4210}
body.sideBar .topbar .noteFont{width:100%;justify-content:flex-start;padding:4px 2px}
/* Modus „Formatiert“ (29.10.2026) – gleiche Geometrie wie „Tippen“ (Zeilen, Zeilenanfänge), damit Handschrift passt */
#paper #rich{width:1000px;margin:0;padding:16px 0;min-height:1400px;font-size:var(--note-font-size,16px);line-height:1.65;white-space:pre-wrap;overflow-wrap:break-word;outline:none;color:#464640;caret-color:#9a6c10}
#rich[hidden]{display:none}
#rich .rb{margin:0;padding:0}
#rich a{color:#957015;cursor:text}
#rich code{background:#f1eadb;padding:0 4px;border-radius:4px;font-size:.9em;line-height:inherit}
#rich .rb-h{font-weight:700;color:#2f2b23}
#rich .rb-h[data-level="1"]{color:#1f1c16}
#rich .mdpre{color:transparent;-webkit-user-select:none;user-select:none;white-space:pre}
#rich .mdpre .mk{position:relative}
#rich .rb-li .mk::before{content:"•";position:absolute;left:0;color:#9a7117}
#rich .rb-li .mk.num{color:#9a7117}
#rich .rb-li .mk.num::before{content:none}
#rich .rb-task .mk input{position:absolute;left:0;top:50%;transform:translateY(-50%);width:1.05em;height:1.05em;margin:0;accent-color:#ac8120;cursor:pointer;pointer-events:auto}
#rich .rb-task.done{color:#9b9588;text-decoration:line-through}
#rich .rb-task.done .mdpre{text-decoration:none}
#rich .rb-quote{color:#716a5a}
#rich .rb-quote .mk::before{content:"";position:absolute;left:.1em;top:-.2em;bottom:-.2em;width:4px;border-radius:2px;background:#cfb779}
#rich .rb-atomic{-webkit-user-select:none;user-select:none;position:relative;overflow:visible}
#rich .rb-table table{width:100%;table-layout:fixed;border-collapse:collapse;line-height:inherit}
#rich .rb-table th,#rich .rb-table td{padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:inherit}
#rich .rb-table .markdownTable{margin:0}
#rich .rbTableEdit{position:absolute;right:0;top:0;font-size:.7em;min-height:1.8em;padding:0 8px}
#rich .rb-code pre{margin:0;padding:1.65em 12px;white-space:pre;overflow-x:auto;background:#f2ecdf;border-radius:8px;font-size:.9em;line-height:1.833}
#rich hr{margin:.8em 0}
/* Zeichnen über „Formatiert“: Text nicht bearbeitbar, Stifte darüber */
#rich[contenteditable="false"]{caret-color:transparent}
/* Vier Modus-Knöpfe in der Seitenleiste (Lesen · Formatiert · Tippen · Zeichnen), übrige Knöpfe weiter zu dritt */
#richTab{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16 M7 16l5-12 5 12 M8.8 12h6.4'/%3E%3C/svg%3E")}
#richTab::before{content:"";display:inline-block;width:1.2em;height:1.2em;vertical-align:-.25em;margin-right:.4em;background:currentColor;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat}
#richTab.active{background:#eee7d8;color:#7e6019}
body.sideBar .topbar .tabs{grid-template-columns:repeat(12,minmax(0,1fr))}
body.sideBar .topbar .tabs>*{grid-column:span 4}
body.sideBar .topbar .tabs>:is(#previewBtn,#richTab,#textTab,#inkTab){grid-column:span 3}
body.sideBar .topbar .tabs>:is(.noteZoom,.noteFont){grid-column:1/-1}
body.sideBar .topbar .tabs>#richTab{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px 8px;font-size:11.5px;font-weight:600;border-radius:12px;background:#efe9dc;color:var(--bar-ink)}
body.sideBar .topbar .tabs>#richTab::before{width:22px;height:22px;margin:0}
body.sideBar .topbar .tabs>#richTab.active{background:var(--bar-accent);color:var(--bar-accent-ink);box-shadow:0 6px 16px #e5ac2855,inset 0 -2px 0 #0000000f}
body:has(#editor.drawingMode) .noteFont{display:none!important}   /* beim Zeichnen ohne Belang – spart Platz auf dem iPad quer */
#templateMenu .templateItem.manage{min-height:40px}#templateMenu .templateItem.manage .ti{font-size:16px}#templateMenu .templateItem.manage strong{font-weight:500}
#templateMenu .templateItem.last{background:#fbf3dc}#templateMenu .templateItem.last:hover,#templateMenu .templateItem.last:focus-visible{background:#f5e8c2}
/* Formatiert (13.11.2026): Aufzählungen/Checklisten eingerückt statt bündig am linken Rand. Gleich breite Zeile wie
   beim Tippen (rechts um denselben Betrag hinaus), damit der Umbruch – und damit die Lage der Handschrift – gleich bleibt. */
#rich .rb-li,#rich .rb-task{padding-left:1.4em;margin-right:-1.4em}
#imageDelete{color:#ad4030;margin-right:auto}
/* Formatiert: Tabellenzellen direkt bearbeitbar (13.11.2026) */
#rich .rb-table th[contenteditable="true"],#rich .rb-table td[contenteditable="true"]{-webkit-user-select:text;user-select:text;cursor:text;outline:none;text-overflow:clip}
#rich .rb-table th[contenteditable="true"]:focus,#rich .rb-table td[contenteditable="true"]:focus{background:#fbf3dc;box-shadow:inset 0 0 0 2px #e5c46b}
#rich .rb-image img{cursor:pointer;pointer-events:auto}
#imageMoveHint{position:fixed;left:50%;top:14px;transform:translateX(-50%);z-index:80;display:flex;gap:12px;align-items:center;padding:10px 14px;background:#2c2618;color:#fff;border-radius:12px;box-shadow:0 10px 30px #0004;font-size:15px}
#imageMoveHint[hidden]{display:none}#imageMoveHint button{background:#fff2;color:#fff;border:0;border-radius:8px;padding:6px 10px}
body.imageMoving #paper{cursor:crosshair}body.imageMoving #paper::after{content:"";position:absolute;inset:0;outline:3px dashed #e5c46b;outline-offset:-3px;pointer-events:none}

/* 13.11.2026: Als Home-Bildschirm-App (standalone, viewport-fit=cover) lag die Kopfzeile unter der iPad-Statusleiste –
   „+ Neu“ ließ sich im Querformat nicht lange drücken. Inhalt unter die Statusleiste rücken. */
#app{padding-top:env(safe-area-inset-top)}
/* Vorlagen-Knopf neben „+ Neu“: einfach antippen statt lange drücken */
#templateMenuBtn{flex-shrink:0;width:30px;height:29px;margin-left:4px;padding:0;border-radius:99px;font-size:13px;color:#7a5a10;background:#f8e6b4;box-shadow:0 3px 10px #e5ac2822}
#templateMenuBtn:hover{background:#f4d06a}

/* Übersetzen (13.11.2026): Knopf + Zielsprache als ein Paar */
.aiBar .translateGroup{display:inline-flex;align-items:stretch;gap:0;flex:0 0 auto}
.aiBar .translateGroup #translate{border-top-right-radius:0;border-bottom-right-radius:0}
.aiBar #translateLang{border:1px solid #d9ccae;border-left:0;border-radius:0 8px 8px 0;background:#fffdf9;color:inherit;font-size:12px;padding:0 6px;min-height:30px;max-width:120px}
#translate{--ico:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h8 M8 3v2 M10 5c-1 4-3.5 7-6 8 M6 9c1.2 2 3 3.4 5 4 M13 21l4-9 4 9 M14.5 18h5'/%3E%3C/svg%3E")}
body.sideBar .topbar .aiBar .translateGroup{width:100%;gap:0}
body.sideBar .topbar .aiBar #translate{flex:1;display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:12px;font-weight:600;text-align:left;color:#4b3a7a;background:#ffffffb3;border:1px solid #e3d9f5;border-radius:11px 0 0 11px}
body.sideBar .topbar .aiBar #translate:hover{background:#fff}
body.sideBar .topbar .aiBar #translateLang{max-width:none;width:118px;border:1px solid #e3d9f5;border-left:0;border-radius:0 11px 11px 0;background:#ffffffb3;color:#4b3a7a;font-weight:600}
