/* GymApp — dark neon design system (single committed theme, per Refs/UI) */

:root{
  --bg:#0A0A0C;
  --surface:#16161A;
  --surface-2:#1F1F25;
  --line:#26262D;
  --line-soft:#1C1C22;
  --text:#F4F4F6;
  --muted:#93939E;
  --faint:#5A5A64;
  --lime:#CDF32F;
  --lime-dim:#8FB014;
  --lime-glow:rgba(205,243,47,.45);
  --lime-soft:rgba(205,243,47,.12);
  --orange:#FF9757;
  --blue:#5AB2FF;
  --danger:#FF6B5E;
  --r-card:20px;
  --r-input:12px;
  --font-display:'Chakra Petch',system-ui,sans-serif;
  --font-body:'Figtree',system-ui,-apple-system,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
/* the document never scrolls — #app is the only scroller (app shell) */
html{background:var(--bg);height:100%;overflow:hidden}
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.45;
  height:100%;
  overflow:hidden;
}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;touch-action:manipulation}
/* cursor:pointer doubles as iOS WebKit's "clickable" signal — without it taps
   on [data-action] divs never synthesize a click; manipulation kills the
   double-tap-zoom hijack on rapid stepper taps */
[data-action]{cursor:pointer;touch-action:manipulation}
input,textarea{font:inherit;color:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--lime);outline-offset:2px;border-radius:6px;
}
svg{display:block}

/* ---- phone column ---- */
/* #app is the app's OWN scroll container (app-shell pattern): sticky bars
   anchor to it regardless of any host-page CSS (the artifact wrapper's
   resets/overflow broke sticky against the document scroll), and since the
   document itself never scrolls, mobile URL-bar collapse jank cannot occur.
   Column flex keeps the sticky bottom bars at the bottom on short views. */
#app{
  /* fixed inset, NOT height:100dvh — dvh inside the artifact iframe on iOS
     resolves against the wrong viewport and pushes the bottom bar below
     the fold; inset:0 is exactly the frame, everywhere */
  position:fixed;inset:0;
  max-width:430px;
  margin:0 auto;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:calc(14px + env(safe-area-inset-top)) 18px 0;
  display:flex;flex-direction:column;
}
#app::-webkit-scrollbar{width:0;height:0}
@media (min-width:520px){
  body{background:#050506}
  #app{background:var(--bg);border-left:1px solid var(--line-soft);border-right:1px solid var(--line-soft)}
}

/* opacity only — a transform here would turn .view into the containing
   block for the sticky/fixed overlays and pull them off the viewport */
.view{animation:view-in .28s ease;display:flex;flex-direction:column;flex:1 0 auto;min-width:0}
@keyframes view-in{from{opacity:0}to{opacity:1}}

/* ---- typography ---- */
h1,h2,h3,.num{font-family:var(--font-display)}
h1{font-size:22px;font-weight:700;line-height:1.2;text-wrap:balance}
.sect{
  font-size:16px;font-weight:600;letter-spacing:.02em;
  margin:26px 0 12px;display:flex;align-items:baseline;gap:8px;
}
.sect small{font-family:var(--font-body);font-size:12px;color:var(--muted);font-weight:500}
.eyebrow{
  font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;
  color:var(--lime);font-family:var(--font-display);
}
.muted{color:var(--muted)}
.num,.tnum{font-variant-numeric:tabular-nums}

/* ---- generic bits ---- */
.card{
  background:var(--surface);
  border:1px solid var(--line-soft);
  border-radius:var(--r-card);
  padding:16px;
}
.chip{
  display:inline-flex;align-items:center;gap:5px;
  background:var(--surface-2);border-radius:999px;
  padding:5px 11px;font-size:12px;font-weight:500;color:var(--muted);
  white-space:nowrap;
}
.chip svg{width:13px;height:13px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--lime);color:#0A0A0C;
  font-family:var(--font-display);font-weight:600;font-size:15px;
  border-radius:999px;padding:14px 22px;
  box-shadow:0 0 22px rgba(205,243,47,.22);
  transition:transform .12s ease,box-shadow .2s ease,opacity .2s;
  user-select:none;
}
.btn:active{transform:scale(.97)}
.btn.wide{width:100%}
.btn.ghost{background:transparent;color:var(--text);border:1px solid var(--line);box-shadow:none}
.btn.danger{background:transparent;color:var(--danger);border:1px solid rgba(255,107,94,.35);box-shadow:none}
.btn[disabled]{opacity:.4;pointer-events:none}
.btn svg{width:17px;height:17px}
.iconbtn{
  width:38px;height:38px;border-radius:12px;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-2);color:var(--muted);
  transition:background .15s;
}
.iconbtn:active{background:var(--line)}
.iconbtn svg{width:18px;height:18px}

