/* src/client/static/edit.css — the EDIT MODE (owner-approved pictures, 19 Oct 2026): the one editor (the phone's sheet, the
 * website's list edited in place), its Swap sheet, the exercises card's head and end stretches, the keep / swap line, the
 * Tomorrow page and the workout's Edit. Tokens only (both themes, every palette); logical sides (right to left). */

/* ── Today's exercises card: its head with Edit, his marks, the end stretches by name, the line with Keep / Swap ── */
.plan-rows-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px;min-height:48px}
.plan-rows-head h2{margin:0;flex:1 1 170px;min-width:0}
.edit-open{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:var(--r-pill,22px);white-space:nowrap}
.plan-mark{margin-inline-start:6px;font:700 12.5px/1.2 var(--lawha-font);color:var(--lawha-accent)}
.lawha-theme .plan-rows .plan-list li:has(>.plan-quiet){grid-template-areas:"pic name x" "pic detail x" "warn warn warn"}
.lawha-theme .today-mid .plan-rows .plan-list li:has(>.plan-quiet){grid-template-areas:"pic name detail x" "warn warn warn warn"}
/* a line on an exercise HE chose (22 Oct 2026): quiet, never a box or a nag; a Swap link only for a sore joint or missing equipment */
.plan-quiet{grid-area:warn;display:flex;flex-wrap:wrap;align-items:center;gap:0 8px;margin:2px 0 0;font-size:var(--t-small,13.5px);color:var(--lawha-muted)}
.plan-quiet .linkish{min-height:44px;padding:0 4px;font-size:var(--t-small,13.5px)}
.lawha-theme .plan-rows .plan-list .plan-why{grid-column:2/-1}
.plan-stretches{margin:8px 0 4px;padding-top:6px;border-top:1px solid var(--lawha-line)}
.plan-sub{display:flex;justify-content:space-between;gap:10px;margin:6px 0;font:600 var(--t-small,13.5px)/1.3 var(--lawha-font);color:var(--lawha-muted)}
.plan-stretch-list{list-style:none;margin:0;padding:0}
.plan-stretch-list li{display:grid;gap:1px;padding:7px 0;border-top:1px solid var(--lawha-line)}
.plan-stretch-list li:first-child{border-top:0}
.lawha-theme .plan-rows .plan-stretch-list :is(.plan-name,.plan-detail){grid-area:auto}
.plan-stretch-list .plan-name{font:500 var(--t-body,15px)/1.3 var(--lawha-font)}
.plan-stretch-list .plan-detail{font-size:var(--t-small,13.5px);color:var(--lawha-muted)}
.chip.chip-mine{background:var(--lawha-sage);color:var(--lawha-ink);font-weight:600}
.chip.chip-mine .ui-glyph{margin-inline-end:4px}
.ed-reset{margin:10px auto 2px;display:block}

/* ── the editor's rows (the phone's sheet and the website's list) ── */
.edit-sheet{gap:8px}
@media (max-width:899px){.lawha-theme .flex-sheet.edit-sheet{max-height:92vh}.lawha-theme .flex-sheet.swap-sheet{z-index:27;max-height:86vh}}
.ed-note{margin:0}
.lawha-theme .flex-sheet.is-again{animation:none}
.edit-sheet h2:focus,.swap-sheet h2:focus,.edit-card h2:focus{outline:none}
.ed-body{display:grid;gap:8px}
.ed-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.ed-row{display:grid;grid-template-columns:22px 44px minmax(0,1fr) auto;grid-template-areas:"num thumb words arrows" ". . tools tools";gap:6px 10px;align-items:center;
  padding:10px 12px;border-radius:16px;background:var(--lawha-surface);border:1px solid var(--lawha-line)}
