/* Phone-first flows: app bar, Coach panes, chat composer, Record agenda and tracker. */
:root { --accent:#0E4A36; --accent-soft:#D5D3C9; --line:#D5D3C9; --ink:#10201A; --muted:#55635C; --surface:#fff; --nav-h:61px; }
.visually-hidden { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; }
.icon { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.app-title, .pane-tabs { display:none; }
/* Coach is conversation first; health operations live in More at every size. */
#coachHealthRibbon[hidden] { display:none; }
#viewContent[data-coach-pane=chat][data-active-view=today] > #proposal { display:none; }
#viewContent[data-coach-pane=session][data-active-view=today] > #coach { display:none; }
.chat-health-choice { margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }
.chat-health-choice p { flex-basis:100%; }
.chat-health-choice button { min-height:44px; margin:0; }
.program-chat-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.chat-composer #coachChatInput { margin-bottom:0; }
.chat-composer #coachChatInput + button { justify-self:end; }
.chat-app-notice { border-left:3px solid var(--accent); }
.session-plan-receipt { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#F1F4EF; }
.session-plan-receipt > strong { display:block; font-size:17px; }
.planned-activity { padding:14px 0; border-bottom:1px solid var(--line); }
.planned-activity h4 { font-size:20px; margin:0 0 6px; }
.activity-target { font-weight:650; color:var(--accent); }
#todaySessionContent:empty { display:none; }
#proposal:has(#todaySessionContent #sessionContent) > #todayProgram,
#proposal:has(#todaySessionContent #sessionContent) > .eyebrow,
#proposal:has(#todaySessionContent #sessionContent) > h2 { display:none; }
#coach .chat-composer form { grid-template-columns:minmax(0,1fr) 76px; }
#coach .chat-composer form > textarea { grid-column:1; grid-row:1; }
#coach .chat-composer form > button[type=submit] { grid-column:2; grid-row:1; padding:8px; font-size:12px; line-height:1.3; }
#coach .chat-composer form > select { grid-column:1 / -1; grid-row:1; }
#coach .chat-composer form:has(select:not([hidden])) > textarea,
#coach .chat-composer form:has(select:not([hidden])) > button[type=submit] { grid-row:2; }
.chat-composer [role=status]:empty { display:none; }
@media (min-width:761px) { body[data-view=today] .pane-tabs { display:flex; } }
#mainNav .icon { display:none; }
header #logout { display:inline-flex; align-items:center; gap:6px; }
header #logout .icon { width:18px; height:18px; }

/* ---------- Coach chat (all sizes) ---------- */
.coach-tools { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 4px; }
.coach-tools > details { flex:1 1 auto; margin:0; padding:0; border:1px solid var(--line); border-radius:12px; background:#F1F4EF; min-width:0; }
.coach-tools > details[open] { flex-basis:100%; padding:0 12px 12px; }
.coach-tools > details > summary { padding:9px 12px; min-height:44px; display:flex; align-items:center; font-weight:600; }
.coach-tools > details[open] > summary { padding-inline:0; }
.profile-history { margin:14px 0 0; padding:0 12px; border:1px solid var(--line); border-radius:12px; background:#F1F4EF; }
.profile-history > summary { min-height:44px; display:flex; align-items:center; font-weight:600; }
.profile-history[open] { padding-bottom:12px; }
.profile-history select { width:100%; margin:4px 0 8px; }
.chat-messages { display:flex; flex-direction:column; gap:2px; }
.chat-bubble { max-width:88%; align-self:flex-start; border-radius:18px 18px 18px 6px; }
.chat-bubble.athlete { align-self:flex-end; margin-left:0; background:var(--accent); border-radius:18px 18px 6px 18px; }
.chat-bubble.athlete strong, .chat-bubble.athlete p { color:#fff; }
.chat-bubble.athlete > strong { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.chat-bubble.athlete > p { margin-top:0; }
.chat-bubble > strong { font-size:11px; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); }
.chat-bubble > button { margin-right:6px; }
.chat-bubble > .chat-time { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.chat-bubble > strong + .chat-time::before { content:'·'; margin:0 6px; }
.chat-bubble.athlete > .chat-time { display:block; text-align:right; margin-top:4px; color:rgba(255,255,255,.78); }
.coach-typing { color:var(--muted); font-size:14px; font-style:italic; }
.chat-composer { border-top:1px solid var(--line); padding-top:10px; margin-top:8px; background:var(--surface); }
.coach-quick-actions button { border-radius:999px; min-height:44px; }
#coach form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 8px; align-items:end; }
#coach form > * { grid-column:1 / -1; }
#coach form > textarea { min-height:48px; max-height:168px; resize:none; border-radius:22px; padding:12px 16px; }
#coachChatInput::placeholder { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#coach form > button[type=submit] { grid-column:2; margin:0; min-height:44px; border-radius:22px; padding-inline:18px; }

.chat-suggestions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 4px; }
/* The intake question above its answers, on its own line. */
.intake-question .intake-prompt { flex-basis:100%; margin:0; font-weight:650; }
.chat-suggestions .chat-suggestion { margin:0; min-height:40px; padding:8px 14px; border-radius:999px; font-size:13px; font-weight:600; border:1px solid var(--line); background:#F1F4EF; color:var(--ink); }
.chat-suggestions .chat-suggestion:hover { background:var(--accent-soft); }

.coach-nudge { border-left:3px solid #c9772f; }
.coach-nudge > strong { color:#9a5517; }
.rest-offer, .chat-health-wait { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#F1F4EF; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.rest-offer > p, .chat-health-wait > p { flex-basis:100%; margin:0; }
.rest-offer button, .chat-health-wait button { margin:0; min-height:44px; }
.agenda-rest { margin:6px 0 10px; padding:12px 14px; border-radius:14px; background:#E4EDE6; color:#0E4A36; font-weight:600; }
.agenda-earlier { margin:10px 0; }
.agenda-earlier > summary { min-height:44px; display:flex; align-items:center; color:var(--muted); font-weight:600; }
.agenda-item.earlier { opacity:.8; border-style:dashed; }
.agenda-item.earlier .agenda-mark { background:transparent; border:2px solid #B9B6AA; }

.coach-notebook { margin:0 0 18px; padding:16px; border-radius:16px; background:#E4EDE6; border:1px solid #D5D3C9; }
.coach-notebook h3 { margin:0 0 6px; font-size:17px; }
.notebook-text { white-space:pre-line; margin:0 0 6px; }
.coach-notebook .program-chat-shortcuts { margin:8px 0 0; }
.coach-notebook button { margin:0; min-height:40px; padding:8px 14px; border-radius:999px; font-size:14px; }

/* ---------- Plan ---------- */
#programmingContent .program-status { margin:0 0 14px; padding:16px; border-radius:16px; background:#E4EDE6; border:1px solid #D5D3C9; display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.program-state { margin:0; font-size:17px; font-weight:750; color:var(--ink); }
.program-state-draft { color:#9a5517; }
.program-dates { margin:0; font-weight:600; color:#0E4A36; }
.program-status .check { margin-top:6px; }
.program-status .actions { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.program-status .actions button { margin:0; }
#programmingContent .program-chat-shortcuts { margin:0 0 8px; }
#programmingContent .program-chat-shortcuts button { margin:0; min-height:40px; padding:8px 14px; border-radius:999px; font-size:14px; }
.program-start { margin:0 0 12px; }
.program-start > summary { min-height:44px; display:flex; align-items:center; font-weight:600; color:var(--accent); }
.program-start input[type=date] { max-width:240px; }
.program-week-title { margin:18px 0 0; }
.program-strip { margin:10px 0 12px; }
#programmingContent .week-grid { display:block; }
#programmingContent .week-day { padding:16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
#programmingContent .week-day[hidden] { display:none; }
.week-day-head { display:flex; flex-direction:column; gap:2px; margin-bottom:6px; }
.week-day-head strong { font-size:19px; color:var(--ink); }
.program-more { margin:10px 0; }
.program-more > summary { min-height:44px; display:flex; align-items:center; font-weight:600; }

/* ---------- Session pane extras ---------- */
.today-training { margin:0 0 16px; padding:12px; border-radius:14px; background:#E4EDE6; }
.today-training .eyebrow { margin:0 0 6px; }

/* ---------- Record agenda ---------- */
.record-agenda { margin:6px 0 18px; }
.agenda-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.agenda-month { font-size:15px; color:var(--ink); }
.agenda-nav { display:flex; align-items:center; gap:6px; }
.agenda-nav button { margin:0; min-height:44px; }
.icon-button { min-width:44px; padding:0; display:inline-flex; align-items:center; justify-content:center; }
.today-button { padding:8px 14px; font-size:13px; }
.today-button:disabled { opacity:.5; cursor:default; }
.week-strip { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin:12px 0 14px; }
.strip-day { margin:0; padding:8px 0 6px; min-height:64px; display:flex; flex-direction:column; align-items:center; gap:2px; background:transparent; color:var(--ink); border:1px solid transparent; border-radius:14px; font-weight:500; }
.strip-day:hover { background:#E4EDE6; }
.strip-day.is-today .strip-date { color:var(--accent); font-weight:800; }
.strip-day[aria-pressed=true] { background:var(--accent); color:#fff; }
.strip-day[aria-pressed=true] .strip-date, .strip-day[aria-pressed=true] .strip-weekday { color:#fff; }
.strip-weekday { font-size:11px; color:var(--muted); text-transform:uppercase; }
.strip-date { font-size:17px; line-height:1.2; }
.strip-marks { display:flex; gap:3px; height:6px; }
.mark { width:6px; height:6px; border-radius:50%; }
.mark.session { background:var(--accent); }
.mark.plan { border:1.5px solid var(--accent); }
.strip-day[aria-pressed=true] .mark.session { background:#fff; }
.strip-day[aria-pressed=true] .mark.plan { border-color:#fff; }
.agenda-list h3 { display:flex; align-items:center; gap:8px; margin:4px 0 6px; font-size:18px; }
.agenda-list h3 .badge { font-size:11px; padding:3px 8px; }
.agenda-focus { margin:0 0 8px; }
.agenda-group { margin:10px 0; }
.agenda-label { margin:0 0 6px; font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--muted); }
.agenda-item { display:flex; align-items:center; gap:12px; width:100%; margin:0 0 8px; padding:12px 14px; min-height:60px; text-align:left; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:14px; font-weight:500; }
button.agenda-item:hover { background:#F1F4EF; }
.agenda-item[aria-current=true] { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset; }
.agenda-mark { width:10px; height:10px; border-radius:50%; flex-shrink:0; background:var(--accent); }
.agenda-item.plan .agenda-mark { background:transparent; border:2px solid var(--accent); }
.agenda-item.activity .agenda-mark { background:#6a8fb0; }
.agenda-item.measured .agenda-mark { background:#b08a3e; border-radius:3px; }
.agenda-item.plan { background:#F1F4EF; border-style:dashed; }
.agenda-text { display:flex; flex-direction:column; min-width:0; flex:1; }
.agenda-text strong { font-size:15px; overflow-wrap:anywhere; }
.agenda-meta { font-size:12px; color:var(--muted); }
.agenda-action { font-size:13px; font-weight:700; color:var(--accent); white-space:nowrap; }
.agenda-action::after { content:" ›"; }
.agenda-empty { padding:14px; border:1px dashed var(--line); border-radius:14px; text-align:center; }
.agenda-actions { display:flex; flex-wrap:wrap; gap:8px; }
.agenda-actions button { margin:4px 0 0; }
.session-jump { margin-bottom:12px; }
.session-date { display:inline-block; margin:2px 0 8px; padding:4px 10px; border-radius:8px; background:var(--accent-soft); color:#0E4A36; font-size:13px; font-weight:650; }
.session-jump label { margin-top:0; }
.watch-workout.is-highlighted { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent); }

/* ---------- Follow-along tracker ---------- */
.session-tracker { margin:14px 0; padding:14px; border:1px solid #D5D3C9; border-radius:16px; background:#F1F4EF; }
.session-tracker h3 { margin:0 0 4px; }
.tracker-progress { margin:0 0 6px; font-size:13px; font-weight:600; color:#0E4A36; }
.session-tracker progress { width:100%; height:8px; appearance:none; border:0; border-radius:99px; background:#D5D3C9; overflow:hidden; }
.session-tracker progress::-webkit-progress-bar { background:#D5D3C9; border-radius:99px; }
.session-tracker progress::-webkit-progress-value { background:var(--accent); border-radius:99px; }
.session-tracker progress::-moz-progress-bar { background:var(--accent); border-radius:99px; }
.session-tracker > button { width:100%; }
.tracker-exercise { margin-top:14px; padding-top:12px; border-top:1px solid #D5D3C9; }
.tracker-exercise > p { margin:2px 0 8px; }
.set-chips { display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:8px; }
.set-chip { margin:0; min-height:56px; padding:8px 10px; display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; background:#fff; color:var(--ink); border:1.5px solid #D5D3C9; border-radius:12px; font-weight:500; }
.set-chip:disabled { opacity:.75; cursor:default; }
.set-chip.done { background:var(--accent); border-color:var(--accent); color:#fff; }
.set-chip.attempt { background:#fff6df; border-color:#e5cf93; }
.set-chip.skipped { background:#EFEDE6; border-style:dashed; color:#55635C; }
.chip-number { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.chip-detail { font-size:13px; overflow-wrap:anywhere; }
.rest-button { margin-top:10px; font-size:13px; min-height:40px; padding:8px 14px; }
.entry-focus { border-color:var(--accent)!important; box-shadow:0 0 0 2px #D5D3C9; }
.rest-bar { position:fixed; z-index:30; left:50%; transform:translateX(-50%); bottom:24px; display:flex; align-items:center; gap:10px; width:min(440px,calc(100% - 24px)); padding:8px 8px 8px 14px; background:#10201A; color:#fff; border-radius:16px; box-shadow:0 10px 30px #10201A40; }
.rest-text { flex:1; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.rest-bar button { margin:0; min-height:40px; padding:8px 12px; font-size:13px; }

/* ---------- Phones ---------- */
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  header { gap:8px; position:sticky; top:0; z-index:25; padding-top:calc(6px + env(safe-area-inset-top)); }
  header .brand span { display:none; }
  header .brand { width:36px; height:36px; justify-content:center; border-radius:11px; background:var(--accent-soft); font-size:20px; flex-shrink:0; }
  .app-title { display:block; flex:1; min-width:0; font-size:17px; font-weight:750; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body[data-view=today] .app-title { display:none; }
  /* Sleep · HRV · This week stay in view while the conversation scrolls. */
  body[data-view=today] .readiness-strip { position:sticky; top:var(--app-header-height,60px); z-index:20; background:var(--surface); margin-inline:-16px; padding-inline:16px; }
  body[data-view=today] .pane-tabs { display:flex; flex:1; max-width:260px; margin:0 auto; padding:3px; gap:2px; background:#D5D3C9; border-radius:12px; }
  .pane-tab { flex:1; margin:0; min-height:40px; padding:6px 8px; background:transparent; color:#55635C; border-radius:9px; font-size:14px; font-weight:600; position:relative; }
  .pane-tab:hover { background:#D5D3C9; }
  .pane-tab[aria-selected=true] { background:#fff; color:#10201A; box-shadow:0 1px 4px #10201A1a; font-weight:750; }
  .pane-dot { position:absolute; top:7px; right:10px; width:8px; height:8px; border-radius:50%; background:#c9772f; }
  header #logout { margin-left:0; width:44px; min-height:44px; padding:0; justify-content:center; background:transparent; color:#55635C; }
  header #logout .logout-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  header #logout .icon { width:22px; height:22px; }

  #sessionContent, #activityWorkspace, #sessionTracker, .entry, .card, .watch-workout, details { scroll-margin-top:72px; }

  /* Tab bar with icons */
  #mainNav { padding:4px 6px calc(4px + env(safe-area-inset-bottom)); bottom:var(--keyboard-inset,0px); }
  #mainNav a { flex-direction:column; gap:2px; min-height:52px; padding:5px 2px; font-size:11px; font-weight:600; color:#55635C; }
  #mainNav a .icon { display:block; }
  #mainNav a[aria-current=page] { background:transparent; color:var(--accent); }
  #mainNav a[aria-current=page] .icon { background:var(--accent-soft); border-radius:999px; padding:2px 14px; box-sizing:content-box; }
  main { padding-bottom:calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }

  /* Toast notices */
  #notice:not(:empty) { position:fixed; z-index:40; top:calc(62px + env(safe-area-inset-top)); left:12px; right:12px; margin:0; box-shadow:0 8px 24px #10201A26; cursor:pointer; }

  /* Coach: one pane at a time */
  #viewContent[data-active-view=today] { display:flex; flex-direction:column; }
  #viewContent[data-active-view=today] > * { min-width:0; max-width:100%; }
  .coach-quick-actions { max-width:100%; }
  #viewContent[data-active-view=today] > #proposal { order:1; }
  #viewContent[data-active-view=today] > #checkin { order:2; }
  #viewContent[data-active-view=today][data-coach-pane=chat] > #proposal, #viewContent[data-active-view=today][data-coach-pane=chat] > #checkin { display:none; }
  #viewContent[data-active-view=today][data-coach-pane=session] > #coach { display:none; }
  body[data-view=today] footer { display:none; }

  /* Chat reads like a messenger; the composer stays above the tab bar */
  #coach { padding:12px 12px calc(var(--chat-composer-height,150px) + var(--keyboard-inset,0px) + var(--keyboard-accessory,0px) + 12px); overflow:visible; border:0; border-radius:0; background:transparent; box-shadow:none; }
  #coach > h2 { font-size:18px; }
  #coach .chat-messages { max-height:none; overflow:visible; padding:4px 0 8px; }
  #coach .chat-bubble { max-width:90%; }
  .chat-composer { position:fixed; left:0; right:0; bottom:calc(var(--bottom-nav-height,var(--nav-h)) + var(--keyboard-inset,0px) + var(--keyboard-accessory,0px)); z-index:24; margin:0; padding:8px 12px 10px; border-radius:0; box-shadow:none; max-height:55dvh; overflow-y:auto; }
  .coach-quick-actions { padding:0 0 8px; scrollbar-width:none; }
  .coach-quick-actions::-webkit-scrollbar { display:none; }
  #coach .actions { margin:4px 0 8px; }
  #coach .coach-health-ribbon { padding-bottom:8px; }

  /* Record */
  #training > .eyebrow { display:none; }
  #training > h2 { font-size:20px; margin:0 0 4px; }
  .session-jump select { font-size:15px; }
  .agenda-actions button { flex:1 1 auto; }
  .rest-bar { bottom:calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); }
  #sessionContent form > button[type=submit], #checkinForm > button[type=submit], #contextForm > button[type=submit] { width:100%; margin-right:0; }
}
@media (max-width:359px) {
  .set-chips { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pane-tab { font-size:13px; padding-inline:4px; }
  .agenda-nav .today-button { padding-inline:10px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Program blocks (mesocycles) across the horizon */
/* Where you are in the plan: the current block, a progress bar, then the blocks as swipeable cards. */
.block-timeline { margin:4px 0 18px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.block-now-card { background:#E4EDE6; border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:4px; }
.block-now-card .eyebrow { margin:0; }
.block-now-title { font-size:1.05rem; line-height:1.3; color:#10201A; overflow-wrap:anywhere; }
.block-now-card .muted { margin:0; font-size:.9rem; }
.plan-progress { height:8px; border-radius:999px; background:#D5D3C9; overflow:hidden; margin-top:8px; }
.plan-progress-fill { display:block; height:100%; min-width:8px; background:#0E4A36; border-radius:999px; }
.block-cards { display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; padding:2px 2px 8px; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
.block-card { flex:0 0 min(64%,220px); scroll-snap-align:start; border-radius:12px; padding:12px 14px; background:#D5D3C9; border:2px solid transparent; display:flex; flex-direction:column; gap:4px; min-height:92px; }
.block-card.tone-1 { background:#e3ecf3; } .block-card.tone-2 { background:#f3ece0; } .block-card.tone-3 { background:#eee6f2; }
.block-card.is-current { border-color:#10201A; }
.block-card.is-done { opacity:.7; }
.block-card-weeks { font-size:.78rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:#0E4A36; }
.block-card-title { font-size:.95rem; line-height:1.3; color:#10201A; overflow-wrap:anywhere; }
.block-card-state { margin-top:auto; font-size:.78rem; font-weight:700; color:#0E4A36; }
.block-card.is-done .block-card-state { color:#55635C; }
/* Change something, then the folded extras. */
.program-change { margin:22px 0 8px; }
.program-more-group { margin:22px 0 0; border-top:1px solid #D5D3C9; padding-top:6px; }
.program-more-title { font-size:1rem; margin:14px 0 8px; color:#10201A; }
.program-more-group > details { border-bottom:1px solid #D5D3C9; }

/* Training day structure: warm-up → main → accessory → cool-down */
.section-bar { display:flex; height:8px; gap:2px; margin:8px 0 12px; border-radius:4px; overflow:hidden; }
.section-seg { flex:1 1 0; min-width:4px; background:#B9B6AA; }
.program-section { margin:10px 0; padding:10px 12px; border-radius:10px; border-left:4px solid #B9B6AA; background:#F8F7F2; }
.program-section-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; }
.section-kind { font-size:.7rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:2px 7px; border-radius:999px; background:#D5D3C9; }
.section-minutes { margin-left:auto; font-size:.85rem; color:#55635C; }
.section-purpose { margin:6px 0 0; font-style:italic; color:#0E4A36; }
.section-notes { margin:6px 0 0; white-space:pre-line; }
.program-section .weekly-movement { margin:10px 0 0; }
.movement-dose { font-weight:600; color:#10201A; }
.kind-warm_up, .kind-activation, .kind-cool_down { --kind:#9fc2d6; } .kind-skill { --kind:#b9a6d3; }
.kind-main { --kind:#10201A; } .kind-secondary { --kind:#55635C; }
.kind-accessory { --kind:#d9a441; } .kind-conditioning { --kind:#d2694f; }
.section-seg[class*="kind-"] { background:var(--kind); }
.program-section[class*="kind-"] { border-left-color:var(--kind); }
.program-section[class*="kind-"] .section-kind { background:color-mix(in srgb,var(--kind) 18%,white); }

.chat-recall { font-size:.8rem; margin:6px 0 0; }

/* Background builds: the coach is working on a program or session */
.build-bar { position:sticky; top:0; z-index:5; display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin:0 0 10px; padding:10px 14px; border-radius:12px; background:#E4EDE6; border:1px solid #D5D3C9; font-size:.9rem; }
.build-label { font-weight:600; }
.build-hint { color:#55635C; }
.build-spinner { width:14px; height:14px; border-radius:50%; border:2px solid #B9B6AA; border-top-color:#10201A; animation:build-spin 1s linear infinite; }
@keyframes build-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .build-spinner { animation:none; } }
.chat-build { margin:6px 0 0; font-size:.85rem; color:#0E4A36; font-style:italic; }
.coach-ready { border-left:3px solid #10201A; }
.coach-ready button { margin-top:8px; }

/* Share a day by link */
.day-share { margin:12px 0 0; padding:10px 0 0; border-top:1px solid #D5D3C9; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.day-share input { flex:1 1 220px; min-width:0; font-size:.85rem; }
.share-hint, .share-state { flex-basis:100%; margin:0; font-size:.82rem; }
.share-state { font-weight:600; color:#10201A; }
/* Phones: float the "working" bar just above the bottom tab bar, clear of toasts. */
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .build-bar { position:fixed; top:auto; left:12px; right:12px; bottom:calc(72px + env(safe-area-inset-bottom) + var(--keyboard-inset,0px)); margin:0; z-index:30; box-shadow:0 6px 18px rgba(24,59,48,.14); }
}
.build-bar.in-composer { position:static; margin:0 0 8px; box-shadow:none; }
@media (max-width:760px), (max-width:960px) and (max-height:500px) { .build-bar.in-composer { position:static; margin:0 0 8px; box-shadow:none; } }

/* ---------- Session parts: one tappable card per movement or block ---------- */
.session-parts { margin:12px 0; }
.parts-progress { margin:0 0 6px; font-size:13px; font-weight:650; color:#0E4A36; }
.session-parts progress { width:100%; height:8px; appearance:none; border:0; border-radius:99px; background:#D5D3C9; overflow:hidden; }
.session-parts progress::-webkit-progress-bar { background:#D5D3C9; border-radius:99px; }
.session-parts progress::-webkit-progress-value { background:var(--accent); border-radius:99px; }
.session-parts progress::-moz-progress-bar { background:var(--accent); border-radius:99px; }
.session-parts > button { width:100%; }
.parts-updated { margin:6px 0 0; }
.part-list { list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:10px; }
.part-card { border:1px solid var(--line); border-radius:16px; background:var(--surface); overflow:hidden; scroll-margin-top:80px; scroll-margin-bottom:120px; }
.part-card.is-done { background:#F1F4EF; }
.part-card.is-current { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent) inset; }
.part-open { display:flex; align-items:flex-start; gap:12px; width:100%; margin:0; padding:14px; min-height:64px; text-align:left; background:transparent; color:var(--ink); border-radius:0; font-weight:500; }
.part-open:hover { background:#F1F4EF; }
.part-index { flex:0 0 30px; height:30px; border-radius:50%; display:grid; place-items:center; font-size:13px; font-weight:750; background:var(--accent-soft); color:var(--accent); }
.is-done .part-index { background:var(--accent); color:#fff; }
.part-text { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.part-text strong { font-size:16px; overflow-wrap:anywhere; }
.part-target, .part-movements { font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.part-status { font-size:12px; font-weight:650; color:var(--accent); }
.part-here { align-self:flex-start; width:fit-content; margin-bottom:2px; flex:0 0 auto; padding:4px 9px; border-radius:99px; background:var(--accent); color:#fff; font-size:11px; font-weight:750; letter-spacing:.3px; }
.part-updated { align-self:center; padding:4px 9px; font-size:11px; }
.part-card .set-chips { padding:0 14px 14px; }
.part-card .set-chip { margin:0; }

/* ---------- Part sheet ---------- */
.part-sheet-backdrop { position:fixed; inset:0; background:rgba(16,30,24,.38); z-index:60; }
.part-sheet { position:fixed; z-index:61; left:50%; transform:translateX(-50%); bottom:0; width:min(640px,100%); max-height:min(88vh,100dvh - 24px); display:flex; flex-direction:column; background:var(--surface); color:var(--ink); border-radius:20px 20px 0 0; box-shadow:0 -12px 40px rgba(0,0,0,.18); padding:10px 16px calc(12px + env(safe-area-inset-bottom)); }
@media (min-width:761px){ .part-sheet { top:6vh; bottom:auto; border-radius:20px; max-height:88vh; } }
.sheet-head { display:flex; align-items:center; gap:8px; }
.sheet-head button { margin:0; min-height:44px; padding:8px 12px; }
.sheet-count { font-size:12px; color:var(--muted); margin-right:auto; }
.sheet-nav { display:flex; gap:6px; }
.part-sheet h3 { margin:8px 0 6px; font-size:20px; overflow-wrap:anywhere; }
.sheet-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border-radius:12px; background:var(--accent-soft); }
.sheet-tab { margin:0; min-height:44px; background:transparent; color:var(--ink); border-radius:9px; font-weight:650; }
.sheet-tab[aria-selected=true] { background:var(--surface); color:var(--accent); box-shadow:0 1px 3px rgba(0,0,0,.12); }
.sheet-body { overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; padding:4px 2px 12px; flex:1; min-height:0; }
.sheet-target { font-weight:650; color:var(--accent); margin:12px 0 6px; }
.sheet-group { margin:18px 0 4px; }
.sheet-note { margin-top:16px; }
.sheet-actions { margin-top:8px; }
.set-entries { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.set-entries > details.entry { margin:0; padding:0; border:1px solid var(--line); border-radius:12px; }
.set-entries > details.entry > summary { min-height:48px; display:flex; align-items:center; padding:8px 14px; font-weight:650; color:var(--ink); }
.set-entries > details.entry[open] > summary { border-bottom:1px solid var(--line); }
.set-entries > details.entry > form, .set-entries > details.entry > p { padding:0 14px 14px; }
.entry-more { margin-top:10px; padding-top:8px; }
body.sheet-open { overflow:hidden; }

/* ---------- Logbook ---------- */
.logbook-actions { margin-bottom:8px; }
#logbookSearch { min-height:46px; border-radius:12px; margin-top:6px; }
.logbook-filters { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 4px; }
.filter-chip { margin:0; min-height:40px; padding:6px 14px; border-radius:99px; background:#F1F4EF; color:var(--ink); border:1px solid var(--line); font-weight:600; font-size:13px; }
.filter-chip[aria-pressed=true] { background:var(--accent); border-color:var(--accent); color:#fff; }
.logbook-month { margin:20px 0 6px; font-size:15px; color:var(--ink); }
.logbook-date { margin:10px 0 4px; font-size:12px; font-weight:700; letter-spacing:.3px; color:var(--muted); text-transform:uppercase; }
.log-item { display:flex; align-items:center; gap:12px; width:100%; margin:0 0 8px; padding:12px 14px; min-height:60px; text-align:left; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:14px; font-weight:500; }
button.log-item:hover { background:#F1F4EF; }
.log-item .icon { flex:0 0 auto; width:18px; height:18px; color:var(--muted); }
.log-mark { flex:0 0 10px; height:10px; border-radius:50%; background:var(--accent); }
.log-item.approved .log-mark { background:transparent; border:2px solid var(--accent); }
.log-item.activity .log-mark { background:#6a8fb0; }
.log-item.measured .log-mark { background:#b08a3e; border-radius:3px; }
.log-item.rest { border-style:dashed; background:#F1F4EF; }
.log-item.rest .log-mark { background:#B9B6AA; }
.log-text { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.log-meta, .log-detail { font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.log-detail { font-size:12px; }
.logbook-older { width:100%; }
.logbook-back { margin:0 0 8px; min-height:44px; }
.logbook-watch { margin-top:24px; }

/* ---------- Plan day linked to its session ---------- */
.plan-session { border-left:3px solid var(--accent); padding-left:12px; }
.plan-session-parts { margin:6px 0; padding-left:18px; font-size:14px; }
.plan-original > summary { min-height:44px; display:flex; align-items:center; color:var(--muted); font-weight:600; }

/* ---------- Chat: session change receipts and photos ---------- */
.session-edit-receipt { margin-top:12px; padding:12px; border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:12px; background:#F1F4EF; }
.session-edit-receipt ul { margin:6px 0; padding-left:18px; font-size:14px; }
.receipt-actions { display:flex; flex-wrap:wrap; gap:8px; }
.receipt-actions button { margin:4px 0 0; min-height:44px; }
.photo-button { margin:0; min-width:44px; min-height:44px; padding:8px; display:grid; place-items:center; }
.photo-button .icon { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
.photo-tray { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:8px; width:100%; }
.photo-chip { position:relative; width:64px; height:64px; border-radius:10px; overflow:hidden; border:1px solid var(--line); background:#E4EDE6; display:grid; place-items:center; font-size:11px; }
.photo-chip img { width:100%; height:100%; object-fit:cover; }
.photo-remove { position:absolute; top:2px; right:2px; margin:0; width:28px; height:28px; min-height:0; padding:0; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; font-size:16px; line-height:1; }
.photo-note { flex-basis:100%; margin:0; }
.chat-photo-note { margin:4px 0 0; font-size:12px; opacity:.85; }
/* Composer: photo button, message, send. Rows: tray or session picker above, message below. */
#coach .chat-composer form { grid-template-columns:44px minmax(0,1fr) 76px; }
#coach .chat-composer form > .photo-tray, #coach .chat-composer form > select { grid-column:1 / -1; grid-row:1; }
#coach .chat-composer form > .photo-button { grid-column:1; grid-row:2; }
#coach .chat-composer form > textarea { grid-column:2; grid-row:2; }
#coach .chat-composer form > button[type=submit] { grid-column:3; grid-row:2; }
#coach .chat-composer form:has(select:not([hidden])) > textarea, #coach .chat-composer form:has(select:not([hidden])) > button[type=submit] { grid-row:2; }
#coach .chat-composer form:has(select:not([hidden])) > .photo-button, #coach .chat-composer form:has(select:not([hidden])) > .photo-tray { display:none; }
/* The rest timer stays usable while a movement sheet is open. */
.rest-bar { z-index:70; }
body.sheet-open .rest-bar { bottom:calc(12px + env(safe-area-inset-bottom)); }
body.sheet-open #notice:not(:empty) { z-index:75; }
.sheet-error { margin:10px 0 0; }
.sheet-step { min-width:44px; font-size:20px; line-height:1; padding:8px 0; }

/* ---------- Events and peaking ---------- */
.events-panel { margin-top:20px; }
.event-card { padding:14px; margin:10px 0; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.event-card.priority-A { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset; }
.event-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.event-head strong { font-size:16px; color:var(--ink); overflow-wrap:anywhere; }
.event-priority { flex:0 0 auto; padding:4px 10px; }
.event-when { margin:4px 0; font-weight:600; color:var(--accent); }
.event-chain { margin:4px 0; }
.event-actions { display:flex; flex-wrap:wrap; gap:8px; }
.event-actions button { margin:6px 0 0; min-height:44px; }
.event-form { margin-top:10px; }
.event-add > summary, .event-past > summary { min-height:44px; display:flex; align-items:center; font-weight:600; }
.peak-banner { margin:8px 0 14px; padding:14px; border-radius:16px; border:1px solid var(--accent); background:var(--accent-soft); }
.peak-banner .eyebrow { margin:0; }
.peak-banner strong { display:block; font-size:19px; color:var(--ink); margin-top:2px; }
.peak-when { margin:2px 0 0; font-weight:600; color:var(--accent); }
.peak-others { margin:8px 0 0; padding-left:18px; font-size:14px; }
.event-receipt { margin-top:12px; padding:12px; border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:12px; background:#F1F4EF; }
.event-receipt ul { margin:6px 0; padding-left:18px; font-size:14px; }
.event-receipt .event-undo { margin:4px 0 4px 8px; min-height:36px; padding:4px 10px; }

/* ---------- Quick logging: Done, Skip, done as planned ---------- */
.part-card.has-check { position:relative; }
.part-card.has-check .part-open { padding-right:64px; }
.part-check { position:absolute; top:10px; right:10px; margin:0; width:44px; height:44px; padding:0; border-radius:50%; background:var(--surface); color:var(--accent); border:2px solid var(--accent); font-size:20px; line-height:1; }
.part-check:hover { background:var(--accent-soft); }
.part-card.has-check .part-here, .part-card.has-check .part-updated { margin-right:4px; }
.part-confirm { margin:0 14px 14px; padding:12px; border-radius:12px; background:var(--accent-soft); }
.part-confirm p { margin:0 0 4px; color:var(--ink); font-weight:600; }
.part-confirm button { margin:8px 8px 0 0; min-height:44px; }
.sheet-body .part-confirm { margin:10px 0; }
.complete-all { width:100%; margin:10px 0 4px; min-height:48px; }
.set-buttons { display:flex; gap:8px; align-items:center; margin-top:10px; }
.set-buttons button { margin:0; min-height:48px; }
.set-buttons .set-done { flex:1; font-size:16px; }

/* ---------- Rearrange: order, supersets, notes; today's numbered sessions ---------- */
.arrange-open { margin:10px 0 0; min-height:44px; }
.arrange-help { margin:10px 0 4px; }
.arrange-list, .day-sessions { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.arrange-row { position:relative; display:grid; grid-template-columns:44px minmax(0,1fr); gap:4px 8px; padding:10px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.arrange-row > .arrange-actions, .arrange-row > .arrange-movements, .arrange-row > form { grid-column:1 / -1; }
.arrange-handle { margin:0; width:44px; height:44px; padding:0; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-size:20px; cursor:grab; touch-action:none; }
.arrange-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.arrange-text strong { color:var(--ink); overflow-wrap:anywhere; }
.arrange-meta, .arrange-note, .part-note { font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.arrange-note, .part-note { font-style:italic; }
.arrange-actions { display:flex; flex-wrap:wrap; gap:6px; }
.arrange-actions button { margin:0; min-height:40px; min-width:44px; padding:6px 10px; }
.arrange-movements { margin:4px 0 0 52px; padding:0; list-style:none; display:flex; flex-direction:column; gap:4px; }
.arrange-movement { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:14px; }
.arrange-movement button { margin:0; min-height:36px; padding:4px 10px; }
.arrange-footer { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.arrange-footer button { margin:0; min-height:44px; }
.dragging { opacity:.85; z-index:5; box-shadow:0 10px 24px rgba(0,0,0,.18); }
.drop-before { box-shadow:0 -3px 0 var(--accent); }
.drop-after { box-shadow:0 3px 0 var(--accent); }
.drop-merge { outline:3px dashed var(--accent); outline-offset:-3px; background:var(--accent-soft); }
.day-session { display:flex; flex-direction:column; gap:6px; }
.day-session .agenda-item { margin:0; }
.day-session.is-selected .agenda-item { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset; }
.day-session-tools { display:flex; gap:6px; flex-wrap:wrap; }
.day-session-tools button { margin:0; min-height:40px; min-width:44px; padding:6px 10px; }
.day-removed { margin-top:10px; }
.day-removed-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; color:var(--muted); }
.day-removed-row span { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
.day-removed-row button { margin:0; min-height:40px; flex:none; white-space:nowrap; }

/* ---------- Your numbers ---------- */
.numbers-panel { margin-top:20px; }
.numbers-group { margin:12px 0; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.numbers-group h4 { margin:0 0 6px; }
.number-row { padding:8px 0; border-top:1px solid var(--line); }
.number-row:first-of-type { border-top:0; }
.number-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.number-head strong { color:var(--ink); overflow-wrap:anywhere; }
.number-value { flex:0 0 auto; font-weight:750; color:var(--accent); font-size:17px; }
.number-basis, .number-extras { margin:2px 0 0; font-size:13px; }
.number-extras { color:var(--ink); }
.number-remove { margin:6px 0 0; min-height:40px; }
.numbers-add > summary { min-height:44px; display:flex; align-items:center; font-weight:600; }
.numbers-scope { font-size:12px; }
.numbers-how > summary { min-height:44px; display:flex; align-items:center; color:var(--muted); font-weight:600; }
.program-review { margin:10px 0; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#F1F4EF; }
.program-review > summary { min-height:40px; display:flex; align-items:center; font-weight:650; color:var(--accent); }
.program-review-item { margin:6px 0; font-size:14px; }

/* ---------- Training library ---------- */
.library-panel { margin-top:20px; }
.library-count { font-weight:650; color:var(--accent); margin:4px 0 8px; }
.library-group { margin:8px 0; padding:4px 12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.library-group > summary { min-height:44px; display:flex; align-items:center; font-weight:650; }
.library-row { padding:8px 0; border-top:1px solid var(--line); }
.library-row.is-off .library-name strong { color:var(--muted); }
.library-head { display:flex; gap:10px; align-items:flex-start; }
.library-head input { width:22px; height:22px; margin:2px 0 0; flex:0 0 auto; }
.library-name { margin:0; font-weight:400; overflow-wrap:anywhere; }
.library-more { margin:4px 0 0 32px; padding:0; border:0; }
.library-more > summary { font-size:13px; min-height:32px; display:flex; align-items:center; }
.library-remove { margin:6px 0 0 32px; min-height:40px; }
.library-add > summary { min-height:44px; display:flex; align-items:center; font-weight:600; }
.chat-checkin-note { margin:8px 0 0; font-size:12px; color:var(--muted); }

/* ---------- This week, export, equipment ---------- */
.week-summary { margin:8px 0 14px; padding:12px 14px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.week-summary-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.week-summary-head .eyebrow { margin:0; }
.week-summary-days { font-size:13px; font-weight:650; color:var(--accent); }
.week-summary-table { margin-top:8px; }
.week-summary-row { display:grid; grid-template-columns:minmax(0,1fr) 64px 48px; gap:8px; align-items:center; padding:5px 0; border-top:1px solid var(--line); font-size:14px; }
.week-summary-row.header { border-top:0; font-size:12px; color:var(--muted); font-weight:650; }
.week-summary-row > span:nth-child(n+2) { text-align:right; font-variant-numeric:tabular-nums; }
.week-summary-bar { display:block; height:4px; margin-top:4px; border-radius:99px; background:#D5D3C9; overflow:hidden; }
.week-summary-fill { display:block; height:100%; background:var(--accent); }
.program-export { margin:12px 0 0; min-height:44px; }
.equipment-chips { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 8px; }
.equipment-chip { margin:0; min-height:36px; padding:6px 12px; border-radius:99px; background:#F1F4EF; color:var(--ink); border:1px solid var(--line); font-weight:600; font-size:13px; }
.equipment-chip[aria-pressed=true] { background:var(--accent); border-color:var(--accent); color:#fff; }

/* Logbook calendar: a month at a glance; tap a day to jump the list there. */
.logbook-calendar { margin:4px 0 14px; padding:10px 8px 6px; border-radius:14px; background:#E4EDE6; }
.cal-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.cal-title { font-size:1rem; color:#10201A; }
.cal-nav { min-width:44px; min-height:44px; padding:0; font-size:22px; line-height:1; border-radius:12px; }
.cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; }
.cal-weekday { text-align:center; font-size:.72rem; font-weight:700; color:#55635C; padding:4px 0; }
.cal-day { min-height:46px; padding:4px 0 6px; border:none; border-radius:10px; background:transparent; color:#0E4A36; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font:inherit; cursor:pointer; }
.cal-day .cal-date { font-size:.95rem; line-height:1; }
.cal-day.has-items .cal-date { font-weight:700; color:#10201A; }
.cal-day.is-today { box-shadow:inset 0 0 0 2px #0E4A36; }
.cal-day.is-selected { background:#0E4A36; color:#F1F4EF; }
.cal-day.is-selected .cal-date { color:#F1F4EF; }
.cal-day:focus-visible { outline:3px solid #0E4A36; outline-offset:1px; }
.cal-marks { display:flex; gap:3px; min-height:6px; }
.mark.activity { background:#b5651d; }
.mark.watch { border:1.5px solid #4f6f9c; }
.cal-day.is-selected .mark.session { background:#F1F4EF; } .cal-day.is-selected .mark.plan { border-color:#F1F4EF; }
.logbook-jump { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:8px 0; padding:8px 12px; border-radius:12px; background:#D5D3C9; font-size:.9rem; scroll-margin-top:72px; }
.logbook-jump button { min-height:40px; }
/* Same for every set: enter reps and weight once for all open sets. */
.same-sets { display:grid; gap:8px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--accent-soft); }
.same-sets-title { margin:0; font-weight:700; color:var(--ink); }
.same-sets-grid { margin:0; }
.same-sets .same-sets-save { width:100%; min-height:48px; margin:0; }
.same-sets-hint { margin:0; font-size:13px; }
.program-review-item p { margin:0; }
.program-review-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.program-review-actions button, .program-review-item .chat-shortcut { min-height:44px; margin:6px 0 0; }
/* Coach personality choice in Profile. */
.coach-style { margin:18px 0 0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; }
.coach-style legend { padding:0 4px; font-weight:700; color:var(--ink); }
.coach-style label.check { display:flex; align-items:flex-start; gap:10px; min-height:44px; margin:6px 0; }
.coach-style input[type=radio] { width:20px; height:20px; margin-top:2px; flex:none; accent-color:var(--accent); }
.coach-style p { margin:6px 0 0; font-size:13px; }

/* Plan: edit one day. Sets, reps or time and rest sit on one row. */
.day-editor{display:grid;gap:12px;margin-top:12px}
.day-editor-session{display:grid;gap:10px;border:1px solid var(--line,#d8d4cc);border-radius:12px;padding:12px;min-width:0}
.day-editor-movement{display:grid;gap:8px;padding:10px 0;border-top:1px solid var(--line,#d8d4cc)}
.day-editor-dose{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);gap:8px;align-items:end}
.day-editor-dose input{width:100%;min-width:0}
.day-editor-order{display:flex;gap:8px;flex-wrap:wrap}
.day-editor-order button{min-height:44px;padding:0 14px}
.today-draft-banner{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;padding:12px 14px;margin:0 0 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.today-draft-banner p{margin:0;flex:1 1 180px}

/* Profile: phone notifications */
.notify-card{margin-top:16px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.notify-card h3{margin:0 0 6px}
.notify-card p{margin:0 0 10px}
/* The end of the previous conversation page, shown above a rolled-over page */
.chat-earlier { display:contents; }
.chat-earlier .chat-bubble { opacity:.72; }
.chat-page-divider { display:flex; flex-direction:column; align-items:center; gap:6px; margin:10px 0; padding:10px 0; border-top:1px solid var(--line, #d8d4c8); border-bottom:1px solid var(--line, #d8d4c8); text-align:center; font-size:.8rem; color:var(--muted, #6b6b62); }
.chat-page-divider button { min-height:44px; }

/* Watch workout question: the kept answer */
.chat-bubble > .watch-answer { margin:6px 0 0; font-size:13px; color:var(--muted); }

/* Logbook: endurance for the month the calendar shows */
.logbook-endurance { margin:0 0 14px; padding:14px 14px 10px; border:1px solid var(--line); border-radius:14px; background:var(--surface,#fff); }
.endurance-title { margin:0 0 10px; font-size:15px; }
.endurance-tiles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.endurance-tile { display:flex; flex-direction:column; gap:2px; padding:10px; border-radius:10px; background:#E4EDE6; min-width:0; }
.endurance-tile strong { font-family:var(--font-num); font-size:20px; font-variant-numeric:tabular-nums; }
.endurance-label { font-size:12px; color:var(--muted); }
.endurance-note { font-size:11px; color:var(--muted); }
.endurance-sport { padding:8px 0; border-top:1px solid var(--line); }
.endurance-sport-head { display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; }
.endurance-sport-total { font-family:var(--font-num); font-size:13px; font-variant-numeric:tabular-nums; }
.endurance-facts { margin:4px 0 0; font-size:13px; }
.endurance-sub { margin:10px 0 0; font-size:12px; color:var(--muted); }
.endurance-list { margin-top:10px; border-top:1px solid var(--line); }
.endurance-list > summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:700; font-size:14px; }
.endurance-item { display:flex; flex-direction:column; gap:2px; padding:8px 0; border-top:1px solid var(--line); font-size:13px; }

/* Logbook: one endurance workout's analytics */
.endurance-workout { margin:0 0 16px; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface,#fff); }
.endurance-workout .endurance-title { font-size:20px; margin:2px 0; }
.endurance-workout .endurance-tiles { margin-top:10px; }
.endurance-reading { margin:4px 0 6px; padding:10px 12px; border-radius:10px; background:#E4EDE6; }
.endurance-reading p { margin:0 0 4px; font-size:14px; } .endurance-reading p:last-child { margin:0; }
.endurance-trace { display:block; width:100%; height:auto; margin:6px 0 2px; }
.endurance-trace polyline { stroke:var(--clay,#B5482A); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.endurance-splits { width:100%; border-collapse:collapse; margin:6px 0; font-family:var(--font-num); font-size:13px; font-variant-numeric:tabular-nums; }
.endurance-splits th { text-align:left; font-weight:600; color:var(--muted); font-size:12px; padding:4px 0; }
.endurance-splits td { padding:6px 0; border-top:1px solid var(--line); }
.endurance-splits tr.is-fastest td { font-weight:700; }
.endurance-workout > button { margin-top:12px; min-height:44px; }
/* With a movement sheet open, notices sit at the bottom so they never cover the sheet's buttons. */
body.sheet-open #notice:not(:empty) { top:auto; bottom:calc(16px + env(safe-area-inset-bottom)); pointer-events:none; }