/* glowing halftone-bar icons (signature graphic, from IntroApp ref) */
.bars line{stroke:var(--lime);stroke-linecap:round}
.bars{filter:drop-shadow(0 0 9px var(--lime-glow))}
.bars.dim line{stroke:#3C3C46}
.bars.dim{filter:none}
.bars.ink line{stroke:#0A0A0C}
.bars.ink{filter:none}
/* corner "B" tag on light-day icons (Tirón B / Empuje B) */
.bars .bbh{fill:#101014}
.bars .bbx{fill:var(--lime)}
.bars .bb text{fill:#0A0A0C;font:700 24px var(--font-display)}
.bars.dim .bbx{fill:#3C3C46}
.bars.dim .bbh{fill:#101014}

/* ---- app header ---- */
.apphead{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.avatar{
  width:46px;height:46px;border-radius:50%;flex:0 0 auto;
  background:linear-gradient(140deg,var(--surface-2),#2A2A32);
  border:1px solid var(--line);
  font-family:var(--font-display);font-weight:700;font-size:18px;color:var(--lime);
  display:flex;align-items:center;justify-content:center;
}
.hgreet{flex:1;min-width:0}
.hgreet h1{font-size:19px}
.hgreet p{font-size:12.5px;color:var(--muted)}
.langpill{
  flex:0 0 auto;display:flex;align-items:center;gap:6px;
  border:1px solid var(--line);border-radius:999px;padding:8px 12px;
  font-family:var(--font-display);font-size:12px;font-weight:600;letter-spacing:.06em;color:var(--muted);
}
.langpill svg{width:14px;height:14px}
.langpill b{color:var(--text)}

/* ---- calendar (week strip, per calendar.png ref) ---- */
.cal{padding:14px 12px 12px}
.cal-head{display:flex;align-items:center;gap:8px;margin:0 4px 12px}
.cal-month{
  flex:1;text-align:center;font-family:var(--font-display);
  font-weight:600;font-size:14px;letter-spacing:.02em;
}
.todaychip{
  font-size:11px;font-weight:600;color:var(--lime);
  border:1px solid rgba(205,243,47,.4);border-radius:999px;padding:4px 10px;
  font-family:var(--font-display);letter-spacing:.05em;
}
.cal-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-day{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:9px 0 7px;border-radius:14px;
  transition:background .15s;
}
.cal-day .dw{font-size:10px;font-weight:600;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}
.cal-day .dn{font-family:var(--font-display);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.cal-day .dot{width:4px;height:4px;border-radius:50%;background:transparent}
.cal-day.has .dot{background:var(--lime);box-shadow:0 0 6px var(--lime-glow)}
.cal-day.today:not(.sel) .dn{color:var(--lime)}
.cal-day.sel{
  background:var(--lime);
  box-shadow:0 0 18px rgba(205,243,47,.35);
}
.cal-day.sel .dw,.cal-day.sel .dn{color:#0A0A0C}
.cal-day.sel .dot{background:transparent;box-shadow:none}
.cal-day.sel.has .dot{background:rgba(10,10,12,.55)}

/* ---- day card / CTA ---- */
.daycard{margin-top:14px;overflow:hidden;position:relative}
.daycard .dc-top{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.daycard .dc-top .bars{width:54px;height:54px;flex:0 0 auto}
.dc-name{font-family:var(--font-display);font-weight:700;font-size:17px}
.dc-status{font-size:12.5px;font-weight:600;margin-top:2px}
.dc-status.ok{color:var(--lime)}
.dc-status.live{color:var(--orange)}
.dc-stats{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.cta{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:24px 18px 18px}
.cta .bars{width:84px;height:84px;margin-bottom:4px}
.cta p{color:var(--muted);font-size:13.5px;max-width:26ch}
.cta .btn{margin-top:10px;align-self:stretch}

/* ---- stats ---- */
.statwide{margin-bottom:10px}
.statwide .sw-top{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:4px}
.statwide .sw-label{font-size:12.5px;font-weight:600;color:var(--muted)}
.statwide .sw-val{font-family:var(--font-display);font-size:24px;font-weight:700;font-variant-numeric:tabular-nums}
.statwide .sw-val small{font-size:13px;color:var(--muted);font-weight:600}
.wkbars{display:flex;align-items:flex-end;gap:7px;height:64px;margin-top:10px}
.wkcol{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.wkbar{width:100%;border-radius:7px;background:var(--surface-2);min-height:5px}
.wkbar.on{background:var(--lime);box-shadow:0 0 10px rgba(205,243,47,.28)}
.wkbar.tod.on{background:#E7FF70}
.wkcol span{font-size:9.5px;font-weight:600;letter-spacing:.06em;color:var(--faint);text-transform:uppercase}
.statrow{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.statcard{display:flex;align-items:center;gap:12px;padding:14px}
.statcard .ring{flex:0 0 auto}
.statcard .sc-val{font-family:var(--font-display);font-size:18px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1}
.statcard .sc-val small{font-size:11px;color:var(--muted)}
.statcard .sc-label{font-size:11.5px;font-weight:600;color:var(--muted);margin-top:2px}

/* ---- bottom nav ---- */
/* sticky, not fixed: fixed bottom bars lag and drop taps on mobile while
   the URL bar or keyboard animates — sticky stays in layout and hit-tests
   where it paints */
.nav{
  position:sticky;bottom:0;z-index:40;
  flex:0 0 auto;
  margin:14px -18px 0;
  display:flex;
  padding:10px 8px calc(10px + env(safe-area-inset-bottom) + var(--vclip,0px));
  background:rgba(10,10,12,.82);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-top:1px solid var(--line-soft);
}
/* iOS WebKit only: a backdrop-filter layer inside the #app scroller can
   detach while scrolling and ghost over every view as a stuck translucent
   box — trade the blur for a near-solid background there (this @supports
   matches iOS WebKit, not desktop browsers) */
@supports (-webkit-touch-callout: none){
  .nav{backdrop-filter:none;-webkit-backdrop-filter:none;background:rgba(10,10,12,.95)}
}
.nav button{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;
  color:var(--faint);padding:4px 0;
}
.nav button svg{width:22px;height:22px}
.nav button span{font-size:10px;font-weight:600;letter-spacing:.04em}
.nav button.on{color:var(--lime)}
.nav button.on svg{filter:drop-shadow(0 0 7px var(--lime-glow))}

/* ---- body-part carousel (per ExcerciseSelectionMen ref) ---- */
.selhead{text-align:center;margin:10px 0 4px}
.selhead h1{font-size:26px}
.selhead p{color:var(--muted);font-size:13.5px;margin-top:6px}
#car{
  /* z-index:0 opens a stacking context so the cards' inline z-index (up to
     100) stays INSIDE it — without this they paint over the bottom nav
     (z 40) whenever a short viewport makes the view scroll */
  position:relative;z-index:0;height:var(--car-h,440px);margin-top:6px;
  touch-action:pan-y;overflow:hidden;
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
}
#car::before{
  content:"";position:absolute;left:50%;bottom:-40px;transform:translateX(-50%);
  width:340px;height:260px;border-radius:50%;
  background:radial-gradient(closest-side,rgba(205,243,47,.13),transparent 70%);
  pointer-events:none;
}
.bp-card{
  /* left offset = half the card's own width formula, so it is exactly
     centered at every container width */
  position:absolute;left:calc(50% - min(150px, 40%));top:24px;
  width:min(300px,80%);height:var(--card-h,378px);
  background:linear-gradient(165deg,#1E1E24 0%,#131317 70%);
  border:1px solid var(--line);border-radius:28px;
  padding:26px 22px 22px;
  display:flex;flex-direction:column;align-items:center;text-align:center;
  transition:transform .38s cubic-bezier(.22,.9,.3,1),opacity .3s,border-color .3s,box-shadow .3s;
  will-change:transform;
}
#car.dragging .bp-card{transition:opacity .3s}
.bp-card.active{border-color:rgba(205,243,47,.45);box-shadow:0 18px 50px rgba(0,0,0,.55),0 0 34px rgba(205,243,47,.10)}
.bp-card .bars{width:var(--card-bars,118px);height:var(--card-bars,118px);margin:8px 0 6px}
.bp-card h3{font-size:21px;font-weight:700;margin-top:2px;text-wrap:balance}
.bp-card .bp-sub{font-size:12.5px;color:var(--muted);margin-top:5px}
.bp-card .bp-chips{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:12px}
.bp-card .bp-go{
  margin-top:auto;width:100%;
  opacity:0;transform:translateY(8px);pointer-events:none;
  transition:opacity .25s,transform .25s;
  display:flex;flex-direction:column;align-items:center;gap:2px;
}
.bp-card.active .bp-go{opacity:1;transform:none;pointer-events:auto}
.bp-card .hintch{color:var(--lime);animation:hint-bob 1.6s ease-in-out infinite;margin-bottom:6px}
.bp-card .hintch svg{width:18px;height:18px}
@keyframes hint-bob{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(5px);opacity:1}}
.bp-card .btn{width:100%}
.bp-card .soon{
  margin-top:auto;display:flex;align-items:center;gap:7px;
  color:var(--faint);font-size:12.5px;font-weight:600;
  border:1px dashed var(--line);border-radius:999px;padding:10px 16px;
}
.bp-card .soon svg{width:14px;height:14px}
.cardots{display:flex;justify-content:center;gap:2px;margin-top:2px}
.cardots button{padding:10px 5px;display:flex;align-items:center}
.cardots i{display:block;width:6px;height:6px;border-radius:50%;background:var(--line);transition:all .25s}
.cardots i.on{background:var(--lime);width:18px;border-radius:4px;box-shadow:0 0 8px var(--lime-glow)}

/* short viewports (mobile browser chrome, artifact host frame): compact the
   selection view in steps so cards, dots and nav all stay visible without
   scrolling — each tier's total height fits the tier above's lower bound */
@media (max-height:748px){
  :root{--car-h:400px;--card-h:348px;--card-bars:102px}
  .selhead{margin:4px 0 2px}
  .selhead h1{font-size:24px}
  .selhead p{margin-top:3px}
}
@media (max-height:664px){
  :root{--car-h:338px;--card-h:298px;--card-bars:78px}
  .pagehead{margin-bottom:8px}
  .selhead h1{font-size:22px}
  .selhead p{font-size:12.5px}
  .bp-card{padding:18px 18px 16px}
  .bp-card h3{font-size:19px}
  .bp-card .bp-chips{margin-top:8px}
}
@media (max-height:584px){
  :root{--car-h:306px;--card-h:260px;--card-bars:56px}
  .selhead p{display:none}
  .bp-card .hintch{display:none}
  .bp-card .bars{margin:2px 0}
  .bp-card .btn{padding:12px 18px;font-size:14px}
}

/* ---- routine detail ---- */
.pagehead{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.pagehead .ph-txt{flex:1;min-width:0}
.pagehead h1{font-size:20px}
.pagehead .ph-sub{font-size:12px;color:var(--muted);margin-top:2px}
.rt-meta{display:flex;gap:8px;flex-wrap:wrap;margin:2px 0 6px}
.rt-obj{font-size:13.5px;color:var(--muted);margin:10px 2px 4px;line-height:1.55}
.rt-obj b{color:var(--text);font-weight:600}
.grp-head{display:flex;align-items:baseline;gap:8px;margin:22px 2px 10px}
.grp-head h2{font-size:15px;letter-spacing:.02em}
.grp-head small{font-size:11.5px;color:var(--muted);font-weight:500}
.grp-head .grp-line{flex:1;height:1px;background:var(--line-soft)}
.exrow{margin-bottom:8px;padding:14px}
.exrow .xr-top{display:flex;align-items:center;gap:12px}
.exnum{
  width:30px;height:30px;flex:0 0 auto;border-radius:10px;
  background:var(--lime-soft);color:var(--lime);
  font-family:var(--font-display);font-weight:700;font-size:13px;
  display:flex;align-items:center;justify-content:center;
}
.exnum.warm{background:var(--surface-2);color:var(--muted)}
.xr-info{flex:1;min-width:0}
.xr-name{font-weight:600;font-size:14.5px}
.xr-meta{font-size:12px;color:var(--muted);margin-top:2px;font-variant-numeric:tabular-nums}
.xr-chev{color:var(--faint);transition:transform .25s}
.xr-chev svg{width:16px;height:16px}
.exrow.open .xr-chev{transform:rotate(180deg)}
.xr-tip{
  max-height:0;overflow:hidden;transition:max-height .3s ease,margin .3s;
  font-size:13px;color:var(--muted);line-height:1.55;
}
.exrow.open .xr-tip{max-height:220px;margin-top:11px}
.xr-tip .tiplabel{color:var(--lime);font-weight:600;font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-family:var(--font-display);display:block;margin-bottom:3px}
.xr-tip .focusline{margin-top:7px}
.xr-tip .focusline b{color:var(--text);font-weight:600}
.rules{margin-top:18px;padding:0;overflow:hidden}
.rules .rl-head{display:flex;align-items:center;gap:10px;width:100%;padding:15px 16px;text-align:left}
.rules .rl-head h2{font-size:14.5px;flex:1}
.rules .rl-head svg{width:16px;height:16px;color:var(--faint);transition:transform .25s}
.rules.open .rl-head svg{transform:rotate(180deg)}
.rules ul{max-height:0;overflow:hidden;transition:max-height .35s ease;list-style:none}
.rules.open ul{max-height:900px}
.rules li{
  padding:11px 16px 11px 34px;position:relative;
  font-size:13px;color:var(--muted);line-height:1.55;
  border-top:1px solid var(--line-soft);
}
.rules li::before{content:"";position:absolute;left:16px;top:18px;width:7px;height:7px;border-radius:2px;background:var(--lime);box-shadow:0 0 6px var(--lime-glow)}
.rules li b{color:var(--text);font-weight:600}

/* sticky action bar (routine + session) — same rationale as .nav;
   margin-top:auto pushes it to the bottom on short content */
.actionbar{
  position:sticky;bottom:0;z-index:40;
  flex:0 0 auto;
  margin:auto -18px 0;
  padding:12px 18px calc(14px + env(safe-area-inset-bottom) + var(--vclip,0px));
  background:linear-gradient(to top,rgba(10,10,12,.96) 60%,transparent);
}
.actionbar .note{text-align:center;font-size:11.5px;color:var(--muted);margin-bottom:8px}

/* ---- session ---- */
.sess-prog{margin:2px 0 16px}
.sess-prog .sp-row{display:flex;justify-content:space-between;align-items:baseline;font-size:12px;color:var(--muted);margin-bottom:7px;font-variant-numeric:tabular-nums}
.sess-prog .sp-row b{color:var(--text);font-family:var(--font-display)}
.sp-track{height:5px;border-radius:3px;background:var(--surface-2);overflow:hidden}
.sp-fill{height:100%;border-radius:3px;background:var(--lime);box-shadow:0 0 10px var(--lime-glow);transition:width .3s ease}
.excard{margin-bottom:10px;padding:0;overflow:hidden}
.xc-row{display:flex;align-items:stretch}
.excard .xc-head{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:14px 6px 14px 14px;text-align:left}
.xc-exp{width:46px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;color:var(--faint)}
.excard.open .xc-exp .xr-chev{transform:rotate(180deg)}
.xc-play{width:30px;height:30px;flex:0 0 auto;border-radius:50%;background:var(--lime-soft);color:var(--lime);display:flex;align-items:center;justify-content:center}
.xc-play svg{width:12px;height:12px;margin-left:1px}
.xc-done{
  font-family:var(--font-display);font-size:12px;font-weight:600;color:var(--faint);
  font-variant-numeric:tabular-nums;flex:0 0 auto;
}
.excard.full .xc-done{color:var(--lime)}
.excard.full .exnum{background:var(--lime);color:#0A0A0C;box-shadow:0 0 10px rgba(205,243,47,.3)}
.xc-body{display:none;padding:0 14px 14px;border-top:1px solid var(--line-soft)}
.excard.open .xc-body{display:block}
.xc-note{font-size:12.5px;color:var(--muted);line-height:1.5;margin:12px 2px 0}
.xc-note b{color:var(--lime);font-weight:600}
.xc-prev{
  display:flex;align-items:center;gap:7px;
  font-size:12px;color:var(--muted);margin:12px 2px 0;font-variant-numeric:tabular-nums;
}
.xc-prev svg{width:13px;height:13px;color:var(--faint);flex:0 0 auto}
.xc-prev b{color:var(--text)}
.setgrid{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.sethead{display:grid;grid-template-columns:30px 1fr 1fr 42px;gap:8px;padding:0 2px;
  font-size:10px;font-weight:600;letter-spacing:.1em;color:var(--faint);text-transform:uppercase;text-align:center}
.setrow{display:grid;grid-template-columns:30px 1fr 1fr 42px;gap:8px;align-items:center}
.setrow .sn{
  font-family:var(--font-display);font-size:13px;font-weight:600;color:var(--muted);
  text-align:center;font-variant-numeric:tabular-nums;
}
.setrow.done .sn{color:var(--lime)}
.stepper{display:flex;align-items:center;gap:4px}
.stepper button{
  width:30px;height:38px;flex:0 0 auto;border-radius:10px;
  background:var(--surface-2);color:var(--muted);
  display:flex;align-items:center;justify-content:center;
}
.stepper button:active{background:var(--lime);color:#0A0A0C}
.stepper button svg{width:13px;height:13px}
.stepper input{
  width:100%;min-width:0;height:38px;text-align:center;
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r-input);
  font-family:var(--font-display);font-weight:600;font-size:14px;
  font-variant-numeric:tabular-nums;
}
.stepper input::placeholder{color:var(--faint);font-weight:500}
.stepper input:focus{border-color:var(--lime);outline:none}
.setrow.done .stepper input{border-color:rgba(205,243,47,.35)}
.setcheck{
  width:38px;height:38px;border-radius:50%;justify-self:center;
  border:2px solid var(--line);color:transparent;
  display:flex;align-items:center;justify-content:center;
  transition:all .18s ease;
}
.setcheck svg{width:16px;height:16px}
.setrow.done .setcheck{background:var(--lime);border-color:var(--lime);color:#0A0A0C;box-shadow:0 0 12px var(--lime-glow)}
.addset{
  margin-top:10px;width:100%;padding:10px;border-radius:12px;
  border:1px dashed var(--line);color:var(--muted);
  font-size:12.5px;font-weight:600;
  display:flex;align-items:center;justify-content:center;gap:6px;
}
.addset svg{width:14px;height:14px}
.sess-done-tag{
  display:flex;align-items:center;justify-content:center;gap:8px;
  color:var(--lime);font-family:var(--font-display);font-weight:600;font-size:14px;
  padding:13px;border:1px solid rgba(205,243,47,.3);border-radius:999px;
  background:var(--lime-soft);
}
.sess-done-tag svg{width:16px;height:16px}

/* rest timer pill */
#rest{position:fixed;bottom:calc(96px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:50;width:min(394px,calc(100% - 36px));pointer-events:none}
.restpill{
  pointer-events:auto;
  display:flex;align-items:center;gap:12px;
  background:#1B1B21;border:1px solid var(--line);border-radius:18px;
  padding:10px 12px;
  box-shadow:0 12px 34px rgba(0,0,0,.6);
  animation:pill-in .25s ease;
}
@keyframes pill-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.restpill .rp-txt{flex:1;min-width:0}
.restpill .rp-label{font-size:10.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.restpill .rp-time{font-family:var(--font-display);font-size:19px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.15}
.restpill .rp-btn{
  flex:0 0 auto;border:1px solid var(--line);border-radius:999px;
  padding:8px 12px;font-size:12px;font-weight:600;color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.restpill .rp-btn:active{background:var(--surface-2)}
.restpill.over{background:var(--lime);border-color:var(--lime);animation:pill-pulse .8s ease infinite}
.restpill.over .rp-label,.restpill.over .rp-time{color:#0A0A0C}
.restpill.over .rp-btn{color:#0A0A0C;border-color:rgba(10,10,12,.3)}
@keyframes pill-pulse{0%,100%{box-shadow:0 0 18px rgba(205,243,47,.4)}50%{box-shadow:0 0 38px rgba(205,243,47,.75)}}

/* ---- progress ---- */
.chiprow{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:none}
.chiprow::-webkit-scrollbar{display:none}
.exchip{
  flex:0 0 auto;border-radius:999px;padding:9px 15px;
  background:var(--surface);border:1px solid var(--line-soft);
  font-size:12.5px;font-weight:600;color:var(--muted);
  transition:all .18s;
}
.exchip.on{background:var(--lime);color:#0A0A0C;border-color:var(--lime);box-shadow:0 0 14px rgba(205,243,47,.25)}
.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:3px;gap:3px}
.seg button{
  flex:1;padding:8px 10px;border-radius:9px;
  font-size:12px;font-weight:600;color:var(--muted);
  font-family:var(--font-display);
}
.seg button.on{background:var(--lime);color:#0A0A0C}
.prcard{margin-top:12px}
.pr-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.pr-big{font-family:var(--font-display);font-size:26px;font-weight:700;font-variant-numeric:tabular-nums}
.pr-big small{font-size:13px;color:var(--muted);font-weight:600}
.pr-tag{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.1em;color:var(--orange);font-family:var(--font-display)}
.pr-tag svg{width:14px;height:14px}
.trend{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.trend.up{color:var(--lime)}
.trend.dn{color:var(--danger)}
.trend.flat{color:var(--muted)}
.chartwrap{margin-top:8px}
.chartwrap svg{width:100%;height:auto}
.sesslist{margin-top:6px;display:flex;flex-direction:column;gap:8px}
.sessrow{display:flex;align-items:center;gap:12px;padding:13px 14px;text-align:left}
.sessrow .sr-date{
  font-family:var(--font-display);font-size:11.5px;font-weight:600;color:var(--lime);
  background:var(--lime-soft);border-radius:9px;padding:7px 9px;flex:0 0 auto;
  min-width:52px;text-align:center;
}
.sessrow .sr-info{flex:1;min-width:0;display:flex;flex-direction:column}
.sessrow .sr-main{font-size:13.5px;font-weight:600;font-variant-numeric:tabular-nums}
.sessrow .sr-sub{font-size:11.5px;color:var(--muted);margin-top:1px;font-variant-numeric:tabular-nums}
.sessrow svg{width:15px;height:15px;color:var(--faint);flex:0 0 auto}
.emptybox{
  display:flex;flex-direction:column;align-items:center;gap:10px;
  text-align:center;padding:34px 20px;color:var(--muted);font-size:13.5px;
}
.emptybox .bars{width:74px;height:74px}

/* ---- settings ---- */
.setgroup{margin-bottom:10px;padding:6px 16px}
.setitem{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line-soft)}
.setitem:last-child{border-bottom:0}
.setitem .si-label{flex:1;font-size:14px;font-weight:500}
.setitem .si-sub{font-size:11.5px;color:var(--muted);margin-top:2px;font-weight:400}
.setitem input[type=text]{
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r-input);
  padding:9px 12px;width:150px;font-size:14px;
}
.setitem input[type=text]:focus{border-color:var(--lime);outline:none}
.setitem .seg{width:150px}
.goalstep{display:flex;align-items:center;gap:10px}
.goalstep button{
  width:32px;height:32px;border-radius:10px;background:var(--surface-2);color:var(--muted);
  display:flex;align-items:center;justify-content:center;
}
.goalstep button svg{width:13px;height:13px}
.goalstep b{font-family:var(--font-display);font-size:16px;min-width:20px;text-align:center;font-variant-numeric:tabular-nums}
.about{text-align:center;color:var(--faint);font-size:11.5px;margin-top:22px;line-height:1.7}
/* cloud sync indicator (settings) */
.synccloud{width:26px;height:26px;flex:0 0 auto;color:var(--faint);transition:color .3s}
.synccloud svg{width:100%;height:100%}
.synccloud[data-s="ok"]{color:var(--lime);filter:drop-shadow(0 0 7px var(--lime-glow))}
.synccloud[data-s="saving"]{color:var(--orange)}
.synccloud[data-s="err"]{color:var(--danger)}

/* ---- modal sheet ---- */
#modal{position:fixed;inset:0;z-index:60;pointer-events:none}
#modal.open{pointer-events:auto}
/* the closed modal keeps its DOM for the exit transition — it must never
   swallow taps meant for the page during those 300ms */
#modal:not(.open) .sheet,#modal:not(.open) .sheet-backdrop{pointer-events:none}
.sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.65);opacity:0;transition:opacity .25s}
#modal.open .sheet-backdrop{opacity:1}
.sheet{
  position:absolute;bottom:0;left:50%;transform:translate(-50%,20px);
  width:min(430px,100%);
  background:#18181D;border:1px solid var(--line);border-bottom:0;
  border-radius:26px 26px 0 0;
  padding:22px 20px calc(22px + env(safe-area-inset-bottom));
  opacity:0;transition:transform .28s cubic-bezier(.22,.9,.3,1),opacity .2s;
}
#modal.open .sheet{transform:translate(-50%,0);opacity:1}
.sheet::before{content:"";display:block;width:40px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 16px}
.sheet h2{font-size:18px;text-align:center;text-wrap:balance}
.sheet .sh-sub{text-align:center;color:var(--muted);font-size:13px;margin-top:6px;line-height:1.5}
.sh-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0 4px}
.sh-stat{background:var(--surface-2);border-radius:14px;padding:12px 8px;text-align:center}
.sh-stat .v{font-family:var(--font-display);font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}
.sh-stat .v small{font-size:10.5px;color:var(--muted)}
.sh-stat .l{font-size:10px;font-weight:600;letter-spacing:.06em;color:var(--muted);text-transform:uppercase;margin-top:3px}
.sheet .sh-btns{display:flex;flex-direction:column;gap:9px;margin-top:18px}
.sheet textarea{
  width:100%;min-height:110px;margin-top:14px;resize:vertical;
  background:var(--bg);border:1px solid var(--line);border-radius:14px;
  padding:12px;font-size:12px;font-family:ui-monospace,monospace;color:var(--muted);
}
.sheet textarea:focus{border-color:var(--lime);outline:none}

/* ---- toast ---- */
#toast{
  position:fixed;bottom:calc(104px + env(safe-area-inset-bottom));left:50%;
  transform:translate(-50%,14px);z-index:70;
  background:var(--lime);color:#0A0A0C;
  font-family:var(--font-display);font-weight:600;font-size:13.5px;
  padding:11px 20px;border-radius:999px;
  box-shadow:0 0 26px rgba(205,243,47,.4);
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;
  max-width:calc(100% - 48px);text-align:center;
}
#toast.show{opacity:1;transform:translate(-50%,0)}

/* ---- onboarding (per IntroApp ref) ---- */
.onboard{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;gap:0;padding:20px 8px 30px;position:relative;
}
.onboard::before{
  content:"";position:absolute;top:12%;left:50%;transform:translateX(-50%);
  width:320px;height:320px;border-radius:50%;
  background:radial-gradient(closest-side,rgba(205,243,47,.16),transparent 70%);
  pointer-events:none;
}
.onboard .bars{width:150px;height:150px;animation:logo-glow 2.6s ease-in-out infinite}
@keyframes logo-glow{0%,100%{filter:drop-shadow(0 0 8px var(--lime-glow))}50%{filter:drop-shadow(0 0 20px var(--lime-glow))}}
.onboard .ob-name{
  font-family:var(--font-display);font-size:38px;font-weight:700;letter-spacing:.04em;
  margin-top:18px;
}
.onboard .ob-name em{font-style:normal;color:var(--lime);text-shadow:0 0 18px var(--lime-glow)}
.onboard .ob-tag{color:var(--muted);font-size:14px;margin-top:10px;max-width:30ch;text-wrap:balance}
.onboard .ob-controls{width:100%;max-width:320px;margin-top:38px;display:flex;flex-direction:column;gap:12px}
.onboard .seg{padding:4px}
.onboard .seg button{padding:11px}
.onboard input{
  background:var(--surface);border:1px solid var(--line);border-radius:14px;
  padding:13px 16px;text-align:center;font-size:15px;width:100%;
}
.onboard input:focus{border-color:var(--lime);outline:none}
.onboard .obhint{font-size:11px;color:var(--faint)}

/* ---- misc ---- */
.hr{height:1px;background:var(--line-soft);margin:18px 0}
.center{text-align:center}

/* ---- focus mode: island flow (per Dynamic Island refs) ---- */
.focus{padding-bottom:24px}
.fdots{display:flex;justify-content:center;gap:8px;margin:16px 0 4px}
.fdot{width:9px;height:9px;border-radius:50%;background:var(--surface-2);transition:all .25s}
.fdot.done{background:var(--lime);box-shadow:0 0 8px var(--lime-glow)}
.fdot.cur{background:transparent;border:2px solid var(--lime);animation:dot-pulse 1.5s ease infinite}
@keyframes dot-pulse{0%,100%{box-shadow:0 0 0 0 rgba(205,243,47,.4)}50%{box-shadow:0 0 0 6px rgba(205,243,47,0)}}
.fstage{margin-top:20px;position:relative}
.fstage::before{
  content:"";position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);
  width:320px;height:320px;border-radius:50%;
  background:radial-gradient(closest-side,rgba(205,243,47,.10),transparent 70%);
  pointer-events:none;
}
.island{
  position:relative;
  background:#0D0D10;border:1px solid var(--line);border-radius:30px;
  padding:24px 20px 20px;
  box-shadow:0 24px 60px rgba(0,0,0,.6),0 0 0 1px rgba(205,243,47,.05);
}
.island.anim{animation:island-in .38s cubic-bezier(.22,.9,.3,1)}
@keyframes island-in{from{opacity:0;transform:translateY(26px) scale(.94)}to{opacity:1;transform:none}}
.fctrls{display:flex;gap:12px;justify-content:center;margin:4px 0 16px}
.fctrl{flex:1;max-width:180px;background:var(--surface);border:1px solid var(--line-soft);border-radius:22px;padding:14px 10px 12px;text-align:center}
.fctrl .fl{font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-family:var(--font-display)}
.fstep{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:9px}
.fstep b{font-family:var(--font-display);font-size:33px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1;flex:1;min-width:0}
.fstep button{width:44px;height:44px;border-radius:50%;flex:0 0 auto;background:var(--surface-2);color:var(--text);display:flex;align-items:center;justify-content:center}
.fstep button:active{background:var(--lime);color:#0A0A0C}
.fstep button svg{width:16px;height:16px}
.fhints{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-bottom:16px}
.btn.big{padding:17px 22px;font-size:16px}
.btn.ink{background:#0A0A0C;color:var(--lime);box-shadow:none}
.island .ftip{margin-top:14px;font-size:12px;color:var(--muted);line-height:1.55;text-align:center}
.fr-top{display:flex;align-items:center;justify-content:center;gap:10px}
.fr-label{font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);font-family:var(--font-display)}
.fr-time{font-family:var(--font-display);font-size:58px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums;line-height:1.05;margin:8px 0 14px;text-shadow:0 0 26px rgba(205,243,47,.3)}
.fsegs{display:flex;gap:4px;justify-content:center;align-items:center;height:30px;margin-bottom:14px}
.fsegs i{flex:1;max-width:9px;height:13px;border-radius:3px;background:var(--surface-2);transition:background .3s,height .3s}
.fsegs i.lit{background:var(--lime);height:28px;box-shadow:0 0 7px rgba(205,243,47,.35)}
.fr-next{text-align:center;font-size:12.5px;color:var(--muted);margin-bottom:16px}
.fr-btns{display:flex;gap:10px}
.fr-btns .btn{flex:1}
.island.over{background:var(--lime);border-color:var(--lime);animation:pill-pulse .9s ease infinite}
.island.over .fr-label,.island.over .fr-time,.island.over .fr-next{color:#0A0A0C;text-shadow:none}
.island.over .fsegs i{background:rgba(10,10,12,.16)}
.island.over .fsegs i.lit{background:#0A0A0C;box-shadow:none;height:28px}
.prchip{display:inline-flex;align-items:center;gap:5px;background:rgba(255,151,87,.14);color:var(--orange);border-radius:999px;padding:4px 10px;font-size:11px;font-weight:700;font-family:var(--font-display);letter-spacing:.06em}
.prchip svg{width:13px;height:13px}
.island.over .prchip{background:rgba(10,10,12,.15);color:#0A0A0C}
.island.exdone{text-align:center}
.fdone-badge{
  width:74px;height:74px;border-radius:50%;background:var(--lime);color:#0A0A0C;
  display:flex;align-items:center;justify-content:center;margin:2px auto 14px;
  box-shadow:0 0 32px rgba(205,243,47,.45);
  animation:badge-pop .5s cubic-bezier(.34,1.56,.64,1);
}
.fdone-badge svg{width:34px;height:34px}
@keyframes badge-pop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
.island.exdone h2{font-size:20px}
.fdone-name{color:var(--muted);font-size:13.5px;margin-top:4px}
.island.exdone .bp-chips{margin-top:14px}
.prburst{
  display:inline-flex;align-items:center;gap:7px;margin-top:12px;
  background:rgba(255,151,87,.14);color:var(--orange);border:1px solid rgba(255,151,87,.35);
  border-radius:999px;padding:8px 16px;
  font-family:var(--font-display);font-weight:700;font-size:13px;
  animation:badge-pop .5s .15s cubic-bezier(.34,1.56,.64,1) backwards;
}
.prburst svg{width:16px;height:16px}
.fdone-delta{margin-top:12px;font-size:12.5px;color:var(--muted)}
.island.exdone .sh-btns{margin-top:18px}
#fx{position:fixed;inset:0;pointer-events:none;z-index:80}

/* ---- drop set (orange = intensity accent; last set of flagged exercises) ---- */
.dropchip{
  display:inline-flex;align-items:center;gap:4px;
  background:rgba(255,151,87,.13);color:var(--orange);
  border:1px solid rgba(255,151,87,.3);
  border-radius:999px;padding:2px 8px;margin-left:4px;
  font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  font-family:var(--font-display);white-space:nowrap;vertical-align:2px;
}
.dropchip svg{width:11px;height:11px}
.fhints .dropchip{font-size:11px;padding:4px 10px;margin-left:0}
.island.over .dropchip{background:rgba(10,10,12,.15);color:#0A0A0C;border-color:transparent}
.xr-tip .dropline{margin-top:7px}
.xr-tip .dropline b,.xc-note.dropnote b{color:var(--orange)}
.setrow.drop .sn,.setrow.drop.done .sn{color:var(--orange)}
.setrow.drop .sn svg{width:15px;height:15px;margin:0 auto;filter:drop-shadow(0 0 5px rgba(255,151,87,.45))}
.setrow.drop.done .stepper input{border-color:rgba(255,151,87,.4)}
.setrow.drop.done .setcheck{background:var(--orange);border-color:var(--orange);box-shadow:0 0 12px rgba(255,151,87,.5)}
.island.drop{border-color:rgba(255,151,87,.5);box-shadow:0 24px 60px rgba(0,0,0,.6),0 0 34px rgba(255,151,87,.14)}
.island.drop [data-action="focus-complete"]{background:var(--orange);box-shadow:0 0 22px rgba(255,151,87,.35)}
.island .droptip{margin-top:14px;font-size:12px;color:var(--orange);line-height:1.55;text-align:center}
.island .droptip+.ftip{margin-top:8px}
.fdot.drop{background:rgba(255,151,87,.28)}
.fdot.drop.cur{background:transparent;border-color:var(--orange);animation:dot-pulse-o 1.5s ease infinite}
.fdot.drop.done{background:var(--orange);box-shadow:0 0 8px rgba(255,151,87,.5)}
@keyframes dot-pulse-o{0%,100%{box-shadow:0 0 0 0 rgba(255,151,87,.45)}50%{box-shadow:0 0 0 6px rgba(255,151,87,0)}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
