.notes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:20px;align-items:start}
.note-card{position:relative;display:flex;flex-direction:column;min-height:230px;border:1px solid var(--border);border-top:6px solid var(--note-color);border-radius:14px;padding:22px;background:color-mix(in srgb,var(--note-color) 18%,var(--surface));color:var(--text)}
.note-card[hidden]{display:none}.note-card h2{margin:0 38px 14px 0;overflow-wrap:anywhere;font-size:20px}.note-card h2 a{color:var(--text)}
.note-content{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 24px;line-height:1.6;color:var(--text);display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden}
.note-card footer{display:flex;justify-content:space-between;gap:16px;margin-top:auto;font-size:12px;color:var(--muted)}
.note-drag-handle{position:absolute;right:10px;top:10px;padding:10px;cursor:grab;touch-action:none}.note-drag-handle:active{cursor:grabbing}.note-drag-handle:disabled{opacity:.35;cursor:default}
.note-dragging{opacity:.5;outline:2px dashed var(--link)}.notes-grid[aria-busy=true]{opacity:.75}.notes-grid[aria-busy=true] .note-drag-handle{cursor:wait}
.note-editor input[type=color]{width:80px;height:46px;padding:5px}.note-editor-actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.note-delete-confirm{display:flex;align-items:center;gap:10px;margin:24px 0 0}.note-delete-confirm input{width:auto;margin:0}.note-editor .danger{margin-top:12px}
#note-editor-dialog{width:min(800px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);overflow-y:auto}
#note-editor-dialog::backdrop{background:rgba(0,0,0,.55)}
.note-modal-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
#note-editor-dialog .note-editor{max-width:none;border:0;padding:0}
#note-editor-dialog textarea{max-height:45dvh;min-height:160px;resize:none}
body:has(#note-editor-dialog[open]){overflow:hidden}
@media print{.note-drag-handle,.note-card footer a,#note-order-help,#note-order-message,.note-editor-actions,#note-delete-form{display:none}.note-content{display:block}.note-card{break-inside:avoid}}
