:root{color-scheme:dark;--bg:#0c111d;--surface:#131c2d;--surface2:#192439;--stroke:#283750;--muted:#94a4ba;--text:#f5f8fc;--accent:#8bb5ff;--green:#78dfb5;--radius:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;background:linear-gradient(145deg,#141e32 0%,var(--bg) 29%);min-height:100vh;color:var(--text)}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.app-shell{width:100%;max-width:700px;margin:auto;min-height:100vh;padding-bottom:calc(96px + env(safe-area-inset-bottom))}.topbar{height:78px;display:flex;align-items:center;padding:14px 22px;gap:11px}.brand-mark{width:38px;height:38px;display:grid;place-items:center;background:linear-gradient(140deg,#a3c6ff,#5270c8);color:#102035;border-radius:13px;font-weight:bold;font-size:25px}.brand-label{display:flex;flex-direction:column;gap:2px}.brand-label strong{font-size:12px;letter-spacing:1.9px}.brand-label span{font-size:11px;color:var(--muted)}.safe-pill{margin-left:auto;background:#1e3440;border:1px solid #325867;color:#ace6cd;font-size:11px;padding:8px 11px;border-radius:30px;white-space:nowrap}.safe-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#7df0bc;margin-right:5px}.hero{padding:32px 24px 26px}.eyebrow,.kicker{letter-spacing:1.6px;font-size:11px;font-weight:750;color:#9ab8e6;text-transform:uppercase}.hero h1{margin:12px 0 7px;font-size:clamp(37px,9vw,58px);letter-spacing:-2px;line-height:1.08}.period{color:var(--accent)}.hero p{font-size:13px;color:var(--muted);margin:11px 0 26px}.hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--surface);border:1px solid var(--stroke);border-radius:18px;padding:20px 8px}.hero-stats div{display:flex;flex-direction:column;align-items:center;gap:5px}.hero-stats div:not(:last-child){border-right:1px solid var(--stroke)}.hero-stats strong{font-size:23px;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.hero-stats span{font-size:11px;color:var(--muted)}.view{display:none;padding:8px 22px 32px}.view.active{display:block}.section-head{display:flex;align-items:end;justify-content:space-between;margin:10px 0 19px;gap:12px}.section-head h2{font-size:26px;letter-spacing:-.7px;margin:6px 0 0}.quiet-button{border:1px solid var(--stroke);border-radius:11px;padding:10px 13px;color:#d6e6ff;background:var(--surface);font-size:12px}.day-switch{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;background:var(--surface);border:1px solid var(--stroke);border-radius:15px;padding:6px}.day-switch button{border:0;background:transparent;color:var(--muted);padding:12px 1px;border-radius:10px;font-size:12px;font-weight:650}.day-switch button.active{background:#324970;color:#fff}.hint{font-size:12px;line-height:1.5;color:var(--muted);margin:17px 3px}.schedule-list{display:flex;flex-direction:column;gap:9px}.schedule-item{display:flex;align-items:center;gap:12px;border:1px solid var(--stroke);background:var(--surface);border-radius:15px;padding:13px 11px;min-height:70px}.schedule-item.done{opacity:.58}.schedule-item.done .item-name{text-decoration:line-through}.time-label{width:82px;flex-shrink:0;display:flex;flex-direction:column;gap:4px;align-items:center;font-variant-numeric:tabular-nums;font-size:11px;color:#b3c1d6}.time-label strong{font-size:12px;color:#dee8f7}.item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.item-name{font-size:13px;font-weight:650;line-height:1.35}.item-sub{font-size:11px;color:var(--muted)}.task-checkbox{appearance:none;width:23px;height:23px;flex-shrink:0;border:1px solid #6682ae;border-radius:8px;background:#1a2c45;display:grid;place-items:center}.task-checkbox:checked{background:var(--green);border-color:var(--green)}.task-checkbox:checked:after{content:'✓';font-weight:bold;color:#0c2824}.item-action{border:0;background:transparent;color:#91a2bb;font-size:18px;padding:7px 4px}.item-action:active{color:#fff}.empty-state{border:1px dashed var(--stroke);color:var(--muted);padding:30px 16px;text-align:center;border-radius:16px;font-size:13px}.info-line{font-size:11px;line-height:1.6;color:#91a4be;padding:18px 4px}.bottom-nav{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:700px;background:rgba(16,23,38,.97);border-top:1px solid var(--stroke);display:grid;grid-template-columns:repeat(5,1fr);padding:10px 10px calc(10px + env(safe-area-inset-bottom));backdrop-filter:blur(16px)}.nav-button{background:none;border:0;color:var(--muted);font-size:10px;display:flex;flex-direction:column;align-items:center;gap:6px;padding:7px 3px}.nav-button.active{color:#a7c8ff}.nav-icon{font-size:23px;font-weight:300}.subtle-tag{font-size:10px;color:#b1c2d7;background:#213049;border:1px solid var(--stroke);padding:8px 9px;border-radius:30px}.timer-card{background:var(--surface);border:1px solid var(--stroke);border-radius:22px;padding:26px 17px;text-align:center}.timer-top{font-size:10px;letter-spacing:1.8px;color:var(--muted);font-weight:700}.timer-card select{width:100%;max-width:380px;display:block;margin:12px auto 20px;color:var(--text);background:var(--surface2);border:1px solid var(--stroke);border-radius:10px;padding:12px;font-size:13px}.timer-ring{--p:100%;width:min(72vw,258px);height:min(72vw,258px);margin:17px auto 27px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;background:radial-gradient(closest-side,var(--surface) 88%,transparent 90% 100%),conic-gradient(var(--accent) var(--p),#30415b 0);transition:background .2s}.time-readout{font-size:49px;font-weight:750;letter-spacing:-2px;font-variant-numeric:tabular-nums}.timer-caption{font-size:12px;color:var(--muted);margin-top:5px}.timer-actions{display:flex;justify-content:center;gap:10px}.primary-button,.secondary-button,.danger-button{border-radius:12px;padding:12px 18px;font-weight:700;font-size:13px;border:1px solid transparent}.primary-button{background:var(--accent);color:#0d213b}.secondary-button{background:#25354f;color:#eaf2ff;border-color:#3b5172}.danger-button{background:#4c2534;color:#ffbdcb;border-color:#764253}.presets{margin:24px auto 0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:7px}.presets span{width:100%;margin:0 0 3px;font-size:11px;color:var(--muted)}.presets button{background:transparent;border:1px solid var(--stroke);color:var(--text);padding:8px 10px;border-radius:10px;font-size:11px}.overview-card{background:var(--surface);border:1px solid var(--stroke);padding:21px;border-radius:17px}.overview-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.overview-top strong{font-size:30px}.overview-top span{font-size:12px;color:var(--muted)}.progress-track{height:8px;background:#26334a;border-radius:8px;margin-top:20px;overflow:hidden}.progress-track div{width:0;background:linear-gradient(90deg,#76aaff,#9fe3cd);height:100%;border-radius:8px;transition:width .2s}.tasks-group{margin-top:24px}.tasks-group h3,.settings-panel h3{font-size:15px}.check-row{display:flex;align-items:center;gap:13px;padding:15px 7px;border-bottom:1px solid var(--stroke);font-size:13px}.check-row span{flex:1}.wide-quiet{width:100%;background:transparent;border:1px solid var(--stroke);color:#b6c8e2;padding:14px;border-radius:11px;margin-top:20px;font-size:12px}.settings-panel{background:var(--surface);border:1px solid var(--stroke);border-radius:17px;margin:13px 0;padding:13px 17px}.setting-row{display:flex;align-items:center;justify-content:space-between;padding:15px 0;gap:10px}.setting-row+.setting-row{border-top:1px solid var(--stroke)}.setting-row strong,.setting-row small{display:block}.setting-row strong{font-size:13px;margin-bottom:5px}.setting-row small{font-size:11px;color:var(--muted);line-height:1.45}.status-icon{color:var(--green);font-size:19px}.settings-panel h3{margin:6px 0 10px}.settings-desc{font-size:12px;line-height:1.5;color:var(--muted)}.setting-buttons{display:flex;gap:7px;flex-wrap:wrap;padding-bottom:7px}.file-btn{display:inline-block;cursor:pointer}.small-print{padding:20px 2px;color:var(--muted);font-size:11px;line-height:1.6}.modal{background:var(--surface);border:1px solid #4b6184;color:var(--text);padding:24px;border-radius:20px;width:min(94vw,420px)}.modal::backdrop{background:#000b;backdrop-filter:blur(3px)}.modal h2{font-size:20px;margin:0 0 22px}.modal label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:650;margin:12px 0}.modal input{border:1px solid #435371;background:#1e2b41;color:var(--text);padding:12px;border-radius:10px;width:100%}.form-row{display:flex;gap:13px}.form-row label{flex:1;min-width:0}.modal-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:12px}.form-error{color:#ffb9bc;font-size:12px;min-height:12px}.toast{position:fixed;bottom:calc(95px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%) translateY(20px);opacity:0;background:#273a53;border:1px solid #455a76;color:white;padding:12px 18px;border-radius:12px;pointer-events:none;transition:opacity .2s,transform .2s;font-size:12px;white-space:nowrap;z-index:10}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}@media(min-width:560px){.hero{padding:45px 25px 33px}.view{padding-left:25px;padding-right:25px}}

/* AliBot v2 AI chat */
.ai-status{display:flex;gap:10px;align-items:center;border:1px solid #3b4e6a;background:#1b293e;padding:12px 14px;border-radius:12px;color:#b6c8df;font-size:12px;line-height:1.45}
.ai-status-dot{width:8px;height:8px;background:#e5ad6c;box-shadow:0 0 0 4px #e5ad6c1a;border-radius:50%;flex-shrink:0}.ai-status.ready .ai-status-dot{background:#7ee6b3;box-shadow:0 0 0 4px #7ee6b31a}
.ai-intro{padding:17px 5px 10px}.ai-intro strong{font-size:14px}.ai-intro p{font-size:12px;line-height:1.55;color:var(--muted);margin:7px 0 8px}
.chat-feed{display:flex;flex-direction:column;gap:14px;padding:16px 0;min-height:150px;max-height:420px;overflow:auto;scroll-behavior:smooth}
.chat-message{max-width:94%;min-width:82px;padding:12px 15px;border:1px solid var(--stroke);font-size:13px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:15px}
.chat-message.user{align-self:flex-end;background:#314d79;border-color:#5475a0;border-bottom-right-radius:4px}.chat-message.assistant{align-self:flex-start;background:var(--surface);border-bottom-left-radius:4px}.chat-message.notice{align-self:flex-start;background:#30283a;border-color:#624e67}
.chat-message .chat-role{display:block;font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:#bed7f3;margin-bottom:5px;font-weight:700}.chat-message .chat-body{font-size:13px}
.chat-suggestions{display:flex;gap:7px;flex-wrap:wrap;padding:3px 0 15px}.chat-suggestions button{background:#1e2f49;border:1px solid #3a5478;color:#d9e9ff;font-size:11px;padding:10px;border-radius:20px}
.chat-compose{background:var(--surface);border:1px solid var(--stroke);padding:15px;border-radius:19px}.passphrase-label{font-size:11px;color:var(--muted)}#chat-passphrase{width:100%;background:var(--surface2);color:var(--text);border:1px solid #4e6384;border-radius:10px;padding:11px;margin:8px 0 12px;font-size:13px}
.chat-checkbox{display:flex;align-items:flex-start;gap:10px;font-size:11px;color:#c5d2e5;line-height:1.4;padding-bottom:13px}.chat-checkbox input{margin:2px 0 0;accent-color:#90b8fe}
.chat-input-row{display:flex;gap:9px;align-items:flex-end}#chat-input{resize:vertical;min-height:68px;max-height:200px;background:var(--surface2);color:var(--text);border:1px solid #435775;border-radius:12px;padding:12px;width:100%;font-size:13px;line-height:1.45}#chat-send{padding:12px 11px;white-space:nowrap}
.chat-error{font-size:12px;color:#ffb9bc;margin-top:8px;min-height:4px}.ai-privacy{font-size:10px;color:var(--muted);line-height:1.6;margin:11px 0 0}
@media(max-width:370px){.bottom-nav{padding-left:3px;padding-right:3px}.nav-button{font-size:9px}.nav-icon{font-size:20px}.chat-input-row{flex-direction:column;align-items:stretch}}
