/* ==========================================================================================================
   v10.9 · calm & liquid. A clean, seamless pass over the whole app:
   · holding the screen never selects text (only fields and chat stay selectable)
   · a 4K deep silk wallpaper, no grain or noise texture anywhere
   · liquid glass on the controls only: buttons, chips, switches, header pills and the tab bar
   · more air: fewer, larger cards; tighter text
   · the new readiness check, habit tiles, the glowing mobility block, the chrome crown, strength per kg
   ========================================================================================================== */

/* ---------- no text selection on long press (it's an app, not a page) */
html,body,.app{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable],[contenteditable] *,.selectable,.selectable *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
img,svg{-webkit-user-drag:none}

/* ---------- the 4K silk wallpaper; texture off */
:root{--wall:none;--grain-o:0;--noise:none}
:root.light{--wall:url(../img/silk-light.jpg);--grain-o:0}
@media (min-aspect-ratio:1/1){:root.light{--wall:url(../img/silk-light-wide.jpg)}}
body::before,.sheet::before{display:none!important}
.aurora{background-size:cover!important;background-position:center top!important}

/* ---------- liquid glass: controls only (cards stay calm and clear) */
:root{
  --lq-fill:linear-gradient(180deg,rgb(255 255 255 / .17),rgb(255 255 255 / .05) 48%,rgb(255 255 255 / .09)),linear-gradient(rgb(14 14 14 / .42),rgb(14 14 14 / .42));
  --lq-spec:radial-gradient(90% 70% at var(--lx,30%) -12%,rgb(255 255 255 / .38),rgb(255 255 255 / 0) 55%);
  --lq-blur:blur(16px) saturate(200%) brightness(1.1);
  --lq-shadow:inset 0 1px .5px rgb(255 255 255 / .62),inset 0 -1px 1px rgb(255 255 255 / .16),inset 1px 0 .5px rgb(255 255 255 / .1),inset -1px 0 .5px rgb(255 255 255 / .06),
    inset 0 -12px 18px -12px rgb(255 255 255 / .16),inset 0 10px 16px -12px rgb(255 255 255 / .12),0 0 0 .5px rgb(255 255 255 / .16),0 10px 24px -14px rgb(0 0 0 / .85);
  --lq-sel:linear-gradient(180deg,rgb(255 255 255 / .3),rgb(255 255 255 / .1) 55%,rgb(255 255 255 / .18));
}
:root.light{
  --lq-fill:linear-gradient(180deg,rgb(255 255 255 / .82),rgb(255 255 255 / .46) 50%,rgb(255 255 255 / .64));
  --lq-spec:radial-gradient(90% 70% at var(--lx,30%) -12%,rgb(255 255 255 / .95),rgb(255 255 255 / 0) 60%);
  --lq-blur:blur(16px) saturate(180%) brightness(1.04);
  --lq-shadow:inset 0 1px .5px rgb(255 255 255 / 1),inset 0 -1px 1px rgb(255 255 255 / .7),inset 0 -10px 16px -12px rgb(10 10 10 / .08),0 0 0 .5px rgb(10 10 10 / .1),0 10px 22px -14px rgb(0 0 0 / .28);
  --lq-sel:linear-gradient(180deg,rgb(10 10 10 / .1),rgb(10 10 10 / .04));
}
:is(.b:not(.ink):not(.inv):not(.ghost),.btn.line,.sq,.chip:not(.on):not(.ghost),.seg,.hdr .brand,.hdr .avatar,.hdr-r>.sq,.gl-pill,.tabbar,.resume){
  background:var(--lq-spec),var(--lq-fill)!important;border-color:transparent!important;
  -webkit-backdrop-filter:var(--lq-blur)!important;backdrop-filter:var(--lq-blur)!important;box-shadow:var(--lq-shadow)!important}
