:root{--blue:#176db5;--blue-dark:#125794;--ink:#1b2d40;--muted:#75879a;--line:#e5ecf2;--surface:#fff;--bg:#f5f8fc;--soft:#eaf4fd;--coral:#e97962;--green:#20845e;--warning:#b67023;--radius:18px}*{box-sizing:border-box}html{font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased}body{margin:0;background:var(--bg)}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #80beec;outline-offset:2px}a{color:var(--blue)}[hidden]{display:none!important}#notice{position:fixed;z-index:99;left:50%;bottom:90px;transform:translateX(-50%);pointer-events:none;background:#173047;color:white;padding:12px 20px;border-radius:14px;box-shadow:0 15px 45px #15293e32;font-weight:600;max-width:90vw;display:none;text-align:center}#notice.show{display:block}.loading-screen{display:flex;min-height:100vh;align-items:center;justify-content:center;flex-direction:column;gap:14px;color:var(--muted)}.spinner{width:30px;height:30px;border:3px solid #d9e9f6;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:25px;background:radial-gradient(circle at 70% 0%,#dbeeff,transparent 40%),var(--bg)}.auth-card{width:min(440px,100%);padding:46px 38px;background:white;border:1px solid var(--line);border-radius:25px;box-shadow:0 24px 100px #2c5b8a13}.mark{width:65px;height:65px;margin-bottom:22px}.mark img{width:100%;height:100%}.auth-card h1{font-size:32px;letter-spacing:-1.4px;margin:8px 0}.blue-dot{font-size:14px;color:var(--blue);vertical-align:middle}.subtle,.quiet-hint{color:var(--muted)}.auth-card .subtle{margin-bottom:35px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:2.1px;color:#7b91a5}.stack{display:flex;flex-direction:column;gap:16px}label{font-size:13px;font-weight:700;display:flex;flex-direction:column;gap:9px}input,select,textarea{background:#fff;border:1px solid #dbe5ec;border-radius:12px;padding:12px 14px;color:var(--ink);min-width:0;width:100%}textarea{min-height:92px;resize:vertical}.auth-card input{font-weight:400}.quiet-hint{font-size:12px;margin-top:20px}.auth-privacy{font-size:11px;line-height:1.65;color:#95a4b1;margin-top:20px}.button{border:none;border-radius:12px;padding:12px 17px;font-size:13px;font-weight:750;display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:42px}.button.primary{background:var(--blue);color:#fff}.button.primary:hover{background:var(--blue-dark)}.button.outline{border:1px solid #dce6ee;background:#fff;color:var(--ink)}.button.soft{background:#eaf4fd;color:var(--blue)}.button.danger{color:#b84940;background:#faeeed}.button.small{min-height:36px;padding:7px 12px}.button.full{width:100%}.shell{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--line);padding:30px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center;padding:4px 12px 40px}.brand img{width:41px;height:41px}.brand strong{letter-spacing:1.3px;font-size:15px}.brand small{display:block;font-size:8px;color:#94a2b0;letter-spacing:1.7px;margin-top:5px}.side-menu{display:flex;flex-direction:column;gap:7px}.nav-link{border:none;text-align:left;padding:16px;border-radius:12px;background:transparent;color:#6e8090;font-weight:750;display:flex;align-items:center;gap:14px;font-size:14px}.nav-link span{font-size:20px;width:24px;text-align:center}.nav-link.active,.nav-link:hover{background:#eaf4fc;color:var(--blue)}.aside-footer{margin-top:auto;padding:15px 11px;color:var(--muted);font-size:12px;line-height:1.7}.aside-footer small{color:#9aa7b2}.tiny-status-dot{display:inline-block;width:7px;height:7px;background:#53b9a1;border-radius:50%;margin-right:6px}.workspace{min-width:0;padding:40px clamp(18px,5vw,70px) 25px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1050px;margin:0 auto 33px}.topbar h1{margin:7px 0 0;font-size:clamp(22px,3vw,30px);letter-spacing:-1.1px}.top-actions{display:flex;align-items:center;gap:16px}.last-checked{font-size:11px;color:var(--muted)}.content{max-width:1050px;margin:0 auto}.footnote{max-width:1050px;margin:34px auto;color:#96a3af;font-size:11px;line-height:1.6}.card{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);padding:24px}.hero{background:linear-gradient(132deg,#1475c4 0%,#1767ad 100%);border:none;color:white;min-height:221px;display:flex;justify-content:space-between;gap:25px;overflow:hidden;position:relative}.hero:after{content:"";position:absolute;width:280px;height:280px;border:45px solid #ffffff12;right:-65px;top:-96px;border-radius:50%}.hero > *{position:relative;z-index:1}.hero .title{font-size:12px;color:#cde8ff;font-weight:700}.hero .big{font-size:clamp(30px,4vw,45px);font-weight:800;margin:16px 0 4px;letter-spacing:-1.7px}.hero .secondary{font-size:13px;color:#deefff;margin-top:12px;line-height:1.6}.hero-right{text-align:right;align-self:flex-end}.hero-right .pill{background:#ffffff25;border:1px solid #ffffff39;color:white;padding:9px 14px;border-radius:999px;font-size:12px;font-weight:700;display:inline-block}.section-top{display:flex;align-items:baseline;justify-content:space-between;margin:28px 0 14px}.section-top h2{margin:0;font-size:18px;letter-spacing:-.5px}.section-top span{color:var(--muted);font-size:12px}.grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.grid-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.metrics{margin-top:16px}.metric-title{color:var(--muted);font-size:12px;font-weight:650}.metric-value{font-size:clamp(23px,3vw,32px);font-weight:850;letter-spacing:-1.2px;margin:14px 0 4px}.metric-foot{font-size:12px;color:#8293a1}.metric-value small{font-size:14px;color:var(--muted);letter-spacing:0}.tag{display:inline-flex;border-radius:100px;padding:6px 10px;font-size:11px;font-weight:750;background:#e8f4ec;color:var(--green)}.tag.warn{background:#fff3e7;color:var(--warning)}.tag.ghost{background:#eef3f8;color:#667f91}.tag.blue{background:#e8f4ff;color:var(--blue)}.progress{height:9px;background:#edf3f7;border-radius:999px;overflow:hidden;margin-top:14px}.progress>div{height:100%;background:var(--blue);border-radius:999px;transition:width .3s}.split-card{display:flex;justify-content:space-between;gap:15px}.step-list{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-top:18px}.step{height:7px;border-radius:50px;background:#ecf0f4}.step.on{background:var(--blue)}.step.active{background:var(--coral)}.list-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #eef2f5;padding:14px 0;align-items:center}.list-row:last-child{border-bottom:0;padding-bottom:0}.list-row:first-child{padding-top:2px}.row-left{display:flex;gap:12px;align-items:center}.date-square{border-radius:10px;padding:9px 11px;min-width:57px;text-align:center;background:#eef5fb;color:var(--blue);font-size:13px;font-weight:800}.record-title{font-size:13px;font-weight:750}.record-sub{font-size:11px;color:var(--muted);margin-top:5px}.empty{padding:24px;text-align:center;color:var(--muted);font-size:13px;line-height:1.6}.info{background:#f0f7fd;color:#436985;border-radius:13px;padding:14px 16px;font-size:12px;line-height:1.65;margin-top:14px}.warning{background:#fff8f1;color:#8f6336;border-radius:13px;padding:14px 16px;font-size:12px;line-height:1.65;margin-top:14px}.label-row{display:flex;justify-content:space-between;gap:14px;align-items:center}.subhead{font-size:14px;font-weight:800;margin:0 0 14px}.calendar-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 20px}.calendar-head h2{font-size:19px;margin:0}.month-buttons{display:flex;gap:5px}.month-buttons button{width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:20px;color:#4a647c}.weeknames,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.weeknames div{text-align:center;color:#9aa8b6;font-size:11px;font-weight:650;padding:12px 0}.day{border:1px solid #ecf0f4;background:#fff;border-radius:12px;min-height:84px;padding:9px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:8px}.day.muted{opacity:.25;border-color:transparent;background:transparent;cursor:default}.day.today{outline:2px solid #86b9df}.day.done{background:#f0faf6;border-color:#cbe8db}.day.skipped{background:#fff7ee;border-color:#f4dec5}.day.planned{background:#f1f7fd;border-color:#d0e6f9}.day .day-number{font-size:13px;font-weight:750}.day .day-state{font-size:10px;font-weight:700;color:#7d8fa0}.day.done .day-state{color:var(--green)}.day.skipped .day-state{color:var(--warning)}.day.planned .day-state{color:var(--blue)}.calendar-legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:20px;color:#708396;font-size:11px}.dot{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:5px}.dot.done{background:#5daf87}.dot.skipped{background:#e9b473}.dot.planned{background:#90c2e8}.dot.unknown{background:#d1dae2}.modal-backdrop{position:fixed;inset:0;z-index:20;background:#14283e7a;display:grid;place-items:center;padding:20px}.modal-panel{background:white;width:min(460px,100%);max-height:90vh;overflow-y:auto;border-radius:22px;padding:26px;box-shadow:0 24px 80px #0b172345}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.modal-head h2{margin:0;font-size:20px}.icon-button{border:none;background:#f1f5f9;color:#527089;border-radius:9px;font-size:24px;width:38px;height:38px}.form-row{margin-bottom:15px}.form-actions{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px}.settings-block{margin-bottom:18px}.settings-block h2{font-size:17px;margin:0 0 12px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.stage-config{display:grid;grid-template-columns:1fr 100px 100px;gap:9px;align-items:center;margin-bottom:9px;font-size:12px}.stage-config input{padding:9px}.setting-actions{display:flex;justify-content:space-between;gap:15px;margin-top:20px;flex-wrap:wrap}.bottom-nav{display:none}.pill-icon{display:grid;place-items:center;font-size:20px;border-radius:11px;background:#eaf4fd;color:#1475bf;width:42px;height:42px}.status-line{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;margin:13px 0}.status-line i{display:block;width:7px;height:7px;border-radius:50%;background:#45aa89}.link-button{background:none;border:none;color:var(--blue);font-weight:700;padding:0;font-size:12px}.divider{height:1px;background:var(--line);margin:20px 0}.muted{color:var(--muted)}.right{margin-left:auto}.fineprint{font-size:11px;color:#8e9ca8;line-height:1.6}.row-date{font-variant-numeric:tabular-nums}@media(max-width:1000px){.shell{grid-template-columns:190px minmax(0,1fr)}.workspace{padding:25px}.sidebar{padding:25px 11px}}@media(max-width:700px){.shell{display:block}.sidebar{display:none}.workspace{padding:23px 16px 96px}.topbar{align-items:flex-start;margin-bottom:19px}.topbar h1{font-size:24px}.top-actions{flex-direction:column;align-items:flex-end;gap:6px}.last-checked{font-size:10px}.content{width:100%}.card{padding:19px;border-radius:16px}.hero{min-height:196px}.hero .big{font-size:30px}.hero-right{display:none}.metrics{margin-top:12px}.grid-two{gap:11px}.grid-three{grid-template-columns:1fr}.metric-value{font-size:25px}.metric-title{font-size:11px}.metric-foot{font-size:10px}.day{padding:6px;min-height:64px;border-radius:9px}.day .day-number{font-size:12px}.day .day-state{font-size:9px}.calendar-grid,.weeknames{gap:3px}.calendar-head{margin-bottom:10px}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;padding:8px 9px max(9px,env(safe-area-inset-bottom));background:#fffc;backdrop-filter:blur(15px);border-top:1px solid var(--line);justify-content:space-around;z-index:10}.bottom-nav button{display:flex;align-items:center;flex-direction:column;gap:3px;padding:7px 15px;background:none;border:none;font-size:10px;color:#8292a2;font-weight:700}.bottom-nav button span{font-size:23px}.bottom-nav button.active{color:var(--blue)}.form-grid{grid-template-columns:1fr}.stage-config{grid-template-columns:1fr 80px 80px}.auth-card{padding:32px 24px}.topbar .eyebrow{font-size:9px}}@media(max-width:380px){.day{min-height:57px}.day .day-state{font-size:8px}.calendar-grid,.weeknames{gap:2px}}
/* v3: cleaner mobile dashboard, integrated calendar, progressive targets */
:root{--blue:#176db5;--surface:#fff;--line:#e4ebf2}
body{letter-spacing:-.017em}
button,input,select,textarea{font-family:inherit}
.settings-icon{width:37px;height:37px;border:1px solid var(--line);background:#fff;border-radius:11px;display:grid;place-items:center;color:#557991;font-size:18px;flex-shrink:0}
.top-actions{display:flex;gap:10px;align-items:center;flex-direction:row}
.hero-clean{min-height:168px;padding:26px;border-radius:20px;background:linear-gradient(135deg,#166ab2,#1686cc);align-items:center}
.hero-clean .big{font-size:clamp(28px,3vw,38px);margin:14px 0 7px;letter-spacing:-1px}
.hero-clean>.pill{z-index:1;align-self:flex-start;flex:none;padding:8px 12px;border-radius:24px;background:rgba(255,255,255,.18);border:1px solid #ffffff37;font-size:12px;font-weight:800}
.metric-short{padding:20px}
.metric-short .metric-value{margin:7px 0 2px}
.metric-short .metric-foot{margin-top:8px}
.calendar-card{padding:22px}
.mini-calendar .calendar-head{margin-bottom:9px}
.mini-calendar .calendar-head h2{font-size:16px}
.mini-grid{gap:6px}
.mini-grid .day{min-height:47px;display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;background:transparent;padding:6px 3px;text-align:center;border-radius:12px}
.mini-grid .day.selected{border-color:#bad9f0;background:#ecf7ff}
.mini-grid .day.today{outline:0;background:#176db5;color:#fff}
.mini-grid .day.today .day-number{color:#fff}
.mini-grid .day.done{background:#eaf7f2}
.mini-grid .day.skipped{background:#fff2e7}
.mini-grid .day.planned{background:#eaf4ff}
.mini-grid .day .day-number{font-size:13px}
.mini-dot{display:block;width:5px;height:5px;border-radius:50%;background:transparent}
.mini-dot.done{background:#329e78}.mini-dot.skipped{background:#e38e50}.mini-dot.planned{background:#3a98dc}
.mini-grid .day.today .mini-dot{background:#fff}
.day-spacer{min-height:36px}
.day.selected{box-shadow:inset 0 0 0 2px #176db5;border-color:transparent}
.day.today.selected{outline:0}
.month-buttons button{min-width:36px;width:auto;padding:0 11px;line-height:1}
.inline-caption{color:#8699aa;font-size:12px;line-height:1.75;margin:12px 1px 0}
.home-foot{display:flex;align-items:center;gap:6px;color:#8da1b1;font-size:11px;margin:18px 0 0}
.decision-banner{margin-top:14px;background:#f4f9fd;border:1px solid #c5dff1}
.decision-banner p{font-size:13px;color:#55758e}
.decision-banner button{margin-top:6px}
.chosen-card{border:1px solid #dfeaf2}
.chosen-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.chosen-head small{font-size:11px;color:#8e9fac}
.chosen-head h3{font-size:17px;margin:5px 0 0}
.chosen-desc{font-size:13px;color:#4e6376;line-height:1.65;margin:15px 0}
.record-end{display:flex;align-items:center;gap:10px}
.stat-card{padding:24px}
.stats-svg{width:100%;height:auto;aspect-ratio:3.2/1.1;max-height:290px;display:block;margin:8px 0}
.segmented{display:flex;background:#f0f4f8;border-radius:12px;padding:4px;gap:3px;width:max-content;max-width:100%;margin-bottom:16px}
.segmented button{border:0;background:none;border-radius:9px;padding:10px 13px;color:#72889d;font-weight:700;font-size:12px}
.segmented button.selected{background:#fff;box-shadow:0 1px 4px #142a3e19;color:#176db5}
.bars{height:210px;display:grid;grid-template-columns:repeat(6,1fr);gap:12px;align-items:end}
.bar-slot{min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;gap:5px}
.bar-value{font-size:10px;color:#7c93a5;margin-top:auto}
.bar-track{width:100%;height:150px;display:flex;align-items:flex-end;justify-content:center;background:linear-gradient(0deg,#f7fafd,#fff);border-bottom:1px solid #dce8f0}
.bar-fill{width:min(35px,75%);background:linear-gradient(180deg,#5caadd,#176db5);border-radius:6px 6px 0 0;min-height:2px}
.bar-label{font-size:11px;color:#869aab}
.goal-rungs{display:grid;gap:8px;margin:16px 0}
.goal-rung{border:1px solid #e5edf3;border-radius:13px;padding:13px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}
.goal-rung.current{border-color:#176db5;background:#f0f7ff}
.goal-rung.past{background:#f7f9fb}
.goal-rung>div{display:flex;flex-direction:column;gap:3px}
.goal-rung small{font-size:10px;color:#8da0b0}
.goal-rung.current>div strong{color:#176db5}
.goal-summary{display:flex;flex-direction:column;gap:5px;background:#f3f8fc;padding:14px 17px;border-radius:13px;margin-bottom:13px;font-size:12px;color:#5d748b}
.goal-summary strong{font-size:16px;color:#203a54}
.section-headline{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.section-headline small{font-size:11px;color:#8799aa}
.stage-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}
.stage-editor{border:1px solid #e3ebf2;border-radius:14px;padding:16px;background:#fff;min-width:0}
.stage-editor.current{border-color:#91c5e8;background:#f9fcff}
.stage-editor.free{background:#f7f9fb}
.stage-editor-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.stage-editor-top strong{font-size:13px;color:#263e53}
.stage-count{font-size:11px;color:#176db5;font-weight:750}
.stage-control-row{display:grid;grid-template-columns:1.4fr .7fr .7fr;gap:7px}
.stage-control-row label{font-size:10px;color:#8093a5;min-width:0}
.stage-control-row input,.stage-control-row select{width:100%;max-width:100%;min-width:0;padding:10px 7px;margin-top:5px;font-size:12px;border-radius:9px;background:#fff;border:1px solid #dfe7ee;color:#203346}
.choice-card{border:1px solid #e5edf3;border-radius:14px;padding:17px;margin:14px 0}
.choice-card h3{font-size:15px;margin:0 0 6px}
.choice-card p{color:#75899b;font-size:12px;line-height:1.7}
.choice-card .stage-control-row{grid-template-columns:1fr 1fr;margin:15px 0}
.reference summary{font-size:15px;font-weight:800;cursor:pointer;list-style-position:inside}
.reference-body{padding:14px 0 0;color:#587086;font-size:13px;line-height:1.7}
.reference-body img{width:100%;max-width:500px;margin-top:16px;border-radius:14px;border:1px solid #e3e9ef;display:block}
.reference .warning{color:#9c5e39}
#modalBody label{display:block;font-size:12px;font-weight:700;color:#61788b;margin:12px 0}
#modalBody textarea{width:100%;min-height:90px;resize:vertical;display:block;margin:9px 0;border:1px solid #dbe6ef;border-radius:12px;padding:13px}
@media(max-width:760px){.stage-cards{grid-template-columns:1fr}.topbar{position:relative}.top-actions{gap:7px}.topbar .last-checked{display:none}.topbar .settings-icon{order:2}.topbar .button.small{order:1}.hero-clean{min-height:150px;padding:21px}.hero-clean .big{font-size:27px}.hero-clean>.pill{margin-left:0}.card{padding:18px}.mini-grid{gap:2px}.mini-grid .day{min-height:42px}.mini-calendar{padding:17px}.month-buttons button{min-width:32px;padding:0 8px}.bar-track{height:130px}.bars{height:192px}.record-end{gap:4px;flex-direction:column;align-items:flex-end}.chosen-head h3{font-size:15px}.stats-svg{aspect-ratio:2.6/1.2}.settings-block{margin-bottom:14px}.stage-editor{padding:14px}}
@media(max-width:370px){.mini-grid .day{min-height:37px}.mini-grid .day .day-number{font-size:12px}.stage-control-row{gap:5px}}
.day.rest{background:#f8fafb;border-color:#edf1f4}.day.rest .day-state{color:#a2adb7}.mini-dot.rest{background:#bfcbd4}.dot.rest{background:#bfcbd4}

/* v4 - focused active stage and compact home progress */
.home-progress{padding:20px 23px;margin-top:15px}
.progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.progress-head h2{font-size:16px;letter-spacing:-.02em;margin:0;color:#22384d}
.progress-item+.progress-item{border-top:1px solid #e8eef4;padding-top:16px;margin-top:16px}
.progress-data{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px;margin-bottom:10px;font-size:12px}
.progress-data strong{color:#263c52;font-size:13px}.progress-data span{font-variant-numeric:tabular-nums;color:#47728f;font-weight:700}
.progress.slim{height:7px;margin:0;border-radius:999px;background:#eaf1f6;overflow:hidden}
.progress.slim>div{background:linear-gradient(90deg,#1269b4,#3ca4de);height:100%;min-width:0;border-radius:999px}
.progress-caption{color:#91a2b0;font-size:11px;margin-top:8px}
.active-plan-card{border:1px solid #a9d0ec;background:linear-gradient(135deg,#f7fbff,#fff);border-radius:18px;padding:21px;margin:17px 0 13px}
.active-plan-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.active-plan-head small{font-size:11px;color:#829aad;font-weight:700}.active-plan-head h3{font-size:19px;margin:5px 0 0;color:#1f3b54}
.active-plan-head>strong{font-size:12px;color:#176db5;background:#e8f4ff;padding:9px 12px;border-radius:12px}
.active-plan-controls{display:grid;grid-template-columns:1.35fr .7fr .7fr;gap:12px;align-items:end;margin-top:20px}
.active-plan-controls label{display:flex;flex-direction:column;gap:7px;color:#7990a3;font-size:12px;font-weight:700}
.active-plan-controls label input,.active-plan-controls label select{height:48px;width:100%;padding:9px 11px;margin:0;color:#26394c;background:#fff;border:1px solid #dbe7f0;border-radius:11px;font-weight:700;min-width:0}
.fixed-interval{display:flex;flex-direction:column;justify-content:center;min-height:66px;gap:4px;border-right:1px solid #e1eaf2}
.fixed-interval>span,.fixed-interval small{color:#8aa0b0;font-size:11px}.fixed-interval strong{font-size:15px;color:#24425d}
.active-plan-foot{font-size:11px;color:#748c9e;margin-top:17px;line-height:1.6}
.stage-guide{border:1px solid #e3edf4;border-radius:14px;background:#fbfdfe;overflow:hidden;margin-top:17px}
.stage-guide>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;cursor:pointer;list-style:none;font-weight:800;font-size:13px;color:#304f69}
.stage-guide>summary::-webkit-details-marker{display:none}
.stage-guide summary small{display:inline;color:#92a5b5;font-size:11px;font-weight:500;margin-left:9px}
.guide-open{font-size:12px;color:#176db5}.stage-guide[open] .guide-open{font-size:0}.stage-guide[open] .guide-open:before{content:'접기';font-size:12px}
.stage-guide-list{border-top:1px solid #e7eef4;padding:8px 16px}
.stage-guide-row{display:grid;grid-template-columns:62px 1fr auto;gap:8px;align-items:center;padding:12px 6px;border-bottom:1px solid #ecf1f5;font-size:12px}
.stage-guide-row:last-child{border-bottom:0}.stage-guide-row.selected{color:#176db5}.guide-stage{color:#8095a8;font-weight:700}
.stage-guide-row strong{font-size:13px}.stage-guide-row small{color:#9aa8b5}
.stage-guide>.inline-caption{margin:2px 22px 18px}
.reference>summary{padding:3px 0 7px}.reference-body{padding-top:15px}
.guide-intro{padding:18px;background:linear-gradient(140deg,#f0f8fe,#fff);border:1px solid #dcecf8;border-radius:16px}
.reference-kicker{font-weight:800;color:#2985c5;font-size:10px;letter-spacing:.14em}.guide-intro h3{font-size:19px;margin:7px 0 9px;color:#253f55}
.guide-intro p{font-size:12px;color:#668199;line-height:1.75;margin:0}
.reference-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:13px}
.reference-step{border:1px solid #e3edf5;border-radius:14px;background:#fff;overflow:hidden}
.reference-step summary{display:flex;align-items:center;gap:11px;padding:14px;cursor:pointer;list-style:none}
.reference-step summary::-webkit-details-marker{display:none}
.step-number{width:37px;height:37px;border-radius:11px;background:#e7f3fe;color:#176db5;display:grid;place-items:center;font-weight:900;font-size:12px;flex-shrink:0}
.step-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.step-copy strong{font-size:13px;color:#29465d}.step-copy small{font-size:11px;color:#8397a8}
.step-chevron{margin-left:auto;color:#6c91ae;font-size:19px}.reference-step[open] .step-chevron{transform:rotate(45deg)}
.reference-step>p{margin:0;padding:0 16px 16px;font-size:12px;line-height:1.85;color:#516c80}
.reference-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:13px}
.reference-notes>div{background:#f6f9fc;border-radius:13px;padding:16px;border:1px solid #edf2f6}
.reference-notes strong{color:#47647b;font-size:12px}.reference-notes p{font-size:12px;color:#69849a;line-height:1.7;margin:8px 0 0}
.reference-safety{border-top:1px solid #e4edf4;padding:15px 2px 0;margin-top:17px;color:#996c4d;font-size:11px;line-height:1.75}
@media(max-width:700px){.home-progress{padding:18px}.progress-head h2{font-size:15px}.active-plan-card{padding:16px}.active-plan-head h3{font-size:17px}.active-plan-controls{grid-template-columns:1fr 90px 90px;gap:7px}.fixed-interval strong{font-size:13px}.stage-guide-row{grid-template-columns:50px 1fr auto;gap:5px}.stage-guide-row small{font-size:10px}.reference-steps,.reference-notes{grid-template-columns:1fr}.guide-intro h3{font-size:17px}}
@media(max-width:380px){.active-plan-controls{grid-template-columns:1fr 73px 74px}.active-plan-controls label input,.active-plan-controls label select{padding:7px 5px}.stage-guide-row{font-size:11px}}

/* v5: aligned basic settings, dated stage status and plan history */
.form-grid .date-wide{grid-column:1/-1}
.stage-window{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border-top:1px solid #dfebf3;padding-top:15px;margin-top:14px}
.stage-window>div{background:#fff;border:1px solid #e2edf5;border-radius:12px;padding:12px;min-width:0;display:flex;flex-direction:column;gap:6px}
.stage-window small{color:#91a3b2;font-weight:700;font-size:10px}.stage-window strong{color:#23445d;font-size:12px}
.timeline-note{font-size:11px;color:#8399aa;line-height:1.7;margin:12px 0 0}
.stage-timeline{border:1px solid #dceaf5;border-radius:14px;background:#fcfdff;overflow:hidden;margin:16px 0}
.stage-timeline>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;cursor:pointer;list-style:none;font-weight:800;font-size:13px;color:#31536c}
.stage-timeline>summary::-webkit-details-marker{display:none}.stage-timeline summary small{color:#93a6b7;font-size:11px;font-weight:500;margin-left:7px}
.stage-timeline[open] .guide-open{font-size:0}.stage-timeline[open] .guide-open:before{content:'접기';font-size:12px}
.timeline-list{padding:9px 17px 2px;border-top:1px solid #e5edf4}
.timeline-row{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid #edf2f6}
.timeline-row:last-child{border-bottom:0}
.timeline-marker{display:flex;flex-direction:column;align-items:center;width:12px;flex-shrink:0}
.timeline-marker span{width:10px;height:10px;border-radius:50%;border:2px solid #c5d6e4;background:#fff;margin-top:4px}
.timeline-row.current .timeline-marker span{border-color:#176db5;background:#176db5;box-shadow:0 0 0 4px #e5f3ff}
.timeline-row.past .timeline-marker span{border-color:#66ae91;background:#66ae91}
.timeline-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
.timeline-title{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.timeline-title strong{font-size:12px;color:#2c465a}.timeline-range{font-size:11px;color:#7b92a4;line-height:1.5}
.timeline-copy small{font-size:10px;color:#6d8ba3}
.timeline-chip{font-size:10px;font-weight:750;color:#7a8d9b;background:#eef3f7;border-radius:40px;padding:4px 9px;white-space:nowrap}
.timeline-chip.live{background:#e6f3ff;color:#176db5}.timeline-chip.done{background:#e9f5ef;color:#29845f}
.stage-timeline>.timeline-note{padding:0 18px 17px;margin:7px 0 0}
.quick-plan{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;background:#eaf5ff;border:1px solid #b9dafa;border-radius:12px;padding:13px;margin-top:15px}
.quick-plan>div{display:flex;flex-direction:column;gap:4px}.quick-plan strong{font-size:12px;color:#1b5c91}.quick-plan span{font-size:11px;color:#597e9f}
.stage-choice-wait{background:#f7fafc;border:1px solid #e7eef4;border-radius:13px;padding:15px;display:flex;gap:11px;align-items:center;flex-wrap:wrap}
.stage-choice-wait strong{font-size:13px;color:#375671}.stage-choice-wait p{width:100%;margin:0;font-size:11px;color:#8ba0b0;line-height:1.6}
@media(max-width:700px){.form-grid .date-wide{grid-column:auto}.stage-timeline>summary small{display:block;margin-left:0;margin-top:4px}.stage-window strong{font-size:11px}.quick-plan{align-items:stretch}.quick-plan .button{width:100%}}

/* v6: Separate the actual stage log from editable current plan. */
.stage-badge{display:inline-flex;align-items:center;gap:7px;border:1.5px solid transparent;border-radius:999px;padding:6px 11px;font-size:11px;font-weight:850;white-space:nowrap;line-height:1.3}
.stage-badge .stage-indicator{display:inline-block;width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:currentColor}
.stage-badge.running{background:#e5f2ff;color:#075aaa;border-color:#7cb7eb}
.stage-badge.extended{background:#fff0d4;color:#965000;border-color:#ebb367}
.stage-badge.completed{background:#dcf5e5;color:#12683b;border-color:#87cba1}
.stage-badge.pending{background:#eef1f5;color:#586b7c;border-color:#c4ccd5}
.metric-foot .stage-badge{margin-left:5px;vertical-align:middle;font-size:10px;padding:4px 8px}
.active-plan-card.status-extended{background:linear-gradient(135deg,#fff9ef,#fff);border-color:#e6b378}
.active-plan-card.status-completed{background:linear-gradient(135deg,#f1fcf4,#fff);border-color:#83c9a2}
.stage-choice-wait .stage-badge{flex-shrink:0}
.stage-record-card{margin-top:0;padding:22px}
.history-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}
.history-heading h2{font-size:17px;margin:0 0 6px}
.history-heading p{font-size:12px;color:#71879a;line-height:1.6;margin:0}
.history-count{background:#eef4f8;color:#536f87;border-radius:8px;padding:7px 10px;font-weight:800;font-size:11px;white-space:nowrap}
.stage-record-list{display:flex;flex-direction:column;gap:12px}
.stage-record-row{border:1px solid #dce7f0;border-left:5px solid #96aabb;border-radius:14px;background:#fbfdff;padding:18px 18px 16px}
.stage-record-row.running{border-left-color:#176db5;background:#f7fbff;border-color:#cfdfec;border-left-color:#176db5}
.stage-record-row.extended{border-left-color:#d37a1c;background:#fff9f1;border-color:#f1d9b8;border-left-color:#d37a1c}
.stage-record-row.completed{border-left-color:#168151;background:#f7fcf9;border-color:#cce8d8;border-left-color:#168151}
.record-row-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.record-row-top small{font-size:10px;font-weight:850;letter-spacing:.12em;color:#7b93a5}
.record-row-top h3{font-size:15px;margin:5px 0 0;font-weight:800;color:#213d55}
.record-date-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:15px}
.record-date-grid>div{padding:12px 13px;background:white;border:1px solid #e2eaf0;border-radius:10px;display:flex;flex-direction:column;gap:6px;min-width:0}
.record-date-grid span{font-size:10px;color:#7c93a4;font-weight:750}
.record-date-grid strong{font-size:12px;color:#253e55;font-weight:800;overflow-wrap:anywhere}
.record-row-foot{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.record-row-foot>span{font-size:11px;font-weight:700;color:#5d788e;background:#eaf2f7;padding:5px 8px;border-radius:7px}
.record-row-foot>.record-extended{color:#9b570c;background:#ffebcb}
.record-footnote{color:#7a8e9f;font-size:11px;line-height:1.6;margin:10px 0 0}
.record-extension-details{margin-top:12px;border-top:1px solid #e0e9ef;padding-top:10px}
.record-extension-details summary{color:#926015;font-size:11px;font-weight:800;cursor:pointer}
.record-extension-details ul{list-style:none;padding:0;margin:10px 0 0;display:flex;flex-direction:column;gap:6px}
.record-extension-details li{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:8px 10px;background:#fff;border-radius:8px;font-size:11px;color:#6b7f8e}
.record-extension-details li strong{color:#84500f}
.history-disclaimer{border-top:1px solid #e3edf3;padding-top:14px;margin:18px 0 0;color:#7e91a2;font-size:11px;line-height:1.7}
.revert-v5-plan{border:1px solid #ead5b6;background:#fffbf4;display:flex;align-items:center;justify-content:space-between;gap:14px;border-radius:12px;padding:13px;margin-top:15px}
.revert-v5-plan strong{font-size:12px;color:#805220}.revert-v5-plan p{font-size:11px;color:#8c7153;margin:4px 0 0;line-height:1.6}
.revert-v5-plan .button{flex-shrink:0}
@media(max-width:700px){.stage-record-card{padding:16px}.stage-record-row{padding:15px 13px}.record-row-top h3{font-size:13px}.record-date-grid{gap:7px}.record-date-grid strong{font-size:11px}.revert-v5-plan{flex-direction:column;align-items:stretch}.revert-v5-plan .button{width:100%}.metric-foot .stage-badge{margin-top:6px}}

/* v7 — compact all-stage overview in Statistics; leaves detailed stage history intact. */
.all-stages-section{padding:0;overflow:hidden}
.all-stages-overview{margin:0;border:0;border-radius:inherit;background:transparent}
.all-stages-overview>summary{padding:18px 22px;font-size:14px;color:#233f57}
.all-stages-overview[open] .guide-open{font-size:0}
.all-stages-overview[open] .guide-open:before{content:'접기';font-size:12px}
.all-stages-overview:not([open]) .guide-open{font-size:0}
.all-stages-overview:not([open]) .guide-open:before{content:'펼치기';font-size:12px}
.all-stages-overview .timeline-list{padding:6px 22px 7px}
.all-stages-overview .timeline-row{padding:10px 0}
.all-stages-overview .timeline-title strong{font-size:13px}
.all-stages-overview .timeline-range{font-size:11px;color:#617d92}
.all-stages-overview .timeline-copy small{color:#476f91}
.all-stages-overview .stage-badge{font-size:10px;padding:4px 9px;flex-shrink:0}
.all-stages-overview .timeline-row.stage-extended .timeline-marker span{background:#c76b0f;border-color:#c76b0f;box-shadow:0 0 0 4px #fff0d4}
.all-stages-overview .timeline-row.stage-running .timeline-marker span{background:#176db5;border-color:#176db5;box-shadow:0 0 0 4px #e5f3ff}
.all-stages-overview .timeline-row.stage-completed .timeline-marker span{background:#168451;border-color:#168451}
.all-stages-overview .timeline-row.stage-pending .timeline-marker span{background:#fff;border-color:#9aaebe}
.all-stages-overview .timeline-note{padding:2px 22px 18px;margin:0;font-size:11px}
@media(max-width:700px){.all-stages-overview>summary{padding:15px 16px}.all-stages-overview .timeline-list{padding:5px 16px}.all-stages-overview .timeline-note{padding:0 16px 16px}.all-stages-overview .timeline-title strong{font-size:12px}}

/* v8 — unified type, aligned stage status, visible collapsed overview summary */
:root{--ui-font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif}
html,body,button,input,textarea,select,option,summary{font-family:var(--ui-font)!important}
html{font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,textarea,select{letter-spacing:-.012em}
.month-buttons button{font-family:var(--ui-font);font-weight:700;letter-spacing:-.015em}
.month-buttons button[data-month="0"]{min-width:58px;font-size:13px;font-weight:700;letter-spacing:-.015em}
.month-buttons button[data-month="-1"],.month-buttons button[data-month="1"]{font-size:20px;font-weight:550}
.metric-value{font-weight:780;letter-spacing:-.035em}
.progress-data span{font-size:14px;font-weight:750;letter-spacing:-.02em;color:#284d69}
.stage-progress-head{align-items:center;gap:12px}
.stage-progress-ident{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
.stage-progress-ident>strong{font-size:15px;font-weight:770;letter-spacing:-.02em;color:#243d54}
.stage-progress-ident .stage-badge{margin:0;font-size:11px}
.stage-progress-count{margin-left:auto;white-space:nowrap;color:#243d54;font-size:16px;font-weight:770;letter-spacing:-.025em}
.all-stages-overview>summary{display:flex;align-items:center;justify-content:space-between;gap:16px}
.overview-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 9px;min-width:0}
.overview-heading>strong{font-size:14px;font-weight:790;color:#233f57;letter-spacing:-.025em}
.overview-heading small{margin:0!important;font-size:11px;font-weight:450;letter-spacing:-.005em;color:#8ca2b3}
.overview-current{display:flex;align-items:center;gap:8px;flex-shrink:0;white-space:nowrap}
.overview-current-label{font-size:12px;font-weight:720;color:#34576e;letter-spacing:-.01em}
.overview-current-count{font-size:12px;font-weight:740;color:#54738a;letter-spacing:-.015em}
.all-stages-overview>summary>.guide-open{flex-shrink:0;font-weight:740;font-size:12px}
.all-stages-overview>summary .overview-current .stage-badge{font-size:10px;padding:4px 9px}
@media(max-width:1000px){
 .all-stages-overview>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px}
 .overview-heading{grid-column:1;grid-row:1}
 .all-stages-overview>summary>.guide-open{grid-column:2;grid-row:1;justify-self:end}
 .overview-current{grid-column:1/-1;grid-row:2;flex-wrap:wrap;gap:6px 9px}
}
@media(max-width:700px){
 .month-buttons button[data-month="0"]{min-width:52px;font-size:13px}
 .stage-progress-ident>strong{font-size:14px}
 .stage-progress-count{font-size:14px}
 .all-stages-overview>summary{padding:15px 16px;gap:9px 6px}
 .overview-heading>strong{font-size:13px}
 .overview-heading small{font-size:10px}
 .overview-current-label,.overview-current-count{font-size:11px}
}


/* v9 UI refinement: coherent typography and compact stage overview. */
.all-stages-overview>summary{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:18px 22px; min-height:86px;
}
.overview-summary-main{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;min-width:0;flex:1}
.overview-eyebrow{font-size:11px;line-height:1.25;font-weight:650;color:#8094a5;letter-spacing:-.01em}
.overview-summary-line{display:flex;align-items:center;flex-wrap:wrap;gap:7px 11px;min-width:0}
.overview-summary-line strong.overview-current-label{font-size:15px;font-weight:780;line-height:1.35;color:#213b52;letter-spacing:-.025em;white-space:normal}
.overview-summary-line .stage-badge{margin:0;display:inline-flex;font-size:11px;font-weight:750;padding:5px 9px;line-height:1.3}
.overview-summary-line .overview-current-count{font-size:14px;font-weight:760;color:#496980;letter-spacing:-.015em;white-space:nowrap}
.overview-toggle{display:inline-flex;gap:10px;align-items:center;justify-content:flex-end;flex:0 0 auto;margin-left:auto;color:#1266ad}
.all-stages-overview>summary .overview-toggle>.guide-open{font-size:0;font-weight:730;line-height:1}
.all-stages-overview[open] .overview-toggle>.guide-open:before{content:'접기';font-size:13px}
.all-stages-overview:not([open]) .overview-toggle>.guide-open:before{content:'전체 단계 보기';font-size:13px}
.overview-toggle-chevron{display:inline-block;width:8px;height:8px;border-right:1.75px solid currentColor;border-bottom:1.75px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .16s ease}
.all-stages-overview[open] .overview-toggle-chevron{transform:translateY(2px) rotate(225deg)}
@media(max-width:1000px){
 .all-stages-overview>summary{display:flex;grid-template-columns:none;gap:12px}
 .overview-summary-main,.overview-summary-line,.overview-toggle{grid-column:auto;grid-row:auto}
}
@media(max-width:700px){
 .all-stages-overview>summary{padding:15px 16px;min-height:82px;gap:9px}
 .overview-summary-line{gap:7px 8px}
 .overview-summary-line strong.overview-current-label{font-size:13px}
 .overview-summary-line .overview-current-count{font-size:12px}
 .overview-eyebrow{font-size:10px}
 .all-stages-overview:not([open]) .overview-toggle>.guide-open:before{content:'전체 보기';font-size:11px}
 .all-stages-overview[open] .overview-toggle>.guide-open:before{font-size:11px}
 .overview-toggle{gap:7px}
}
@media(max-width:370px){
 .overview-summary-line .overview-current-count{flex-basis:100%}
}

/* Text is outside the stretched SVG, retaining normal font proportions. */
.chart-figure{width:100%;margin:8px 0 15px;min-width:0;font-family:var(--ui-font)}
.chart-value-top{padding-left:4.375%;font-size:13px;font-weight:700;color:#597287;line-height:1.5;letter-spacing:-.015em;font-variant-numeric:tabular-nums}
.chart-unit{font-size:12px;font-weight:650}
.chart-figure .stats-svg{width:100%;aspect-ratio:640/200;height:auto;max-height:none;display:block;margin:0}
.chart-axis-dates{display:flex;align-items:center;justify-content:space-between;padding:0 4.375%;margin-top:3px;color:#627d91;font-family:var(--ui-font);font-size:12px;font-weight:660;line-height:1.5;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.bar-label{font-family:var(--ui-font);font-size:12px;font-weight:650;color:#688297}
.bar-value{font-family:var(--ui-font);font-size:12px;font-weight:660;color:#5d7588}
@media(max-width:700px){
 .chart-value-top{font-size:12px}
 .chart-axis-dates{font-size:11px}
 .bar-value,.bar-label{font-size:11px}
}

/* v10: chart axis whitespace, today contrast, home metric simplification */
.chart-figure .stats-svg{aspect-ratio:640/174}
.chart-axis-dates{margin-top:1px}
/* Use a dark, readable day number against a soft-blue today background.
   Keep these after .mini-grid .day.done/.planned/.skipped so cascade cannot undo them. */
.mini-grid .day.today,
.mini-grid .day.today.done,
.mini-grid .day.today.planned,
.mini-grid .day.today.skipped,
.mini-grid .day.today.rest{background:#e3f1fd;color:#154e78;border-color:#88b9e0}
.mini-grid .day.today .day-number{color:#154e78;font-weight:800}
.mini-grid .day.today .mini-dot{background:#176db5}
.mini-grid .day.today.selected{box-shadow:inset 0 0 0 2px #176db5}

/* v11: home elapsed-day label and compact per-month dose history */
.metric-short{display:flex;flex-direction:column;min-width:0}
.metric-stage-elapsed{display:block;margin-top:7px;font-family:var(--ui-font);font-size:11px;font-weight:650;letter-spacing:-.03em;white-space:nowrap;color:#74899d;font-variant-numeric:tabular-nums}
.monthly-records{padding-bottom:18px}
.monthly-records-toggle{display:flex;justify-content:center;align-items:center;gap:9px;width:100%;margin-top:14px;padding:13px 10px 3px;border:0;border-top:1px solid #e4ecf3;background:transparent;color:var(--blue);font-family:var(--ui-font);font-size:13px;font-weight:750;letter-spacing:-.02em;cursor:pointer}
.monthly-records-toggle:focus-visible{outline:2px solid #80beec;outline-offset:2px;border-radius:8px}
.month-records-chevron{font-size:18px;line-height:1}
@media(max-width:700px){
 .metric-stage-elapsed{font-size:clamp(9px,2.65vw,11px);letter-spacing:-.045em}
 .monthly-records-toggle{font-size:12px}
 .monthly-records .list-row{gap:8px}
 .monthly-records .row-left{min-width:0;gap:8px}
 .monthly-records .date-square{min-width:48px;padding:8px 6px}
}

/* v12 — matching two-line metric footers on the home cards. */
.metrics .metric-short .metric-stage-elapsed{font-variant-numeric:tabular-nums}

/* v14: identical controls and colors across Safari/Chrome; separate next-stage forecasts. */
.day,.mini-grid .day,.month-buttons button{color:var(--ink);-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}
.day .day-number{color:var(--ink)}
.day:not(.today).selected .day-number{color:var(--ink)}
.day.planned:not(.today) .day-state{color:#145da1}
.day.next-stage:not(.today){background:#f4edff;border-color:#d9c6f8;color:#5b21a6}
.day.next-stage:not(.today) .day-number,.day.next-stage:not(.today) .day-state{color:#5b21a6}
.dot.next-stage{background:#9b78da}
.tag.purple{background:#efe7ff;color:#6226a7}
.mini-grid .day.next-stage:not(.today){background:#f1e9ff;border-color:#e2d5fb}
.mini-dot.next-stage{background:#8b5ecb}
.mini-grid .day.today.next-stage,.mini-grid .day.today.next-stage .day-number{color:#154e78;background:#e3f1fd}
.mini-grid .day.today.next-stage .mini-dot{background:#176db5}
/* Navigation icons are real vector icons instead of similar-looking text glyphs. */
.nav-icon{width:24px;min-width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
.nav-icon svg{display:block;width:22px;height:22px;stroke:currentColor}
.nav-link .nav-icon{width:24px;font-size:initial}
.bottom-nav button .nav-icon{width:24px;height:24px;font-size:initial}
.bottom-nav button .nav-icon svg{width:23px;height:23px}
/* Apple Health instructions: a collapsible, manual workflow; never auto-writes schedules. */
.health-schedule-guide{border:1px solid #dce8f2;border-radius:14px;background:#fbfdff;overflow:hidden}
.health-schedule-guide>summary{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;list-style:none;cursor:pointer;padding:17px 18px;font-size:14px;font-weight:800;color:#284960}
.health-schedule-guide>summary::-webkit-details-marker{display:none}
.health-guide-summary-hint{font-size:11px;color:#7793aa;font-weight:550}
.health-guide-body{padding:5px 18px 18px;border-top:1px solid #e7eef5}
.health-guide-heading{display:flex;align-items:center;gap:10px;padding-top:15px}
.health-guide-mark{width:34px;height:34px;display:grid;place-items:center;background:#e4f2fd;border-radius:10px;color:#176db5;font-size:22px;font-weight:700}
.health-guide-heading strong,.health-guide-heading small{display:block}
.health-guide-heading strong{font-size:13px;color:#20445e}
.health-guide-heading small{margin-top:4px;font-size:11px;color:#728aa0;line-height:1.5}
.health-guide-steps{margin:14px 0 0 0;padding-left:22px;color:#334c62;font-size:12px;line-height:1.9}
.health-guide-steps li{padding:3px 0}
.health-guide-notice{margin:12px 0 0;padding:12px 13px;background:#fff7ec;color:#865c2a;border-radius:11px;font-size:11px;line-height:1.7}
@media(max-width:700px){.health-schedule-guide>summary{padding:15px 13px}.health-guide-body{padding:5px 13px 15px}.day.next-stage:not(.today) .day-state{font-size:8px;letter-spacing:-.05em}}


/* v15: keep UI palette independent of OS dark-mode rendering.
   Explicit sRGB CSS hex values; hardware display calibration, True Tone and Night Shift
   can still influence perceived color and are beyond CSS control. */
:root{color-scheme:light;--next-bg:#fff0f6;--next-border:#f4cadc;--next-ink:#a6406c;--next-dot:#dc80a7}
html,body{color-scheme:light;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html{background-color:var(--bg)}
button,input,textarea,select,option{color-scheme:light}
/* Next-stage previews: soft pink instead of violet, with dark readable labels. */
.day.next-stage:not(.today){background:var(--next-bg);border-color:var(--next-border);color:var(--next-ink)}
/* Every calendar date uses the original dark numeral color, regardless of status. */
.day.next-stage:not(.today) .day-number{color:var(--ink)}
/* The status label may keep its semantic color; the date numeral does not. */
.day.next-stage:not(.today) .day-state{color:var(--next-ink)}
.dot.next-stage{background:var(--next-dot)}
.tag.pink{background:#ffe8f1;color:var(--next-ink)}
.mini-grid .day.next-stage:not(.today){background:var(--next-bg);border-color:var(--next-border)}
.mini-dot.next-stage{background:var(--next-dot)}
/* Selected/today styles preserve visual contrast regardless of the forecast state. */
.mini-grid .day.today.next-stage,.mini-grid .day.today.next-stage .day-number{color:#154e78;background:#e3f1fd}
.mini-grid .day.today.next-stage .mini-dot{background:#176db5}

/* v17 push settings only; previous UI layouts remain unchanged. */
.push-settings-card{margin-bottom:18px}
.push-settings-head{display:flex;align-items:flex-start;gap:12px}
.push-settings-symbol{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e8f3fc;color:#176db5;font-size:22px;flex:none}
.push-settings-head p{margin:0;font-size:12px;color:#75879a;line-height:1.7}
.push-status{padding:13px 15px;margin:17px 0;border-radius:12px;background:#f0f6fc;font-size:12px;font-weight:600;color:#365877;line-height:1.6}
.push-settings-actions{display:flex;gap:8px;flex-wrap:wrap}
.push-settings-actions .button{flex:1 1 130px}
@media(max-width:600px){.push-settings-actions .button{flex:1 1 calc(50% - 6px)}.push-settings-actions #disablePush{flex-basis:100%}}

/* v18 — Current course vs historical doses; responsive settings and consistent calendar selection. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.workspace,.content,.card,.settings-block,.form-grid,.form-grid>label,.date-wide{min-width:0;max-width:100%}
.form-grid .date-wide{grid-column:1/-1;min-width:0}
.form-grid input,.form-grid select{min-width:0;max-width:100%;box-sizing:border-box}
.form-grid input[type="date"]{display:block;min-width:0;width:100%;max-width:100%;height:48px;line-height:normal;padding:11px 14px;background:#fff;color:var(--ink);-webkit-appearance:none;appearance:none}
.form-grid input[type="date"]::-webkit-date-and-time-value{min-width:0;max-width:100%;text-align:left;line-height:24px}
.form-grid input[type="date"]::-webkit-datetime-edit{max-width:100%;overflow:hidden;min-width:0}
.history-total-card{margin-top:14px;padding:20px 23px}
.history-total-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.history-total-heading>div{min-width:0}
.history-total-heading h2{font-size:15px;font-weight:800;margin:0 0 6px;color:#253b50}
.history-total-heading p{font-size:11px;line-height:1.6;color:#8a9cad;margin:0}
.history-switch{display:inline-flex;align-items:center;flex-direction:row;gap:9px;cursor:pointer;color:#176db5;font-size:12px;font-weight:760;white-space:nowrap;padding:9px 11px;border:1px solid #c8e2f5;border-radius:11px;background:#f1f8fe;flex-shrink:0}
.history-switch input{width:17px;height:17px;min-width:17px;margin:0;accent-color:#176db5;cursor:pointer}
.history-totals-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.history-totals-grid>div{min-width:0;border:1px solid #dfebf5;border-radius:13px;background:#f8fbff;padding:15px;display:flex;flex-direction:column;gap:7px}
.history-totals-grid small{font-size:11px;color:#6a8499;font-weight:720;line-height:1.4}
.history-totals-grid strong{font-size:clamp(21px,2.1vw,27px);font-weight:800;color:#213d54;line-height:1.35;font-variant-numeric:tabular-nums;white-space:nowrap}
.history-totals-grid em{font-size:13px;font-style:normal;color:#8da0af}
.history-totals-grid span{color:#718da2;font-size:12px;font-weight:680}
.history-note{font-size:11px;line-height:1.7;color:#8399aa;margin:13px 0 0}
.history-note strong{color:#456e8d;font-weight:750}
/* Today is the blue ring; manually selected days have a neutral ring. Keep status background. */
.day.today,.mini-grid .day.today,.mini-grid .day.today.done,.mini-grid .day.today.skipped,.mini-grid .day.today.planned,.mini-grid .day.today.rest{outline:2px solid #176db5;outline-offset:-2px;border-color:#7fb6e0;position:relative}
.day:not(.today).selected{box-shadow:inset 0 0 0 2px #607c92;border-color:#607c92}
.day.today.selected,.mini-grid .day.today.selected{box-shadow:inset 0 0 0 1px #fff}
.day.today:not(.mini-day):before{content:'오늘';position:absolute;top:8px;right:8px;font-size:9px;line-height:1;font-weight:800;color:#176db5;letter-spacing:0}
.mini-grid .day.today.done{background:#eaf7f2}
.mini-grid .day.today.skipped{background:#fff2e7}
.mini-grid .day.today.planned{background:#eaf4ff}
.mini-grid .day.today:not(.done):not(.skipped):not(.planned){background:#e3f1fd}
.mini-grid .day.today .day-number{color:var(--ink)}
.mini-grid .day.today .mini-dot.done{background:#329e78}
.mini-grid .day.today .mini-dot.skipped{background:#e38e50}
.mini-grid .day.today .mini-dot.planned{background:#3a98dc}
@media(max-width:760px){
 input,select,textarea{font-size:16px;max-width:100%}
 .form-grid{grid-template-columns:1fr;gap:14px}
 .form-grid .date-wide{grid-column:1/-1}
 .form-grid label,.date-wide{width:100%;min-width:0}
 .form-grid input[type="date"]{font-size:16px;min-width:0;padding:10px 12px}
 .history-total-card{padding:16px}
 .history-total-heading{flex-wrap:wrap;gap:12px}
 .history-switch{width:100%;justify-content:center}
 .history-totals-grid{grid-template-columns:1fr}
 .day.today:not(.mini-day):before{font-size:8px;top:5px;right:5px}
 .metric-stage-elapsed{white-space:normal;overflow-wrap:anywhere}
 .metrics .metric-short{min-width:0}
}
@media(max-width:370px){
 .history-total-heading h2{font-size:14px}
 .day.today:not(.mini-day):before{font-size:7px;top:4px;right:4px}
}


/* v19 — historical/current trends, year jump & unambiguous history controls */
.day.history-done:not(.today){background:#f4f1fc;border-color:#ded5f3;color:var(--ink)}
.day.history-done .day-state{color:#715cb0}
.mini-grid .day.history-done:not(.today){background:#f4f1fc;border-color:#e8ddf4}
.mini-dot.history-done,.dot.history-done{background:#866fbd}
.mini-grid .day.history-done .mini-dot{background:#866fbd}
.tag-history{background:#f1ecfa;color:#6c56ac}
.date-square.historic{background:#f3eefc;color:#745fad}
.calendar-head{flex-wrap:wrap}
.calendar-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.calendar-jump{display:flex;align-items:center;gap:6px}
.calendar-jump label{display:flex;flex-direction:row;align-items:center;gap:5px;font-size:12px;color:#71899e}
.calendar-jump select{font-size:13px;min-width:0;width:auto;padding:9px 20px 9px 8px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);height:38px;font-weight:700}
.calendar-jump select#calendarYear{width:91px}
.calendar-jump select#calendarMonth{width:67px}
.history-compare-title{display:flex;justify-content:space-between;gap:9px;align-items:baseline;flex-wrap:wrap;font-size:13px;color:#28465f}
.history-compare-title span{font-size:11px;font-weight:650;color:#829aac}
.history-stack{height:12px;border-radius:20px;overflow:hidden;background:#edf3f7;display:flex;margin:12px 0 10px}
.stack-past{background:#866fbd;height:100%}.stack-current{background:#278bb8;height:100%}
.history-compare-legend{display:flex;justify-content:space-between;gap:9px;flex-wrap:wrap;color:#527086;font-size:12px;font-weight:730}
.history-comparison{border-top:1px solid #e8eef4;margin-top:17px;padding-top:17px}
.history-comparison>p{font-size:11px;color:#8397a8;line-height:1.7;margin:12px 0 0}
.comparison-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.comparison-charts:has(>.dose-chart-card:only-child){grid-template-columns:minmax(0,1fr)}
.dose-chart-card{border:1px solid #e4ecf4;border-radius:14px;padding:15px;min-width:0;background:#fff}
.dose-chart-card.past{background:#fbf9ff;border-color:#e7dff5}
.dose-chart-card.current{background:#f9fcff}
.dose-chart-card h3{font-size:13px;color:#243f54;margin:0 0 7px;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.dose-chart-card h3 small{font-size:10px;color:#8a9aac;font-weight:620}
.dose-chart-card .chart-figure{margin:4px 0 0}
.chart-new-dose{float:right;color:#7192a7;font-weight:600;font-size:11px;line-height:1.75}
.range-summary{margin:0;color:#708ba0;font-size:11px;line-height:1.7}
.range-summary strong{color:#294c69;font-variant-numeric:tabular-nums}
.dose-chart-card .chart-axis-dates{font-size:10px;padding:0 3.4%}
.history-total-heading .history-switch{white-space:normal;text-align:center;line-height:1.4}
@media(max-width:760px){
 .comparison-charts{grid-template-columns:1fr}
 .calendar-controls{justify-content:flex-start;width:100%}
 .calendar-head{align-items:flex-start}
 .calendar-jump{gap:5px}
 .calendar-jump select{font-size:16px}
 .dose-chart-card{padding:13px}
 .chart-new-dose{float:none;display:block}
 .history-compare-legend{justify-content:flex-start}
}
@media(max-width:390px){.calendar-controls{gap:7px}.calendar-jump label{font-size:11px}.calendar-jump select#calendarYear{width:87px}.calendar-jump select#calendarMonth{width:62px}}

/* Calendar historical labels keep the mobile day cells compact. */
.historic-short{display:none}
@media(max-width:760px){.day.history-done .historic-full{display:none}.day.history-done .historic-short{display:inline}.day.history-done .day-state{white-space:nowrap}}

/* v20 — one design system across desktop/mobile. Home current goal first, lifetime second. */
.dose-goal-card,.dose-breakdown-card,.dose-breakdown-body,.dose-breakdown-grid,.dose-breakdown-mini,.dose-breakdown-total,.dose-goal-row{min-width:0}
.dose-goal-card{padding:25px 25px 20px;border-color:#d9e8f3;background:linear-gradient(175deg,#fff 0%,#fbfdff 100%)}
.dose-goal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.dose-eyebrow{display:block;color:#7c9db4;font-size:10px;font-weight:800;letter-spacing:.12em;margin-bottom:5px}
.dose-goal-head h2{font-size:17px;color:#223d56;font-weight:850;letter-spacing:-.025em;margin:0}
.dose-target-chip{border:1px solid #d2e5f5;border-radius:999px;background:#eff7ff;padding:8px 11px;font-size:11px;font-weight:750;color:#316c9d;white-space:normal}
.dose-goal-row{padding:17px 0;display:flex;flex-direction:column;gap:10px}
.dose-goal-row+.dose-goal-row{border-top:1px solid #e4edf4}
.dose-goal-title{display:flex;justify-content:space-between;align-items:center;gap:10px}
.dose-goal-title>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.dose-goal-title strong{font-size:14px;letter-spacing:-.028em;color:#28485f;font-weight:850;line-height:1.4}
.dose-goal-title>div span{font-size:11px;line-height:1.4;color:#8ba0af}
.dose-goal-percentage{font-size:25px;font-weight:850;color:#176db5;letter-spacing:-.055em;font-variant-numeric:tabular-nums;white-space:nowrap}
.dose-goal-percentage small{font-size:13px;color:#639abf;letter-spacing:0;margin-left:2px}
.dose-goal-row.current .dose-goal-percentage{color:#278bb8}
.dose-goal-track{position:relative;min-width:0;display:block;width:100%;height:10px;border-radius:999px;background:#e9f0f5;overflow:hidden}
.dose-goal-track>span{display:block;height:100%;max-width:100%;border-radius:999px;transition:width .22s ease;background:linear-gradient(90deg,#2694c6,#53b5df)}
.dose-goal-row.lifetime .dose-goal-track>span{background:linear-gradient(90deg,#176db5,#5da6d9)}
.dose-goal-caption{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;color:#708ca0;font-size:12px;font-variant-numeric:tabular-nums;line-height:1.45}
.dose-goal-caption strong{font-weight:820;color:#284c67}
.dose-goal-note{border-top:1px solid #e8eff5;padding-top:12px;margin:4px 0 0;color:#8497a7;font-size:11px;line-height:1.6}
.dose-breakdown-card{padding:0!important;overflow:hidden;border-color:#dfebf3;background:#fff}
.dose-breakdown-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:18px 23px;min-height:70px}
.dose-breakdown-toggle::-webkit-details-marker{display:none}
.dose-breakdown-toggle::marker{content:''}
.dose-breakdown-heading{display:flex;flex-direction:column;gap:5px;min-width:0}
.dose-breakdown-heading strong{font-size:14px;font-weight:850;color:#29435b}
.dose-breakdown-heading small{font-size:11px;color:#8ba0b0;line-height:1.5}
.dose-expand-label{display:inline-flex;flex-shrink:0;align-items:center;gap:7px;font-size:11px;color:#3679ab;font-weight:760}
.dose-expand-label .when-open{display:none}
.dose-expand-label svg{height:18px;width:18px;fill:none;stroke:#4682ac;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}
.dose-breakdown-card[open] .when-closed{display:none}
.dose-breakdown-card[open] .when-open{display:inline}
.dose-breakdown-card[open] .dose-expand-label svg{transform:rotate(180deg)}
.dose-breakdown-body{border-top:1px solid #e8eff5;padding:18px 23px 23px;display:flex;flex-direction:column;gap:12px}
.dose-breakdown-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dose-breakdown-mini{display:flex;flex-direction:column;gap:9px;padding:17px;background:#f8faff;border:1px solid #dfebf4;border-radius:14px}
.dose-breakdown-mini.past{background:#faf8ff;border-color:#e8e1f5}
.dose-breakdown-mini.current{background:#f5faff;border-color:#dcebf5}
.dose-mini-label{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:#677f95;font-weight:790}
.dose-mini-label i{width:8px;height:8px;display:inline-block;border-radius:50%;background:#866fbd;flex-shrink:0}
.dose-breakdown-mini.current .dose-mini-label i{background:#278bb8}
.dose-breakdown-mini>strong{color:#263f55;font-size:clamp(23px,2.7vw,30px);font-weight:850;letter-spacing:-.045em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.2}
.dose-breakdown-mini>strong small{font-size:12px;color:#8ea3b2;font-weight:700;margin-left:4px;letter-spacing:0}
.dose-mini-meta{color:#869bac;font-size:11px;line-height:1.5}
.dose-breakdown-total{padding:18px;border-radius:14px;border:1px solid #d7e7f5;background:linear-gradient(145deg,#f1f8ff,#fbfdff);display:flex;flex-direction:column;gap:12px}
.dose-total-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap}
.dose-total-top>div{display:flex;flex-direction:column;gap:7px}
.dose-total-top>div small{font-size:12px;font-weight:800;color:#3c6c90}
.dose-total-top>div strong{font-weight:850;font-size:clamp(27px,3vw,34px);letter-spacing:-.05em;line-height:1.15;color:#176db5;font-variant-numeric:tabular-nums}
.dose-total-top>div strong span{font-size:13px;margin-left:4px;letter-spacing:0;font-weight:700;color:#7097b4}
.dose-total-chip{border-radius:10px;background:#fff;border:1px solid #cee1f0;color:#176db5;font-weight:800;font-size:12px;padding:7px 10px;white-space:nowrap}
.dose-composition-track{width:100%;height:12px;display:flex;border-radius:999px;background:#e5eff7;overflow:hidden}
.dose-composition-track>span{display:block;height:100%;min-width:0}
.dose-composition-track>.past{background:#866fbd}
.dose-composition-track>.current{background:#278bb8}
.dose-composition-legend{display:flex;align-items:center;flex-wrap:wrap;gap:7px 17px;font-size:11px;color:#53758e;font-weight:740}
.dose-composition-legend span{display:inline-flex;align-items:center;gap:6px}
.dose-composition-legend i{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}
.dose-composition-legend i.past{background:#866fbd}.dose-composition-legend i.current{background:#278bb8}
.dose-total-foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;border-top:1px solid #d9e8f4;padding-top:12px;font-size:11px;color:#6b8ba3}
.dose-total-foot strong{color:#376e98;font-weight:840}
.stats-primary-metrics .metric-short{border-color:#e0eaf3}
.dose-chart-card.lifetime{background:#f8fbff;border-color:#dce9f3}
.dose-chart-card.current{background:#f7fcff;border-color:#dce9f3}
.lifetime-dot{background:#176db5}
.chart-goal-foot{padding:11px 0 1px;border-top:1px solid #e6edf3;color:#7891a5;font-size:11px;line-height:1.5}
.chart-goal-foot strong{color:#176db5;font-weight:850}
/* Flexible columns with identical typography, color and component rules across devices. */
.dose-goal-card,.dose-breakdown-card,.dose-chart-card,.stat-card{width:100%;max-width:100%;min-width:0}
@media(max-width:760px){
 .dose-goal-card{padding:19px 18px 15px}
 .dose-goal-head{align-items:flex-start;gap:10px;margin-bottom:10px}
 .dose-goal-head h2{font-size:16px}
 .dose-target-chip{font-size:10px;padding:7px 9px}
 .dose-goal-row{padding:15px 0;gap:9px}
 .dose-goal-title strong{font-size:13px}
 .dose-goal-percentage{font-size:23px}
 .dose-goal-caption{font-size:11px}
 .dose-breakdown-toggle{padding:16px 17px}
 .dose-breakdown-body{padding:15px 15px 17px}
 .dose-breakdown-grid{gap:9px}
 .dose-breakdown-mini{padding:13px 11px;gap:8px}
 .dose-breakdown-mini>strong{font-size:clamp(18px,5.5vw,26px)}
 .dose-mini-meta{font-size:10px}
 .dose-breakdown-total{padding:14px}
 .dose-total-top>div strong{font-size:28px}
 .v20-charts{grid-template-columns:1fr}
 .v20-charts .dose-chart-card{padding:14px}
}
@media(max-width:360px){
 .dose-breakdown-grid{grid-template-columns:minmax(0,1fr)}
 .dose-goal-head h2{font-size:15px}
 .dose-target-chip{font-size:9px}
 .dose-goal-caption{align-items:flex-start;flex-direction:column;gap:4px}
}
@media(prefers-reduced-motion:reduce){.dose-goal-track>span,.dose-expand-label svg{transition:none}}
