/* ============================================================
   RADIANT — App del atleta · claro, elegante, funcional
   Patrón UX familiar (tipo Lenus): fondo claro, cards blancas,
   tinta verde-bosque, un solo acento cálido de marca.
   ============================================================ */

:root {
  --bg: #f2f3ef;
  --card: #ffffff;
  --ink: #182720;
  --ink-2: #5f6b64;
  --ink-3: #9aa39c;
  --line: #e8eae4;
  --forest: #1e3229;
  --forest-2: #2a4437;
  --ember: #e8650f;
  --ember-soft: #fdeee1;
  --p: #ef9f4d;
  --c: #93bf9e;
  --g: #f0d489;
  --f: #e88c7d;
  --v: #a9c98a;
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --nav-h: 64px;
  --shadow: 0 1px 2px rgba(23, 32, 26, 0.04), 0 6px 20px rgba(23, 32, 26, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  background: #e4e6e0;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Escenario: móvil real vs marco en desktop ---------- */
.phone-stage { min-height: 100dvh; display: flex; justify-content: center; }
.app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.screens { flex: 1; }
@media (min-width: 560px) {
  body { padding: 28px 0; }
  .phone-stage { align-items: flex-start; }
  .app {
    width: 402px;
    min-height: 874px;
    max-height: 874px;
    overflow-y: auto;
    border-radius: 44px;
    border: 1px solid rgba(23, 32, 26, 0.08);
    box-shadow:
      0 0 0 10px #ffffff,
      0 0 0 11px rgba(23, 32, 26, 0.1),
      0 30px 70px rgba(23, 32, 26, 0.18);
    scrollbar-width: none;
  }
  .app::-webkit-scrollbar { display: none; }
}

/* restos de la versión anterior, neutralizados */
.ember-glow, .grain { display: none; }

/* ---------- Header ---------- */
.app-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 6px;
}
.wordmark {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-head);
  font-weight: 700; font-size: 14px; letter-spacing: 0.3em;
  color: var(--ink);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 700; font-size: 13px; color: #fff;
  background: var(--forest);
  border: none;
  cursor: pointer;
}
.avatar--big { width: 62px; height: 62px; font-size: 20px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-chat {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: none; box-shadow: var(--shadow);
  color: var(--ink); cursor: pointer;
}
.chat-dot {
  position: absolute; top: 4px; right: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ember); border: 2px solid var(--card);
}

