/* Daily program surfaces. Behavior and route order are owned by app.mjs. */
.app-frame{max-width:510px;margin:auto;min-height:100dvh;background:var(--paper);box-shadow:0 12px 60px #213d420a}
.app-header{padding:calc(12px + env(safe-area-inset-top)) 20px 12px;background:var(--surface);border-bottom:1px solid var(--line)}
.header-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;min-height:48px}
.header-profile{justify-self:start;border:1px solid var(--line);background:#f7fdfb;color:var(--ink)}
.header-profile .icon{width:20px;height:20px}
.brand{display:flex;align-items:center;flex-direction:column;gap:2px}
.brand img{width:126px;height:37px;object-fit:contain}
.brand>span{font-size:10px;line-height:1.4;color:var(--muted)}
.ai-shortcut{justify-self:end;display:grid;place-items:center;width:44px;height:44px;padding:10px;background:#effcf9;border:1px solid #d8f7ef;border-radius:14px;color:var(--accent)}
.ai-shortcut .icon{width:22px;height:22px}
.ai-shortcut:hover{background:#e8faf5}
.dashboard{padding:16px 16px calc(24px + env(safe-area-inset-bottom));min-height:80vh;outline:none}
.calendar{margin-bottom:16px;padding:0;background:transparent}
.calendar-heading{display:flex;align-items:center;justify-content:space-between;flex-direction:row-reverse;padding:0 5px;margin-bottom:10px;min-height:32px}
.calendar-heading button{background:transparent;color:var(--accent);font-size:11px;min-height:32px;padding:4px 9px;border-radius:9px}
.calendar-heading p{font-size:11px;line-height:1.7;color:var(--muted);text-align:left}
.calendar-strip{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;align-items:center}
.calendar-arrow{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:13px;background:transparent;border-radius:50%;color:#536b70}
.calendar-arrow:before{content:'';position:absolute;inset:6px;border:1px solid #e8faf5;border-radius:50%;background:#ffffff91;transition:background .18s}
.calendar-arrow:hover:before{background:#e8faf5}
.calendar-arrow .icon{position:relative;width:16px;height:16px}
.days{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative;min-width:0;width:100%;max-width:62px;height:66px;padding:5px 1px 9px;margin:auto;background:transparent;border:1px solid transparent;border-radius:14px;transition:background .18s,border-color .18s}
.day strong{order:0;font-size:23px;line-height:1.15;font-weight:400;color:var(--ink);font-variant-numeric:tabular-nums}
.day span{order:1;font-size:10px;line-height:1.5;color:#536b70;white-space:nowrap}
.day i{position:absolute;bottom:4px;width:3px;height:3px;border-radius:50%;background:transparent}
.day i.is-today{background:var(--ink)}
.day:hover{background:#e8faf5}
.day.selected{background:linear-gradient(155deg,#3cd5af,#3cd5af);border-color:#3cd5af;box-shadow:0 4px 9px #213d4214,inset 0 1px #ffffff15}
.day.selected strong{color:var(--ink);font-weight:700}
.day.selected span{color:#213d42}
.day.selected i.is-today{background:var(--ink)}
.program-tabs{display:flex;align-items:center;gap:3px;height:47px;background:#e8faf5;padding:4px;border:1px solid #e8faf5;border-radius:14px;margin-bottom:10px}
.program-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;height:100%;border-radius:10px;background:transparent;color:#536b70;font-size:13px;font-weight:700;white-space:nowrap;padding:4px 6px;transition:background .18s,color .18s}
.program-tabs .icon{width:19px;height:19px}
.program-tabs button.active{background:#fff;color:var(--accent);box-shadow:0 2px 5px #213d420b}
.guide-row{display:flex;align-items:center;justify-content:space-between;min-height:34px;margin:0 1px 10px}
.guide-row button{display:flex;align-items:center;gap:5px;min-height:34px;background:transparent;padding:0;color:#536b70;font-size:11px;position:relative}
.guide-row button:after{content:'';position:absolute;inset:-5px 0}
.guide-row button .icon{width:15px;height:15px}
.guide-row>span{font-size:11px;color:#536b70}
.diet-layout{display:grid;grid-template-columns:24px minmax(0,1fr);gap:9px;align-items:stretch}
.calorie-track{position:relative;min-height:100%;overflow:hidden;background:#e8faf5;border:1px solid #d8f7ef;border-radius:12px}
.calorie-fill{position:absolute;inset:auto 0 0;background:linear-gradient(#9eead755,#3cd5af99);transition:height .22s}
.calorie-track>span{position:sticky;top:8px;z-index:1;display:flex;align-items:center;gap:6px;writing-mode:vertical-rl;margin:3px auto;padding:9px 2px;background:#f7fdfb;border:1px solid #bbf0e3;border-radius:9px;color:#536b70;font-size:9px;min-height:82px}
.calorie-track .icon{width:13px;height:13px;color:var(--accent)}
.calorie-track b{font-size:11px}
.meal-list{display:grid;gap:11px;min-width:0}
.meal-card{position:relative;display:flex;align-items:center;gap:12px;min-height:127px;padding:13px 12px;background:var(--surface);border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow);transition:border-color .18s,box-shadow .18s}
.meal-photo{width:68px;height:78px;flex:0 0 68px;position:relative}
.meal-photo>img,.meal-photo>.food-emoji{width:100%;height:100%;border-radius:12px;object-fit:cover}
.meal-check{position:absolute;top:-5px;right:-5px;width:25px;height:25px;background:#fff;border:2px solid #fff;border-radius:50%;display:grid;place-items:center;box-shadow:0 2px 7px #213d4226;padding:4px;color:var(--ink)}
.meal-check:before{content:'';position:absolute;inset:-9px}
.meal-check>span{width:12px;height:12px;border:1px solid #9eead7;border-radius:50%}
.meal-check.checked{background:var(--brand)}
.meal-check .icon{width:14px;height:14px}
.meal-info{display:flex;flex-direction:column;justify-content:space-between;gap:8px;flex:1;min-width:0;align-self:stretch}
.meal-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:7px;min-width:0}
.meal-info h2{font-size:14px;line-height:1.65;min-width:0;flex:1;overflow-wrap:anywhere;font-weight:700;letter-spacing:-.12px}
.meal-badge{flex-shrink:0;font-size:10px;font-weight:400;line-height:1.7;padding:2px 6px;border-radius:6px;background:#effcf9;color:#536b70;border:1px solid #e8faf5;align-self:flex-start}
.meal-badge.blue{background:#effcf9;border-color:#e8faf5;color:#557783}
.meal-badge.yellow{background:#f8f6ea;border-color:#efead8;color:#897842}
.meal-badge.purple{background:#f2f0f6;border-color:#e9e5ef;color:#80748e}
.macros{display:flex;align-items:center;gap:10px;min-width:0}
.macros>span{display:flex;align-items:center;gap:4px;white-space:nowrap;color:#536b70;font-size:11px}
.macros .icon{width:13px;height:13px;color:#9b8870}
.macros>span:nth-child(2) .icon{color:#8a8fb0}
.macros>span:nth-child(3) .icon{color:#536b70}
.macros b{font-size:12px;font-weight:400;color:#536b70;font-variant-numeric:tabular-nums}
.meal-actions{display:flex;align-items:center;gap:7px}
.meal-actions button{display:flex;align-items:center;justify-content:center;gap:4px;flex:1;min-width:0;min-height:32px;padding:4px 5px;background:#effcf9;color:var(--accent);border:1px solid #d8f7ef;border-radius:8px;font-size:11px;font-weight:700;white-space:nowrap;position:relative}
.meal-actions button:first-child{background:transparent;border-color:var(--line);color:#536b70}
.meal-actions button:hover{background:#e8faf5}
.meal-actions .icon{width:12px;height:12px}
.meal-actions button:after,.done-exercise:after{content:'';position:absolute;inset:-6px 0}
.meal-card.completed{border-color:#9eead7;box-shadow:inset 3px 0 #213d42,var(--shadow)}
.completed .meal-info h2:after{content:' ✓';font-size:12px;color:var(--accent)}
.food-emoji{background:linear-gradient(145deg,#e8faf5,#effcf9);display:flex;align-items:center;justify-content:center;font-size:31px}
.food-emoji>.icon{width:32px;height:32px;color:#536b70;stroke-width:1.2}
.add-meal{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:46px;margin-top:14px;padding:9px 10px;background:#e8faf5;border:1px solid #d8f7ef;border-radius:13px;color:#213d42;font-size:12px;font-weight:700}
.add-meal .icon{width:17px;height:17px}
.add-meal:hover{background:#e8faf5}
.prototype-note{margin-top:22px;text-align:center;font-size:10px;color:#536b70;line-height:2}
.prototype-note>span:not(.status-dot){font-size:10px;color:#536b70}
.extras{margin-top:20px}
.extras h2{font-size:14px;margin-bottom:10px}
.extra-row{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:9px 10px;margin-bottom:8px}
.extra-row>img,.extra-row>.food-emoji{width:38px;height:38px;border-radius:10px;flex-shrink:0;font-size:23px}
.extra-row>span:not(.food-emoji){flex:1;font-size:13px;min-width:0}
.extra-row small{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.extra-row button{color:#536b70}
.exercise-list{display:grid;gap:12px}
.workout-card{position:relative;display:flex;gap:13px;min-height:153px;padding:14px 12px;background:var(--surface);border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}
.workout-card.completed{border-color:#9eead7;box-shadow:inset 3px 0 #213d42,var(--shadow)}
.exercise-photo{width:87px;height:102px;flex:0 0 87px;position:relative;overflow:hidden;padding:0;border-radius:12px;background:var(--brand)}
.exercise-photo>img{width:100%;height:100%;object-fit:cover}
.exercise-photo>.food-emoji{height:100%;background:#e8faf5}
.play-button{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:30px;height:30px;border-radius:10px;border:1px solid #ffffffb3;background:#213d42b3;display:grid;place-items:center;color:white;box-shadow:0 3px 10px #213d4220}
.play-button .icon{width:13px;height:13px;fill:currentColor;stroke-width:1.2;transform:translateX(1px)}
.exercise-info{flex:1;min-width:0}
.exercise-info h2{font-size:14px;line-height:1.7;margin-bottom:8px}
.exercise-pills{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.exercise-pills span{padding:3px 7px;max-width:100%;border:1px solid #e8faf5;background:#f7fdfb;border-radius:6px;color:#536b70;font-size:10px;overflow-wrap:anywhere}
.exercise-pills b{font-weight:400;color:#536b70}
.done-exercise{display:flex;align-items:center;gap:6px;position:relative;margin-top:10px;min-height:33px;font-size:11px;padding:4px 10px}
.mini-check{display:grid;place-items:center;width:13px;height:13px;border:1px solid #9eead7;border-radius:4px}
.mini-check .icon{width:11px;height:11px}
.mini-check.checked{background:var(--brand);border-color:var(--accent);color:var(--ink)}
.exercise-type{position:absolute;left:13px;bottom:11px;font-size:9px;color:#536b70}
@media(min-width:700px){.app-frame{max-width:840px;border-radius:24px;overflow:hidden;min-height:calc(100dvh - 40px);border:1px solid #fff}.dashboard{padding-inline:20px}.app-header{padding-inline:24px}.meal-photo{width:76px;height:82px;flex-basis:76px}.meal-info h2{font-size:15px}.meal-actions button{font-size:11px}.exercise-photo{width:96px;height:105px;flex-basis:96px}}
@media(max-width:370px){.app-header{padding-inline:14px}.brand img{width:116px}.dashboard{padding:13px 11px 22px}.calendar-heading{padding-inline:2px}.calendar-strip{gap:3px}.days{gap:3px}.program-tabs button{font-size:12px;gap:6px}.program-tabs .icon{width:17px;height:17px}.diet-layout{grid-template-columns:21px minmax(0,1fr);gap:6px}.meal-card{padding:11px 9px;gap:9px;min-height:124px}.meal-photo{width:53px;height:67px;flex-basis:53px}.meal-info h2{font-size:12px}.meal-badge{font-size:9px;padding:2px 4px}.meal-heading{gap:5px}.macros{gap:8px}.macros .icon{width:11px;height:11px}.macros b{font-size:11px}.meal-actions{gap:5px}.meal-actions button{font-size:10px;padding:4px}.meal-actions .icon{display:none}.calorie-track>span{font-size:8px;padding-inline:1px}.exercise-photo{width:70px;height:92px;flex-basis:70px}.workout-card{padding:12px 10px;gap:10px}.exercise-info h2{font-size:13px}.exercise-pills span{font-size:9px;padding:3px 5px}}
