*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}:root{--bg: #1e1e1e;--bg-elev: #2a2a2a;--bg-elev-2: #353535;--border: #3a3a3a;--text: #f0f0f0;--text-muted: #9b9b9b;--text-dim: #6b6b6b;--primary: #ff6363;--primary-hover: #ff7676;--success: #4caf50;--error: #f44336;--warning: #ff9800;--radius: 10px;--radius-sm: 6px;--gap: 14px;--safe-top: env(safe-area-inset-top, 0);--safe-bottom: env(safe-area-inset-bottom, 0)}html,body,#root{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Inter,system-ui,sans-serif;font-size:16px;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;overscroll-behavior-y:contain}button{font-family:inherit;font-size:inherit;color:inherit;background:none;border:none;cursor:pointer}input,textarea,select{font-family:inherit;font-size:16px;color:var(--text);background:transparent;border:none;outline:none}input::placeholder,textarea::placeholder{color:var(--text-dim)}hr{border:none;border-top:1px solid var(--border);margin:8px 0}.muted{color:var(--text-muted)}.small{font-size:13px}code{background:var(--bg-elev);padding:2px 5px;border-radius:4px;font-size:13px}.setup-warning{background:#ff98001a;border:1px solid var(--warning);border-radius:var(--radius);padding:14px 16px;font-size:14px;line-height:1.45;margin-bottom:8px}.setup-warning strong{display:block;margin-bottom:6px}.setup-warning p{margin:6px 0}.setup-warning ol{padding-left:18px;margin:8px 0}.setup-warning li{margin-bottom:4px}.setup{padding:calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));max-width:480px;margin:0 auto;display:flex;flex-direction:column;gap:16px}.setup h1{margin:8px 0 0;font-size:28px}.setup label{display:flex;flex-direction:column;gap:6px}.setup label span{font-size:13px;color:var(--text-muted)}.setup input{background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px}.form{display:flex;flex-direction:column;flex:1;min-height:0}.form-header{position:sticky;top:0;z-index:5;background:var(--bg);padding:calc(12px + var(--safe-top)) 16px 12px;border-bottom:1px solid var(--border)}.form-body{flex:1;padding:16px 16px 100px;display:flex;flex-direction:column;gap:var(--gap);overflow-y:auto}.form-footer{position:sticky;bottom:0;z-index:1;background:linear-gradient(to top,var(--bg) 60%,transparent);padding:12px 16px calc(16px + var(--safe-bottom))}.form-footer .primary{width:100%}.field{display:flex;flex-direction:column;gap:6px}.field-row{flex-direction:row;align-items:center;gap:12px}.field-label{font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted)}.field input[type=text],.field input[type=number],.field input[type=url],.field input[type=email],.field input[type=tel],.field textarea{background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;width:100%}.field input[type=checkbox]{width:22px;height:22px;accent-color:var(--primary)}.field textarea{resize:vertical;min-height:80px;font-family:inherit}.field input:focus,.field textarea:focus{border-color:var(--primary)}.field-hint{font-size:12px;color:var(--text-muted)}.dropdown-trigger{display:flex;align-items:center;justify-content:space-between;background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;width:100%;min-height:48px;text-align:left;gap:8px}.dropdown-trigger:disabled{opacity:.5}.dropdown-value{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.dropdown-value>span:not(.opt-icon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-caret{color:var(--text-muted);font-size:12px}.opt-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;font-size:14px;flex-shrink:0}.opt-icon-img{width:20px;height:20px;border-radius:4px;object-fit:cover}.sheet-item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag-trigger{align-items:flex-start;padding:8px 14px}.tags{display:flex;flex-wrap:wrap;gap:6px;flex:1;min-width:0}.tag{display:inline-flex;align-items:center;gap:4px;background:var(--bg-elev-2);border-radius:4px;padding:4px 8px;font-size:14px;cursor:pointer}.tag-x{margin-left:2px;color:var(--text-muted);font-size:14px}.sheet-overlay{position:fixed;top:0;left:0;right:0;bottom:calc(60px + var(--safe-bottom));background:#000000d9;z-index:150;display:flex;align-items:flex-end;animation:fade-in .18s ease-out;overscroll-behavior:contain;touch-action:pan-y;padding-top:calc(var(--safe-top) + 60px)}.sheet{background:var(--bg-elev);border-top-left-radius:16px;border-top-right-radius:16px;width:100%;max-height:100%;flex:1 1 auto;display:flex;flex-direction:column;animation:slide-up .22s ease-out;overscroll-behavior:contain;overflow:hidden;min-height:0;transform:translateZ(0);isolation:isolate}.sheet-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border);background:var(--bg-elev);flex-shrink:0}.sheet-close{color:var(--primary);font-size:16px;padding:4px 8px}.sheet-search{margin:10px 16px 4px;padding:10px 12px;background:var(--bg-elev-2);border-radius:var(--radius-sm);flex-shrink:0}.sheet-paste{display:flex;gap:8px;margin:10px 16px 4px;flex-shrink:0;flex-wrap:wrap}.sheet-paste input{flex:1;min-width:0;padding:10px 12px;background:var(--bg-elev-2);border-radius:var(--radius-sm);border:1px solid var(--border);font-size:16px}.sheet-paste .primary{padding:10px 14px!important;font-size:14px!important;min-height:auto!important}.sheet-paste-error{width:100%;font-size:12px;color:var(--error)}.sheet-list{overflow-y:auto;flex:1;min-height:0;padding:4px 0 8px;overscroll-behavior:contain}.sheet-item{display:flex;align-items:center;gap:10px;width:100%;padding:12px 16px;text-align:left;min-height:48px}.sheet-item:active,.sheet-item.active{background:var(--bg-elev-2)}.sheet-check{width:18px;color:var(--primary);font-size:16px}.sheet-empty{padding:24px 16px;text-align:center;color:var(--text-muted)}button.primary{background:var(--primary);color:#fff;font-weight:600;padding:14px 20px;border-radius:var(--radius);min-height:50px}button.primary:hover{background:var(--primary-hover)}button.primary:disabled{opacity:.4;cursor:not-allowed}.toast{position:fixed;bottom:calc(20px + var(--safe-bottom));left:16px;right:16px;background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;align-items:center;gap:12px;box-shadow:0 8px 24px #0006;z-index:200;animation:slide-up .22s ease-out}.toast-loading{border-left:3px solid var(--warning)}.toast-success{border-left:3px solid var(--success)}.toast-error{border-left:3px solid var(--error)}.toast-icon{font-size:18px}.toast-body{flex:1;display:flex;flex-direction:column}.toast-msg{font-size:13px;color:var(--text-muted)}.toast-actions{display:flex;gap:8px}.toast-actions button{background:var(--bg-elev-2);padding:6px 10px;border-radius:6px;font-size:13px}.toast-close{color:var(--text-muted);padding:4px 8px}.loading{padding:24px;text-align:center;color:var(--text-muted)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes slide-up{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.app{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}.tabs{position:sticky;top:0;z-index:10;display:flex;background:var(--bg);padding:calc(8px + var(--safe-top)) 8px 0;border-bottom:1px solid var(--border);gap:4px}.tabs button{flex:1;padding:12px 8px;font-size:15px;font-weight:500;color:var(--text-muted);border-bottom:2px solid transparent;border-radius:0;min-height:48px}.tabs button.active{color:var(--text);border-bottom-color:var(--primary)}.tabs-bottom{position:fixed;top:auto;bottom:0;left:0;right:0;z-index:200;background:var(--bg);border-bottom:none;border-top:1px solid var(--border);padding:0 8px var(--safe-bottom) 8px;flex-shrink:0;pointer-events:auto}.tabs-bottom button{pointer-events:auto}.tabs-bottom button{border-bottom:none;border-top:2px solid transparent;padding-top:14px;padding-bottom:14px}.tabs-bottom button.active{border-top-color:var(--primary);border-bottom-color:transparent}.tabs-bottom button{font-size:22px;line-height:1}.tabs-bottom button.tab-create{color:#ff8a8a;font-weight:800;font-size:26px}.tabs-bottom button.tab-create.active{color:var(--primary)}.app-main{flex:1;min-height:0;display:flex;flex-direction:column;padding-bottom:calc(60px + var(--safe-bottom))}.app-main .form-header{display:none}.app-main .form{min-height:auto}.app-main .form .form-header{display:block;padding-top:12px;position:static}.app-main .form>header.form-header{display:block;padding-top:12px;position:static;border-bottom:none}.tasks-screen{display:flex;flex-direction:column;flex:1;min-height:0}.tasks-header{display:flex;justify-content:space-between;align-items:flex-end;padding:16px 16px 8px}.tasks-header h2{margin:0;font-size:22px}.icon-btn{width:40px;height:40px;border-radius:50%;background:var(--bg-elev);font-size:18px;display:flex;align-items:center;justify-content:center}.task-list{list-style:none;margin:0;padding:0 0 calc(40px + var(--safe-bottom));display:flex;flex-direction:column}.task-row{display:flex;align-items:stretch;gap:4px;padding:4px 12px;border-bottom:1px solid var(--border)}.task-check{display:flex;align-items:center;justify-content:center;width:44px;flex-shrink:0}.task-check-circle{display:block;width:22px;height:22px;border-radius:50%;border:1.5px solid var(--text-muted);transition:background .15s,border-color .15s}.task-check:active .task-check-circle{background:var(--success);border-color:var(--success)}.task-body{flex:1;text-align:left;padding:12px 8px;display:flex;flex-direction:column;gap:6px;min-width:0}.task-title-row{display:flex;align-items:center;gap:6px}.task-title{font-size:15px;line-height:1.35;word-break:break-word}.task-recurring{font-size:12px;opacity:.7}.task-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.task-when{font-size:12px;color:var(--text-muted);font-weight:500}.task-when.overdue{color:var(--error)}.task-empty{padding:60px 24px;text-align:center;color:var(--text-muted);font-size:16px}.chip{display:inline-block;font-size:11px;padding:3px 8px;border-radius:4px;background:var(--bg-elev-2);color:var(--text);line-height:1.2}.chip-dim{color:var(--text-muted);background:var(--bg-elev)}.edit-title{padding:14px 16px 4px;font-weight:500}.edit-current{padding:0 16px 12px}.quick-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 12px}.chip-btn{background:var(--bg-elev-2);padding:10px 14px;border-radius:8px;font-size:14px;font-weight:500;min-height:40px}.chip-btn:active{background:var(--primary);color:#fff}.natural-input{display:flex;gap:8px;padding:8px 16px 4px}.natural-input input{flex:1;background:var(--bg-elev-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;font-size:16px}.natural-input .primary{padding:12px 18px;font-size:14px;min-height:auto}.natural-hint{padding:0 16px 12px;font-size:12px;color:var(--text-muted)}.sheet-action{display:block;width:100%;text-align:center;padding:14px 16px;border-top:1px solid var(--border);color:var(--primary);font-weight:500}.edit-sheet{max-height:100%;height:100%}.edit-scroll{overflow-y:auto;flex:1;min-height:0;overscroll-behavior:contain;touch-action:pan-y}.edit-section-sticky{position:sticky;top:0;z-index:5;background:var(--bg-elev);border-bottom:1px solid var(--border)}.edit-section{padding:12px 16px;border-top:1px solid var(--border)}.edit-section:first-of-type{border-top:none}.edit-section-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-bottom:10px}.editable-prop{position:relative;margin-bottom:12px}.editable-prop:last-child{margin-bottom:0}.editable-prop .field{margin:0}.prop-saving{position:absolute;top:0;right:0;font-size:11px;color:var(--text-muted);background:var(--bg-elev-2);padding:2px 6px;border-radius:4px}.quick-overlay{background:#00000026;z-index:110}.quick-title{padding:16px 16px 4px;font-weight:500;font-size:16px}.quick-bottom{display:flex;border-top:1px solid var(--border)}.quick-bottom .quick-link{flex:1;padding:14px;color:var(--primary);font-weight:500;font-size:14px}.quick-bottom .quick-link:not(:last-child){border-right:1px solid var(--border)}.sheet-back{color:var(--primary);font-size:16px;padding:4px 8px}.sheet-header-title{text-align:center;flex:1;margin:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.when-row{display:flex;gap:6px;align-items:center;margin-top:4px}.when-row input[type=text]{flex:1;background:var(--bg-elev-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;font-size:16px}.when-ok{padding:10px 14px!important;font-size:14px!important;min-height:auto!important}.calendar-btn{position:relative;display:flex;align-items:center;justify-content:center;width:44px;height:44px;background:var(--bg-elev-2);border-radius:var(--radius-sm);cursor:pointer;font-size:20px;flex-shrink:0}.calendar-btn input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer}.others-toggle{display:flex;justify-content:space-between;align-items:center;width:100%;padding:10px 0;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-bottom:8px}.content-actions{display:flex;align-items:center;gap:10px;margin-top:8px;margin-bottom:16px}.content-add{padding:10px 14px!important;font-size:14px!important;min-height:auto!important}.icon-btn.spinning{animation:spin .6s linear}@keyframes spin{to{transform:rotate(360deg)}}.content-label-row{display:flex;justify-content:space-between;align-items:center}.content-expand-btn{width:28px;height:28px;border-radius:6px;background:var(--bg-elev-2);color:var(--primary);font-size:14px;font-weight:600}.fullscreen-editor{position:fixed;top:0;right:0;bottom:0;left:0;z-index:300;background:var(--bg);display:flex;flex-direction:column;padding-top:var(--safe-top)}.fullscreen-editor-header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--border);flex-shrink:0}.fullscreen-editor-title{flex:1;margin:0 8px;text-align:center;font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fullscreen-editor-save{color:var(--primary);font-weight:600;font-size:15px;padding:4px 12px}.fullscreen-editor-save:disabled{opacity:.4}.fullscreen-editor-textarea{flex:1;width:100%;border:none;background:var(--bg);color:var(--text);padding:16px;font-size:16px;font-family:inherit;resize:none;outline:none;line-height:1.5}.fullscreen-editor-error{padding:12px 16px;color:var(--error);font-size:13px;border-top:1px solid var(--border)}
