/* One mobile shell, including Telegram theme changes, across all five destinations. */
.app-shell{--paper:#E9ECEA;--surface:#F6F7F6;--ink:#1E2A30;--muted:#5B6669;--line:#C9CFCC;--pine:var(--ink);--white:var(--surface);--fog:var(--paper);--muted-fjord:var(--muted);--stone:var(--line);--today-bg:var(--paper);--today-text:var(--ink);--today-muted:var(--muted);min-height:100dvh;background:var(--paper);color:var(--ink);font:400 14px/1.5 'Golos Text',system-ui,sans-serif;color-scheme:light}
@media(prefers-color-scheme:dark){#app:not([data-today-theme=light]) .app-shell{--paper:#141E23;--surface:#223138;--ink:#E9ECEA;--muted:#A9B4B6;--line:#3D4C52;color-scheme:dark}}
#app[data-today-theme=dark] .app-shell{--paper:#141E23;--surface:#223138;--ink:#E9ECEA;--muted:#A9B4B6;--line:#3D4C52;color-scheme:dark}
.app-shell *{box-sizing:border-box;text-transform:none;letter-spacing:normal}
.api-shell.app-shell main{width:100%;max-width:820px;margin:0 auto;padding:60px 16px calc(110px + env(safe-area-inset-bottom));min-width:0}
.api-shell.app-shell.today-shell main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
.app-shell .page-heading{margin:0 8px 26px;padding:0;display:block}
.api-shell.app-shell .page-heading h1{font:300 30px/1.2 'Spectral',Georgia,serif;letter-spacing:0;margin:0}
.app-shell h2,.app-shell h3{font-family:'Spectral',Georgia,serif;font-weight:400}
.app-shell .bottom-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;height:calc(82px + env(safe-area-inset-bottom));padding:8px max(8px,calc((100vw - 820px)/2)) env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;border-top:1px solid var(--line);background:var(--paper)}
.app-shell .bottom-tab{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:5px;min-width:0;min-height:60px;margin:0;padding:4px 0 12px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:400 11px/1.3 'Golos Text',system-ui,sans-serif;text-align:center;cursor:pointer;overflow-wrap:normal}
.app-shell .bottom-tab svg{width:22px;height:22px;flex-shrink:0}
.app-shell .bottom-tab.active{color:var(--ink);background:transparent;font-weight:500}
.app-shell .bottom-tab::after{display:none}
.app-shell .bottom-tab.active::after{content:'';display:block;position:absolute;width:4px;height:4px;border-radius:50%;bottom:5px;left:calc(50% - 2px);margin:0;background:#B4935A}
.app-shell :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid currentColor;outline-offset:3px}
.app-shell .call-off{position:relative;display:flex;flex-direction:column;align-items:flex-end;gap:6px;margin:20px 4px 0;max-width:100%;pointer-events:none}
.call-off p{margin:0;padding:3px 8px;border-radius:8px;background:var(--paper);color:var(--muted);font-size:11px}
.call-pill{height:54px;padding:0 22px;border:0;border-radius:27px;display:flex;align-items:center;gap:10px;font:500 14px 'Golos Text',system-ui,sans-serif;background:#B4935A;color:#1E2A30;opacity:1;cursor:default;pointer-events:auto}
.app-shell .call-pill:disabled{opacity:1;cursor:default}
.call-pill svg{width:18px;height:18px}
.food-empty{padding:40px 8px;border-top:1px solid var(--line);max-width:560px}
.food-empty>svg{width:32px;height:32px;color:var(--muted);margin-bottom:24px}
.food-empty h2{font-size:28px;line-height:1.25;margin:0 0 14px}
.food-empty p{color:var(--muted);font-size:15px;line-height:1.7;max-width:34em}
.account-controls{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px}
.app-shell .account-controls .button{min-height:44px;padding:10px 14px}
.app-shell :is(input,textarea,select){background:var(--surface);color:var(--ink);border-color:var(--line)}
.app-shell :is(.api-card,.week-board,.chat-turn){background:var(--surface);border-color:var(--line)}
.app-shell .chat-user{background:#1E2A30;color:#E9ECEA}
.app-shell .coach-chat form{bottom:calc(82px + env(safe-area-inset-bottom));background:var(--surface);border-color:var(--line);padding-bottom:10px}
.app-shell .coach-chat .chat-history{scroll-margin-bottom:240px}
.app-shell .secondary{background:transparent;color:var(--ink);border-color:var(--line)}
.app-shell .primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.app-shell :is(.small-tag,.access-note){background:var(--surface);color:var(--muted)}
.app-shell .fact-source,.app-shell .watch-page :is(.watch-privacy,.watch-via,.watch-state,dd,.watch-action p){color:var(--muted)}
.app-shell .watch-page button{color:var(--ink);border-color:var(--line)}
.app-shell .watch-row{border-color:var(--line)}
.app-shell .coach-chat .voice-settings{color:var(--muted)}
.sign-in-controls{display:flex;justify-content:flex-end;padding:20px 24px}
.sign-in-shell main{margin:auto;max-width:820px;padding:24px 16px}
.sign-in-shell .page-heading{justify-content:center}

/* T-033 first slice: observed running time alongside the saved weekly plan. */
.week-runs{margin:24px 8px 28px;padding-top:20px;border-top:1px solid var(--line)}
.week-runs h2{margin-bottom:16px}
.week-runs p{margin:12px 0;color:var(--muted);font-size:13px;line-height:1.6}
.week-runs table{width:100%;border-collapse:collapse;margin:16px 0;table-layout:fixed}
.week-runs th,.week-runs td{padding:10px 6px;border-bottom:1px solid var(--line);text-align:right;font-weight:400}
.week-runs th:first-child{text-align:left}
.week-runs thead{font-size:11px;color:var(--muted)}
.week-runs tbody{font-size:13px}
.week-runs td{font-variant-numeric:tabular-nums}
.week-runs .week-runs-note{font-size:11px}

.coach-shell{--surface:#FFFFFF;--coach-user-bg:#1E2A30;--coach-user-ink:#E9ECEA;--coach-action-bg:#1E2A30;--coach-action-ink:#E9ECEA}
@media(prefers-color-scheme:dark){#app:not([data-today-theme=light]) .coach-shell{--surface:#223138;--coach-user-bg:#E9ECEA;--coach-user-ink:#1E2A30;--coach-action-bg:#E9ECEA;--coach-action-ink:#1E2A30}}
#app[data-today-theme=dark] .coach-shell{--surface:#223138;--coach-user-bg:#E9ECEA;--coach-user-ink:#1E2A30;--coach-action-bg:#E9ECEA;--coach-action-ink:#1E2A30}
/* AppCoach / DesktopCoach. Voice bubbles only for real saved-reply audio: never invent audio. */
.api-shell.app-shell.coach-shell main{padding:0 0 calc(92px + env(safe-area-inset-bottom));max-width:760px}
.coach-shell .review-alert{margin:12px 16px}
.coach-shell .coach-chat{border:0;border-radius:0;background:transparent;margin:0;min-height:calc(100dvh - 92px);padding:0;max-width:none;width:100%;display:flex;flex-direction:column}
.coach-heading{position:sticky;top:0;z-index:8;background:var(--paper);display:flex;align-items:center;gap:14px;padding:54px 16px 14px 20px;border-bottom:1px solid var(--line)}
.coach-avatar{width:46px;height:46px;flex:none;border-radius:50%;background:var(--coach-action-bg);color:var(--coach-action-ink);display:grid;place-items:center;font:300 32px/1 'Spectral',serif}
.coach-avatar svg{width:26px;height:26px}.coach-call span{display:none}
.coach-heading>div:nth-child(2){flex:1;min-width:0}.coach-heading h1{font:400 21px/1.25 'Spectral',serif;margin:0}
.coach-heading p{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted);margin:2px 0 0;line-height:1.4}.coach-heading i{width:6px;height:6px;flex:none;border-radius:50%;background:#7E9A8C}
.coach-call{width:48px;height:48px;border:0;border-radius:50%;background:#B4935A;color:#1E2A30;display:grid;place-items:center;flex:none;opacity:1}.coach-call svg{width:20px;height:20px}.coach-call:disabled{opacity:1}
.coach-shell .chat-mode{order:unset;margin:8px 16px 0;font-size:11px;color:var(--muted)}.coach-shell .chat-mode:empty{display:none}
.coach-shell .chat-history{order:unset;flex:1;display:flex;flex-direction:column;gap:10px;padding:18px 16px;overflow:visible;max-height:none}
.coach-shell .chat-turn{padding:14px 16px;background:var(--surface);color:var(--ink);border:0;border-radius:22px 22px 22px 6px;max-width:84%;font:400 15px/1.5 'Golos Text',sans-serif;scroll-margin-bottom:210px}
.coach-shell .chat-turn p{margin:0;color:inherit}.coach-shell .chat-user{align-self:flex-end;max-width:78%;border-radius:22px 22px 6px 22px;padding:12px 16px;background:var(--coach-user-bg);color:var(--coach-user-ink)}
.coach-shell .chat-empty{color:var(--muted);margin:auto;font-size:15px;max-width:28em}
.coach-shell .coach-chat form{order:unset;position:sticky;bottom:calc(82px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:0;padding:0 16px 10px;border:0;background:var(--paper);z-index:5}
.coach-chips{display:flex;gap:8px;max-width:100%;overflow:auto;scrollbar-width:none}.coach-chips button{flex:none;min-height:40px;padding:0 16px;border:1px solid var(--line);border-radius:20px;background:transparent;color:var(--ink);font:400 13px 'Golos Text',sans-serif;white-space:nowrap}
.coach-composer{position:relative;display:flex;gap:6px;align-items:center;width:100%;min-height:50px;background:transparent;border-radius:0;padding:0;gap:10px}
.coach-shell .coach-composer textarea{border:0;border-radius:25px;min-height:50px;height:50px;max-height:30dvh;margin:0;padding:13px 8px 11px 20px;font:400 15px/1.6 'Golos Text',sans-serif;resize:none;min-width:0;background:var(--surface);color:var(--ink)}
.coach-mic,.coach-send{border:0;border-radius:50%;width:50px;min-width:50px;height:50px;min-height:50px!important;padding:14px;display:grid;place-items:center;background:var(--coach-action-bg);color:var(--coach-action-ink);cursor:pointer}.coach-mic svg,.coach-send svg{width:20px;height:20px}.coach-send{display:none}.coach-composer:has(textarea:not(:placeholder-shown)):not(:has(.recording)) .coach-send{display:grid}.coach-composer:has(textarea:not(:placeholder-shown)):not(:has(.recording)) .coach-mic{display:none}
.coach-shell .voice-inline{display:contents}.coach-shell [data-voice-slot]{display:flex;align-items:center;gap:6px;flex:none}.record-stop{width:12px;height:12px;border-radius:2px;background:currentColor}.coach-mic.recording{outline:2px solid var(--ink);outline-offset:2px}
.coach-shell .voice-notice{position:absolute;left:0;right:0;bottom:62px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:0 4px 24px #0002;display:flex;gap:10px;flex-wrap:wrap;max-height:55dvh;overflow:auto}.coach-shell .voice-notice p{flex-basis:100%}
.coach-shell .voice-progress{position:absolute;left:0;right:0;bottom:62px;margin:0;padding:8px 12px;background:var(--surface);border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:12px}
.coach-shell .voice-actions{position:absolute;right:0;bottom:104px;display:flex;gap:8px}.coach-shell [data-voice-slot] .button{min-height:36px}.coach-shell [data-voice-slot] .voice-notice .button{position:static;min-height:44px}
.coach-shell .coach-chat form>[data-form-error]{margin:0;color:var(--rust);font-size:12px}.coach-shell [data-form-error]:empty{display:none}
.coach-context,.desktop-brand,.desktop-watch{display:none}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.coach-privacy .voice-upload{position:relative;display:inline-flex;align-items:center;min-height:46px;padding:10px 18px;border:1px solid var(--line);border-radius:24px;max-width:100%;margin:16px 0;color:var(--ink);cursor:pointer}.coach-privacy .voice-upload:focus-within{outline:2px solid var(--ink);outline-offset:3px}.coach-privacy .voice-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.coach-privacy button{margin:8px 8px 0 0}
@media(min-width:901px){
 .api-shell.app-shell:is(.coach-shell,.week-shell,.me-shell){display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100dvh}
 .api-shell.app-shell:is(.coach-shell,.week-shell,.me-shell) main{grid-column:2;width:100%;max-width:none;padding:0;min-width:0}
 :is(.coach-shell,.week-shell) .coach-chat{min-height:100dvh}.coach-heading{height:88px;padding:0 40px;gap:16px}.coach-avatar{width:48px;height:48px}.coach-heading h1{font-size:24px}.coach-heading p{font-size:13px}
 :is(.coach-shell,.week-shell) .chat-history{width:100%;max-width:800px;margin:auto;padding:28px 40px;gap:12px}:is(.coach-shell,.week-shell) .chat-turn{max-width:82%;font-size:16px;line-height:1.55;padding:16px 20px}:is(.coach-shell,.week-shell) .chat-user{padding:12px 18px}
 :is(.coach-shell,.week-shell) .coach-chat form{bottom:0;padding:0 40px 28px;width:100%;max-width:800px;align-self:center}.coach-chips button{font-size:14px;padding:0 18px}.coach-composer{min-height:56px}:is(.coach-shell,.week-shell) .coach-composer textarea{min-height:56px;height:56px;padding:15px 12px 15px 24px;font-size:16px}.coach-mic,.coach-send{width:56px;height:56px;min-width:56px;min-height:56px!important;padding:17px}
 :is(.coach-shell,.week-shell,.me-shell) .bottom-nav{grid-column:1;grid-row:1;position:sticky;top:0;left:auto;right:auto;bottom:auto;height:100dvh;width:240px;display:flex;flex-direction:column;padding:32px 20px;gap:4px;border:0;border-right:1px solid var(--line)}
 :is(.coach-shell,.week-shell,.me-shell) .desktop-brand{display:flex;align-items:center;gap:10px;padding:0 12px 28px;font:300 24px 'Spectral',serif}:is(.coach-shell,.week-shell,.me-shell) .desktop-brand svg{width:28px;height:28px}:is(.coach-shell,.week-shell,.me-shell) .bottom-tab{flex-direction:row;justify-content:flex-start;gap:12px;min-height:44px;height:44px;padding:0 12px;border-radius:22px;font-size:15px}:is(.coach-shell,.week-shell,.me-shell) .bottom-tab svg{width:20px;height:20px}:is(.coach-shell,.week-shell,.me-shell) .bottom-tab.active{background:var(--surface);font-weight:600}:is(.coach-shell,.week-shell,.me-shell) .bottom-tab.active::after{display:none}
 :is(.coach-shell,.week-shell) .desktop-watch{display:block;margin-top:auto;padding:16px 12px 0;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.coach-call{border-radius:24px;width:auto;padding:0 22px 0 18px;display:flex;gap:10px}.coach-call span{display:inline;font-size:15px}
}
@media(min-width:1200px){
 .api-shell.app-shell:is(.coach-shell,.week-shell){grid-template-columns:240px minmax(0,1fr) 320px}.coach-context{display:flex;flex-direction:column;gap:24px;grid-column:3;grid-row:1;border-left:1px solid var(--line);padding:32px 24px;min-width:0}
 .coach-context section{display:flex;flex-direction:column;gap:8px}.coach-context h2{font:400 13px 'Golos Text',sans-serif;margin:0;color:var(--muted)}.coach-context p{font-size:14px;line-height:1.5;margin:0}.coach-context button{border:0;background:none;color:var(--muted);text-align:left;text-decoration:underline;padding:0;min-height:44px;align-self:flex-start;cursor:pointer}
 .coach-context .coach-context-day{background:#1E2A30;color:#E9ECEA;border-radius:28px;padding:22px;gap:10px;overflow-wrap:anywhere}.coach-context-day{position:relative;overflow:hidden}.coach-context-day>*{position:relative}.coach-context-day::before{content:'';position:absolute;inset:0;opacity:.07;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='220'%3E%3Cg fill='none' stroke='%23E9ECEA'%3E%3Cpath d='M-10 60C60 30 120 90 200 60S300 40 340 70M-10 90C60 60 120 120 200 90S300 70 340 100M-10 120C60 90 120 150 200 120S300 100 340 130M-10 150C60 120 120 180 200 150S300 130 340 160'/%3E%3C/g%3E%3C/svg%3E")}.coach-context-day h2{font:300 30px/1.15 'Spectral',serif;color:#E9ECEA}.coach-context-day p,.coach-context-day small{color:#A9B4B6}.coach-context-row{display:flex;gap:12px;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line)}
}

.coach-reply-listen{display:grid;place-items:center;min-width:32px;min-height:32px;padding:7px;margin:6px 0 0 auto;border:0;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer}.coach-reply-listen svg{width:16px;height:16px}:is(.coach-shell,.week-shell) .chat-user p{color:inherit}
/* Voice bubble (AppCoach/DesktopCoach): real reply audio only; player row and transcript in one card. */
.coach-shell .chat-turn:has(>.reply-voice){display:flex;flex-direction:column;align-items:stretch;gap:10px;padding-top:8px}
.reply-voice{order:-1;display:flex;align-items:center;gap:12px;margin-left:-8px;color:var(--ink)}
.reply-voice .coach-reply-listen{margin:0;min-width:44px;min-height:44px;padding:12px;color:var(--ink)}.reply-voice .coach-reply-listen svg{width:20px;height:20px}
.coach-shell .chat-turn>.button[data-action="reply-audio-stop"]{align-self:flex-start;margin-top:8px}
.coach-shell .coach-reply-cta{display:inline-flex;align-items:center;gap:8px;width:auto;min-height:44px;margin:12px 0 0;padding:0 16px 0 12px;border:1px solid var(--line);border-radius:22px;color:var(--ink);font:400 13px 'Golos Text',sans-serif}.coach-reply-cta svg{width:16px;height:16px}
.reply-track{flex:1;min-width:80px;height:3px;border:0;border-radius:2px;-webkit-appearance:none;appearance:none;background:var(--line);color:var(--ink)}
.reply-track::-webkit-progress-bar{background:var(--line);border-radius:2px}.reply-track::-webkit-progress-value{background:var(--ink);border-radius:2px}.reply-track::-moz-progress-bar{background:var(--ink)}
.reply-time{min-width:2.4em;text-align:right;font:400 12px 'Golos Text',sans-serif;font-variant-numeric:tabular-nums;color:var(--muted)}
.coach-shell .chat-turn .reply-status{margin:0;font-size:12px;color:var(--muted)}
.coach-shell .chat-date{align-self:center;margin:6px 0 2px;font:400 12px/1.4 'Golos Text',sans-serif;color:var(--muted)}