.ed-row.is-marked{border-color:var(--lawha-accent)}
.ed-num{grid-area:num;font:600 var(--t-small,13.5px)/1 var(--lawha-font);color:var(--lawha-muted);text-align:center}
.ed-thumb{grid-area:thumb;width:44px;height:44px;border-radius:12px;object-fit:cover;background:var(--lawha-sage)}
.ed-glyph,.ed-done{display:grid;place-items:center;color:var(--lawha-accent)}
.ed-done{background:var(--lawha-accent);color:var(--lawha-surface)}
.ed-words{grid-area:words;display:grid;gap:2px;min-width:0}
.ed-name{font:600 var(--t-body,15px)/1.3 var(--lawha-font);overflow-wrap:break-word}
.ed-detail{font-size:var(--t-small,13.5px);color:var(--lawha-muted);overflow-wrap:break-word}
.ed-mark{color:var(--lawha-accent)}
.ed-arrows{grid-area:arrows;display:flex;gap:6px}
.ed-arrow{display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--lawha-line);background:var(--kgym-raised,var(--lawha-surface));color:var(--lawha-ink)}
.ed-arrow:disabled{opacity:.38}
.ed-tools{grid-area:tools;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.ed-swap{display:inline-flex;align-items:center;gap:6px;min-height:44px}
.ed-remove{min-height:44px;min-width:44px;padding:0 6px;border:0;background:transparent;color:var(--edit-remove);font:600 var(--t-small,13.5px)/1 var(--lawha-font)}
.ed-remove:disabled{opacity:.4}
.ed-locked{grid-area:arrows;display:inline-flex;align-items:center;gap:4px;font-size:var(--t-small,13.5px);color:var(--lawha-muted);white-space:nowrap}
.ed-row.is-locked{grid-template-areas:"num thumb words arrows";background:transparent}
.ed-grip{grid-area:grip;cursor:grab;color:var(--lawha-muted);font-size:18px;line-height:1;text-align:center;user-select:none}
.ed-grip.is-off{cursor:default}
.ed-add{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;width:100%;border:1.5px dashed var(--lawha-line);border-radius:16px;background:transparent;color:var(--lawha-ink);font:600 var(--t-body,15px)/1 var(--lawha-font)}
.ed-stretches{display:grid;gap:4px}
.ed-sub{display:flex;justify-content:space-between;margin:6px 2px 0;font:600 var(--t-small,13.5px)/1.3 var(--lawha-font);color:var(--lawha-muted)}
.ed-stretch-list{list-style:none;margin:0;padding:0 12px;border-radius:16px;background:var(--lawha-surface);border:1px solid var(--lawha-line)}
.ed-stretch{display:grid;grid-template-columns:36px minmax(0,1fr) auto;grid-template-areas:"thumb words swap";gap:10px;align-items:center;min-height:56px;padding:6px 0;border-top:1px solid var(--lawha-line)}
.ed-stretch:first-child{border-top:0}
.ed-stretch .ed-thumb{width:36px;height:36px}
/* walk 12 H1: the picture, the name and Swap each in its own named cell (the row's children carry grid-area names) */
.ed-stretch .ed-swap{grid-area:swap}
.ed-status{display:flex;align-items:center;gap:6px;margin:0;min-height:20px;font-size:var(--t-small,13.5px);color:var(--lawha-accent)}
.ed-status:empty{min-height:0}
.ed-hint{margin:0}
.ed-foot{position:sticky;bottom:calc(-24px - env(safe-area-inset-bottom));display:grid;gap:4px;padding:10px 0 6px;background:var(--kgym-raised,var(--lawha-surface))}
/* lane MOVES-SWAP (the owner, 31 Oct 2026: "Don't use the links type of buttons"): a soft button, never an underlined link */
.linkish{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:var(--kgym-sunk, var(--lawha-sage));color:var(--lawha-ink);text-decoration:none;font:500 var(--t-body,15px)/1.2 var(--lawha-font)}
.round-x{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--lawha-sage);color:var(--lawha-ink)}

