@media(min-width:801px){
 body:has(#library:not([hidden])) #floatingNote{display:flex;position:fixed;inset:auto 24px 24px auto;z-index:180;align-items:center;justify-content:center;gap:8px;min-width:96px;width:auto;height:46px;padding:10px 18px;border:1px solid var(--gold);border-radius:24px;background:var(--paper);color:var(--ink);box-shadow:0 6px 24px #0003;font:18px/1.3 system-ui;transform:none;opacity:1}
 body #floatingNote span{font:14px/1.4 system-ui;letter-spacing:1px}
 body #noteDialog{position:fixed;inset:auto 24px 84px auto;margin:0;width:390px;max-width:calc(100vw - 48px);height:auto;max-height:calc(100dvh - 120px);padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--paper);color:var(--ink);box-shadow:0 16px 60px #0005;z-index:190;box-sizing:border-box;overflow:auto}
 body #noteDialog .toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
 body #noteDialog h2{font-size:19px;margin:0}
 body #closeNoteDialog{display:block;padding:6px 12px;font-size:13px}
 body #noteDialog #noteContext{font-size:12px;line-height:1.6;max-height:48px;overflow:hidden;margin:0 0 12px}
 body #noteDialog label{font-size:13px;color:var(--muted)}
 body #noteDialog textarea{min-height:180px;max-height:40dvh;font-size:16px;line-height:1.8;margin:8px 0 12px;padding:12px;box-sizing:border-box;background:var(--paper);color:var(--ink);border:1px solid var(--line)}
 body #noteDialog #floatingNoteMsg{font-size:12px;margin:8px 0}
 body #noteDialog #saveFloatingNote{font-size:14px;padding:10px}
}
@media(min-width:801px){body #floatingNote,body #noteDialog .toolbar{cursor:grab;touch-action:none;user-select:none}body #floatingNote:active,body #noteDialog .toolbar:active{cursor:grabbing}body #noteDialog .toolbar button{cursor:pointer;touch-action:auto}body #noteDialog{max-height:calc(100dvh - 16px)}}
