/* MYI Life - a warm night sky, big colourful icons, cards that move. Easy to read at a glance. */
:root{--bg:#0A0D16;--bg2:#10162A;--surf:#161C2B;--surf2:#1D2436;--surf3:#28314A;--line:rgba(255,255,255,.07);
--text:#F5F6FA;--text2:#CBD2E1;--muted:#8C97AE;--gold:#F5C542;--goldHi:#FFD970;--goldBg:rgba(245,197,66,.14);
--up:#34D399;--upBg:rgba(52,211,153,.15);--down:#FB7185;--downBg:rgba(251,113,133,.15);--amber:#FBBF24;--amberBg:rgba(251,191,36,.14);
--blue:#60A5FA;--blueBg:rgba(96,165,250,.15);--violet:#A78BFA;--teal:#2DD4BF;--pink:#F472B6;--orange:#FB923C;
--r:24px;--safeB:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
body{margin:0;min-height:100vh;color:var(--text);font:17px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:radial-gradient(1200px 600px at 85% -10%,rgba(245,197,66,.10),transparent 60%),radial-gradient(900px 500px at -20% 20%,rgba(96,165,250,.08),transparent 60%),var(--bg);background-attachment:fixed}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
a{color:var(--gold)}
.wrap{max-width:640px;margin:0 auto;padding:18px 16px calc(110px + var(--safeB))}

/* moving in */
@keyframes up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes pop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08)}100%{transform:scale(1);opacity:1}}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(245,197,66,.55)}50%{box-shadow:0 0 0 10px rgba(245,197,66,0)}}
@keyframes glow{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes sp{to{transform:rotate(360deg)}}
.anim>*{animation:up .45s cubic-bezier(.2,.8,.2,1) both}
.anim>*:nth-child(2){animation-delay:.05s}.anim>*:nth-child(3){animation-delay:.1s}.anim>*:nth-child(4){animation-delay:.15s}
.anim>*:nth-child(5){animation-delay:.2s}.anim>*:nth-child(6){animation-delay:.25s}.anim>*:nth-child(n+7){animation-delay:.3s}
.press{transition:transform .12s ease,filter .12s ease}.press:active{transform:scale(.96);filter:brightness(1.12)}

/* header */
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 2px 18px}
.top h1{margin:0;font-size:32px;letter-spacing:-.8px;font-weight:800;line-height:1.1}
.top .sub{color:var(--muted);font-size:15px;margin-bottom:2px}
.avatar{width:52px;height:52px;border-radius:26px;flex:none;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:21px;color:#1A1405;
  background:linear-gradient(135deg,#FFD970,#F5A524);box-shadow:0 6px 18px rgba(245,165,36,.35)}
.iconbtn{width:48px;height:48px;border-radius:24px;background:var(--surf);display:flex;align-items:center;justify-content:center;flex:none}
.iconbtn svg{width:24px;height:24px}

/* cards */
.card{background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.01)),var(--surf);border-radius:var(--r);padding:18px;margin-bottom:14px;box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 10px 30px rgba(0,0,0,.25)}
.card.tight{padding:6px 16px}
.lab{display:flex;justify-content:space-between;align-items:center;margin:24px 4px 10px;font-weight:800;font-size:19px;letter-spacing:-.2px}
.lab .link{color:var(--gold);font-weight:700;font-size:15px}
.muted{color:var(--muted)}.small{font-size:14.5px}.tiny{font-size:13px}
.row{display:flex;align-items:center;gap:10px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:54px;padding:0 22px;border-radius:18px;font-weight:800;font-size:16.5px;color:#1A1405;
  background:linear-gradient(135deg,#FFD970,#F5B324);box-shadow:0 8px 22px rgba(245,179,36,.28);transition:transform .12s ease}
.btn:active{transform:scale(.97)}
.btn.ghost{background:var(--surf2);color:var(--text);box-shadow:none}
.btn.small{min-height:44px;padding:0 16px;font-size:15px;border-radius:14px;white-space:nowrap}
.btn.wide{width:100%}
.btn:disabled{opacity:.55}

/* THE HERO: what to do right now */
.hero{position:relative;overflow:hidden;border-radius:30px;padding:22px 20px 18px;margin-bottom:16px;color:#fff;
  background:linear-gradient(145deg,var(--c1,#3B2F0C),var(--c2,#161C2B) 70%);box-shadow:0 18px 40px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.06) inset}
.hero::after{content:"";position:absolute;right:-60px;top:-60px;width:220px;height:220px;border-radius:50%;background:var(--cg,rgba(245,197,66,.25));filter:blur(40px);animation:glow 4s ease-in-out infinite}
.hero .k{font-size:13px;font-weight:900;letter-spacing:2px;color:var(--ck,#FFD970)}
.hero .main{display:flex;align-items:center;gap:18px;margin-top:10px;position:relative;z-index:1}
.ring{position:relative;width:112px;height:112px;flex:none}
.ring svg{width:112px;height:112px;transform:rotate(-90deg)}
.ring .ic{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.ring .ic svg{width:44px;height:44px;transform:none}
.ring circle{fill:none;stroke-width:9;stroke-linecap:round}
.ring .track{stroke:rgba(255,255,255,.12)}
.ring .val{stroke:var(--ck,#FFD970);transition:stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1)}
.hero .t{font-size:30px;font-weight:850;letter-spacing:-.7px;line-height:1.1}
.hero .w{color:rgba(255,255,255,.78);font-size:15.5px;margin-top:6px}
.hero .left{font-size:22px;font-weight:800;margin-top:8px;color:#fff}
.hero .acts{display:flex;gap:10px;margin-top:18px;position:relative;z-index:1}
.hero .acts button{flex:1;min-height:50px;border-radius:16px;font-weight:800;font-size:16px;background:rgba(255,255,255,.14);color:#fff;backdrop-filter:blur(6px)}
.hero .acts button.go{background:#fff;color:#141821}
.hero .next{position:relative;z-index:1;display:flex;align-items:center;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.12)}
.hero .next .bub{width:40px;height:40px;border-radius:20px;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;flex:none}
.hero .next .bub svg{width:20px;height:20px}
.hero .next b{display:block;font-size:12px;letter-spacing:1.5px;color:rgba(255,255,255,.6)}

/* quick actions */
.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:4px 0 6px}
.qa{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:var(--text2)}
.qa .b{width:64px;height:64px;border-radius:22px;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 10px 22px rgba(0,0,0,.3)}
.qa .b svg{width:30px;height:30px}

/* icon bubbles in lists */
.bub{width:46px;height:46px;border-radius:15px;display:flex;align-items:center;justify-content:center;flex:none;color:#fff}
.bub svg{width:24px;height:24px}
.bub.sm{width:40px;height:40px;border-radius:13px}.bub.sm svg{width:21px;height:21px}

/* coming up next: cards you swipe */
.strip{display:flex;gap:12px;overflow-x:auto;padding:2px 2px 10px;margin:0 -16px;padding-left:16px;padding-right:16px;scroll-snap-type:x mandatory}
.strip::-webkit-scrollbar{display:none}
.nx{flex:none;width:158px;border-radius:22px;padding:14px;scroll-snap-align:start;background:var(--surf);position:relative;overflow:hidden}
.nx .tm{font-size:14px;color:var(--muted);font-weight:700;margin-top:12px}
.nx .ti{font-size:16.5px;font-weight:800;line-height:1.2;margin-top:2px}

/* the day, as a timeline */
.blk{display:flex;gap:14px;align-items:center;min-height:68px;padding:10px 0;position:relative}
.blk+.blk{border-top:1px solid var(--line)}
.blk .tm{width:58px;flex:none;color:var(--muted);font-size:14.5px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.15}
.blk .tm small{display:block;font-weight:500;font-size:12.5px}
.blk .ti{flex:1;min-width:0;font-weight:750;font-size:16.5px}
.blk .ti small{display:block;color:var(--muted);font-weight:500;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.blk.cur{background:var(--goldBg);margin:0 -12px;padding:10px 12px;border-radius:18px;border-top-color:transparent}
.blk.cur+.blk{border-top-color:transparent}
.blk.cur .bub{animation:pulse 2s infinite}
.blk.past{opacity:.45}
.blk .st{width:38px;height:38px;border-radius:19px;flex:none;display:flex;align-items:center;justify-content:center;background:var(--surf2);font-size:17px;font-weight:900;color:var(--muted)}
.blk .st.done{background:var(--up);color:#06281C;animation:pop .35s}.blk .st.skip{background:var(--downBg);color:var(--down)}

/* warnings */
.warn{display:flex;gap:12px;align-items:center;border-radius:20px;padding:14px 16px;margin-bottom:12px;font-size:16px;font-weight:650}
.warn .wi{font-size:22px;flex:none}
.warn.stop{background:var(--downBg);color:#FFC2CC}.warn.wait,.warn.rule{background:var(--amberBg);color:#FFE3A1}.warn.info{background:var(--blueBg);color:#CFE3FF}
.warn.good{background:var(--upBg);color:#B9F5DD}

/* items */
.it{display:flex;gap:14px;align-items:center;padding:13px 0}
.it+.it{border-top:1px solid var(--line)}
.it .body{flex:1;min-width:0}
.it .sum{font-weight:700;font-size:16.5px;overflow-wrap:anywhere;line-height:1.3}
.it .meta{color:var(--muted);font-size:14px;margin-top:3px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.date{width:52px;height:56px;border-radius:16px;flex:none;background:var(--surf2);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}
.date b{font-size:21px;font-weight:850}.date span{font-size:11.5px;font-weight:800;letter-spacing:1px;color:var(--gold);margin-top:3px}
.date.today{background:linear-gradient(135deg,#FFD970,#F5B324);color:#1A1405}.date.today span{color:#1A1405}
.date.late{background:var(--downBg);color:var(--down)}.date.late span{color:var(--down)}
.tick{width:36px;height:36px;border-radius:12px;flex:none;border:2.5px solid var(--surf3);display:flex;align-items:center;justify-content:center;color:#06281C;font-weight:900;font-size:17px;transition:all .2s}
.tick.on{background:var(--up);border-color:var(--up);animation:pop .3s}
.tag{display:inline-block;padding:3px 10px;border-radius:10px;font-size:12.5px;font-weight:800;background:var(--surf3);color:var(--text2);white-space:nowrap}
.over{color:var(--down)!important;font-weight:750}

/* habits: big round icons */
.habits{display:grid;grid-template-columns:repeat(4,1fr);gap:12px 8px}
.hb{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center}
.hb .c{width:66px;height:66px;border-radius:33px;display:flex;align-items:center;justify-content:center;background:var(--surf2);position:relative;transition:all .25s;color:var(--muted)}
.hb .c svg{width:30px;height:30px}
.hb.on .c{background:linear-gradient(135deg,#34D399,#10B981);color:#fff;box-shadow:0 8px 20px rgba(16,185,129,.35)}
.hb.on .c{animation:pop .35s}
.hb .n{font-size:12.5px;font-weight:700;color:var(--text2);line-height:1.2}
.hb .s{position:absolute;right:-4px;top:-4px;min-width:26px;height:26px;border-radius:13px;background:#FF7A45;color:#fff;font-size:12px;font-weight:900;display:flex;align-items:center;justify-content:center;padding:0 5px;border:3px solid var(--bg)}
.hb.warnme .c{box-shadow:0 0 0 2.5px var(--amber)}
.prayers{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.pr{min-height:70px;border-radius:18px;background:var(--surf2);font-size:14px;font-weight:800;color:var(--text2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transition:all .25s}
.pr span{font-size:12.5px;font-weight:600;color:var(--muted)}
.pr.on{background:linear-gradient(135deg,#A78BFA,#7C3AED);color:#fff;box-shadow:0 8px 18px rgba(124,58,237,.35)}.pr.on span{color:rgba(255,255,255,.8)}
.pr.now{box-shadow:0 0 0 2.5px var(--violet)}

/* forms */
textarea,input[type=text],input[type=number],input[type=time],input[type=password],input[type=datetime-local],select{width:100%;min-width:0;background:var(--surf2);border:1.5px solid transparent;border-radius:18px;padding:14px 16px;outline:none;font-size:17px}
textarea:focus,input:focus,select:focus{border-color:rgba(245,197,66,.6);background:#212A3F}
textarea{min-height:170px;resize:vertical;line-height:1.5}
.field{margin-bottom:14px}.field label{display:block;font-size:14.5px;color:var(--muted);margin:0 4px 8px;font-weight:600}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.chips{display:flex;flex-wrap:wrap;gap:9px}
.chip{min-height:44px;padding:8px 15px;border-radius:22px;background:var(--surf2);color:var(--text2);font-size:15px;font-weight:700;display:inline-flex;align-items:center;gap:8px;transition:all .15s}
.chip svg{width:18px;height:18px}
.chip.on{background:var(--goldBg);color:var(--goldHi);box-shadow:inset 0 0 0 1.5px rgba(245,197,66,.6)}
.echo{border-left:4px solid var(--gold);padding:10px 14px;margin:10px 0;background:var(--surf2);border-radius:0 16px 16px 0}
.echo .d{font-size:13px;color:var(--muted);font-weight:700}
.seg{display:flex;background:var(--surf2);border-radius:16px;padding:4px;gap:4px}.seg button{flex:1;min-height:46px;border-radius:13px;font-weight:800;color:var(--muted);font-size:15.5px}.seg button.on{background:var(--surf3);color:var(--text)}

/* stat tiles */
.stat{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;text-align:center}
.stat>div{background:var(--surf2);border-radius:18px;padding:14px 6px}
.stat b{display:block;font-size:26px;font-weight:850;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.stat span{font-size:13px;color:var(--muted);font-weight:600}
.up{color:var(--up)}.down{color:var(--down)}.goldc{color:var(--gold)}

/* chat */
.msg{max-width:88%;padding:13px 16px;border-radius:22px;margin:10px 0;white-space:pre-wrap;overflow-wrap:anywhere;animation:up .3s both;font-size:16.5px}
.msg.me{margin-left:auto;background:linear-gradient(135deg,#FFD970,#F5B324);color:#1A1405;border-bottom-right-radius:8px;font-weight:600}
.msg.ai{background:var(--surf);border-bottom-left-radius:8px}
.suggest{display:grid;gap:10px}
.suggest button{display:flex;align-items:center;gap:14px;text-align:left;background:var(--surf);border-radius:20px;padding:14px 16px;font-weight:700;font-size:16px}
.askbar{position:fixed;left:0;right:0;bottom:calc(76px + var(--safeB));background:linear-gradient(transparent,var(--bg) 25%);padding:18px 14px 10px;z-index:4}
.askbar .in{max-width:640px;margin:0 auto;display:flex;gap:8px}
.askbar input{flex:1;min-height:56px;border-radius:28px;padding:0 22px}
.askbar .btn{border-radius:28px;min-width:84px}

/* tab bar */
.tabs{position:fixed;left:10px;right:10px;bottom:calc(10px + var(--safeB));max-width:620px;margin:0 auto;background:rgba(20,26,40,.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-radius:28px;display:flex;justify-content:space-around;padding:8px 6px;z-index:5;box-shadow:0 12px 34px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.06) inset}
.tabs button{flex:1;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#8993A8;font-size:12.5px;font-weight:750;border-radius:20px;transition:all .2s}
.tabs button svg{width:26px;height:26px}
.tabs button.on{color:var(--goldHi);background:rgba(245,197,66,.1)}
.tabs button.write{color:#8993A8;background:none}
.tabs button.write .pl{width:58px;height:58px;border-radius:21px;margin-top:-26px;background:linear-gradient(135deg,#FFD970,#F5A524);color:#1A1405;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(245,165,36,.45)}
.tabs button.write .pl svg{width:30px;height:30px}
.tabs button.write.on{color:var(--goldHi)}

/* sheet, toast, misc */
.sheet-bg{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:20;display:flex;align-items:flex-end;justify-content:center;animation:up .2s}
.sheet{background:#141A28;width:100%;max-width:640px;border-radius:30px 30px 0 0;padding:20px 18px calc(24px + var(--safeB));max-height:88vh;overflow:auto;animation:up .3s}
.sheet .grab{width:48px;height:5px;border-radius:3px;background:var(--surf3);margin:0 auto 16px}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(100px + var(--safeB));background:#2B3450;color:#fff;padding:14px 20px;border-radius:18px;z-index:30;font-size:16px;font-weight:650;max-width:90%;box-shadow:0 10px 30px rgba(0,0,0,.45);animation:up .25s}
.spin{display:inline-block;width:20px;height:20px;border-radius:50%;border:3px solid rgba(0,0,0,.2);border-top-color:currentColor;animation:sp .8s linear infinite}
.login{min-height:88vh;display:flex;flex-direction:column;justify-content:center;gap:16px;max-width:380px;margin:0 auto;padding:20px}
.logo{width:96px;height:96px;border-radius:28px;box-shadow:0 14px 36px rgba(245,165,36,.3);animation:pop .5s}
.empty{color:var(--muted);font-size:15.5px;line-height:1.5}
.focus{display:flex;gap:14px;align-items:center}
.focus .bub{background:linear-gradient(135deg,#FFD970,#F5A524);color:#1A1405}

/* PROGRESS - charts. Colours checked for colour-blind readers on the dark cards:
   profit #4C8DF6 / loss #E4572E (direction also shows it), prayers one violet, habits one green, plan one gold. */
.kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px}
.kpi{background:var(--surf);border-radius:20px;padding:14px 16px}
.kpi .l{font-size:13.5px;color:var(--muted);font-weight:650}
.kpi .v{font-size:30px;font-weight:850;letter-spacing:-.8px;margin-top:2px;color:var(--text)}
.kpi .d{font-size:13px;color:var(--text2);margin-top:1px}
.heat{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.heat .h{font-size:11.5px;color:var(--muted);text-align:center;font-weight:700}
.heat .c{aspect-ratio:1;border-radius:9px;background:#28314A;cursor:pointer;outline-offset:2px}
.heat .c.today{box-shadow:inset 0 0 0 2px var(--text)}
.heat .c.future{background:transparent;box-shadow:inset 0 0 0 1px var(--line)}
.scale{display:flex;align-items:center;gap:4px;justify-content:flex-end;margin-top:10px;font-size:12px;color:var(--muted)}
.scale i{width:14px;height:14px;border-radius:4px;display:inline-block}
.hrow{display:grid;grid-template-columns:96px 1fr 52px;gap:10px;align-items:center;padding:9px 0}
.hrow+.hrow{border-top:1px solid var(--line)}
.hrow .nm{font-size:14px;font-weight:700;line-height:1.2}
.hrow .dots{display:grid;grid-template-columns:repeat(14,1fr);gap:3px}
.hrow .dots i{aspect-ratio:1;border-radius:50%;background:#28314A;display:block}
.hrow .dots i.on{background:#20A472}
.hrow .pc{text-align:right;font-size:13px;color:var(--text2);font-weight:700;font-variant-numeric:tabular-nums}
.chart svg{width:100%;height:auto;display:block;overflow:visible}
.chart .ax{font-size:11px;fill:#8C97AE}
.chart .grid{stroke:rgba(255,255,255,.08);stroke-width:1}
.chart .base{stroke:rgba(255,255,255,.28);stroke-width:1}
.chart .lbl{font-size:12px;font-weight:800;fill:#F5F6FA}
.chart .hit{fill:transparent;cursor:pointer}
.chart .mk{transition:filter .15s}.chart g.on .mk{filter:brightness(1.3)}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;color:var(--text2);margin-top:10px}
.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.tip{position:fixed;z-index:40;background:#EEF1F7;color:#141821;border-radius:12px;padding:8px 11px;font-size:13.5px;pointer-events:none;box-shadow:0 8px 24px rgba(0,0,0,.4);max-width:230px}
.tip b{display:block;font-size:16px}
details.nums{margin-top:10px}details.nums summary{cursor:pointer;color:var(--gold);font-weight:700;font-size:14px;list-style:none}
details.nums table{width:100%;border-collapse:collapse;margin-top:8px;font-size:13.5px;font-variant-numeric:tabular-nums}
details.nums td,details.nums th{padding:5px 4px;border-bottom:1px solid var(--line);text-align:right}details.nums td:first-child,details.nums th:first-child{text-align:left}
details.nums th{color:var(--muted);font-weight:700}
.linkcard{display:flex;align-items:center;gap:14px;width:100%;text-align:left}
