:root{color-scheme:light;--blue:#205cd4;--blue-dark:#174bb2;--text:#15263c;--muted:#56647c;--line:#dce3ee;--bg:#f7f9fe;--white:#fff;--soft:#eef3ff;--font:22px}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:var(--font);color:var(--text);background:var(--bg);line-height:1.55}body{overflow-x:hidden}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}input,textarea,select{background:#fff;border:2px solid #b8c5d8;padding:13px 15px;border-radius:12px;outline:none;min-width:0;width:100%}input:focus,textarea:focus,select:focus,button:focus-visible{outline:3px solid #b5cbff;outline-offset:2px}label{display:block;font-weight:650;margin:0 0 16px}label input,label textarea,label select{display:block;margin-top:7px;font-weight:400}.hidden{display:none!important}.caption,small{font-size:.72em;color:var(--muted)}.eyebrow{font-size:.66em;font-weight:800;color:#476187;letter-spacing:.09em}.error{color:#a92323;font-weight:600}.brand{display:flex;gap:13px;align-items:center;padding:22px 18px 28px}.brand b{font-size:1.38em;line-height:1.1}.brand small{display:block}.brand-icon{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;color:#fff;background:var(--blue);font-weight:900;border-radius:17px;font-size:1.5em}.brand.big{padding:0 0 20px}.login-shell{display:grid;place-items:center;min-height:100dvh;padding:20px}.login-card{width:min(100%,520px);padding:35px;border:1px solid var(--line);border-radius:25px;background:#fff;box-shadow:0 14px 50px #24385813}.login-card h1{font-size:1.65em;margin:18px 0 0}.login-card p{color:var(--muted)}.checkline{display:flex;align-items:center;gap:13px;font-size:.86em;font-weight:500}.checkline input{width:23px;height:23px;margin:0;accent-color:var(--blue)}.btn{border:1px solid var(--line);border-radius:12px;background:white;padding:10px 16px;font-weight:700;font-size:.78em;line-height:1.5;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:normal}.btn.primary{background:var(--blue);color:white;border-color:var(--blue)}.btn.primary:hover{background:var(--blue-dark)}.btn.subtle{color:#274568;background:#fff}.btn:hover{filter:brightness(.96)}.btn.danger-solid{background:#b72a32;color:white;border-color:#b72a32}.btn.danger{color:#a52635}.btn.full{width:100%;padding:14px}.app-shell{display:grid;grid-template-columns:275px minmax(0,1fr);height:100dvh;overflow:hidden}.sidebar{height:100dvh;display:flex;flex-direction:column;background:#fff;border-right:1px solid var(--line);overflow-y:auto}.nav{display:flex;align-items:center;gap:14px;border:0;background:transparent;color:#2f425c;text-align:left;padding:14px 18px;margin:2px 10px;font-size:.83em;border-radius:12px;font-weight:650}.nav>span{font-size:1.3em}.nav:hover,.nav.active{background:var(--soft);color:#1244ad}.nav-heading{padding:18px 20px 4px;font-weight:800;color:#596780;display:flex;justify-content:space-between;font-size:.68em;letter-spacing:.06em}.nav-heading button{background:transparent;border:0;font-size:1.5em;color:var(--blue);padding:0 8px}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding:10px}.sidebar-bottom .caption{padding:8px}.main-area{min-width:0;display:flex;flex-direction:column;height:100dvh}.topbar{height:86px;display:flex;align-items:center;gap:16px;padding:14px 22px;border-bottom:1px solid var(--line);background:white;flex-shrink:0}.searchbox{display:flex;gap:12px;align-items:center;flex:1;max-width:1100px;min-width:0;background:#f3f6fb;border:2px solid #e6ebf3;border-radius:14px;padding:0 14px}.searchbox span{font-size:1.5em;color:#64758d}.searchbox input{border:none;background:transparent;min-width:0;font-size:.84em;width:100%;padding:14px 0}.searchbox input:focus{outline:none}.searchbox kbd{font-size:.58em;color:#718099;white-space:nowrap}.sync-chip{display:flex;align-items:center;gap:9px;font-size:.72em;font-weight:750;white-space:nowrap;color:#26744b;background:#e8f7ee;padding:9px 12px;border-radius:30px}.sync-chip.pending{color:#815a06;background:#fff5dc}.sync-chip.offline,.sync-chip.error{color:#a42d37;background:#fff0f0}.sync-chip .dot{height:12px;width:12px;border-radius:100%;background:#289454}.sync-chip.pending .dot{background:#d18f1d}.sync-chip.offline .dot,.sync-chip.error .dot{background:#c54049}.workspace{display:grid;grid-template-columns:minmax(280px,35%) minmax(0,1fr);min-height:0;flex:1}.list-pane{border-right:1px solid var(--line);overflow-y:auto;background:#fff}.list-header{padding:25px 22px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.list-header h1{font-size:1.36em;margin:0}.list-header p{font-size:.72em;color:var(--muted);margin:0}.filter-bar{display:flex;gap:7px;padding:7px 20px 17px;border-bottom:1px solid var(--line)}.small-chip{font-size:.66em;padding:8px 13px;background:#fff;border:1px solid #dce3ee;border-radius:30px;font-weight:700}.small-chip.chosen{background:#e9f0ff;color:#174bb2;border-color:#bad0ff}.items-list{padding:12px}.item-card{display:block;width:100%;padding:18px;border:1px solid transparent;border-radius:15px;text-align:left;background:#fff;margin:4px 0 8px}.item-card:hover,.item-card.selected{border-color:#c0d3fa;background:#f1f6ff}.item-card h3{font-size:.88em;line-height:1.34;margin:0 0 6px;overflow-wrap:anywhere}.item-card p{font-size:.7em;line-height:1.45;color:#5a6980;margin:0 0 12px;word-break:break-word}.item-card .meta{font-size:.61em;color:#65748b;display:flex;justify-content:space-between;gap:10px;align-items:center}.item-card mark, .note-body mark{background:#ffdb69;color:#24200f;padding:1px 2px;border-radius:3px}.note-body mark.current{background:#ffb52e;outline:2px solid #c77f00}.detail-pane{position:relative;background:var(--bg);overflow-y:auto;padding:24px clamp(16px,3vw,44px) 90px}.detail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:0 0 28px}.toolbar-actions{display:flex;gap:7px;flex-wrap:wrap}.note-heading h2{font-size:1.65em;margin:2px 0 6px;line-height:1.25;word-break:break-word}.note-heading small{display:block;margin:0 0 20px}.note-body{white-space:pre-wrap;line-height:1.75;word-wrap:break-word;font-size:1em;min-height:110px}.note-body .emptytext{color:#667790}.note-body img,.attachment-wrap img{display:block;max-width:100%;height:auto;border-radius:14px;border:1px solid #e3e9f2;margin:14px 0}.attachment-wrap{display:grid;gap:14px;margin:18px 0}.attachment-card{border:1px solid var(--line);padding:13px;background:#fff;border-radius:14px}.attachment-card audio{width:100%}.attachment-card .caption{overflow-wrap:anywhere}.attachment-card button{margin-top:10px}.match-navigation{display:flex;align-items:center;gap:10px;padding:12px;border-radius:12px;background:#fff1cd;margin:10px 0 22px;flex-wrap:wrap;font-weight:700;font-size:.76em}.iconbtn{height:44px;min-width:44px;padding:0 10px;border:1px solid var(--line);border-radius:11px;background:white;font-size:1em}.edit-fixed{margin-top:28px}.editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:15px}.note-title-input{font-size:1.23em;font-weight:800}.field-label{font-size:.7em;margin:2px 0 4px}.editor-hint{font-size:.68em;color:#64758d;margin:10px 0}.detail-pane textarea#noteBody{min-height:45vh;line-height:1.65;resize:vertical;font-size:1em}.task-form{max-width:790px}.detail-pane h2{font-size:1.35em}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.empty-state{max-width:530px;margin:17vh auto 0;text-align:center}.empty-state h2{margin-bottom:4px}.empty-state p{font-size:.84em;color:var(--muted)}.empty-icon{display:inline-grid;place-items:center;width:85px;height:85px;background:#e5eeff;color:var(--blue);border-radius:24px;font-size:2em}.settings-card{margin:20px 0;padding:24px;border-radius:17px;border:1px solid var(--line);background:#fff;max-width:820px}.settings-card h3{margin:0}.settings-card p{font-size:.82em;color:var(--muted)}.settings-card label{margin-top:16px}.modal-backdrop{position:fixed;inset:0;background:#0b1a35a1;display:grid;place-items:center;padding:20px;z-index:40}.modal{padding:27px;background:white;border-radius:18px;max-width:520px;width:100%;box-shadow:0 20px 70px #0003}.modal h2{margin-top:0}.modal p{font-size:.8em}.modal-actions{display:flex;justify-content:flex-end;gap:12px}.toast{position:fixed;top:90px;right:25px;z-index:60;background:#213b60;color:white;font-weight:650;padding:14px 21px;border-radius:12px;box-shadow:0 6px 18px #20385829;font-size:.76em;max-width:430px}.mobile-only{display:none}.muted{color:var(--muted)}.empty-list{padding:28px;text-align:center;color:#62728a;font-size:.82em}.task-badge{display:inline-block;padding:3px 9px;border-radius:8px;color:#784400;background:#fff2d5;font-weight:700}.task-badge.done{background:#e2f5e8;color:#23663d}.noteinline-image{margin:15px 0}.inline-audio{width:min(100%,520px);display:block;margin:15px 0}
@media(max-width:1050px){.app-shell{grid-template-columns:220px 1fr}.workspace{grid-template-columns:40% 60%}.sidebar .brand{padding:18px 10px}.topbar{padding:12px}.detail-pane{padding:20px}.list-header{padding:20px 12px}.list-header .btn{padding:10px}}
@media(max-width:760px){:root{--font:20px}.app-shell{display:block}.sidebar{width:min(78vw,300px);position:fixed;z-index:30;left:0;top:0;transform:translateX(-103%);transition:transform .2s;box-shadow:5px 0 28px #0001}.sidebar.open{transform:translateX(0)}.main-area{height:100dvh}.topbar{height:auto;min-height:70px;padding:10px;gap:8px}.mobile-only{display:inline-flex;align-items:center;justify-content:center}.searchbox{padding:0 8px}.searchbox input{padding:10px 0;font-size:.8em}.searchbox kbd{display:none}.sync-chip{font-size:.63em;padding:7px;gap:5px}.sync-chip .dot{width:9px;height:9px}.workspace{display:block;overflow-y:auto}.list-pane,.detail-pane{min-height:calc(100dvh - 75px);height:auto}.list-pane{border:0}.detail-pane{display:none}.workspace.detail-open .list-pane{display:none}.workspace.detail-open .detail-pane{display:block}.list-header{padding:20px 16px}.toolbar-actions{gap:5px}.detail-toolbar{padding-bottom:18px}.btn{font-size:.72em;padding:9px 11px}.note-heading h2{font-size:1.42em}.form-grid{grid-template-columns:1fr}.editor-head{display:block}.editor-head .toolbar-actions{margin-top:10px}.empty-state{margin:9vh auto}.toast{right:10px;left:10px;top:75px}}
/* DNotes 1.1 personal layout enhancements. Always light and high contrast. */
html,body{font-family:var(--app-font,system-ui,-apple-system,"Segoe UI",sans-serif)}
.brand-icon{overflow:hidden}.brand-icon .custom-logo{width:100%;height:100%;object-fit:contain;background:white;border-radius:inherit}.brand-icon:has(.custom-logo:not(.hidden)){background:white;border:1px solid var(--line)}
.filter-spacer{flex:1;min-width:6px}.filter-bar{flex-wrap:wrap;align-items:center}.filter-bar .small-chip{min-height:36px}
.items-list.grid-layout{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));align-content:start;align-items:start;gap:14px;padding:20px}
.items-list.grid-layout .item-card{margin:0;min-height:170px}
.item-card.styled-note{background-color:var(--note-bg,#fff);background-image:var(--note-pattern-image,none);box-shadow:0 2px 11px #243b5712;border:1px solid #e5e8ed;overflow:hidden}
.item-card.styled-note[data-pattern="lines"]{background-image:repeating-linear-gradient(0deg,transparent 0px,transparent 30px,#77899b13 31px,#77899b13 32px)}
.item-card.styled-note[data-pattern="dots"]{background-image:radial-gradient(#607b9220 1px,transparent 1.5px);background-size:19px 19px}
.item-card.styled-note[data-pattern="waves"]{background-image:radial-gradient(ellipse at 100% 0%,#ffffffb8 0%,transparent 48%),radial-gradient(ellipse at 0% 100%,#9eb5d020 0%,transparent 55%)}
.item-card.styled-note h3{color:var(--note-heading,#1b2b43);font-size:.95em}
.card-cover{margin:-18px -18px 14px;max-height:245px;overflow:hidden;background:#eff1f3}
.card-cover img{display:block;width:100%;height:100%;max-height:245px;object-fit:cover}
.item-card .meta strong{white-space:nowrap;font-size:1.05em;color:var(--blue)}
.workspace.grid-browse:not(.detail-open){grid-template-columns:1fr}
.workspace.grid-browse:not(.detail-open) .detail-pane{display:none}
.workspace.grid-browse.detail-open{grid-template-columns:minmax(280px,37%) minmax(0,1fr)}
.workspace.grid-browse.detail-open .items-list.grid-layout{grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px}
.note-style-bar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid #dfe5ed;border-radius:14px;background:#fff;margin-bottom:19px}
.note-style-bar label{font-size:.68em;margin:0;flex:1 1 130px;min-width:110px}
.note-style-bar select{padding:10px;margin:4px 0 0;min-height:44px;font-size:1em}
#noteDetail{background-color:var(--note-bg,#fff);border-radius:22px;padding:14px 18px 32px;min-height:calc(100vh - 150px);border:1px solid #e6ebf2}
#noteDetail[data-pattern="lines"]{background-image:repeating-linear-gradient(0deg,transparent 0px,transparent 41px,#71829617 42px,#71829617 43px)}
#noteDetail[data-pattern="dots"]{background-image:radial-gradient(#607b921f 1px,transparent 1.5px);background-size:23px 23px}
#noteDetail[data-pattern="waves"]{background-image:radial-gradient(ellipse at 90% 5%,#ffffffbd 0%,transparent 55%),radial-gradient(ellipse at 5% 90%,#a5b5d626 0%,transparent 60%)}
#readTitle{color:var(--note-heading,#1b2b43)}
#readTitle mark{background:#ffe17d;color:#30230a;border-radius:4px;padding:2px}
#readTitle mark.current{outline:2px solid #cc8804;background:#ffbd46}
.match-navigation{position:sticky;top:0;z-index:8;background:#fff5d8;border:1px solid #efd697;box-shadow:0 4px 14px #5d4c1914;gap:10px}
.match-navigation .iconbtn{font-size:1.12em;font-weight:800;min-width:48px}
.image-drop-zone{border:2px dashed #94a7bc;border-radius:14px;padding:20px;background:#ffffffbf;text-align:center;font-size:.7em;color:#4c617c;margin:13px 0;cursor:default}
.image-drop-zone.dragging{background:#e2f3ff;border-color:var(--blue);color:var(--blue)}
.note-gallery{margin:12px 0 26px}.note-gallery .caption{font-weight:750;margin-bottom:8px}.photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:7px;max-height:360px;overflow-y:auto;border-radius:14px}
.photo-tile{min-height:105px;max-height:210px;overflow:hidden;background:#f0f2f6;border-radius:10px}.photo-tile img{width:100%;height:100%;object-fit:cover;margin:0;border:0;border-radius:10px}
.noteinline-image img{max-height:700px;object-fit:contain}
.photo-dialog{width:min(95vw,1100px);max-height:93vh;border:0;border-radius:18px;background:#fafafa;padding:15px;box-shadow:0 18px 80px #0007;position:fixed}
.photo-dialog::backdrop{background:#131927d9}.photo-dialog img{display:block;object-fit:contain;width:100%;max-height:calc(93vh - 80px);margin:10px auto}.photo-close{float:right}
.accent-swatches{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px}.accent-swatches button{width:42px;height:42px;border:3px solid white;border-radius:50%;background:var(--swatch);box-shadow:0 0 0 1px #b4c0d2}.accent-swatches button:hover{box-shadow:0 0 0 3px var(--swatch)}
.brand-preview{display:flex;align-items:center;gap:20px;margin:12px 0}.brand-preview img{max-width:100px;max-height:100px;object-fit:contain;padding:5px;border-radius:12px;background:#f7f9ff;border:1px solid var(--line)}
.fab-voice{position:fixed;bottom:24px;right:25px;z-index:20;background:var(--blue);border:2px solid white;box-shadow:0 7px 24px #14264e44;color:white;border-radius:24px;padding:14px 21px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:18px;font-weight:750}
.fab-voice:hover{filter:brightness(.94)}
#taskDetail,#settingsDetail{padding-right:3px}
@media(max-width:760px){
 .fab-voice{right:16px;bottom:calc(14px + env(safe-area-inset-bottom));padding:15px;border-radius:40px;width:62px;height:62px;font-size:25px}
 .fab-voice span{display:none}
 .workspace.grid-browse.detail-open{display:block}
 .workspace.grid-browse.detail-open .detail-pane{display:block}
 .note-style-bar{gap:7px;padding:10px}
 .note-style-bar label{flex:1 1 95px;font-size:.64em}
 #noteDetail{padding:12px 12px 30px;border-radius:14px}
 .match-navigation{top:0;gap:7px;flex-wrap:wrap}
 .match-navigation .iconbtn{min-width:45px}
 .items-list.grid-layout{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:10px}
 .items-list.grid-layout .item-card{padding:12px;min-height:160px}
 .items-list.grid-layout .card-cover{margin:-12px -12px 10px}
 .items-list.grid-layout .item-card h3{font-size:.78em}
 .items-list.grid-layout .item-card p{font-size:.63em}
 .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .detail-pane{padding-bottom:110px}
 .filter-bar{padding:8px}
}
.list-create-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.item-card.styled-note[data-pattern="botanical"],#noteDetail[data-pattern="botanical"]{background-image:url('backgrounds/botanical.svg');background-size:560px 400px;background-repeat:repeat}
.item-card.styled-note[data-pattern="geometric"],#noteDetail[data-pattern="geometric"]{background-image:url('backgrounds/geometric.svg');background-size:600px 400px;background-repeat:repeat}
.item-card.styled-note[data-pattern="clouds"],#noteDetail[data-pattern="clouds"]{background-image:url('backgrounds/clouds.svg');background-size:600px 400px;background-repeat:repeat}
@media(max-width:760px){.list-create-actions .btn{padding:8px;font-size:.66em}}

/* Keep controls readable at the larger accessibility text sizes. */
.item-card p{font-size:.8em}.item-card .meta{font-size:.72em}.item-card .meta strong{font-size:1em}.editor-hint,.field-label,.caption{font-size:.76em}.small-chip{font-size:.72em}.settings-card p{font-size:.88em}.note-style-bar label{font-size:.74em}
@media(max-width:760px){.items-list.grid-layout .item-card p{font-size:.73em}.items-list.grid-layout .item-card h3{font-size:.83em}}

.workspace.settings-view{grid-template-columns:minmax(0,1fr)}.workspace.settings-view .list-pane{display:none}.workspace.settings-view .detail-pane{display:block}.workspace.settings-view .settings-card{max-width:1000px}.nav#settingsNav.active{background:var(--soft);color:var(--blue)}

/* DNotes 1.2: accessible reminder hub, SMTP and voice review */
.reminder-preview{background:#eff8f2;border:1px solid #a8d5bc;border-radius:10px;padding:13px;color:#17442e;font-weight:700;font-size:.84em}
.unread-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:2px 6px;border-radius:20px;background:#b5383f;color:white;font-size:13px;font-weight:850}
.reminder-feed{display:flex;flex-direction:column;gap:12px;margin:24px 0}.reminder-entry{display:flex;flex-direction:column;gap:7px;text-align:left;font:inherit;background:white;padding:18px;border-radius:14px;border:1px solid #c8d4e5;cursor:pointer;color:#18324c}.reminder-entry.unread{border-left:6px solid #187a51;background:#f0fff6}.reminder-entry span{font-size:.75em;color:#50637b}
.voice-review{max-height:90dvh;overflow:auto;max-width:680px}.voice-review label{margin-top:12px}.voice-review textarea{resize:vertical}.voice-review .modal-actions{position:sticky;bottom:-27px;background:white;padding-top:15px;padding-bottom:8px;z-index:2}#voiceProgress{background:#edf4ff;border-radius:10px;padding:10px;color:#27518c}#voiceWarning{color:#69491c;background:#fff8e8;padding:10px;border-radius:9px}
#reminderBell{min-width:44px;position:relative;font-size:24px}#reminderBell .unread-count{position:absolute;top:-5px;right:-3px}.task-form .checkline{display:flex;align-items:center;gap:10px}
@media(max-width:760px){.voice-review{padding:15px;max-height:95dvh}.voice-review label{font-size:.82em}.voice-review .modal-actions{bottom:-15px}.reminder-entry{padding:15px}#reminderBell{font-size:19px;min-width:30px}.topbar .searchbox{min-width:0}}
