/* App shell pieces: loading skeletons, the gym check-in dialog and its setup toggle. Splash styles are inline in index.html. */

/* Skeletons: while the first data load is pending, data cards show placeholder bars instead of example numbers. */
body.loading .card.skel{position:relative;min-height:190px}
body.loading .card.skel>*{visibility:hidden}
body.loading .card.skel::before{
  content:"";position:absolute;inset:16px;border-radius:6px;
  background:
    linear-gradient(var(--surface2),var(--surface2)) 0 0/38% 22px no-repeat,
    linear-gradient(var(--surface2),var(--surface2)) 0 42px/100% 60px no-repeat,
    linear-gradient(var(--surface2),var(--surface2)) 0 118px/72% 14px no-repeat,
    linear-gradient(var(--surface2),var(--surface2)) 0 142px/86% 14px no-repeat;
  animation:skel-pulse 1.1s ease-in-out infinite alternate;
}
@keyframes skel-pulse{from{opacity:.45}to{opacity:1}}
/* The same bars inside a card, for data that comes from the server (js/lib/dom.js skel) */
.skel-c{display:grid;gap:12px;padding:4px 0;animation:skel-pulse 1.1s ease-in-out infinite alternate}
.skel-c i{display:block;height:14px;border-radius:6px;background:var(--surface2)}
.skel-c i:nth-child(1){width:38%;height:22px}
.skel-c i:nth-child(2){height:60px}
.skel-c i:nth-child(3){width:72%}
.skel-c i:nth-child(4){width:86%}
.vs-skel{position:absolute;inset:0;background:var(--surface2);animation:skel-pulse 1.1s ease-in-out infinite alternate}  /* the video player before its first video */
/* Member and crew rows in the directory sheet before they arrive: an avatar circle and two lines, the shape of a real row */
.dir-skel{animation:skel-pulse 1.1s ease-in-out infinite alternate}
.dir-skel>span{display:flex;align-items:center;gap:12px;min-height:76px;padding:14px 4px;border-bottom:1px solid var(--line);box-sizing:border-box}
.dir-skel>span>i{flex:none;width:36px;height:36px;border-radius:50%;background:var(--surface2)}
.dir-skel>span>span{flex:1;display:grid;gap:8px}
.dir-skel>span>span i{display:block;height:13px;width:46%;border-radius:6px;background:var(--surface2)}
.dir-skel>span>span i+i{width:30%;height:10px}
.dir-skel>span:nth-child(even)>span i{width:58%}
@media (prefers-reduced-motion:reduce){body.loading .card.skel::before,.skel-c,.vs-skel,.dir-skel{animation:none;opacity:.7}}

/* Gym check-in dialog */
#checkin{background:var(--surface-overlay);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:20px;width:min(420px,calc(100vw - 32px));max-width:none;box-shadow:var(--shadow-4)}
#checkin::backdrop{background:rgba(6,8,28,.7)}
#checkin h2{margin:2px 0 6px}
#checkin .actions{flex-direction:column;align-items:stretch}
#checkin .actions .btn{width:100%}

/* Month day view dialog, styled like the check-in */
#dayview{background:var(--surface-overlay);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:20px;width:min(420px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:var(--shadow-4)}
#dayview::backdrop{background:rgba(6,8,28,.7)}
#dayview h2{margin:2px 0 12px}
#dayview .eyebrow:empty{display:none}
#dv-body .r .nm{flex:0 1 auto}
#dv-body .r .num{margin-left:auto;text-align:right}
#dayview .actions .btn{flex:1}

