@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #050506; --card: #111113; --card2: #0B0B0D; --line: #232327; --line2: #2E2E33;
  --ink: #F4F4F5; --ink2: #D4D4D8; --muted: #A1A1A8; --faint: #8E8E96;
  --mint: #3EF0B4; --mint-bg: #0F2A22; --mint-line: #1F4D3D;
  --blue: #1F5FE0; --blue-ink: #5B9BFF; --blue-bg: #0F1B33; --blue-line: #1A2B4F;
  --amber: #F5C46B; --amber-bg: #2A2210; --red: #FF6B6B; --red-bg: #2A1214;
  --prot: #F4A582; --carb: #F2D479; --fat: #C9B04A; --veg: #7FB069;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
/* Sin «rebote» elástico al llegar arriba o abajo, y toques sin retraso */
html, body { overscroll-behavior: none; }
button, a, [role="button"] { touch-action: manipulation; }
a { color: var(--blue-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { color-scheme: dark; }
::placeholder { color: #6B6B73; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -0.5px; line-height: 1.02; }
.h1 { font-family: var(--display); font-weight: 800; font-size: 36px; letter-spacing: -0.8px; line-height: 1; }
.h2 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.3px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; line-height: 1.45; }

/* ---------- app del cliente (móvil) · diseño del prototipo ---------- */
.screen { max-width: 480px; margin: 0 auto; padding: calc(26px + env(safe-area-inset-top, 0px)) 20px calc(112px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; }
.screen.nonav { padding-bottom: calc(40px + var(--safe-b)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.big { border-radius: 24px; padding: 20px; gap: 16px; }
.card.blue { background: var(--blue-bg); border-color: var(--blue-line); }
.card.mint { background: var(--mint-bg); border-color: var(--mint-line); }
.card.flat { background: var(--card2); }
.card.ink { background: var(--bg); border-color: #1A1A1D; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { border-left: 1px solid #1A1A1D; }
.stat b { font-family: var(--display); font-weight: 800; font-size: 22px; }
.stat b small { font-size: 12px; color: var(--faint); font-family: var(--body); font-weight: 500; }
.stat span { font-size: 11px; color: var(--faint); }
.tile { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.tile b { font-family: var(--display); font-weight: 800; font-size: 26px; }
.tile span { font-size: 12px; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #1A1A1D; font-size: 13px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.avatar-s { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 16px; color: #fff; }
.avatar-s.sm { width: 32px; height: 32px; font-size: 14px; }
.from-sebas { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 20px; background: var(--blue-bg); border: 1px solid var(--blue-line); }
.from-sebas .eyebrow { color: #8DB8FF; }
.quote { margin: 0; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -0.3px; color: var(--ink2); }
.quote small { display: block; margin-top: 6px; font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--faint); letter-spacing: 0; }

.btn { min-height: 56px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--ink); font-weight: 600; font-size: 15px; min-height: 48px; }
.btn.mint { background: var(--mint); color: #050506; font-weight: 800; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 999px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.link.blue { color: var(--blue-ink); }
.iconbtn { width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 50%; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.in { min-height: 48px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card2); font-size: 16px; width: 100%; }
textarea.in { padding: 12px 14px; min-height: 96px; line-height: 1.45; resize: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); flex: none; margin-top: 1px; }
input[type=range] { width: 100%; height: 36px; accent-color: var(--blue); }

/* menú flotante de iconos */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-b)); width: min(448px, calc(100% - 32px)); height: 64px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; z-index: 10; }
.nav button { width: 52px; height: 48px; border: 0; background: none; color: var(--faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.nav button svg { width: 22px; height: 22px; }
.nav button i { width: 4px; height: 4px; border-radius: 50%; }
.nav button[aria-current="page"] { color: var(--mint); }
.nav button[aria-current="page"] i { background: var(--mint); }

/* Hoy */
.ringcard { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.ringcard .info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.links2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.links2 button { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 112px; padding: 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-align: left; cursor: pointer; }
.links2 b { font-size: 15px; } .links2 small { font-size: 13px; color: var(--faint); }

/* Entreno */
.daytabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px; scrollbar-width: none; }
.daytabs::-webkit-scrollbar { display: none; }
.daytabs button { flex: none; min-height: 52px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 14px; background: transparent; color: var(--ink2); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; cursor: pointer; }
.daytabs button b { font-size: 14px; } .daytabs button span { font-size: 11px; opacity: .7; }
.daytabs button[aria-selected="true"] { background: var(--ink); color: #050506; border-color: var(--ink); }
.toggle2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.toggle2 button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--faint); font-size: 14px; font-weight: 600; cursor: pointer; }
.toggle2 button[aria-pressed="true"] { background: #1A1A1D; color: var(--ink); font-weight: 700; }
.exitem { border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.exitem > button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.exitem .body { padding: 0 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.video { height: 190px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); color: var(--faint); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; position: relative; }
.video .dose { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(5,5,6,.8); font-size: 12px; color: var(--ink2); }
.segs { display: grid; gap: 4px; }
.segs span { height: 4px; border-radius: 2px; background: #232327; }
.sets { border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.sets .sr { display: grid; grid-template-columns: 34px 1fr 1fr 34px; gap: 6px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #1A1A1D; min-height: 52px; }
.sets .sr:last-child { border-bottom: 0; }
.sets .sr.h { min-height: 0; padding: 10px 14px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
.sets .sr.cur { background: #0F1B33; }
.sets .n { font-family: var(--display); font-weight: 800; font-size: 18px; }
.step { display: flex; align-items: center; gap: 4px; }
.step button { width: 30px; height: 40px; flex: none; border: 0; border-radius: 8px; background: #1A1A1D; color: var(--ink); font-size: 18px; cursor: pointer; }
.step b { flex: 1; min-width: 0; text-align: center; font-size: 17px; }
.box { width: 32px; height: 32px; border-radius: 10px; border: 2px solid #3A3A40; display: flex; align-items: center; justify-content: center; justify-self: end; }
.box.on { background: var(--mint); border-color: var(--mint); }
.restcard { padding: 18px; border-radius: 22px; background: var(--blue-bg); border: 1px solid var(--blue-line); display: flex; align-items: center; gap: 16px; }
.restcard .ring { flex: none; position: relative; width: 96px; height: 96px; }
.restcard .ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 24px; }
.prbanner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--mint-bg); border: 1px solid var(--mint-line); }
.okcircle { width: 72px; height: 72px; border-radius: 50%; background: var(--mint); display: flex; align-items: center; justify-content: center; }

/* Comidas */
.meal { border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.meal-h { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #1A1A1D; }
.item .bar { width: 6px; align-self: stretch; border-radius: 3px; flex: none; }
.item select { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card2); padding: 0 8px; font-size: 15px; font-weight: 600; }
.item .amt { flex: 0 1 auto; max-width: 46%; text-align: right; font-size: 14px; font-weight: 700; line-height: 1.3; }
.item .amt small { display: block; color: var(--faint); font-weight: 500; font-size: 12px; }
.item > span:nth-child(2) { flex: 1 1 0; }
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 14px; }
.tl .rail { display: flex; flex-direction: column; align-items: center; padding-top: 4px; width: 18px; flex: none; }
.tl .rail i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3A3A40; box-sizing: border-box; }
.tl .rail i.on { background: var(--mint); border-color: var(--mint); }
.tl .rail i.now { border-color: var(--blue-ink); background: var(--blue-ink); }
.tl .rail span { flex: 1; width: 2px; margin-top: 4px; background: #232327; min-height: 18px; }
.tl .txt { padding-bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.table { display: flex; flex-direction: column; }
.table > div { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; min-height: 42px; border-top: 1px solid #1A1A1D; font-size: 14px; }
.table > div span:last-child { min-width: 56px; text-align: right; color: var(--faint); }

/* Revisión */
.phases { display: flex; gap: 6px; }
.phases > span { display: flex; flex-direction: column; gap: 6px; }
.phases i { height: 4px; border-radius: 2px; background: #1A1A1D; overflow: hidden; display: block; }
.phases i b { display: block; height: 100%; background: var(--mint); }
.phases small { font-size: 11px; color: var(--faint); }
.scale5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.scale5 button { min-height: 64px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink2); font-family: var(--display); font-size: 26px; font-weight: 700; cursor: pointer; }
.scale5 button[aria-pressed="true"] { background: var(--mint); color: #050506; border-color: var(--mint); font-weight: 800; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices button { min-height: 58px; padding: 0 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink2); font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.choices button[aria-pressed="true"] { border-color: var(--mint); background: var(--mint-bg); color: var(--ink); font-weight: 700; }
.bigstep { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 18px 0; }
.bigstep button { width: 60px; height: 60px; border: 1px solid var(--line2); border-radius: 50%; background: transparent; color: var(--ink); font-size: 28px; cursor: pointer; }
.bigstep b { min-width: 150px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: -2px; }
.bigstep b small { font-size: 18px; letter-spacing: 0; color: var(--faint); }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; }
.qchips button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink2); font-size: 15px; font-weight: 600; cursor: pointer; }
.qchips button[aria-pressed="true"] { border-color: var(--mint); background: var(--mint-bg); color: var(--mint); }
.rv { display: flex; flex-direction: column; border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.rv button { min-height: 56px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.rv button:first-child { border-top: 0; }
.rv button span:first-child { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rv small { font-size: 13px; color: var(--faint); }
.rv em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--blue-ink); }
.hist { display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; }
.hist > div { min-height: 64px; padding: 12px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.hist > div:first-child { border-top: 0; }

/* Progreso */
.chart { width: 100%; height: auto; display: block; }
.prlist > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #1A1A1D; font-size: 15px; }
.prlist > div:first-child { border-top: 0; }

.empty { padding: 22px; border-radius: 18px; border: 1px dashed var(--line2); color: var(--muted); font-size: 15px; line-height: 1.5; text-align: center; }
.toast { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -160%); transition: transform .25s ease; padding: 12px 18px; border-radius: 14px; background: var(--mint-bg); color: var(--mint); border: 1px solid var(--mint-line); font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }
.toast.err { background: var(--red-bg); color: var(--red); border-color: #4A1E22; }
.toast.show { transform: translate(-50%, 0); }
.loading { padding: 80px 20px; text-align: center; color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- panel del entrenador (ordenador) ---------- */
.panel { display: flex; min-height: 100dvh; }
.side { flex: 0 0 240px; background: var(--card2); padding: 26px 16px; display: flex; flex-direction: column; gap: 24px; }
.side .brand { font-family: var(--display); font-weight: 800; font-size: 22px; padding: 0 10px; }
.side .brand span { color: var(--blue-ink); }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--muted); text-align: left; font-size: 15px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.side nav button[aria-current="page"] { background: #1A1A1D; color: #fff; font-weight: 600; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.main { flex: 1; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; display: flex; flex-direction: column; gap: 20px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { min-height: 46px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--faint); font-size: 15px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { border-color: var(--blue); color: var(--ink); }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > * { flex: 1 1 420px; min-width: 0; }
.list { display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; }
.list > * { padding: 14px 16px; border-top: 1px solid var(--line); background: var(--card); }
.list > *:first-child { border-top: 0; }
button.li { width: 100%; border: 0; text-align: left; color: var(--ink); display: flex; align-items: center; gap: 14px; cursor: pointer; }
.av { width: 40px; height: 40px; border-radius: 50%; background: #1A1A1D; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #1A1A1D; color: var(--ink2); }
.tag.blue { background: var(--blue-bg); color: #8DB8FF; } .tag.mint { background: var(--mint-bg); color: var(--mint); } .tag.amber { background: var(--amber-bg); color: var(--amber); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.exrow { display: grid; grid-template-columns: 2fr 70px 90px 110px 1.4fr 40px; gap: 8px; align-items: center; }
.exrow .in { min-height: 40px; font-size: 14px; padding: 0 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #1A1A1D; font-size: 14px; }
.kv span:first-child { color: var(--faint); flex: none; }
.kv span:last-child { text-align: right; font-weight: 600; }
@media (max-width: 760px) { .panel { flex-direction: column; } .side { flex: none; } .exrow { grid-template-columns: 1fr 1fr; } }

/* ---------- App del cliente · estilo C1b (docs/ENCARGO-CLAUDE-CODE.md, parte 1) ---------- */
/* Solo en la app del cliente (index.html lleva <body class="c1">); el panel tiene su propio estilo. */
body.c1 { background: #05060C; }
body.c1 .c1-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
body.c1 .c1-glow::before { content: ''; position: absolute; width: 560px; height: 380px; left: 50%; margin-left: -280px; top: -210px; border-radius: 50%; background: radial-gradient(#1F5FE0, transparent 70%); opacity: .85; }
body.c1 .c1-glow::after { content: ''; position: absolute; width: 320px; height: 320px; right: -160px; top: 360px; border-radius: 50%; background: radial-gradient(#3EF0B4, transparent 70%); opacity: .14; }
body.c1 #app { position: relative; z-index: 1; }
body.c1 .b { font-family: 'Bricolage Grotesque', sans-serif; }
body.c1 .n { font-variant-numeric: tabular-nums; }
body.c1 button { -webkit-tap-highlight-color: transparent; }
/* Animaciones suaves (se quitan si el móvil pide reducir movimiento) */
.c1-in { animation: c1in .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes c1in { from { opacity: 0; transform: translateY(14px); } }
.c1-tap { transition: transform .15s; } .c1-tap:active { transform: scale(.97); }
.c1-pop { animation: c1pop .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes c1pop { from { transform: scale(.5); } }
.c1-toast { animation: c1toast 2.4s ease both; }
@keyframes c1toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .c1-in, .c1-pop, .c1-toast { animation: none; } .c1-tap:active { transform: none; } }
/* Barra inferior fija: Hoy · Entreno · Nutrición · Hábitos · Progreso */
.c1-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; padding: 0 8px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(5,6,12,0.78); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid rgba(255,255,255,0.06); }
.c1-tabs[hidden] { display: none; }
.c1-tabs nav { display: flex; width: 100%; max-width: 520px; }
.c1-tabs a { flex: 1; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: rgba(255,255,255,0.45); font: 500 10.5px Inter, system-ui, sans-serif; text-decoration: none; transition: color .25s; }
.c1-tabs a svg { width: 22px; height: 22px; stroke-width: 1.8; }
.c1-tabs a i { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.c1-tabs a[aria-current="page"] { color: #fff; font-weight: 700; }
.c1-tabs a[aria-current="page"] svg { stroke-width: 2.3; }
.c1-tabs a[aria-current="page"] i { background: #3EF0B4; }
@media (prefers-reduced-motion: reduce) { .c1-tabs a { transition: none; } }

/* Confeti al acabar el entreno (encargo parte 3) */
.c1-conf { animation-name: c1fall; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: forwards; }
@keyframes c1fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(110vh) rotate(540deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .c1-conf { display: none; } }
/* Durante el entreno no se ve la barra de pestañas */
body.c1-session .c1-tabs { display: none; }
.c1-vid { position: fixed; z-index: 2; border-radius: 22px; overflow: hidden; pointer-events: none; background: #000; }
.c1-vid iframe { width: 100%; height: 100%; border: 0; transform: scale(1.35); }
/* Con una hoja o diálogo abierto, la barra de abajo se oculta (si no, tapa la hoja: #app tiene su propia capa) */
body:has(#app [aria-modal="true"]) .c1-tabs { display: none; }
/* C2 · Día cerrado: brillo suave alrededor del círculo */
.c1-shine { animation: c1shine 2.4s ease-in-out infinite; }
@keyframes c1shine { 50% { box-shadow: 0 0 0 6px rgba(62,240,180,0.08), 0 0 40px rgba(62,240,180,0.35); } }
@media (prefers-reduced-motion: reduce) { .c1-shine { animation: none; } }
/* C2 · récord: brillo dorado */
.c1-shine-g { animation: c1shineg 2.4s ease-in-out infinite; }
@keyframes c1shineg { 50% { box-shadow: 0 0 0 6px rgba(245,196,107,0.10), 0 0 34px rgba(245,196,107,0.45); } }
@media (prefers-reduced-motion: reduce) { .c1-shine-g { animation: none; } }
/* C2 · jardín: balanceo suave de las plantas (se para con «reducir movimiento») */
.c1-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: c1sway 5s ease-in-out infinite alternate; }
@keyframes c1sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .c1-sway { animation: none; } }
/* C2 · revisión: sin barra de pestañas mientras se rellena (el botón «Enviar» va fijo abajo) */
body:has(#app [data-c2form]) .c1-tabs { display: none; }

/* Franja «sin conexión con el servidor» (offline.js): arriba, pequeña y tranquila */
.c1-offbar{position:fixed;top:calc(6px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);z-index:90;width:calc(100% - 24px);max-width:496px;box-sizing:border-box;padding:7px 12px;border-radius:12px;background:rgba(20,26,44,0.94);border:1px solid rgba(158,192,255,0.28);color:#D8E4FF;font:600 12px/1.4 Inter,system-ui,sans-serif;text-align:center;box-shadow:0 6px 20px rgba(0,0,0,0.35);pointer-events:none}
.c1-offbar.ok{border-color:rgba(62,240,180,0.45);color:#3EF0B4}
.c1-offbar[hidden]{display:none}
body.c1-off #app{padding-top:48px;box-sizing:border-box}
