:root {
  --bg: #0A0B0E;
  --bg2: #0F1115;
  --card: #15171C;
  --card2: #1D2027;
  --card3: #262A33;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --txt: #F4F4F5;
  --txt2: #C9CCD2;
  --muted: #8E929B;
  --faint: #5C606A;
  --accent: #D4FF3F;
  --accent-ink: #0A0B0E;
  --gold: #FFC23C;
  --danger: #FF5A5F;
  --good: #3DDC97;
  --day: #D4FF3F;
  --day-a: rgba(212, 255, 63, .14);
  --day-b: rgba(212, 255, 63, .3);
  --r: 20px;
  --r-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt); font-family: var(--font); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { min-height: 100dvh; }
#app { max-width: 540px; margin: 0 auto; position: relative; min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; touch-action: manipulation; }
button:disabled { opacity: .3; cursor: default; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--round); letter-spacing: -.02em; }
p { margin: 0; }
small { font-size: 13px; color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; font-family: var(--round); }
.ic { flex: none; display: block; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 10px; }
.col { display: flex; flex-direction: column; }
.center { text-align: center; justify-content: center; }
.mt { margin-top: 14px; }
.pad { padding: 0 4px; }
.gold { color: var(--gold) !important; }

/* ---------- Estructura ---------- */
.tabs-view { min-height: 100dvh; }
.tabs-view.covered { visibility: hidden; }
.page { padding: calc(var(--st) + 6px) 16px 0; min-height: 100dvh; }
.bottom-space { height: calc(110px + var(--sb)); }
.layer { position: fixed; inset: 0; max-width: 540px; margin: 0 auto; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 20; }
.layer-wk { z-index: 25; overflow: hidden; }
.slide-in { animation: slideIn .32s var(--ease); }
.slide-up { animation: slideUp .38s var(--ease); }
@keyframes slideIn { from { transform: translateX(28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideUp { from { transform: translateY(8%); opacity: 0; } to { transform: none; opacity: 1; } }
.fade-in { animation: fadeIn .45s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.top { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.top.sticky { position: sticky; top: 0; z-index: 5; margin: calc(-1 * (var(--st) + 6px)) -16px 8px; padding: calc(var(--st) + 6px) 10px 6px; background: rgba(10, 11, 14, .82); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border-bottom: 1px solid var(--line); }
.top-title { flex: 1; min-width: 0; text-align: center; }
.top-title b { display: block; font-family: var(--round); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title small { display: block; font-size: 12px; }
.top-actions { display: flex; min-width: 44px; justify-content: flex-end; }
.title { font-size: 34px; font-weight: 800; flex: 1; padding-top: 6px; }
.brand { flex: 1; display: flex; align-items: center; gap: 9px; font-family: var(--round); font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--txt2); transition: background .15s; flex: none; }
.icon-btn:active { background: var(--card2); }
.icon-btn.danger { color: var(--danger); }
.hello { margin: 4px 0 18px; }
.hello small { font-size: 15px; }
.hello h1 { font-size: 30px; font-weight: 800; margin-top: 2px; }

/* ---------- Tarjetas y botones ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; display: block; width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 650; font-size: 15px; transition: transform .12s var(--ease), filter .15s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.big { height: 56px; font-size: 17px; border-radius: 17px; }
.btn.wide { width: 100%; }
.btn-day { background: var(--day); color: #0A0B0E; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--card2); color: var(--txt); }
.btn.danger { background: rgba(255, 90, 95, .12); color: var(--danger); }
.btn.danger-solid { background: var(--danger); color: #fff; }
.link { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 0; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 10px; }
.sec-title h2 { font-size: 20px; font-weight: 750; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 10px 0 0; }
.hint.pad { margin: 0 2px 14px; }

/* ---------- Inicio ---------- */
.install { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, rgba(212, 255, 63, .1), rgba(60, 200, 255, .06)); border-color: rgba(212, 255, 63, .2); }
.install > .ic { color: var(--accent); margin-top: 2px; }
.install p { font-size: 14px; color: var(--txt2); margin-top: 3px; }
.install .icon-btn { margin: -10px -10px 0 0; width: 36px; height: 36px; }
.share-ic { display: inline-flex; vertical-align: -2px; color: #3CC8FF; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); position: relative; }
.wd small { font-size: 11px; font-weight: 600; }
.wd-n { font-size: 17px; font-weight: 700; }
.wd i { width: 6px; height: 6px; border-radius: 3px; background: var(--c); opacity: .55; }
.wd i.off { background: var(--faint); opacity: .35; }
.wd.did { background: color-mix(in srgb, var(--c) 18%, var(--card)); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.wd.did i { opacity: 1; width: 16px; }
.wd.today { border-color: var(--txt); }
.wd.today small { color: var(--txt); }

.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 18px 18px; margin-bottom: 12px; background: radial-gradient(120% 90% at 100% 0%, var(--day-a), transparent 60%), linear-gradient(180deg, var(--day-b), transparent 70%), var(--card); border: 1px solid color-mix(in srgb, var(--day) 30%, transparent); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: var(--day); opacity: .12; filter: blur(30px); pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero-top small { color: var(--day); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--txt2); }
.hero h2 { font-size: 40px; font-weight: 850; margin-top: 6px; line-height: 1.05; }
.hero-sub { color: var(--txt2); margin-top: 4px; font-size: 15px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 12px; font-size: 13px; color: var(--txt2); }
.hero-stats span { display: flex; align-items: center; gap: 5px; }
.hero-stats .ic { color: var(--day); }
.hero-list { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
.hero-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hero-list li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-list em { font-style: normal; color: var(--muted); flex: none; }
.hero-list li.more { color: var(--muted); border: 0; padding-bottom: 0; }
.hero .bar { margin: 14px 0 16px; }
.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--day); border-radius: 4px; transition: width .5s var(--ease); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--day); box-shadow: 0 0 0 0 var(--day); animation: live 1.6s infinite; display: inline-block; flex: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--day) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.done-today { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.done-today small { display: block; }
.check-big { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #0A0B0E; flex: none; }
.rest-note { display: flex; gap: 10px; align-items: center; color: var(--txt2); font-size: 14px; padding: 4px 4px 14px; }
.rest-note .ic { color: #C77DFF; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.mini-day { flex: none; width: 156px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; scroll-snap-align: start; transition: transform .12s; }
.mini-day:active { transform: scale(.97); }
.mini-day i { width: 22px; height: 5px; border-radius: 3px; background: var(--day); margin-bottom: 8px; }
.mini-day b { font-family: var(--round); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-day small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-day.free i { background: linear-gradient(90deg, #FF5A3C, #3CC8FF, #B4F03C, #FFC23C, #C77DFF); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tiles.four { grid-template-columns: repeat(2, 1fr); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 12px 13px; min-width: 0; }
.tile small { display: block; font-size: 12px; font-weight: 600; }
.tile b { display: block; font-size: 22px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.tile b span { font-size: 14px; color: var(--muted); font-weight: 700; }
.tile em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile em.up { color: var(--good); }
.tile em.down { color: var(--danger); }

.list { padding: 4px 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; width: 100%; border-bottom: 1px solid var(--line); min-height: 56px; }
.li:last-child { border-bottom: 0; }
button.li:active { background: var(--card2); }
.li b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); flex: none; }
.li-ic.gold { background: rgba(255, 194, 60, .14); }
.li-val { font-weight: 700; font-size: 15px; flex: none; }
.tips b { font-family: var(--round); font-size: 17px; }
.tips ol { margin: 10px 0 0; padding-left: 20px; color: var(--txt2); font-size: 14px; display: grid; gap: 8px; }
.mini-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; background: var(--accent); color: #000; vertical-align: -3px; }

/* ---------- Barra de pestañas ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 540px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(var(--sb) + 6px); background: rgba(13, 14, 18, .78); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); border-top: 1px solid var(--line); z-index: 10; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); padding: 4px 0; transition: color .15s; }
.tabbar button.on { color: var(--txt); }
.tabbar button.on .ic { color: var(--accent); }
.mini-bar { position: fixed; left: 0; right: 0; max-width: 540px; margin: 0 auto; bottom: calc(var(--sb) + 66px); z-index: 11; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--day) 16%, #15171C); border-top: 1px solid color-mix(in srgb, var(--day) 40%, transparent); width: 100%; }
.mini-bar b { display: block; font-size: 15px; }
.mini-bar small { display: block; font-size: 12px; }
.mini-cta { display: flex; align-items: center; gap: 4px; color: var(--day); font-weight: 700; font-size: 14px; }

/* ---------- Historial ---------- */
.cal { padding: 10px 12px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; text-align: center; margin-bottom: 6px; }
.cal-head b { display: block; font-family: var(--round); font-size: 17px; }
.cal-head small { display: block; font-size: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid > small { font-size: 11px; font-weight: 600; padding-bottom: 4px; }
.cal-d { aspect-ratio: 1; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--muted); display: grid; place-items: center; font-family: var(--round); }
.cal-d:disabled { opacity: 1; }
.cal-d.has { background: var(--c); color: #0A0B0E; font-weight: 800; }
.cal-d.today { box-shadow: inset 0 0 0 1.5px var(--txt); color: var(--txt); }
.cal-d.has.today { color: #0A0B0E; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty b { color: var(--txt); font-size: 17px; }
.empty .ic { color: var(--faint); }
.sess { display: flex; gap: 12px; padding: 14px 16px 14px 12px; }
.sess:active { background: var(--card2); }
.sess-bar { width: 4px; border-radius: 2px; background: var(--day); flex: none; }
.sess b { font-family: var(--round); font-size: 17px; }
.sess-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 5px 0 6px; font-size: 13px; color: var(--txt2); }
.sess-meta span { display: flex; align-items: center; gap: 4px; }
.sess-meta .ic { color: var(--muted); }
.sess-meta .gold .ic { color: var(--gold); }
.sess-ex { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.det-hero { margin: 0 0 14px; padding: 18px 0 2px; background: radial-gradient(100% 80% at 0% 0%, var(--day-a), transparent 70%); border-radius: 20px; }
.det-hero > small { color: var(--day); font-weight: 700; padding: 0 2px; }
.det-hero h1 { font-size: 34px; font-weight: 850; margin: 2px 2px 14px; }
.det-ex { padding: 6px 0 10px; }
.det-h { width: 100%; padding: 10px 16px 6px; }
.det-h b { font-size: 16px; }
.det-h .ic { color: var(--muted); }
.det-set { display: flex; align-items: center; gap: 12px; padding: 5px 16px; font-size: 15px; }
.det-set.warm { color: var(--muted); }
.set-n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); font-weight: 700; font-size: 14px; flex: none; font-family: var(--round); }
.set-n.sm { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
.warm .set-n { color: var(--gold); }
.pr-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 800; color: #1a1300; background: var(--gold); padding: 2px 7px; border-radius: 99px; }
.ex-note { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--txt2); padding: 8px 16px 0; }
.ex-note .ic { margin-top: 2px; color: var(--muted); }
.det-fb b { font-family: var(--round); font-size: 16px; display: block; margin-bottom: 6px; }
.fb-line { padding: 6px 0; border-top: 1px solid var(--line); }
.fb-line span { font-weight: 600; font-size: 14px; display: block; }
.note-card { display: flex; gap: 8px; color: var(--txt2); font-size: 14px; }

/* ---------- Resumen ---------- */
.summary { background: radial-gradient(120% 60% at 50% -10%, var(--day-a), transparent 60%); }
.sum-hero { text-align: center; padding: 34px 0 20px; }
.sum-check { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--day); color: #0A0B0E; box-shadow: 0 0 60px color-mix(in srgb, var(--day) 50%, transparent); }
.pop { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.sum-hero small { color: var(--day); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.sum-hero h1 { font-size: 38px; font-weight: 850; margin-top: 4px; }
.sum-hero p { color: var(--muted); margin-top: 2px; }
.sum-actions { display: grid; gap: 10px; margin-top: 20px; }

/* ---------- Progreso ---------- */
.vol { padding: 10px 14px 16px; }
.vol-head { display: flex; align-items: center; justify-content: space-between; text-align: center; }
.vol-head b { display: block; font-family: var(--round); font-size: 17px; }
.vol-head small { display: block; font-size: 12px; }
.vol-legend { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.vol-legend span { display: flex; align-items: center; gap: 6px; }
.lg-done { width: 14px; height: 8px; border-radius: 4px; background: var(--accent); }
.lg-plan { width: 2px; height: 12px; border-radius: 1px; background: var(--txt); }
.vol-row { display: grid; grid-template-columns: 88px 1fr 66px; align-items: center; gap: 10px; padding: 5px 0; }
.vol-name { font-size: 13.5px; color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vol-track { position: relative; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.vol-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--accent); transition: width .6s var(--ease); }
.vol-plan { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--txt); box-shadow: 0 0 0 2px var(--card); }
.vol-n { font-size: 14px; font-weight: 700; text-align: right; }
.vol-n small { font-size: 12px; font-weight: 600; }
.spark { flex: none; }
.spark-empty { width: 64px; }
.muted.ic, .ic.muted { color: var(--faint); }
.chart-card { padding: 12px 10px 8px; }
.chart-card .seg { margin: 0 4px 8px; }
.chart { position: relative; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--round); }
.chart .axis.strong { fill: var(--txt); font-weight: 700; font-size: 12px; }
.chart .cross { stroke: rgba(255, 255, 255, .25); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; top: -6px; transform: translateX(-50%); background: var(--card3); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 10px; pointer-events: none; text-align: center; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.tip b { display: block; font-size: 14px; font-family: var(--round); }
.tip small { display: block; font-size: 11.5px; }
.empty-chart { padding: 40px; text-align: center; color: var(--muted); }
.rep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.rep-grid div { background: var(--card2); border-radius: 12px; padding: 8px 10px; }
.rep-grid small { display: block; font-size: 11.5px; }
.rep-grid b { font-size: 17px; }
.hist-row { padding: 12px 16px; }
.hist-row:active { background: var(--card2); }
.hist-row b { font-size: 15px; }
.hist-row .row small { font-weight: 600; }
.hist-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hist-sets span { background: var(--card2); padding: 4px 9px; border-radius: 8px; font-size: 13.5px; }

.seg { display: flex; background: var(--card2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); text-align: center; transition: background .2s, color .2s; padding: 0 10px; }
.seg button.on { background: var(--card3); color: var(--txt); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.seg-sm button { height: 30px; font-size: 13px; }

/* ---------- Rutina ---------- */
.week-plan { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 4px 0 10px; }
.wp { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 2px 8px; text-align: center; position: relative; overflow: hidden; }
.wp::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.wp small { display: block; font-size: 11px; font-weight: 700; }
.wp b { display: block; font-size: 10.5px; font-weight: 600; color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.wp.off b { color: var(--faint); }
.day-card { display: flex; padding: 0; overflow: hidden; }
.day-main { flex: 1; display: flex; gap: 12px; padding: 14px 0 14px 12px; min-width: 0; }
.day-main:active { background: var(--card2); }
.day-bar { width: 4px; border-radius: 2px; background: var(--day); flex: none; }
.day-main small { display: block; color: var(--day); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.day-main b { display: block; font-family: var(--round); font-size: 21px; font-weight: 800; }
.day-main .muted { display: block; font-size: 13.5px; }
.day-meta { display: block; font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.day-order { display: flex; flex-direction: column; justify-content: center; padding-right: 4px; }
.day-order .icon-btn { width: 40px; height: 38px; }
.rules { padding: 6px 16px 10px; margin-top: 16px; }
.rules-h { width: 100%; padding: 10px 0; }
.rules-h b { font-family: var(--round); font-size: 17px; }
.rule { padding: 10px 0; border-top: 1px solid var(--line); }
.rule small { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; color: var(--accent); }
.rule p { font-size: 14px; color: var(--txt2); margin-top: 2px; }

.form label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin: 4px 0 8px; }
.txt { display: block; width: 100%; color: var(--txt); font-weight: 500; margin-top: 6px; height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); padding: 0 14px; font-size: 16px; outline: none; transition: border-color .15s; }
.txt:focus { border-color: var(--accent); }
.txt.area { height: auto; padding: 12px 14px; resize: none; line-height: 1.4; }
.wd-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 14px; }
.wd-pick button { height: 40px; border-radius: 11px; background: var(--card2); font-weight: 700; text-align: center; color: var(--muted); }
.wd-pick button.on { background: var(--day); color: #0A0B0E; }
.wd-pick button.taken:not(.on) { opacity: .45; text-decoration: line-through; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; transition: transform .15s; }
.swatches button.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--txt); }
.ex-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--day); color: #0A0B0E; font-weight: 800; font-size: 14px; flex: none; font-family: var(--round); }
.ex-num.sm { width: 26px; height: 26px; font-size: 12.5px; }
.item-row { padding-right: 6px; }
.item-main { padding: 2px 0; }
.item-ctrl { display: flex; }
.item-ctrl .icon-btn { width: 34px; height: 40px; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; background: var(--card2); border-radius: 12px; padding: 0 12px; margin-bottom: 10px; color: var(--muted); }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 16px; color: var(--txt); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.wrap { margin-bottom: 12px; }
.chip { height: 34px; padding: 0 13px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--txt2); transition: all .15s; flex: none; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--txt); color: #0A0B0E; border-color: var(--txt); }
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-height: 56px; }
.form > .set-line:first-child, .form > label + .set-line { border-top: 0; }
.set-line > span { font-size: 15px; font-weight: 500; }
.set-line > span small { display: block; font-size: 12.5px; font-weight: 400; }
.toggle { width: 51px; height: 31px; border-radius: 16px; background: var(--card3); position: relative; transition: background .2s; flex: none; }
.toggle i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.toggle.on { background: var(--good); }
.toggle.on i { transform: translateX(20px); }
.stepper { display: flex; align-items: center; background: var(--card2); border-radius: 12px; flex: none; }
.stepper .icon-btn { width: 40px; height: 38px; border-radius: 12px; }
.stepper-v { min-width: 58px; text-align: center; font-weight: 700; font-family: var(--round); font-variant-numeric: tabular-nums; }
.file-btn { position: relative; margin: 10px 0 0 !important; color: var(--txt) !important; font-size: 15px !important; }
.file-btn input { position: absolute; inset: 0; opacity: 0; }
.form .btn + .btn { margin-top: 10px; }
.form .row .btn + .btn { margin-top: 0; }

/* ---------- Entrenamiento ---------- */
.workout { height: 100%; display: flex; flex-direction: column; }
.wk-head { position: relative; display: flex; align-items: center; gap: 4px; padding: calc(var(--st) + 6px) 10px 10px 6px; background: rgba(10, 11, 14, .9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); z-index: 3; }
.wk-title { flex: 1; min-width: 0; padding-left: 2px; }
.wk-title b { display: block; font-family: var(--round); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-title small { display: block; font-size: 12.5px; }
.wk-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: rgba(255, 255, 255, .05); }
.wk-progress i { display: block; height: 100%; background: var(--day); transition: width .5s var(--ease); box-shadow: 0 0 12px var(--day); }
.wk-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 12px 0; scroll-padding-top: 12px; }
.wk-spacer { height: calc(140px + var(--sb)); }
.warm-card { display: flex; gap: 12px; align-items: center; }
.warm-card p { font-size: 13.5px; color: var(--txt2); }
.warm-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 194, 60, .14); color: var(--gold); flex: none; }
.ex-card { padding: 14px 0 10px; scroll-margin-top: 10px; transition: border-color .3s; }
.ex-card.ex-done { border-color: color-mix(in srgb, var(--day) 35%, transparent); }
.ex-head { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px; }
.ex-head .ex-num { background: var(--card3); color: var(--txt); }
.ex-done .ex-head .ex-num { background: var(--day); color: #0A0B0E; }
.ex-name { flex: 1; min-width: 0; }
.ex-name b { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.ex-name small { display: block; font-size: 12.5px; margin-top: 1px; }
.rir { color: var(--day); font-weight: 700; }
.sug { display: flex; gap: 8px; margin: 10px 14px 4px; padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 13px; line-height: 1.4; color: var(--txt2); }
.sug .ic { margin-top: 1px; color: var(--muted); }
.sug em { font-style: normal; color: var(--faint); }
.sug-up { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--txt); }
.sug-up .ic { color: var(--good); }
.sug-same .ic { color: var(--day); }
.sug-down { background: rgba(255, 194, 60, .1); }
.sug-down .ic { color: var(--gold); }
.fb { margin: 10px 14px 6px; padding: 12px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line2); }
.fb p { font-size: 14px; color: var(--txt2); margin-bottom: 8px; }
.fb p + .chips { margin-bottom: 10px; }
.fb .chips + p { margin-top: 2px; }
.fb .link { padding: 4px 0 0; font-size: 13px; }
.fb .chip { height: 32px; font-size: 13px; padding: 0 11px; }
.fb .chip.on { background: var(--day); border-color: var(--day); color: #0A0B0E; }
.rec { background: var(--day-a); border-color: var(--day-b); }
.rec p { color: var(--txt); }
.sets { margin-top: 8px; }
.set-row { display: grid; grid-template-columns: 36px 1fr 74px 60px 46px; gap: 6px; align-items: center; padding: 4px 10px 4px 12px; transition: background .25s; }
.set-hd { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding-top: 0; padding-bottom: 2px; }
.set-hd span { text-align: center; }
.set-hd span:nth-child(2) { text-align: left; padding-left: 4px; }
.set-row.done { background: var(--day-a); }
.set-row .set-n { margin: 0 auto; }
.set-row.done .set-n { background: transparent; color: var(--day); }
.set-prev { font-size: 13.5px; color: var(--muted); font-family: var(--round); font-variant-numeric: tabular-nums; padding: 8px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
input.num { width: 100%; height: 40px; border-radius: 11px; border: 1.5px solid transparent; background: var(--card2); text-align: center; font-size: 17px; font-weight: 700; font-family: var(--round); font-variant-numeric: tabular-nums; outline: none; padding: 0 4px; transition: border-color .15s, background .15s; }
input.num::placeholder { color: var(--faint); font-weight: 600; }
input.num:focus { border-color: var(--day); background: var(--card3); }
.set-row.done input.num { background: transparent; }
.set-check { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--faint); margin-left: auto; transition: background .2s, color .2s, transform .15s; }
.set-check:active { transform: scale(.88); }
.set-check.on { background: var(--day); color: #0A0B0E; animation: checkPop .35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes checkPop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.set-row.warm input.num { color: var(--gold); }
.ex-actions { display: flex; gap: 8px; padding: 8px 14px 2px; flex-wrap: wrap; }
.add-ex { margin: 4px 0 14px; height: 52px; }
.big-num { width: 110px !important; height: 44px !important; font-size: 20px !important; }

/* Temporizador */
.rest-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--sb) + 16px); z-index: 45; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 7px; border-radius: 99px; background: rgba(32, 35, 43, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line2); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); font-weight: 700; font-size: 18px; cursor: pointer; animation: pillIn .4s var(--ease); white-space: nowrap; }
@keyframes pillIn { from { transform: translate(-50%, 30px); opacity: 0; } }
.rest-pill.rest-done { background: var(--day); color: #0A0B0E; animation: pulse 1s ease-in-out 3; }
.rest-pill.rest-done .pill-btn { background: rgba(0, 0, 0, .15); color: #0A0B0E; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.06); } }
.pill-btn { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.ring { position: relative; flex: none; }
.ring svg { display: block; }
.ring-c { position: absolute; inset: 0; display: grid; place-items: center; }
.rest-full { position: fixed; inset: 0; z-index: 70; background: rgba(5, 6, 8, .85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: grid; place-items: center; padding: 20px; }
.rest-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.rest-box > small { font-size: 14px; font-weight: 600; }
.rest-big { font-size: 56px; font-weight: 800; letter-spacing: -.03em; }
.rest-box .row .btn { min-width: 100px; }

/* ---------- Hojas ---------- */
.sheet-wrap { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fadeBg .25s ease both; }
@keyframes fadeBg { from { opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 540px; max-height: 88dvh; overflow-y: auto; background: #17191F; border-radius: 26px 26px 0 0; border-top: 1px solid var(--line2); padding: 8px 18px calc(var(--sb) + 20px); animation: sheetUp .34s var(--ease) both; }
.sheet.tall { height: 88dvh; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.closing .sheet { animation: sheetDown .2s ease-in both; }
.closing .sheet-bg { animation: fadeOut .2s ease-in both; }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes fadeOut { to { opacity: 0; } }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--card3); margin: 0 auto 14px; }
.sheet-body h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.sheet-body .muted { font-size: 14px; }
.menu-title { padding: 0 4px; }
.menu { margin-top: 8px; display: grid; gap: 2px; }
.menu-i { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 12px; border-radius: 14px; font-weight: 550; font-size: 16px; }
.menu-i:active { background: var(--card2); }
.menu-i .ic { color: var(--muted); }
.menu-i.danger, .menu-i.danger .ic { color: var(--danger); }
.picker { display: flex; flex-direction: column; height: calc(88dvh - 50px); }
.picker-list { flex: 1; overflow-y: auto; margin: 0 -18px; padding: 0 2px; }
.picker-list .li { padding: 10px 16px; }
.li.create { color: var(--accent); }
.li.create .li-ic { background: rgba(212, 255, 63, .12); color: var(--accent); }
.li.create b { color: var(--accent); }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.big-h { font-size: 32px !important; }
.preview-list { margin: 12px -18px 0; }
.preview-list .li { min-height: 48px; padding: 8px 18px; }
.preview-list .li b { font-weight: 500; }
.preview-list .tnum { font-size: 14px; }

.plates { display: flex; align-items: center; justify-content: center; gap: 3px; height: 130px; margin: 14px 0 8px; }
.bar-l { width: 40px; height: 10px; background: #9CA0A8; border-radius: 3px 0 0 3px; }
.bar-end { width: 16px; height: 14px; background: #9CA0A8; border-radius: 0 3px 3px 0; }
.plate { width: 20px; border-radius: 4px; display: grid; place-items: center; animation: pop .35s var(--ease) both; }
.plate span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; font-weight: 800; color: #0A0B0E; }

/* ---------- Avisos y confeti ---------- */
.toasts { position: fixed; top: calc(var(--st) + 10px); left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: rgba(38, 42, 51, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 16px; font-size: 14.5px; font-weight: 600; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); animation: toastIn .4s var(--ease); max-width: 100%; }
@keyframes toastIn { from { transform: translateY(-20px) scale(.95); opacity: 0; } }
.toast-pr { display: flex; gap: 10px; align-items: center; }
.toast-pr .ic { color: var(--gold); }
.toast-pr small { color: var(--txt2); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; bottom: 30%; border-radius: 2px; animation: conf var(--d) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) * -1 * -1)) rotate(var(--r)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 600px) {
  body { background: #060709; }
  #app { box-shadow: 0 0 0 1px var(--line); }
}