/* Install dialog, styled like the check-in */
#install{background:var(--surface-overlay);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:20px;width:min(420px,calc(100vw - 32px));max-width:none;box-shadow:var(--shadow-4)}
#install::backdrop{background:rgba(6,8,28,.7)}
#install h2{margin:2px 0 12px}
#install .actions{flex-direction:column;align-items:stretch}
#install .actions .btn{width:100%}
#install svg{vertical-align:-5px}
.in-steps{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px}
.in-steps li{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:10px}
.in-n{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--mark);color:var(--mark-ink);font-weight:800;font-size:.85rem}
.in-t{flex:1;line-height:1.35}
.in-i{flex:none;color:var(--ink2)}
/* Sheets: open from a row on the Log page (session, cardio, weight) or the PRs page (a lift's details, adding a PR) */
.sheet{background:var(--surface-overlay);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:12px 20px 20px;width:min(460px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:var(--shadow-4)}
.sheet::backdrop{background:rgba(6,8,28,.7)}
/* The app's own "are you sure" (js/ui/ask.js) */
.ask-t{font-size:1.1rem;line-height:1.35;margin:8px 0 16px;text-transform:none;letter-spacing:0}
.ask-acts{display:flex;gap:10px}
.ask-acts .btn{flex:1 1 0}
.ls-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.ls-top h2{font-family:var(--display);font-weight:800;font-size:1.8rem;margin:0}
.ls-x{flex:none;width:44px;height:44px;border-radius:50%;border:0;background:var(--raise,var(--surface2));color:var(--ink);display:grid;place-items:center}
.ls-p .glabel:first-child{margin-top:8px}
.ls-p .btn.hero{margin-top:18px}
.ls-note{margin:8px 0 0}
#m-fields{margin-top:10px}
@media (max-width:700px),(any-pointer:coarse) and (min-height:600px) and (max-width:1400px){
  /* On phones the dialogs sit low, near the thumb, like an iOS sheet. */
  #checkin,#dayview,#install{margin:auto auto calc(16px + env(safe-area-inset-bottom,0px))}
}

/* Setup card toggle */
.toggle{display:flex;align-items:center;gap:10px;margin-top:12px;text-transform:none;letter-spacing:0;font-size:1rem;color:var(--ink);cursor:pointer;min-height:44px}
.toggle input{width:22px;height:22px;accent-color:var(--mark);margin:0;flex:none}
#gymcard .card-head+p{margin-top:0}

/* A card with nothing to show (an empty PR list, the install card once installed, the account card inside a Claude artifact).
   A class instead of [hidden], since switching pages sets [hidden] on every card and would bring these back. */
.card.off{display:none}

/* Header gym day total: the big number is the point, the label stacks beside it. */
/* Header number: metric first, label second. The number is the biggest thing on screen and the label sits small under it. */
.gtot{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;padding-bottom:0!important}
.gtot-n{font-family:var(--display);font-weight:800;font-size:1.9rem;line-height:.85;color:var(--ink);letter-spacing:.01em}
.gtot-l{font-size:.6rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink2);line-height:1.2}
.gtot-n.bump{animation:gtot-bump .6s cubic-bezier(.3,1.6,.5,1)}
@keyframes gtot-bump{0%{transform:scale(1)}35%{transform:scale(1.35)}100%{transform:scale(1)}}

