/* ============================================================
   GYM LILY - hoja de estilos
   ============================================================ */

:root{
  --bg:        #EFF3F7;
  --surface:   #FFFFFF;
  --surface-2: #F6F8FA;
  --ink:       #14171A;
  --ink-2:     #39424C;
  --muted:     #75808B;
  --line:      #DDE3EA;
  --line-soft: #E9EEF3;

  --brand:     #24527F;
  --brand-ink: #FFFFFF;
  --brand-soft:#DCE9F5;

  --lime:      #A5D8FF;
  --lime-deep: #3E8ED0;

  --clay:      #BF5A3F;
  --clay-soft: #F6E6E0;

  --r-card: 20px;
  --r-sm:   12px;
  --r-pill: 999px;

  --shadow: 0 1px 2px rgba(24,32,44,.04), 0 8px 24px -12px rgba(24,32,44,.14);
  --shadow-lg: 0 2px 4px rgba(24,32,44,.05), 0 24px 48px -20px rgba(24,32,44,.24);

  --ff-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --ff-ui: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--ff-ui);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
}

button{ font-family:inherit; font-size:inherit; color:inherit; }
input{ font-family:inherit; }

/* Todos los iconos en línea heredan color y miden 1em salvo que se diga otra cosa */
svg{ width:1em; height:1em; fill:currentColor; flex:none; vertical-align:-.14em; }

h1,h2,h3,h4{ font-family:var(--ff-display); margin:0; letter-spacing:-.02em; font-weight:600; }

.num{ font-family:var(--ff-display); font-variant-numeric:tabular-nums; letter-spacing:-.03em; }

/* ---------- Shell ---------- */

.shell{
  max-width:540px;
  margin:0 auto;
  min-height:100dvh;
  padding:0 18px calc(var(--tab-h) + var(--safe-b) + 28px);
  position:relative;
}

.view{ display:none; animation:fade .28s cubic-bezier(.16,1,.3,1); }
.view.on{ display:block; }

@keyframes fade{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none;} }

@media (prefers-reduced-motion: reduce){
  .view{ animation:none; }
  *{ transition-duration:.01ms !important; animation-duration:.01ms !important; }
}

/* ---------- Encabezado ---------- */

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:22px 0 16px;
}
.topbar .greet{
  font-size:11.5px; color:var(--muted); text-transform:uppercase;
  letter-spacing:.09em; font-weight:600;
}
.topbar h1{ font-size:31px; line-height:1.1; margin-top:5px; letter-spacing:-.025em; }
.topbar .subhead{ font-size:14px; color:var(--muted); margin-top:5px; }

.icon-btn{
  width:38px; height:38px; flex:none;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:var(--r-pill);
  display:grid; place-items:center;
  cursor:pointer;
  transition:transform .16s, background .16s;
}
.icon-btn:active{ transform:scale(.94); }
.icon-btn svg{ width:18px; height:18px; vertical-align:0; }

/* ---------- Tarjetas ---------- */

.card{
  background:var(--surface);
  border-radius:var(--r-card);
  border:1px solid var(--line-soft);
  box-shadow:var(--shadow);
}
.card + .card{ margin-top:12px; }
.pad{ padding:18px; }

.section-title{
  font-size:12px; text-transform:uppercase; letter-spacing:.1em;
  color:var(--muted); font-weight:600; margin:26px 2px 10px;
  font-family:var(--ff-ui);
}

/* ---------- Héroe de sesión ---------- */

