.note-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(265px,100%),1fr));gap:16px;align-items:start}
.note-grid .note-card{background:var(--note-color,#fff);border:0;border-radius:16px;overflow:hidden;min-width:0;transition:box-shadow .16s ease}
.note-grid .note-card:hover{box-shadow:0 3px 12px #28212f14}
.note-grid .note-open{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:0;background:transparent;color:#28212f;min-height:242px;width:100%;padding:20px;border:0;border-radius:0;overflow:hidden}
.note-grid .note-open:hover{background:#ffffff30}.note-grid .note-card h2{font:600 23px/1.35 Oswald,sans-serif;margin:15px 0 10px;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.note-grid .note-card p{font:400 14px/1.65 Manrope,sans-serif;color:#514857;white-space:pre-line;margin:0 0 18px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.note-card-top{display:flex;gap:10px;justify-content:space-between;align-items:center;color:#61516d;font-size:12px}.note-card-top>span{display:flex;gap:6px;align-items:center;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.note-card-top svg{width:16px;height:16px;flex:none}.note-card-bottom{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#61516d;margin-top:auto;gap:12px}.note-card-bottom>span:last-child{display:flex;align-items:center;gap:5px}.note-card-bottom svg{width:16px;height:16px}
.note-card-image{height:64px;margin:-20px -20px 16px;display:block;background-image:var(--note-image);background-size:cover;background-position:center;position:relative;overflow:hidden}.note-card-image::after{content:'';position:absolute;inset:-20px;background:inherit;filter:blur(var(--note-blur,0px))}
.note-card-task{width:100%;display:flex;gap:7px;align-items:center;padding:10px 20px!important;min-height:44px;background:#ffffff70;border:0;border-top:1px solid #61516d26;border-radius:0;font-size:12px;color:#51405f}.note-card-task span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.note-card-task svg{width:16px;height:16px;flex:none}
.note-create-card{min-height:242px;border:1px dashed #aaa0b8;background:#ffffff66;border-radius:16px;display:flex;align-items:flex-start;justify-content:center;flex-direction:column;padding:24px;gap:12px;color:#4d3962;text-align:left}.note-create-card:hover{background:#eee6f7}.note-create-card>svg{width:27px;height:27px}.note-create-card strong{font:600 23px/1.3 Oswald,sans-serif}.note-create-card span{font-size:13px;line-height:1.6;color:#62536f}.note-library-empty{font-size:14px;color:#62536f}
.note-editor-open .main{display:flex;flex-direction:column;min-height:0;height:100dvh}.note-editor-open .page-content{display:flex;flex:1;min-height:0;overflow:hidden;padding-bottom:20px}.note-editor-open .topbar{flex:none}.note-page{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;position:relative;isolation:isolate;overflow:hidden;border-radius:16px;background:var(--note-color,#fff);color:#28212f}.note-page::before{content:'';position:absolute;inset:-30px;background-image:var(--note-image);background-size:cover;background-position:center;filter:blur(var(--note-blur));z-index:-1;pointer-events:none}
.note-quickbar{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;padding:12px 16px;background:#ffffffed;border-bottom:1px solid #e6deed;flex:none;z-index:2}.note-quick-links,.note-document-actions{display:flex;align-items:center;gap:4px;min-width:0}.note-quick-links{flex-wrap:wrap}.note-quickbar button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;min-width:44px;padding:10px;background:transparent;border:0;color:#59426d;font-size:13px;max-width:280px}.note-quickbar button:hover,.note-quickbar button[aria-pressed=true]{background:#eee5f7}.note-quickbar button:disabled{color:#786f80;opacity:.75}.note-quickbar svg{width:18px;height:18px;flex:none}.note-quickbar button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.note-quickbar button>svg:last-child:not(:first-child){width:13px;height:13px}.note-document-actions{margin-left:auto}.note-document-actions .icon-button{padding:11px;flex:none}.note-document-actions #note-save-state{font-size:12px;color:#61556c;white-space:nowrap;padding:0 8px}.note-document-actions #note-save-state.has-error{color:#984255}
.note-settings-panel{padding:12px 20px 16px;background:#faf8fd;border-bottom:1px solid #e3dceb;max-height:min(340px,45dvh);overflow:auto;flex:none}.note-settings-panel[hidden],.note-conflict[hidden]{display:none}.note-panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;margin-bottom:8px}.note-panel-title .icon-button{width:44px;height:44px;padding:11px;border:0;background:transparent}.note-panel-title svg{width:20px;height:20px}.note-settings-panel p{font-size:12px;line-height:1.6;color:#655571;margin:10px 0 0}.note-choice-row{display:flex;flex-wrap:wrap;gap:8px}.note-choice-row button{display:flex;align-items:center;gap:7px;min-height:44px;font-size:13px;border:0;background:#eee6f7;color:#51356b;padding:10px 14px}.note-choice-row button[aria-pressed=true]{background:#27222d;color:#fff}.note-choice-row svg{width:18px;height:18px}.note-choice-row button.danger{background:#f7e9ee;color:#8d354b}.note-setting-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.note-setting-fields>label{min-width:0;margin:0}.note-settings-panel label{font-size:12px;color:#655571}.note-settings-panel select,.note-settings-panel input{font-family:Manrope,sans-serif;font-size:14px;min-width:0}.note-settings-panel .select-control{min-width:0;max-width:100%}
.note-color-options{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.note-color-options .note-color{width:44px;height:44px;border:1px solid #8b7c9a;border-radius:50%;background:var(--swatch);padding:11px;color:#49345d}.note-color svg{width:20px;height:20px;visibility:hidden}.note-color[aria-pressed=true] svg{visibility:visible}.note-image-upload{min-height:44px;display:flex;gap:7px;align-items:center;padding:10px 14px;background:#eee6f7;border-radius:10px;cursor:pointer;color:#51356b!important}.note-image-upload svg{width:18px;height:18px}.note-blur{display:flex;align-items:center;gap:12px;max-width:420px;margin:14px 0 0}.note-blur input{flex:1;accent-color:#654683;min-width:0;height:44px;padding:0}.note-blur output{min-width:2ch;font-variant-numeric:tabular-nums}.note-color-options #note-background-remove{font-size:13px;min-height:44px;background:transparent;border:0;color:#76506a}
.note-tools{display:flex;align-items:center;flex:none;gap:6px;padding:6px 16px;border-bottom:1px solid #e6deed;background:#ffffffed;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}.note-tools>div{display:flex;gap:2px;padding-right:6px;border-right:1px solid #e4ddeb;flex:none}.note-tools>div:last-child{border:0}.note-tools button{height:40px;min-width:40px;padding:10px;border:0;background:transparent;color:#4c395f;font:500 15px/1 Manrope,sans-serif}.note-tools button:hover{background:#eee6f7}.note-tools svg{width:19px;height:19px}.note-tools button:disabled{opacity:.4}.note-writing-scroll{flex:1;min-height:0;overflow:auto;padding:28px clamp(16px,4vw,48px) 48px;scroll-padding-block:24px;overscroll-behavior:contain}.note-paper{max-width:850px;margin:0 auto;min-height:100%;padding:32px 40px;background:var(--note-color);border-radius:12px}.has-note-image .note-paper{background:#fffffff2}.note-paper #note-title{display:block;border:0;background:transparent;padding:0;margin:0 0 24px;width:100%;max-width:100%;min-height:48px;font:600 clamp(28px,3vw,36px)/1.35 Oswald,sans-serif;color:#28212f;box-shadow:none;outline:none;overflow:hidden;text-overflow:ellipsis;border-radius:0}.note-paper textarea::placeholder{color:#796782}
.note-rich-text{min-height:260px;font:400 16px/1.8 Manrope,sans-serif;color:#332b3b;outline:none;box-shadow:none;border:0;overflow-wrap:anywhere;white-space:pre-wrap;caret-color:#644382;cursor:text}.note-rich-text:empty::before{content:attr(data-placeholder);color:#786782;pointer-events:none}.note-rich-text p,.note-rich-text div{margin:0 0 .8em}.note-rich-text h2{font:600 26px/1.4 Oswald,sans-serif;margin:1em 0 .5em}.note-rich-text h3{font:650 19px/1.5 Manrope,sans-serif;margin:1em 0 .5em}.note-rich-text ul,.note-rich-text ol{margin:.6em 0 1em;padding-inline-start:26px}.note-rich-text li{padding-inline-start:3px;margin:.25em 0}.note-rich-text blockquote{margin:1em 0;padding:12px 18px;background:#8d70aa14;border-radius:8px;color:#51405e}.note-rich-text a{color:#593279;text-decoration:underline;text-underline-offset:3px}.note-rich-text ul[data-list=check]{list-style:none;padding:0}.note-rich-text ul[data-list=check]>li{position:relative;padding-left:36px;min-height:32px;margin:4px 0}.note-rich-text li[data-checked=true][data-strike=true]{text-decoration:line-through;color:#74677e}.note-check-control{position:absolute;left:-4px;top:-4px;width:36px;min-width:36px;height:36px;min-height:36px;padding:9px;border:0;background:transparent;display:grid;place-items:center;border-radius:8px}.note-check-control::before{content:'';position:absolute;inset:8px;border:1.5px solid #79608d;border-radius:5px}.note-check-control svg{position:relative;width:17px;height:17px;opacity:0;color:#fff}.note-check-control[aria-checked=true]::before{background:#634780;border-color:#634780}.note-check-control[aria-checked=true] svg{opacity:1}.note-check-control:disabled{opacity:1;cursor:default}.note-rich-text[contenteditable=false]{cursor:default}
.note-error-row{flex:none;background:#fff}.note-error-row p{font-size:13px;color:#913d52;margin:0;padding:0 16px}.note-error-row p:not(:empty){padding-top:8px}.note-error-row button{margin:8px 16px;font-size:13px}.note-conflict{flex:none;padding:14px 20px;background:#fff4db;color:#5a422b;max-height:38dvh;overflow:auto}.note-conflict p{font-size:13px;line-height:1.6;margin:7px 0}.note-conflict>div{display:flex;gap:8px;flex-wrap:wrap}.note-conflict button{font-size:13px;min-height:44px}#note-link-form{display:flex;gap:10px;align-items:end}#note-link-form label{flex:1;min-width:0;margin:0}#note-link-form button{min-height:44px}
@media(max-width:1100px){.note-quickbar{padding:8px 12px;gap:2px}.note-quickbar button{max-width:235px}.note-paper{padding:24px}.note-writing-scroll{padding:20px}}
@media(max-width:600px){.note-grid{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.note-grid .note-open{min-height:210px;padding:14px}.note-grid .note-card h2{font-size:20px;margin-top:12px}.note-grid .note-card p{font-size:12px;line-height:1.6;-webkit-line-clamp:3}.note-card-top{font-size:11px}.note-card-top>span{max-width:100%;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.note-card-top>span svg{display:none}.note-card-top svg{width:14px;height:14px}.note-card-bottom{font-size:11px;gap:5px;flex-wrap:wrap}.note-card-image{margin:-14px -14px 12px;height:52px}.note-card-task{padding:10px 14px!important}.note-create-card{min-height:210px;padding:16px;gap:10px}.note-create-card strong{font-size:21px}.note-create-card span{font-size:12px}.note-editor-open .page-content{padding:0 10px 10px}.note-page{border-radius:14px}.note-quickbar{padding:6px 8px}.note-quick-links{flex:1;display:grid;grid-template-columns:1fr 1.4fr auto;width:100%;gap:2px}.note-quick-links button{font-size:12px;padding:8px 5px;max-width:100%}.note-quick-links svg{width:16px;height:16px}.note-quick-links #note-look-button span{display:none}.note-document-actions{width:100%;margin:0;justify-content:flex-end;border-top:1px solid #eee7f3;padding-top:1px}.note-document-actions #note-save-state{margin-right:auto;padding-left:5px}.note-document-actions .icon-button{height:40px;min-height:40px}.note-tools{padding:4px 8px;scrollbar-width:none;gap:4px}.note-tools::-webkit-scrollbar{display:none}.note-tools button{height:44px;min-width:44px;padding:12px}.note-writing-scroll{padding:12px 10px 24px;scroll-padding-block:12px}.note-paper{padding:18px 14px;min-height:100%;border-radius:10px}.note-paper #note-title{font-size:28px;margin-bottom:18px;min-height:44px}.note-rich-text{font-size:16px;line-height:1.75;min-height:220px}.note-rich-text h2{font-size:24px}.note-settings-panel{padding:8px 14px 14px;max-height:42dvh}.note-setting-fields{grid-template-columns:1fr;gap:10px}.note-settings-panel select{font-size:14px}.note-blur{width:100%}.note-conflict{padding:12px}.note-conflict button{flex:1;font-size:12px}.note-check-control{width:44px;height:44px;left:-8px;top:-6px;padding:12px}.note-check-control::before{inset:11px}.note-rich-text ul[data-list=check]>li{padding-left:38px;min-height:36px}}
@media(max-width:360px){.note-grid{grid-template-columns:1fr}.note-create-card{min-height:110px}.note-create-card>svg{display:none}.note-grid .note-open{min-height:190px}.note-quick-links button>svg:last-child:not(:first-child){display:none}}
@media(max-height:550px){.note-editor-open .topbar{padding-block:5px}.note-quickbar{padding-block:2px}.note-quick-links{display:flex;width:auto;flex:1}.note-document-actions{width:auto;border:0;margin-left:auto}.note-document-actions #note-save-state{display:none}.note-tools{padding-block:2px}.note-writing-scroll{padding-block:10px}.note-settings-panel{max-height:45dvh}.note-paper{padding:16px}.note-editor-open .page-content{padding-bottom:8px}}
@media(prefers-reduced-motion:reduce){.note-grid .note-card{transition:none}}

/* A card keeps its place when a cover or task link is present. */
.note-grid .note-card{height:290px;display:flex;flex-direction:column}.note-grid .note-open{flex:1;min-height:0}.note-grid .note-card h2{flex:none}.note-grid .note-card p{min-height:0;flex:1}.note-card-top,.note-card-bottom,.note-card-image{flex:none}.note-create-card{height:290px;min-height:0}.note-card-task{flex:none}.note-grid .has-card-image p{-webkit-line-clamp:2}.note-grid .has-card-image:has(.note-card-task) p{-webkit-line-clamp:1}.note-paper #note-title{resize:none;overflow:hidden;white-space:pre-wrap;text-overflow:clip;min-height:0}
@media(max-width:600px){.note-grid .note-card,.note-create-card{height:280px}.note-grid .note-open{min-height:0}.note-card-image{height:40px}.note-grid .has-card-image .note-open h2{font-size:19px}.note-paper #note-title{min-height:0}}
@media(max-width:360px){.note-grid .note-card{height:230px}.note-create-card{height:110px}.note-grid .has-card-image{height:285px}}
@media(max-height:550px) and (max-width:600px){.note-quick-links{display:flex;flex-wrap:nowrap;width:auto;flex:1}.note-quick-links button{width:44px;max-width:44px;flex:none}.note-quick-links button span,.note-quick-links button>svg:last-child:not(:first-child){display:none}.note-document-actions{width:auto;border:0;margin-left:auto}.note-document-actions #note-save-state{display:none}}

/* Clamp a non-flex descendant, so every preview ends on a complete line. */
.note-grid .note-card p{display:block;flex:0 0 auto;max-height:none;margin-bottom:12px;-webkit-line-clamp:unset}.note-preview-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--note-preview-lines,3);overflow:hidden;max-height:calc(1.65em * var(--note-preview-lines,3))}.has-card-image{--note-preview-lines:2}.has-card-image:has(.note-card-task){--note-preview-lines:1}
@media(max-width:600px){.note-preview-text{max-height:calc(1.6em * var(--note-preview-lines,3))}}
