/* Sistema visual de DESIGN.md, llevado a la web. */
@font-face {
  font-family: Inter;
  src: url('../fonts/inter.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0a0c0e;
  --glow: #2a3312;
  --surface: #111417;
  --raised: #1b1f23;
  --line: #272c31;
  --edge: #5b636b;
  --arrive: cubic-bezier(0.16, 1, 0.3, 1);
  --text: #f5f6f7;
  --muted: #979ea5;
  --lime: #c4f135;
  --lime-soft: #272f16;
  --good: #34d27b;
  --warn: #f5a524;
  --bad: #f0645c;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

html {
  background: var(--ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--ink);
  color: var(--text);
  font: 400 14px/20px Inter, -apple-system, system-ui, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
}

body.locked { overflow: hidden; }

button, a, label.chip, .tap {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: inherit; cursor: pointer; }
input, select { font: 400 16px/22px Inter, -apple-system, system-ui, sans-serif; color: var(--text); }
img { display: block; }

/* Tipografía */
.h-m { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.3px; }
.h-s { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.2px; }
.t-l { font-size: 19px; line-height: 25px; font-weight: 600; }
.t-m { font-size: 16px; line-height: 22px; font-weight: 600; }
.t-s { font-size: 14px; line-height: 20px; font-weight: 500; }
.b-l { font-size: 16px; line-height: 24px; }
.b-m { font-size: 14px; line-height: 20px; }
.b-s { font-size: 12px; line-height: 17px; }
.l-l { font-size: 14px; line-height: 18px; font-weight: 600; }
.l-m { font-size: 12px; line-height: 16px; font-weight: 500; }
.l-s { font-size: 11px; line-height: 14px; font-weight: 500; }
.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.lime { color: var(--lime); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.nowrap { white-space: nowrap; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Fondo */
#glow {
  position: fixed;
  inset: 0 0 auto;
  height: calc(220px + var(--sat));
  background: linear-gradient(var(--glow), var(--ink));
  transition: opacity 150ms ease-out;
  pointer-events: none;
}
#statusbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--sat);
  background: var(--ink);
  opacity: 0;
  z-index: 20;
  pointer-events: none;
}
body.scrolled #glow { opacity: 0; }
body.scrolled #statusbar { opacity: 1; }

#app { position: relative; padding-top: var(--sat); }
.page { padding-bottom: calc(96px + var(--sab)); }
.gutter { padding-left: 16px; padding-right: 16px; }

/* Filas fijas: transparentes en reposo para no recortar el resplandor. */
.sticky { position: sticky; top: var(--sat); z-index: 10; padding: 6px 0 10px; }
body.scrolled .sticky { background: var(--ink); }

/* Tarjetas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.card-m { margin: 0 16px 12px; }
.divider { height: 1px; background: var(--line); margin: 0 16px; }

/* Píldoras y filtros */
.row-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll.flush { padding: 0; }
.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  min-width: 48px;
  padding: 8px 14px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 100ms ease-out;
}
.pill svg { color: var(--muted); }
.pill[aria-pressed='true'], .pill[aria-checked='true'] { background: var(--lime-soft); border-color: var(--lime); color: var(--lime); }
.pill[aria-pressed='true'] svg, .pill[aria-checked='true'] svg { color: var(--lime); }
/* Elegida sin lima: la opción que no filtra nada no debe llamar la atención como una que sí. */
.pill.quiet[aria-checked='true'] { background: var(--raised); border-color: var(--edge); color: var(--text); }
.league-logo { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.league-logo img { width: 74%; height: 74%; object-fit: contain; }

label.chip {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 9px 0 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
}
label.chip svg { color: var(--muted); }
label.chip.on { border-color: var(--lime); color: var(--lime); }
/* El selector nativo queda encima y transparente: en iPhone abre su propio menú. */
label.chip select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; appearance: none; border: 0; }

/* Campos de filtro: rótulo arriba y lo elegido debajo */
.filter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 0 16px; }
.field-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px 8px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  transition: transform 100ms ease-out;
}
.field-pick > span { flex: 1; min-width: 0; }
.field-pick small { display: block; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--muted); }
.field-pick b { display: block; font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-pick.on b { color: var(--lime); }
.field-pick svg { flex: none; color: var(--muted); }
.field-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; appearance: none; border: 0; }
.field-pick:active { transform: scale(0.97); }