.tabbar::before,.hdr .brand::before,.hdr .avatar::before,.gl-pill::before{
  background:linear-gradient(140deg,rgb(255 255 255 / .75),rgb(255 255 255 / .06) 30%,rgb(190 210 255 / .1) 55%,rgb(255 214 236 / .14) 75%,rgb(255 255 255 / .38))!important;opacity:.85}
:root.light .tabbar::before{opacity:.5}
/* the selected tab and segment: a drop of liquid */
.tabbar a[aria-current=page],.seg-thumb{background:var(--lq-sel)!important;box-shadow:inset 0 1px .5px rgb(255 255 255 / .7),inset 0 -1px 1px rgb(255 255 255 / .2),inset 0 -8px 12px -8px rgb(255 255 255 / .25),0 4px 14px -6px rgb(0 0 0 / .6)!important}
:root.light .tabbar a[aria-current=page],:root.light .seg-thumb{box-shadow:inset 0 1px .5px rgb(255 255 255 / 1),0 0 0 .5px rgb(10 10 10 / .08),0 4px 12px -6px rgb(0 0 0 / .22)!important}
.seg{border-radius:999px}
/* the solid buttons get the glass shine on top */
.btn.ink,.b.ink,.btn.inv{background-image:linear-gradient(180deg,rgb(255 255 255 / .0),rgb(0 0 0 / .06))!important;box-shadow:inset 0 1px 0 rgb(255 255 255 / .9),inset 0 -2px 4px rgb(0 0 0 / .1),0 14px 30px -18px rgb(255 255 255 / .35),0 16px 34px -20px rgb(0 0 0 / .9)!important}
:root.light .btn.ink,:root.light .b.ink{box-shadow:inset 0 1px 0 rgb(255 255 255 / .25),0 16px 30px -18px rgb(0 0 0 / .6)!important}
/* a little squish when pressed, like liquid */
:is(.b,.btn,.sq,.chip,.tabbar a).press:active{transform:scale(.96);transition:transform .12s var(--ease)}

/* ---------- more air, fewer lines */
.main{gap:26px}
.gl,.card,.inv{border-radius:28px}
.gl.pad{padding:22px}
.lbl{opacity:.92}