/* Milestone celebration overlay */
#mstone{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:rgba(6,8,28,.94);padding:24px;animation:ms-fade .25s ease both}
#mstone.out{animation:ms-fade .25s ease reverse both}
.ms-in{position:relative;text-align:center;animation:ms-pop .55s cubic-bezier(.2,1.4,.4,1) both}
.ms-k{font-size:.8rem;font-weight:700;letter-spacing:.24em;text-transform:uppercase;color:var(--ink2)}
.ms-n{font-family:var(--display);font-weight:800;font-size:clamp(7rem,38vw,11rem);line-height:.9;color:var(--ink);margin-top:6px}
.ms-l{font-family:var(--display);font-weight:800;font-size:1.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
.ms-s{color:var(--ink2);margin:14px auto 24px;max-width:28ch}
.ms-acts{display:flex;flex-direction:column;gap:10px;align-items:center}
.ms-acts .btn{min-width:220px;min-height:48px}
.ms-sh{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;width:100%;max-width:420px;animation:ms-pop .35s ease both}
.ms-sh[hidden]{display:none}
.ms-card{display:block;height:min(58vh,560px);aspect-ratio:9/16;max-width:100%;object-fit:contain;border-radius:14px;border:1px solid var(--line);background:var(--bg);box-shadow:0 18px 50px rgba(6,8,28,.6)}
.ms-sh .ms-acts{flex-direction:row;flex-wrap:wrap;width:100%}
.ms-sh .ms-acts .btn{flex:1 1 0;min-width:0;white-space:nowrap;padding-inline:12px}
.ms-done{min-height:48px;min-width:220px}
.pr-pct-note{margin:-6px 0 0;max-width:40ch}
#mstone.sharing{display:block;overflow-y:auto;overscroll-behavior:contain}
#mstone.sharing{padding-top:calc(12px + env(safe-area-inset-top,0px));padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
#mstone.sharing .ms-sh{margin:0 auto;padding:0 0 12px}
/* The whole share sheet fits on one screen: the preview takes what the buttons leave, and short screens scroll. */
.pr-sh{height:100%;min-height:600px;gap:12px}
.pr-sh>.pr-prev{flex:1 1 0;min-height:200px}
.pr-sh .pr-frame{height:100%}
.pr-sh .pr-prev .ms-card,.pr-sh .pr-empty{height:100%;max-height:500px}
.pr-sh .pr-prev.see .ms-card{height:auto;max-height:100%;width:auto;margin:auto 0}
.pr-sh .pr-prev.see .pr-frame{align-items:center}
.pr-sh .pr-pct-note{margin:0;line-height:1.35}
.pr-seg{display:flex;width:100%;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.pr-seg button{flex:1 1 0;min-height:44px;background:none;border:0;color:var(--ink2);font:inherit;font-size:.9rem;cursor:pointer}
.pr-seg button+button{border-left:1px solid var(--line)}
.pr-seg button[aria-pressed="true"]{background:var(--mark);color:var(--mark-ink);font-weight:700}
.pr-seg button:focus-visible,.pr-opt:focus-visible,.pr-empty:focus-visible{outline:2px solid var(--mark);outline-offset:2px}
.pr-prev{display:flex;justify-content:center;width:100%}
.pr-frame{position:relative;display:flex;justify-content:center;max-width:100%}
.pr-prev.see .pr-frame{width:100%}
.pr-prev .ms-card,.pr-empty{height:min(46vh,500px);width:auto;max-width:100%}
.pr-vid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:14px;background:var(--bg)}
.pr-vid[hidden],.pr-bar[hidden]{display:none}
.ms-card.over{position:relative;background:none}
.pr-bar{position:absolute;left:14px;right:14px;bottom:12px;height:6px;border-radius:3px;background:var(--mark);transform:scaleX(0);transform-origin:left}
.ms-card[hidden]{display:none}
.pr-prev.see .ms-card{aspect-ratio:auto;height:auto;width:100%;background:repeating-conic-gradient(var(--surface) 0 25%,var(--line) 0 50%) 50%/24px 24px}
.pr-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;aspect-ratio:9/16;max-width:100%;border:1px dashed var(--line);border-radius:14px;background:var(--surface);color:var(--ink);font:inherit;font-weight:700;cursor:pointer}
.pr-empty span{font-weight:400;font-size:.85rem;color:var(--ink2)}
.pr-empty[hidden],.pr-opt[hidden]{display:none}
.pr-opts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.pr-opt{min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:none;color:var(--ink2);font:inherit;font-size:.88rem;cursor:pointer}
.pr-opt[aria-pressed="true"]{border-color:var(--mark);color:var(--ink);font-weight:700}
.pr-opt[aria-pressed="true"]::before{content:"\2713  "}
.ms-burst{position:absolute;left:50%;top:44%;width:0;height:0;pointer-events:none}
.ms-burst i{position:absolute;left:-4px;top:-4px;width:8px;height:8px;border-radius:2px;background:var(--ink);opacity:0;transform:rotate(var(--a)) translateY(0);animation:ms-fly 1s var(--d) cubic-bezier(.15,.8,.3,1) forwards}
.ms-burst i:nth-child(3n){background:var(--good)}
.ms-burst i:nth-child(3n+1){background:var(--warn)}
@keyframes ms-fade{from{opacity:0}to{opacity:1}}
@keyframes ms-pop{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:scale(1)}}
@keyframes ms-fly{0%{opacity:1;transform:rotate(var(--a)) translateY(0) scale(1)}100%{opacity:0;transform:rotate(var(--a)) translateY(-46vmin) scale(.4)}}
@media (prefers-reduced-motion:reduce){#mstone,#mstone.out,.ms-in,.gtot-n.bump{animation:none}.ms-burst{display:none}}

/* Workout done screen (js/features/day-done.js). The card moves on springs from JS; only the backdrop fades here. */
#wdone,#lvup{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:color-mix(in srgb,var(--bg) 97%,transparent);padding:24px 16px;overflow:hidden;animation:ms-fade .25s ease both}
#wdone.out,#lvup.out{animation:ms-fade .2s ease reverse both}
.wd-in{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;max-width:400px;min-height:min(78vh,680px);justify-content:center;padding:16px 8px 8px;text-align:center;touch-action:none;will-change:transform}
.wd-grab{position:absolute;top:0;width:40px;height:4px;border-radius:2px;background:var(--line)}
.wd-kilo,.wd-in>.kilo-companion{width:96px;height:auto;margin-bottom:4px}
.wd-ring{position:relative;width:min(56vw,220px);aspect-ratio:1;margin:10px 0 6px}
.wd-ring svg{display:block;width:100%;height:100%;transform:rotate(-90deg)}
.wd-ring circle{fill:none;stroke-width:10}
.wd-track{stroke:var(--line)}
.wd-fill{stroke:var(--mark);stroke-linecap:round}
.wd-in.hit .wd-fill{stroke:var(--good)}
.wd-ring .ms-burst{top:50%}
.wd-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.wd-n{font-family:var(--display);font-weight:800;font-size:clamp(4rem,22vw,5.5rem);line-height:.85;color:var(--ink)}
.wd-n.pop{animation:gtot-bump .5s cubic-bezier(.3,1.6,.5,1)}
.wd-c span{font-size:.8rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink2);margin-top:4px}
.wd-week{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;width:100%;max-width:300px;margin-top:8px}
.wd-d{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:.7rem;font-weight:700;color:var(--ink2)}
.wd-d i{width:22px;height:22px;border-radius:50%;border:2px solid var(--line)}
.wd-d.on i{background:var(--mark);border-color:var(--mark)}
.wd-d.me{color:var(--ink)}
.wd-d.me i{animation:wd-dot .45s calc(500ms + var(--i)*60ms) cubic-bezier(.3,1.6,.5,1) both}
.wd-s{margin:12px auto 6px}
.wd-stats{display:flex;gap:10px;justify-content:center;width:100%;margin-bottom:20px}
.wd-stats span{flex:1 1 0;max-width:150px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink2)}
.wd-stats b{font-family:var(--display);font-size:1.6rem;line-height:1;color:var(--ink);letter-spacing:0}
.wd-stats:has(+.wd-crew){margin-bottom:10px}
.wd-crew{display:flex;align-items:center;gap:12px;width:100%;max-width:310px;margin-bottom:20px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);text-align:left}
.wd-faces{display:flex;flex:none;padding-left:8px}
.wd-faces .av{width:32px;height:32px;margin-left:-8px;font-size:.72rem;box-shadow:0 0 0 2px var(--surface)}
.wd-cl{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:.85rem;line-height:1.25}
.wd-cl b{color:var(--ink)}
.wd-cl span{color:var(--ink2);font-size:.78rem}
.wd-cl .wd-lock{color:var(--reward-text);font-weight:700}  /* the day that locked the crew week is a reward: gold */
.wd-in .ms-acts{width:100%}
.wd-in .ms-acts .btn{width:100%;max-width:320px}
@keyframes wd-dot{0%{transform:scale(.4);opacity:.2}100%{transform:scale(1);opacity:1}}
#wdone.still .wd-d.me i,#wdone.still .wd-n.pop{animation:none}
#wdone.still .ms-burst{display:none}
@media (prefers-reduced-motion:reduce){#wdone .wd-d.me i,#wdone .wd-n.pop{animation:none}#wdone .ms-burst{display:none}}

/* Crew level up screen (js/features/level-up.js). It borrows the done screen's card; the confetti canvas sits behind it. */
#lvup{background:var(--bg)}
#challenge-result{box-sizing:border-box;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:max(28px,env(safe-area-inset-top,0px)) 20px max(28px,env(safe-area-inset-bottom,0px));border:0;background:var(--bg);color:var(--ink);overflow-y:auto}
#challenge-result::backdrop{background:var(--bg)}
.cr-screen{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:100%;max-width:460px;margin:auto;text-align:center}
.cr-screen>.kilo{width:120px;height:120px}
.cr-screen h1{font-size:clamp(2.8rem,12vw,4.5rem);color:var(--warn)}
.cr-kind{font-size:1.25rem;font-weight:800}
.cr-winners{display:flex;flex-direction:column;align-items:center;gap:10px;padding:4px}
.cr-winners>span{font-size:2rem}
.cr-faces{display:flex;justify-content:center;flex-wrap:wrap;gap:18px;padding-top:4px}
.cr-losers{width:100%;box-sizing:border-box;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.cr-people{display:flex;justify-content:center;flex-wrap:wrap;gap:16px;margin-top:12px}
.cr-people>div{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:110px;font-size:.8rem;overflow-wrap:anywhere}
.cr-actions{display:flex;flex-direction:column;gap:10px;width:100%;margin-top:10px}
.cr-actions .btn{min-height:48px}
@media(prefers-reduced-motion:no-preference){html:not(.still) .cr-screen{animation:ms-fade .3s ease both}}
.lv-fx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#lvup .ms-n{margin-top:10px;will-change:transform}
.lv-crew{max-width:100%;padding-inline:8px;font-size:clamp(1.5rem,7vw,1.8rem);line-height:1.1;overflow-wrap:anywhere}
#lvup .ms-s{min-height:1.5em;margin:10px auto 28px}
#lvup .ms-s b{color:var(--ink)}

/* Kilo, the mascot (icons/kilo/, drawn by tools/make-kilo.mjs): the gym check-in asks, the rest nudge side-eyes,
   empty cards wait with arms folded, and a milestone rolls in. */
#checkin .kilo{display:block;margin:0 0 10px}
.ms-kilo{display:block;margin:0 auto 8px}
.empty::before{content:"";display:block;width:64px;height:64px;margin:0 auto 10px;background:url(../icons/kilo/wait.svg) center/contain no-repeat}
/* Invite sheet (js/features/invite.js): after making an account Kilo waves and asks you to bring friends, in a speech bubble. */
#invsheet{text-align:center}
#invsheet .kilo{display:block;margin:12px auto 16px}
.inv-say{position:relative;background:var(--bg);border:1px solid var(--line);border-radius:18px;padding:16px 16px 14px;margin-bottom:18px}
.inv-say::before{content:"";position:absolute;top:-8px;left:50%;width:14px;height:14px;margin-left:-7px;background:var(--bg);border-left:1px solid var(--line);border-top:1px solid var(--line);transform:rotate(45deg)}
.inv-say h2{font-size:1.75rem;line-height:1.05;margin:0 0 6px}
.inv-say p{margin:0 auto;color:var(--ink2);max-width:30ch}
.inv-acts{display:flex;flex-direction:column;gap:10px}
.inv-acts .btn{min-height:48px;display:flex;align-items:center;justify-content:center;gap:8px}

/* Kilo accompanies a useful message; fixed dimensions prevent layout shifts. */
.kilo-companion{display:block;flex:none;object-fit:contain}
.kilo-message{display:flex;align-items:center;gap:14px;padding:16px 0;text-align:left}
.kilo-message>div{min-width:0}
.kilo-title{font-weight:700;margin-bottom:4px;text-wrap:balance}
.ms-sh>.kilo-message{max-width:420px;margin-inline:auto}
.wo-done>.kilo-companion{width:40px;height:40px}
/* Kilo on the Log page, by the date, saying how many days you've gone this week in a speech bubble. A notification takes
   the date's place beside him instead. */
#today .lhead{flex-wrap:wrap}
#today .lhead-t{min-width:0;max-width:100%}
#today .lhead h1{overflow-wrap:anywhere}
.lbud{display:flex;align-items:center;gap:10px;flex:0 1 auto;max-width:100%;margin-left:auto}
.lkilo-b{flex:none;display:block;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;touch-action:manipulation}
.lkilo-b:focus-visible{outline:2px solid var(--mark);outline-offset:2px}
.lkilo-b>.lkilo{display:block;width:4rem;height:4rem}
.lsay{position:relative;min-width:0;margin:0;padding:8px 12px;border-radius:14px;background:var(--surface);border:1.5px solid var(--line);font-size:.75rem;color:var(--ink2);line-height:1.2;text-align:center;text-wrap:pretty}
.lsay::after{content:"";position:absolute;right:-7px;top:50%;width:11px;height:11px;margin-top:-6px;background:inherit;border:inherit;border-left:0;border-bottom:0;transform:rotate(45deg)}
.lsay b{font-family:var(--display);font-weight:800;font-size:1.15rem;color:var(--ink)}
.lsay span{display:block;margin-top:2px;font-weight:700;color:var(--ink)}
.lbud-note{flex:1 1 100%;gap:14px;margin-left:0}
.lnote-wrap{position:relative;flex:1;min-width:0;overflow:hidden;padding-right:8px;margin-right:-8px;border-radius:14px}
.lnote-dismiss{position:absolute;inset:0 8px 0 0;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:2px;padding-right:12px;border-radius:14px;background:var(--surface2);color:var(--ink2);font-size:1.3rem;pointer-events:none}
.lnote-dismiss small{font-size:.65rem;font-weight:700}
.lnote-wrap.ready .lnote-dismiss{background:color-mix(in srgb,var(--mark) 18%,var(--surface));color:var(--ink)}
.lnote-wrap .lnote{display:block;width:100%;z-index:1}
.lnote{position:relative;flex:1;min-width:0;padding:12px 14px;border-radius:14px;background:var(--surface);border:1.5px solid var(--line);color:var(--ink);font:inherit;font-size:.95rem;line-height:1.4;text-align:left;cursor:pointer;touch-action:pan-y;will-change:transform}
.lnote:focus-visible{outline:2px solid var(--mark);outline-offset:2px}
.lnote::after{content:"";position:absolute;right:-7px;top:50%;width:11px;height:11px;margin-top:-6px;background:inherit;border:inherit;border-left:0;border-bottom:0;transform:rotate(45deg)}
/* The earned icon before it's earned: shown, grayed out, so there's something to chase. */
.theme.locked{opacity:.6;cursor:default}
.theme.locked .ic{filter:grayscale(1)}
@media (max-width:360px){.kilo-message{gap:10px}.kilo-message>.kilo-companion{width:48px;height:48px}}
@media (prefers-reduced-motion:no-preference){
  html:not(.still) .kilo-celebrate,html:not(.still) .kilo-flex{animation:kilo-cheer .55s ease-out both}
  html:not(.still) .kilo-welcome{animation:kilo-hello .45s ease-out both}
}
@keyframes kilo-cheer{0%{transform:rotate(-10deg) scale(.9)}45%{transform:translateY(-5px) rotate(8deg)}75%{transform:rotate(-3deg)}100%{transform:none}}
@keyframes kilo-hello{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}

/* Bring existing workouts to the crew before offering the optional set logger. */
.workout-sources{min-width:0}
.workout-sources .source-option:last-of-type{border-bottom:0}
.workout-sources h2{font-size:1.65rem;line-height:1.12;margin:0 0 10px}
.source-option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.source-option>div{min-width:0;flex:1}
.source-option b{font-size:.95rem}
.source-option p{margin:4px 0 0;text-wrap:pretty}
.source-note{margin:12px 0 0}
.source-option .btn{flex:none;min-height:44px;min-width:44px;width:auto}
.source-option .btn[aria-pressed=true]{background:var(--mark);color:var(--mark-ink)}
.source-status:empty{display:none}
/* The heading with its ×, which hides the card until Customize turns it back on. */
.ws-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.ws-x{flex:none;width:44px;height:44px;border-radius:12px;color:var(--ink2);cursor:pointer;touch-action:manipulation}
@media (hover:hover){.ws-x:hover{background:var(--surface2);color:var(--ink)}}
.ws-x:focus-visible{outline:2px solid var(--mark);outline-offset:2px}
#hevy-sheet .sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
#hevy-heading{margin:0}
#hevy-sheet .ib{flex:none;min-width:44px;min-height:44px}
#hevy-file{width:100%;min-width:0;font-size:16px;margin-bottom:16px}
#hevy-file::file-selector-button{min-height:44px;margin-right:8px}
#hevy-preview{margin:12px 0;overflow-wrap:anywhere}
@media(max-width:380px){.source-option{flex-wrap:wrap}.source-option>div{flex-basis:100%}.source-option .btn{width:100%}}
/* Match phone's theme swatch: a flat dark half and a flat light half, split on the diagonal (two solid fills, no gradient) */
.theme .sw{position:relative;overflow:hidden}
.theme .sw .sw-half{position:absolute;inset:0;clip-path:polygon(100% 0,100% 100%,0 100%)}
.theme .sw i{position:relative}
/* Offline chip (js/features/offline.js): drops in under the status bar, above everything but dialogs */
#netchip{position:fixed;left:50%;top:calc(env(safe-area-inset-top,0px) + 8px);z-index:90;transform:translate(-50%,-150%);opacity:0;
  padding:8px 14px;border-radius:999px;background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:0 4px 14px var(--shadow-c);
  font-size:.82rem;font-weight:600;white-space:nowrap;pointer-events:none;transition:transform .32s cubic-bezier(.3,1.3,.5,1),opacity .2s}
#netchip.off{color:var(--warn,var(--ink))}
#netchip.in{transform:translate(-50%,0);opacity:1}
@media (prefers-reduced-motion:reduce){#netchip,#netchip.in{transform:translate(-50%,0);transition:opacity .2s}}

/* Video posters (js/features/video.js posterHtml): a tiny copy blurred underneath, the sharp poster fading in on top */
.vt,.lr-v{position:relative;overflow:hidden}
.ph-blur{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(10px);transform:scale(1.2)}
.vs-media>.ph-blur{grid-area:1/1}
.ph-img{position:relative;opacity:0;transition:opacity .25s ease-out}
.vs-media>.ph-img{grid-area:1/1}
.ph-img.ld{opacity:1}

/* Lograr Pro (js/features/paywall.js): the Pro tag on Pro looks, and the Pro sheet. */
.pro-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;font-size:.7rem;font-weight:700;line-height:1.5;vertical-align:1px;background:var(--accent);color:var(--accent-ink);font-family:var(--f-lockin,inherit)}
.fonts button .pro-tag{margin:2px 0 0}
.cz-pro{margin-top:14px}
#prosheet .sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#prosheet .sheet-head h2{margin:8px 0}
.pro-trying{display:inline-block;margin:0 0 12px;padding:4px 10px;border-radius:999px;border:1px solid var(--line);font-size:.85rem;color:var(--muted)}
.pro-perks{list-style:none;margin:0 0 16px;padding:0;display:grid;gap:8px}
.pro-perks li{border:1px solid var(--line);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.pro-perks li.on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.pro-perks b{font-size:.95rem}
.pro-free{margin:-6px 0 16px;color:var(--ink2)}
.pro-free b{color:var(--ink)}
.pro-perks span{font-size:.8rem;color:var(--muted)}
.pro-plans{grid-template-columns:1fr 1fr;margin-bottom:12px}
.pro-plans button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:72px;padding:10px 12px;text-align:left}
.pro-plans button span{font-weight:500}
.pro-plans button small{color:var(--good);font-weight:600}
.pro-plans .skel-b{display:block;min-height:72px;border-radius:8px;background:var(--surface2);animation:skel-pulse 1.1s ease-in-out infinite alternate}
.pro-have{margin:4px 0 14px;font-weight:600}
.pro-fine{margin:10px 0 4px}
#prosheet .btn.sm{width:auto;margin-top:8px}
.pro-legal{display:flex;gap:8px;flex-wrap:wrap}
@media (prefers-reduced-motion:reduce){.pro-plans .skel-b{animation:none;opacity:.7}}
