/* PortThai — "Bento" theme. Warm grey page, big rounded colour tiles, floating dark pill dock, Space Grotesk.
   Every rule is scoped to body.theme-bento so Classic (app.css) and Focus Flow (theme-focus.css) are untouched.
   Reference: [data-design=bn] in designs2.html (lab/build2.js). The main app's markup is re-flowed into tiles
   with CSS grid; wrappers that must not become tiles are display:contents, and a few tiles that span several
   elements are painted by grid-placed pseudo-elements. */
html:has(body.theme-bento){background:#ecebe6}
body.theme-bento{
  --bg:#ecebe6; --bg2:#f3f3ef; --panel:#fff; --panel2:#f3f3ef; --line:rgba(21,21,21,.1);
  --txt:#151515; --muted:#66655f; --red:#151515; --red2:#151515; --gold:#151515; --blue:#1d6fd6; --green:#2f8a3e;
  --ink:#151515; --lime:#d7f25c; --lilac:#c9b8ff; --peach:#ffb38a; --sky:#9fd8ff; --soft:#f3f3ef;
  --head:"Space Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif; --body:"Space Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --r:28px; --dockh:0px;
  background:#ecebe6; color:#151515; font-family:var(--body);
  padding-bottom:calc(24px + env(safe-area-inset-bottom));
}
body.theme-bento .muted{color:var(--muted)}
body.theme-bento em.red{color:#ffb38a} body.theme-bento em.blue{color:#9fd8ff}

/* ---------- readable dropdowns: dark text on light, closed control AND the open list ---------- */
body.theme-bento select{color-scheme:light}
body.theme-bento select,body.theme-bento .block select,body.theme-bento .block.on select,body.theme-bento .theme-select{
  -webkit-appearance:auto;appearance:auto;background:#fff;color:#151515;-webkit-text-fill-color:#151515;opacity:1;
  border:1px solid rgba(21,21,21,.18);border-radius:10px;padding:5px 8px;font:600 13px var(--body);max-width:100%;cursor:pointer}
body.theme-bento select option,body.theme-bento .block.on select option{background:#fff;color:#151515;-webkit-text-fill-color:#151515}

/* ---------- floating pill dock: vertical on the left (desktop), bottom bar (phone) ---------- */
body.theme-bento #tabbar{position:fixed;left:14px;right:auto;top:50%;bottom:auto;transform:translateY(-50%);z-index:30;display:flex;flex-direction:column;gap:6px;
  background:#151515;padding:8px;border:0;border-radius:26px;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 12px 32px rgba(21,21,21,.22)}
body.theme-bento #tabbar button{flex:0 0 auto;background:transparent;color:#aaa;border:0;border-radius:18px;padding:11px 12px;font:700 0/1 var(--body);letter-spacing:.2px}
body.theme-bento #tabbar button::after{font-size:12px}
body.theme-bento #tabbar [data-go=home]::after{content:"Home"}
body.theme-bento #tabbar [data-go=pads]::after{content:"Pads"}
body.theme-bento #tabbar [data-go=spar]::after{content:"Spar"}
body.theme-bento #tabbar [data-go=library]::after{content:"Moves"}
body.theme-bento #tabbar [data-go=settings]::after{content:"Setup"}
body.theme-bento #tabbar button.on{background:#d7f25c;color:#151515}
body.theme-bento #tabbar.hidden{display:none}

/* ---------- screens are tile grids ---------- */
body.theme-bento .screen{max-width:1200px;margin:0 auto;padding:16px 16px 24px 110px}
body.theme-bento .screen.active{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-content:start;grid-auto-flow:row dense;animation:bn-in .22s ease}
@keyframes bn-in{from{opacity:0}to{opacity:1}}
body.theme-bento :where(.screen > *){grid-column:1/-1;min-width:0;margin:0}

/* tile base */
body.theme-bento .panel,body.theme-bento .card,body.theme-bento .brand,body.theme-bento header.page,body.theme-bento .stage{
  background:#fff;color:#151515;border:0;border-radius:var(--r);padding:18px;margin:0;position:relative;min-width:0;box-shadow:none}
body.theme-bento .panel h2,body.theme-bento .card h4,body.theme-bento .panel h3,body.theme-bento #padLadder::before{
  display:block;margin:0 0 10px;font:700 12px var(--body);letter-spacing:1px;text-transform:uppercase;color:inherit;opacity:.6}
body.theme-bento .panel h2 small{display:block;margin-top:3px;font:500 12px var(--body);letter-spacing:0;text-transform:none;color:inherit}
/* dark hero tiles */
body.theme-bento .brand,body.theme-bento header.page{background:#151515;color:#f2f2f2}
body.theme-bento .wordmark{font:700 52px/.9 var(--body);letter-spacing:-2px}
body.theme-bento .wordmark span{color:#d7f25c}
body.theme-bento .brand p,body.theme-bento header.page p{margin:10px 0 0;color:#f2f2f2;opacity:.7;font-size:16px;line-height:1.35;max-width:none}
body.theme-bento .status{font-size:12px;color:#d7f25c;margin-top:8px;min-height:0}
body.theme-bento header.page h1{margin:0;font:700 44px/.95 var(--body);letter-spacing:-2px}
/* colour tiles */
body.theme-bento .p-numbers,body.theme-bento .p-music,body.theme-bento #libHolder{background:#c9b8ff}
body.theme-bento .p-crew,body.theme-bento .card:has(#libForm){background:#ffb38a}
body.theme-bento .p-theme,body.theme-bento .plan-foot,body.theme-bento .sticky-cta{background:#d7f25c}

/* ---------- buttons ---------- */
body.theme-bento .btn,body.theme-bento .btn.big,body.theme-bento .btn.blue,body.theme-bento .btn.ghost,body.theme-bento .btn.small{
  background:#151515;color:#fff;border:0;border-radius:999px;padding:14px 22px;font:700 15px var(--body);box-shadow:none}
body.theme-bento .btn.small{padding:10px 16px;font-size:14px}
body.theme-bento .btn:disabled{opacity:.3}

/* ---------- home: hero + tonight + lime go + quick tiles + numbers + lists ---------- */
body.theme-bento #home .brand{grid-column:1/3;grid-row:1;padding:22px}
body.theme-bento #home .p-tonight{display:contents}
body.theme-bento #home .p-tonight::before{content:"";grid-column:3/5;grid-row:1/3;background:#fff;border-radius:var(--r)}
body.theme-bento #home .p-tonight > h2{grid-column:3/5;grid-row:1;align-self:start;margin:0;padding:18px 18px 0}
body.theme-bento #planBlocks{grid-column:3/5;grid-row:1/3;padding:44px 18px 18px;min-width:0}
body.theme-bento #home .plan-foot{grid-column:1/3;grid-row:2;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;gap:14px;margin:0;padding:20px;border-radius:var(--r)}
body.theme-bento #planTime{font:700 44px/1 var(--body);letter-spacing:-2px;color:#151515}
body.theme-bento #startPlan{align-self:flex-end;font-size:0}
body.theme-bento #startPlan::after{content:"Start →";font-size:16px}
/* session blocks */
body.theme-bento .blocks{display:grid;gap:8px}
body.theme-bento .block{display:flex;align-items:center;gap:12px;padding:12px;border:0;border-radius:18px;background:#f3f3ef;color:#151515;opacity:.55}
body.theme-bento .block.on{opacity:1;background:#151515;color:#fff;border:0}
body.theme-bento .block > div{min-width:0}
body.theme-bento .block .tick{width:26px;height:26px;border:0;border-radius:50%;background:#ddd;color:#151515;font-weight:700}
body.theme-bento .block.on .tick{background:#d7f25c}
body.theme-bento .block b{display:block;font-size:16px}
body.theme-bento .block small{display:block;color:#66655f;font-size:12.5px;margin-top:2px}
body.theme-bento .block.on small{color:rgba(255,255,255,.72)}
body.theme-bento .block select{margin:4px 0 0 4px}
/* quick actions: four colour tiles */
body.theme-bento .p-quick,body.theme-bento .p-quick .quick{display:contents}
body.theme-bento .p-quick > h2{display:none}
body.theme-bento .quick .btn{grid-column:span 1;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:10px;min-height:120px;
  padding:18px;border-radius:var(--r);background:#fff;color:#151515;font:700 26px/1 var(--body);text-align:left}
body.theme-bento .quick .btn span{font-size:18px;line-height:1.2}
body.theme-bento .quick [data-go=warmup]{background:#ffb38a} body.theme-bento .quick [data-go=pads]{background:#c9b8ff}
body.theme-bento .quick [data-go=spar]{background:#9fd8ff} body.theme-bento #startCooldown{background:#fff}
/* number system */
body.theme-bento .p-numbers{grid-column:span 2}
body.theme-bento .p-numbers > p{color:rgba(21,21,21,.72);font-size:13px;line-height:1.4;margin:0}
body.theme-bento .numkeys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
body.theme-bento .numkey{background:rgba(255,255,255,.5);border:0;border-radius:16px;padding:10px;text-align:left}
body.theme-bento .numkey b{display:block;font:700 28px/1 var(--body);color:#151515}
body.theme-bento .numkey span{font-size:12px;color:#151515}
/* warm-up / cool-down lists as two tiles */
body.theme-bento #home details.p-extras{grid-column:span 2;background:transparent;padding:0;border-radius:0}
body.theme-bento #home details.p-extras[open] summary{display:none}
body.theme-bento #home details.p-extras:not([open]){background:#fff;padding:18px;border-radius:var(--r)}
body.theme-bento .p-extras .two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;height:100%}
body.theme-bento .p-extras .two > div{background:#fff;border-radius:var(--r);padding:18px;min-width:0}
body.theme-bento ul.plain li{gap:8px;padding:5px 0;font-size:13px;border-bottom:1px solid rgba(21,21,21,.08)}
body.theme-bento ul.plain li span{color:inherit;opacity:.5;flex:0 0 auto}

/* ---------- pads / sparring ---------- */
body.theme-bento #pads > header.page,body.theme-bento #spar > header.page{grid-column:span 1}
body.theme-bento .seg{grid-column:span 3;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;background:#fff;border:0;border-radius:var(--r);padding:12px;margin:0}
body.theme-bento .seg button{background:#f3f3ef;color:#151515;border:0;border-radius:18px;padding:14px 8px;font:700 15px var(--body);box-shadow:none}
body.theme-bento .seg button.on{background:#151515;color:#d7f25c;box-shadow:none}
body.theme-bento #padLadder{background:#fff;border-radius:var(--r);padding:18px}
body.theme-bento #padLadder::before{content:"Pick a level"}
body.theme-bento .levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.theme-bento .level{display:grid;grid-template-columns:1fr;gap:4px;align-content:start;background:#f3f3ef;border:0;border-radius:20px;padding:14px}
body.theme-bento .level.on{background:#c9b8ff;border:0}
body.theme-bento .lv-id{font:700 12px var(--body);color:#151515;opacity:.5;min-width:0;padding:0}
body.theme-bento .lv-name{font-size:19px;font-weight:700;letter-spacing:-.5px}
body.theme-bento .lv-blurb{font-size:13px;color:#151515;opacity:.7;margin:0}
body.theme-bento .lv-drills{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
body.theme-bento .lv-drills span{background:#fff;border:0;border-radius:999px;padding:2px 8px;font:700 11px var(--body);letter-spacing:0}
body.theme-bento .p-timing,body.theme-bento .p-crew,body.theme-bento .p-rounds{grid-column:span 2}
body.theme-bento .sticky-cta{position:sticky;bottom:16px;z-index:5;display:flex;flex-direction:row;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:12px;
  padding:18px;margin:0;border:0;border-radius:var(--r);backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 8px 24px rgba(21,21,21,.12)}
body.theme-bento #pads .sticky-cta{grid-column:span 2}
body.theme-bento .sticky-cta .muted{color:#151515;font-weight:500;font-size:15px;max-width:30ch}
body.theme-bento .sticky-cta .btn{margin-left:auto}
body.theme-bento #startPads,body.theme-bento #startSpar{font-size:0}
body.theme-bento #startPads::after{content:"Start pads →";font-size:15px}
body.theme-bento #startSpar::after{content:"Start rounds →";font-size:15px}
/* scenario / rule cards */
body.theme-bento .checks,body.theme-bento .checks.grid2{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.theme-bento label.check{background:#f3f3ef;border:0;border-radius:18px;padding:12px;opacity:.55;color:#151515}
body.theme-bento label.check.on{opacity:1;background:#ffb38a;border:0}
body.theme-bento label.check input{accent-color:#151515}
body.theme-bento label.check small{color:#151515;opacity:.7}
/* sliders, rows, switches, chips, inputs */
body.theme-bento label.slider{grid-template-columns:1fr auto;gap:4px 10px;padding:8px 0;border-bottom:1px solid rgba(21,21,21,.08)}
body.theme-bento label.slider:last-child{border-bottom:0}
body.theme-bento label.slider span{font-size:14px;font-weight:500} body.theme-bento label.slider b{min-width:0;font-size:20px;font-weight:700}
body.theme-bento label.slider input{grid-column:1/-1}
body.theme-bento input[type=range]{accent-color:#151515}
body.theme-bento label.row,body.theme-bento .row{padding:10px 0;border-bottom:1px solid rgba(21,21,21,.08)}
body.theme-bento .row:last-child,body.theme-bento label.row:last-child{border-bottom:0}
body.theme-bento .row small,body.theme-bento label.row small{display:block;color:inherit;opacity:.62;font-size:12.5px}
body.theme-bento .switch{width:48px;height:28px;border-radius:14px;background:#ccc}
body.theme-bento .switch::after{width:22px;height:22px}
body.theme-bento .switch:checked{background:#151515} body.theme-bento .switch:checked::after{left:23px;background:#d7f25c}
body.theme-bento .chips{gap:6px}
body.theme-bento .chip{background:#151515;color:#d7f25c;border:0;border-radius:999px;padding:6px 8px 6px 12px;font:700 15px var(--body);letter-spacing:0}
body.theme-bento .chip button{color:#fff}
body.theme-bento .addrow{gap:6px}
body.theme-bento .addrow input{min-width:0;background:#f3f3ef;color:#151515;border:0;border-radius:999px;padding:12px 14px;font:600 16px var(--body);letter-spacing:0}
body.theme-bento .p-crew .addrow input{background:rgba(255,255,255,.6)}

/* ---------- technique ---------- */
body.theme-bento #library > header.page{grid-column:1/2;grid-row:1}
body.theme-bento #libPills{grid-column:1/2;grid-row:2/4;display:flex;flex-direction:column;flex-wrap:nowrap;gap:6px;align-content:start;background:#151515;border-radius:var(--r);padding:12px;margin:0}
body.theme-bento .pill{background:rgba(255,255,255,.08);color:#eee;border:0;border-radius:14px;padding:10px 12px;text-align:left;font:700 13.5px var(--body)}
body.theme-bento .pill b{color:#d7f25c} body.theme-bento .pill.on{background:#d7f25c;color:#151515} body.theme-bento .pill.on b{color:#151515}
body.theme-bento #library .stage{grid-column:2/4;grid-row:1/4;display:grid;align-content:start}
body.theme-bento .move-name{font:700 32px var(--body);letter-spacing:-1px}
body.theme-bento #libHand{color:inherit;opacity:.6}
body.theme-bento .move-num{font:700 80px/1 var(--body);color:#151515;opacity:.15}
body.theme-bento .figure-wrap svg{max-height:420px}
body.theme-bento #library .card{grid-column:4/5}
body.theme-bento #library .card:has(#libForm){grid-row:1/3}
body.theme-bento .card h4{margin-bottom:8px}
body.theme-bento .card ul{padding-left:18px} body.theme-bento .card li,body.theme-bento .card p{color:#151515;font-size:14px}
body.theme-bento .card.holder{background:#c9b8ff;border:0} body.theme-bento .card.holder h4{color:inherit}

/* ---------- settings ---------- */
body.theme-bento #settings > header.page{grid-column:1/-1}
body.theme-bento .p-coach{grid-column:span 2;grid-row:span 2}
body.theme-bento .p-music,body.theme-bento .p-theme{grid-column:span 2}
body.theme-bento .p-theme .row{border:0}
body.theme-bento .theme-select{flex:0 0 auto;min-width:132px;border-radius:999px;padding:10px 14px;font:700 14px var(--body)}
body.theme-bento #settings > p{padding:0 6px}

/* ---------- runner: lime timer tile, figure tile, dark call tile, cue tiles, controls tile ----------
   The wrappers dissolve (display:contents) so every piece is a grid item; #run::before paints the timer tile,
   #run::after the call tile and .run-controls::before the controls tile. Rows (row-gap 0, gaps are margins):
   1 block · 2 phase · 3 sub · 4 time (1fr: absorbs the figure's height on desktop) · 5 chips · 6 figure/corners ·
   7 reps · 8 rule · 9 spacer · 10 call · 11 resting · 12 next · 13 title · 14 cues · 15 holder · 16 controls */
body.theme-bento #run.active{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:12px;row-gap:0;max-width:1100px;padding:16px 16px 24px;
  grid-template-rows:auto auto auto 1fr auto auto auto auto 12px auto auto auto auto auto auto auto}
body.theme-bento #run .run-head,body.theme-bento #run .run-head > div:first-child,body.theme-bento #run .run-phase,body.theme-bento #run .run-body,
body.theme-bento #run .clock,body.theme-bento #run .stage-col,body.theme-bento #run .run-controls{display:contents}
body.theme-bento :where(#run > *,#run .run-head *,#run .run-phase > *,#run .stage-col > *,#run .run-controls > *,#run .clock > *){grid-column:1/-1;min-width:0;margin:0;z-index:1} /* z-index: above the pseudo-element tiles */
/* timer tile */
body.theme-bento #run::before{content:"";grid-column:1/-1;grid-row:1/6;background:#d7f25c;border-radius:var(--r);transition:background .3s}
body.theme-bento #run[data-type=rest]::before{background:#9fd8ff}
body.theme-bento #run[data-type=prep]::before,body.theme-bento #run[data-type=break]::before{background:#ffb38a}
body.theme-bento #runBlock{grid-row:1;padding:20px 96px 0 20px;font:700 12px var(--body);letter-spacing:1px;text-transform:uppercase;color:#151515;opacity:.6}
body.theme-bento #runPhase{grid-row:2;padding:4px 96px 0 20px;font:700 28px/1.1 var(--body);letter-spacing:-1px;color:#151515}
body.theme-bento #run[data-type] .run-phase>div:first-child{color:#151515}
body.theme-bento #runSub{grid-row:3;padding:4px 20px 0;font-size:14px;color:#151515;opacity:.7}
body.theme-bento #run .clock svg{grid-column:5/7;grid-row:1/3;justify-self:end;align-self:start;width:64px;height:64px;margin:16px 16px 0 0}
body.theme-bento .clock .track{stroke:rgba(21,21,21,.12);stroke-width:18}
body.theme-bento .clock .ring{stroke:#151515;stroke-width:18}
body.theme-bento #run[data-type] .clock .ring{stroke:#151515}
body.theme-bento #run .clock .time{grid-row:4;align-self:center;position:static;inset:auto;display:block;padding:8px 20px 0;
  font:700 clamp(84px,25vw,150px)/.9 var(--body);letter-spacing:-5px;color:#151515;font-variant-numeric:tabular-nums}
body.theme-bento #run.paused .clock .time{color:rgba(21,21,21,.3)}
body.theme-bento #run.paused .clock .time::after{content:"PAUSED";position:static;display:block;margin-top:8px;font:700 13px var(--body);letter-spacing:3px;color:#151515}
body.theme-bento #runChips{grid-row:5;padding:12px 20px 20px;gap:4px;min-height:0}
body.theme-bento .chips-dots i{width:18px;height:6px;border:0;border-radius:3px;background:rgba(21,21,21,.15)}
body.theme-bento .chips-dots i.done{background:#151515} body.theme-bento .chips-dots i.cur{background:#fff}
/* figure / corners / reps / rule */
body.theme-bento #runFigure,body.theme-bento #runRoles{grid-row:6;margin-top:12px}
body.theme-bento #runFigure{background:#fff;border:0;border-radius:var(--r);padding:12px}
body.theme-bento #runFigure svg{max-height:300px}
body.theme-bento .roles{gap:8px}
body.theme-bento .corner{min-height:0;border:0;border-radius:20px;padding:14px;color:#151515}
body.theme-bento .corner.red,body.theme-bento .corner.red.attacking{background:#ffb38a} body.theme-bento .corner.blue,body.theme-bento .corner.blue.attacking{background:#9fd8ff}
body.theme-bento .corner small,body.theme-bento .corner.red small,body.theme-bento .corner.blue small{font:700 11px var(--body);letter-spacing:1px;color:#151515}
body.theme-bento .corner .name{font:700 24px var(--body);letter-spacing:-.5px}
body.theme-bento .corner .role{font:700 22px/1.1 var(--body);opacity:.75}
body.theme-bento .corner .task{font-size:13px;color:#151515}
body.theme-bento .corner.attacking{outline:3px solid #151515;outline-offset:-3px}
body.theme-bento #runReps{grid-row:7;margin-top:12px;background:#fff;border-radius:var(--r);padding:14px;min-height:0}
body.theme-bento .reps b{font:700 110px/1 var(--body);letter-spacing:-4px;color:#151515} body.theme-bento .reps span{font-size:24px;color:#151515;opacity:.6}
body.theme-bento #runRule{grid-row:8;margin-top:12px;background:#fff;border:0;border-radius:var(--r);padding:18px;font:700 30px/1.1 var(--body);letter-spacing:-1px;text-align:left}
/* call tile (dark) */
body.theme-bento #run::after{content:"";grid-column:1/-1;grid-row:10/14;background:#151515;border-radius:var(--r)}
body.theme-bento #runCall{grid-row:10;padding:18px 20px 0;justify-content:flex-start;min-height:0}
body.theme-bento .call .tok{font:700 42px var(--body);letter-spacing:0;background:rgba(255,255,255,.12);border:0;border-radius:18px;padding:4px 16px;color:#b5b5b5}
body.theme-bento .call .tok.react{font-size:20px;padding:14px;color:#c9b8ff}
body.theme-bento .call .tok.lit,body.theme-bento .call .tok.react.lit{background:#d7f25c;color:#151515}
body.theme-bento #runResting{grid-row:11;padding:12px 20px 0;text-align:left;color:#f2f2f2;opacity:.75;font-size:14px}
body.theme-bento #runNext{grid-row:12;padding:18px 20px 0;text-align:left;color:#f2f2f2;opacity:.75;font-size:14px}
body.theme-bento #runTitle{grid-row:13;padding:4px 20px 18px;color:#d7f25c;font-size:13px;font-weight:700}
/* cue tiles */
body.theme-bento #runCues{grid-row:14;margin-top:12px;background:#ffb38a}
body.theme-bento #runHolder{grid-row:15;margin-top:12px;background:#c9b8ff}
/* controls tile */
body.theme-bento #run .run-controls::before{content:"";grid-column:1/-1;grid-row:16;margin-top:12px;background:#fff;border-radius:var(--r)}
body.theme-bento #pauseBtn,body.theme-bento #skipBtn,body.theme-bento #endBtn{grid-row:16;min-width:0;margin:24px 0 12px;padding:14px 8px}
body.theme-bento #pauseBtn{grid-column:1/3;margin-left:12px}
body.theme-bento #skipBtn{grid-column:3/5}
body.theme-bento #endBtn{grid-column:5/7;margin-right:12px;background:#f3f3ef;color:#151515}

body.theme-bento .toast{background:#151515;border:0;color:#fff;font-weight:700;border-radius:999px}

/* ---------- desktop runner: timer + call on the left, figure tile on the right ---------- */
@media(min-width:900px){
  body.theme-bento #run::before,body.theme-bento #run::after,body.theme-bento #runBlock,body.theme-bento #runPhase,body.theme-bento #runSub,
  body.theme-bento #run .clock .time,body.theme-bento #runChips,body.theme-bento #runCall,body.theme-bento #runResting,body.theme-bento #runNext,
  body.theme-bento #runTitle,body.theme-bento #runCues{grid-column:1/4}
  body.theme-bento #run .clock svg{grid-column:3/4}
  body.theme-bento #runFigure,body.theme-bento #runRoles{grid-column:4/7;grid-row:1/6;margin-top:0}
  body.theme-bento #runFigure{display:grid;place-items:center}
  body.theme-bento #runFigure svg{max-height:440px}
  body.theme-bento #runRoles{align-content:stretch}
  body.theme-bento #runReps,body.theme-bento #runRule{grid-column:4/7;grid-row:10/14;margin-top:0;display:grid;place-content:center}
  body.theme-bento #runHolder{grid-column:4/7;grid-row:14}
}

/* ---------- phone ---------- */
@media(max-width:760px){
  body.theme-bento{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  body.theme-bento #tabbar{top:auto;bottom:calc(12px + env(safe-area-inset-bottom));left:16px;right:16px;margin:0 auto;width:max-content;max-width:calc(100% - 32px);
    transform:none;flex-direction:row;gap:2px;padding:6px}
  body.theme-bento #tabbar button{padding:12px 11px}
  body.theme-bento .screen{padding:12px 16px 24px}
  body.theme-bento #run.active{padding:12px 16px 24px}
  body.theme-bento .screen.active{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.theme-bento #home .brand,body.theme-bento #home .plan-foot,body.theme-bento #home .p-tonight::before,body.theme-bento #home .p-tonight > h2,
  body.theme-bento #planBlocks{grid-column:1/-1}
  body.theme-bento #home .brand{grid-row:1}
  body.theme-bento #home .p-tonight::before,body.theme-bento #home .p-tonight > h2,body.theme-bento #planBlocks{grid-row:2}
  body.theme-bento #home .plan-foot{grid-row:3;flex-direction:row;align-items:flex-end}
  body.theme-bento .p-numbers,body.theme-bento #home details.p-extras,body.theme-bento #pads > header.page,body.theme-bento #spar > header.page,body.theme-bento .seg,
  body.theme-bento .p-timing,body.theme-bento .p-crew,body.theme-bento .p-rounds,body.theme-bento #pads .sticky-cta,body.theme-bento .p-coach,body.theme-bento .p-music,
  body.theme-bento .p-theme,body.theme-bento #library > header.page,body.theme-bento #libPills,body.theme-bento #library .stage,body.theme-bento #library .card{grid-column:1/-1;grid-row:auto}
  body.theme-bento #library .card:has(#libForm){grid-row:auto}
  body.theme-bento #libPills{flex-direction:row;flex-wrap:wrap}
  body.theme-bento .pill{padding:8px 11px}
  body.theme-bento .levels,body.theme-bento .checks,body.theme-bento .checks.grid2{grid-template-columns:1fr}
  body.theme-bento .sticky-cta{bottom:calc(80px + env(safe-area-inset-bottom))}
  body.theme-bento #runFigure svg{max-height:230px}
  body.theme-bento .wordmark{font-size:46px}
  body.theme-bento header.page h1{font-size:40px}
}

/* warm-up routine editor */
body.theme-bento .wu-row{background:#f3f3ef;border:0;border-radius:18px}
body.theme-bento .wu-row button{border:0;background:#fff;border-radius:999px;color:#151515}
body.theme-bento .wu-row button[data-a="del"]{background:#151515;color:#d7f25c}
body.theme-bento .wu-add select,body.theme-bento .wu-add .theme-select{flex:1 1 auto;min-width:0}
body.theme-bento #warmup .p-warmup{grid-column:1/-1}
body.theme-bento #startWarmup{font-size:0}
body.theme-bento #startWarmup::after{content:"Start warm-up →";font-size:15px}
body.theme-bento .quick [data-go=partner]{background:#ffe28a}
body.theme-bento #partner > header.page{grid-column:1/-1}
body.theme-bento #partner .p-drills{grid-column:span 3}
body.theme-bento #partner .p-pdtiming{grid-column:span 1}
body.theme-bento .nopads{background:#fff;color:#151515;margin-top:12px}
body.theme-bento .pd-tag{border-color:#151515}
@media(max-width:760px){body.theme-bento .quick > :last-child:nth-child(odd){grid-column:1/-1;min-height:84px}body.theme-bento #partner .p-drills,body.theme-bento #partner .p-pdtiming{grid-column:1/-1}}
body.theme-bento label.check small em{color:#151515;font-weight:800;font-style:normal;text-decoration:underline;text-underline-offset:2px}
/* partner duo, "up next" preview, back / restart (controls tile now spans rows 16–17) */
body.theme-bento #run.active{grid-template-rows:auto auto auto 1fr auto auto auto auto 12px auto auto auto auto auto auto auto auto}
body.theme-bento #runDuo{grid-row:6;margin-top:12px;background:#fff;border:0;border-radius:var(--r);padding:10px 8px 0}
body.theme-bento #runDuo:not(.hidden) ~ #runRoles{grid-row:7}
body.theme-bento #runPreview{grid-row:15;margin-top:12px;background:#9fd8ff;color:#151515}
body.theme-bento #runPreview h4,body.theme-bento #runPreview em,body.theme-bento #runPreview li,body.theme-bento .pv-title small{color:#151515}
body.theme-bento #runPreview .pv-stage{background:#fff;border-radius:18px;padding:8px}
body.theme-bento #run .run-controls::before{grid-row:16/18}
body.theme-bento #backBtn,body.theme-bento #restartBtn{grid-row:16;min-width:0;margin:24px 0 0;padding:14px 8px;background:#f3f3ef;color:#151515}
body.theme-bento #backBtn{grid-column:1/3;margin-left:12px} body.theme-bento #restartBtn{grid-column:3/5}
body.theme-bento #endBtn{grid-row:16;margin:24px 12px 0 0}
body.theme-bento #pauseBtn,body.theme-bento #skipBtn{grid-row:17;margin:10px 0 12px}
body.theme-bento #pauseBtn{grid-column:1/4;margin-left:12px} body.theme-bento #skipBtn{grid-column:4/7;margin-right:12px}
@media(min-width:900px){
  body.theme-bento #runDuo{grid-column:4/7;grid-row:1/6;margin-top:0;display:grid;align-content:center}
  body.theme-bento #runDuo:not(.hidden) ~ #runRoles{grid-column:4/7;grid-row:10/14;margin-top:12px}
  body.theme-bento #runPreview{grid-column:4/7;grid-row:1/6;margin-top:0}
}
