*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{font-family:Segoe UI,Microsoft JhengHei,system-ui,sans-serif;color:#24292f;background:#f6f8fa}button{cursor:pointer;font:inherit}.center{display:flex;align-items:center;justify-content:center;height:100%}.auth-card{background:#fff;border:1px solid #d0d7de;border-radius:8px;padding:32px;width:340px;display:flex;flex-direction:column;gap:10px}.auth-card h1{font-size:20px;margin-bottom:8px}.auth-card input{padding:8px;border:1px solid #d0d7de;border-radius:6px}.auth-card button{padding:8px;background:#1f883d;color:#fff;border:none;border-radius:6px}.auth-card .error{color:#cf222e;font-size:13px}.token-box{word-break:break-all;background:#f6f8fa;padding:8px;border-radius:6px;font-size:12px}.dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;background:#0006;display:flex;align-items:center;justify-content:center}.drawer-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:90;background:#0006}.drawer{position:absolute;top:0;left:0;bottom:0;width:min(85vw,360px);background:#fff;box-shadow:2px 0 12px #0000004d;display:flex;flex-direction:column}.drawer .note-list{border-right:none;flex:1}.editor-mobile-bar{display:flex;gap:8px}.auth-card button.secondary{background:#f6f8fa;color:#1f2328;border:1px solid #d0d7de}.sidebar-foot{margin-top:24px;padding-top:8px;border-top:1px solid #30363d}.app-version{color:#8b949e;font-size:11px;padding:6px 8px}.layout{display:grid;grid-template-columns:240px 320px 1fr;height:100%}.sidebar{background:#21262d;color:#e6edf3;overflow-y:auto;padding:12px 8px}.note-list{background:#fff;border-right:1px solid #d0d7de;overflow-y:auto}.editor-pane{background:#fff;overflow-y:auto;display:flex;flex-direction:column}.sidebar .nav{display:block;width:100%;text-align:left;background:none;border:none;color:inherit;padding:6px 10px;border-radius:6px;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar .nav.active,.sidebar .nav-row.active{background:#388bfd33;border-radius:6px}.sidebar .section-head{display:flex;justify-content:space-between;align-items:center;margin:14px 6px 4px;color:#8b949e;font-size:12px}.sidebar .section-head h2{font-size:12px;font-weight:600;text-transform:none}.sidebar .section-head button{background:none;border:none;color:#8b949e;font-size:14px}.sidebar .stack-name{padding:6px 10px 2px;font-size:12px;color:#8b949e}.sidebar .nav-row{display:flex;align-items:center}.sidebar .nav-row .row-actions{display:none;flex-shrink:0}.sidebar .nav-row:hover .row-actions{display:inline-flex;gap:2px}.sidebar .row-actions button{background:none;border:none;color:#8b949e;font-size:12px;padding:2px}.list-head{padding:10px;border-bottom:1px solid #d0d7de;display:flex;gap:8px}.list-head button{padding:6px 12px;background:#1f883d;color:#fff;border:none;border-radius:6px}.list-head button:disabled{opacity:.5}.note-list ul{list-style:none}.note-list li{position:relative;border-bottom:1px solid #eaeef2}.note-list li.active{background:#ddf4ff}.note-list .note-item{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;background:none;border:none;padding:10px 12px}.note-list .snippet{font-size:12px;color:#57606a;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.note-list time{font-size:11px;color:#8b949e}.note-list .note-delete{position:absolute;top:8px;right:8px;display:none;background:none;border:none;font-size:12px}.note-list li:hover .note-delete{display:block}.note-list .empty{padding:20px;color:#8b949e;text-align:center}.editor-empty{display:flex;align-items:center;justify-content:center;height:100%;color:#8b949e}.search-input{flex:1;min-width:0;padding:6px 10px;border:1px solid #d0d7de;border-radius:6px;font-size:13px}.search-status{padding:20px;color:#8b949e;text-align:center;font-size:13px}.editor{display:flex;flex-direction:column;height:100%}.editor-head{display:flex;align-items:center;gap:8px;padding:10px 16px 0}.title-input{flex:1;border:none;outline:none;font-size:22px;font-weight:600}.save-state{font-size:12px;color:#8b949e;white-space:nowrap}.toolbar{display:flex;flex-wrap:wrap;gap:2px;padding:8px 16px;border-bottom:1px solid #eaeef2}.toolbar button{min-width:30px;padding:4px 6px;background:none;border:1px solid transparent;border-radius:6px;font-size:13px}.toolbar button:hover{background:#f3f4f6}.toolbar button.active{background:#ddf4ff;border-color:#54aeff}.editor-body{flex:1;overflow-y:auto}.editor-body .ProseMirror{min-height:100%;padding:16px;outline:none;line-height:1.7}.editor-body .ProseMirror h1{margin:.6em 0 .3em}.editor-body .ProseMirror h2{margin:.5em 0 .25em}.editor-body .ProseMirror p{margin:.25em 0}.editor-body .ProseMirror ul,.editor-body .ProseMirror ol{padding-left:1.4em}.editor-body .ProseMirror ul[data-type=taskList]{list-style:none;padding-left:.2em}.editor-body .ProseMirror ul[data-type=taskList] li{display:flex;gap:6px}.editor-body .ProseMirror table{border-collapse:collapse;margin:.5em 0}.editor-body .ProseMirror th,.editor-body .ProseMirror td{border:1px solid #d0d7de;padding:4px 8px;min-width:60px}.editor-body .ProseMirror th{background:#f6f8fa}.editor-body .ProseMirror pre{background:#161b22;color:#e6edf3;padding:12px;border-radius:6px;overflow-x:auto}.editor-body .ProseMirror mark{background:#fff8c5}.editor-body .ProseMirror img{max-width:100%;height:auto}.editor-body .ProseMirror a{color:#0969da}.editor-body .ProseMirror .attachment-card{display:inline-block;padding:8px 14px;margin:4px 0;background:#f6f8fa;border:1px solid #d0d7de;border-radius:8px;color:#24292f;text-decoration:none;font-size:14px}.editor-body .ProseMirror .attachment-card:hover{background:#eaeef2}.back-btn{background:none;border:none;color:#0969da;font-size:14px;padding:4px 8px}.list-head .back-btn{background:none;color:#0969da;padding:4px 8px;border:none}.editor-pane .back-btn{align-self:flex-start;margin:8px 8px 0}@media(max-width:768px){.layout.mobile{grid-template-columns:1fr}.layout.mobile>.sidebar,.layout.mobile>.note-list,.layout.mobile>.editor-pane{display:none}.layout.mobile.pane-sidebar>.sidebar{display:block}.layout.mobile.pane-list>.note-list{display:block}.layout.mobile.pane-editor>.editor-pane{display:flex}}.sync-indicator{position:relative}.sync-indicator[data-state=offline] .sync-btn{color:#b8860b}.sync-indicator[data-state=error] .sync-btn{color:#b00020}.sync-panel{position:absolute;right:0;top:100%;z-index:30;background:#fff;border:1px solid #ccc;border-radius:6px;padding:10px;width:220px;display:flex;flex-direction:column;gap:6px;font-size:13px;box-shadow:0 2px 8px #00000026}.sync-panel input{width:110px}.sync-errors{margin:0;padding:6px 0 0;border-top:1px solid #eee;list-style:none;display:flex;flex-direction:column;gap:4px;max-height:180px;overflow-y:auto}.sync-errors li{display:flex;flex-direction:column}.sync-errors .sync-error-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sync-errors .sync-error-detail{color:#b00020;font-size:12px;word-break:break-all}.toasts{position:fixed;right:16px;bottom:16px;z-index:40;display:flex;flex-direction:column;gap:8px}.toast{background:#333;color:#fff;border-radius:6px;padding:8px 10px;display:flex;align-items:center;gap:8px;max-width:320px}.toast button{background:none;border:none;color:inherit;cursor:pointer;text-align:left}.editor-body img.offline-missing{min-width:120px;min-height:80px;background:#eee url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="80"><rect width="120" height="80" fill="%23eeeeee"/><text x="60" y="45" font-size="12" text-anchor="middle" fill="%23999999">離線</text></svg>') center no-repeat}
