/* =========================================================================
   Serie · home.css — pestaña Hoy. Solo tokens de base.css (sin hex).
   Prefijo .home-. Móvil: tarjetas apiladas; ≥900px: rejilla de 2 columnas.
   ========================================================================= */

.home-head { margin-bottom: 16px; }
.home-head h1 { overflow-wrap: anywhere; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 900px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

.home-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding: 6px 4px 6px 14px; }
.home-hint .btn { flex: none; }
.home-hint .icon-btn { color: var(--amber); }

.home-card { gap: 10px; }
.home-food { cursor: pointer; }
.home-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin: -6px -6px 0 0; }
.home-card-h .eyebrow { margin: 0; font-size: 11px; line-height: 1.3; }
.home-card-h .btn.ghost { gap: 2px; padding-right: 4px; }
.home-card-h .btn.ghost svg { width: 16px; height: 16px; }
.home-title { font-size: 24px; line-height: 1.2; letter-spacing: -.6px; font-weight: 650; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; overflow-wrap: anywhere; }
.home-title .pill svg { width: 14px; height: 14px; }
.home-meta { font-size: 14px; color: var(--muted); }
.home-cta { margin-top: 6px; min-height: 50px; font-size: 16px; }
.home-cta-sub { font-weight: 500; opacity: .85; }

/* Comida */
.home-kcal { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.home-big { font-size: 44px; line-height: 1; font-weight: 720; letter-spacing: -1.5px; }
.home-left { color: var(--muted); font-size: 15px; }
.home-left b { color: var(--text); font-weight: 650; }
.home-left.over b { color: var(--warn); }
.home-kbar { height: 8px; --bar: var(--accent); }
.home-kbar.over { --bar: var(--warn); }
.home-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.home-macro { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-macro-l { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.home-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bar); flex: none; }
.home-macro .num { white-space: nowrap; font-size: 16px; }
.home-macro .num small { font-size: 12px; color: var(--muted); }
.home-macro .progress { height: 5px; }

/* Entreno */
.home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface2); min-width: 0; }
.home-tile span { font-size: 12px; }
.home-tile b { font-size: 18px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-prs { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.home-prs li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.home-prs li:first-child { border-top: 0; }

/* Semana */
.home-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.home-day { display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 92px; padding: 8px 0 8px; border-radius: var(--radius-sm); color: var(--text); }
.home-day:hover { background: var(--surface2); }
.home-day.today { background: var(--accent-soft); }
.home-day-l { font-size: 12px; font-weight: 650; letter-spacing: .06em; color: var(--muted); }
.home-day.today .home-day-l { color: var(--text); }
.home-day-bar { position: relative; width: 10px; height: 44px; border-radius: 5px; background: var(--surface2); overflow: hidden; }
.home-day.today .home-day-bar { background: var(--surface); }
.home-day-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 5px; }
.home-day-bar.over i { background: var(--warn); }
.home-day.future .home-day-bar { opacity: .5; }
.home-day-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.home-day-dot.on { background: var(--accent); border-color: var(--accent); }
.home-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.home-legend span { display: inline-flex; align-items: center; gap: 6px; }
.home-legend-bar { display: inline-block; width: 6px; height: 12px; border-radius: 3px; background: var(--accent); }
.home-legend .home-day-dot { display: inline-block; }
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.home-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-stat b { font-size: 22px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.home-stat span { font-size: 12px; line-height: 1.35; }

/* Peso */
.home-weight-row { display: flex; align-items: center; gap: 14px; }
.home-weight-row > div { flex: 1; min-width: 0; }
.home-weight-row p { margin-top: 6px; }
.home-spark { width: 44%; max-width: 220px; height: auto; flex: none; overflow: visible; }
.home-spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.home-spark-dot { fill: var(--accent); }

@media (max-width: 760px) {
  .home-big { font-size: 40px; }
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-title { font-size: 22px; }
}
@media (max-width: 380px) {
  .home-macros { gap: 8px; }
  .home-macro .num { font-size: 15px; }
  .home-stat b { font-size: 19px; }
}
