:root {
  --bg:#14171c; --paper:#20252d; --band:#292f39; --edge:#353d49; --line:#2d333e;
  --text:#f6f8fb; --muted:#b4bdca; --quiet:#9ba7b8; --accent:#3566e8;
  --accent-hover:#2856d0; --light-blue:#94b4ff; --selected:#1f3157;
  --red:var(--accent); --red-hover:var(--accent-hover); --red-press:#2148b5; --rust:var(--light-blue);
  scrollbar-color:#4c5665 var(--bg); accent-color:var(--accent);
}
:where(button,a,input,summary,select,textarea):focus-visible,
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,select:focus-visible,textarea:focus-visible {outline:3px solid var(--light-blue);outline-offset:3px}
::selection{background:#35548a;color:white}
.top{background:var(--bg);border-color:var(--line)}
.bar,main{width:min(1100px,calc(100% - 72px))}
.bar{height:64px}.brand img{width:104px;height:32px;object-fit:contain}
.nav-btn{border-radius:10px}.nav-btn.current{background:var(--selected);color:var(--light-blue)}
h1,h2,h3{letter-spacing:-.035em}h1{font-size:clamp(2rem,4vw,2.8rem);line-height:1.1;font-weight:690}
h2{font-weight:640}.page-title{gap:12px;margin-bottom:22px}.page-title h1{white-space:normal}
button,input,select,.gear,.course-card,.course-cover,.reader>img,.diary-link,.calendar-panel .week-strip button{border-radius:10px}
.cta,.secondary,.light{min-height:48px;border-radius:11px;font-weight:620}.cta{background:var(--accent)}
.light{background:var(--accent);color:white}.light:hover{background:var(--accent-hover)}
.secondary,.icon-btn,.tech-link,.effort button{background:var(--paper);border-color:var(--edge)}
:is(.secondary,.plain,.icon-btn,.swap,.log-row):hover{background:var(--band)}
.textbtn,.inline-action,.back,.date-tile,.course-copy em,.complete-mark,.set-table .ic{color:var(--light-blue)}
.textbtn{text-decoration:none}.textbtn:hover{text-decoration:underline}
input,select{background:var(--bg);border-color:#515c6c}input::placeholder{color:var(--quiet)}
:is(.seg,.effort,.day-picks) button[aria-pressed=true],.week-strip button[aria-pressed=true]{background:var(--selected);border-color:var(--light-blue);color:var(--text)}
.week-strip button.actual span{text-decoration-color:var(--light-blue)}
.notice,.rest,#status{background:var(--selected);border-color:#495f84;color:var(--text)}.rest button,.previous-move td{color:var(--light-blue)}
.chart-line{stroke:var(--light-blue)}.weight-chart circle{fill:var(--light-blue)}.chart-fill{fill:#3566e82a}.barrow i,.reader progress::-webkit-progress-value{background:var(--accent)}
.course-card:hover{border-color:#738cb8}.meal summary::after{color:var(--light-blue)}
dialog{background:var(--paper);color:var(--text);border:1px solid var(--edge);border-radius:17px}
dialog::backdrop{background:#080c13be}.sheethead h2{outline:none}.media{background:#0d1016}
.error{color:#ffa6a6}.error:empty{display:none}#store-error{background:#682b36}
.section-action,.tech-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:7px 12px;border-radius:10px;color:var(--light-blue);font-weight:560;font-size:.91rem}
.section-action{background:var(--paper);border:1px solid var(--edge)}.section-action:hover,.tech-action:hover{background:var(--band)}
.section-action .ic,.tech-action .ic{width:17px;height:17px}
.agenda-row,.option-row,.disclosure summary{min-height:49px}.disclosure{border-top:1px solid var(--edge);min-width:0}
.disclosure>summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;color:var(--text);font-weight:590;padding:12px 0}
.disclosure>summary::-webkit-details-marker{display:none}.disclosure>summary>span{flex:1;min-width:0}
.disclosure>summary small{font-size:.88rem;font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
.disclosure>summary .ic{color:var(--light-blue);width:17px;height:17px;transform:rotate(90deg)}.disclosure[open]>summary .ic{transform:rotate(-90deg)}
.section-meta::first-letter,.schedule-day .section-meta::first-letter,.session-meta::first-letter{text-transform:uppercase}

/* The scheduled session and its exercise list share a single surface. */
.workout-layout{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(260px,1fr);align-items:start;gap:clamp(22px,3.5vw,46px)}
.workout-layout>*,.workout-aside{min-width:0}
.session-cover{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:flex-end;min-height:278px;border-radius:16px;background:#202833}
.session-cover>img{position:absolute;inset:0;width:100%;height:100%;z-index:-2;object-fit:cover;object-position:68% 44%}
.session-cover::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(14,20,29,.96) 0%,rgba(15,20,29,.8) 33%,rgba(15,20,29,.24) 66%,transparent),linear-gradient(0deg,#10172262,transparent 55%)}
.session-copy{padding:clamp(22px,3vw,34px);max-width:70%;min-width:0}
.session-state{font-size:.85rem;font-weight:600;color:#c6d8ff;margin-bottom:9px}
.session-copy h2{font-size:clamp(1.85rem,3.1vw,2.8rem);line-height:1.06;letter-spacing:-.04em}
.session-meta{color:#dce1e9;margin:11px 0 20px;font-size:.9rem}
.session-copy .cta{min-height:47px;padding-inline:18px}.session-copy .cta .ic{width:17px;height:17px}
.workout-layout .session-cover:has(+.session-details){border-radius:16px 16px 0 0}
.session-details{margin:0;border:1px solid var(--edge);background:var(--paper);border-radius:0 0 16px 16px;padding:0 21px}
.session-details summary{min-height:56px}.session-details .lineitem:last-child{border:0}.session-details .sheet-list{padding-bottom:9px}
.agenda h2,.session-record>h2{font-size:1.32rem;margin:0 0 10px}
.agenda-row{display:flex;align-items:center;gap:13px;text-align:left;width:100%;padding:13px 0;border-bottom:1px solid var(--line);border-radius:0}
.agenda-row:hover{background:var(--paper)}.agenda-date{display:grid;justify-items:center;align-content:center;flex:none;width:46px;height:50px;border-radius:10px;background:var(--paper);color:var(--text);line-height:1.05}
.agenda-date span{font-size:.71rem;color:var(--light-blue);margin-bottom:4px}.agenda-date b{font-size:1.13rem;font-weight:640}
.agenda-row strong,.agenda-row small{display:block}.agenda-row strong{font-size:.97rem;font-weight:580}.agenda-row small{color:var(--muted);font-size:.8rem;margin-top:3px}.agenda-row>.ic{margin-left:auto;width:16px;color:var(--light-blue)}
.program-details{margin-top:20px;border-bottom:1px solid var(--edge)}.program-details .tinyrow{margin:0 0 12px;padding:9px 0;border-top:0}
.schedule-page,.session-player,.session-record{max-width:640px;margin-inline:auto}
.schedule-page>.back,.session-record>.back{margin-bottom:12px}
.schedule-day{margin-top:18px;border:1px solid var(--edge);background:var(--paper);padding:22px;border-radius:15px}
.schedule-day h2{font-size:1.6rem}.schedule-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
.calendar-panel .week-strip{margin-bottom:18px}
.dash-panel{border:1px solid var(--edge);background:var(--paper);border-radius:15px;padding:21px}
.dashboard-grid{gap:18px}.first-week-action{margin-top:18px}.first-week-action h2{margin:6px 0}
.diary-link{border-radius:13px}.course-card{border-radius:14px}.course-card img{filter:none}
.profile-panel .block,.chart{border-color:var(--edge)}
.setup-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:clamp(32px,6vw,84px);align-items:stretch;max-width:980px;margin:10px auto}
.setup-copy{align-self:center;min-width:0}.setup-copy h1{max-width:16ch}.setup-photo{overflow:hidden;border-radius:16px;min-height:400px}
.setup-photo img{width:100%;height:100%;object-fit:cover;object-position:74% center;display:block}
.setup-details{margin:20px 0 16px;border-bottom:1px solid var(--edge)}
.setup-details[open]{padding-bottom:8px}.setup-details .textbtn+.textbtn{margin-left:12px}
.setup-links{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 15px;margin-top:6px;align-items:center}
.setup-links a{display:inline-flex;align-items:center;min-height:40px}

/* During a session the next set is the primary task. */
body[data-page=player] :is(#topnav,#bottomnav){display:none}
.session-player .player-head{margin:0 0 22px}
.player-head .back{color:var(--muted);text-align:left}
.session-progress{display:flex;gap:16px;align-items:center;color:var(--light-blue);font-size:.85rem;font-weight:580}
.session-progress progress{flex:1;min-width:32px;height:4px;border:0;appearance:none;background:var(--edge);border-radius:3px;overflow:hidden}
.session-progress progress::-webkit-progress-bar{background:var(--edge)}.session-progress progress::-webkit-progress-value{background:var(--accent)}.session-progress progress::-moz-progress-bar{background:var(--accent)}
.exercise-heading{margin:16px 0 17px}.exercise-heading h1{font-size:clamp(1.85rem,3.7vw,2.55rem);max-width:24ch;text-wrap:balance}
.exercise-sub{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:6px}
.exercise-sub p{font-size:.93rem;color:var(--muted)}.tech-action{min-height:40px;flex:none;padding-right:0}
.entry-card{border:1px solid var(--edge);background:var(--paper);border-radius:16px;padding:clamp(18px,3vw,27px)}
.entry-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.entry-card h2{font-size:clamp(1.15rem,2.5vw,1.48rem)}.entry-heading .textbtn{white-space:nowrap;padding-block:6px}
.entry-hint{color:var(--muted);font-size:.9rem;line-height:1.5;margin:6px 0 17px}
.entry-card .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.entry-card .fields label{color:var(--text);font-weight:550}
.entry-card .fields:has([name=side]){grid-template-columns:repeat(3,minmax(0,1fr))}
.entry-card .fields label[hidden]{display:none}
.entry-card .fields[data-mode="body"]{grid-template-columns:minmax(0,1fr)}
.entry-card .fields[data-mode="body"]:has([name=side]){grid-template-columns:repeat(2,minmax(0,1fr))}
.entry-card .fields input{background:var(--bg);border:1px solid #4a5565;height:54px;font-size:1.55rem;font-weight:610;border-radius:10px}
.entry-card .unit{color:var(--quiet)}
.entry-card .seg{margin:8px 0 12px}.entry-card .fieldgroup{margin:18px 0}
.effort{gap:6px}.effort button{min-height:43px;background:var(--bg);border-radius:9px;color:var(--muted)}
.entry-card .error:not(:empty){margin-bottom:10px}.entry-card .cta{min-height:50px}
.rest-card{text-align:center;padding-block:28px}.rest-time{font-size:clamp(3.9rem,11vw,5.8rem);font-weight:650;line-height:1.1;letter-spacing:-.045em;font-variant-numeric:tabular-nums;margin:12px auto;color:var(--text)}
.rest-card .entry-hint{max-width:39ch;margin:8px auto 19px}.rest-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
.set-history{margin-top:17px;border-bottom:1px solid var(--edge)}.set-history .ledger{padding:0 0 16px}
.set-table .current{background:var(--selected)}.logged-set,.empty-exercise{display:flex;align-items:center;gap:10px;padding:10px 0}
.logged-set>span,.empty-exercise small{font-size:.84rem;color:var(--muted)}.logged-set strong{margin-left:auto;font-size:.94rem}
.empty-exercise{justify-content:space-between;border-top:1px solid var(--line)}.empty-exercise strong{font-weight:520;font-size:.94rem}
.action-list{margin-top:6px}.option-row{display:flex;align-items:center;width:100%;padding:12px 2px;gap:12px;border-bottom:1px solid var(--line);border-radius:0;text-align:left}
.option-row span{flex:1}.option-row>.ic{width:18px;color:var(--light-blue)}.option-row:hover{background:var(--band)}.option-row:last-child{border-bottom:0}
.record-status{display:flex;align-items:center;gap:7px;color:var(--light-blue);font-size:.9rem;margin:8px 0}.record-status .ic{width:16px}
.record-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;background:var(--paper);border:1px solid var(--edge);border-radius:14px;padding:17px;margin:20px 0 27px}
.record-metrics dt{font-size:.8rem;color:var(--muted)}.record-metrics dd{font-size:1.75rem;font-weight:630;margin:2px 0 0}
.next-work{margin-top:20px}.logged-exercise[open]{padding-bottom:10px}

@media(max-width:760px){
  .bar,main{width:calc(100% - 32px)}.bar{height:54px}.brand img{width:91px;height:29px}
  main{padding-top:22px;padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  #bottomnav:not(:empty){background:#191d24;border-top-color:var(--edge)}
  #bottomnav .nav-btn.current{color:var(--light-blue);background:var(--selected)}
  .page-title{margin-bottom:16px}.section-action{font-size:.84rem;padding-inline:10px}
  .workout-layout,.setup-layout{grid-template-columns:minmax(0,1fr);gap:24px}.workout-aside{margin-top:0}
  .session-cover{display:block;min-height:0;background:var(--paper);border:1px solid var(--edge)}
  .session-cover>img{position:static;display:block;width:100%;height:clamp(124px,34vw,192px);object-position:72% 37%}
  .session-cover::before{display:none}.session-copy{max-width:none;padding:16px}
  .session-state{margin-bottom:5px;font-size:.8rem;color:var(--light-blue)}
  .session-copy h2{font-size:1.8rem}.session-meta{margin:8px 0 14px;color:var(--muted)}
  .session-copy .cta{width:100%}.session-details{padding-inline:16px;border-top:0}.session-details summary{min-height:49px}
  .agenda-row{padding-block:10px}.program-details{margin-top:15px}.dash-panel{padding:16px}.dashboard-grid{gap:12px}
  .setup-layout{display:flex;flex-direction:column-reverse;margin:0 auto;gap:19px}.setup-copy{width:100%}
  .setup-photo{min-height:0;height:clamp(102px,31vw,155px);border-radius:13px}.setup-photo img{object-position:72% 34%}
  .setup-copy h1{font-size:1.95rem}.setup-copy .day-picks button{min-height:44px}.setup-copy .fieldgroup{margin-top:17px}
  body[data-page=player] #bottomnav:not(:empty){display:none}body[data-page=player] main{padding-top:12px;padding-bottom:calc(26px + env(safe-area-inset-bottom))}
  .session-player .player-head{margin-bottom:14px}.exercise-heading{margin:13px 0}.exercise-sub{margin-top:2px}
  .entry-card{padding:16px}.entry-card .fieldgroup{margin:16px 0}.entry-hint{font-size:.86rem;margin:5px 0 13px}
  .entry-card .fields:has([name=side]){column-gap:6px}
  .entry-card .fields:has([name=side]) label{font-size:.76rem}
  .rest-card{padding-block:23px}.set-history{margin-top:10px}.schedule-day{padding:17px}
  .calendar-panel .week-head{flex-wrap:wrap}.session-record .record-metrics{padding:13px}
}
@media(max-width:365px){.page-title{flex-wrap:wrap;row-gap:8px}.page-title h1{font-size:1.75rem}.page-title .section-action{font-size:.8rem;padding-inline:8px}.page-title .section-action .ic{width:15px}.bar,main{width:calc(100% - 24px)}.entry-heading{align-items:flex-start}.entry-heading h2{max-width:15ch}.entry-heading .textbtn{padding:0;font-size:.8rem}.exercise-heading h1{font-size:1.68rem}.session-copy{padding:13px}.disclosure>summary{gap:8px}}

.set-target{font-size:clamp(1.55rem,5.8vw,2.25rem);font-weight:680;letter-spacing:-.04em;line-height:1.15;margin:14px 0 8px;color:var(--light-blue)}
.entry-card .set-target+.entry-hint{margin:0 0 6px}
.set-adjust{border-block:1px solid var(--edge);margin-top:14px}
.set-adjust summary{cursor:pointer;padding:12px 0;color:var(--light-blue);font-size:.9rem}
.set-adjust[open]{padding-bottom:14px}.entry-card .unit{margin:5px 0 12px}.prior-set{font-size:.82rem;margin:8px 0;color:var(--muted)}
.rest-next{display:grid;gap:4px;margin:14px 0 20px;padding:14px;border-radius:10px;background:var(--bg);text-align:left}
.rest-next small,.rest-next p{color:var(--muted)}.rest-next strong{color:var(--light-blue)}.rest-next p{margin:0;font-size:.85rem}
body[data-page=today] .session-cover+.calendar-panel{margin-top:18px}
.exercise-change{font-size:.86rem;color:var(--light-blue);margin:6px 0 8px}
