.notes-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:20px}.notes-toolbar>input{flex:1;min-width:180px;max-width:420px}.notes-toolbar .check-row{margin:0}.notes-toolbar #noteNew{margin-left:auto}
.notes-toolbar>input,.notes-toolbar>select,.note-fields>input,.note-fields>select{border:1px solid var(--line,#51425e);border-radius:8px;padding:10px 12px;background:var(--field,#192232);color:var(--ink,#eee7f5);font:inherit}.note-fields>input{font-size:18px;font-weight:600}#noteDialog .plan-collaboration{flex-wrap:wrap;gap:6px 14px}
.note-editor-shell .ql-tooltip::before{content:'Ссылка:'}.note-editor-shell .ql-tooltip a.ql-action::after{content:'Изменить'}.note-editor-shell .ql-tooltip.ql-editing a.ql-action::after{content:'Сохранить'}.note-editor-shell .ql-tooltip a.ql-remove::before{content:'Удалить'}
.notes-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}.notes-column{min-width:0;border:1px solid var(--line,#51425e);border-radius:12px;background:var(--surface-raised,#302739);min-height:240px;overflow:hidden}.notes-column-head{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--line,#51425e);gap:12px}.notes-column-head h2{font-size:16px;margin:0}.notes-column-head>span{color:var(--muted,#c8bdd4);font-size:13px}.notes-cards{padding:12px;display:grid;gap:12px}.note-card{padding:16px;border:1px solid var(--line,#51425e);border-radius:9px;background:var(--surface,#282132);cursor:pointer;min-width:0;transition:border-color .15s}.note-card:hover,.note-card:focus-visible{border-color:var(--accent,#b18ade);outline:2px solid transparent}.note-card[draggable=true]{cursor:grab}.note-card h3{font-size:15px;line-height:1.45;margin:0;color:var(--ink,#eee7f5);overflow-wrap:anywhere}.note-card>p{font-size:13px;line-height:1.55;white-space:pre-line;color:var(--muted,#c8bdd4);margin:10px 0;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.note-card-meta{display:flex;justify-content:space-between;gap:10px;margin-top:14px;color:var(--muted,#c8bdd4);font-size:11px}.note-done{border-left:3px solid var(--success,#49a67a)}.note-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.note-links a{font-size:12px;color:var(--accent,#b18ade)}.notes-empty{padding:12px;color:var(--muted,#c8bdd4);font-size:13px;margin:0}.notes-drop{outline:2px dashed var(--accent,#b18ade);outline-offset:2px}
#noteDialog{width:min(900px,calc(100vw - 40px));max-width:900px;padding:24px}#noteDialog form{display:flex;flex-direction:column;min-width:0}#noteDialog .dialoghead{margin:0 0 18px}.note-fields{display:grid;grid-template-columns:minmax(0,1fr) 145px;gap:12px;margin-bottom:12px}.note-fields input{font-size:18px;font-weight:600;min-width:0}.note-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}.note-actions .note-links{margin:0}.note-editor-shell{border:1px solid var(--line,#51425e);border-radius:8px;overflow:hidden}.note-editor-shell .ql-toolbar.ql-snow{border:0;border-bottom:1px solid var(--line,#51425e);background:var(--surface-raised,#302739)}.note-editor-shell .ql-container.ql-snow{border:0;font:15px/1.65 'Segoe UI',sans-serif;height:45dvh;min-height:220px;max-height:580px;color:var(--ink,#eee7f5);background:var(--surface,#282132)}.note-editor-shell .ql-editor.ql-blank::before{color:var(--muted,#c8bdd4)}.note-editor-shell .ql-stroke{stroke:var(--ink,#eee7f5)}.note-editor-shell .ql-fill{fill:var(--ink,#eee7f5)}.note-editor-shell .ql-tooltip{background:var(--surface,#282132);color:var(--ink,#eee7f5);border-color:var(--line,#51425e)}.note-editor-shell .ql-tooltip input{background:var(--surface,#282132);color:var(--ink,#eee7f5)}
#noteOptions{width:min(650px,calc(100vw - 32px));max-height:90dvh}.note-share-list{max-height:50dvh;overflow:auto}.note-share-row{display:grid;grid-template-columns:minmax(0,1fr) 165px;align-items:center;gap:14px;padding:10px 0;border-bottom:1px solid var(--line,#51425e)}.note-share-row label{margin:0;overflow-wrap:anywhere}.note-share-row select{min-width:0;width:100%}
@media(max-width:900px){.notes-board{gap:10px}.notes-cards{padding:8px}.note-card{padding:12px}}
@media(max-width:760px){.notes-board{grid-template-columns:repeat(3,minmax(270px,85vw));overflow-x:auto;padding:4px 2px 16px;scroll-snap-type:x proximity}.notes-column{scroll-snap-align:start}.notes-toolbar{gap:8px}.notes-toolbar>input{max-width:none;flex-basis:100%}.notes-toolbar #noteNew{min-height:44px}.note-fields{grid-template-columns:1fr}.note-fields select{max-width:180px}#noteDialog{position:fixed;inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:16px;box-sizing:border-box}#noteDialog .dialoghead{position:sticky;top:-16px;background:var(--surface,#282132);z-index:3;padding:10px 0}.note-actions button{min-height:44px}.note-editor-shell .ql-container.ql-snow{height:45dvh}.note-share-row{grid-template-columns:1fr;gap:8px}.note-share-row select{max-width:210px}}

/* Notes: document controls in the header, writing area, then a quiet status footer. */
#noteDialog{width:min(1000px,calc(100vw - 40px));max-width:1000px;height:min(820px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);padding:24px;box-sizing:border-box;overflow:hidden}
#noteDialog #noteForm{height:100%;min-height:0;gap:0}
#noteDialog .note-dialog-head{display:flex;align-items:center;gap:16px;margin:0 0 20px;padding:0 0 16px;flex-shrink:0;border-bottom:1px solid var(--line,#51425e);position:relative;top:auto;z-index:4}
#noteDialog .note-dialog-head h2{flex:1;margin:0;font-size:19px}
#noteDialog .note-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
#noteDialog .note-actions{margin:0}
#noteDialog .note-fields{grid-template-columns:minmax(0,1fr) 200px;align-items:end;gap:16px;margin:0 0 18px;flex-shrink:0}
#noteDialog .note-fields label{margin:0;min-width:0;display:flex;flex-direction:column;gap:7px;color:var(--muted,#c8bdd4)}
#noteDialog .note-fields input,#noteDialog .note-fields select{width:100%;max-width:none;margin:0;box-sizing:border-box;height:48px;min-height:48px;font-size:15px}
#noteDialog .note-fields input{font-size:18px;font-weight:600}
#noteDialog .note-editor-shell{flex:1;min-height:180px;display:flex;flex-direction:column;background:var(--field,#251e2e)}
#noteDialog .note-editor-shell .ql-toolbar{flex-shrink:0;padding:10px 12px}
#noteDialog .note-editor-shell .ql-container{flex:1;min-height:0;height:auto;max-height:none;overflow-y:auto;font-size:16px}
#noteDialog .note-editor-shell .ql-editor{min-height:100%;height:auto;padding:22px 24px;overflow-y:visible;line-height:1.65}
#noteDialog .note-editor-shell .ql-editor :is(p,li){font-size:inherit;line-height:inherit}
#noteDialog .note-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:16px;flex-shrink:0}
#noteDialog .note-footer-info{display:grid;gap:3px;min-width:0;font-size:12px;color:var(--muted,#c8bdd4)}
#noteDialog #notePeople{color:var(--muted,#c8bdd4)}
#noteDialog .note-footer-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
#noteDialog .note-links{margin:0}
#noteDialog .note-conflict{align-self:flex-start;margin:0 0 12px}
#noteDialog .note-more{position:relative;flex-shrink:0}
#noteDialog .note-more summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;border:1px solid var(--line,#725c81);border-radius:6px;background:var(--surface-raised,#40324d);color:var(--ink,#eee7f5);font-size:12px;min-height:32px;padding:6px 10px;box-sizing:border-box}
#noteDialog .note-more summary::-webkit-details-marker{display:none}
#noteDialog .note-more summary:focus-visible{outline:2px solid var(--accent,#b18ade);outline-offset:2px}
#noteDialog .note-more-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:10;width:190px;padding:6px;background:var(--surface,#302739);border:1px solid var(--line,#725c81);border-radius:8px;box-shadow:0 8px 28px #0003;display:grid;gap:3px}
#noteDialog .note-more-menu button{width:100%;text-align:left;background:transparent;border:0;color:var(--ink,#eee7f5);padding:10px;font-size:13px;border-radius:5px;white-space:normal}
#noteDialog .note-more-menu button:hover{background:var(--hover,#493355)}
#noteDialog .note-more-menu button.danger{color:#ff9caa}
html[data-theme$='-light'] #noteDialog .note-more-menu button.danger{color:#a81d35}
@media(max-width:760px){
 #noteDialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:16px;inset:0;border-radius:0}
 #noteDialog .note-dialog-head{position:relative;top:auto;gap:10px;margin-bottom:16px;padding:0 0 14px;background:transparent;flex-wrap:wrap}
 #noteDialog .note-dialog-head h2{flex:1;order:0}
 #noteDialog .note-dialog-head>.close{order:1}
 #noteDialog .note-head-actions{order:2;flex-basis:100%;justify-content:flex-start;gap:8px}
 #noteDialog .note-more{margin-left:auto}
 #noteDialog .note-head-actions button,#noteDialog .note-more summary{min-height:40px}
 #noteDialog .note-fields{grid-template-columns:minmax(0,1fr) 125px;gap:10px;margin-bottom:14px}
 #noteDialog .note-fields input,#noteDialog .note-fields select{font-size:16px}
 #noteDialog .note-editor-shell{min-height:120px}
 #noteDialog .note-editor-shell .ql-toolbar{padding:8px}
 #noteDialog .note-editor-shell .ql-toolbar button{width:36px;height:36px}
 #noteDialog .note-editor-shell .ql-editor{padding:16px}
 #noteDialog .note-footer{gap:12px;padding-top:12px;align-items:flex-end}
 #noteDialog .note-footer-actions{gap:6px;max-width:50%}
 #noteDialog .note-footer-actions .primary{white-space:nowrap;min-height:44px}
}
