/* V33.0.0 (owner, 2026-10-28) — one motion system, modelled on openGym's measured timings.
   Every pop-up is a bottom drawer: it rises over 0.34 s on one curve (fast start, long soft landing, no bounce)
   while the page behind dims and blurs, and slides back down when it closes. Only transform and opacity animate. */
:root{--ease:cubic-bezier(.32,.72,0,1);--ease-in:cubic-bezier(.4,0,1,1);--dur-fast:140ms;--dur-med:220ms;--dur-sheet:340ms}
@keyframes woSheetUp{from{transform:translateY(100%)}to{transform:none}}
@keyframes woSheetDown{from{transform:var(--wo-close-from,none)}to{transform:translateY(100%)}}
@keyframes woScrimIn{from{background-color:transparent;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}}
@keyframes woFadeOut{to{opacity:0}}
@keyframes woRowIn{from{opacity:0;transform:translateY(-6px)}}

/* ── The bottom sheet (woSheetOpen): slower, softer rise; quicker exit; blurred page behind ── */
body .wo-sheet{transition:transform var(--dur-med) var(--ease-in)}
body .wo-sheet-root.open .wo-sheet{transition:transform var(--dur-sheet) var(--ease)}
body .wo-sheet-backdrop{transition:opacity var(--dur-med) ease;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
body .wo-sheet-root.open .wo-sheet-backdrop{transition-duration:var(--dur-sheet)}

/* ── Every openModal() window is a bottom drawer at every width (owner #2: "get rid of pop ups") ── */
body .modal-overlay{align-items:flex-end;padding:0;overflow:hidden;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
body .modal-overlay.open{animation:woScrimIn var(--dur-sheet) var(--ease) both}
body .modal-overlay>.modal{position:relative;max-width:720px;margin:0 auto;border-radius:22px 22px 0 0;border-bottom:0;
  max-height:90vh;max-height:90dvh;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  padding:24px 20px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 40px rgba(0,0,0,.35);
  animation:woSheetUp var(--dur-sheet) var(--ease) both}
body .modal-overlay>.modal::before{content:'';display:block;width:44px;height:5px;border-radius:999px;background:var(--muted);opacity:.5;margin:-14px auto 14px}
body .modal-overlay.closing{animation:woFadeOut var(--dur-med) var(--ease-in) both;pointer-events:none}
body .modal-overlay.closing>.modal{animation:woSheetDown var(--dur-med) var(--ease-in) both}
body .modal-overlay>.modal.dragging{animation:none;transition:none}
body .modal-overlay>.modal.settle{transition:transform var(--dur-med) var(--ease)}

/* ── In-app notices and questions (alert/confirm replacements): a short drawer above everything ── */
body .wo-dialog{z-index:2600}
body .wo-dialog>.modal{max-width:560px}
.wo-dialog-msg{font-size:15px;line-height:1.45;white-space:pre-line;margin:2px 0 18px;color:var(--text)}
.wo-dialog-acts{display:flex;flex-direction:column;gap:10px}
.wo-dialog-acts .btn{width:100%;min-height:48px;justify-content:center}
.wo-dialog-acts .btn.danger{background:var(--danger,#d64545);color:#fff;border-color:transparent}

/* ── Toast with Undo ── */
/* owner 2026-11-22 (OpenGym style): a quiet see-through pill in the card colour, as wide as its text; taps go through it unless it
   carries a button (Undo / Open). */
.wo-toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom,0px));z-index:9997;transform:translateX(-50%);
  display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100% - 32px);padding:9px 16px;border-radius:20px;
  background:var(--card,var(--surface));background:color-mix(in srgb,var(--card,var(--surface)) 86%,transparent);
  -webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px);
  border:1px solid var(--border-subtle,var(--border));color:var(--text);box-shadow:0 8px 24px -8px rgba(0,0,0,.35);
  font-size:14px;font-weight:500;pointer-events:none;animation:woToastIn var(--dur-med) var(--ease) both}
.wo-toast.has-action{pointer-events:auto;padding:4px 6px 4px 16px}
.wo-toast.out{animation:woFadeOut var(--dur-med) var(--ease-in) both}
.wo-toast button{border:0;background:transparent;color:var(--accent);font:inherit;font-weight:800;text-decoration:underline;padding:8px 10px;min-height:40px;cursor:pointer}
@keyframes woToastIn{from{opacity:0;transform:translate(-50%,12px)}}

/* ── Menu drawers: every ⋯ menu opens as a list of big rows in a bottom sheet (owner #1.3, #1.4) ── */
.wm-list{display:flex;flex-direction:column;gap:2px;padding-bottom:6px}
.wm-row{display:flex;align-items:center;gap:14px;width:100%;min-height:52px;padding:10px 14px;border:0;border-radius:14px;
  background:transparent;color:var(--text);font:inherit;font-size:15.5px;font-weight:600;text-align:left;cursor:pointer}
.wm-row:active{background:var(--surface-2,rgba(127,127,127,.12))}
@media(hover:hover){.wm-row:hover{background:var(--surface-2,rgba(127,127,127,.1))}}
.wm-row .ic{width:22px;height:22px;flex:0 0 22px;opacity:.85}
.wm-row .wm-lbl{flex:1 1 auto;min-width:0}
.wm-row .wm-val{color:var(--muted);font-weight:600;font-size:14px}
.wm-row .wm-on{width:46px;height:28px;border-radius:999px;background:var(--border);position:relative;flex:0 0 46px;transition:background var(--dur-fast) ease}
.wm-row .wm-on::after{content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform var(--dur-med) var(--ease)}
.wm-row[aria-checked="true"] .wm-on{background:var(--accent)}
.wm-row[aria-checked="true"] .wm-on::after{transform:translateX(18px)}
.wm-row.danger{color:var(--danger,#d64545)}
.wm-sep{height:1px;background:var(--border-subtle,var(--border));margin:6px 14px}
.wm-sec{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:12px 14px 6px}
/* A segmented choice (the calendar view): one tap, the thumb glides to it */
.wm-seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;margin:0 6px 6px;padding:4px;border-radius:14px;background:var(--surface-2,rgba(127,127,127,.12))}
.wm-seg button{min-height:44px;border:0;border-radius:11px;background:transparent;color:var(--text);font:inherit;font-size:14.5px;font-weight:700;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transition:background var(--dur-fast) ease,box-shadow var(--dur-fast) ease}
.wm-seg button .ic{width:20px;height:20px}
.wm-seg button[aria-checked="true"]{background:var(--surface);box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--accent)}

/* Press feedback on the new controls */
.wm-row,.wm-seg button,.ds-act,.wk-row{transition:transform var(--dur-fast) ease}
.wm-row:active,.ds-act:active,.wk-row:active{transform:scale(.985)}

@media (prefers-reduced-motion:reduce){
  body .wo-sheet,body .wo-sheet-root.open .wo-sheet,body .wo-sheet-backdrop{transition-duration:.01s}
  body .modal-overlay.open,body .modal-overlay>.modal,body .modal-overlay.closing,body .modal-overlay.closing>.modal,.wo-toast{animation:none}
  .wm-row,.wm-seg button,.ds-act,.wk-row,.wm-row .wm-on::after{transition:none}
}

/* ── The Day planner (owner #1.1): what was done, what is planned, then the day's actions ── */
.ds-sec{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:14px 2px 6px}
.ds-list{display:flex;flex-direction:column;gap:8px}
.ds-item,.ds-act{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 14px;border:1px solid var(--border-subtle,var(--border));
  border-radius:16px;background:var(--surface-2,var(--surface));color:var(--text);font:inherit;text-align:left;cursor:pointer}
