:root{
  --bg:#0b1016; --ink:#e8eef5; --muted:#8ea0b5;
  --line:rgba(255,255,255,.09); --glass:rgba(255,255,255,.045); --glass2:rgba(255,255,255,.075);
  --teal:#7dd3c0; --blue:#93b4f0; --done:#6ee7b7; --warn:#e9c893;
  --shadow:0 18px 40px -22px rgba(0,0,0,.95);
  --radius:20px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:15px;line-height:1.5;letter-spacing:-.01em;
  -webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;
  padding:0 0 108px;overflow-x:hidden;
}
.serif{font-family:"Instrument Serif",Georgia,serif;font-weight:400;letter-spacing:0}
.muted{color:var(--muted)} .small{font-size:13px} .tiny{font-size:11.5px}

.aurora{position:fixed;inset:0;z-index:-1;overflow:hidden;
  background:radial-gradient(120% 80% at 50% -10%, #12202c 0%, var(--bg) 60%)}
.aurora span{position:absolute;border-radius:50%;filter:blur(90px);opacity:.30}
.aurora span:nth-child(1){width:420px;height:420px;background:#1d5f57;top:-120px;left:-90px}
.aurora span:nth-child(2){width:360px;height:360px;background:#26466f;top:35%;right:-140px;opacity:.26}
.aurora span:nth-child(3){width:300px;height:300px;background:#123a3c;bottom:-120px;left:25%;opacity:.22}

.glass{
  background:linear-gradient(180deg,var(--glass2),var(--glass));
  border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
}
main{max-width:600px;margin:0 auto;padding:18px 16px 0}

.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.brand{display:flex;align-items:center;gap:9px}
.brandname{font-size:22px}
.dot{width:9px;height:9px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 4px rgba(125,211,192,.14)}

/* hero */
.hero{padding:16px 16px 20px;margin-bottom:20px}
.datebar{display:flex;align-items:center;justify-content:space-between;gap:10px}
.round{width:38px;height:38px;flex:none;border-radius:50%;background:var(--glass);
  border:1px solid var(--line);color:var(--ink);font-size:19px;line-height:1;cursor:pointer;transition:.18s}
.round:hover{background:var(--glass2)}
.datepill{position:relative;flex:1;text-align:center;padding:9px 12px;border-radius:999px;
  background:var(--glass);border:1px solid var(--line);font-weight:600;font-size:14px;cursor:pointer}
.datepill input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;border:0}

.heroBody{display:flex;align-items:center;gap:18px;margin-top:18px}
.ring{--pct:0;width:96px;height:96px;flex:none;border-radius:50%;
  background:conic-gradient(var(--done) calc(var(--pct)*1%), rgba(255,255,255,.07) 0);
  display:grid;place-items:center;transition:background .35s;box-shadow:inset 0 0 22px rgba(0,0,0,.5)}
.ringInner{width:76px;height:76px;border-radius:50%;background:linear-gradient(180deg,#131c25,#0d141b);
  display:grid;place-items:center;text-align:center;border:1px solid var(--line)}
.ringInner strong{font-size:19px;font-weight:600;letter-spacing:-.02em}
.heroText{flex:1;min-width:0}
.fitHead{margin-top:16px}
.dayFull{font-size:26px;margin:0 0 3px;line-height:1.15}
.chipRow{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.chip{background:rgba(125,211,192,.12);border:1px solid rgba(125,211,192,.35);color:var(--teal);
  border-radius:999px;padding:5px 12px;font-size:12px;font-family:inherit;font-weight:500;cursor:pointer}
.chip.static{cursor:default}
.note{margin:14px 0 0;padding:10px 13px;border-radius:12px;font-size:12.5px;
  background:rgba(233,200,147,.09);border:1px solid rgba(233,200,147,.28);color:var(--warn)}

/* blocks + lists */
.block{margin-bottom:24px}
.blockHead{display:flex;align-items:baseline;justify-content:space-between;margin:0 4px 11px}
.blockHead h2{font-size:30px;margin:0;line-height:1}
.blockHead .small-h{font-size:22px}
.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.item{display:flex;align-items:center;gap:13px;padding:13px 14px;
  background:linear-gradient(180deg,var(--glass2),var(--glass));
  border:1px solid var(--line);border-radius:16px;
  box-shadow:0 10px 26px -20px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);transition:.2s}
.item.done{border-color:rgba(110,231,183,.30);background:linear-gradient(180deg,rgba(110,231,183,.09),rgba(110,231,183,.03))}
.item.done .name{color:var(--muted)}
.box{appearance:none;width:26px;height:26px;flex:none;border-radius:9px;cursor:pointer;
  border:1.5px solid rgba(255,255,255,.22);background:rgba(255,255,255,.04);position:relative;transition:.18s}
.box:checked{background:linear-gradient(180deg,#8ff0c6,#57cfa0);border-color:transparent}
.box:checked::after{content:"";position:absolute;left:9px;top:4px;width:5px;height:11px;
  border:solid #06251a;border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}
.name{flex:1;font-size:14.5px;font-weight:500;min-width:0}
.tag{font-size:10.5px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--warn);
  border:1px solid rgba(233,200,147,.35);background:rgba(233,200,147,.08);border-radius:7px;padding:3px 7px;white-space:nowrap}
.info{width:27px;height:27px;flex:none;border-radius:50%;cursor:pointer;background:rgba(147,180,240,.10);
  border:1px solid rgba(147,180,240,.35);color:var(--blue);font-family:"Instrument Serif",serif;font-size:15px;line-height:1;transition:.18s}
.info:hover{background:rgba(147,180,240,.2)}

.week{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}
.wday{text-align:center;padding:10px 4px;border-radius:14px;background:var(--glass);border:1px solid var(--line);cursor:pointer}
.wday b{display:block;font-size:13px;font-weight:600;margin-bottom:3px}
.wday span{font-size:10.5px;color:var(--muted)}
.wday.full{border-color:rgba(110,231,183,.35);background:rgba(110,231,183,.08)}
.wday.part{border-color:rgba(233,200,147,.3)}
.wday.today{outline:1.5px solid rgba(125,211,192,.5);outline-offset:1px}

/* cards (fitness + settings) */
.card{padding:16px;margin-bottom:16px}
.cardHead{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px}
.cardHead h3,.cardTitle{font-size:24px;margin:0}
.cardTitle{margin-bottom:6px}
.figure{font-size:14px;font-weight:600;color:var(--teal)}
.bar{height:9px;border-radius:99px;background:rgba(255,255,255,.07);overflow:hidden;margin-bottom:13px}
.bar>div{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#57cfa0,#8ff0c6);transition:width .3s}
.btnRow{display:flex;gap:8px;margin-bottom:10px}
.add{flex:1;padding:11px 6px;border-radius:14px;background:var(--glass);border:1px solid var(--line);
  color:var(--ink);font-family:inherit;font-size:13.5px;font-weight:600;cursor:pointer;transition:.18s;line-height:1.2}
.add small{display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:2px}
.add:hover{background:var(--glass2);transform:translateY(-1px)}
.inputRow{display:flex;gap:8px;align-items:center}
.inputRow input{flex:1;min-width:0;padding:11px 13px;border-radius:13px;border:1px solid var(--line);
  background:rgba(0,0,0,.25);color:var(--ink);font-family:inherit;font-size:14.5px}
.inputRow input:focus{outline:1.5px solid rgba(125,211,192,.45)}
.mini{padding:11px 16px;border-radius:13px;border:none;cursor:pointer;font-family:inherit;font-size:13.5px;
  font-weight:600;background:linear-gradient(180deg,#8ee4cf,#5fc0aa);color:#04231c}
.mini.ghosty{background:var(--glass);border:1px solid var(--line);color:var(--ink);font-weight:500}
.spark{width:100%;height:70px;margin-bottom:12px;display:block}

/* exercises */
.exCard{padding:14px 15px;border-radius:16px;background:linear-gradient(180deg,var(--glass2),var(--glass));
  border:1px solid var(--line);box-shadow:0 10px 26px -20px rgba(0,0,0,.9)}
.exTop{display:flex;align-items:center;gap:10px;margin-bottom:3px}
.exName{flex:1;font-size:16px;font-weight:600}
.exMeta{font-size:12px;color:var(--muted);margin-bottom:11px}
.setRowEx{display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:12px;
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05);margin-bottom:6px}
.setRowEx:last-child{margin-bottom:0}
.setRowEx.done{background:rgba(110,231,183,.08);border-color:rgba(110,231,183,.25)}
.setLabel{flex:1;font-size:13.5px}
.setLabel b{font-weight:600}
.timer{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--teal);
  background:rgba(125,211,192,.12);border:1px solid rgba(125,211,192,.3);border-radius:9px;padding:3px 9px}
.exCard.rest{text-align:center;padding:26px 16px}
.exCard.rest p{margin:6px 0 0;color:var(--muted);font-size:13.5px}

/* settings */
.setRow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid rgba(255,255,255,.05)}
.setRow:last-of-type{border-bottom:none}
.setInput{width:110px;padding:9px 11px;border-radius:11px;border:1px solid var(--line);
  background:rgba(0,0,0,.25);color:var(--ink);font-family:inherit;font-size:14px;text-align:right}
.switch{position:relative;display:inline-block;width:46px;height:27px;flex:none}
.switch input{opacity:0;width:0;height:0}
.switch span{position:absolute;inset:0;border-radius:99px;background:rgba(255,255,255,.12);
  border:1px solid var(--line);cursor:pointer;transition:.2s}
.switch span::before{content:"";position:absolute;width:19px;height:19px;left:3px;top:3px;border-radius:50%;
  background:#cdd9e6;transition:.2s}
.switch input:checked + span{background:rgba(110,231,183,.45)}
.switch input:checked + span::before{transform:translateX(19px);background:#eafff6}

/* tab bar */
.tabbar{
  position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:25;
  display:flex;gap:4px;padding:7px;border-radius:999px;width:min(340px,calc(100% - 32px));
}
.tab{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 4px;
  background:none;border:none;border-radius:999px;cursor:pointer;color:var(--muted);
  font-family:inherit;font-size:10.5px;font-weight:600;transition:.2s;
}
.tab svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tab.active{color:#04231c;background:linear-gradient(180deg,#8ee4cf,#5fc0aa);
  box-shadow:0 8px 20px -10px rgba(125,211,192,.7)}

/* gate */
.gate{position:fixed;inset:0;display:grid;place-items:center;padding:22px;z-index:30}
.gate-card{width:100%;max-width:330px;padding:30px 24px;text-align:center}
.gate-card h1{font-size:34px;margin:12px 0 2px}
.mark{width:44px;height:44px;margin:0 auto;border-radius:14px;
  background:linear-gradient(145deg,rgba(125,211,192,.35),rgba(147,180,240,.18));
  border:1px solid var(--line);box-shadow:inset 0 1px 0 rgba(255,255,255,.18)}
.gate-card input{width:100%;margin:18px 0 12px;padding:14px;border-radius:14px;border:1px solid var(--line);
  background:rgba(0,0,0,.25);color:var(--ink);font-family:inherit;font-size:20px;text-align:center;letter-spacing:8px}
.gate-card input:focus{outline:1.5px solid rgba(125,211,192,.45)}
.primary{width:100%;padding:13px;border:none;border-radius:14px;cursor:pointer;
  background:linear-gradient(180deg,#8ee4cf,#5fc0aa);color:#04231c;font-family:inherit;font-size:15px;font-weight:600;
  box-shadow:0 12px 26px -14px rgba(125,211,192,.8)}
.msg{font-size:12.5px;color:var(--warn);min-height:18px;margin:10px 0 0}

/* sheet + toast */
.sheet{position:fixed;inset:0;background:rgba(4,8,12,.72);backdrop-filter:blur(3px);
  display:flex;align-items:flex-end;justify-content:center;z-index:40}
.sheetCard{width:100%;max-width:600px;max-height:86vh;overflow:auto;position:relative;padding:12px 22px 34px;border-radius:26px 26px 0 0}
.grab{width:42px;height:4px;border-radius:99px;background:rgba(255,255,255,.18);margin:4px auto 14px}
.sheetCard h3{font-size:28px;margin:0 0 8px;padding-right:34px}
.lead{margin:0 0 6px;font-size:14.5px}
.close{position:absolute;right:16px;top:14px;background:none;border:none;color:var(--muted);font-size:27px;line-height:1;cursor:pointer}
dl{margin:0}
dt{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--teal);margin-top:17px;font-weight:600}
dd{margin:5px 0 0;font-size:14.5px;line-height:1.55;color:#d6e1ee}
.toast{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);background:rgba(18,26,34,.96);
  border:1px solid var(--line);color:var(--ink);padding:11px 18px;border-radius:999px;font-size:13px;z-index:50;box-shadow:var(--shadow)}

@media(min-width:620px){.sheet{align-items:center}.sheetCard{border-radius:26px;max-height:80vh}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
