:root{--app-bg:#fff;--sidebar:#f7f7f5;--panel:#fbfbfa;--text:#37352f;--muted:#787774;--muted-strong:#5f5e5b;--line:#ededeb;--line-strong:#dfdfdd;--hover:#efefed;--selected:#e8e7e4;--danger:#c83c32;--blue:#0b6e99}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{background:var(--app-bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer}h1,h2,p{margin:0}.notes-app{background:var(--app-bg);grid-template-columns:250px 330px minmax(0,1fr);height:100vh;display:grid;overflow:hidden}.sidebar{background:var(--sidebar);border-right:1px solid var(--line);flex-direction:column;min-width:0;padding:10px 8px;display:flex}.workspace-switcher,.sidebar-heading,.list-title-row,.editor-toolbar,.editor-actions,.folder-item span,.note-row-title,.search-field,.breadcrumb{align-items:center;display:flex}.workspace-switcher{border-radius:6px;gap:9px;min-height:38px;padding:5px 8px}.workspace-switcher:hover{background:var(--hover)}.workspace-avatar{color:var(--text);background:#dfdfdd;border-radius:4px;flex:none;justify-content:center;align-items:center;width:24px;height:24px;font-size:13px;font-weight:700;display:inline-flex}.workspace-switcher span:last-child{min-width:0;display:grid}.workspace-action{margin-left:auto}.workspace-switcher strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.15;overflow:hidden}.workspace-switcher small{color:var(--muted);font-size:11px;line-height:1.25}.sidebar-heading{justify-content:space-between;margin:18px 0 6px;padding:0 6px}h1{color:var(--muted);letter-spacing:0;text-transform:uppercase;font-size:12px;font-weight:650}.toolbar-button{color:var(--muted);background:0 0;border:0;border-radius:5px;justify-content:center;align-items:center;width:28px;height:28px;padding:0;display:inline-flex}.toolbar-button:hover{background:var(--hover);color:var(--text)}.toolbar-button.danger:hover{color:var(--danger);background:#f5dfdd}.folder-list{gap:1px;display:grid}.folder-item{color:var(--muted-strong);text-align:left;background:0 0;border:0;border-radius:5px;justify-content:space-between;align-items:center;min-height:30px;padding:0 8px;font-size:14px;font-weight:500;display:flex}.folder-item:hover,.folder-item.active{background:var(--hover)}.folder-item span{gap:7px;min-width:0}.folder-item svg{color:var(--muted);flex:none}.folder-item strong{color:var(--muted);font-size:12px;font-weight:500}.notes-list-pane{background:var(--panel);border-right:1px solid var(--line);flex-direction:column;min-width:0;padding:12px 10px;display:flex}.search-field{color:var(--muted);background:#f1f1ef;border:1px solid #0000;border-radius:5px;gap:7px;min-height:32px;padding:0 9px}.search-field:focus-within{border-color:var(--line-strong);background:#fff}.search-field input{color:var(--text);background:0 0;border:0;outline:none;width:100%;min-width:0}.list-title-row{justify-content:space-between;padding:18px 4px 8px}h2{color:var(--text);letter-spacing:0;font-size:18px;font-weight:650}.list-title-row span{color:var(--muted);font-size:12px;font-weight:500}.notes-list{gap:2px;padding-bottom:8px;display:grid;overflow:auto}.note-row{color:var(--text);text-align:left;background:0 0;border:0;border-radius:6px;gap:5px;min-height:82px;padding:10px;display:grid}.note-row:hover{background:var(--hover)}.note-row.active{background:var(--selected)}.note-row-title{text-overflow:ellipsis;white-space:nowrap;gap:6px;min-width:0;font-size:14px;font-weight:650;line-height:1.25;overflow:hidden}.note-row-title svg{color:var(--muted);flex:none}.note-row-preview,.note-row-meta{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.35;display:block;overflow:hidden}.empty-list,.empty-editor{color:var(--muted);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:10px;display:flex}.empty-list{min-height:260px}.editor-pane{background:var(--app-bg);flex-direction:column;min-width:0;display:flex}.editor-toolbar{border-bottom:1px solid #0000;justify-content:space-between;gap:16px;min-height:46px;padding:0 12px}.editor-toolbar:hover{border-bottom-color:var(--line)}.editor-meta{color:var(--muted);min-width:0;font-size:13px}.breadcrumb{gap:7px}.breadcrumb strong{color:var(--muted-strong);text-overflow:ellipsis;white-space:nowrap;max-width:260px;font-weight:500;overflow:hidden}.breadcrumb time{border-left:1px solid var(--line-strong);white-space:nowrap;margin-left:2px;padding-left:9px}.editor-actions{gap:4px}.editor-mode-toggle{border:1px solid var(--line);background:0 0;border-radius:5px;gap:1px;margin-right:6px;padding:2px;display:flex}.editor-mode-toggle button{color:var(--muted);white-space:nowrap;background:0 0;border:0;border-radius:4px;align-items:center;gap:5px;min-height:25px;padding:0 8px;font-size:12px;font-weight:500;display:inline-flex}.editor-mode-toggle button:hover{background:var(--hover)}.editor-mode-toggle button.active{background:var(--selected);color:var(--text)}.editor-surface{flex-direction:column;flex:1;width:100%;max-width:900px;margin:0 auto;padding:78px 88px 44px;display:flex}.page-icon{color:var(--muted);margin-bottom:14px;font-family:ui-monospace,SF Mono,Menlo,Monaco,Consolas,monospace;font-size:52px;font-weight:650;line-height:1}.note-title-input,.note-body-input{color:var(--text);background:0 0;border:0;outline:none;width:100%;padding:0}.note-title-input{letter-spacing:0;margin-bottom:18px;font-size:44px;font-weight:700;line-height:1.12}.note-title-input::placeholder,.note-body-input::placeholder{color:#b8b8b5}.note-body-input{resize:none;white-space:pre-wrap;flex:1;min-height:360px;font-size:16px;line-height:1.75}.markdown-preview{color:var(--text);overflow-wrap:anywhere;flex:1;min-height:360px;padding-bottom:24px;font-size:16px;line-height:1.75;overflow:auto}.markdown-preview>:first-child{margin-top:0}.markdown-preview h1,.markdown-preview h2,.markdown-preview h3,.markdown-preview p,.markdown-preview ul,.markdown-preview ol,.markdown-preview blockquote,.markdown-preview pre{margin:0 0 12px}.markdown-preview h1,.markdown-preview h2,.markdown-preview h3{letter-spacing:0;line-height:1.25}.markdown-preview h1{font-size:32px;font-weight:700}.markdown-preview h2{font-size:24px;font-weight:650}.markdown-preview h3{font-size:19px;font-weight:650}.markdown-preview a{color:var(--blue);text-underline-offset:2px;text-decoration:underline}.markdown-preview code{color:#eb5757;background:#87837826;border-radius:4px;padding:.12em .28em;font-family:ui-monospace,SF Mono,Menlo,Monaco,Consolas,monospace;font-size:.9em}.markdown-preview pre{background:#f7f6f3;border-radius:6px;padding:14px 16px;overflow:auto}.markdown-preview pre span{color:var(--muted);margin-bottom:8px;font-family:ui-monospace,SF Mono,Menlo,Monaco,Consolas,monospace;font-size:12px;display:block}.markdown-preview pre code{color:var(--text);white-space:pre;background:0 0;padding:0;display:block}.markdown-preview blockquote{border-left:3px solid var(--line-strong);color:var(--muted-strong);padding-left:14px}.markdown-preview ul,.markdown-preview ol{padding-left:24px}.markdown-preview li{margin:3px 0}.markdown-preview .task-item{align-items:flex-start;gap:8px;margin-left:-22px;list-style:none;display:flex}.markdown-preview .task-item input{accent-color:var(--text);flex:none;margin-top:7px}.markdown-preview hr{border:0;border-top:1px solid var(--line-strong);margin:22px 0}.preview-placeholder{color:#b8b8b5}.empty-editor{flex:1;font-size:15px}.auth-page{background:var(--app-bg);align-items:center;min-height:100vh;padding:24px;display:flex}.auth-panel{border:1px solid var(--line);border-radius:8px;gap:14px;width:100%;max-width:380px;margin:0 auto;padding:28px;display:grid}.auth-panel h1{color:var(--text);letter-spacing:0;text-transform:none;font-size:22px;font-weight:700}.auth-icon{background:var(--hover);color:var(--muted-strong);border-radius:6px;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex}.auth-panel label{color:var(--muted-strong);gap:7px;font-size:13px;display:grid}.auth-panel input{border:1px solid var(--line-strong);color:var(--text);border-radius:5px;outline:none;min-height:38px;padding:0 10px}.auth-panel input:focus{border-color:var(--blue)}.primary-button,.text-button{border-radius:5px;min-height:38px}.primary-button{background:var(--text);color:#fff;border:0;padding:0 12px;font-weight:650}.primary-button:disabled{cursor:default;opacity:.65}.text-button{color:var(--muted-strong);background:0 0;border:0}.text-button:hover{background:var(--hover)}.auth-message,.setup-copy{color:var(--muted-strong);font-size:13px;line-height:1.5}@media (max-width:980px){.notes-app{grid-template-columns:230px minmax(280px,36%) minmax(0,1fr)}.editor-surface{padding:62px 44px 36px}}@media (max-width:760px){.notes-app{grid-template-columns:1fr;height:auto;min-height:100vh}.sidebar{border-bottom:1px solid var(--line);border-right:0}.folder-list{grid-template-columns:repeat(2,minmax(0,1fr))}.notes-list-pane{border-bottom:1px solid var(--line);border-right:0;max-height:44vh}.editor-surface{min-height:54vh;padding:42px 22px 28px}.note-title-input{font-size:34px}}@media (max-width:520px){.editor-toolbar{flex-direction:column;align-items:flex-start;gap:8px;padding:10px}.editor-actions{flex-wrap:wrap}.folder-list{grid-template-columns:1fr}}
