:root{--bg:#f7f5fb;--paper:#fff;--ink:#322d41;--muted:#777180;--purple:#7760ae;--light:#eee8f8;--line:#e9e4ef;--green:#367d69;--peach:#fae9df;--radius:24px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select,textarea{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.55}a{color:var(--purple)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #a78dcf;outline-offset:4px}button{border:0}svg{vertical-align:middle}.icon{width:21px;height:21px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.shell{max-width:1600px;margin:auto;min-height:100vh;display:grid;grid-template-columns:244px 1fr}.sidebar{padding:42px 25px 24px;border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;background:#fdfcfe}.brand{display:flex;align-items:center;gap:11px;font-size:30px;font-weight:750;letter-spacing:-1.4px}.brand img{width:44px;height:44px;border-radius:14px}.brand span{color:var(--purple)}.tagline{font-size:12px;color:var(--muted);margin:10px 0 48px 5px}.nav{display:flex;flex-direction:column;gap:10px}.nav button{background:transparent;display:flex;align-items:center;gap:13px;padding:15px 17px;border-radius:15px;text-align:left;font-weight:550;color:var(--muted)}.nav button.active{background:var(--light);color:#654b9a}.side-bottom{margin-top:auto}.side-note{background:#f4f0fa;padding:19px;border-radius:20px;margin-bottom:20px;font-size:13px}.side-note p{color:var(--muted);margin:8px 0 0}.profile{display:flex;align-items:center;gap:10px;padding:10px}.avatar{width:39px;height:39px;display:grid;place-items:center;background:#e9e0f5;border-radius:50%;color:var(--purple);font-weight:700}.profile small{display:block;color:var(--muted)}main{padding:32px 48px 48px;max-width:1250px;width:100%;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:30px}.eyebrow{font-size:11px;letter-spacing:1.9px;font-weight:700;color:var(--muted);text-transform:uppercase}.top-actions{display:flex;align-items:center;gap:12px}.badge{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--green);background:#eaf4ee;border-radius:20px;padding:7px 11px}.badge.local{color:#886441;background:#f7ecdd}.dot{height:6px;width:6px;background:currentColor;border-radius:50%}.icon-btn{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--line);background:white;border-radius:14px}.role-switch{border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 12px;font-size:12px}.demo-banner{font-size:12px;color:#79694d;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f6efdf;border:1px solid #eee3c7;border-radius:12px;padding:9px 13px;margin-bottom:24px}.demo-banner button{background:transparent;text-decoration:underline;white-space:nowrap}.greeting{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:26px}h1{font-size:36px;line-height:1.2;letter-spacing:-1.2px;font-weight:700;margin:0 0 10px}h2{font-size:20px;letter-spacing:-.4px;margin:0}h3{font-size:16px;margin:0}p{margin:0}.sub{color:var(--muted);font-size:14px}.date-pill{padding:10px 15px;border:1px solid var(--line);border-radius:30px;background:#fff;font-size:12px;white-space:nowrap}.layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px}.hero{background:var(--peach);border:1px solid #f1dacf;border-radius:var(--radius);padding:26px 28px;position:relative;overflow:hidden;min-height:179px;margin-bottom:26px;display:flex;justify-content:space-between;align-items:center;gap:18px}.hero .eyebrow{color:#9c7764;margin-bottom:10px}.hero h2{font-size:25px;margin-bottom:8px;max-width:310px;line-height:1.25}.hero p{font-size:13px;color:#8b7569}.progress-line{margin-top:18px;display:flex;align-items:center;gap:10px;font-size:12px;color:#826958}.track{height:6px;background:#e7cdbd;width:140px;border-radius:10px;overflow:hidden}.track span{display:block;background:#bd876c;height:100%;border-radius:10px;transition:width .3s}.flower{width:113px;height:113px;flex-shrink:0}.week{display:flex;justify-content:space-between;gap:5px;padding:9px;background:white;border:1px solid var(--line);border-radius:20px;margin-bottom:29px}.day{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;flex:1;padding:12px 4px;border-radius:14px;background:none;color:var(--muted);font-size:12px}.day strong{font-size:19px;color:var(--ink);font-weight:550}.day.active{background:var(--purple);color:#eee7fc}.day.active strong{color:white}.day .daydot{width:4px;height:4px;border-radius:50%;background:transparent}.day.today .daydot{background:currentColor}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.link-btn{padding:8px 0;background:none;color:var(--purple);font-size:12px;font-weight:600}.group{margin-bottom:25px}.time-head{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:650;margin-bottom:12px}.time-head .icon{width:17px;height:17px;color:#92879f}.time-head small{font-size:11px;font-weight:400;color:var(--muted)}.time-head .line{height:1px;background:var(--line);flex:1}.med{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:19px;background:white;padding:18px;margin-bottom:10px;transition:border-color .2s}.med.done{background:#f5faf7;border-color:#d9e9df}.pillbox{width:46px;height:49px;display:grid;place-items:center;background:#f3edf9;border-radius:14px;flex-shrink:0}.pillbox.gold{background:#fbf0db}.pillbox.mint{background:#e9f2ef}.pill{height:13px;width:29px;transform:rotate(-38deg);border-radius:20px;background:linear-gradient(90deg,#b6a0d7 50%,#fff 50%);box-shadow:0 0 0 1.3px #c3b7d3}.gold .pill{background:linear-gradient(90deg,#e4b75d 50%,#fff8e6 50%);box-shadow:0 0 0 1.3px #dbc391}.mint .pill{background:linear-gradient(90deg,#9bc8b4 50%,#fff 50%);box-shadow:0 0 0 1.3px #adc9bd}.med-info{flex:1;min-width:0}.med-info h3{font-size:15px;overflow-wrap:anywhere}.med-info p{font-size:12px;color:var(--muted);margin-top:3px}.med-info .taken{color:var(--green);font-size:11px;margin-top:6px}.check{border:1.5px solid #d9d0e5;background:#fff;border-radius:50%;height:34px;width:34px;flex-shrink:0;display:grid;place-items:center;color:transparent}.check.checked{background:var(--green);border-color:var(--green);color:white}.check .icon{width:17px}.rail-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:23px;margin-bottom:18px}.rail-card .eyebrow{margin-bottom:18px}.next-time{font-size:35px;letter-spacing:-1px;font-weight:600;margin:9px 0 2px}.next-label{font-size:12px;color:var(--muted);margin-bottom:18px}.next-items{border-top:1px solid var(--line);padding-top:15px}.next-items p{font-size:13px;margin:7px 0}.next-items span{color:var(--muted);font-size:11px;display:block}.primary{background:var(--purple);color:#fff;padding:13px 19px;border-radius:13px;font-weight:600;font-size:13px}.secondary{border:1px solid var(--line);background:#fff;padding:12px 18px;border-radius:13px;font-size:13px}.full{width:100%;margin-top:16px}.soft-card{background:#eee9f6;border:0}.soft-card .bubble{width:37px;height:37px;background:#fff7;display:grid;place-items:center;border-radius:12px;color:var(--purple);margin-bottom:14px}.rail-card h3{margin-bottom:8px;font-size:15px}.rail-card p{font-size:12px;color:var(--muted);line-height:1.65}.rail-card .link-btn{margin-top:9px}.privacy{display:flex;align-items:flex-start;gap:8px;font-size:11px;color:#8d8695;padding:4px 14px}.privacy .icon{width:15px;height:15px}.empty{border:1px dashed #d9cde5;padding:35px 22px;border-radius:20px;color:var(--muted);text-align:center}.empty p{margin:9px 0 15px}.page-card{background:white;border:1px solid var(--line);border-radius:22px;padding:25px;margin-bottom:18px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid var(--line)}.setting-row:last-child{border:0}.setting-row p{color:var(--muted);font-size:13px;margin-top:4px}.setting-row .icon{margin-right:8px}.notice{padding:13px 16px;border-radius:13px;background:#f5efdf;color:#786647;font-size:12px;margin:16px 0}.history-item{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px}.history-item small{color:var(--muted);display:block}dialog{border:1px solid var(--line);border-radius:24px;padding:28px;width:min(480px,calc(100% - 28px));max-height:90dvh;color:var(--ink);box-shadow:0 25px 100px #30203a30}dialog::backdrop{background:#29203865;backdrop-filter:blur(3px)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.modal-head h2{font-size:22px}label{display:block;font-size:12px;font-weight:600;margin:15px 0 6px}input,textarea,select{width:100%;border:1px solid #ddd4e5;border-radius:11px;background:#fff;padding:12px;color:var(--ink)}textarea{resize:vertical}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:13px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.error{color:#a34553;font-size:13px;margin-top:14px}.weekday-checks{display:flex;gap:6px;flex-wrap:wrap}.weekday-checks label{border:1px solid var(--line);padding:8px;border-radius:8px;font-size:11px}.weekday-checks input{width:auto;margin-right:4px}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);background:#362d45;color:#fff;border-radius:14px;padding:13px 21px;box-shadow:0 8px 30px #21133225;z-index:10;font-size:13px;opacity:0;pointer-events:none;transition:.2s;max-width:90%;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}.login{max-width:440px;margin:8vh auto;padding:30px}.login .brand{justify-content:center;margin-bottom:40px}.login h1{font-size:28px;margin:18px 0}.login .page-card{padding:28px}.mobile-brand{display:none}.footnote{color:var(--muted);font-size:11px;margin-top:18px}.plan-actions{display:flex;gap:6px}.plan-actions button{width:34px;height:34px;background:var(--bg);border-radius:10px}.plan-actions .icon{width:16px}.toggle-tabs{display:flex;background:var(--bg);padding:5px;border-radius:12px;gap:6px;margin:18px 0}.toggle-tabs button{flex:1;background:none;padding:10px;border-radius:9px;font-size:13px}.toggle-tabs button.active{background:white;box-shadow:0 2px 7px #322d4110;color:var(--purple)}
@media(min-width:1400px){main{padding-top:40px}.hero{min-height:195px}.med{padding:20px}}
@media(max-width:1150px){.shell{grid-template-columns:205px 1fr}.sidebar{padding:32px 18px}main{padding:28px}.layout{grid-template-columns:minmax(0,1fr) 240px;gap:20px}.hero{padding:22px}.flower{width:85px;height:85px}.date-pill{display:none}}
@media(max-width:920px){.layout{grid-template-columns:1fr}.rail{display:grid;grid-template-columns:1fr 1fr;gap:15px}.rail-card{margin:0}.privacy{grid-column:1/-1}.hero h2{max-width:none}.flower{width:105px;height:105px}}
@media(max-width:650px){.shell{display:block}.sidebar{position:fixed;top:auto;bottom:0;height:auto;width:100%;padding:8px 10px calc(8px + env(safe-area-inset-bottom));z-index:5;border:0;border-top:1px solid var(--line);background:#fffefefa;backdrop-filter:blur(12px)}.sidebar>.brand,.tagline,.side-bottom{display:none}.nav{flex-direction:row;gap:3px;justify-content:space-around}.nav button{flex:1;flex-direction:column;gap:4px;justify-content:center;padding:8px 4px;font-size:10px;border-radius:12px}.nav .icon{width:21px;height:21px}main{padding:22px 19px 112px}.topbar{margin-bottom:20px}.topbar>.eyebrow{display:none}.mobile-brand{display:flex;font-size:23px}.mobile-brand img{width:32px;height:32px;border-radius:10px}.top-actions{gap:7px}.top-actions .icon-btn{display:none}.role-switch{font-size:10px;padding:7px}.badge{font-size:10px;padding:6px 9px}.demo-banner{font-size:10px;padding:8px 10px;margin-bottom:22px}.greeting{margin-bottom:22px}h1{font-size:30px}.sub{font-size:12px}.hero{min-height:166px;padding:22px 20px;margin-bottom:20px;gap:10px}.hero h2{font-size:23px}.hero p{font-size:12px}.hero .eyebrow{font-size:9px}.flower{width:82px;height:82px}.track{width:100px}.progress-line{font-size:10px}.week{padding:6px;margin-bottom:25px}.day{padding:9px 3px;font-size:11px}.day strong{font-size:17px}.section-head h2{font-size:19px}.med{padding:15px 13px;gap:11px}.pillbox{width:40px;height:44px}.med-info h3{font-size:14px}.med-info p{font-size:11px}.rail{grid-template-columns:1fr}.rail-card{padding:21px}.rail-card:first-child{display:none}.privacy{padding:4px}.setting-row{align-items:flex-start;flex-wrap:wrap;gap:10px}.page-card{padding:20px}.login{margin:4vh auto;padding:20px}#toast{bottom:100px}.form-row{gap:10px}.topbar .badge{max-width:120px}.plan-actions{flex-direction:column}.med .plan-actions button{width:29px;height:29px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Keep the daily summary secondary to the medication list. */
.hero{min-height:0;padding:14px 18px;margin-bottom:16px;gap:12px;border-radius:18px}
.hero .eyebrow{display:none}
.hero h2{font-size:19px;line-height:1.25;margin-bottom:4px;max-width:none}
.hero p{font-size:12px}
.hero .flower{width:60px;height:60px}
.hero .progress-line{margin-top:8px;font-size:11px}
.hero .track{height:5px;width:110px}
@media(max-width:650px){
 .hero{padding:12px 14px;margin-bottom:14px;gap:10px}
 .hero h2{font-size:17px}
 .hero .flower{width:48px;height:48px}
 .hero .progress-line{margin-top:6px;font-size:10px}
}

/* Put the current scheduled group first visually, without changing chronology. */
.time-head{gap:9px}.time-head strong{font-size:25px;line-height:1.2;white-space:nowrap}.time-head strong span{font-size:12px;font-weight:500}.time-head .slot-label{font-size:12px}
.current-group{padding:16px;border:2px solid #aa8cc7;border-radius:22px;background:#f5effb}
.current-group .time-head strong{font-size:34px;color:#654781}.current-group .slot-label{background:#72548d;color:white;border-radius:20px;padding:5px 10px;font-weight:600}.current-group .med-info h3{font-size:18px}.current-group .med-info p{font-size:14px}.current-group .check{width:48px;height:48px;flex-shrink:0}
.slot-check{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:0;border:2px solid #b39acb;border-radius:50%;background:white;color:#765591;cursor:pointer}.time-head .slot-check .icon{width:23px;height:23px;color:inherit}.slot-check:hover:not(:disabled){background:#eee5f6;border-color:#765591}.slot-check:focus-visible{outline:3px solid #765591;outline-offset:3px}.slot-check.complete{background:#688c7a;border-color:#688c7a;color:white}.slot-check:disabled{cursor:default}.slot-check:disabled:not(.complete){opacity:.5}
@media(max-width:380px){.time-head{gap:6px}.time-head .slot-label{font-size:10px}.current-group .slot-label{padding:4px 6px}.current-group .time-head strong{font-size:27px}}
.dose-list{padding:0;list-style:none;margin:18px 0}.dose-list li{padding:10px 0;border-bottom:1px solid var(--line)}.dose-list span{display:block;color:var(--muted);font-size:13px;margin-top:4px}
@media(max-width:650px){.current-group{padding:11px}.current-group .time-head strong{font-size:30px}.current-group .med-info h3{font-size:17px}.current-group .med{padding:14px 10px}.time-head .line{min-width:0}}
