/* Studio grey matches the photo backdrop so pictures melt into the page.
   Plate colours (red, blue, yellow, green) belong to the barbell; yellow is also the one action colour. */
:root{--studio:#ece9ea;--sheet:#fff;--ink:#10261e;--soft:#56655f;--line:#dcd9da;--yellow:#ffc814;--red:#d8262f;--blue:#1d55c8;--green:#17824a;--pad:20px;--safe:env(safe-area-inset-bottom)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html{background:var(--studio);-webkit-text-size-adjust:100%}
body{margin:0 auto;max-width:480px;min-height:100dvh;color:var(--ink);font:400 16px/1.45 Archivo,system-ui,sans-serif}
h1,h2,p{margin:0}
h1{font-size:29px;line-height:1.08;font-weight:800;font-stretch:118%;letter-spacing:-.02em;text-wrap:balance}
h2{font-size:17px;font-weight:700;margin:28px 0 10px}
button,input,select,textarea,.quiet{font:inherit;color:inherit}
button{border:0;background:none;padding:0;cursor:pointer;touch-action:manipulation}
button:active{transform:scale(.98)}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
main:focus{outline:0}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sub{color:var(--soft);margin-top:6px}
.cue{margin-top:12px;font-size:17px}
.fine{margin-top:20px;font-size:13px;color:var(--soft)}

/* photos: slight zoom hides the thin frame baked into the files */
.ph{display:block;overflow:hidden;background:var(--studio);aspect-ratio:1}
.ph img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.04)}