/* the website: the list edited in place — the ⠿ grip, ↑ ↓, Swap and × on each row; a line where a dragged row lands */
.edit-card{display:grid;gap:8px;padding:16px}
.ed-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ed-head h2{margin:0}
.edit-card .ed-row{grid-template-columns:16px 18px 40px minmax(0,1fr);grid-template-areas:"grip num thumb words";padding:8px 10px}
/* the second line: ↑ ↓ then Swap and × — one line under the name (two siblings sharing the cell, the tools after the arrows) */
.edit-card .ed-arrows{grid-area:auto;grid-row:2;grid-column:3 / -1;justify-self:start}
/* #24 (release 15 enhanced): Swap and × sit at the row's END, never floating in the middle of it */
.edit-card .ed-tools{grid-area:auto;grid-row:2;grid-column:3 / -1;justify-self:end}
.edit-card .ed-row.is-locked .ed-locked{grid-area:auto;grid-row:2;grid-column:3 / -1;justify-self:start}
.edit-card .ed-thumb{width:40px;height:40px}
.edit-card .ed-tools{justify-content:flex-end}
.edit-card .ed-remove{width:44px;border-radius:50%;border:1px solid var(--lawha-line)}
.ed-row.is-dragging{opacity:.5}
.ed-row.is-drop-before{box-shadow:0 -3px 0 0 var(--lawha-accent)}
.ed-row.is-drop-after{box-shadow:0 3px 0 0 var(--lawha-accent)}
/* walk 12 H3: the website's workout editor sits in the wide middle column; the cards, the warm-up step and the end steps make
   way while it is open (the page scrolls to + Add and the stretches as usual) */
.workout-edit-mid{display:grid;gap:8px;scroll-margin-top:100px}
.workout-edit-mid .edit-card{margin:0}
.screen-today:has(>.workout-edit-mid)>:is(.exercise-card,.routine-now,.routine-end,.skip-question){display:none}

/* ── the Swap sheet: the coach's 3 picks, the search, a stretch's choices (greyed ones say why) ── */
.swap-sheet{gap:10px}
.ed-picks-box{display:grid;gap:4px;padding:12px;border-radius:16px;background:var(--lawha-sage)}
.ed-picks-head{display:flex;align-items:center;gap:10px;margin:0}
.ed-picks-head>span:last-child{display:grid;gap:1px}
.ed-spark{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--lawha-accent);color:var(--lawha-surface)}
.ed-picks{list-style:none;margin:0;padding:0}
.ed-picks-box .ed-detail{color:var(--lawha-ink)}
.ed-pick{display:grid;grid-template-columns:44px minmax(0,1fr) 48px;gap:10px;align-items:center;min-height:60px;padding:6px 0;border-top:1px solid var(--lawha-line)}
.round-go{display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:var(--lawha-accent);color:var(--lawha-surface)}
.ed-search{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:0 16px;border:1px solid var(--lawha-line);border-radius:26px;background:var(--lawha-surface);color:var(--lawha-muted);font:500 var(--t-body,15px)/1 var(--lawha-font)}
.ed-greyed{padding:0 12px;border-radius:16px;border:1px solid var(--lawha-line)}
.ed-pick.is-greyed{grid-template-columns:44px minmax(0,1fr)}
.ed-pick.is-greyed .ed-name{color:var(--lawha-muted)}
.ed-why{font-size:var(--t-small,13.5px);color:var(--edit-warn-ink)}
.ed-none{display:flex;gap:8px;align-items:flex-start;margin:4px 0 0;font-size:var(--t-small,13.5px)}

/* ── Tomorrow's page and the Tomorrow row's "See and edit"; the workout's Edit ── */
.ah.has-see{min-height:60px}
/* walk 12 L5: the website's narrow left column — the row's "Open" goes under its words, so the title keeps its width */
@media (min-width:900px){.flex-ahead .ah.has-see{flex-wrap:wrap;row-gap:4px;padding:6px 0}.flex-ahead .ah.has-see .ah-t{flex:1 1 120px}.flex-ahead .ah.has-see .ah-see{margin-inline-start:56px}}
.ah-see{flex:none;display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 12px;border-radius:var(--r-pill,22px);white-space:nowrap}
.tomorrow-back{display:inline-flex;align-items:center;gap:6px;margin:0 0 8px;text-decoration:none}
.tomorrow-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px}
.tomorrow-note p{margin:0}
.tomorrow-saved{display:flex;align-items:center;gap:6px;color:var(--lawha-accent)}
.weights-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 4px;color:var(--lawha-muted);font:600 var(--t-small,13.5px)/1.3 var(--lawha-font)}
.workout-index-card .card-line .edit-open{margin-inline-start:auto}