/* ---------- habits: tiles, not a long list */
.hbx{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hbx-t{position:relative;display:flex;align-items:center;gap:10px;min-height:54px;padding:10px 12px;border-radius:18px;text-align:start;
  background:rgb(255 255 255 / .035);box-shadow:inset 0 0 0 .5px rgb(255 255 255 / .09);color:var(--muted);transition:background-color .3s var(--ease),color .3s}
.hbx-t.on{background:rgb(255 255 255 / .1);color:var(--ink);box-shadow:inset 0 1px 0 rgb(255 255 255 / .22),inset 0 0 0 .5px rgb(255 255 255 / .2),0 0 22px -10px rgb(255 255 255 / .6)}
.hbx-c{width:22px;height:22px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1.2px var(--line2);transition:all .3s var(--ease)}
.hbx-t.on .hbx-c{background:var(--ink);color:var(--bg);box-shadow:0 0 12px rgb(255 255 255 / .55)}
.hbx-l{flex:1;min-width:0;font-size:13.5px;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.hbx-a{position:absolute;top:6px;inset-inline-end:10px;font-size:9.5px;letter-spacing:.08em;color:var(--dim)}
:root.light .hbx-t{background:rgb(10 10 10 / .03);box-shadow:inset 0 0 0 .5px rgb(10 10 10 / .08)}
:root.light .hbx-t.on{background:rgb(10 10 10 / .07);box-shadow:inset 0 0 0 .5px rgb(10 10 10 / .14)}
:root.light .hbx-t.on .hbx-c{box-shadow:none}

/* ---------- readiness: ring + liquid sliders + body map */
.rdy-top{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.8fr) minmax(0,.8fr);gap:12px;align-items:end;margin-top:16px}
.rdy-ring{position:relative;aspect-ratio:1;width:100%;max-width:150px;justify-self:center;align-self:center}
.rdy-ring svg{width:100%;height:100%;transform:rotate(-90deg);overflow:visible}
.rdy-trk{fill:none;stroke:rgb(255 255 255 / .08);stroke-width:7}
.rdy-arc{fill:none;stroke-width:7;stroke-linecap:round;transition:stroke-dashoffset .9s var(--ease);filter:drop-shadow(0 0 6px rgb(255 255 255 / .55))}
:root.light .rdy-trk{stroke:rgb(10 10 10 / .08)}
:root.light .rdy-arc{stroke:#0a0a0a;filter:none}
.rdy-mid{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.rdy-pct{font-size:34px;font-weight:300;line-height:1;letter-spacing:-.02em;text-shadow:0 0 18px rgb(255 255 255 / .35)}
.rdy-pct small{font-size:13px;margin-inline-start:2px;color:var(--muted)}
.rdy-w{font-size:11.5px;color:var(--muted);margin-top:6px;max-width:90%}
.lqs{display:flex;flex-direction:column;align-items:center;gap:4px}
.lqs-t{position:relative;width:58px;height:150px;border-radius:29px;overflow:hidden;touch-action:none;cursor:ns-resize;outline:none;
  background:var(--lq-spec),var(--lq-fill);-webkit-backdrop-filter:var(--lq-blur);backdrop-filter:var(--lq-blur);box-shadow:var(--lq-shadow)}
.lqs-t:focus-visible{box-shadow:var(--lq-shadow),0 0 0 2px var(--ink)}
.lqs-f{position:absolute;left:4px;right:4px;bottom:4px;max-height:calc(100% - 8px);border-radius:25px;transition:height .35s cubic-bezier(.3,1.4,.5,1);
  background:linear-gradient(180deg,#fff,#dcdcdc 60%,#bdbdbd);box-shadow:inset 0 2px 2px rgb(255 255 255 / .9),inset 0 -6px 10px rgb(0 0 0 / .14),0 0 24px rgb(255 255 255 / .45)}
.lqs-t.drag .lqs-f{transition:height .12s ease-out}
.lqs-f i{position:absolute;left:18%;right:18%;top:5px;height:7px;border-radius:6px;background:rgb(255 255 255 / .9);filter:blur(1px)}
.lqs-n{position:absolute;left:50%;width:10px;height:1px;margin-left:-5px;background:rgb(255 255 255 / .22)}
.lqs-v{position:absolute;left:0;right:0;top:12px;text-align:center;font-size:20px;font-weight:500;mix-blend-mode:difference;color:#fff;pointer-events:none}
.lqs-t.empty .lqs-v{color:var(--dim);mix-blend-mode:normal}
.lqs-l{font-size:12.5px;font-weight:600;margin-top:6px}
.lqs-w{font-size:11px;color:var(--dim)}
:root.light .lqs-f{background:linear-gradient(180deg,#2a2a2a,#0a0a0a);box-shadow:inset 0 1px 1px rgb(255 255 255 / .25),0 6px 16px -8px rgb(0 0 0 / .5)}
:root.light .lqs-f i{background:rgb(255 255 255 / .35)}
:root.light .lqs-n{background:rgb(10 10 10 / .18)}
.rdy-fresh{font-size:11px!important;letter-spacing:.04em!important;padding:6px 12px!important;border-radius:999px}

/* ---------- the mobility block: breathing light, a play triangle on the right */
.mobx{position:relative;isolation:isolate;width:100%;display:flex;align-items:center;gap:16px;padding:18px 18px 18px 22px;border-radius:28px;color:var(--ink);overflow:hidden;
  background:radial-gradient(120% 140% at 100% 50%,rgb(255 255 255 / .16),rgb(255 255 255 / .02) 60%),rgb(255 255 255 / .03);
  box-shadow:inset 0 1px 0 rgb(255 255 255 / .28),inset 0 0 0 .5px rgb(255 255 255 / .22),0 0 0 1px rgb(255 255 255 / .05)}
.mobx-aura{position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;z-index:-1;
  box-shadow:0 0 22px rgb(255 255 255 / .22),inset 0 0 22px rgb(255 255 255 / .08);animation:mobxBreathe 4.2s ease-in-out infinite}
.mobx::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;
  background:conic-gradient(from var(--mobx-a,0deg),rgb(255 255 255 / .05),rgb(255 255 255 / .75),rgb(255 255 255 / .05) 30%,rgb(255 255 255 / .05) 70%,rgb(255 255 255 / .4),rgb(255 255 255 / .05));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:mobxSpin 9s linear infinite}
@property --mobx-a{syntax:'<angle>';inherits:false;initial-value:0deg}
@keyframes mobxSpin{to{--mobx-a:360deg}}
@keyframes mobxBreathe{0%,100%{opacity:.55}50%{opacity:1}}
.mobx-k{display:block;font-size:11px;letter-spacing:.06em;color:var(--muted)}
.mobx-t{display:block;font-size:19px;font-weight:600;margin-top:3px}
.mobx-s{display:block;font-size:12px;color:var(--dim);margin-top:4px}
.mobx-play{flex:none;width:54px;height:54px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--bg);
  background:radial-gradient(circle at 35% 30%,#fff,#d8d8d8 60%,#a9a9a9);box-shadow:inset 0 1px 1px #fff,inset 0 -3px 6px rgb(0 0 0 / .18),0 0 18px rgb(255 255 255 / .55),0 0 40px rgb(255 255 255 / .25)}
.mobx-play svg{margin-inline-start:3px}
.mobx.done .mobx-aura,.mobx.done::after{animation:none;opacity:.35}
.mobx.done .mobx-play{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--ink)}
:root.light .mobx{background:radial-gradient(120% 140% at 100% 50%,rgb(255 255 255 / .9),rgb(255 255 255 / .45) 60%);box-shadow:inset 0 1px 0 #fff,0 0 0 .5px rgb(10 10 10 / .1),0 16px 30px -20px rgb(0 0 0 / .35)}
:root.light .mobx-aura{box-shadow:0 0 22px rgb(10 10 10 / .12)}
:root.light .mobx::after{background:conic-gradient(from var(--mobx-a,0deg),rgb(10 10 10 / .02),rgb(10 10 10 / .35),rgb(10 10 10 / .02) 30%,rgb(10 10 10 / .02) 70%,rgb(10 10 10 / .2),rgb(10 10 10 / .02))}
:root.light .mobx-play{background:radial-gradient(circle at 35% 30%,#4a4a4a,#0a0a0a);color:#fff;box-shadow:0 8px 18px -8px rgb(0 0 0 / .6)}
.inv .mobx{color:var(--inv-ink);background:rgb(0 0 0 / .05);box-shadow:inset 0 0 0 .5px var(--inv-line)}
.inv .mobx-aura{box-shadow:none}
.inv .mobx::after{background:conic-gradient(from var(--mobx-a,0deg),rgb(10 10 10 / .02),rgb(10 10 10 / .4),rgb(10 10 10 / .02) 30%,rgb(10 10 10 / .02) 70%,rgb(10 10 10 / .2),rgb(10 10 10 / .02))}
.inv .mobx-k,.inv .mobx-s{color:var(--inv-dim)}
.inv .mobx-play{background:radial-gradient(circle at 35% 30%,#4a4a4a,#0a0a0a);color:#fff;box-shadow:0 8px 18px -8px rgb(0 0 0 / .6)}
@media (prefers-reduced-motion:reduce){.mobx-aura,.mobx::after{animation:none}}
.mflow-gap{display:flex;flex-direction:column;align-items:center;gap:8px;margin:34px auto 0}
.mflow-gap .num{font-size:64px;font-weight:300;line-height:1;text-shadow:0 0 22px rgb(255 255 255 / .45)}

/* coach: mobility editor with rounds / hold / reps / per side */
.mob-ed2 .mob-ed-h,.mob-ed2 .mob-ed-r{grid-template-columns:54px minmax(180px,1.6fr) 64px 72px 64px 64px minmax(140px,1.2fr) 48px;min-width:820px}
.mob-ed-m{display:flex;flex-direction:column;gap:3px;min-width:0}
.mob-ed-m .t-small{font-size:11px}
.mob-side{display:flex;align-items:center;justify-content:center;height:36px}
.mob-on{border-radius:18px;background:rgb(255 255 255 / .03);box-shadow:inset 0 0 0 .5px var(--line2)}

/* ---------- the chrome crown and the week's leader */
.ccrown{display:block;overflow:visible}
.ccrown.glow{filter:drop-shadow(0 0 3px rgb(255 255 255 / .55)) drop-shadow(0 3px 6px rgb(0 0 0 / .7))}
.rk-crown{transform:translate(-50%,-70%) rotate(-10deg)!important;filter:none!important;animation:crownFloat 3.6s ease-in-out infinite}
@keyframes crownFloat{0%,100%{translate:0 0}50%{translate:0 -2px}}
.rk-champ-c{flex:none}
.rk-pod.p1 .rk-face::before{content:"";position:absolute;inset:-6px;border-radius:50%;pointer-events:none;
  background:conic-gradient(from var(--mobx-a,0deg),#5a5a5a,#fff,#8a8a8a,#f2f2f2,#5a5a5a,#d6d6d6,#5a5a5a);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2.5px));
  box-shadow:0 0 18px rgb(255 255 255 / .35);animation:mobxSpin 6s linear infinite}
.rk-pod.p1 .rk-big{background:linear-gradient(180deg,#fff 0%,#cfcfcf 40%,#6f6f6f 52%,#f2f2f2 70%,#9a9a9a 100%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 0 8px rgb(255 255 255 / .35))}
:root.light .rk-pod.p1 .rk-big{background:linear-gradient(180deg,#3a3a3a,#0a0a0a 50%,#5a5a5a);-webkit-background-clip:text;background-clip:text}
@media (prefers-reduced-motion:reduce){.rk-crown,.rk-pod.p1 .rk-face::before{animation:none}}

/* ---------- strength per kg */
.relx{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding:16px 18px;border-radius:22px;color:var(--ink);
  background:rgb(255 255 255 / .04);box-shadow:inset 0 1px 0 rgb(255 255 255 / .14),inset 0 0 0 .5px rgb(255 255 255 / .12)}
:root.light .relx{background:rgb(10 10 10 / .03);box-shadow:inset 0 0 0 .5px rgb(10 10 10 / .1)}
.relx-d{display:block;font-size:11px;letter-spacing:.04em;color:var(--muted);margin-top:6px}
.relx-d .up,.relx-d.up{color:var(--ink)}
.relx-d .down,.relx-d.down{color:var(--dim)}

/* ---------- the live workout bar: a moving ring */
.resume-ring{width:24px;height:24px;flex:none;margin-inline-start:6px;transform:rotate(-90deg)}
.rr-t{fill:none;stroke:rgb(255 255 255 / .16);stroke-width:2.6}
.rr-a{fill:none;stroke:var(--ink);stroke-width:2.6;stroke-linecap:round;transition:stroke-dashoffset 1s linear;filter:drop-shadow(0 0 3px rgb(255 255 255 / .7))}
:root.light .rr-t{stroke:rgb(10 10 10 / .12)}
:root.light .rr-a{filter:none}
.resume.live .resume-c{animation:liveTick 1s steps(1) infinite}
@keyframes liveTick{50%{opacity:.82}}

/* the selected segment is a clear drop of liquid now, so its label stays ink (readable in both modes) */
.seg>button.on{color:var(--ink)!important;text-shadow:0 0 12px rgb(255 255 255 / .35)}
:root.light .seg>button.on{text-shadow:none}
