:root{color-scheme:dark;--bg:#0c1415;--card:#172224;--card2:#1e2b2d;--muted:#93a4a3;--lime:#d9ff6b;--lime-ink:#0f1a17;--heat:#ff4d4d;--border:#2b3b3b;--white:#f2f6f4;--warn:#ffcf6b;--hairline:1px;--titlebar-h:0px;--sidebar:240px;--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px);--fs-2xs:.8rem;--fs-xs:.866667rem;--fs-sm:.933333rem;--fs-base:1rem;--fs-md:1.06667rem;--fs-lg:1.2rem;--fs-xl:1.4rem;--fs-2xl:1.6rem;--fs-3xl:1.53333rem;--fs-h1:2rem}
*{box-sizing:border-box}
html{font-size:clamp(93.75%,90% + .1vw,100%)}
html,body{background:var(--bg);height:100%;overflow:hidden;overscroll-behavior:none}
body{margin:0;color:var(--white);font:1rem/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;touch-action:manipulation}
img{display:block;max-width:100%}
#app{max-width:600px;height:calc(100dvh - var(--titlebar-h));margin:var(--titlebar-h) auto 0;display:flex;flex-direction:column}
.top{position:relative;flex:none;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:calc(12px + var(--safe-t)) 20px 10px;background:linear-gradient(var(--bg) 70%,#0c141500)}
.brand{font-size:var(--fs-3xl);font-weight:700}.brand em{font-style:normal;color:var(--lime)}
.round{width:42px;height:42px;border-radius:14px;background:var(--card2);font-size:var(--fs-lg);display:inline-flex;align-items:center;justify-content:center;flex:none}
.round svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.page{flex:1;min-height:0;overflow-y:auto;padding:6px 20px calc(110px + var(--safe-b));animation:enter .2s ease}
@keyframes enter{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:none}}
.eyebrow{text-transform:uppercase;color:var(--lime);font-size:var(--fs-2xs);font-weight:600;margin-bottom:6px}
h1{font-size:var(--fs-h1);line-height:1.08;margin:4px 0 10px}
h2{font-size:var(--fs-xl);margin:0}
h3{margin:0;font-size:var(--fs-md)}
p{color:var(--muted);margin:4px 0 12px}
.muted{color:var(--muted);font-size:var(--fs-2xs)}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.section{margin-top:26px}
.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:8px}
.textbtn{color:var(--lime);font-size:var(--fs-xs);font-weight:600;padding:6px 0}
.primary{background:var(--lime);color:var(--lime-ink);padding:14px 20px;border-radius:16px;font-weight:600;min-height:50px;font-size:var(--fs-md)}
.primary:disabled{opacity:.4}
.danger{background:#3a1f1f;color:#ff8a8a;border-radius:16px;padding:14px 20px;font-weight:600;min-height:50px;width:100%}
.danger:disabled{opacity:.45}
.ghost{background:var(--card2);padding:12px 16px;border-radius:14px;font-weight:600;min-height:46px}
.block{width:100%}
.pill{display:inline-block;border-radius:99px;padding:5px 10px;background:#2f403b;color:var(--lime);font-size:var(--fs-2xs);font-weight:600;white-space:nowrap}
.pill.dim{background:var(--card2);color:var(--muted)}
.hero{background:linear-gradient(140deg,#28403b,#152321 70%);border-radius:26px;padding:20px;position:relative;overflow:hidden}
.hero h2{font-size:var(--fs-2xl);line-height:1.1;margin:4px 0}
.hero .peek{display:flex;gap:6px;margin:14px 0;overflow:hidden}
.hero .peek img{width:64px;height:43px;border-radius:9px;object-fit:contain;background:#203030;flex:none}
.statrow{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:14px}
.stat{background:var(--card);padding:14px 8px;border-radius:18px;text-align:center}
.stat b{font-size:var(--fs-3xl);display:block;font-variant-numeric:tabular-nums}
.stat small{font-size:var(--fs-2xs);color:var(--muted)}
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.day{border-radius:13px;background:var(--card);min-height:62px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;color:var(--muted);font-size:var(--fs-2xs);font-weight:600;padding:4px 2px}
.day strong{font-size:var(--fs-base);color:var(--white)}
.day i{width:6px;height:6px;border-radius:50%;background:transparent}
.day.train i{background:var(--lime)}
.day.today{outline:1.5px solid var(--lime)}
.day.done{background:#2f4529}.day.done strong{color:var(--lime)}
.tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:none;margin:0 -20px;padding-inline:20px}
.tabs::-webkit-scrollbar{display:none}
.chip{white-space:nowrap;background:var(--card);color:var(--muted);padding:10px 15px;border-radius:100px;font-size:var(--fs-xs);font-weight:600;min-height:40px}
.chip.active{background:var(--lime);color:var(--lime-ink)}
.search{width:100%;padding:14px 16px;border:var(--hairline) solid var(--border);border-radius:16px;background:var(--card);outline:none;margin:6px 0 12px;font-size:var(--fs-md)}
.exercise{display:flex;align-items:center;gap:12px;background:var(--card);border-radius:19px;padding:9px;margin-bottom:9px;width:100%;text-align:left}
.thumb{width:96px;height:64px;flex:none;border-radius:13px;overflow:hidden;background:#203030}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb.fig img{object-fit:contain;padding:4px}
.thumb.none{display:flex;align-items:center;justify-content:center;text-align:center;padding:6px;font-size:var(--fs-2xs);font-weight:600;color:var(--heat);line-height:1.2}
.exercise .info{min-width:0;flex:1}
.exercise strong{display:block;font-size:var(--fs-sm)}
.exercise small{display:block;color:var(--muted);font-size:var(--fs-2xs);margin-top:3px}
.tag{font-size:var(--fs-2xs);font-weight:600;display:inline-block;color:var(--lime);margin-top:5px;}
.arr{font-size:var(--fs-2xl);color:var(--muted);padding:0 4px}
.nav{position:fixed;z-index:10;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:600px;background:#121d1ff2;backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-top:var(--hairline) solid var(--border);padding:8px 10px calc(8px + var(--safe-b));display:grid;grid-template-columns:repeat(4,1fr)}
.nav button{color:#8a9b9b;display:flex;align-items:center;flex-direction:column;gap:3px;font-size:var(--fs-2xs);font-weight:600;padding:6px 0;min-height:48px}
.nav button.active{color:var(--lime)}
.nav svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.card{background:var(--card);border-radius:20px;padding:16px;margin-top:10px}
.card.today{border:var(--hairline) solid var(--lime)}
.items{list-style:none;padding:0;margin:10px 0 12px}
.items li{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:var(--hairline) solid #ffffff0d;font-size:var(--fs-xs)}
.items li span:last-child{color:var(--muted);white-space:nowrap}
.items li.role span:first-child{color:var(--muted)}
.levelgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.levelgrid button{background:var(--card2);border:var(--hairline) solid var(--border);text-align:left;border-radius:16px;padding:14px;font-weight:600}
.levelgrid button.active{border-color:var(--lime);color:var(--lime)}
.levelgrid small{display:block;color:var(--muted);font-weight:500;margin-top:4px;font-size:var(--fs-2xs);line-height:1.35}
.daypick{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.daypick button{background:var(--card2);border-radius:13px;padding:13px 0;font-weight:600;font-size:var(--fs-xs)}
.daypick button.active{background:var(--lime);color:var(--lime-ink)}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px;background:var(--card);padding:5px;border-radius:15px}
.seg button{padding:10px 0;border-radius:11px;font-weight:600;font-size:var(--fs-xs);color:var(--muted)}
.seg button.active{background:var(--card2);color:var(--white);box-shadow:0 0 0 1px var(--border)}
.panel{background:var(--card);border-radius:20px;padding:6px 16px;margin:10px 0}
.switch{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:var(--hairline) solid #ffffff0d;gap:12px}
.switch:last-child{border-bottom:0}
.switch input{accent-color:var(--lime);width:22px;height:22px;flex:none}
.warn{background:#3a3220;color:var(--warn);border-radius:14px;padding:11px 13px;font-size:var(--fs-xs);margin:10px 0}
.empty{text-align:center;padding:36px 12px;color:var(--muted)}
.history{padding:12px 0;border-bottom:var(--hairline) solid var(--border)}
.history p{margin:2px 0 0;font-size:var(--fs-xs)}
.exercise-chart{display:block;width:100%;height:auto;margin-top:12px;overflow:visible}
.exercise-chart text{fill:var(--muted);font-family:inherit;font-size:12px;font-variant-numeric:tabular-nums}
.chart-axis{stroke:var(--border);stroke-width:1}
.chart-line{fill:none;stroke:var(--lime);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chart-dot{fill:var(--lime);stroke:var(--card);stroke-width:1}
.bars{display:flex;align-items:flex-end;gap:8px;height:110px;padding-top:10px}
.bars div{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end}
.bars i{display:block;width:100%;background:var(--lime);border-radius:7px 7px 3px 3px;min-height:3px}
.bars i.zero{background:var(--card2)}
.bars span{font-size:var(--fs-2xs);color:var(--muted)}
.footnote{font-size:var(--fs-2xs);line-height:1.55;color:var(--muted);margin-top:14px}
.footnote a{color:var(--muted)}
.toast{position:fixed;z-index:80;bottom:calc(100px + var(--safe-b));left:50%;transform:translateX(-50%);background:var(--lime);color:var(--lime-ink);padding:11px 18px;border-radius:14px;font-weight:600;box-shadow:0 8px 35px #0009;white-space:nowrap}
button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--lime);outline-offset:2px}

/* Sheets & overlays */
.sheet-bg{position:fixed;inset:0;background:#000a;z-index:30;display:flex;align-items:flex-end;justify-content:center;animation:fade .18s ease}
@keyframes fade{from{opacity:0}}
.sheet{width:100%;max-width:600px;background:#162324;border-radius:26px 26px 0 0;padding:14px 20px calc(24px + var(--safe-b));max-height:94dvh;overflow:auto;animation:up .2s ease}
@keyframes up{from{transform:translateY(40px);opacity:.6}}
.grab{width:42px;height:5px;border-radius:5px;background:#3a4b4b;margin:0 auto 12px}
.overlay{position:fixed;z-index:40;inset:0;background:var(--bg);overflow-y:auto;overscroll-behavior:contain}
.overlay-inner{max-width:600px;margin:auto;padding:calc(12px + var(--safe-t)) 20px calc(24px + var(--safe-b));min-height:100%;display:flex;flex-direction:column}

/* Demonstration player: figure frames stepped at rep tempo */
.demo{position:relative;aspect-ratio:3/2;border-radius:22px;overflow:hidden;background:#0c1415;margin:12px 0;isolation:isolate}
.demo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.demo.fig img{opacity:0;transition:opacity .12s ease;object-fit:contain;padding:6%}
.demo.fig img.on{opacity:1}
.demo.nofig{display:flex;align-items:center;justify-content:center;padding:12px}
.demo.nofig .bodymap{height:100%;width:auto;max-width:100%;margin:0}
.demo .lbl{position:absolute;left:12px;top:12px;z-index:2;font-size:var(--fs-2xs);font-weight:600;padding:6px 10px;border-radius:99px;background:#0c1415d9;color:var(--lime);text-transform:uppercase}
.demo .ctl{position:absolute;right:10px;bottom:10px;z-index:2;display:flex;gap:6px}
.demo .ctl button{background:#0c1415d9;border-radius:99px;padding:8px 12px;font-size:var(--fs-2xs);font-weight:600;color:var(--white);min-height:32px}
.demo.loading::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,#172224 30%,#22302f 50%,#172224 70%);background-size:300% 100%;animation:shimmer 1.2s linear infinite;z-index:3}
@keyframes shimmer{to{background-position:-100% 0}}
.demo.failed::after{content:"Demonstration unavailable — follow the written cues below.";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:20px;color:var(--muted);background:#172224;z-index:3;font-size:var(--fs-xs)}
.demo.split{aspect-ratio:auto;display:grid;grid-template-columns:1fr 1fr;gap:4px;background:none}
.demo.split figure{margin:0;position:relative;aspect-ratio:3/2;border-radius:16px;overflow:hidden;background:#0c1415}
.demo.split img{position:absolute;opacity:1!important;object-fit:contain;padding:6%}
.bodymap.static .bm-region{pointer-events:none}
.worked .bodymap{max-width:240px;margin:8px auto 4px}
.demo.split figcaption{position:absolute;left:8px;top:8px;font-size:var(--fs-2xs);font-weight:600;padding:4px 8px;border-radius:99px;background:#0c1415d9;color:var(--lime)}
@media (prefers-reduced-motion:reduce){.page,.sheet,.sheet-bg{animation:none}.demo img{transition:none}}

/* Workout player */
.ptop{display:flex;align-items:center;justify-content:space-between;gap:10px}
.progressbar{background:#2a3939;height:6px;border-radius:10px;overflow:hidden;margin:12px 0 0}
.progressbar i{display:block;background:var(--lime);height:100%;border-radius:10px;transition:width .3s}
.minilabel{font-size:var(--fs-2xs);color:var(--lime);text-transform:uppercase;font-weight:600}
.target{display:flex;align-items:baseline;gap:10px;margin:6px 0 2px}
.target b{font-size:2.93333rem;font-weight:800;font-variant-numeric:tabular-nums;line-height:1}
.target span{color:var(--muted);font-weight:600}
.setdots{display:flex;gap:6px;margin:10px 0}
.setdots i{flex:1;height:6px;border-radius:5px;background:var(--card2)}
.setdots i.on{background:var(--lime)}
.setdots i.cur{background:#7f9a43}
.cues{margin:8px 0 0;padding-left:18px;color:var(--muted);font-size:var(--fs-sm)}
.cues li{margin:3px 0}
.controls{margin-top:auto;padding-top:16px;display:grid;gap:10px}
.controls .duo{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.timer{font-size:4.26667rem;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;text-align:center;margin:8px 0}
.rest{background:var(--card);border-radius:22px;padding:18px;text-align:center;margin:12px 0}
.rest .next{display:flex;gap:12px;align-items:center;text-align:left;margin-top:14px;background:var(--card2);padding:8px;border-radius:15px}
.rest .next img{width:84px;height:56px;border-radius:10px;object-fit:contain;flex:none}
.summary .big{font-size:3.46667rem;font-weight:800}
.app-update{position:fixed;z-index:90;top:calc(10px + var(--safe-t));left:50%;transform:translateX(-50%);width:min(92vw,520px);background:#253637;border:var(--hairline) solid var(--lime);border-radius:16px;padding:10px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between}
.app-update button{background:var(--lime);color:var(--lime-ink);border-radius:10px;padding:8px 12px;font-weight:600}
.install-btn{background:var(--lime);color:var(--lime-ink);border-radius:12px;font-weight:600;font-size:var(--fs-2xs);padding:10px 12px;margin-right:8px}
.install-btn[hidden]{display:none}
@media (min-width:601px){body{background:#070c0d}#app{border-inline:var(--hairline) solid var(--border);background:var(--bg)}}
@media (orientation:landscape) and (max-height:500px){.demo:not(.split){max-height:58vh;aspect-ratio:auto;height:58vh}}
/* Logging: rep stepper, weight chips, auto-regulation badge */
.target .round{width:44px;height:44px;font-size:var(--fs-2xl);font-weight:600;align-self:center}
.target small{font-size:var(--fs-2xs);color:var(--muted);font-weight:600}
.target b#reps{min-width:56px;text-align:center}
.kgs{display:flex;gap:8px;margin:8px 0 2px}
.adjust{display:inline-block;font-size:var(--fs-2xs);font-weight:600;border-radius:10px;padding:6px 10px;margin:8px 0 2px}
.adjust.up{background:#2f4529;color:var(--lime)}
.adjust.down{background:#3a3220;color:var(--warn)}
.kg-input{width:84px;padding:8px 10px;border-radius:10px;border:var(--hairline) solid var(--border);background:var(--card2);text-align:right;font-size:var(--fs-md)}
.switch input.kg-input{width:84px;height:auto;flex:none}
/* Muscles */
.muscles{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}
.mvol{display:grid;gap:7px;margin-top:12px}
.mvol div{display:grid;grid-template-columns:92px 1fr 26px;align-items:center;gap:10px;font-size:var(--fs-2xs)}
.mvol div.none{opacity:.45}
.mvol i{height:8px;border-radius:6px;background:var(--card2);overflow:hidden}
.mvol b{display:block;height:100%;background:var(--lime);border-radius:6px}
.mvol em{font-style:normal;text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}

/* Native typography and interaction */
@supports (font:-apple-system-body) and (-webkit-touch-callout:none){html{font:-apple-system-body}body{font:-apple-system-body;line-height:1.45}}
h1,h2,h3,strong,b{font-weight:700}
.eyebrow,.minilabel,.demo .lbl,.demo.split figcaption{letter-spacing:.04em}
.stat small{font-weight:600}
.switch>span{font-weight:600}
.page,.sheet,.overlay,.tabs{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
button,select,nav,.card,.exercise,.hero,.day,.stat,.overlay,img,.sheet-header{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
input,textarea{caret-color:var(--lime)}
::selection{background:var(--lime);color:var(--lime-ink)}
button,.card,.chip{transition:transform 120ms ease,opacity 120ms ease}
button:not(:disabled):active,.card:active,.chip:active{transform:scale(.97);opacity:.85}
.nav button:active{transform:scale(.97)}
.sheet-header{position:sticky;top:-14px;z-index:4;margin:-14px -20px 12px;padding:14px 20px 10px;background:#162324e6;backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px)}
.sheet-header .grab{margin-bottom:10px}
.overlay{top:var(--titlebar-h);animation:enter .2s ease}
body:has(.sheet-bg,.overlay) .page{overflow:hidden}
.titlebar{display:none}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.nav{background:#121d1f}.sheet-header{background:#162324}}
@media (min-resolution:2dppx){:root{--hairline:.5px}}

/* Each named surface animates independently; timers and rep updates remain immediate. */
:root{view-transition-name:none}
.page{view-transition-name:screen}
/* Chrome stays put: nav and top bar swap instantly above the animating screen. */
.nav{view-transition-name:nav}
.top{view-transition-name:topbar}
::view-transition-group(nav),::view-transition-group(topbar){z-index:20;animation:none}
::view-transition-old(nav),::view-transition-old(topbar){display:none}
::view-transition-new(nav),::view-transition-new(topbar){animation:none}
.sheet-bg{view-transition-name:sheet}
#reset{view-transition-name:sheet-top}
.overlay{view-transition-name:player}
.native-transitions .page,.native-transitions .sheet-bg,.native-transitions .sheet,.native-transitions .overlay{animation:none}
::view-transition-group(*){animation-duration:.2s;animation-timing-function:ease}
::view-transition-group(sheet){z-index:30}
::view-transition-group(sheet-top){z-index:31}
::view-transition-group(player){z-index:40}
::view-transition-old(screen),::view-transition-old(sheet),::view-transition-old(sheet-top),::view-transition-old(player){animation:leave .2s ease both}
::view-transition-new(screen),::view-transition-new(sheet),::view-transition-new(sheet-top),::view-transition-new(player){animation:enter .2s ease both}
@keyframes leave{to{opacity:0;transform:translateY(6px)}}

/* Installed desktop windows reserve only the titlebar's available rectangle. */
@media (display-mode:window-controls-overlay){
  :root{--titlebar-h:calc(env(titlebar-area-y,0px) + env(titlebar-area-height,0px))}
  .titlebar{display:flex;position:fixed;z-index:100;left:env(titlebar-area-x,0px);top:env(titlebar-area-y,0px);width:env(titlebar-area-width,100%);height:env(titlebar-area-height,0px);align-items:center;justify-content:center;background:var(--bg);font-weight:600;-webkit-app-region:drag;app-region:drag;-webkit-user-select:none;user-select:none;overflow:hidden}
  .titlebar button,.titlebar a{-webkit-app-region:no-drag;app-region:no-drag}
  .sheet-bg{top:var(--titlebar-h)}
  .app-update{top:calc(10px + var(--safe-t) + var(--titlebar-h))}
}

@media (min-width:900px){
  :root{--fs-2xl:1.7rem;--fs-3xl:1.7rem;--fs-h1:2.2rem}
  body{background:var(--bg)}
  #app{max-width:none;border:0;margin-left:var(--sidebar)}
  .top{width:100%;max-width:960px;margin-inline:auto;padding:24px 32px 16px}
  .top .brand{visibility:hidden}
  /* full-width scroller keeps the scrollbar at the window edge; padding centres the content */
  .page{width:100%;padding:6px max(32px,(100% - 960px)/2 + 32px) 36px;scrollbar-gutter:stable}
  .nav{top:var(--titlebar-h);bottom:0;left:0;transform:none;width:var(--sidebar);max-width:none;display:flex;flex-direction:column;gap:8px;padding:32px 16px;border-top:0;border-right:var(--hairline) solid var(--border);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .nav::before{content:'Caliacasa.';color:var(--white);font-size:var(--fs-3xl);font-weight:700;padding:0 16px 24px}
  .nav button{flex:none;flex-direction:row;gap:14px;padding:14px 16px;border-radius:14px;text-align:left;font-size:var(--fs-base);min-height:52px}
  .nav button.active{background:#d9ff6b12}
  #exercise-list,.session-grid,.progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
  #exercise-list .exercise,.session-grid>.card,.progress-grid>.section{margin:0}
  .progress-grid{margin-top:26px}
  .progress-grid>.progress-history{grid-column:1/-1}
  .progress-grid>.section:last-child{grid-column:1/-1}
  .sheet-bg{align-items:center;padding:24px}
  .sheet{border-radius:26px;max-height:calc(100dvh - var(--titlebar-h) - 48px)}
  .overlay{background:#070c0df2}
  .overlay-inner{background:var(--bg);max-width:640px}
  .toast{bottom:28px;max-width:calc(100vw - 40px);white-space:normal}
}
@media (min-width:1100px){
  .top{max-width:1240px;padding-inline:40px}
  .page{padding-inline:max(40px,(100% - 1240px)/2 + 40px)}
  /* Home dashboard: hero (8 cols) beside stacked stat tiles (4 cols) */
  .home-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-items:stretch}
  .home-grid>.hero{grid-column:1/9}
  .home-grid>.statrow{grid-column:9/13;grid-template-columns:1fr;grid-auto-rows:1fr;gap:16px;margin-top:0}
  .home-grid .stat{display:flex;flex-direction:column;justify-content:center}
  .home-grid .hero .peek img{width:112px;height:75px}
  /* Explore */
  #exercise-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .tabs{flex-wrap:wrap;overflow:visible}
  /* Exercise detail opens as a right-hand panel */
  #detail{justify-content:flex-end;align-items:stretch;padding:0}
  #detail .sheet{width:min(520px,42vw);max-width:none;height:100%;max-height:none;border-radius:24px 0 0 24px;animation:panel-in 280ms ease-out}
  /* Progress */
  .progress-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .progress-grid>.section.card:first-child{grid-column:span 2}
  .progress-grid .bodymap{max-width:360px}
  /* Plans */
  .page-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start;align-content:start}
  .page-plans>.section{margin:0}
  .page-plans>.eyebrow,.page-plans>h1,.page-plans>p,.page-plans>.warn,.page-plans>.section:has(.session-grid),.page-plans>.section:has(.daypick){grid-column:1/-1}
}
@keyframes panel-in{from{transform:translateX(100%)}to{transform:none}}
@media (min-width:1500px){
  #exercise-list{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (min-width:1100px) and (prefers-reduced-motion:reduce){
  #detail .sheet{animation:none}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  button:not(:disabled):active,.card:active,.chip:active{transform:none}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}
.bodymap{display:block;width:100%;max-width:320px;margin:6px auto 10px}
.bm-outline{fill:var(--card2);stroke:var(--border);stroke-width:2;vector-effect:non-scaling-stroke}
.bm-neutral{fill:var(--card2)}
.bm-region{fill:var(--border);cursor:pointer;outline:none}
.bm-region[data-level="1"]{fill:var(--heat);fill-opacity:.35}
.bm-region[data-level="2"]{fill:var(--heat);fill-opacity:.65}
.bm-region[data-level="3"]{fill:var(--heat);fill-opacity:1}
.bm-region:focus-visible{stroke:var(--white);stroke-width:2;vector-effect:non-scaling-stroke}
.bm-region[data-level="0"]:hover{fill:var(--muted)}
.bm-caption{fill:var(--muted);font-size:56px;text-anchor:middle;font-family:inherit}
