:root{--bg:#f6f3ec;--surface:#fff;--surface-2:#f1ede4;--ink:#1d2726;--muted:#5d6b69;--line:#e4ded2;--accent-pastel:#7fd8cc;--accent-deep:#0f766e;--accent-ink:#0b1f1c;--primary:var(--accent-deep);--primary-strong:var(--accent-deep);--primary-ink:#fff;--primary-soft:color-mix(in srgb, var(--accent-deep) 13%, #fff);--accent:#b7791f;--accent-soft:#fbefd6;--success:#15803d;--success-soft:#dcfce7;--danger:#b42318;--danger-soft:#fde8e6;--shadow:0 1px 2px #1d27260f, 0 4px 16px #1d27260f;--radius:20px;--radius-sm:14px;--tap:52px;--nav-h:68px;--font:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-ar:"Geeza Pro", "Noto Naskh Arabic", "Amiri", "Traditional Arabic", serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#0e1615;--surface:#16211f;--surface-2:#1d2a28;--ink:#e9f1ef;--muted:#9db0ad;--line:#2a3a37;--primary:var(--accent-pastel);--primary-strong:var(--accent-pastel);--primary-ink:var(--accent-ink);--primary-soft:color-mix(in srgb, var(--accent-pastel) 16%, #16211f);--accent:#e7b55a;--accent-soft:#3a2e17;--success:#4ade80;--success-soft:#133222;--danger:#f87171;--danger-soft:#3b1715;--shadow:0 1px 2px #0000004d, 0 4px 16px #00000040;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#0e1615;--surface:#16211f;--surface-2:#1d2a28;--ink:#e9f1ef;--muted:#9db0ad;--line:#2a3a37;--primary:var(--accent-pastel);--primary-strong:var(--accent-pastel);--primary-ink:var(--accent-ink);--primary-soft:color-mix(in srgb, var(--accent-pastel) 16%, #16211f);--accent:#e7b55a;--accent-soft:#3a2e17;--success:#4ade80;--success-soft:#133222;--danger:#f87171;--danger-soft:#3b1715;--shadow:0 1px 2px #0000004d, 0 4px 16px #00000040;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--ink);font-family:var(--font);overscroll-behavior-y:none;margin:0;font-size:17px;line-height:1.45}button,input,select,textarea{font:inherit;color:inherit}h1,h2,h3{margin:0;line-height:1.2}h1{font-size:1.6rem}h2{font-size:1.25rem}h3{font-size:1.05rem}p{margin:0}.ar{font-family:var(--font-ar);direction:rtl}.muted{color:var(--muted)}.small{font-size:.88rem}.big-num{font-variant-numeric:tabular-nums;font-size:2.2rem;font-weight:800;line-height:1}.center{text-align:center}.row{align-items:center;gap:12px;display:flex}.row.wrap{flex-wrap:wrap}.row.between{justify-content:space-between}.stack{flex-direction:column;gap:12px;display:flex}.stack.lg{gap:18px}.grow{flex:1;min-width:0}.grid-2{grid-template-columns:1fr 1fr;gap:12px;display:grid}.grid-3{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.app{flex-direction:column;min-height:100dvh;display:flex;overflow-x:clip}.main,.counter-screen,.page-panel{touch-action:pan-y pinch-zoom}.topbar{z-index:20;background:color-mix(in srgb, var(--bg) 88%, transparent);-webkit-backdrop-filter:blur(10px);padding:calc(env(safe-area-inset-top) + 10px) 16px 10px;align-items:center;gap:12px;display:flex;position:sticky;top:0}.brand{letter-spacing:.08em;align-items:center;gap:10px;font-size:1.05rem;font-weight:800;display:flex}.brand img{border-radius:10px;width:34px;height:34px}.main{width:100%;max-width:760px;padding:8px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);flex:1;margin:0 auto}.tabbar{z-index:30;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);justify-content:center;display:flex;position:fixed;bottom:0;left:0;right:0}.tabbar-inner{width:100%;max-width:760px;display:flex}.tab{min-height:var(--nav-h);color:var(--muted);cursor:pointer;background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:3px;font-size:.78rem;font-weight:600;text-decoration:none;display:flex}.tab svg{width:26px;height:26px}.tab.active{color:var(--primary)}.tab.active .tab-pill{background:var(--primary-soft)}.tab-pill{border-radius:999px;place-items:center;padding:4px 18px;display:grid}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}.card.tight{padding:14px}.card.hero{background:linear-gradient(145deg, var(--accent-deep) 0%, color-mix(in srgb, var(--accent-deep) 78%, #000) 100%);color:#fff}.card.hero .muted{color:#ffffffd1}.btn.hero-btn{color:var(--accent-deep);background:#fff}.card.soft{background:var(--surface-2);box-shadow:none}.section-title{align-items:center;gap:8px;margin:22px 4px 10px;font-size:1.05rem;font-weight:700;display:flex}.section-title:first-child{margin-top:6px}.btn{min-height:var(--tap);cursor:pointer;background:var(--surface-2);color:var(--ink);-webkit-user-select:none;user-select:none;touch-action:manipulation;border:0;border-radius:16px;justify-content:center;align-items:center;gap:10px;padding:0 20px;font-weight:700;transition:transform 80ms,filter .15s;display:inline-flex}.btn:active{transform:scale(.97)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn svg{flex:none;width:22px;height:22px}.btn.primary{background:var(--primary);color:var(--primary-ink)}.btn.accent{background:var(--accent);color:#fff}.btn.ghost{background:0 0}.btn.danger{background:var(--danger-soft);color:var(--danger)}.btn.light{color:inherit;background:#ffffff2e}.btn.block{width:100%}.grid-2>.btn{padding:8px 10px;line-height:1.2}.btn.lg{border-radius:18px;min-height:60px;font-size:1.1rem}.btn.sm{border-radius:12px;min-height:44px;padding:0 14px;font-size:.92rem}.icon-btn{background:var(--surface-2);width:48px;height:48px;color:var(--ink);cursor:pointer;touch-action:manipulation;border:0;border-radius:14px;flex:none;place-items:center;display:grid}.icon-btn svg{width:22px;height:22px}.icon-btn.plain{background:0 0}.field{flex-direction:column;gap:6px;display:flex}.field-label{align-items:center;gap:6px;font-size:.95rem;font-weight:700;display:flex}.input,.select,textarea.input{min-height:var(--tap);border:1.5px solid var(--line);background:var(--surface);border-radius:14px;outline:none;width:100%;padding:0 14px;font-size:17px}textarea.input{resize:vertical;min-height:90px;padding:12px 14px}.input:focus,.select:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.input::placeholder{color:color-mix(in srgb, var(--muted) 80%, transparent)}.select{appearance:none;background-image:none;padding-right:40px}.select-wrap{position:relative}.select-wrap svg{pointer-events:none;width:20px;height:20px;color:var(--muted);position:absolute;top:50%;right:12px;transform:translateY(-50%)}.stepper{align-items:stretch;gap:8px;display:flex}.stepper .input{text-align:center;font-size:1.3rem;font-weight:800}.stepper .icon-btn{width:var(--tap);height:var(--tap)}.seg{background:var(--surface-2);border-radius:14px;gap:4px;padding:4px;display:flex}.seg button{cursor:pointer;min-height:44px;color:var(--muted);background:0 0;border:0;border-radius:11px;flex:1;font-weight:700}.seg button.on{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}.toggle{min-height:var(--tap);cursor:pointer;justify-content:space-between;align-items:center;gap:12px;display:flex}.toggle input{appearance:none;background:var(--line);cursor:pointer;border-radius:999px;flex:none;width:52px;height:32px;transition:background .2s;position:relative}.toggle input:after{content:"";background:#fff;border-radius:50%;width:26px;height:26px;transition:transform .2s;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #00000040}.toggle input:checked{background:var(--primary)}.toggle input:checked:after{transform:translate(20px)}.swatches{flex-wrap:wrap;gap:10px;display:flex}.swatch{cursor:pointer;border:3px solid #0000;border-radius:50%;width:44px;height:44px}.swatch.on{border-color:var(--ink)}.error-box{background:var(--danger-soft);color:var(--danger);border-radius:14px;align-items:flex-start;gap:10px;padding:12px 14px;font-weight:600;display:flex}.error-box svg{flex:none;width:22px;height:22px;margin-top:1px}.note-box{background:var(--primary-soft);border-radius:14px;align-items:flex-start;gap:10px;padding:12px 14px;display:flex}.note-box svg{width:22px;height:22px;color:var(--primary);flex:none;margin-top:1px}.tip{display:inline-flex;position:relative}.tip-btn{width:30px;height:30px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:50%;place-items:center;padding:0;display:grid}.tip-btn svg{width:18px;height:18px}.tip-bubble{z-index:50;background:var(--ink);width:max-content;max-width:min(260px,80vw);color:var(--bg);box-shadow:var(--shadow);text-align:left;border-radius:12px;padding:10px 12px;font-size:.88rem;font-weight:500;line-height:1.4;position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%)}.ring{flex:none;place-items:center;display:grid;position:relative}.ring svg{display:block;transform:rotate(-90deg)}.ring .ring-label{text-align:center;place-items:center;display:grid;position:absolute;inset:0}.bar{background:var(--surface-2);border-radius:999px;height:12px;overflow:hidden}.bar>div{background:var(--primary);border-radius:999px;height:100%;transition:width .5s}.hero .bar{background:#ffffff38}.hero .bar>div{background:#fff}.bar.accent>div{background:var(--accent)}.chip{background:var(--surface-2);border-radius:999px;align-items:center;gap:6px;padding:5px 11px;font-size:.85rem;font-weight:700;display:inline-flex}.chip svg{width:16px;height:16px}.chip.ok{background:var(--success-soft);color:var(--success)}.chip.gold{background:var(--accent-soft);color:var(--accent)}.chip.teal{background:var(--primary-soft);color:var(--primary)}.avatar{color:#fff;border-radius:50%;flex:none;place-items:center;width:46px;height:46px;font-size:1.1rem;font-weight:800;display:grid}.avatar.sm{width:36px;height:36px;font-size:.95rem}.avatar.lg{width:72px;height:72px;font-size:1.7rem}.stat{background:var(--surface);border-radius:var(--radius-sm);box-shadow:var(--shadow);flex-direction:column;align-items:flex-start;gap:4px;min-width:0;padding:14px 12px;display:flex}.stat .stat-icon{border-radius:11px;place-items:center;width:36px;height:36px;display:grid}.stat .stat-icon svg{width:20px;height:20px}.stat .stat-value{font-variant-numeric:tabular-nums;font-size:1.45rem;font-weight:800}.stat .stat-label{color:var(--muted);font-size:.8rem;font-weight:600}.list{flex-direction:column;display:flex}.list-item{border-bottom:1px solid var(--line);align-items:center;gap:12px;min-height:60px;padding:12px 0;display:flex}.list-item:last-child{border-bottom:0}.list-btn{text-align:left;cursor:pointer;background:0 0;border:0;width:100%;padding-left:0;padding-right:0}.badges{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;display:grid}.badge{text-align:center;background:var(--surface);box-shadow:var(--shadow);cursor:pointer;border:0;border-radius:16px;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;display:flex}.badge .badge-icon{background:var(--accent-soft);width:48px;height:48px;color:var(--accent);border-radius:50%;place-items:center;display:grid}.badge .badge-icon svg{width:26px;height:26px}.badge.locked{opacity:.55;box-shadow:none;background:var(--surface-2)}.badge.locked .badge-icon{background:var(--line);color:var(--muted)}.badge-title{font-size:.8rem;font-weight:700;line-height:1.2}.banner{background:var(--accent-soft);color:var(--ink);border-radius:var(--radius);border:1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);align-items:flex-start;gap:12px;padding:14px;display:flex}.banner .banner-icon{background:var(--accent);color:#fff;border-radius:12px;flex:none;place-items:center;width:42px;height:42px;display:grid}.banner .banner-icon svg{width:24px;height:24px}.sheet-backdrop{z-index:60;background:#0a141273;justify-content:center;align-items:flex-end;animation:.15s fade;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);width:100%;max-width:640px;max-height:92dvh;padding:10px 18px calc(env(safe-area-inset-bottom) + 20px);-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border-radius:26px 26px 0 0;animation:.28s cubic-bezier(.2,.8,.2,1) sheet-up;overflow-y:auto}@media (width>=700px){.sheet-backdrop{align-items:center}.sheet{border-radius:26px;padding-bottom:22px}}.sheet-grip{background:var(--line);border-radius:99px;width:44px;height:5px;margin:4px auto 12px}.sheet-head{align-items:center;gap:10px;margin-bottom:14px;display:flex}@keyframes up{0%{opacity:.4;transform:translateY(40px)}to{opacity:1;transform:none}}@keyframes sheet-up{0%{transform:translateY(100%)}to{transform:none}}@keyframes page-in{0%{transform:translate(100%)}to{transform:none}}.sheet-grip{touch-action:none}.sheet-backdrop.page-mode{align-items:stretch}.page-panel{background:var(--bg);-webkit-overflow-scrolling:touch;overscroll-behavior:contain;width:100%;height:100%;animation:.26s cubic-bezier(.2,.8,.2,1) page-in;overflow-y:auto;box-shadow:-8px 0 24px #0000001f}.page-head{z-index:2;padding:calc(env(safe-area-inset-top) + 10px) 16px 10px;background:color-mix(in srgb, var(--bg) 92%, transparent);-webkit-backdrop-filter:blur(10px);align-items:center;gap:10px;max-width:760px;margin:0 auto;display:flex;position:sticky;top:0}.page-body{max-width:760px;padding:6px 16px calc(env(safe-area-inset-bottom) + 28px);margin:0 auto}.fab-layer{z-index:25;pointer-events:none;height:0;position:fixed;bottom:0;left:0;right:0}.fab{pointer-events:auto;max-width:440px;left:16px;right:16px;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);margin:0 auto;position:fixed}.fab .btn{box-shadow:0 6px 18px #00000038,0 2px 6px #0000001f}.fab-spacer{flex:none;height:76px}.input.time-input{appearance:none;width:100%;min-width:0;max-width:220px;line-height:calc(var(--tap) - 4px);text-align:left;display:block}.input.time-input::-webkit-date-and-time-value{text-align:left;margin:0}@keyframes fade{0%{opacity:0}to{opacity:1}}.toasts{left:0;right:0;top:calc(env(safe-area-inset-top) + 12px);z-index:90;pointer-events:none;flex-direction:column;align-items:center;gap:8px;padding:0 16px;display:flex;position:fixed}.toast{background:var(--ink);color:var(--bg);box-shadow:var(--shadow);border-radius:16px;align-items:center;gap:10px;max-width:520px;padding:12px 18px;font-weight:700;animation:.2s up;display:flex}.toast svg{flex:none;width:22px;height:22px}.toast.celebrate{background:var(--accent);color:#fff}.toast.error{background:var(--danger);color:#fff}.counter-screen{z-index:70;background:var(--bg);padding:calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 16px);flex-direction:column;display:flex;position:fixed;inset:0}.counter-body{flex-direction:column;flex:1;justify-content:center;align-items:center;gap:16px;min-height:0;display:flex}.tap-button{background:var(--surface);box-shadow:var(--shadow), inset 0 0 0 1px var(--line);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;border:0;border-radius:50%;place-items:center;width:min(78vw,46dvh,380px);height:min(78vw,46dvh,380px);display:grid;position:relative}.tap-button:active{transform:scale(.98)}.tap-button svg.ring-svg{width:100%;height:100%;position:absolute;inset:0;transform:rotate(-90deg)}.tap-count{font-variant-numeric:tabular-nums;font-size:clamp(3rem,15vw,5.5rem);font-weight:800;line-height:1}.tap-button.done{background:var(--success-soft)}.lb-row{border-bottom:1px solid var(--line);align-items:center;gap:12px;padding:12px 0;display:flex}.lb-row:last-child{border-bottom:0}.lb-place{background:var(--surface-2);width:34px;height:34px;color:var(--muted);border-radius:50%;flex:none;place-items:center;font-size:.9rem;font-weight:800;display:grid}.lb-place.first{background:var(--accent-soft);color:var(--accent)}.lb-place svg{width:20px;height:20px}.empty{text-align:center;color:var(--muted);flex-direction:column;align-items:center;gap:10px;padding:28px 12px;display:flex}.empty svg{width:40px;height:40px}.inline-icon{vertical-align:-.18em;width:1.1em;height:1.1em}.big-icon{width:44px;height:44px;color:var(--danger);margin:0 auto}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.page-loading{color:var(--muted);place-items:center;padding:60px 0;display:grid}.page-loading svg{width:34px;height:34px}.auth-wrap{min-height:100dvh;padding:calc(env(safe-area-inset-top) + 24px) 16px calc(env(safe-area-inset-bottom) + 24px);justify-content:center;align-items:center;display:flex}.auth-card{width:100%;max-width:420px}.auth-logo{width:84px;height:84px;box-shadow:var(--shadow);border-radius:24px;margin:0 auto;display:block}@media (width>=560px){.grid-3.wide-4{grid-template-columns:repeat(4,1fr)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}}.btn.danger-solid{background:var(--danger);color:#fff}.theme-grid{grid-template-columns:repeat(4,1fr);gap:8px;display:grid}.theme-swatch{background:var(--surface-2);cursor:pointer;min-height:72px;color:var(--ink);border:2px solid #0000;border-radius:14px;flex-direction:column;align-items:center;gap:4px;padding:8px 2px;display:flex}.theme-swatch.on{border-color:var(--primary);background:var(--primary-soft)}.theme-dot{border-radius:50%;place-items:center;width:36px;height:36px;display:grid}.theme-dot svg{width:20px;height:20px}.cal{flex-direction:column;gap:8px;display:flex}.cal-grid{grid-template-columns:repeat(7,1fr);gap:4px;display:grid}.cal-dow{text-align:center;color:var(--muted);padding:2px 0;font-size:.75rem;font-weight:700}.cal-day{aspect-ratio:1;background:var(--surface-2);min-height:40px;color:var(--ink);cursor:pointer;border:0;border-radius:12px;font-size:.95rem;font-weight:700}.cal-day.today{box-shadow:inset 0 0 0 2px var(--primary)}.cal-day.on{background:var(--primary);color:var(--primary-ink)}.cal-day:disabled{color:var(--muted);opacity:.45;cursor:not-allowed;background:0 0;text-decoration:line-through}.chip-btn{border:1.5px solid var(--primary);background:var(--primary-soft);min-height:44px;color:var(--primary);cursor:pointer;white-space:nowrap;border-radius:999px;align-items:center;gap:6px;padding:0 12px;font-size:.9rem;font-weight:800;display:inline-flex}.chip-btn svg{width:18px;height:18px}.chip-row{flex-wrap:nowrap;align-items:center;gap:2px;display:flex}.chip-row .tip-btn{width:28px;height:28px}.star-on{color:var(--accent)}.goal-row{border-bottom:1px solid var(--line);align-items:center;gap:12px;padding:12px 0;display:flex}.goal-row:last-child{border-bottom:0}.weekday-chips{grid-template-columns:repeat(7,1fr);gap:6px;display:grid}.weekday-chips button{background:var(--surface-2);min-height:44px;color:var(--ink);cursor:pointer;border:0;border-radius:12px;font-weight:800}.weekday-chips button.on{background:var(--primary);color:var(--primary-ink)}.preview-line{color:var(--primary);font-weight:700}.capture{background:var(--bg);padding:4px 0}.seg.one-line{gap:2px}.seg.one-line button{white-space:nowrap;flex:auto;min-height:48px;padding:0 8px;font-size:.9rem}@media (width<=370px){.seg.one-line button{padding:0 6px;font-size:.86rem}}