/* the warning's colours (amber), and the Remove word: both themes */
.lawha-theme{--edit-warn-bg:#fbefd9;--edit-warn-line:#dcae5c;--edit-warn-ink:#8a5200;--edit-remove:#a63a24}
[data-theme='dark'] .lawha-theme{--edit-warn-bg:#3a3020;--edit-warn-line:#8b6b2e;--edit-warn-ink:#f0c27a;--edit-remove:#f29b85}

/* ── RELEASE 15 ENHANCED: the ONE add / swap sheet (src/client/views/pick-sheet.ts; approved picture 4, #9 #20 #21 #24 #26).
 *  Every row one layout: ▶ video · name and effect · ＋ at the end. Names wrap to two lines and are never cut (no ellipsis, no
 *  nowrap); no icon in the middle of a row. ── */
.pick-sheet{gap:10px}
.pick-sheet h2:focus{outline:none}
.pk-search-box{display:flex;align-items:center;gap:10px;min-height:52px;padding:0 16px;border:1px solid var(--lawha-line);border-radius:26px;background:var(--lawha-surface);color:var(--lawha-muted)}
.pk-search{flex:1 1 auto;min-width:0;min-height:48px;border:0;background:transparent;color:var(--lawha-ink);font:500 var(--t-body,15px)/1.2 var(--lawha-font)}
.pk-search:focus{outline:none}
.pk-search-box:focus-within{border-color:var(--lawha-accent)}
.pick-sheet .pk-other{width:100%;min-height:48px;margin-top:8px;justify-content:center}
.pk-status{margin:0;font-size:var(--t-small,13.5px);color:var(--edit-warn-ink)}
.pk-status:empty{display:none}
.pk-body{display:grid;gap:10px}
.pk-label{margin:4px 2px 0;font:700 12px/1.3 var(--lawha-font);letter-spacing:.06em;text-transform:uppercase;color:var(--lawha-muted)}
.pk-section{display:grid;gap:2px;padding:10px 12px;border-radius:16px;background:var(--lawha-surface);border:1px solid var(--lawha-line)}
.pk-head{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px}
.pk-pill{flex:none;padding:3px 10px;border-radius:var(--r-pill,22px);background:var(--edit-warn-bg);color:var(--edit-warn-ink);font:600 12.5px/1.3 var(--lawha-font)}
.pk-list{list-style:none;margin:0;padding:0}
.pk-row{display:grid;grid-template-columns:46px minmax(0,1fr) 48px;align-items:center;gap:10px;min-height:60px;padding:6px 0;border-top:1px solid var(--lawha-line)}
.pk-row:first-child{border-top:0}
.pk-video{display:grid;place-items:center;width:46px;height:46px;border-radius:12px;background:var(--lawha-sage);color:var(--lawha-ink);text-decoration:none}
.pk-video.is-off{opacity:.38}
.pk-words{display:grid;gap:2px;min-width:0}
.pk-name{font:600 var(--t-body,15px)/1.3 var(--lawha-font);white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip}
/* lane MOVES-SWAP: the swapped move's muscles under the sheet's title */
.pk-works{margin:0 2px;font:600 14px/1.35 var(--lawha-font);color:var(--lawha-ink)}
.pk-effect{font-size:var(--t-small,13.5px);color:var(--lawha-muted);white-space:normal;overflow-wrap:anywhere}
.pk-add{display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:var(--lawha-accent);color:var(--lawha-surface);justify-self:end}
/* RELEASE 16x (the owner's bug, 2 Nov 2026): "Swap which exercise?" (src/client/r13/live/swap-which.ts) — the same row layout, the
 * whole row ONE button (number · name and line · ⇄); the number sits where the sheet's ▶ sits */
.swap-which{gap:10px}
.swap-which h2:focus{outline:none}
.pk-row.is-which{display:block;padding:0}
.pk-which{display:grid;grid-template-columns:46px minmax(0,1fr) 48px;align-items:center;gap:10px;width:100%;min-height:60px;margin:0;padding:6px 0;border:0;background:none;color:var(--lawha-ink);font:inherit;text-align:start;cursor:pointer;border-radius:12px}
.pk-which:focus-visible{outline:2px solid var(--lawha-accent);outline-offset:2px}
.pk-num{font:700 var(--t-body,15px)/1 var(--lawha-font)}
.pk-foot{position:sticky;bottom:calc(-24px - env(safe-area-inset-bottom));margin:0;padding:10px 0 6px;background:var(--kgym-raised,var(--lawha-surface));font:600 var(--t-small,13.5px)/1.3 var(--lawha-font);color:var(--lawha-muted)}
.pk-none{margin:0;font-size:var(--t-small,13.5px);color:var(--lawha-muted)}
.pk-typed-box{display:grid;gap:8px}
.pk-typed{list-style:none;margin:0;padding:0;display:grid;gap:6px}
/* RELEASE 16 LIVE FIX 3: every column headed ("# · lb · Reps", "# · Reps", "# · Seconds") the way the live set table heads its
 * columns, and the boxes in the theme's colours like the live table's (r13-workout.css .r15e-box) — the sheet sits outside
 * #tab-content, so without this an iPhone in dark mode drew the browser's own black box */
.pk-typed-head,.pk-typed-row{display:grid;grid-template-columns:24px minmax(0,1fr) minmax(64px,96px) minmax(56px,84px);align-items:center;gap:8px}
.pk-typed-box.no-weight .pk-typed-head,.pk-typed-box.no-weight .pk-typed-row{grid-template-columns:24px minmax(0,1fr) minmax(80px,120px)}
.pk-typed-head{margin:2px 0 -2px;font:600 12px/1.2 var(--lawha-font);color:var(--lawha-muted)}
.pk-typed-head span{text-align:center}
.pk-typed-head .pk-last-head{text-align:start}
.pk-last{display:flex;align-items:center;min-width:0;min-height:44px;margin:0;padding:0;border:0;background:none;font:500 var(--t-small,13.5px)/1.25 var(--lawha-font);color:var(--lawha-muted);text-align:start;overflow-wrap:anywhere}
.pk-last.is-fill{color:var(--lawha-accent);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.pk-typed-row .set-box::placeholder{color:var(--lawha-muted);opacity:.7;font-weight:500}
.pk-typed-box .pk-unit{justify-self:start;margin:0}
.pk-typed-box .pk-unit button{min-height:44px;min-width:52px}
.pk-typed-kind{margin:0;font-size:var(--t-small,13.5px);color:var(--lawha-muted)}
.pk-typed-row .set-box{box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:4px 8px;border:1.5px solid var(--r13-line,var(--lawha-line));border-radius:var(--r-input,12px);background:var(--r13-paper,var(--lawha-paper));color:var(--r13-ink,var(--lawha-ink));font:600 var(--t-input,16px)/1.2 var(--lawha-font);text-align:center;font-variant-numeric:tabular-nums;-webkit-appearance:none;appearance:none}
.pk-typed-row .set-box:focus-visible{border-color:var(--lawha-focus);outline:3px solid color-mix(in srgb,var(--lawha-focus) 25%,transparent);outline-offset:0}
.pk-typed-row .set-box[aria-invalid="true"]{border-color:var(--edit-warn-line)}
.pk-no{font:600 var(--t-small,13.5px)/1 var(--lawha-font);color:var(--lawha-muted);text-align:center}

/* ── RELEASE 15 ENHANCED: a finished workout edited from History (src/client/r13/history/finished-editor.ts; picture 5, #19 #20).
 *  The phone: one row per exercise (name, its sets, Edit at the end), the open one shows kg / lb and its sets as boxes. The
 *  website: its own layout in the day card — the exercises side by side in two columns, every one open. No ⠿ (a finished
 *  workout's order moves with ↑ ↓ only — release 16). ── */
.fx-editor{display:grid;gap:10px}
.fx-rows{display:grid;gap:8px}
.fx-row{display:grid;gap:8px;padding:10px 12px;border-radius:16px;background:var(--lawha-surface);border:1px solid var(--lawha-line)}
.fx-row.is-open{border-color:var(--lawha-accent)}
.fx-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:48px}
.fx-words{display:grid;gap:2px;min-width:0}
/* lane MOVES-SWAP, Task C: a finished workout's cardio minutes */
.fx-cardio-min{display:flex;align-items:center;gap:10px;margin:8px 0}
.fx-cardio-min .fx-cardio-box{width:84px;text-align:center}
.fx-name{font:600 var(--t-body,15px)/1.3 var(--lawha-font);white-space:normal;overflow-wrap:anywhere}
.fx-sets,.fx-effort{font-size:var(--t-small,13.5px);color:var(--lawha-muted);overflow-wrap:anywhere}
.fx-edit{min-height:44px;min-width:64px;justify-self:end}
/* RELEASE 16: ↑ ↓ on a finished workout's rows (the order is the plan's; only a move is accepted by the server) */
.fx-head.has-move{grid-template-columns:minmax(0,1fr) auto auto}
.fx-head:not(:has(.fx-edit)).has-move{grid-template-columns:minmax(0,1fr) auto}
.fx-move{display:inline-flex;gap:4px}
.fx-move .btn{min-width:44px;min-height:44px}
.fx-panel{display:grid;gap:8px}
.fx-unit{display:inline-flex;justify-self:start;border:1px solid var(--lawha-line);border-radius:var(--r-pill,22px);overflow:hidden}
.fx-unit-btn{min-height:40px;min-width:52px;padding:0 12px;border:0;background:transparent;color:var(--lawha-ink);font:600 var(--t-small,13.5px)/1 var(--lawha-font)}
.fx-unit-btn.is-on{background:var(--lawha-accent);color:var(--lawha-surface)}
.fx-table{display:grid;gap:6px}
.fx-tr{display:grid;grid-template-columns:24px minmax(0,1fr) minmax(0,1fr) auto;align-items:center;gap:8px}
.fx-tr:not(:has(input[name="kg"])):not(.fx-th){grid-template-columns:24px minmax(0,1fr) auto}
.fx-th{font:600 12px/1.2 var(--lawha-font);color:var(--lawha-muted);text-transform:uppercase;letter-spacing:.04em}
.fx-no{font:600 var(--t-small,13.5px)/1 var(--lawha-font);color:var(--lawha-muted);text-align:center}
.fx-tr .set-box{width:100%;min-height:44px}
/* release 16 LIVEFIX2 (bug 10): the set "Check this set" opened, marked */
.fx-tr.is-checked{outline:2px solid var(--lawha-accent,currentColor);outline-offset:3px;border-radius:10px}
.fx-del{min-height:44px}
.fx-more{justify-self:start;min-height:44px}
.fx-foot{display:flex;flex-wrap:wrap;gap:8px}
.fx-foot .btn{min-height:44px}
.fx-line{margin:0}
.fx-editor.is-web .fx-rows{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
/* release 16 LIVEFIX2 (the rehearsal's 4a): a set typed in the other unit shows its unit beside its box (40 kg on an lb exercise) */
.fx-kgcell.has-unit{display:flex;align-items:center;gap:4px}
.fx-unit-tag{flex:none;font:600 var(--t-small,13px)/1 var(--lawha-font);color:var(--lawha-muted)}