/* ---------- Card nota del coach ---------- */
.card--note { display: flex; align-items: center; gap: 12px; padding: 15px 16px; }
.note-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff;
  background: var(--forest);
}
.note-body { flex: 1; min-width: 0; }
.note-name { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.note-text { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.note-chev { color: var(--ink-3); flex: 0 0 auto; }

/* ---------- Chat ---------- */
.screen--chat { display: none; flex-direction: column; min-height: calc(100dvh - 80px); padding-bottom: 16px; }
.screen--chat.is-active { display: flex; }
@media (min-width: 560px) { .screen--chat { min-height: 790px; } }
.chat-title { font-size: 18px; font-weight: 700; }
.chat-status { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.chat-status .pulse-dot { background: #4caf6d; }
.chat-thread { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 8px 0 16px; overflow-y: auto; }
.chat-day { text-align: center; font-size: 11.5px; color: var(--ink-3); margin: 8px 0 2px; }
.bubble {
  max-width: 78%;
  padding: 11px 14px; border-radius: 18px;
  font-size: 14px; line-height: 1.5;
  animation: rise 0.25s ease both;
}
.bubble--coach { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble--me { align-self: flex-end; background: var(--forest); color: #fff; border-bottom-right-radius: 6px; }
.bubble time { display: block; font-size: 10.5px; margin-top: 4px; opacity: 0.55; }
.chat-input-row {
  display: flex; gap: 8px; align-items: center;
  padding-top: 8px;
}
.chat-input-row input {
  flex: 1;
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  background: var(--card); border: none; box-shadow: var(--shadow);
  border-radius: 999px; padding: 13px 18px; outline: none;
}
.chat-send {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--forest); color: #fff; border: none; cursor: pointer;
  transition: transform 0.15s;
}
.chat-send:active { transform: scale(0.92); }

/* ---------- Pantallas ---------- */
.screens { position: relative; z-index: 1; }
.screen {
  display: none;
  padding: 10px 20px calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px);
  animation: screenIn 0.28s ease both;
}
.screen.is-active { display: block; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.reveal { animation: rise 0.5s ease both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.screen-title {
  font-family: var(--font-body); font-size: 27px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 2px;
}
.screen-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }
.section-h {
  font-family: var(--font-body); font-size: 19px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--ink);
  margin: 24px 0 12px;
}

/* ---------- Saludo + semana ---------- */
.greeting { margin: 8px 0 14px; }
.greeting-date { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.greeting-title { font-family: var(--font-body); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.greeting-sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; max-width: 34ch; }

.week-strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  margin: 0 0 18px;
}
.wday {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 9px 0 10px; border-radius: 14px;
  color: var(--ink-2); background: transparent;
}
.wday span { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.wday strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.wday.is-today { background: var(--forest); }
.wday.is-today span, .wday.is-today strong { color: #fff; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--card);
  border: none;
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card[role="button"] { cursor: pointer; transition: transform 0.15s ease; }
.card[role="button"]:active { transform: scale(0.985); }

.card-eyebrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.eyebrow-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.card-link { font-size: 13.5px; font-weight: 700; color: var(--ink); }

.tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px;
}
.tag-ember { color: #fff; background: rgba(255, 255, 255, 0.16); }
.tag-up { color: var(--forest); background: #e7efe6; }

/* Card héroe (entreno de hoy) — foto + velo oscuro, como la referencia */
.card--hero {
  background: var(--forest);
  color: #fff;
  padding: 20px 18px 18px;
}
.hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 31, 25, 0.55), rgba(20, 31, 25, 0.82) 75%);
}
.card--hero > *:not(.hero-media):not(.hero-scrim) { position: relative; }
.card--hero .eyebrow-label { color: rgba(255, 255, 255, 0.75); }
.card-hero-glow { display: none; }

.hero-lift-name { font-family: var(--font-body); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.hero-lift-type { color: rgba(255, 255, 255, 0.78); font-size: 13.5px; font-weight: 500; margin-top: 4px; }
.hero-kg {
  font-family: var(--font-body); font-weight: 700;
  font-size: 30px; line-height: 1.1; letter-spacing: -0.01em;
  margin: 4px 0 2px; color: #fff;
}
.hero-kg-unit { font-size: 16px; margin-left: 6px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.hero-explain { font-size: 12px; color: rgba(255, 255, 255, 0.6); margin-top: 2px; }
.hero-meta { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.75); font-size: 12.5px; margin: 12px 0 16px; }
.hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }

/* Botón principal: pill — oscuro sobre claro, blanco sobre oscuro */
.btn-ember {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15.5px;
  color: #fff;
  background: var(--forest);
  border: none; border-radius: 999px;
  padding: 15px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s;
}
.btn-ember:active { transform: scale(0.97); }
.btn-ember:disabled { background: #c9cec9; cursor: default; }
.card--hero .btn-ember { background: #fff; color: var(--ink); }

/* ---------- Nutrición (card Hoy) ---------- */
.nutri-row { display: flex; align-items: center; gap: 16px; }
.ring-wrap { position: relative; flex: 0 0 auto; }
.ring-track { fill: none; stroke: #edeee9; stroke-width: 7; }
.ring-fill {
  fill: none; stroke: var(--ember); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 226; stroke-dashoffset: 226;
  transform: rotate(-90deg); transform-origin: center;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1;
}
.ring-center strong { font-size: 22px; font-weight: 700; color: var(--ink); }
.ring-center span { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.nutri-kcal strong { font-size: 22px; font-weight: 700; }
.nutri-kcal { font-size: 13px; color: var(--ink-2); }
.nutri-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.portion-legend { display: flex; flex-wrap: wrap; gap: 5px; }
.portion-legend .pl {
  font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 7px;
  background: var(--bg); color: var(--ink-2);
}
.portion-legend .pl b { color: var(--ink); }
.nutri-next {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 7px;
}
.nutri-next strong { color: var(--ink); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); }

/* ---------- Duo mini cards ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.mini-up {
  font-size: 11px; font-weight: 700; color: #944200;
  background: var(--ember-soft);
  padding: 2px 7px; border-radius: 6px; margin-left: 5px;
}
.card--mini { margin-bottom: 0; padding: 15px; }
.mini-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  margin-bottom: 12px; color: var(--forest);
  background: #e7efe6;
}
.mini-icon--pending { color: #b0691c; background: #faeeda; }
.mini-icon--done { color: var(--forest); background: #e7efe6; }
.mini-title { font-weight: 700; font-size: 14.5px; }
.mini-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.mini-num { font-size: 15px; font-weight: 700; color: var(--ink); }
.mini-spark { margin-bottom: 10px; }

.coach-note {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 18px; padding: 0 4px;
  font-size: 13px; line-height: 1.55; color: var(--ink-2);
}
.coach-note svg { flex: 0 0 auto; margin-top: 3px; color: var(--ink-3); }
.coach-note strong { color: var(--ink); }

/* ---------- Entreno: semanas y días ---------- */
.week-pills, .lift-pills { display: flex; gap: 8px; margin-bottom: 16px; }
.pill {
  flex: 1; text-align: center;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  color: var(--ink-2);
  padding: 10px 4px; border-radius: 999px;
  background: #e9ebe5; border: none;
  cursor: pointer; transition: all 0.2s;
}
.pill.is-active { color: #fff; background: var(--forest); }
.pill small { display: block; font-weight: 500; font-size: 10px; opacity: 0.8; margin-top: 1px; }

.day-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: none; border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 10px;
  cursor: pointer; transition: transform 0.15s;
}
.day-card:active { transform: scale(0.985); }
.day-card.is-done { opacity: 0.6; }
.day-num {
  font-size: 17px; font-weight: 700; color: var(--forest);
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: #e7efe6;
  flex: 0 0 auto;
}
.day-thumb {
  width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: 0 0 auto;
}
.day-info { flex: 1; min-width: 0; }
.day-name { font-weight: 700; font-size: 15.5px; }
.day-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-meta--dim { color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.day-status { flex: 0 0 auto; color: var(--ink-3); }
.day-status .done-badge { color: var(--forest); display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }

.block-note {
  margin-top: 18px; padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 13px; line-height: 1.6; color: var(--ink-2);
  background: #e9ebe5;
}
.block-note strong { color: var(--ink); }

/* ---------- Sesión ---------- */
.screen--session { padding-top: 6px; }
.session-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.btn-back {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: none; box-shadow: var(--shadow); color: var(--ink);
  cursor: pointer; flex: 0 0 auto;
}
.session-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.session-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.session-progress-num { margin-left: auto; font-size: 20px; font-weight: 700; }
.session-progress-num .of { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.session-bar { height: 5px; border-radius: 5px; background: #e2e4de; margin-bottom: 18px; overflow: hidden; }
.session-bar-fill {
  height: 100%; width: 0%;
  background: var(--ember);
  border-radius: 5px; transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.exercise-card {
  background: var(--card);
  border: none; border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
}
.ex-media {
  position: relative;
  display: block; width: calc(100% + 32px);
  margin: -16px -16px 14px;
  height: 178px;
  overflow: hidden;
  border: none; padding: 0; cursor: pointer;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--forest);
}
.ex-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 31, 25, 0.55));
}
.ex-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; z-index: 1;
  display: grid; place-items: center; padding-left: 3px;
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  box-shadow: 0 4px 16px rgba(20, 31, 25, 0.3);
}
.ex-media-label {
  position: absolute; left: 14px; bottom: 10px; z-index: 1;
  font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.92);
}
.exercise-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.exercise-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; line-height: 1.2; flex: 1; }

.ex-stats {
  display: grid; grid-template-columns: 1fr 1.5fr 1fr 1.1fr;
  background: var(--bg); border-radius: 12px;
  padding: 10px 2px; margin-bottom: 12px;
}
.ex-stats div { text-align: center; border-left: 1px solid var(--line); min-width: 0; }
.ex-stats div:first-child { border-left: none; }
.ex-stats strong { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; letter-spacing: -0.01em; }
.ex-stats span { font-size: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.exercise-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.xtag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 9px; border-radius: 7px;
  background: var(--bg); color: var(--ink-2);
}
.xtag--main { color: #944200; background: var(--ember-soft); }
.exercise-target {
  font-size: 13px; color: var(--ink-2); margin-bottom: 12px;
  padding: 9px 12px; border-radius: var(--r-sm); background: var(--bg);
  line-height: 1.5;
}
.exercise-target b { color: var(--ink); font-weight: 700; }
.exercise-target .kg-range { font-weight: 700; color: var(--ink); }

.set-grid { display: flex; flex-direction: column; gap: 7px; }
.set-head, .set-row { display: grid; grid-template-columns: 40px 1fr 1fr 1fr 42px; gap: 7px; align-items: center; }
.set-head span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.set-head span:first-child { text-align: left; padding-left: 4px; }
.set-num { font-size: 13px; font-weight: 700; color: var(--ink-3); padding-left: 4px; }
.set-row input {
  width: 100%; text-align: center;
  font-family: var(--font-body); font-weight: 700; font-size: 14.5px; color: var(--ink);
  background: var(--bg); border: 1px solid transparent; border-radius: 10px;
  padding: 10px 4px; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.set-row input:focus { border-color: var(--forest); background: #fff; }
.set-row input::placeholder { color: var(--ink-3); font-weight: 500; }
.set-check {
  width: 42px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1.5px solid #d6d9d2; color: transparent;
  cursor: pointer; transition: all 0.2s;
}
.set-row.is-done .set-check {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  animation: pop 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.set-row.is-done input { color: var(--forest); background: #eef2ec; }
@keyframes pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }

.btn-finish { margin-top: 6px; }

/* ---------- Rest toast ---------- */
.rest-toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px);
  transform: translate(-50%, 30px);
  display: flex; align-items: center; gap: 9px;
  background: var(--forest);
  border: none; border-radius: 999px;
  padding: 11px 18px;
  font-size: 13px; color: rgba(255, 255, 255, 0.8);
  opacity: 0; pointer-events: none; z-index: 40;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 14px 40px rgba(23, 32, 26, 0.35);
}
.rest-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.rest-toast svg { color: #fff; }
.rest-toast strong { font-size: 16px; font-weight: 700; color: #fff; min-width: 44px; }
.rest-toast button {
  background: none; border: none; color: #fff; font-weight: 700; font-size: 13px;
  font-family: var(--font-body); cursor: pointer; padding: 4px 2px 4px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
@media (min-width: 560px) { .rest-toast { position: absolute; } }

/* ---------- Nutrición pantalla ---------- */
.card--plan { padding: 0; }
.card--plan img { width: 100%; height: 118px; object-fit: cover; display: block; }
.plan-body { padding: 13px 16px 15px; }
.plan-title { font-weight: 700; font-size: 15.5px; }
.plan-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

.macro-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 13px 0; margin-bottom: 16px;
}
.macro-cell { text-align: center; border-left: 1px solid var(--line); padding: 0 6px; }
.macro-cell:first-child { border-left: none; }
.macro-cell strong { display: block; font-size: 15.5px; font-weight: 700; }
.macro-cell span { font-size: 9.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }

.meal-card {
  background: var(--card);
  border: none; border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
}
.meal-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.meal-name { font-weight: 700; font-size: 15.5px; }
.meal-time { font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.slot-list { display: flex; flex-direction: column; }
.slot-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 11px 2px;
  cursor: pointer; transition: background 0.15s;
}
.slot-row:last-child { border-bottom: none; padding-bottom: 4px; }
.slot-row:active { background: var(--bg); }
.slot-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #2c2c22;
}
.slot-dot.p { background: var(--p); } .slot-dot.c { background: var(--c); }
.slot-dot.g { background: var(--g); } .slot-dot.f { background: var(--f); }
.slot-dot.v { background: var(--v); }
.slot-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.slot-row:not(.is-filled) .slot-text { color: var(--ink-3); font-weight: 400; }
.slot-amount { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.slot-chev { flex: 0 0 auto; color: #c6cac2; }

/* ---------- Sheets (modales) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(23, 32, 26, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop.is-on { opacity: 1; pointer-events: auto; }
@media (min-width: 560px) { .sheet-backdrop { position: absolute; border-radius: 44px; } }
.sheet {
  width: 100%; max-height: 78%;
  background: var(--card);
  border: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
  transform: translateY(40px); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.sheet-backdrop.is-on .sheet { transform: none; }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: #dcded8; margin: 6px auto 16px; flex: 0 0 auto; }
.sheet-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-title strong { color: var(--ember); }
.sheet-sub { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 14px; }

/* ---------- Agua ---------- */
.water-count { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.water-count strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.water-glasses { display: flex; flex-wrap: wrap; gap: 6px; }
.glass {
  background: none; border: none; padding: 4px 2px; cursor: pointer;
  color: #c5d2d8; transition: color 0.2s, transform 0.15s;
}
.glass:active { transform: scale(0.9); }
.glass.is-full { color: #7fb0c4; }

/* ---------- Vídeo de técnica ---------- */
.sheet--video { max-height: none; }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: #0c1410;
  margin-bottom: 6px;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.food-list { overflow-y: auto; }
.food-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background 0.15s;
}
.food-item:active { background: var(--bg); }
.food-name { font-size: 14.5px; font-weight: 600; }
.food-amount { font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

/* ---------- Wellness ---------- */
.srss-list { margin-bottom: 18px; }
.srss-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.srss-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.srss-label { font-size: 14px; font-weight: 600; }
.srss-kind { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.srss-val { font-size: 16px; font-weight: 700; color: var(--forest); min-width: 20px; text-align: right; }
.srss-item input[type="range"] {
  width: 100%; appearance: none; -webkit-appearance: none; height: 5px; border-radius: 5px;
  background: linear-gradient(90deg, var(--forest) var(--fill, 66%), #e2e4de var(--fill, 66%));
  outline: none;
}
.srss-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--forest);
  box-shadow: 0 2px 8px rgba(23, 32, 26, 0.2);
  cursor: pointer;
}

/* ---------- Progreso ---------- */
.card--chart { padding: 18px 14px 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 4px 8px; }
.chart-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.chart-big { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.chart-unit { font-size: 15px; color: var(--ink-3); margin-left: 5px; font-weight: 600; }
.chart { width: 100%; height: 130px; display: block; }
.chart-x { display: flex; justify-content: space-between; padding: 6px 6px 0; font-size: 10.5px; color: var(--ink-3); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card--stat { margin-bottom: 0; padding: 15px 12px; text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.stat-dim { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 5px; }

.pr-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border: none; border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 14px 15px; margin-bottom: 9px;
}
.pr-medal {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: #b0691c; background: #faeeda;
  flex: 0 0 auto;
}
.pr-info { flex: 1; }
.pr-lift { font-weight: 700; font-size: 14.5px; }
.pr-detail { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.pr-value { font-size: 17px; font-weight: 700; }
.pr-new {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  color: #fff; background: var(--ember);
  padding: 3px 7px; border-radius: 6px; margin-left: 8px; vertical-align: 2px;
}

/* ---------- Perfil ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 20px; }
.profile-goal { font-size: 16.5px; font-weight: 700; }
.profile-goal-date { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.card--rows { padding: 4px 16px; margin-top: 14px; }
.row-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 0; font-size: 14.5px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: none; }
.row-value { color: var(--ink-3); font-weight: 500; }
.switch {
  width: 44px; height: 26px; border-radius: 999px; position: relative;
  background: #d6d9d2; transition: background 0.2s; cursor: pointer;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(23, 32, 26, 0.25);
}
.switch.is-on { background: var(--forest); }
.switch.is-on::after { left: 21px; }
.demo-note { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-top: 22px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
@media (min-width: 560px) {
  /* En el marco de escritorio el scroll vive en .screens y la nav queda
     anclada al borde inferior del marco, idéntica en todas las pantallas */
  .app { overflow: hidden; }
  .screens { overflow-y: auto; scrollbar-width: none; }
  .screens::-webkit-scrollbar { display: none; }
  .bottom-nav { position: relative; flex: 0 0 auto; border-radius: 0 0 43px 43px; }
  .screen { padding-bottom: 28px; }
  .screen--chat { min-height: 100%; padding-bottom: 16px; }
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; color: var(--ink-3); cursor: pointer;
  font-family: var(--font-body); font-size: 10.5px; font-weight: 700;
  transition: color 0.2s; position: relative;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.is-active { color: var(--ink); }

/* ---------- Resumen sesión ---------- */
.summary-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: var(--forest);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.summary-overlay.is-on { opacity: 1; pointer-events: auto; }
@media (min-width: 560px) { .summary-overlay { position: absolute; border-radius: 44px; } }
.summary-glow {
  position: absolute; top: -25%; left: 50%; transform: translateX(-50%);
  width: 130%; aspect-ratio: 1.4;
  background: radial-gradient(closest-side, rgba(233, 121, 46, 0.28), transparent 70%);
}
.summary-body { position: relative; text-align: center; padding: 32px; width: 100%; color: #fff; }
.summary-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65); margin-bottom: 8px;
  animation: rise 0.5s 0.1s both;
}
.summary-title { font-size: 26px; font-weight: 700; animation: rise 0.5s 0.18s both; }
.summary-hero { margin: 26px 0; animation: rise 0.5s 0.26s both; }
.summary-kg { font-size: 78px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: #fff; }
.summary-kg-label { color: rgba(255, 255, 255, 0.7); font-size: 14px; margin-top: 8px; }
.summary-stats {
  display: flex; justify-content: center; gap: 30px; margin-bottom: 26px;
  animation: rise 0.5s 0.34s both;
}
.summary-stats div { display: flex; flex-direction: column; }
.summary-stats strong { font-size: 21px; font-weight: 700; }
.summary-stats span { font-size: 11px; color: rgba(255, 255, 255, 0.6); margin-top: 3px; letter-spacing: 0.04em; text-transform: uppercase; }
.summary-pr {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: #3a2000;
  background: #f5a04c;
  border-radius: 999px; padding: 10px 17px; margin-bottom: 30px;
  animation: rise 0.5s 0.42s both;
}
.summary-body .btn-ember { max-width: 280px; margin: 0 auto; background: #fff; color: var(--ink); animation: rise 0.5s 0.5s both; }