.hero{
  background:var(--brand);
  color:#fff;
  border-radius:var(--r-card);
  padding:22px;
  position:relative;
  overflow:hidden;
  border:none;
}
.hero::after{
  content:""; position:absolute; right:-70px; top:-70px;
  width:220px; height:220px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, rgba(165,216,255,.28), transparent 65%);
  pointer-events:none;
}
.hero .kicker{
  font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:rgba(255,255,255,.6); font-weight:600;
}
.hero h2{ font-size:32px; margin:6px 0 2px; color:#fff; }
.hero .foco{ font-size:13.5px; color:rgba(255,255,255,.72); max-width:30ch; }

.hero-stats{ display:flex; gap:22px; margin-top:20px; position:relative; }
.hero-stats .s .v{ font-size:26px; font-weight:600; font-family:var(--ff-display); font-variant-numeric:tabular-nums; }
.hero-stats .s .l{ font-size:11.5px; color:rgba(255,255,255,.6); text-transform:uppercase; letter-spacing:.07em; }

.hero.rest{ background:var(--surface); color:var(--ink); border:1px solid var(--line-soft); }
.hero.rest::after{ display:none; }
.hero.rest h2{ color:var(--ink); }
.hero.rest .kicker{ color:var(--clay); }
.hero.rest .foco{ color:var(--muted); }

/* ---------- Frase del día ---------- */

.frase{
  margin:0 0 14px; padding:0 0 0 14px;
  border-left:3px solid var(--lime);
  font-size:15px; line-height:1.5; color:var(--ink-2);
  font-family:var(--ff-display); font-weight:400;
}

/* ---------- Franja de recuperación ---------- */

.recup{
  width:100%; display:flex; align-items:center; gap:13px;
  background:var(--surface); border:1px solid var(--line-soft);
  border-radius:var(--r-card); padding:12px 14px; margin-bottom:12px;
  cursor:pointer; text-align:left; box-shadow:var(--shadow);
  transition:transform .15s cubic-bezier(.16,1,.3,1);
}
.recup:active{ transform:scale(.985); }
.recup-ring{ position:relative; width:40px; height:40px; flex:none; }
.recup-ring svg{ width:40px; height:40px; vertical-align:0; }
.recup-ico{
  width:40px; height:40px; flex:none; border-radius:var(--r-pill);
  background:currentColor; display:grid; place-items:center;
}
.recup-ico svg{ width:19px; height:19px; color:#fff; vertical-align:0; }
.recup.baja .recup-ico svg{ color:var(--clay-soft); }

.recup-detalle{
  display:none; font-size:13.5px; line-height:1.55; color:var(--ink-2);
  background:var(--surface-2); border-radius:var(--r-sm);
  padding:13px 15px; margin:-4px 0 12px;
}
.recup-detalle.on{ display:block; animation:fade .22s; }

.recup-ring b{
  position:absolute; inset:0; display:grid; place-items:center;
  font-family:var(--ff-display); font-size:14px; font-weight:600;
  font-variant-numeric:tabular-nums; color:var(--ink);
}
.recup-txt{ flex:1; min-width:0; }
.recup-txt b{
  display:block; font-family:var(--ff-display); font-size:15px; font-weight:600;
  line-height:1.25; color:var(--ink);
}
.recup-txt span{ display:block; font-size:12px; color:var(--muted); margin-top:2px; }
.recup-chev{ width:14px; height:14px; color:var(--muted); vertical-align:0; }

.recup.alta{ color:var(--lime-deep); }
.recup.media{ color:var(--brand); }
.recup.baja{ color:var(--clay); }
.recup.baja{ background:var(--clay-soft); border-color:transparent; }
.recup.baja .recup-txt b{ color:#8C3A25; }
.recup.hecho{ color:var(--lime-deep); background:var(--brand-soft); border-color:transparent; }

/* ---------- Barra de progreso ---------- */

.bar{
  height:6px; background:var(--line); border-radius:var(--r-pill); overflow:hidden;
}
.bar > i{
  display:block; height:100%; background:var(--brand);
  border-radius:var(--r-pill); transition:width .5s cubic-bezier(.16,1,.3,1);
}
.bar.on-dark{ background:rgba(255,255,255,.18); }
.bar.on-dark > i{ background:var(--lime); }

/* ---------- Lista de ejercicios de la sesión ---------- */

.ex-row{
  border-bottom:1px solid var(--line-soft);
  padding:14px 18px;
  display:flex; gap:14px; align-items:flex-start;
}
.ex-row:last-child{ border-bottom:none; }
.ex-row.done .ex-name{ color:var(--muted); }

.ex-thumb{
  width:52px; height:52px; flex:none; border-radius:var(--r-sm);
  background:var(--surface-2); object-fit:cover; cursor:pointer;
  border:1px solid var(--line-soft);
}

.ex-main{ flex:1; min-width:0; }
.ex-name{
  font-family:var(--ff-display); font-weight:600; font-size:16px;
  line-height:1.25; display:flex; align-items:center; gap:7px;
}
.ex-name button{
  border:none; background:none; padding:0; cursor:pointer;
  text-align:left; font:inherit; color:inherit;
}
.ex-meta{ font-size:12.5px; color:var(--muted); margin-top:2px; }

.tag-new{
  font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  background:var(--lime); color:#0F3A62; padding:2px 6px; border-radius:5px;
  font-family:var(--ff-ui); flex:none;
}

/* Peso editable */
.weight{
  display:flex; align-items:center; gap:6px; margin-top:9px;
}
.weight .stepper{
  display:flex; align-items:center; background:var(--surface-2);
  border:1px solid var(--line); border-radius:var(--r-pill); overflow:hidden;
}
.weight .stepper button{
  width:32px; height:32px; border:none; background:none; cursor:pointer;
  color:var(--ink-2); line-height:1;
  display:grid; place-items:center;
  transition:background .14s;
}
.weight .stepper button svg{ width:14px; height:14px; vertical-align:0; }
.weight .stepper button:active{ background:var(--line); }
.weight .stepper input{
  width:52px; border:none; background:none; text-align:center;
  font-family:var(--ff-display); font-weight:600; font-size:15px;
  font-variant-numeric:tabular-nums; color:var(--ink);
  padding:0; -moz-appearance:textfield;
}
.weight .stepper input::-webkit-outer-spin-button,
.weight .stepper input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.weight .unit{ font-size:12px; color:var(--muted); }

/* Puntos de series */
.sets{ display:flex; gap:6px; margin-top:11px; flex-wrap:wrap; }
.set-dot{
  width:34px; height:34px; border-radius:var(--r-pill);
  border:1.5px solid var(--line); background:var(--surface);
  cursor:pointer; display:grid; place-items:center;
  font-family:var(--ff-display); font-weight:600; font-size:13px;
  color:var(--muted);
  transition:transform .15s cubic-bezier(.16,1,.3,1), background .18s, border-color .18s, color .18s;
}
.set-dot:active{ transform:scale(.9); }
.set-dot svg{ width:15px; height:15px; vertical-align:0; }
.set-dot.on{
  background:var(--brand); border-color:var(--brand); color:#fff;
}

/* ---------- Calentamiento y estiramiento en la sesión ---------- */

.extra-row{ border-bottom:1px solid var(--line-soft); background:var(--surface-2); }
.extra-row:last-child{ border-bottom:none; border-radius:0 0 var(--r-card) var(--r-card); }
.extra-row:first-child{ border-radius:var(--r-card) var(--r-card) 0 0; }

.extra-head{
  width:100%; display:flex; align-items:center; gap:13px;
  padding:13px 18px; border:none; background:none; cursor:pointer; text-align:left;
}
.extra-ico{
  width:38px; height:38px; flex:none; border-radius:var(--r-sm);
  background:var(--brand-soft); color:var(--brand);
  display:grid; place-items:center;
}
.extra-ico svg{ width:18px; height:18px; vertical-align:0; }
.extra-n{ flex:1; min-width:0; }
.extra-n b{
  display:block; font-family:var(--ff-display); font-size:15px; font-weight:600;
  color:var(--ink); line-height:1.25;
}
.extra-n span{ display:block; font-size:11.5px; color:var(--muted); margin-top:1px; }
.extra-chev{ width:14px; height:14px; color:var(--muted); transition:transform .2s; vertical-align:0; }
.extra-row.on .extra-chev{ transform:rotate(180deg); }

.extra-body{ display:none; padding:0 18px 16px 69px; }
.extra-row.on .extra-body{ display:block; animation:fade .2s; }
.extra-body ul{ margin:0; padding:0; list-style:none; }
.extra-body li{
  font-size:13.5px; line-height:1.5; color:var(--ink-2);
  padding-left:16px; position:relative; margin-bottom:7px;
}
.extra-body li::before{
  content:""; position:absolute; left:2px; top:8px;
  width:5px; height:5px; border-radius:50%; background:var(--brand);
}
.extra-body p{ margin:10px 0 0; font-size:12.5px; color:var(--muted); line-height:1.5; }

/* ---------- Botones ---------- */

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:none; border-radius:var(--r-pill); cursor:pointer;
  padding:13px 22px; font-weight:600; font-size:14.5px;
  white-space:nowrap;
  transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s;
}
.btn:active{ transform:translateY(1px) scale(.99); }
.btn-primary{ background:var(--brand); color:var(--brand-ink); }
.btn-ghost{ background:var(--surface); color:var(--ink); border:1px solid var(--line); }
.btn-lime{ background:var(--lime); color:#0F3A62; }
.btn-full{ width:100%; }
.btn:disabled{ opacity:.42; cursor:default; }

/* ---------- Barra de pestañas ---------- */

.tabs{
  position:fixed; left:0; right:0; bottom:0; z-index:40;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(18px) saturate(160%);
  -webkit-backdrop-filter:blur(18px) saturate(160%);
  border-top:1px solid var(--line);
  padding-bottom:var(--safe-b);
}
@supports not (backdrop-filter: blur(1px)){ .tabs{ background:#fff; } }

.tabs-inner{
  max-width:540px; margin:0 auto; height:var(--tab-h);
  display:grid; grid-template-columns:repeat(4,1fr);
}
.tab{
  border:none; background:none; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  color:var(--muted); font-size:10.5px; font-weight:600; letter-spacing:.01em;
  transition:color .18s;
}
.tab svg{ width:21px; height:21px; vertical-align:0; }
.tab.on{ color:var(--brand); }

/* ---------- Biblioteca de ejercicios ---------- */

.lib-search{
  width:100%; border:1px solid var(--line); background:var(--surface);
  border-radius:var(--r-pill); padding:12px 18px; font-size:14.5px; color:var(--ink);
  outline:none; transition:border-color .18s;
}
.lib-search::placeholder{ color:#98A3B0; }
.lib-search:focus{ border-color:var(--brand); }

.chips{ display:flex; gap:7px; overflow-x:auto; padding:12px 0 4px; scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }
.chip{
  flex:none; border:1px solid var(--line); background:var(--surface);
  border-radius:var(--r-pill); padding:7px 14px; font-size:13px; cursor:pointer;
  color:var(--ink-2); transition:background .16s, color .16s, border-color .16s;
}
.chip.on{ background:var(--brand); color:#fff; border-color:var(--brand); }

.lib-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.lib-card{
  background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-card);
  overflow:hidden; cursor:pointer; text-align:left; padding:0;
  box-shadow:var(--shadow);
  transition:transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s;
}
.lib-card:active{ transform:scale(.98); }
.lib-card .thumb{
  width:100%; aspect-ratio:4/3; object-fit:cover; background:var(--surface-2); display:block;
  border-radius:var(--r-card) var(--r-card) 0 0;
}
.lib-card .t{ padding:11px 13px 13px; }
.lib-card .t b{
  font-family:var(--ff-display); font-size:14px; font-weight:600; line-height:1.2;
  display:block; min-height:2.4em;
}
.lib-card .t span{ font-size:11.5px; color:var(--muted); }

/* ---------- Hoja / ficha de ejercicio ---------- */

.sheet-wrap{
  position:fixed; inset:0; z-index:60; display:none;
}
.sheet-wrap.on{ display:block; }
.sheet-bg{
  position:absolute; inset:0; background:rgba(20,23,26,.42);
  backdrop-filter:blur(3px); animation:fade .2s;
}
.sheet{
  position:absolute; left:0; right:0; bottom:0;
  max-width:540px; margin:0 auto;
  background:var(--bg);
  border-radius:24px 24px 0 0;
  max-height:92dvh; overflow-y:auto;
  animation:slideUp .34s cubic-bezier(.16,1,.3,1);
  padding-bottom:calc(var(--safe-b) + 26px);
}
@keyframes slideUp{ from{ transform:translateY(100%);} to{ transform:none;} }

.sheet-x{
  position:sticky; top:14px; z-index:6;
  margin:14px 14px -50px auto;
  width:36px; height:36px; border:none; border-radius:var(--r-pill);
  background:rgba(20,23,26,.55); color:#fff; cursor:pointer;
  display:grid; place-items:center;
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  transition:transform .15s;
}
.sheet-x:active{ transform:scale(.9); }
.sheet-x svg{ width:15px; height:15px; vertical-align:0; }

.sheet-grab{
  width:38px; height:4px; border-radius:99px; background:var(--line);
  margin:10px auto 0;
}

/* Animación del ejercicio: crossfade entre los dos cuadros */
.anim{
  position:relative; width:100%; aspect-ratio:3/2;
  background:var(--surface); border-bottom:1px solid var(--line-soft);
  overflow:hidden;
}
.anim img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:contain;
}
.anim img.b{ animation:flip 1.6s steps(1,end) infinite; }
@keyframes flip{ 0%,50%{ opacity:0; } 50.01%,100%{ opacity:1; } }
@media (prefers-reduced-motion: reduce){
  .anim img.b{ animation:none; opacity:1; }
}
.anim .badge{
  position:absolute; left:12px; bottom:10px;
  background:rgba(20,23,26,.72); color:#fff;
  font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; font-weight:600;
  padding:4px 9px; border-radius:var(--r-pill);
}

.sheet-head{ padding:18px 20px 4px; }
.sheet-head h2{ font-size:24px; line-height:1.15; }
.sheet-head .sub{ font-size:13px; color:var(--muted); margin-top:4px; }

.muscles{ display:flex; gap:6px; flex-wrap:wrap; margin-top:12px; }
.muscle{
  font-size:11.5px; background:var(--brand-soft); color:var(--brand);
  padding:4px 10px; border-radius:var(--r-pill); font-weight:600;
}

.sheet-body{ padding:8px 20px 0; }
.blk{ margin-top:22px; }
.blk h3{
  font-size:12px; text-transform:uppercase; letter-spacing:.1em;
  color:var(--muted); font-family:var(--ff-ui); font-weight:600; margin-bottom:9px;
  display:flex; align-items:center; gap:7px;
}
.blk h3 svg{ width:14px; height:14px; color:var(--brand); vertical-align:0; }
.blk p{ margin:0; font-size:14.5px; line-height:1.6; color:var(--ink-2); }
.blk ol, .blk ul{ margin:0; padding-left:0; list-style:none; }
.blk li{
  font-size:14.5px; line-height:1.55; color:var(--ink-2);
  padding-left:26px; position:relative; margin-bottom:9px;
}
.blk ol{ counter-reset:s; }
.blk ol li::before{
  counter-increment:s; content:counter(s);
  position:absolute; left:0; top:1px;
  width:19px; height:19px; border-radius:50%;
  background:var(--brand-soft); color:var(--brand);
  font-size:10.5px; font-weight:700; display:grid; place-items:center;
  font-family:var(--ff-ui);
}
.blk ul li::before{
  content:""; position:absolute; left:6px; top:9px;
  width:6px; height:6px; border-radius:50%; background:var(--brand);
}
.blk.warn ul li::before{ background:var(--clay); }
.blk.warn li{ color:var(--ink-2); }

.aproxbox{
  display:flex; gap:11px; align-items:flex-start;
  background:var(--brand-soft); border-radius:var(--r-sm);
  padding:13px 15px; margin-top:20px;
  font-size:13.5px; line-height:1.5; color:var(--brand);
}
.aproxbox svg{ width:17px; height:17px; margin-top:2px; flex:none; vertical-align:0; }
.aproxbox b{ display:block; font-family:var(--ff-display); margin-bottom:2px; }

.tipbox{
  background:var(--brand-soft); border-radius:var(--r-sm);
  padding:14px 16px; font-size:14px; line-height:1.55; color:var(--brand);
  margin-top:22px;
}
.tipbox b{ display:block; font-family:var(--ff-display); margin-bottom:3px; }

.machinebox{
  background:var(--clay-soft); border-radius:var(--r-sm);
  padding:15px 17px 8px; margin-top:22px;
}
.machinebox h3{ color:var(--clay); }
.machinebox li::before{ background:var(--clay) !important; }
.machinebox li:last-child{ margin-bottom:0; }

/* ---------- Vista previa de un día ---------- */

.prev-flag{
  display:inline-flex; align-items:center; gap:5px; margin-top:12px;
  font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:4px 10px; border-radius:var(--r-pill);
}
.prev-flag svg{ width:12px; height:12px; vertical-align:0; }
.prev-flag.done{ background:var(--brand); color:#fff; }
.prev-flag.next{ background:var(--lime); color:#0F3A62; }

.prev-lista{
  background:var(--surface); border-radius:var(--r-card);
  border:1px solid var(--line-soft); overflow:hidden; margin-top:20px;
}
.prev-row{
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; border-bottom:1px solid var(--line-soft);
}
.prev-row:last-child{ border-bottom:none; }
.prev-row img{
  width:40px; height:40px; border-radius:9px; object-fit:cover; flex:none;
  background:var(--surface-2);
}
.prev-n{ flex:1; min-width:0; }
.prev-n b{ display:block; font-family:var(--ff-display); font-size:14px; font-weight:600; line-height:1.25; }
.prev-n span{ display:block; font-size:11.5px; color:var(--muted); margin-top:2px; }
.prev-w{
  font-family:var(--ff-display); font-size:13px; font-weight:600;
  font-variant-numeric:tabular-nums; color:var(--brand); flex:none; text-align:right;
  max-width:88px; line-height:1.25;
}
.prev-nota{
  font-size:13px; color:var(--muted); line-height:1.55;
  margin:20px 0 0; text-align:center;
}

/* ---------- Plan ---------- */

.month{ margin-bottom:14px; }
.month-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px 18px; cursor:pointer; background:none; border:none; width:100%; text-align:left;
}
.month-head > div:first-child{ min-width:0; flex:1; }
.month-head h3{ font-size:17px; line-height:1.25; }
.month-head .mm{ font-size:12px; color:var(--muted); margin-top:3px; }
.month-head .pct{ font-family:var(--ff-display); font-size:16px; font-weight:600; color:var(--brand); flex:none; }
.month-head .chev{ width:15px; height:15px; color:var(--muted); vertical-align:0; }
.month-body{ display:none; padding:0 18px 18px; }
.month.open .month-body{ display:block; }
.month-head .chev{ transition:transform .22s; }
.month.open .chev{ transform:rotate(180deg); }

.plan-ayuda{
  font-size:12.5px; color:var(--muted); line-height:1.5;
  margin:0 0 12px; display:flex; gap:7px; align-items:flex-start;
}
.plan-ayuda svg{ width:14px; height:14px; margin-top:2px; color:var(--brand); vertical-align:0; }

.week-row{ padding:12px 0 2px; border-top:1px solid var(--line-soft); }
.week-row .wk{
  font-size:11px; color:var(--muted); text-transform:uppercase;
  letter-spacing:.08em; font-weight:600; margin-bottom:8px;
}
.day-pills{ display:flex; gap:7px; }
.day-pill{
  flex:1; min-width:0; border:1px solid var(--line); background:var(--surface);
  border-radius:var(--r-sm); padding:10px 8px 11px; cursor:pointer;
  text-align:center; position:relative;
  transition:background .18s, color .18s, border-color .18s, transform .15s;
}
.day-pill:active{ transform:scale(.96); }
.pill-letra{
  display:block; font-family:var(--ff-display); font-weight:600; font-size:13.5px;
  color:var(--ink); line-height:1.2;
}
.pill-letra svg{ width:15px; height:15px; vertical-align:0; }
.pill-foco{
  display:block; font-size:10px; color:var(--muted); line-height:1.25;
  margin-top:3px; hyphens:auto;
}
.pill-flag{
  position:absolute; top:-7px; left:50%; transform:translateX(-50%);
  background:var(--lime); color:#0F3A62; font-size:9px; font-weight:700;
  letter-spacing:.05em; text-transform:uppercase; padding:2px 7px;
  border-radius:var(--r-pill); white-space:nowrap;
}
.day-pill.done{ background:var(--brand); border-color:var(--brand); }
.day-pill.done .pill-letra{ color:#fff; }
.day-pill.done .pill-foco{ color:rgba(255,255,255,.6); }
.day-pill.today{ border-color:var(--brand); border-width:1.5px; background:var(--brand-soft); }

/* ---------- Progreso ---------- */

.stat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stat{
  background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-card);
  padding:16px 18px; box-shadow:var(--shadow);
}
.stat .v{ font-family:var(--ff-display); font-size:34px; font-weight:600; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:-.03em; }
.stat .l{ font-size:12px; color:var(--muted); margin-top:6px; }
.stat.accent{ background:var(--brand); color:#fff; border:none; }
.stat.accent .l{ color:rgba(255,255,255,.66); }

.chart{ width:100%; height:150px; display:block; margin-top:14px; }
.chart:empty{ height:0; margin:0; }
.ring svg{ width:74px; height:74px; vertical-align:0; }

.legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--muted); margin-top:10px; }
.legend i{ width:9px; height:9px; border-radius:3px; display:inline-block; margin-right:5px; vertical-align:-1px; }

.pick{
  width:100%; border:1px solid var(--line); background:var(--surface);
  border-radius:var(--r-sm); padding:10px 12px; font-size:14px; color:var(--ink);
  font-family:var(--ff-ui); outline:none;
}

/* ---------- Wearables ---------- */

.wear-card{
  background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-card);
  padding:16px 18px; box-shadow:var(--shadow);
}
.wear-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px; }
.wear-head b{
  font-family:var(--ff-display); font-size:16px; font-weight:600;
  display:flex; align-items:center; gap:8px; min-width:0;
}
.wear-head b svg{ width:18px; height:18px; color:var(--brand); vertical-align:0; }
.wear-head .st{ font-size:11.5px; color:var(--muted); flex:none; white-space:nowrap; }

.ring-row{ display:flex; gap:18px; align-items:center; }
.ring{ position:relative; width:74px; height:74px; flex:none; }
.ring svg{ transform:rotate(-90deg); }
.ring .mid{
  position:absolute; inset:0; display:grid; place-items:center;
  font-family:var(--ff-display); font-weight:600; font-size:20px; font-variant-numeric:tabular-nums;
}
.ring-lbl{ font-size:11.5px; color:var(--muted); text-align:center; margin-top:4px; }

.act-row{
  display:flex; align-items:center; gap:12px; padding:11px 0;
  border-top:1px solid var(--line-soft);
}
.act-row:first-of-type{ border-top:none; }
.act-ico{
  width:34px; height:34px; border-radius:var(--r-pill); flex:none;
  background:var(--surface-2); display:grid; place-items:center; color:var(--brand);
}
.act-ico svg{ width:16px; height:16px; vertical-align:0; }
.act-row .n{ flex:1; min-width:0; }
.act-row .n b{ font-size:14px; font-weight:600; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.act-row .n span{ font-size:11.5px; color:var(--muted); }
.act-row .d{ font-family:var(--ff-display); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; flex:none; }

.strava-link{
  color:#FC5200; font-weight:700; text-decoration:underline; font-size:12px;
}

/* ---------- Estados vacíos, carga, error ---------- */

.empty{
  text-align:center; padding:30px 22px; color:var(--muted); font-size:14px; line-height:1.55;
}
.empty b{ display:block; font-family:var(--ff-display); font-size:16px; color:var(--ink); margin-bottom:5px; }

.skel{
  background:linear-gradient(90deg, var(--line-soft) 25%, var(--surface-2) 37%, var(--line-soft) 63%);
  background-size:400% 100%; animation:shim 1.3s ease-in-out infinite;
  border-radius:8px;
}
@keyframes shim{ 0%{background-position:100% 0;} 100%{background-position:0 0;} }

.err{
  background:var(--clay-soft); color:#8C3A25; border-radius:var(--r-sm);
  padding:12px 14px; font-size:13px; line-height:1.5;
}

/* ---------- Ajustes ---------- */

.field{ margin-bottom:16px; }
.field label{ display:block; font-size:12.5px; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.field .help{ font-size:11.5px; color:var(--muted); margin-top:5px; line-height:1.45; }
.field input{
  width:100%; border:1px solid var(--line); background:var(--surface);
  border-radius:var(--r-sm); padding:11px 13px; font-size:14px; color:var(--ink);
  outline:none; transition:border-color .18s;
}
.field input:focus{ border-color:var(--brand); }
.field input::placeholder{ color:#98A3B0; }

.status-dot{ width:7px; height:7px; border-radius:50%; display:inline-block; margin-right:6px; vertical-align:1px; }
.status-dot.ok{ background:#4C8B5A; }
.status-dot.off{ background:#C0C8D2; }

/* ---------- Aviso flotante ---------- */

.toast{
  position:fixed; left:50%; bottom:calc(var(--tab-h) + var(--safe-b) + 16px);
  transform:translateX(-50%) translateY(16px);
  background:var(--ink); color:#fff; padding:11px 20px; border-radius:var(--r-pill);
  font-size:13.5px; font-weight:500; z-index:70; opacity:0; pointer-events:none;
  transition:opacity .22s, transform .22s cubic-bezier(.16,1,.3,1);
  box-shadow:var(--shadow-lg); max-width:calc(100% - 36px); text-align:center;
}
.toast.on{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ---------- Descanso entre series ---------- */

.rest-bar{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:calc(var(--tab-h) + var(--safe-b) + 16px);
  background:var(--brand); color:#fff; z-index:50;
  border-radius:var(--r-pill); padding:9px 10px 9px 20px;
  display:none; align-items:center; gap:14px;
  box-shadow:var(--shadow-lg);
}
.rest-bar.on{ display:flex; }
.rest-bar .t{ font-family:var(--ff-display); font-size:19px; font-weight:600; font-variant-numeric:tabular-nums; }
.rest-bar .l{ font-size:11.5px; color:rgba(255,255,255,.62); text-transform:uppercase; letter-spacing:.07em; }
.rest-bar button{
  border:none; background:rgba(255,255,255,.15); color:#fff;
  border-radius:var(--r-pill); width:32px; height:32px; cursor:pointer; display:grid; place-items:center;
}
.rest-bar button svg{ width:14px; height:14px; vertical-align:0; }
