:root{--bg-primary: #1e1e2e;--bg-secondary: #181825;--bg-surface: #313244;--text-primary: #cdd6f4;--text-secondary: #a6adc8;--text-muted: #6c7086;--accent: #89b4fa;--accent-hover: #74c7ec;--danger: #f38ba8;--danger-hover: #eba0ac;--success: #a6e3a1;--border: #45475a;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px)}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg-primary);color:var(--text-primary);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.app-container{display:flex;height:100%;outline:none;position:relative;overflow:hidden}.app-header{display:flex;align-items:center;justify-content:space-between;height:56px;padding:0 16px;padding-top:var(--safe-top);background:var(--bg-secondary);border-bottom:1px solid var(--border);flex-shrink:0}.app-header h1{font-size:20px;font-weight:700;color:var(--accent)}.app-header .header-actions{display:flex;gap:8px;align-items:center}.note-list-view{flex:1;display:flex;flex-direction:column;overflow:hidden}.tag-filter{display:flex;flex-wrap:wrap;gap:6px;padding:12px 16px;border-bottom:1px solid var(--border);overflow-x:auto}.tag-chip{padding:6px 14px;border-radius:16px;font-size:13px;white-space:nowrap;background:var(--bg-surface);color:var(--text-secondary);cursor:pointer;transition:all .15s;min-height:36px;display:flex;align-items:center}.tag-chip:active{background:var(--accent);color:var(--bg-primary)}.tag-chip.active{background:var(--accent);color:var(--bg-primary);font-weight:600}.note-list{flex:1;overflow-y:auto;padding:8px 12px 80px;-webkit-overflow-scrolling:touch}.note-item{padding:14px 16px;border-radius:10px;cursor:pointer;margin-bottom:4px;display:flex;flex-direction:column;gap:4px;min-height:60px;justify-content:center}.note-item:active{background:var(--bg-surface)}.note-item .note-title{font-size:16px;font-weight:500}.note-item .note-date{font-size:12px;color:var(--text-muted)}.note-item .note-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:2px}.note-item .note-tag{font-size:10px;padding:2px 8px;border-radius:8px;background:var(--bg-surface);color:var(--accent)}.empty-notes{padding:48px 24px;text-align:center;color:var(--text-muted);font-size:14px}.editor-view{position:absolute;top:0;left:0;right:0;bottom:0;background:var(--bg-primary);display:flex;flex-direction:column;z-index:10}.editor-toolbar{display:flex;align-items:center;gap:12px;height:56px;padding:0 12px;padding-top:var(--safe-top);background:var(--bg-secondary);border-bottom:1px solid var(--border);flex-shrink:0}.btn-back{width:40px;height:40px;border:none;border-radius:8px;background:transparent;color:var(--text-primary);font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.btn-back:active{background:var(--bg-surface)}.editor-toolbar .note-path{flex:1;font-size:12px;color:var(--text-muted);font-family:monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-toolbar .toolbar-actions{display:flex;gap:6px;flex-shrink:0}.btn-icon{width:40px;height:40px;border:none;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}.btn-save-mobile{background:var(--bg-surface);color:var(--text-muted);padding:0 12px;width:auto}.btn-save-mobile.dirty{background:var(--accent);color:var(--bg-primary)}.btn-save-mobile:disabled{opacity:.5}.btn-delete-mobile{background:transparent;color:var(--text-muted)}.btn-delete-mobile:active{color:var(--danger)}.editor{flex:1;border:none;background:var(--bg-primary);color:var(--text-primary);font-family:Cascadia Code,Fira Code,monospace;font-size:15px;line-height:1.7;padding:16px 16px 40px;padding-bottom:calc(40px + var(--safe-bottom));resize:none;outline:none}.editor::placeholder{color:var(--text-muted)}.fab{position:fixed;bottom:24px;right:20px;bottom:calc(24px + var(--safe-bottom));width:56px;height:56px;border-radius:50%;border:none;background:var(--accent);color:var(--bg-primary);font-size:28px;cursor:pointer;box-shadow:0 4px 16px #0006;display:flex;align-items:center;justify-content:center;z-index:20;transition:transform .2s}.fab:active{transform:scale(.95)}.new-note-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;z-index:30;display:flex;align-items:flex-end}.new-note-sheet{width:100%;background:var(--bg-secondary);border-radius:20px 20px 0 0;padding:20px 16px;padding-bottom:calc(20px + var(--safe-bottom));animation:slideUp .25s ease-out}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}.new-note-sheet h3{font-size:17px;margin-bottom:16px;color:var(--text-primary)}.new-note-input{width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--bg-primary);color:var(--text-primary);font-size:15px;font-family:monospace;outline:none;margin-bottom:14px}.new-note-input:focus{border-color:var(--accent)}.new-note-actions{display:flex;justify-content:flex-end;gap:10px}.btn-cancel{padding:10px 20px;border:none;border-radius:10px;background:var(--bg-surface);color:var(--text-secondary);font-size:15px;cursor:pointer}.btn-create{padding:10px 20px;border:none;border-radius:10px;background:var(--accent);color:var(--bg-primary);font-size:15px;font-weight:600;cursor:pointer}.confirm-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;z-index:30;display:flex;align-items:center;justify-content:center}.confirm-sheet{width:300px;background:var(--bg-secondary);border-radius:16px;padding:24px 20px;animation:fadeIn .2s}@keyframes fadeIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.confirm-sheet h3{font-size:17px;margin-bottom:8px}.confirm-sheet p{font-size:14px;color:var(--text-muted);margin-bottom:20px}.confirm-actions{display:flex;justify-content:flex-end;gap:10px}.btn-confirm-cancel{padding:10px 20px;border:none;border-radius:10px;background:var(--bg-surface);color:var(--text-secondary);font-size:15px;cursor:pointer}.btn-confirm-delete{padding:10px 20px;border:none;border-radius:10px;background:var(--danger);color:var(--bg-primary);font-size:15px;font-weight:600;cursor:pointer}.loading{flex:1;display:flex;align-items:center;justify-content:center;color:var(--text-muted)}.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--text-muted);padding:24px}.empty-icon{width:64px;height:64px;margin-bottom:16px;opacity:.8}.empty-icon svg{width:100%;height:100%}.empty-state h2{font-size:24px;font-weight:700;color:var(--accent)}.empty-state p{font-size:14px;text-align:center}@media(min-width:768px){.app-header,.fab{display:none}.app-container{flex-direction:row}.note-list-view{width:280px;min-width:280px;flex:none;background:var(--bg-secondary);border-right:1px solid var(--border)}.note-list-view .app-header{display:flex;height:48px;padding:16px;background:transparent;border-bottom:1px solid var(--border)}.note-list-view .app-header h1{font-size:18px}.tag-filter{padding:10px 16px}.tag-chip{padding:4px 10px;font-size:11px;min-height:auto}.note-list{padding:8px}.note-item{padding:10px 12px;min-height:auto;border-radius:6px}.note-item:hover{background:var(--bg-surface)}.note-item .note-title{font-size:14px}.note-item.active{background:var(--accent);color:var(--bg-primary)}.note-item.active .note-date{color:#1e1e2e99}.note-list-view .sidebar-footer{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-top:1px solid var(--border);font-size:12px;color:var(--text-muted)}.editor-view{position:relative;flex:1;min-width:0;top:auto;left:auto;right:auto;bottom:auto;z-index:auto}.editor-toolbar{height:48px;padding-top:0}.btn-back{display:none}.editor{padding:24px 32px}.btn-save-mobile{min-width:70px}.new-note-overlay{position:static;background:none;z-index:auto;display:block;border-bottom:1px solid var(--border)}.new-note-sheet{border-radius:0;padding:12px 16px;animation:none}.new-note-sheet h3{display:none}.confirm-overlay{background:#00000080}}
