/* Celular (≤ 760 px): barra inferior, toques cómodos, textos y gráficos a su tamaño. En escritorio no cambia nada. */
#tabbar, #more-sheet { display: none; }

@media (max-width: 760px) {
  :root { --tabbar-h: 60px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }

  /* encabezado compacto: logo y nada más (la navegación está abajo) */
  .top { padding-top: var(--safe-t); }
  .top-in { padding: 0 14px; }
  #nav { display: none; }
  .logout { min-width: 44px; min-height: 44px; justify-content: center; padding: 8px; }
  .logout span { display: none; }
  .logo { padding: 10px 0; }
  .logo span { display: inline; font-size: 21px; }
  main { padding: 14px 12px calc(var(--tabbar-h) + var(--safe-b) + 28px); }
  #banner { padding: 0 12px; }

  /* títulos y paneles */
  h2 { font-size: 24px; margin-bottom: 10px; }
  h2 small { display: block; margin: 4px 0 0; }
  .panel, .panel.flat { padding: 14px; }
  .ev-head h2 small { display: block; }

  /* Hoy */
  .verdict { padding: 20px 16px; gap: 14px; }
  .verdict h1 { font-size: clamp(40px, 14.5vw, 66px); }
  .verdict p { font-size: 15px; }
  .gauge { width: 118px; margin: 0 auto; }
  .gauge svg { width: 118px; height: 70px; }
  .gauge .big { font-size: 42px; margin-top: -28px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 34px; }
  .stat b small { font-size: 15px; }
  .kpis .stat b { font-size: 30px; }
  .race-banner { padding: 12px; }

  /* gráficos y tablas */
  .chart { height: 200px; }
  .chart.tall { height: 240px; }
  table { font-size: 13px; }
  th, td { padding: 8px 6px; }

  /* detalle de entreno a pantalla completa */
  .scrim { justify-content: stretch; }
  .drawer { width: 100%; padding: calc(12px + var(--safe-t)) 12px calc(24px + var(--safe-b)); border-left: 0; }
  .drawer h2 { font-size: 28px; }
  .drawer .x { width: 44px; height: 44px; }
  .stats { grid-template-columns: repeat(2, 1fr); }

  /* toques ≥ 44 px y campos de 16 px (iOS no hace zoom al escribir) */
  .pill { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; }
  input, select, textarea { font-size: 16px !important; min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-height: 0; width: 20px; height: 20px; }
  .filters { gap: 6px; }
  .ev-fields { grid-template-columns: 1fr !important; }
  .sw { width: 30px; height: 30px; }
  .reg-row { justify-content: flex-start; }

  /* semana: tarjetas por día con desplazamiento lateral */
  .week { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .week > * { scroll-snap-align: start; }

  /* zapatillas */
  .shoes { grid-template-columns: 1fr; }
  .shoe-stats { grid-template-columns: repeat(2, 1fr); }

  /* entrar / registrarse */
  .auth { align-items: start; padding: calc(24px + var(--safe-t)) 14px 24px; }
  .auth-card { padding: 22px 18px; }

  /* barra inferior */
  #tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(9,11,12,.96);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
  #tabbar button { flex: 1; min-width: 0; height: var(--tabbar-h); background: none; border: 0; border-top: 3px solid transparent; color: var(--mute);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font: 700 11px var(--display); letter-spacing: .1em; text-transform: uppercase; }
  #tabbar .ti { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #tabbar button[aria-selected="true"] { color: var(--volt); border-top-color: var(--volt); }
  #more-sheet { display: grid; position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 41;
    grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); box-shadow: 0 -12px 40px rgba(0,0,0,.6); }
  #more-sheet[hidden] { display: none; }
  #more-sheet button { background: var(--panel); border: 0; color: var(--text); padding: 16px 14px; min-height: 52px; text-align: left;
    font: 700 16px var(--display); letter-spacing: .1em; text-transform: uppercase; }
  #more-sheet button[aria-current="true"] { color: var(--volt); }
}