/* Tamaño del parley */
.size-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px 0; }
.size-row > span { flex: none; }
.size-track { flex: 1; min-width: 0; display: flex; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.size-cell { flex: 1; min-width: 0; min-height: 48px; padding: 3px; color: var(--muted); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.size-cell span { display: grid; place-items: center; height: 100%; min-height: 42px; border-radius: 11px; border: 1px solid transparent; transition: background 160ms ease-out, border-color 160ms ease-out, transform 100ms ease-out; }
.size-cell[aria-checked='true'] { color: var(--text); font-weight: 700; }
.size-cell[aria-checked='true'] span { background: var(--raised); border-color: var(--edge); }
.size-cell:disabled { color: rgb(151 158 165 / 0.35); }
.size-cell:not(:disabled):active span { transform: scale(0.94); }

/* Hoja de filtros */
.sheet.filters-sheet { padding-bottom: 0; }
.filter-title { padding: 14px 0 8px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filters-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 14px 0 calc(14px + var(--sab)); background: var(--surface); }

/* Botones */
.btn-primary, .btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 10px 20px;
  border-radius: 26px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  text-align: center;
  transition: transform 100ms ease-out;
}
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:disabled { background: var(--raised); color: var(--muted); }
.btn-primary.done:disabled { background: var(--lime-soft); color: var(--lime); gap: 8px; }
.btn-outline { border: 1px solid var(--edge); color: var(--text); }
.btn-outline:disabled { border-color: var(--line); color: var(--muted); }
.btn-text:active { opacity: 0.7; }
.btn-text { min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--lime); }
.btn-text.quiet { color: var(--muted); }
.panel { background: var(--raised); border-radius: 16px; padding: 14px; }
.gutter-box { margin: 0 16px 10px; }
.chart .val.over-line { left: 50%; right: auto; transform: translateX(-50%); padding: 0 2px; background: var(--ink); border-radius: 2px; }
.live-teaser { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 10px 0 16px; color: inherit; }
.live-head { display: flex; align-items: center; width: 100%; min-height: 56px; padding: 12px 10px 8px 16px; color: inherit; }
.live-head[aria-expanded="true"] .live-chev svg { transform: rotate(180deg); }
.leg-segs { display: flex; gap: 3px; height: 4px; margin: 0 16px 12px; }
.leg-segs i { flex: 1; border-radius: 2px; background: var(--line); }
.leg-segs .good { background: var(--good); }
.leg-segs .bad { background: var(--bad); }
.leg-segs .muted { background: var(--muted); }
.leg-segs .lime { background: var(--lime); }
.leg-segs .warn { background: var(--warn); }
.leg-segs .text { background: var(--text); }
.live-leg { display: flex; align-items: center; min-height: 56px; padding: 8px 16px; color: inherit; text-decoration: none; }
.live-leg .body { flex: 1; min-width: 0; margin-left: 10px; }
.leg-mark { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); }
.leg-track { display: block; height: 3px; margin-top: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.leg-track i { display: block; height: 100%; background: var(--text); }
.leg-track .lime { background: var(--lime); }
.leg-track .warn { background: var(--warn); }
.leg-track .good { background: var(--good); }
.leg-track .bad { background: var(--bad); }
.live-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text); animation: live-pulse 1.8s ease-in-out infinite alternate; }
.live-dot.lime { background: var(--lime); }
.live-dot.warn { background: var(--warn); }
@keyframes live-pulse { from { opacity: 1; } to { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.record-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.l-l { font-size: 14px; line-height: 18px; font-weight: 600; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--sab));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  z-index: 60;
  animation: fade 160ms ease-out;
}
.reveal { animation: reveal 240ms var(--arrive) backwards; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } }
.tick { animation: tick 240ms var(--arrive) backwards; }
@keyframes tick { from { opacity: 0; transform: translateY(6px); } }
.pop { animation: pop 320ms var(--arrive) backwards; }
@keyframes pop { from { opacity: 0; transform: scale(0.5); } }
.leg-track .grew { animation: grew 480ms var(--arrive) backwards; }
@keyframes grew { from { width: var(--from); } }
.winbar.wipe { animation: wipe 520ms var(--arrive) backwards; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
/* La ficha: las barras crecen desde su base y la línea se dibuja encima. Solo al abrirla. */
.sheet:not(.settled) .chart .bar { animation: bar-grow 460ms var(--arrive) backwards; animation-delay: calc(var(--i) * 14ms); }
@keyframes bar-grow { from { transform: scaleY(0); } }
.sheet:not(.settled) .chart .val { animation: fade 320ms ease-out 180ms backwards; }
.sheet:not(.settled) .chart .line { animation: line-draw 560ms var(--arrive) backwards; }
@keyframes line-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(-2px 0 -2px 0); } }
.onboard .main > div:first-child svg, .onboard .main > div:first-child img { animation: wipe 720ms var(--arrive) backwards; }
/* Entre vistas: fundido breve, y el indicador de la barra se desliza de un destino a otro. */
::view-transition-old(root) { animation: 90ms ease-out both vt-out; }
::view-transition-new(root) { animation: 180ms ease-out 30ms both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
.nav-pill { position: absolute; inset: 0; border-radius: 28px; background: var(--lime-soft); z-index: -1; view-transition-name: nav-pill; }
::view-transition-group(nav-pill) { animation-duration: 260ms; animation-timing-function: var(--arrive); }
::view-transition-image-pair(nav-pill) { mix-blend-mode: screen; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .tick, .pop, .leg-track .grew, .winbar.wipe, .sheet .chart .bar, .sheet .chart .val, .sheet .chart .line, .onboard .main > div:first-child svg, .onboard .main > div:first-child img { animation: none; }
}
.analysis-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; }
.analysis-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.analysis { display: flex; flex-direction: column; gap: 16px; }
.analysis h4 { margin-bottom: 4px; }
.outcome-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.outcome-bar .lime { background: var(--lime); }
.outcome-bar .warn { background: var(--warn); }
.outcome-bar .rest { background: var(--line); }
.leg-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 84px; align-items: center; column-gap: 4px; padding: 2px 0; }
.leg-row span:nth-child(n+2) { text-align: right; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; flex: none; color: var(--muted); }
.round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  flex: none;
  transition: transform 100ms ease-out;
}
.pill:active, .btn-primary:active, .btn-outline:active, .round:active, label.chip:active { transform: scale(0.97); }
.press { transition: background 100ms ease-out; }
.press:active { background: var(--raised); }