/* buttons */
.go{display:block;width:100%;min-height:58px;margin-top:16px;border-radius:16px;background:var(--yellow);font-size:18px;font-weight:750;font-stretch:108%}
.go:disabled{background:var(--line);color:var(--soft);cursor:default}
.quiet{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 16px;border-radius:14px;background:#f1efef;font-weight:600;font-size:15px;text-decoration:none}
.quiet.wide{width:100%;margin-top:12px}
.link{min-height:44px;padding:0 8px;font-weight:600;font-size:15px;text-decoration:underline;text-underline-offset:3px}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.x{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;flex:none}

/* page frame */
main{padding-bottom:calc(84px + var(--safe))}
.top{display:flex;gap:4px;justify-content:space-between;align-items:center;padding:calc(16px + env(safe-area-inset-top)) var(--pad) 10px;color:var(--soft);font-size:15px}
.brand{font-size:20px;font-weight:850;font-stretch:120%;letter-spacing:-.02em;color:var(--ink)}
#tabs{position:fixed;z-index:5;bottom:0;left:50%;width:min(100%,480px);transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,1fr);padding:6px 10px calc(6px + var(--safe));background:var(--sheet);border-top:1px solid var(--line)}
#tabs button{display:grid;justify-items:center;gap:2px;padding:7px 0;color:var(--soft);font-size:12px;font-weight:600}
#tabs svg{width:24px;height:24px}
#tabs [aria-current]{color:var(--ink);font-weight:750}
#tabs [aria-current] svg{stroke-width:2.8}
.panel{position:relative;padding:26px var(--pad) 24px;background:var(--sheet);border-radius:28px 28px 0 0}
#view>.panel{min-height:calc(100dvh - 160px)}
.panel.first{margin-top:6px}

/* today */
.week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:0 14px 6px}
.week button{position:relative;display:grid;justify-items:center;padding:7px 0 11px;border-radius:14px;font-weight:650;font-variant-numeric:tabular-nums}
.week small{font-size:12px;font-weight:500;color:var(--soft)}
.week [aria-pressed=true]{background:var(--ink);color:#fff}
.week [aria-pressed=true] small{color:#c9d3ce}
.week .now:not([aria-pressed=true]){background:#fff}
.week button::after{content:'';position:absolute;bottom:5px;width:14px;height:3px;border-radius:2px}
.week .has::after{background:#a9b2ad}
.week .did::after{background:var(--green)}
.week [aria-pressed=true].did::after{background:var(--yellow)}
.hero .ph{height:min(320px,34dvh);width:100%;aspect-ratio:auto;margin-bottom:-20px}
.hero .ph,.p-photo .ph{container-type:size;display:grid;place-items:center}
.hero img,.p-photo img{width:min(100cqw,100cqh);height:min(100cqw,100cqh);transform:none;-webkit-mask:linear-gradient(90deg,#0000 1%,#000 4%,#000 96%,#0000 99%),linear-gradient(#0000 1%,#000 4%,#000 96%,#0000 99%);-webkit-mask-composite:source-in;mask:linear-gradient(90deg,#0000 1%,#000 4%,#000 96%,#0000 99%) intersect,linear-gradient(#0000 1%,#000 4%,#000 96%,#0000 99%)}
.barbell{stroke:none;display:block;width:100%;height:auto;margin:16px 0 0;overflow:visible}
.bar{fill:#8d9692}
.plate{fill:#e4e2e2}
.plate.red{fill:var(--red)}.plate.blue{fill:var(--blue)}.plate.yellow{fill:var(--yellow)}.plate.green{fill:var(--green)}
#player .plate.last{animation:rack .4s cubic-bezier(.2,.9,.3,1.1) both}
@keyframes rack{from{transform:translateX(var(--from));opacity:0}}
.rows{margin-top:18px}
.row{display:grid;grid-template-columns:84px 1fr auto;gap:14px;align-items:center;width:100%;padding:8px 0;text-align:left}
.row+.row{border-top:1px solid #efeded}
.row .ph{border-radius:16px}
.row b{display:block;font-size:17px;font-weight:700;line-height:1.2}
.row small{display:block;margin-top:3px;color:var(--soft);font-size:15px}
.row.done b{color:var(--soft)}
.row i{font-style:normal;font-size:14px;font-weight:650}
.tick{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--green);color:#fff}
.tick svg{width:18px;height:18px;stroke-width:3}
.tick em{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.rest{margin-top:12px;padding-top:48px}

/* exercises */
.find{position:sticky;top:0;z-index:3;padding:4px 0 10px;background:var(--studio)}
.find input,.find select,#pop input,#pop textarea{width:100%;min-height:48px;padding:10px 16px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:16px}
.find>input{display:block;width:calc(100% - 2*var(--pad));margin:0 var(--pad)}
.chips,.strip{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:10px var(--pad)}
.chips::-webkit-scrollbar,.strip::-webkit-scrollbar,.thumbs::-webkit-scrollbar{display:none}
.chips button{flex:none;min-height:40px;padding:0 15px;border-radius:20px;background:#fff;font-size:15px;font-weight:600}
.chips [aria-pressed=true]{background:var(--ink);color:#fff}
.selects{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 var(--pad)}
.selects select{padding:0 12px;min-height:44px;font-size:16px}
#results{min-height:70dvh;padding:2px var(--pad) 20px;background:#fff;border-radius:28px 28px 0 0}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 12px}
.tile{text-align:left;align-self:start}
.tile .ph{border-radius:18px;margin-bottom:8px}
.tile b{display:block;font-size:15px;font-weight:700;line-height:1.2}
.tile small{color:var(--soft);font-size:14px}
.none{padding:60px 0;text-align:center}

/* progress */
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-top:22px;font-size:17px}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.cal small{color:var(--soft);font-size:12px;padding:4px 0}
.cal button{aspect-ratio:1;border-radius:50%;font-size:15px;font-variant-numeric:tabular-nums}
.cal .now{box-shadow:inset 0 0 0 2px var(--ink);font-weight:750}
.cal .did{background:var(--green);color:#fff;font-weight:750}
.menu{margin-top:26px;border-top:1px solid #efeded}
.menu button{display:block;width:100%;min-height:54px;text-align:left;font-weight:600;border-bottom:1px solid #efeded}

/* dialogs */
dialog{border:0;padding:0;margin:auto auto 0;width:min(100%,480px);max-width:none;color:inherit;overscroll-behavior:contain}
dialog::backdrop{background:#10261e99}
#sheet{height:94dvh;max-height:94dvh;border-radius:28px 28px 0 0;background:var(--studio);overflow-y:auto}
#pop{padding:24px var(--pad) calc(24px + var(--safe));border-radius:28px 28px 0 0;background:#fff}
#pop>.x{position:absolute;right:12px;top:14px}
#pop h1{padding-right:44px}
#pop input,#pop textarea{margin-top:16px}
#sheet[open],#pop[open]{animation:up .28s cubic-bezier(.2,.8,.2,1)}
@keyframes up{from{transform:translateY(60px);opacity:0}}
.float{position:sticky;float:right;top:12px;margin:12px 12px -56px 0;z-index:4;background:#fff}
.stage{position:relative}
.stage .ph{margin-bottom:-26px}
.stage video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pill{position:absolute;z-index:1;left:16px;top:14px;min-height:40px;padding:0 16px;border-radius:20px;background:#fff;font-size:14px;font-weight:650}
#sheet .panel{padding-bottom:calc(28px + var(--safe))}
.strip{margin:0 calc(-1*var(--pad));padding:2px var(--pad) 6px;gap:10px}
.strip button{flex:0 0 92px;font-size:13px}
.strip .ph{border-radius:16px;margin-bottom:5px;border:3px solid transparent}
.strip [aria-pressed=true] .ph{border-color:var(--ink)}
.strip [aria-pressed=true]{font-weight:750}
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.days button{min-height:48px;border-radius:14px;background:#f1efef;font-weight:650;font-size:15px}
.days [aria-pressed=true],.feel [aria-pressed=true]{background:var(--ink);color:#fff}
.feel{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.feel button{min-height:54px;border-radius:14px;background:#f1efef;font-weight:650;font-size:15px}

/* player */
#player{margin:0 auto;height:100dvh;max-height:none;background:#fff;overflow-y:auto}
#player[open]{display:flex;flex-direction:column}
.p-top{display:flex;align-items:center;gap:4px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px 6px;background:var(--studio);flex:none}
.thumbs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:3px}
.thumbs button{position:relative;flex:0 0 46px;border-radius:13px;overflow:hidden;border:2px solid transparent;background:#fff}
.thumbs [aria-current]{border-color:var(--ink)}
.thumbs svg{position:absolute;inset:0;margin:auto;color:#fff;stroke-width:3.5}
.thumbs .did::after{content:'';position:absolute;inset:0;background:#17824acc}
.thumbs .did svg{z-index:1}
.p-photo{flex:1 1 280px;min-height:190px;background:var(--studio);display:flex;justify-content:center;overflow:hidden}
.p-photo .ph{width:100%;aspect-ratio:auto}
.p-info{flex:none;padding:18px var(--pad) 14px}
.p-info h1{font-size:26px}
.p-info .sub{font-size:18px;font-weight:650;color:var(--ink)}
.p-info .cue{margin-top:8px;font-size:16px}
.p-dock{position:sticky;bottom:0;flex:none;padding:4px var(--pad) calc(14px + var(--safe));background:#fff;border-top:1px solid var(--line);text-align:center}
.p-dock .barbell{margin:8px auto 0;max-width:340px}
.p-dock .go{margin-top:10px}
.p-dock .pair{margin-top:2px}
.rest .p-dock,.work .p-dock{background:var(--ink);color:#fff;border-color:var(--ink)}
.rest .plate:not(.red,.blue,.yellow,.green),.work .plate:not(.red,.blue,.yellow,.green){fill:#33483f}
.rest .p-dock .go,.work .p-dock .go{color:var(--ink)}
.count{display:flex;align-items:baseline;justify-content:space-between;margin-top:4px;font-size:20px;font-weight:650}
.clock{font-size:60px;line-height:1.05;font-weight:800;font-stretch:118%;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
#player.rest{margin:0 auto;padding:0}
.rest .p-info .cue,.rest .p-info .pair,.work .p-info .pair{display:none}
#player.finish{background:var(--yellow)}
.done-screen{margin:auto 0;padding:40px var(--pad)}
.done-screen h1{font-size:46px;margin-top:34px}
.done-screen .sub{font-size:18px;color:var(--ink)}
.done-screen .bar{fill:var(--ink)}
.done-screen .plate.yellow{fill:#fff}
.done-screen .feel button{background:#fff8}
.done-screen .feel [aria-pressed=true]{background:var(--ink)}
.done-screen .go{background:var(--ink);color:#fff;margin-top:34px}

/* setup */
.setup{padding:8px var(--pad) 20px}
.setup .hero{margin:0 calc(-1*var(--pad))}
.setup .hero .ph{margin:0}
.setup .days,.goals{margin-top:20px}
.setup .days button,.setup .feel button{background:#fff}
.setup .days [aria-pressed=true],.setup .feel [aria-pressed=true]{background:var(--ink)}
.goals{display:grid;gap:10px}
.goals button{display:grid;grid-template-columns:104px 1fr;align-items:center;gap:8px;text-align:left;background:#fff;border-radius:20px;overflow:hidden;border:3px solid #fff}
.goals b{display:block;font-size:19px;font-weight:750}
.goals small{color:var(--soft);font-size:15px}
.goals [aria-pressed=true]{border-color:var(--ink)}
.goals .ph{border-radius:15px}
.kit{margin-top:20px}
.kit .tile{padding:8px 8px 12px;border-radius:22px;background:#fff;border:3px solid #fff}
.kit .tile b{padding:0 4px}
.kit [aria-pressed=true]{border-color:var(--ink)}
.how{margin-top:20px;padding:16px;border-radius:16px;background:#fff;font-size:15px}
#pop .how{background:#f1efef}
.foot{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,480px);display:flex;gap:10px;padding:10px var(--pad) calc(14px + var(--safe));background:var(--studio)}
.foot .go{margin:0;flex:1}
.foot .quiet{min-height:58px;background:#fff}

/* left panel and account pages */
.top .brand{margin-right:auto}
.burger{margin:-8px 0 -8px -11px}
.burger svg{width:26px;height:26px;stroke-width:2.6}
#side{margin:0 auto 0 0;width:min(84vw,330px);height:100dvh;max-height:none;background:#fff;border-radius:0 28px 28px 0;overflow-y:auto}
#side[open]{display:flex;flex-direction:column;animation:slide .25s cubic-bezier(.2,.8,.2,1)}
@keyframes slide{from{transform:translateX(-100%)}}
.who{display:flex;align-items:center;gap:12px;min-width:0}
#side .who{padding:calc(22px + env(safe-area-inset-top)) 10px 18px 20px;background:var(--studio)}
.who span{flex:1;min-width:0;overflow-wrap:anywhere}
.who b{display:block;font-size:18px;font-weight:750;line-height:1.2}
.who small{color:var(--soft);font-size:15px}
.face{display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:50%;background:var(--ink);color:#fff;font-style:normal;font-size:21px;font-weight:800}
.big .face{width:68px;height:68px;font-size:30px}
#side nav{padding:10px;flex:1}
#side hr{margin:10px;border:0;border-top:1px solid #efeded}
#side nav button,.out button{display:flex;align-items:center;gap:14px;width:100%;min-height:50px;padding:0 12px;border-radius:14px;font-size:17px;font-weight:600;text-align:left}
#side [aria-current]{background:var(--yellow);font-weight:750}
.out{padding:10px 10px calc(14px + var(--safe));border-top:1px solid #efeded}
label{display:block;margin-top:14px;font-weight:600;font-size:15px}
form input:not([type=hidden]){display:block;width:100%;min-height:50px;margin-top:6px;padding:10px 16px;border:1px solid #bdbabb;border-radius:14px;background:#fff;font-size:16px;font-weight:400}
label+.fine{margin-top:6px}
.err{color:#b3131c;font-weight:600;font-size:15px}
.err:not(:empty){margin-top:12px}
.link.wide{display:block;width:100%;margin-top:8px}
.auth .panel{min-height:60dvh}
main:has(.auth){padding-bottom:0}
.auth .how{background:#f1efef}
.auth .hero .ph{height:min(260px,28dvh)}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0 8px}
.facts div{display:flex;flex-direction:column-reverse;padding:14px 16px;border-radius:18px;background:var(--studio)}
.facts dd{margin:0;font-size:32px;line-height:1.1;font-weight:800;font-stretch:118%}
.facts dt,.list dt{color:var(--soft);font-size:15px}
.list{margin:10px 0 0}
.list div{display:flex;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid #efeded}
.list dd{margin:0;text-align:right;font-weight:600}
.invite{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding:14px 16px;border-radius:18px;background:var(--studio)}
.invite small{display:block;color:var(--soft)}
.invite b{font-size:23px;letter-spacing:.06em}
.invite .quiet,.danger{background:#fff}
.danger{color:#b3131c;box-shadow:inset 0 0 0 1px #e8c5c7}
.people button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:64px;text-align:left;border-bottom:1px solid #efeded}
.people b,.people small{display:block;overflow-wrap:anywhere}
.people small,.note small{color:var(--soft);font-size:14px}
.people em{flex:none;font-style:normal;font-weight:650;font-size:15px}
.note{padding:14px 16px;margin-top:10px;border-radius:18px;background:var(--studio)}
.note p{white-space:pre-wrap;overflow-wrap:anywhere}

.two{grid-template-columns:1fr 1fr}
.weight{display:grid;grid-template-columns:1fr 48px 84px 48px;align-items:center;margin-top:12px;padding:8px 8px 8px 16px;border-radius:16px;background:var(--studio);text-align:center}
.weight span{text-align:left}
.weight b,.weight small{display:block;line-height:1.25}
.weight small{color:var(--soft);font-size:14px}
.weight button{height:48px;border-radius:13px;background:#fff;font-size:26px;font-weight:600;line-height:1}
.weight output{font-weight:750;font-variant-numeric:tabular-nums}
.goalstrip{margin-top:16px}
.goalstrip div{flex:0 0 132px}
.goalstrip b,.goalstrip small{display:block;line-height:1.25}
.goalstrip small{color:var(--soft);font-size:14px}
#view>.hero+.rest{margin-top:0;padding-top:28px}

#toast{position:fixed;inset:auto auto calc(100px + var(--safe)) 50%;transform:translateX(-50%);margin:0;border:0;padding:12px 18px;border-radius:14px;background:var(--ink);color:#fff;font-size:15px;pointer-events:none;width:max-content;max-width:90vw}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