.ds-ic,.ds-act-ic{flex:0 0 36px;width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--accent-container,rgba(127,127,127,.15));color:var(--on-accent-container,var(--accent))}
.ds-ic .ic,.ds-act-ic .ic{width:20px;height:20px}
.ds-item.done .ds-ic{background:color-mix(in srgb,var(--set-saved) 18%,transparent);color:var(--set-saved)}
.ds-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.ds-name{font-size:15.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ds-sub{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ds-rest{display:flex;align-items:center;gap:8px;margin:14px 2px 0;font-weight:700;color:var(--muted)}
.ds-rest .ic{width:18px;height:18px}
.ds-acts{display:flex;flex-direction:column;gap:8px;margin-top:18px}
.ds-act{border-color:transparent;background:transparent;min-height:52px}
.ds-act:hover{background:var(--surface-2,rgba(127,127,127,.08))}
.ds-act.primary{background:var(--accent);color:var(--on-accent,#fff)}
.ds-act.primary .ds-sub{color:inherit;opacity:.85}
.ds-act.primary .ds-act-ic{background:rgba(255,255,255,.2);color:inherit}
.ds-act.on .ds-act-ic{background:var(--accent);color:var(--on-accent,#fff)}
.ds-act.back .ds-act-ic{background:transparent}

/* ── Week view (owner #1.2): one rectangle per day, the day on the left, its workouts on the right ── */
.wk-list{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.wk-row{display:flex;align-items:stretch;gap:12px;width:100%;min-height:68px;padding:10px 12px;border:1px solid var(--border-subtle,var(--border));
  border-radius:16px;background:var(--surface);color:var(--text);font:inherit;text-align:left;cursor:pointer}
.wk-row.today{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.wk-date{flex:0 0 46px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:12px;background:var(--surface-2,rgba(127,127,127,.1));padding:6px 0}
.wk-row.today .wk-date{background:var(--accent);color:var(--on-accent,#fff)}
.wk-dow{font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;opacity:.8}
.wk-num{font-size:20px;font-weight:800;line-height:1.1}
.wk-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:6px}
.wk-line{display:flex;align-items:center;gap:8px;min-width:0}
.wk-line>.ic{flex:0 0 18px;width:18px;height:18px}
.wk-line.done>.ic{color:var(--set-saved)}
.wk-line.plan>.ic{color:var(--accent)}
.wk-line.rest{color:var(--muted)}
.wk-txt{display:flex;flex-direction:column;min-width:0}
.wk-txt b{font-size:14.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-txt small{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-line.empty{color:var(--muted);font-size:13.5px;justify-content:space-between}
.wk-add{display:flex;width:30px;height:30px;border-radius:50%;align-items:center;justify-content:center;background:var(--surface-2,rgba(127,127,127,.12))}
.wk-add .ic{width:16px;height:16px}
.hcell.rest .hcell-name.rest{color:var(--muted);font-style:italic}
.wk-row.today .wk-dow,.wk-row.today .wk-num{color:var(--on-accent,#fff);opacity:1}

/* A completed set uses the palette's own "set saved" colour (v32-layout.css --set-saved), with readable ink on it. */
body{--set-saved-fg:var(--on-accent,#fff)}
body.dark{--set-saved-fg:var(--bg,#0d1117)}
body.pal-classic,body.pal-glow{--set-saved-fg:#fff}
body.dark.pal-classic{--set-saved-fg:#04261a}
body.dark.pal-glow{--set-saved-fg:#00242b}
body.pal-vibrant,body.dark.pal-vibrant{--set-saved-fg:var(--on-accent,#fff)}

/* ── Log a Session set rows (owner #3): tick bubble on the left, narrower number fields, red / ✕-coloured − ── */
#page-entry .set-table.v33-sets td.set-num{padding-left:0;padding-right:4px}
#page-entry .set-table.v33-sets td.set-num::before,#page-entry .set-table.v33-sets td.set-num::after{display:none!important}
.set-tick{position:relative;width:34px;height:34px;border-radius:50%;border:2px solid var(--border);background:var(--surface);color:var(--text);
  display:inline-flex;align-items:center;justify-content:center;font:inherit;font-size:13px;font-weight:800;cursor:pointer;padding:0;
  transition:background var(--dur-fast) ease,border-color var(--dur-fast) ease,transform var(--dur-fast) ease}
.set-tick:active{transform:scale(.9)}
.set-tick .set-tick-ok{display:none;width:18px;height:18px}
.set-row.done .set-tick{background:var(--set-saved);border-color:var(--set-saved);color:var(--set-saved-fg)}
.set-row.done .set-tick .set-tick-ok{display:block;animation:woTickPop var(--dur-med) var(--ease) both}
.set-row.done .set-tick .set-tick-n{display:none}
@keyframes woTickPop{from{transform:scale(.4);opacity:0}}
#page-entry .set-table.v33-sets .set-row input[type=number]{width:100%;max-width:none}
#page-entry .set-table.v33-sets input.ghosted::placeholder{color:var(--muted);opacity:.75}
#page-entry .set-table.v33-sets .set-del{width:30px;height:30px;min-width:30px;min-height:30px;border:0;border-radius:50%;
  background:var(--close-bg);color:var(--close-fg);font-weight:800;font-size:18px;line-height:1}
#page-entry .set-table.v33-sets .sub-row td{padding-top:2px;padding-bottom:2px}
#page-entry .set-table.v33-sets .sub-lbl{text-align:center;color:var(--muted);font-weight:800}
#page-entry .set-table.v33-sets .sub-kind{font-size:12px;color:var(--muted);font-weight:700}
#page-entry .set-table.v33-sets .sub-row input{max-width:84px;height:36px;font-size:14px}
@media (prefers-reduced-motion:reduce){.set-tick,.set-row.done .set-tick .set-tick-ok{transition:none;animation:none}}

/* ── Card ⋯ menus (owner #11) ── */
body #page-entry .exercise-card-head .card-more{grid-area:col;position:static;margin:0;transform:none;width:44px;height:44px;min-width:44px;min-height:44px}
body #page-entry .exercise-card-head .ex-collapse{grid-area:x}
body #page-training .tp-card .tp-title-row>.card-more{position:static;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;border-radius:50%}
.card-more .ic{width:22px;height:22px}
.wm-row.flip .ic{transform:rotate(180deg)}
.cm-fields{display:grid;grid-template-columns:1fr;gap:10px;padding:0 14px 6px}
.cm-field{margin:0}
.cm-field label{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
@media(min-width:560px){.cm-fields{grid-template-columns:1fr 1fr 1fr}}

/* ── What this session hits (owner #9) ── */
.wo-sheet .summary-body-pics{max-width:420px;margin:0 auto}
.sh-legend{justify-content:center;margin:6px 0 10px}
.sh-list{display:flex;flex-direction:column;gap:8px;padding:4px 4px 0}
.sh-row{display:grid;grid-template-columns:minmax(0,1fr) 38% 44px;align-items:center;gap:10px;font-size:14.5px}
.sh-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-bar{height:6px;border-radius:999px;background:var(--surface-2,rgba(127,127,127,.18));overflow:hidden}
.sh-bar i{display:block;height:100%;border-radius:inherit;background:var(--accent);transition:width var(--dur-med) var(--ease)}
.sh-n{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);font-weight:700}
.sh-note{font-size:12px;color:var(--muted);text-align:center;margin:12px 0 4px}

/* ── Save & actions drawer (owner #8): the same rise as every drawer; only the strip opens it ── */
body #trDrawerTray.tr-anim{transition:transform var(--dur-sheet) var(--ease)}
@media (prefers-reduced-motion:reduce){body #trDrawerTray.tr-anim{transition-duration:.01s}}

/* ── Food is not in this build (owner #13) ── */
html.wo-no-food .subtab[data-sub="food"],html.wo-no-food .quick-tile[onclick="quickPick('food')"],html.wo-no-food #page-food,html.wo-no-food .wo-food-only{display:none!important}   /* V33.0.4 (owner): Help says nothing about Food while it is off */
.set-tick.side .set-tick-n{font-size:11.5px;letter-spacing:-.02em}

/* ── Body-weight goal (owner, after openGym) ── */
.body-goal{margin-bottom:16px}
.bg-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.bg-main{min-width:0}
.bg-val{font-size:26px;font-weight:800;line-height:1.15;margin:4px 0 2px}
.bg-bar{height:8px;border-radius:999px;background:var(--surface-2,rgba(127,127,127,.18));overflow:hidden;margin-top:12px}
.bg-bar i{display:block;height:100%;border-radius:inherit;background:var(--accent);transition:width var(--dur-sheet) var(--ease)}
.bg-ends{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);font-weight:700;margin-top:6px}
.bg-form{grid-template-columns:1fr 1fr}

/* ── Picker planning (Codex package, ported 2026-10-29): V33 drawer fit ── */
body .wo-sheet-foot #ppSheetFooter{grid-column:1/-1;width:100%}
body .wo-sheet .pp-footer{width:100%;display:flex;gap:10px}
body .wo-sheet .pp-footer>button{flex:1 1 0}
body .wo-sheet .pp-footer>button.accent{background:var(--accent);color:var(--on-accent,#fff);border-color:transparent;font-weight:800}
body .wo-sheet .pp-footer>button.accent:disabled{opacity:.5}
body .wo-sheet .pp-review-actions{display:grid;grid-template-columns:auto 1fr 1fr auto;gap:8px}
body .wo-sheet .pp-review-actions>button{min-width:0;padding-inline:8px}
body .wo-sheet .pp-review-actions>button:last-child{color:var(--danger,#d64545)}
.pp-review-item{animation:woRowIn var(--dur-med) var(--ease) both}
@media(max-width:360px){body .wo-sheet .pp-review-actions{grid-template-columns:1fr 1fr}body .wo-sheet .pp-review-actions .pp-instances{grid-column:1/-1}}

/* V33.0.1 — stable set targets, theme-aware swipe feedback and circular card menus. */
body #page-entry .set-tick{width:44px;height:44px;min-width:44px;min-height:44px;touch-action:manipulation}
body #page-entry .set-tick-all .ic{width:19px;height:19px}
body #page-entry .set-tick-all[aria-checked=true]{background:var(--set-saved);border-color:var(--set-saved);color:var(--set-saved-fg)}
body #page-entry .set-row{touch-action:pan-y}
body #page-entry .set-row.swipe-complete,body #trRunner .lay-row.swipe-complete{background:color-mix(in srgb,var(--set-saved) 18%,transparent)}
body #page-entry .set-row.done.swipe-complete,body #trRunner .lay-row.done.swipe-complete{background:color-mix(in srgb,#FF7F27 18%,transparent)}
body #page-entry .set-row.swipe-delete,body #trRunner .lay-row.swipe-delete{background:var(--close-bg)}
/* Owner, 2026-11-10 (second pass) — the swiped row slides over this strip (index.html swipeLift) and springs back. */
.swipe-under{position:absolute;z-index:0;border-radius:10px;overflow:hidden;pointer-events:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;box-sizing:border-box;background:transparent}
.swipe-under.go-ok{background:color-mix(in srgb,var(--set-saved) 26%,transparent);color:var(--set-saved)}
.swipe-under.go-del{background:color-mix(in srgb,var(--danger,#e5484d) 24%,transparent);color:var(--danger,#e5484d)}
.swipe-under.armed.go-ok{background:var(--set-saved);color:var(--set-saved-fg,#fff)}
.swipe-under.go-ok.uncheck{background:color-mix(in srgb,#FF7F27 26%,transparent)}
.swipe-under.armed.go-ok.uncheck{background:#FF7F27}
.swipe-under.armed.go-del{background:var(--danger,#e5484d);color:#fff}
.swipe-under>span{display:none;align-items:center;gap:6px;font-size:13px;font-weight:700;transition:transform .16s var(--ease,ease)}
.swipe-under>span .ic{width:18px;height:18px;transform:scale(.85);transition:transform .16s var(--ease,ease)}
.swipe-under.armed>span .ic{transform:scale(1.1)}
.swipe-under.go-del>.swipe-under-del,.swipe-under.go-ok>.swipe-under-ok{display:inline-flex}
.swipe-under>.swipe-under-ok{margin-left:auto}
body #page-entry .exercise-card-head .card-more,body #page-training .card-more{border-radius:50%;aspect-ratio:1}
body #page-training .tr-now-name{position:relative;padding-right:54px}
body #page-training .tr-now-name>.tr-run-more{position:absolute;right:0;top:0;width:44px;height:44px;min-width:44px;margin:0}
body #page-training .tp-title-row>.card-more{margin-left:auto;flex-shrink:0}

body #page-training .tp-card{position:relative}
body #page-training .tp-card .tp-main{padding-right:50px}
body #page-training .tp-card .tp-title-row>.card-more{position:absolute;right:14px;top:14px;margin:0}
body .card-more{border-radius:50%!important}

/* touch-action must be on table cells/controls: browsers ignore it on table rows. */
body #page-entry .set-row>td,body #page-entry .set-row input,body #page-entry .set-row select{touch-action:pan-y}
/* Owner, 2026-11-10 — Start a Session rows swipe too (left ticks, right deletes): the browser keeps vertical panning only. */
body #trRunner .lay-row,body #trRunner .lay-row>td,body #trRunner .lay-row input,body #trRunner .lay-row select{touch-action:pan-y}

/* Shared save/deletion choices. Native radios keep their own small, circular geometry. */
body .wf-choices{border:0;padding:0;margin:18px 0;min-width:0;display:grid;gap:10px}
body .wf-choices>legend{font:inherit;font-weight:700;color:var(--text);padding:0;margin-bottom:10px}
body .wf-choice{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:10px;min-height:60px;box-sizing:border-box;
 padding:11px 12px;border:1px solid var(--border);border-radius:var(--ui-control-radius,12px);background:var(--surface2);color:var(--text);
 cursor:pointer;margin:0;text-transform:none;letter-spacing:normal}
body .wf-choice-copy{display:grid;gap:3px;min-width:0}
body .wf-choice-title{font:inherit;font-size:15px;font-weight:750;line-height:1.35;color:var(--text)}
body .wf-choice-detail{font:inherit;font-size:12.5px;font-weight:400;line-height:1.4;color:var(--muted)}
body .wf-choice>input[type=radio]{appearance:auto;display:block;flex:none;width:20px!important;min-width:20px!important;max-width:20px!important;
 height:20px!important;min-height:20px!important;max-height:20px!important;padding:0!important;margin:2px 0 0;border-radius:50%!important;
 accent-color:var(--accent);box-shadow:none}
body .wf-choice:has(>input:checked){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--surface2))}
body .wf-choice:has(>input:focus-visible){outline:2px solid var(--accent);outline-offset:3px}
body .wf-choice.disabled{opacity:.5;cursor:default}
body .wf-impact{font-size:13px;line-height:1.5;color:var(--muted);margin:14px 0}

/* Save choices stay compact; one short title and one sentence per row. */
body .wf-save-fields{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px;margin-top:14px}
body .wf-save-fields .modal-row{margin:0;min-width:0}
body .wf-save-fields input{min-width:0;padding-inline:10px}
body #wfDeleteConfirm{background:var(--red);color:#fff;border-color:var(--red)}
body.dark #wfDeleteConfirm{color:#240807}

/* V33.0.2: full-width action surface and stable set/summary geometry. */
body #trDrawerTray{max-width:none;margin:0;left:0;right:0;width:100%}
body .tr-action-rail{display:none}
@media(min-width:1100px){body #trSetup{grid-template-columns:minmax(0,1fr)}}
body .tr-run-head{flex-wrap:wrap}
body .tr-head-right{flex:1 1 100%;margin-left:0;justify-content:flex-start}
body .tr-jump{margin-right:auto}
/* V33.0.3 — workout detail: Delete / Edit / Summary share the top row evenly; Back to day and Close split the row
   under them (Close takes the whole row when there is no day to go back to). */
body .sd-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;align-items:stretch}
body .sd-actions>button{grid-column:span 2}
body .sd-actions>.sd-back,body .sd-actions>.sd-close{grid-column:span 3;order:1}
body .sd-actions:not(:has(.sd-back))>.sd-close{grid-column:1/-1}
body .sd-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;height:auto;min-height:48px;white-space:nowrap;padding:10px 8px}
body .sd-actions .ic{flex:0 0 20px;width:20px;height:20px}
body .set-tick,body .set-tick-all{touch-action:pan-y;flex-shrink:0}
body .set-tick:active{transform:none}
body .set-scroll{overflow-anchor:none}
/* V33.0.5 (owner 6) — drop / pyramid rows: the set row's own parts, about 20% smaller */
.tr-subsets{display:grid;gap:8px;margin:12px 0}
.tr-sub-row{display:grid;grid-template-columns:64px minmax(0,1fr) minmax(0,1fr) 30px;gap:8px;align-items:center}   /* V33.0.6: − at the right end */
.tr-sub-head{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.tr-sub-lbl{font-size:13px;font-weight:700;color:var(--muted)}
body #trRunner .tr-sub-row input{width:100%;min-width:0;min-height:0;height:44px;padding:0 8px;text-align:center;font-size:16px;font-weight:700}
body #trRunner .tr-sub-del,body #page-entry .set-table.v33-sets .sub-del{width:30px;height:30px;min-width:30px;min-height:30px;padding:0;border:0;border-radius:50%;
  background:var(--close-bg);color:var(--close-fg);font-size:18px;font-weight:800;line-height:1;display:inline-flex;align-items:center;justify-content:center}
body #trRunner .tr-sub-add,body #page-entry .set-table.v33-sets .sub-add-btn{justify-self:start;min-height:36px;padding:4px 12px;font-size:13px;font-weight:700;display:inline-flex;align-items:center;gap:6px}
body #trRunner .tr-sub-add .ic,body #page-entry .sub-add-btn .ic{width:16px;height:16px}

/* Nested action sheets retain a normal-height Back control beside the title. */
body .wo-sheet:not(.full) .wo-sheet-back{position:absolute;left:0;top:0;bottom:0;margin-block:auto;width:44px;height:44px;display:inline-grid;place-items:center}

/* V33.0.3 (owner issue 5) — the check-all bubble sits in the same column, at the same inset, as each set's bubble. */
#page-entry .set-table.v33-sets thead th:first-child{padding-left:0;padding-right:4px;text-align:left;vertical-align:middle}
#page-entry .set-table.v33-sets thead th:first-child .set-tick-all{margin:0}

/* V33.0.3 (owner 4) — Exercise List drawer (layout from Content/UI/Exercise.list, in the app's own theme tokens). */
.exl-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.exl-top .btn-ghost{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 18px;font-size:15px}   /* V33.0.4 (owner 3.2) — slightly larger */
.exl-top .exl-add{background:color-mix(in srgb,var(--accent) 16%,var(--surface2));color:var(--text)}
.exl-sum{display:flex;gap:18px;align-items:center;padding:10px 14px;margin-bottom:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface2);color:var(--muted);font-size:13px;text-transform:uppercase;letter-spacing:.04em}
.exl-sum b{color:var(--text);font-size:18px;margin-right:4px}
.exl-back{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:10px;padding:10px 12px;border:1px dashed var(--border);border-radius:12px;background:transparent;color:var(--accent);font:inherit;text-align:left}
.exl-back .ic{width:18px;height:18px}
.exl-list{display:grid;gap:8px}
.exl-row{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface2)}
.exl-row.current{border-color:var(--accent)}
.exl-del{width:32px;height:32px;border-radius:50%;border:0;display:grid;place-items:center;background:color-mix(in srgb,var(--danger,#e5484d) 22%,transparent);color:var(--danger,#e5484d)}
.exl-del .ic{width:16px;height:16px}
.exl-main{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;padding:0;border:0;background:none;color:var(--text);font:inherit;text-align:left}
.exl-main .exl-pic,.exl-main img{width:56px;height:56px;border-radius:8px;object-fit:cover;background:var(--surface)}
.exl-pic-empty{display:grid;place-items:center;color:var(--muted)}
.exl-text{display:grid;gap:4px;min-width:0}
.exl-name{font-weight:700;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.exl-meta{display:flex;gap:8px;align-items:center;min-width:0;font-size:12.5px;color:var(--muted)}
.exl-chip{padding:2px 8px;border-radius:6px;background:var(--surface);color:var(--text);font-weight:600;white-space:nowrap}
.exl-target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.exl-prog{font-size:12px;color:var(--muted);white-space:nowrap}

/* V33.0.3 (owner 9) — organizer card: grip + count at the top left, picture beside them. */
body #page-training .tp-card .tp-lead{display:flex;flex-direction:column;align-items:center;gap:6px;flex:0 0 36px}
body #page-training .tp-card .tp-lead>.drag-handle{width:32px;min-width:32px;height:32px;min-height:32px;margin:0}
body #page-training .tp-card .tp-lead>.exercise-number{margin:0}

/* V33.0.4 (owner 2) — numbered exercise circles in the runner head, openGym style */
.tr-ex-nums{display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center}
.tr-ex-num{width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:800;color:var(--muted);background:var(--surface2);border:2px solid transparent;cursor:pointer}
.tr-ex-num.done{background:color-mix(in srgb,var(--accent) 28%,var(--surface2));color:var(--text)}
.tr-ex-num.cur{border-color:var(--accent);color:var(--text)}
.tr-ex-num:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* V33.0.4 (owner 3.1) — Exercise List back to the old jump control's size, on the left; Pre-fill smaller, on the right */
body #trRunner .tr-head-right{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
body #trRunner .tr-exlist-btn{flex:1 1 auto;max-width:240px;min-height:44px;padding:9px 11px;gap:6px;font-size:13px;font-weight:700;justify-content:flex-start;white-space:nowrap}
body #trRunner .tr-prefill-sm{flex:0 1 auto;margin-left:auto;min-height:38px;padding:6px 8px;gap:4px;font-size:12px;white-space:nowrap}
body #trRunner .tr-prefill-sm .ic{width:16px;height:16px}
/* V33.0.4 (owner 3.3) — no divider line above the organizer's Timers / Pre-fill / Set details row */
body #page-training #trOpts{border-top:0}

/* ═══ V33.0.4 (owner) — session layouts: Card · Single · Compact · Focus ═══ */
.lay-pill{position:fixed;right:16px;z-index:40;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:999px;
  border:1px solid var(--border);background:var(--surface2);color:var(--text);font:700 12px/1 inherit;letter-spacing:.06em;text-transform:uppercase;
  box-shadow:0 6px 18px rgba(0,0,0,.35);cursor:pointer}
.lay-pill[hidden]{display:none}
.lay-pill .ic{width:16px;height:16px}
.lay-list{display:flex;flex-direction:column;gap:8px}
.lay-opt{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 14px;border-radius:12px;border:1px solid var(--border);background:var(--surface2);color:var(--text);text-align:left;cursor:pointer}
.lay-opt.on{border:2px solid var(--accent)}
.lay-opt-ic{width:36px;height:36px;border-radius:10px;background:var(--surface);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.lay-opt-txt{flex:1;display:flex;flex-direction:column;gap:2px}
.lay-opt-name{font-size:15px;font-weight:700}
.lay-opt-sub{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.lay-opt-ok{color:var(--accent)}
.lay-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 12px}
.lay-head[hidden],.lay-foot[hidden]{display:none}
.lay-head .summary-pill{margin-left:auto}
.lay-foot{display:flex;flex-direction:column;gap:10px;margin:12px 0}
.lay-nav{display:flex;justify-content:space-between;gap:10px;margin:12px 0}
.lay-nav .btn-ghost{min-height:44px;min-width:110px}
.lay-complete{min-height:52px;font-size:16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.lay-note{margin:0;text-align:center;color:var(--muted);font-size:13px}
/* Log a Session — Card and Focus show one exercise; Focus one set of it */
#workoutBuilder[data-layout="card"] .exercise-card:not(.lay-cur),#workoutBuilder[data-layout="focus"] .exercise-card:not(.lay-cur){display:none}
#workoutBuilder[data-layout="focus"] .exercise-card.lay-cur:not(.lay-all-done) .set-row:not(.lay-focus-row),
#workoutBuilder[data-layout="focus"] .exercise-card.lay-cur:not(.lay-all-done) .sub-row,
#workoutBuilder[data-layout="focus"] .exercise-card.lay-cur:not(.lay-all-done) .sub-add{display:none}
#workoutBuilder[data-layout="focus"] .lay-focus-row input{min-height:56px;font-size:24px;font-weight:800}
/* Log a Session — Compact: names and sets only, a small picture */
#workoutBuilder[data-layout="compact"] .exercise-card{padding:8px 10px}
#workoutBuilder[data-layout="compact"] .exercise-meta,#workoutBuilder[data-layout="compact"] .previous,#workoutBuilder[data-layout="compact"] .tr-details,
#workoutBuilder[data-layout="compact"] .lc-pic,#workoutBuilder[data-layout="compact"] .lc-side,#workoutBuilder[data-layout="compact"] .exercise-actions .small-btn:not(.primary),#workoutBuilder[data-layout="compact"] .target-line,#workoutBuilder[data-layout="compact"] .ex-setcount{display:none!important}
#workoutBuilder[data-layout="compact"] .exercise-card-title .ex-head-pic,#workoutBuilder[data-layout="compact"] .exercise-card-title .ex-head-pic img{width:28px!important;height:28px!important;min-width:28px;min-height:28px}
#workoutBuilder[data-layout="compact"] .exercise-card-title{font-size:14px}
#workoutBuilder[data-layout="compact"] .exercise-card-head .icon-btn{width:32px;height:32px;min-width:32px;min-height:32px}
#workoutBuilder[data-layout="compact"] .set-tick{width:30px;height:30px;min-width:30px;min-height:30px}
#workoutBuilder[data-layout="compact"] .set-del{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important}
body #page-entry #workoutBuilder[data-layout="compact"] .set-table input,body #page-entry #workoutBuilder[data-layout="compact"] .set-table select{min-height:0;height:32px;padding:2px 6px;font-size:14px}
#workoutBuilder[data-layout="compact"] .set-table td{padding-top:2px;padding-bottom:2px}
#workoutBuilder[data-layout="compact"] .exercise-actions .small-btn{min-height:32px;padding:4px 10px}
/* Start a Session — Card / Single / Compact sheet */
.lay-sheet{display:flex;flex-direction:column;gap:12px}
.lay-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:8px}
.lay-card-head{display:flex;align-items:center;gap:10px}
.lay-pic{width:56px;height:56px;border-radius:10px;background:var(--surface2);flex-shrink:0;overflow:hidden;display:inline-flex;align-items:center;justify-content:center}
.lay-pic img{width:100%;height:100%;object-fit:contain}
.lay-card-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.lay-name{font-size:16px;font-weight:700;line-height:1.2}
.lay-tags{display:flex;gap:6px;flex-wrap:wrap}
.lay-tag{font-size:11px;padding:2px 8px;border-radius:6px;background:var(--surface2)}
.lay-prog{font-size:12px;color:var(--muted);white-space:nowrap}
.lay-rows-head,.lay-row{display:grid;grid-template-columns:40px 26px minmax(0,1fr) minmax(0,1fr) 84px 30px;gap:8px;align-items:center}
.lay-rows-head{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
body #trRunner .lay-row input{min-width:0;min-height:0;height:44px;padding:0 6px;text-align:center;font-size:16px;font-weight:600}
.lay-n{font-size:13px;font-weight:800;color:var(--muted);text-align:center}
.lay-del{width:28px;height:28px;border-radius:50%;border:0;padding:0;background:var(--close-bg,#93000a);color:var(--close-fg,#fff);font-size:16px;font-weight:800;line-height:1;cursor:pointer}
.lay-del:disabled{opacity:.3;cursor:default}
.lay-tick{width:36px;height:36px;border-radius:50%;border:2px solid var(--border);background:var(--surface);color:transparent;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer}
.lay-tick .ic{width:18px;height:18px}
.lay-row.done .lay-tick{background:var(--set-saved);border-color:var(--set-saved);color:var(--set-saved-fg)}   /* V33.0.7: the theme's set-done colour, as in Log */
.lay-tick-all[aria-checked=true]{background:var(--set-saved);border-color:var(--set-saved);color:var(--set-saved-fg)}   /* owner, 2026-11-02: check all, as in Log */
.lay-rows-head .lay-tick-all{text-transform:none}
.lay-add,.lay-cardio{min-height:40px}
.lay-add-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}   /* owner, 2026-11-04: Add set · Repeat last set, as in Log */
/* owner, 2026-11-04: List and Compact cards fold like Log's */
.lay-body{display:flex;flex-direction:column;gap:inherit}
.lay-card.folded .lay-body{display:none}
.lay-fold{width:36px;height:36px;min-width:36px;min-height:36px}
.lay-sheet[data-layout="compact"] .lay-fold{width:32px;height:32px;min-width:32px;min-height:32px}
/* phone widths: List rows give the weight and reps more room (a 3-digit weight was clipped beside the Type column) */
@media (max-width:480px){
  .lay-sheet:not([data-layout="compact"]) :is(.lay-rows-head,.lay-row){grid-template-columns:36px 20px minmax(0,1fr) minmax(0,1fr) 74px 28px;gap:6px}
  body #trRunner .lay-sheet:not([data-layout="compact"]) .lay-row input{padding:0 2px;font-size:15px}
  body #trRunner .lay-sheet:not([data-layout="compact"]) .lay-type{font-size:12px;padding:0 0 0 4px}
}
/* Compact (Start a Session): one-line header, 28px picture, 36px set rows */
.lay-sheet[data-layout="compact"]{gap:8px}
.lay-sheet[data-layout="compact"] .lay-card{padding:8px 10px;gap:4px;border-radius:10px}
.lay-sheet[data-layout="compact"] .lay-pic{width:28px;height:28px;border-radius:6px}
.lay-sheet[data-layout="compact"] .lay-tag,.lay-sheet[data-layout="compact"] .exercise-number{display:none}
/* Compact keeps a slim header with only the check-all tick (owner, 2026-11-02); its columns match the compact rows */
.lay-sheet[data-layout="compact"] .lay-rows-head{grid-template-columns:30px 22px minmax(0,1fr) minmax(0,1fr) 88px 24px;gap:6px;height:30px}
.lay-sheet[data-layout="compact"] .lay-rows-head span{visibility:hidden}
.lay-sheet[data-layout="compact"] .lay-tick-all{width:28px;height:28px}
.lay-sheet[data-layout="compact"] .lay-name{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lay-sheet[data-layout="compact"] .card-more{width:32px;height:32px;min-width:32px;min-height:32px}
.lay-sheet[data-layout="compact"] .lay-row{grid-template-columns:30px 22px minmax(0,1fr) minmax(0,1fr) 88px 24px;gap:6px;height:36px}
body #trRunner .lay-sheet[data-layout="compact"] .lay-row input{height:32px;font-size:14px;border-radius:8px}
.lay-sheet[data-layout="compact"] .lay-del{width:24px;height:24px;font-size:14px}
.lay-sheet[data-layout="compact"] .lay-tick{width:28px;height:28px}
.lay-sheet[data-layout="compact"] .lay-add{min-height:32px;padding:4px 10px}
/* room under the last card so the floating LAYOUT pill never hides it */
#trRunner[data-layout="single"] .lay-sheet,#trRunner[data-layout="compact"] .lay-sheet,#trRunner[data-layout="card"] .lay-nav,#logLayFoot,#workoutBuilder[data-layout]{padding-bottom:56px}
#workoutBuilder[data-layout="compact"] .exercise-card-head{min-height:0;margin-bottom:0;padding-bottom:0;row-gap:0}
#workoutBuilder[data-layout="compact"] .ex-body{gap:4px;margin-top:0;padding-top:0}
#workoutBuilder[data-layout="compact"] .set-table thead th:nth-child(4),#workoutBuilder[data-layout="compact"] .set-table .set-row>td:nth-child(4){display:none}
#workoutBuilder[data-layout="compact"] .exercise-card-head{gap:0 6px}
#workoutBuilder[data-layout="compact"] .ehead-sub:has(.saved-badge.off){display:none}
#workoutBuilder[data-layout="compact"] .exercise-actions{margin-top:4px;padding-top:4px}

/* V33.0.5 (owner 4/5) — a Left/Right pair is one set: only the Left row carries the − */
#page-entry .set-table.v33-sets .set-row.lr-r .set-del,.lay-del.lr-r{visibility:hidden}
#page-entry .set-table.v33-sets .set-row.lr-l td{border-bottom:0}

/* V33.0.6 (owner 2) — Log a Session Card: the Start a Session runner for one exercise */
#workoutBuilder[data-layout="card"] .exercise-card{display:none}
.log-run{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:12px;margin-top:10px;width:100%}
.log-run-head{display:flex;align-items:center;gap:10px}
.log-run-name{flex:1;min-width:0;font-size:18px;font-weight:700;line-height:1.2}
.log-run .tr-done-sets{display:flex;flex-wrap:wrap;gap:8px}
.log-run .tr-done-pill{min-width:72px;text-align:center}
.log-run .tr-done-pill.done{background:color-mix(in srgb,var(--accent) 22%,var(--surface2))}
.log-run-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.log-run-of{font-size:13px;font-weight:700;color:var(--muted)}
.log-run .tr-set-big{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.log-run .tr-set-big .tr-set-type{grid-column:1/-1}
.log-run .tr-num input{min-width:0;text-align:center;font-size:24px;font-weight:800}
.log-run .lay-nav .btn-primary{min-width:120px;min-height:48px}
.lay-head .log-run{flex-basis:100%}

/* V33.0.6 (owner) — a planned workout kept as Incomplete when its day became a rest day */
.hcell-name.plan.missed{text-decoration:line-through;opacity:.7}

/* V33.0.7 (owner) — Start a Session layouts: the current set, history, details; move-on questions */
.lay-hist{margin:0;font-size:12px}
.lay-hist .linkish{background:none;border:0;padding:0 0 0 4px;color:var(--accent);font:inherit;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.lay-hist .linkish .ic{width:14px;height:14px}
.lay-details{margin-top:4px}
.lay-sheet[data-layout="compact"] .lay-hist{display:none}
.move-on-remember{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:10px 0 4px;font-size:14px;font-weight:600}
.move-on-remember span{flex-basis:100%;padding-left:28px;font-weight:400;color:var(--muted);font-size:12px}
.move-on-remember input{width:20px;height:20px;min-height:0}
.move-on-acts{flex-wrap:wrap}

/* V33.0.7 (owner, sandbox review) — set type on every layout row; a centred minus on every delete button */
body #trRunner .lay-type{min-width:0;min-height:0;height:44px;padding:0 6px;font-size:13px}
body #trRunner .lay-sheet[data-layout="compact"] .lay-type{height:32px;font-size:12px;padding:0 2px 0 6px}
.lay-subs{margin:2px 0 6px 66px}
.lay-sheet[data-layout="compact"] .lay-subs{margin-left:54px}
.lay-del,.set-del,.tr-sub-del{display:inline-flex!important;align-items:center;justify-content:center;padding:0!important;line-height:1}
.lay-del .ic,.set-del .ic,.tr-sub-del .ic{width:16px;height:16px;stroke-width:3;margin:0}

/* Shared session card treatment, using the active palette and mode. */
body :is(#trRunner,#workoutBuilder) .session-add-set {
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .35);
  color: var(--accent);
}
body.dark :is(#trRunner,#workoutBuilder) .session-add-set {
  background: rgba(var(--accent-rgb), .18);
  border-color: rgba(var(--accent-rgb), .45);
}
body #trRunner .tr-nav-btns > .tr-next { flex: 1 1 0; min-width: 0; }
body #trRunner .tr-nav-btns > .tr-prev { flex: 0 0 auto; }
body #trRunner .tr-nav-btns > button { min-height: 50px; }
.lay-card-head .drag-handle.reorder-grip { flex: 0 0 32px; min-width: 32px; height: 44px; touch-action: pan-y; }
.lay-card-head .lay-name { text-align: start; overflow-wrap: anywhere; }
button.lay-pic { padding: 0; border: 0; cursor: pointer; }
.guided-card-exercise { display: grid; grid-template-columns: minmax(72px, 120px) minmax(0, 1fr); gap: 10px; }
.guided-card-exercise .lc-pic { width: 100%; height: auto; min-height: 96px; margin: 0; }
.guided-card-exercise .lc-side { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-width: 0; margin: 0; }

body #page-entry #workoutBuilder .log-session-head { display: flex; gap: 8px; padding: 0; }
.log-session-head [data-log-card-equip][hidden] { display: none; }
.log-session-head .exercise-card-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
body #page-entry #workoutBuilder .exercise-actions.lay-add-row { display: grid; padding-top: 0; }
#workoutBuilder .lay-add-row .ex-setcount { grid-column: 1 / -1; }
@media (max-width: 480px) {
  .lay-card-head { gap: 6px; }
  .lay-card-head .lay-pic { width: 36px; height: 36px; }
  .lay-card-head .lay-prog { display: none; }
  .guided-card-exercise { grid-template-columns: 72px minmax(0, 1fr); }
}

/* Card uses Log's numbered completion buttons and set table. Log uses the
   separate completion and set-number columns from the original guided Card. */
#trRunner .guided-card-table .lay-row { display: table-row; }
#trRunner .guided-card-table th:first-child { width: 44px; }
#trRunner .guided-card-table th:nth-child(4) { width: 96px; }
#trRunner .guided-card-table th:last-child { width: 38px; }
#trRunner .guided-card-table .set-tick { color: var(--text); }
#trRunner .guided-card-table .done .set-tick { color: var(--set-saved-fg); }
#workoutBuilder .log-session-sets .log-set-label { width: 28px; }
#workoutBuilder .log-session-sets .log-set-type { width: 96px; }
@media (max-width: 480px) {
  #trRunner .guided-card-table th:nth-child(4), #workoutBuilder .log-session-sets .log-set-type { width: 76px; }
  #workoutBuilder .log-session-sets .log-set-label { width: 24px; }
  #workoutBuilder .log-session-sets td.lay-n { padding-inline: 0; }
}
#trRunner .guided-card-table .lay-row input { min-height: 50px; }
.guided-card-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guided-card-muscle {
  min-height: 48px;
}
/* Owner, 2026-11-10 — Collapse all / Expand all beside Pre-fill (List and Compact). Both sit at the right. */
body #trRunner .tr-foldall-btn{flex:0 0 auto;margin-left:auto;min-height:38px;padding:6px 8px;gap:4px;font-size:12px;white-space:nowrap}
body #trRunner .tr-foldall-btn .ic{width:16px;height:16px}
body #trRunner .tr-foldall-btn+.tr-prefill-sm{margin-left:0}
/* Owner, 2026-11-10 (second/third pass) — on a phone the row has no room for three labelled buttons: Collapse all shows
   its icon only (full name for screen readers), Pre-fill keeps its full label, and Exercise List takes only the width it
   needs instead of stretching (on a phone too narrow for one line, Exercise List and then Pre-fill wrap onto two lines; never clipped). Desktop unchanged. */
@media (max-width:560px){
  body #trRunner .tr-foldall-btn{min-width:44px;justify-content:center;padding:6px 10px}
  body #trRunner .tr-foldall-btn .tr-foldall-txt{display:none}
  body #trRunner .tr-run-head:has(.tr-foldall-btn) .tr-exlist-btn{flex:0 1 auto;min-width:min-content;padding:6px 8px;gap:5px;white-space:normal;line-height:1.15;text-align:left}
}
/* Owner, 2026-11-10 — Exercise List rows reorder: ⠿ handle at the right end (hold, then drag). */
.exl-row:has(>.drag-handle){grid-template-columns:44px minmax(0,1fr) 40px}
.exl-row>.drag-handle{width:44px;min-width:44px;min-height:44px;font-size:18px}
.exl-row.dragging{opacity:.95;border-color:var(--accent);background:var(--surface2)}
.drag-active .exl-row:not(.dragging){opacity:.65}
/* Single-choice fields open the shared choice drawer instead of the native list. */
select:not([multiple]){pointer-events:none}
.wo-sel-row{justify-content:space-between}
.wo-sel-row[aria-checked="true"]{color:var(--accent);font-weight:700}
.wo-sel-row .wo-sel-check{width:18px;height:18px;flex:0 0 18px;margin-left:auto}
/* Owner, 2026-11-10 — the runner head (circles row + Exercise List row) stays frozen at the top of the screen in
   Start a Session (index.html trHeadApply). Same size frozen or not (no padding change, so the page never shifts): a
   background-coloured ring fills the gaps; the line under it shows only while it is stuck over the sets. */
body #trRunner .tr-run-head.tr-head-pin{position:sticky;top:var(--tr-head-top,0px);z-index:90;background:var(--bg);
  box-shadow:0 0 0 8px var(--bg)}
body #trRunner .tr-run-head.tr-head-pin.tr-head-stuck{box-shadow:0 0 0 8px var(--bg),0 9px 0 0 var(--border)}

/* Owner, 2026-11-10 — runner head buttons keep one size in every state (index.html trStableLabel). */
/* V33.1.9 — not only in the runner: the setup screen's buttons use it too (every state's label was showing at once there). */
.tr-stable{display:inline-grid;text-align:left}
.tr-stable>span{grid-area:1/1}
.tr-stable>.tr-stable-alt{visibility:hidden}

/* V33.1.5-11.13 (owner #4) — Pick a workout: the preview drawer lists every item before the workout is used. */
.wp-pv-head{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.wp-pv-count{font-size:13px;color:var(--muted)}
.wp-pv-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.wp-pv-item{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--card)}
.wp-pv-n{font-weight:800;color:var(--accent);text-align:center;line-height:22px}
.wp-pv-main{display:grid;gap:2px;min-width:0}
.wp-pv-name{font-weight:700;overflow-wrap:anywhere}
.wp-pv-sub{font-size:13px;color:var(--muted);overflow-wrap:anywhere}

/* V33.1.8-11.18 (owner, 2026-11-18) — Autofill Weight & Reps on/off and the Autofill source (History / Today): icon only on a
   phone (like Collapse all), icon + text on desktop; the source button is greyed out while Autofill is off and keeps its place. */
body #trRunner .tr-af-src{flex:0 0 auto;min-height:38px;padding:6px 8px;gap:4px;font-size:12px;white-space:nowrap}
body #trRunner .tr-af-src .ic{width:16px;height:16px}
body #trRunner .tr-prefill-sm+.tr-af-src{margin-left:0}
.tr-toggle.tr-af-src:disabled,.wm-row:disabled{opacity:.4;cursor:default}
@media (max-width:560px){
  body #trRunner .tr-af-btn,body #trRunner .tr-af-src{flex:0 0 auto;min-width:44px;min-height:44px;justify-content:center;padding:6px 10px}
  body #trRunner .tr-af-btn .tr-af-txt,body #trRunner .tr-af-src .tr-af-txt{display:none}
  body #trRunner .tr-foldall-btn+.tr-af-btn{margin-left:0}
  body #trRunner .tr-foldall-btn{min-height:44px}   /* the three icon buttons share one size */
}

/* V33.1.9 (owner, 2026-11-19) — the ⤒ ↑ ↓ ⤓ reorder buttons share the whole width of their row (equal buttons, at least 44px
   each) instead of four narrow squares: Plan a workout and Log a Session's cardio and circuit cards. In the planner
   the control row also runs under the ✕ column, so it reaches the card's right edge. */
body #page-plan .pn-item-ctl{margin-right:-42px;flex-wrap:wrap}
body #page-plan .pn-item-ctl>select,body #page-plan .pn-item-ctl>.pn-item-sub{flex:1 1 130px;min-width:0}
body #page-plan .pn-item-ctl .card-order,
body #page-entry .ehead-sub .card-order,
body #page-entry .lc-head .ehead-sub .card-order{display:flex;flex:1 1 200px;gap:6px;flex-wrap:nowrap;min-width:0;width:auto;margin-left:0;justify-content:stretch}
body #page-plan .pn-item-ctl .card-order .icon-mini,
body #page-entry .ehead-sub .card-order .icon-mini,
body #page-entry .lc-head .ehead-sub .card-order .icon-mini{flex:1 1 0;width:auto;min-width:44px;height:44px;min-height:44px}
body #page-entry .ehead-sub .saved-badge,body #page-entry .lc-head .ehead-sub .saved-badge{margin:0}

/* V33.1.10 (owner, 2026-11-19) — the setup row on a phone: every button is an icon only (names in aria-label / title), four equal
   columns on ONE row — Timers (grey clock = off, accent clock = on, accent stopwatch with a spark = autofill), Autofill Weight &
   Reps, Autofill source, Set details. Desktop keeps icon + text. */
@media (max-width:560px){
  body #page-training #trOpts .tr-af-txt{display:none}
  body #page-training #trOpts{grid-template-columns:repeat(4,minmax(0,1fr))}
  body #page-training #trOpts>button{min-height:48px;padding:10px 0;justify-content:center}
}
/* the Set times line under an exercise's sets (Timers → Autofill) */
.lay-times{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 2px 0;font-size:12px;color:var(--muted)}
.lay-times .ic{width:14px;height:14px;flex:0 0 14px}

/* V33.1.11 (owner, 2026-11-21) — an exercise with every set ticked: its title (and the number bubble in front of it) turn green
   when its card is collapsed (Start List / Compact, Log a Session) and in the Exercise List. No tick. --green is the palette- and
   mode-aware green (lighter on dark themes, darker on light ones). Screen readers get "<name>, all sets done" as the button's name. */
.lay-card.folded.lay-done .lay-name,.exl-row.done .exl-name,.exercise-card.collapsed.ex-all-done .pick-field .ex-title-text{color:var(--green)}
.lay-card.folded.lay-done .exercise-number,.exercise-card.collapsed.ex-all-done .exercise-number{color:var(--green);background:color-mix(in srgb,var(--green) 20%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--green) 55%,transparent)}

/* V33.1.11 (owner, 2026-11-21) — the status lines are banners: "Loaded N exercises from …" (Start a Session setup) and "Draft saved
   to your account · time" (Start a Session and Log a Session): 15px bold, an icon, a tinted background and border. Green when it
   went well, muted while saving, orange when offline / failed / changed elsewhere (their buttons stay). */
body .status-banner,body .acct-save:not([hidden]){display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:12px;font-size:15px;font-weight:700;line-height:1.3;
  color:var(--green);background:color-mix(in srgb,var(--green) 14%,transparent);border:1px solid color-mix(in srgb,var(--green) 40%,transparent)}
body .status-banner{width:100%;box-sizing:border-box;margin:2px 0;grid-column:1/-1;flex:1 1 100%}   /* the setup buttons sit in a 2-column grid: the banner takes the whole row */
/* appear with a short fade; leave by fading and folding away (class .out is added by the script after the banner's time is up) */
@keyframes bannerIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
body .status-banner,body .acct-save:not([hidden]){animation:bannerIn .25s ease;max-height:240px;overflow:hidden;
  transition:opacity .3s ease,max-height .3s ease,margin .3s ease,padding .3s ease,border-width .3s ease}
body .status-banner.out,body .acct-save.out{opacity:0;max-height:0;margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;border-width:0}
@media (prefers-reduced-motion:reduce){body .status-banner,body .acct-save:not([hidden]){animation:none;transition:none}}
body .status-banner .ic,body .acct-save .ic{width:20px;height:20px;flex:0 0 20px}
body .status-banner.neutral,body .acct-save:not([hidden]):not([data-state]),body .acct-save[data-state=""],body .acct-save[data-state=saving]{
  color:var(--muted);background:color-mix(in srgb,var(--muted) 10%,transparent);border-color:color-mix(in srgb,var(--muted) 32%,transparent)}
body .acct-save[data-state=offline],body .acct-save[data-state=error],body .acct-save[data-state=conflict],body .acct-save[data-state=gone]{
  color:var(--peach);background:color-mix(in srgb,var(--peach) 14%,transparent);border-color:color-mix(in srgb,var(--peach) 42%,transparent)}
body .acct-save[data-state=saved]{color:var(--green)}

/* owner 2026-11-22: text kept for screen readers and tests while the pop-up shows it */
.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* W2 (owner 2026-11-22) — the Training status banner (replaces the Start a Session / Log a Session buttons). */
.train-banner{ margin:10px max(14px,calc((100% - 1200px)/2 + 32px)) 4px; padding:14px 16px; border:1px solid var(--border-subtle,var(--border)); border-radius:14px; background:var(--card,var(--surface)); display:flex; flex-direction:column; gap:6px; }
.train-banner[hidden]{ display:none; }
/* owner 2026-11-22: with something to start or save, the banner is one frozen full-width button with no card around it (like the
   sticky .log-subnav and the runner head); it slides up off the screen while the Save & actions drawer is open. */
.train-banner.act{ position:sticky; top:0; z-index:90; margin:0; border:0; border-radius:0; padding:8px max(14px,calc((100% - 1200px)/2 + 32px));
  background:var(--bg); background:color-mix(in srgb,var(--bg) 82%,transparent); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  transition:transform var(--dur-med,.22s) var(--ease,ease), opacity var(--dur-med,.22s) var(--ease,ease); }
.train-banner.act .tb-go{ margin-top:0; }
.train-banner.act.slide-off{ transform:translateY(-110%); opacity:0; pointer-events:none; }
.train-banner.live{ border-color:var(--green); }
.train-banner .tb-t{ font-weight:800; font-size:16px; }
.train-banner .tb-s{ color:var(--muted); font-size:14px; }
.train-banner .tb-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--green); margin-right:7px; }
.train-banner .tb-go{ min-height:48px; width:100%; font-size:16px; font-weight:800; margin-top:4px; display:flex; align-items:center; justify-content:center; gap:8px; }
.train-banner .tb-link{ background:none; border:0; color:var(--accent); font-weight:700; font-size:15px; min-height:44px; cursor:pointer; text-align:center; }

.train-banner .tb-past{ display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.train-banner .tb-inline{ min-height:36px; padding:0 4px; font-size:14px; }

/* Owner 2026-11-21 (D-45, as React D-27b): Start a Session's setup card is compact. The picture and its badges form one
   column (the badges under the picture, across the card), the sets stepper sits under the name, and the footer row is gone. */
body #page-training .tp-card .tp-top{display:grid;grid-template-columns:auto auto minmax(0,1fr);column-gap:10px;row-gap:6px;align-items:start}
body #page-training .tp-card .tp-top>.tp-lead{grid-column:1;grid-row:1}
body #page-training .tp-card .tp-piccol{display:contents}
body #page-training .tp-card .tp-piccol>.tp-pic{grid-column:2;grid-row:1}
body #page-training .tp-card .tp-top>.tp-main{grid-column:3;grid-row:1}
body #page-training .tp-card .tp-piccol>.tp-badges{grid-column:2/4;grid-row:2}
body #page-training .tp-card .tp-badges:empty{display:none}
body #page-training .tp-card .tp-main .tp-foot{padding-top:0;border-top:0;margin-top:2px}