.field {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}
.field:focus { border-color: var(--lime); }
.field::placeholder { color: var(--muted); }

/* Cabecera de Hoy */
.top { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.top h1 { flex: 1; }

/* Tarjeta de partido */
.match-head { display: flex; align-items: center; width: 100%; padding: 16px 14px 10px 16px; }
.match-head .title { flex: 1; min-width: 0; margin: 0 8px 0 12px; }
.team-logo { object-fit: contain; flex: none; }
.go { width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); flex: none; }
.summary { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; font-size: 14px; line-height: 20px; font-weight: 500; }
.summary svg { color: var(--lime); flex: none; }
.expand { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 16px; color: var(--muted); font-size: 14px; font-weight: 500; }

/* Fila de ángulo */
.angle { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 16px; }
.lead { width: 28px; height: 28px; flex: none; display: grid; place-items: center; }
.lead.disc { border-radius: 50%; background: var(--raised); color: var(--muted); }
.photo { display: grid; place-items: center; border-radius: 50%; background: var(--raised); overflow: hidden; flex: none; color: var(--muted); font-weight: 500; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* Mide en em para que la columna crezca con el tamaño de letra del sistema. */
.hits { width: 3.45em; margin: 0 10px; flex: none; font-size: 14px; }
.angle .body { flex: 1; min-width: 0; }
/* Misma columna que las filas: 16 de margen, 28 de foto y 10 más hasta los aciertos. */
.angle-head { display: flex; padding: 6px 16px 0 54px; }
.angle-head .hits { margin-left: 0; font-size: inherit; width: 4.4em; }
.angle-head .body { flex: 1; min-width: 0; }
.angle .pct { margin-left: 10px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.meta { display: flex; flex-wrap: wrap; font-size: 12px; line-height: 17px; font-variant-numeric: tabular-nums; }

/* Con el botón de quitar al lado, la fila cede su margen para que el valor quepa en una línea. */
.slip-row { display: flex; align-items: center; }
.slip-row .angle { padding-right: 2px; }
.slip-row .hits { margin: 0 6px; }

/* Ficha */
#sheet-root { position: fixed; inset: 0; z-index: 40; display: none; }
#sheet-root.open { display: block; }
.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / 0.6); animation: fade 200ms ease-out; }
.sheet {
  position: absolute;
  inset: auto 0 0;
  max-height: calc(100dvh - var(--sat) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 0 16px calc(16px + var(--sab));
  animation: rise 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet-top { position: sticky; top: 0; display: flex; justify-content: flex-end; background: var(--surface); margin-right: -8px; z-index: 2; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim { animation: none; } }

.stats { display: flex; padding: 14px; border-radius: 16px; background: var(--raised); }
.kv { flex: 1; min-width: 0; }
.kv .v { font-size: 20px; line-height: 26px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* Gráfico: cada barra mide exactamente su valor. */
.chart { position: relative; height: 150px; }
.chart .col { position: absolute; top: 0; bottom: 0; }
.chart .bar { position: absolute; left: 0; right: 3px; border-radius: 3px; }
.chart .val, .chart .opp { position: absolute; left: 0; right: 3px; text-align: center; font-size: 10px; line-height: 13px; overflow: hidden; }
.chart .val { font-weight: 500; font-variant-numeric: tabular-nums; }
.chart .opp { bottom: 0; color: var(--muted); }
.chart .line { position: absolute; left: 0; right: 0; border-top: 1.5px solid var(--text); }
.chart .line.dash { border-top-style: dashed; }
.hitbox { flex: none; padding: 8px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.prob { display: flex; align-items: center; gap: 10px; }
.prob .track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prob .track i { display: block; height: 100%; border-radius: 3px; }
.line-row { display: flex; align-items: center; padding: 5px 0; }
.line-row .a { flex: 1; }
.line-row .c { width: 6em; text-align: right; font-size: 13px; }

/* Detalle */
.back { display: flex; align-items: center; padding: 0 4px; min-height: 48px; }
.back .icon-btn { color: var(--text); }
.hero { display: flex; align-items: flex-start; padding: 4px 16px 0; }
.hero .team { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.hero .mid { width: 112px; padding-top: 12px; text-align: center; flex: none; }
.winbar { display: flex; gap: 2px; height: 8px; border-radius: 5px; overflow: hidden; }
.winbar i { display: block; min-width: 3px; }
.three { display: flex; font-size: 13px; line-height: 18px; margin-top: 6px; }
.three > * { flex: 1; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 48px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tab[aria-selected='true'] { color: var(--lime); border-bottom-color: var(--lime); }
.compare { padding: 8px 0; }
.compare .r { display: flex; align-items: center; }
.compare .c { flex: 1; text-align: center; font-size: 12px; line-height: 16px; color: var(--muted); padding: 0 8px; }
.compare .v { width: 5.2em; font-size: 15px; }
.bars { display: flex; gap: 6px; margin-top: 6px; }
.bars span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; display: flex; }
.bars span:first-child { justify-content: flex-end; }
.bars i { display: block; height: 100%; background: var(--muted); }
.bars i.best { background: var(--lime); }
.body-card { padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* Partidos */
.game { display: flex; align-items: center; width: 100%; padding: 12px 16px; }
.game .teams { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tline .n { flex: 0 1 auto; min-width: 0; }
.tline .gap { flex: 1; }
.tline .s { width: 3.2em; text-align: right; flex: none; }
.game .st { width: 5em; margin-left: 12px; text-align: right; flex: none; }
.live { color: var(--bad); display: inline-flex; align-items: center; gap: 5px; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }

/* Barra flotante */
.nav-fade {
  position: fixed;
  inset: auto 0 0;
  height: calc(110px + var(--sab));
  background: linear-gradient(rgb(10 12 14 / 0), rgb(10 12 14 / 0.92), var(--ink));
  pointer-events: none;
  z-index: 25;
}
.nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--sab));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 420px);
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 34px;
  background: var(--raised);
  border: 1px solid var(--line);
  z-index: 30;
}
.nav a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 4px 0;
  border-radius: 28px;
  color: var(--text);
  text-decoration: none;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
}
.nav a span { color: var(--muted); }
.nav a { position: relative; isolation: isolate; }
.nav a.on { color: var(--lime); }
.nav a.on span { color: var(--lime); }

/* Interruptor de ligas */
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); transition: background 120ms ease-out; }
.switch i::after { content: ''; position: absolute; top: 5px; left: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 120ms ease-out; }
.switch input:checked + i { background: var(--lime); border-color: var(--lime); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--ink); }

/* Esqueletos */
.skeleton { padding: 6px 16px; }
.skeleton .bone-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.skeleton .round-bone { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--raised); }
.skeleton .line-bone { display: block; width: 100%; height: 14px; border-radius: 6px; background: var(--raised); }
.skeleton .bone-head .line-bone { margin-left: 8px; height: 16px; }
.skeleton .bone { display: flex; flex-direction: column; gap: 12px; padding: 16px; margin-bottom: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; animation: pulse 1.6s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .skeleton .bone { animation: none; } }
.message { padding: 44px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* Bienvenida */
.onboard { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(20px + var(--sat)) 24px calc(20px + var(--sab)); }
.onboard .main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* Aviso para instalar */
.install { display: flex; align-items: center; gap: 8px; margin: 0 16px 10px; padding: 10px 6px 10px 14px; border-radius: 14px; background: var(--lime-soft); color: var(--lime); font-size: 12px; line-height: 17px; }
.install span { flex: 1; }

@media (hover: hover) and (pointer: fine) {
  .press:hover { background: var(--raised); }
  .pill:hover, label.chip:hover, .field-pick:hover, .round:hover { border-color: var(--muted); }
}

::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
