/* Ricky Trainer · marca: fondo negro, amarillo #ffd400 como único acento.
   Barlow Condensed para rótulos, Inter para texto. Móvil primero; el panel se ensancha en escritorio. */
:root{color-scheme:dark;--bg:#0a0a0a;--card:#161616;--card2:#1d1d1d;--ink:#f5f5f5;--mute:#a1a1a1;--line:#2b2b2b;--y:#ffd400;--ysoft:rgba(255,212,0,.13);--ok:#4cc38a;--bad:#ff7a7a}
*{box-sizing:border-box;min-width:0}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font:16px/1.5 Inter,system-ui,sans-serif;overflow-x:clip;padding-bottom:calc(84px + env(safe-area-inset-bottom))}
h1,h2,h3,.cond{font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;line-height:1.05;margin:0;text-wrap:balance;letter-spacing:.2px}
h1{font-size:clamp(32px,7vw,44px);font-weight:800}h2{font-size:26px;font-weight:700}h3{font-size:20px;font-weight:700}
p{margin:.4em 0}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;border-radius:12px;min-height:44px}
button:disabled{opacity:.55;cursor:default}
:focus-visible{outline:3px solid var(--y);outline-offset:2px}
a{color:var(--y)}
.wrap{max-width:720px;margin:0 auto;padding:0 16px}
body.wide .wrap{max-width:1100px}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.gap{gap:10px}
.top{background:#000;border-bottom:1px solid var(--line);padding:14px 0 calc(14px);position:sticky;top:0;z-index:20;padding-top:max(14px,env(safe-area-inset-top))}
.brand{display:flex;align-items:center;gap:10px;font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:800;font-size:21px;color:#fff;text-decoration:none}.brand span{color:var(--y)}
.muted{color:var(--mute)}.small{font-size:14px}.tiny{font-size:12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;margin:14px 0}
.card.y{background:var(--y);color:#000;border-color:var(--y)}.card.y .muted{color:#3a3200}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;font-weight:700;border-radius:14px;text-decoration:none}
.btn.y{background:var(--y);color:#000}.btn.dark{background:#000;color:#fff}.btn.ghost{border:1.5px solid var(--line);color:var(--ink)}
.btn.danger{border:1.5px solid #5a2a2a;color:var(--bad)}
.btn.sm{padding:6px 12px;min-height:36px;font-size:14px}.btn.wide{width:100%}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{padding:7px 13px;min-height:38px;border-radius:999px;border:1.5px solid var(--line);font-weight:600;font-size:14px;background:var(--card)}
.chip.on{background:var(--y);color:#000;border-color:var(--y)}
.badge{display:inline-block;font-size:12px;font-weight:700;padding:3px 8px;border-radius:7px;background:#262626;color:var(--mute);white-space:nowrap}
.badge.y{background:var(--ysoft);color:var(--y)}.badge.ok{background:rgba(76,195,138,.15);color:var(--ok)}
.fld{display:grid;gap:6px;font-size:14px;color:var(--mute);font-weight:600}
.in,.fld input,.fld select,.fld textarea{width:100%;min-height:48px;border-radius:12px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);padding:10px 12px;font-size:16px;font-weight:500}
.fld textarea,textarea.in{min-height:84px;resize:vertical}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:520px){.grid2{grid-template-columns:minmax(0,1fr)}}
.list{display:grid;gap:8px}
.li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px 14px;border-radius:14px;background:var(--card);border:1px solid var(--line);text-align:left;width:100%;color:var(--ink)}
.li:hover{border-color:#3a3a3a}
a.li{text-decoration:none}
.search{width:100%;height:50px;border-radius:14px;border:1.5px solid var(--line);background:var(--card);padding:0 14px;font-size:16px}
.head{padding:22px 0 4px}
.empty{text-align:center;padding:30px 10px;color:var(--mute)}
.err{color:var(--bad);font-size:14px;min-height:20px;margin:6px 0 0}
.hist{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px 0;border-bottom:1px solid var(--line)}
.hist:last-child{border-bottom:0}.hist .r{text-align:right;white-space:nowrap}
/* navegación */
nav.tabs{position:fixed;left:0;right:0;bottom:0;background:#000;border-top:1px solid var(--line);display:grid;padding:6px max(8px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));z-index:20}
nav.tabs button{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:600;color:var(--mute);padding:4px 0}
nav.tabs button.on{color:var(--y)}
/* auth */
.auth{max-width:440px;margin:0 auto;padding:28px 0}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:5px;margin:18px 0}
.seg button{font-weight:700;color:var(--mute);min-height:42px}.seg button.on{background:var(--y);color:#000}
/* calendario / sesiones */
.day{font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:700;font-size:15px;color:var(--mute);margin:18px 2px 6px;text-transform:capitalize}
.day.today{color:var(--y)}
.ev{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border-radius:14px;background:var(--card);border:1px solid var(--line);width:100%;text-align:left;color:var(--ink)}
.ev .ico{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#262626;font-size:20px}
.ev.done{opacity:.7}.ev.done .ico{background:var(--y);color:#000}
.blk{font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:700;font-size:15px;color:var(--mute);margin:22px 2px 6px}
.ex{padding:16px}
.exhead{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.exname{font-weight:700;font-size:17px;text-align:left;padding:0;min-height:0;line-height:1.3;color:var(--ink)}
.target{display:flex;gap:14px;flex-wrap:wrap;margin:6px 0 10px;font-size:14px;color:var(--mute)}.target b{color:var(--ink)}
.vid{flex:none;display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:10px;background:var(--ysoft);color:var(--y);font-weight:700;font-size:14px;min-height:40px}
.cues{margin:0 0 10px;padding:10px 12px 10px 30px;background:#101010;border:1px solid var(--line);border-radius:12px;font-size:14px;color:#d4d4d4}.cues li{margin:2px 0}.cues li::marker{color:var(--y)}
.sets{display:grid;gap:6px}
.set,.sethead{display:grid;grid-template-columns:34px minmax(0,1fr) minmax(0,1fr) 52px;gap:8px;align-items:center}
.sethead{font-size:12px;color:var(--mute);font-weight:600}
.set .n{font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:800;font-size:20px;text-align:center;color:var(--mute)}
.set label{position:relative;display:block}
.set label span{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:13px;color:var(--mute);pointer-events:none}
.set input{width:100%;height:46px;border-radius:11px;border:1.5px solid var(--line);background:var(--bg);padding:0 40px 0 12px;font-size:17px;font-weight:600}
.tick{height:46px;border-radius:11px;border:1.5px solid var(--line);display:grid;place-items:center;background:var(--card)}
.set.done .tick{background:var(--y);border-color:var(--y);color:#000}.set.done input{background:var(--ysoft);border-color:transparent}
.ss{border-left:4px solid var(--y);padding-left:12px;margin-top:14px}.ss:first-of-type{margin-top:4px}
.tag{font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:800;color:var(--y);margin-right:6px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px}
.stat b{display:block;font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-size:clamp(26px,7vw,34px);font-weight:800}.stat span{font-size:13px;color:var(--mute)}
.ytw{position:relative;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000;margin:10px 0}.ytw iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
/* editor de workouts y programas */
.wi{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px;margin:8px 0}
.wi.block{background:transparent;border-style:dashed}
.wi .tools{display:flex;gap:4px;flex-wrap:wrap}
.wi .tools button{min-height:36px;min-width:36px;border:1px solid var(--line);border-radius:9px;font-size:14px}
.wgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:8px}
@media(max-width:600px){.wgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.wgrid .in{min-height:42px;padding:8px 10px;font-size:15px}
.wgrid label{font-size:12px;color:var(--mute);display:grid;gap:4px}
.week{margin:16px 0}
.days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
@media(max-width:760px){.days{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dcell{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:8px;min-height:92px;display:flex;flex-direction:column;gap:6px}
.dcell .dn{font-size:12px;color:var(--mute);font-weight:700}
.task{display:flex;justify-content:space-between;gap:6px;align-items:center;background:var(--ysoft);color:var(--y);border-radius:8px;padding:5px 8px;font-size:13px;font-weight:600}
.task.cardio{background:rgba(76,195,138,.13);color:var(--ok)}.task.message{background:#262626;color:var(--ink)}
.task button{min-height:24px;min-width:24px;font-size:14px;color:inherit;padding:0}
.dcell .add{min-height:30px;border:1px dashed var(--line);border-radius:8px;color:var(--mute);font-size:13px}
/* temporizador */
#timer{position:fixed;inset:0;z-index:50;background:#000;color:#fff;display:none;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center}
#timer.on{display:flex}#timer .tlabel{font-size:20px;opacity:.8}
#timer .ring{position:relative;width:min(78vw,300px);aspect-ratio:1}
#timer svg{width:100%;height:100%;transform:rotate(-90deg)}
#timer .time{position:absolute;inset:0;display:grid;place-items:center;font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:800;font-size:clamp(64px,22vw,96px);font-variant-numeric:tabular-nums}
#timer .lbl{font-size:17px;opacity:.85;margin:18px 0 6px;max-width:420px}
#timer .ctl{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap;justify-content:center}
#timer .ctl button{background:#262626;color:#fff;padding:12px 18px;font-weight:700;font-size:17px;min-width:84px}
#timer .ctl .skip{background:var(--y);color:#000}#timer.end .time{color:var(--y)}
#pill{position:fixed;right:14px;bottom:92px;z-index:30;background:var(--y);color:#000;font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:800;font-size:22px;padding:8px 18px;border-radius:999px;display:none}
#pill.on{display:block}
/* modal y aviso */
.modal{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.65);display:none;align-items:flex-end;justify-content:center}
.modal.on{display:flex}
@media(min-width:760px){.modal{align-items:center}.sheet{border-radius:22px!important}}
.sheet{background:var(--card);width:100%;max-width:640px;max-height:88vh;overflow:auto;border-radius:22px 22px 0 0;padding:20px 18px calc(24px + env(safe-area-inset-bottom))}
.x{float:right;width:44px;font-size:24px;line-height:1}
#toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:var(--y);color:#000;font-weight:700;padding:10px 16px;border-radius:12px;z-index:70;display:none;max-width:90vw}
#toast.on{display:block}
@media (prefers-reduced-motion:no-preference){#timer .prog{transition:stroke-dashoffset .25s linear}.set.done .tick{animation:pop .25s ease}@keyframes pop{50%{transform:scale(1.12)}}}
[hidden]{display:none!important}
.card.y .btn.ghost{border-color:#000;color:#000;background:transparent}
.card.y .btn.y{background:#000;color:var(--y)}
.card.y a{color:#000}
.day .ev{text-transform:none}
.card.y .stat{background:rgba(0,0,0,.1);color:#000;border-color:transparent}.card.y .stat b{color:#000}
/* chat */
nav.tabs button{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
nav.tabs .nb{position:absolute;top:0;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--y);color:#000;font-size:11px;font-weight:800;line-height:18px;text-align:center}
@media(max-width:520px){nav.tabs button{font-size:11px}}
.li.conv.new{border-color:var(--y)}.li.conv.new b{color:var(--y)}
.ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nbi{display:inline-block;margin-top:4px;min-width:22px;padding:2px 7px;border-radius:11px;background:var(--y);color:#000;font-size:12px;font-weight:800;text-align:center}
.msgs{display:flex;flex-direction:column;gap:6px;padding:8px 0 12px}
.dsep{align-self:center;font-size:12px;font-weight:600;color:var(--mute);background:var(--card);border:1px solid var(--line);border-radius:999px;padding:3px 12px;margin:10px 0 4px}
.msg{max-width:min(78%,520px);padding:9px 12px 6px;border-radius:16px;word-wrap:break-word;overflow-wrap:anywhere}
.msg.them{align-self:flex-start;background:var(--card2);border:1px solid var(--line);border-bottom-left-radius:6px}
.msg.me{align-self:flex-end;background:var(--y);color:#000;border-bottom-right-radius:6px}.msg.me a{color:#000}
.msg .mb{white-space:pre-line}
.msg .mt{font-size:11px;opacity:.65;text-align:right;margin-top:2px}
.mimg{display:block;padding:0;min-height:0;border-radius:10px;overflow:hidden;margin-bottom:4px}.mimg img{display:block;max-width:100%;max-height:320px;border-radius:10px}
.composer{position:sticky;bottom:calc(70px + env(safe-area-inset-bottom));display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:end;background:var(--bg);padding:10px 0;border-top:1px solid var(--line)}
.composer textarea{min-height:46px;max-height:160px;resize:none;padding:11px 12px}
.composer .att{min-height:46px;padding:0 12px;cursor:pointer}
.composer .btn.y{min-height:46px}
/* fotos de progreso */
.pday{padding:10px 0;border-top:1px solid var(--line)}
.pthumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;margin-top:8px}
.pth{position:relative;display:grid;gap:3px;font-size:12px;color:var(--mute);text-align:center}
.pth>button:first-child{padding:0;min-height:0;border-radius:10px;overflow:hidden;aspect-ratio:3/4;background:#0f0f0f;border:1px solid var(--line)}
.pth img{width:100%;height:100%;object-fit:cover;display:block}
.pdel{position:absolute;top:4px;right:4px;width:30px;height:30px;min-height:30px;border-radius:50%;background:#000;color:var(--bad);border:1px solid #5a2a2a;font-size:18px;line-height:1}
.pslots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.pslot{position:relative;display:grid;place-items:center;aspect-ratio:3/4;border:1.5px dashed var(--line);border-radius:12px;cursor:pointer;overflow:hidden;background:#0f0f0f;text-align:center}
.pslot .pimg{position:absolute;inset:0;background:center/cover no-repeat}
.pslot .plab{position:absolute;left:0;right:0;bottom:0;padding:5px;font-size:13px;font-weight:700;background:rgba(0,0,0,.65);color:#fff}
.pslot .padd{color:var(--y);font-weight:700;font-size:14px}
.pslot.has{border-style:solid;border-color:var(--y)}.pslot.has .padd{display:none}
.pslot:focus-within{outline:3px solid var(--y);outline-offset:2px}
.cmp{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cimg{padding:0;min-height:0;border-radius:12px;overflow:hidden;aspect-ratio:3/4;background:#0f0f0f;border:1px solid var(--line);display:grid;place-items:center;color:var(--mute);font-size:13px}
.cimg img{width:100%;height:100%;object-fit:cover;display:block}
.lightbox{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.94);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}
.lightbox img{max-width:100%;max-height:86vh;border-radius:10px}
.lightbox .x{position:absolute;top:max(10px,env(safe-area-inset-top));right:10px;color:#fff;font-size:30px;width:48px}
.lightbox .cap{color:#ddd;font-size:14px;margin-top:10px}
nav.tabs .nl{overflow:hidden;text-overflow:ellipsis;max-width:100%}
@media(max-width:480px){nav.tabs.many .nl{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}nav.tabs.many button{min-height:52px;justify-content:center}nav.tabs.many svg{width:25px;height:25px}nav.tabs.many .nb{top:4px}}
/* consejos del entrenador */
#tipbox{position:fixed;left:0;right:0;bottom:calc(80px + env(safe-area-inset-bottom));z-index:55;display:flex;justify-content:center;padding:0 12px;pointer-events:none}
body:has(#timer.on) #tipbox{top:calc(10px + env(safe-area-inset-top));bottom:auto}
body:has(#timer.on):has(#tipbox .tip) #timer{justify-content:flex-start;padding-top:calc(200px + env(safe-area-inset-top))}
body:has(#timer.on):has(#tipbox .tip) #timer .ring{width:min(52vw,210px)}
body:has(#timer.on):has(#tipbox .tip) #timer .time{font-size:clamp(48px,15vw,64px)}
body:has(#timer.on):has(#tipbox .tip) #timer .tlabel{font-size:16px}
.tip{pointer-events:auto;display:grid;grid-template-columns:48px minmax(0,1fr) 44px;gap:10px;align-items:start;width:min(560px,100%);background:#fff;color:#111;border-radius:18px;padding:12px 6px 12px 12px;box-shadow:0 10px 30px rgba(0,0,0,.55);border:2px solid var(--y)}
.tip.pr{background:var(--y);border-color:#fff}
.tip .tb b{font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-size:18px}
.tip p{margin:2px 0 0;font-size:15px;line-height:1.4}
.tip .prb{display:inline-block;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;background:#000;color:var(--y);padding:2px 7px;border-radius:6px;vertical-align:2px}
.tip .tx{width:44px;height:44px;min-height:44px;font-size:26px;line-height:1;color:#111;border-radius:12px}
.tip .tx:hover{background:rgba(0,0,0,.08)}
.av{width:48px;height:48px;border-radius:50%;overflow:hidden;background:#000;display:grid;place-items:center;color:var(--y);font-family:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;font-weight:800;font-size:24px;border:2px solid var(--y)}
.av img{width:100%;height:100%;object-fit:cover}.av.big{width:72px;height:72px;font-size:34px}
@media (prefers-reduced-motion:no-preference){.tip{animation:tipin .25s ease}@keyframes tipin{from{transform:translateY(12px);opacity:0}}}
.rir{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:2px 0 6px 42px}
.rir .chip{min-height:36px;min-width:42px;padding:4px 10px}
.rirw{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.rirw .in{min-height:42px;padding:6px 8px}
body:has(#tipbox .tip){padding-bottom:calc(230px + env(safe-area-inset-bottom))}
body:has(#tipbox .tip) #pill{bottom:calc(250px + env(safe-area-inset-bottom))}
body:has(#tipbox .tip) #toast{bottom:calc(310px + env(safe-area-inset-bottom))}
.rir>span{flex-basis:100%}
.top .wrap{position:relative}
@media(max-width:520px){#sync{position:absolute;top:calc(100% + 14px);right:16px;background:#000;border:1px solid var(--line);border-top:0;padding:2px 10px;border-radius:0 0 10px 10px;white-space:nowrap}#sync:empty{display:none}}
/* fotos de recetas */
.rthumb{width:52px;height:40px;border-radius:8px;object-fit:cover;flex:none;background:#0f0f0f;border:1px solid var(--line)}
.rthumb.none{display:grid;place-items:center;font-size:20px}
.rphoto img{width:100%;max-height:340px;object-fit:cover;border-radius:12px;display:block}
.rhero{width:calc(100% + 0px);aspect-ratio:4/3;object-fit:cover;border-radius:14px;margin:0 0 12px;display:block}
/* objetivo de macros y anillos */
.tgt{display:grid;grid-template-columns:minmax(120px,1fr) repeat(3,minmax(150px,1.3fr));gap:10px;align-items:end}
.tgt .tgm{border:1px solid var(--line);border-radius:12px;padding:8px 10px 2px}.tgt .tgm .fld{flex:1;margin:4px 0 6px}
.tgt #pSum{grid-column:1/-1;margin:0}
@media(max-width:720px){.tgt{grid-template-columns:1fr}}
.rings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}
@media(max-width:520px){.rings{grid-template-columns:repeat(2,minmax(0,1fr))}}
.rings .ring{position:relative;text-align:center;color:#000}
.rings .ring svg{width:100%;max-width:120px;display:block;margin:0 auto}
.rings .ring circle{fill:none;stroke-width:9}.rings .ring .bg{stroke:rgba(0,0,0,.15)}.rings .ring .fg{stroke:#000;stroke-linecap:round;transition:stroke-dasharray .4s}
.rings .ring.p .fg{stroke:#1d4ed8}.rings .ring.c .fg{stroke:#0f766e}.rings .ring.f .fg{stroke:#9a3412}.rings .ring .fg.over{stroke:#b91c1c}
.rings .ring .rv{position:absolute;left:0;right:0;top:0;aspect-ratio:1;max-width:120px;margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1}
.rings .ring .rv b{font-size:20px}.rings .ring .rv span{font-size:11px}
.rings .ring .rl{font-weight:800;font-size:14px;margin-top:2px}.rings .ring .rr{font-size:12px}.rings .ring .rr.over{color:#991b1b;font-weight:700}
.minibar{position:fixed;top:62px;left:50%;transform:translateX(-50%);z-index:20;width:min(1068px,calc(100% - 24px));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;background:var(--y);color:#000;border-radius:0 0 14px 14px;padding:6px 10px;box-shadow:0 6px 18px rgba(0,0,0,.4)}
.minibar .mr{display:flex;align-items:center;gap:6px;font-size:13px;min-width:0}.minibar .mr span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.minibar svg{width:30px;height:30px;flex:none}.minibar circle{fill:none;stroke-width:5}.minibar .bg{stroke:rgba(0,0,0,.15)}.minibar .fg{stroke:#000;stroke-linecap:round}
.minibar .p .fg{stroke:#1d4ed8}.minibar .c .fg{stroke:#0f766e}.minibar .f .fg{stroke:#9a3412}.minibar .fg.over{stroke:#b91c1c}
@media(max-width:520px){.minibar{top:58px;grid-template-columns:1fr 1fr;gap:2px 8px;padding:4px 10px}.minibar .mr{font-size:12px;gap:5px}.minibar svg{width:22px;height:22px}}

/* Lector de código de barras */
.scan { position: relative; margin: 10px 0; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.scan video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: #ffd400; box-shadow: 0 0 12px #ffd400; animation: scanl 1.6s ease-in-out infinite alternate; }
@keyframes scanl { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
.scl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.rwk { display: flex; flex-direction: column; gap: 4px; }
.rwk label { display: flex; flex-direction: column; gap: 2px; }
.hbtn { margin-top: 6px; min-height: 32px; padding: 4px 10px; font-size: 13px; }
.spark { width: 100%; height: 70px; display: block; }
.dcell button.task { width: 100%; text-align: left; cursor: pointer; border: 0; font: inherit; }
.dcell .task.done { opacity: .6; }
.dcell.today { outline: 2px solid var(--y); }

#timer .tpre { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; max-width: 420px; }
#timer .tpre button { background: #1a1a1a; color: #fff; border: 1px solid #333; border-radius: 999px; padding: 8px 14px; min-width: 58px; font-weight: 700; font-size: 16px; }
#timer .tpre button.on { background: var(--y); color: #000; border-color: var(--y); }
.warm { margin: 6px 0; background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; }
.warm summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--y); }

#timer.work .prog { stroke: #4cc38a; } #timer.work .tlabel { color: #4cc38a; font-weight: 800; }
#timer.prep .tlabel { color: var(--y); font-weight: 800; }
#timer.work .tpre, #timer.prep .tpre, #timer.work #tHide, #timer.prep #tHide { display: none; }
.workbtn { margin: 6px 0; }
.painon { border-color: #f59e0b !important; color: #f59e0b !important; }
#pzL { width: 100%; accent-color: var(--y); }
.tip.warn{border-color:#f59e0b;box-shadow:0 0 0 2px rgba(245,158,11,.35)}
.sumi { padding: 10px 0; border-top: 1px solid var(--line); }
.sumi:first-of-type { border-top: 0; }
.sumi a { color: inherit; }
.shop { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.shop input { width: 20px; height: 20px; accent-color: var(--y); }
.shop.got span, .shop.got b { text-decoration: line-through; opacity: .5; }
.adots { display: flex; gap: 6px; margin-top: 10px; }
.adot { flex: 1; height: 30px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; }
.adot i { font-style: normal; font-size: 11px; color: var(--mute); }
.adot.part { background: var(--ysoft); border-color: var(--y); }
.adot.full { background: var(--y); border-color: var(--y); }
.adot.full i { color: #000; font-weight: 700; }
.adot.miss { border-color: var(--bad); }
.apct { text-align: right; display: grid; }
.apct b { font-size: 22px; color: var(--y); }
.mdone { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn.ok { background: var(--ok); color: #000; border-color: var(--ok); }
.btn.miss { color: var(--bad); }
.algw { border-color: var(--bad); background: rgba(255,122,122,.08); }
.algw b { color: var(--bad); }
.alg { font-size: 12px; }
.algi { color: var(--bad); font-size: 12px; font-weight: 700; }
.dnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; text-transform: capitalize; }
.dbar { margin: 6px 0 10px; }
.dtrack { height: 8px; border-radius: 6px; background: var(--card2); overflow: hidden; margin-top: 4px; }
.dtrack i { display: block; height: 100%; background: var(--y); border-radius: 6px; }
.dtrack i.over, .over { color: var(--bad); }
.dtrack i.over { background: var(--bad); }
.nomac .mac { display: none !important; }
.tgl input { width: 22px; height: 22px; accent-color: var(--y); flex: none; }
.policy h1 { margin-top: 10px; } .policy h2 { font-size: 17px; margin: 18px 0 6px; } .policy p, .policy li { font-size: 14px; line-height: 1.5; } .policy ul { padding-left: 20px; }
.pend { color: var(--bad); font-weight: 700; }
.consent details { margin: 14px 0; } .consent details .policy h1 { display: none; }
.ck { align-items: flex-start; margin: 10px 0; justify-content: flex-start; } .ck span { font-size: 14px; line-height: 1.4; flex: 1; text-align: left; }
#netbar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 64px); z-index: 60; max-width: min(92vw, 520px); padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
#netbar.off { background: #2a1d00; color: var(--y); border: 1px solid var(--y); }
#netbar.sync { background: var(--card2); color: var(--ink); border: 1px solid var(--line); }
#netbar[hidden] { display: none; }
/* Revisión semanal */
.rvgrid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; margin-top: 12px; }
.rvgrid h4 { margin: 12px 0 4px; font-size: 14px; }
.rvm { display: grid; grid-template-columns: 1fr 90px auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.rvm > b { grid-column: 3; text-align: right; font-size: 17px; }
.rvm > span:last-child { grid-column: 1 / -1; font-size: 13px; }
.spk { width: 90px; height: 26px; }
.rvsc { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.rvsc span { flex: 1; font-size: 14px; color: var(--mute); }
.rvsc b { font-size: 18px; } .rvsc b i { font-style: normal; font-size: 12px; color: var(--mute); }
.rvsc em { font-style: normal; font-size: 12px; font-weight: 700; } .rvsc em.up { color: var(--ok); } .rvsc em.dn { color: var(--bad); }
.rvqa { padding: 6px 0; border-top: 1px solid var(--line); }
.rvbig { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; } .rvbig b { font-size: 30px; color: var(--y); } .rvbig span { font-size: 13px; color: var(--mute); }
.rvreply { margin-top: 14px; color: #000; }
.rvreply .in { background: #000; color: var(--ink); }
.rvreply .chip { background: rgba(0,0,0,.12); color: #000; border-color: rgba(0,0,0,.3); }
.rvreply .tgl { justify-content: flex-start; } .rvreply .tgl input { accent-color: #000; }
.rvgo { background: #000; color: var(--y); }
.rvq .badge { flex: none; }
/* Cuestionario inicial */
.onbbar { height: 6px; background: var(--card2); border-radius: 4px; overflow: hidden; margin: 14px 0 4px; }
.onbbar i { display: block; height: 100%; width: 0; background: var(--y); transition: width .3s; }
.onbs h2 { margin: 10px 0 12px; }
.st4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 560px) { .st4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Calendario mensual */
.calbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.calm { margin: 0; text-transform: capitalize; font-size: 22px; }
.calstats { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; font-size: 14px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); gap: 1px; }
.cdh { background: var(--card); text-align: center; font-size: 12px; font-weight: 700; color: var(--mute); padding: 8px 0; }
.cday { background: var(--bg); min-height: 112px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .1s; }
.cday.out { background: #070707; } .cday.out .cdn span { opacity: .35; }
.cday.today { background: #1a1600; } .cday.today .cdn span { background: var(--y); color: #000; border-radius: 999px; padding: 0 7px; }
.cday.over { background: var(--ysoft); outline: 2px dashed var(--y); outline-offset: -3px; }
.cdn { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--mute); min-height: 22px; }
.cplus { opacity: 0; min-height: 0; width: 22px; height: 22px; border-radius: 6px; color: var(--y); font-weight: 800; line-height: 1; }
.cday:hover .cplus, .cplus:focus-visible { opacity: 1; background: var(--card2); }
@media (hover: none) { .cplus { opacity: .7; } }
.cchip { display: flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.25; padding: 4px 6px; border-radius: 6px; background: #f59e0b; color: #000; font-weight: 600; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; -webkit-touch-callout: none; }
.cchip .ct { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cchip .ci { flex: none; } .cchip .cs { flex: none; font-size: 10px; opacity: .7; }
.cchip.k-workout { background: var(--y); } .cchip.k-checkin { background: #60a5fa; } .cchip.k-cardio { background: #34d399; } .cchip.k-message, .cchip.k-nutrition, .cchip.k-appointment { background: #c4b5fd; }
.cchip.done { background: #1f3a2c; color: #b7f5cf; cursor: pointer; } .cchip.miss { box-shadow: inset 3px 0 0 var(--bad); opacity: .8; }
.cchip.dragging { opacity: .3; }
.cchip:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.cghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.6); transform-origin: top left; opacity: .95; }
.cghost.copy::after { content: '+'; position: absolute; right: -8px; top: -8px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #000; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
body.caldrag { cursor: grabbing; user-select: none; }
.undo { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 96px); z-index: 70; background: var(--ink); color: #000; border-radius: 12px; padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.undo .btn { background: #000; color: var(--y); }
@media (max-width: 640px) { .cday { min-height: 84px; padding: 2px; } .cchip { font-size: 10px; padding: 3px 4px; } .cchip .ci, .cchip .cs { display: none; } .calm { font-size: 18px; } }
.dropq { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dropq .btn { display: flex; flex-direction: column; gap: 2px; min-height: 64px; font-size: 16px; }
.dropq .btn span { font-size: 11px; font-weight: 500; opacity: .75; }
.rpt .tgl { justify-content: flex-start; }
/* Biblioteca de ejercicios */
.xlib { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.xlh { display: flex; justify-content: space-between; align-items: center; }
.xlt { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.xlt label { display: flex; gap: 6px; align-items: center; } .xlt input { accent-color: var(--y); }
.xlf { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; max-height: 46vh; overflow: auto; }
.xlf h4 { margin: 10px 0 6px; font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; }
.xlf .chip { font-size: 12px; padding: 5px 10px; min-height: 30px; } .xlg { margin-bottom: 6px; } .xlg .chip:first-child { font-weight: 800; }
.xany { margin: 0 0 4px; }
.xlsel .chip { font-size: 12px; min-height: 28px; padding: 4px 10px; margin: 0 4px 4px 0; }
.xll { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.xc { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; user-select: none; -webkit-user-select: none; }
.xc[data-drag] { cursor: grab; } .xc:hover { border-color: #444; }
.xth { position: relative; width: 96px; height: 54px; flex: none; border-radius: 8px; overflow: hidden; background: #000; display: grid; place-items: center; }
.xth img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.xph { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 800; color: var(--y); }
.xpl { position: absolute; right: 4px; bottom: 3px; font-style: normal; font-size: 10px; background: rgba(0,0,0,.7); color: #fff; border-radius: 4px; padding: 0 4px; }
.xb { flex: 1; min-width: 0; } .xb b { display: block; font-size: 13.5px; line-height: 1.25; }
.xtags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .xtags span { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--mute); }
.xa { display: flex; flex-direction: column; gap: 2px; } .xbtn { min-height: 0; width: 30px; height: 26px; border-radius: 7px; font-size: 14px; color: var(--mute); }
.xbtn:hover { background: var(--card2); color: var(--ink); } .xbtn.on { color: var(--y); } .xbtn.add { color: var(--y); font-weight: 800; font-size: 18px; } .xbtn.add.done { background: var(--y); color: #000; }
.xpage .xll { overflow: visible; } .xpage .xc { cursor: pointer; }
/* Editor de workout con biblioteca al lado */
@media (min-width: 1000px) { body.wide .wedit { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
  .wlib { position: sticky; top: 72px; max-height: calc(100vh - 170px); display: flex; } .wlib .xlib { flex: 1; } .wlib .xll { flex: 1; } }
.whandle { cursor: grab; color: var(--mute); padding: 0 6px; font-weight: 800; letter-spacing: -2px; touch-action: none; user-select: none; }
.wthumb { width: 54px; height: 30px; object-fit: cover; border-radius: 5px; flex: none; }
.wdropline { height: 4px; background: var(--y); border-radius: 3px; margin: 4px 0; box-shadow: 0 0 0 3px var(--ysoft); }
.wi.ssover { outline: 2px dashed var(--y); outline-offset: 2px; background: var(--ysoft); }
.wi.flash { animation: wflash .9s; } @keyframes wflash { 0% { box-shadow: 0 0 0 3px var(--y); } 100% { box-shadow: 0 0 0 0 transparent; } }
.wi.dragging { opacity: .35; }
#wItems.over .wdropempty { border-color: var(--y); background: var(--ysoft); }
.wdropempty { border: 2px dashed var(--line); border-radius: 14px; }
.wghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: .92; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.xth .xph { position: absolute; } .xth img { position: relative; }
.tgg { margin-top: 6px; } .tgg .chips { margin-top: 3px; } .tgg .chip { font-size: 12px; min-height: 30px; padding: 4px 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rmt { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.rmt h4 { margin: 0 0 6px; font-size: 13px; }
.rmt > div > div { display: flex; justify-content: space-between; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rmt span { color: var(--mute); }
.rir.faces { gap: 6px; } .fbtn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; }
.fbtn.on { background: var(--card2); color: var(--ink); outline: 2px solid var(--y); }
.face { vertical-align: middle; flex: none; }
/* Agenda del cliente */
.ahd{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px}
.aleg{display:flex;gap:14px;justify-content:center;margin:8px 0 0}.aleg span{display:flex;align-items:center;gap:5px}
.anav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 10px}
.ahead{font-size:15px;text-align:center}
.aweek{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.apill{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 0 8px;border-radius:999px;border:1px solid var(--line);background:var(--card);min-height:86px}
.apill .adw{font-size:12px;color:var(--mute)}.apill b{font-size:19px}
.apill.today{border-color:var(--y)}
.apill.on{background:var(--y);color:#000;border-color:var(--y)}.apill.on .adw{color:#000}
.amonth{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.amh{font-size:12px;color:var(--mute);padding:4px 0}
.aday{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;border-radius:12px}
.aday span{width:32px;height:32px;display:grid;place-items:center;border-radius:50%}
.aday.out{opacity:.35}.aday.today span{border:1px solid var(--y)}
.aday.on span{background:var(--y);color:#000;font-weight:700}
.adot{flex:0 0 6px;width:6px;height:6px;min-height:6px;border-radius:50%;background:var(--y);display:block}
.adot.ok{background:var(--ok)}.adot.late{background:var(--bad)}
.apill.on .adot{background:#000}
.alink{min-height:32px;padding:4px 0;color:var(--y);font-size:14px;text-decoration:underline;text-underline-offset:3px}
.adays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.aopt{display:flex;flex-direction:column;align-items:center;padding:8px 0;border-radius:12px;border:1px solid var(--line);background:var(--card2);min-height:72px;position:relative}
.aopt .adw{font-size:11px;color:var(--mute)}.aopt b{font-size:17px}
.aopt i{position:absolute;top:2px;right:3px;font-style:normal}
.aopt.on{background:var(--y);color:#000;border-color:var(--y)}.aopt.on .adw{color:#000}
