/* =====================================================================================================
   UD Castellonense · estilos de la app
   Colores sacados del escudo y de las fichas oficiales del club: negro, blanco y el dorado de los dorsales y del castillo.
   Cabecera y pantalla de entrada siempre en negro (como las fichas). El resto sigue el modo claro u oscuro del móvil.
   El rosa de la segunda equipación solo aparece en su muestra de camiseta.
   Tipografía: Barlow Condensed (licencia OFL, en fonts/) para títulos, dorsales y horas, parecida a la de las fichas;
   la del sistema para el texto (rápida y muy legible).
   ===================================================================================================== */

@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/barlow-condensed-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/barlow-condensed-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-latin-ext-700.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light dark;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;

  /* marca */
  --negro: #0E0E0E;            /* cabecera, entrada, pista */
  --negro-2: #1B1A18;
  --oro: #CFA953;              /* dorado de los dorsales de las fichas */
  --oro-claro: #E2C67E;
  --sobre-oro: #17140D;
  --rosa: #E5337B;             /* segunda equipación */

  /* claro: blanco roto cálido, tarjetas blancas, tinta casi negra */
  --fondo: #E6E2DA;
  --papel: #F4F2ED;
  --superficie: #FFFFFF;
  --campo: #ECE8E0;
  --linea: #E4E0D7;
  --linea-fuerte: #858074;
  --contorno: rgba(30, 25, 15, .08);
  --tinta: #161513;
  --tinta-2: #55504A;
  --tinta-3: #6C665D;
  --acento: #161513;           /* botones principales: negro */
  --acento-fuerte: #000000;
  --sobre-acento: #FFFFFF;
  --enlace: #6B4F12;           /* dorado oscuro, legible sobre blanco (7 : 1) */
  --acento-fondo: #F3EAD4;
  --sombra: 0 1px 2px rgba(30, 25, 15, .06), 0 6px 20px rgba(30, 25, 15, .07);

  /* estados (siempre con icono o texto, nunca solo color) */
  --ok: #1E8A44;      --ok-tinta: #17703A;     --ok-fondo: #E1F1E6;     --ok-boton: #1A7A3C;
  --error: #C2352B;   --error-tinta: #A3261D;  --error-fondo: #FAE3E0;  --error-boton: #B3261E;
  --aviso: #D99A1E;   --aviso-tinta: #7D5300;  --aviso-fondo: #FBEFD3;
  --neutro: #8A8478;  --neutro-tinta: #4F4A42; --neutro-fondo: #ECE8E0;
  --importante-fondo: #FDF3F1; --importante-borde: #EBC8C2;

  --nav-fondo: #FFFFFF;
  --nav-tinta: #5F5A52;
  --nav-activo: #161513;
  --nav-activo-fondo: #F0E5C9;

  --radio: 14px;
  --radio-sm: 10px;
  --hair: 1px;
  --nav-h: 64px;
  --z-nav: 20;
  --z-sheet: 100;
  --z-toast: 200;
}
@media (min-resolution: 2dppx) { :root { --hair: 0.5px; } }

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #050505;
    --papel: #0E0E0E;
    --superficie: #1A1918;
    --campo: #262523;
    --linea: #302E2B;
    --linea-fuerte: #8E887D;
    --contorno: rgba(255, 255, 255, .07);
    --tinta: #F2EFE8;
    --tinta-2: #C9C3B7;
    --tinta-3: #A49E93;
    --acento: #D4AE5A;
    --acento-fuerte: #E2C67E;
    --sobre-acento: #15120B;
    --enlace: #DDBE73;
    --acento-fondo: rgba(212, 174, 90, .16);
    --sombra: 0 1px 2px rgba(0, 0, 0, .35);

    --ok-tinta: #7CD594;    --ok-fondo: rgba(30, 138, 68, .22);
    --error-tinta: #FF9E95; --error-fondo: rgba(194, 53, 43, .26);
    --aviso-tinta: #F2C661; --aviso-fondo: rgba(217, 154, 30, .18);
    --neutro: #8E887D;      --neutro-tinta: #D3CDC2; --neutro-fondo: rgba(142, 136, 125, .2);
    --importante-fondo: rgba(194, 53, 43, .10); --importante-borde: rgba(255, 158, 149, .3);

    --nav-fondo: #1F1E1C;
    --nav-tinta: #B9B3A7;
    --nav-activo: #E2C67E;
    --nav-activo-fondo: rgba(212, 174, 90, .18);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tinta); background: var(--fondo);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, label { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
[hidden] { display: none !important; }

.muted { color: var(--tinta-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.prose { white-space: pre-line; overflow-wrap: anywhere; }
.prose--clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.link { color: var(--enlace); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.link--end { gap: 2px; text-decoration: none; }
.link--peligro { color: var(--error-tinta); }
.inline-ic { display: inline-flex; vertical-align: middle; }
.ic { flex: none; }
.dorsal { display: inline-block; min-width: 1.6em; margin-right: 6px; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; color: var(--enlace); font-variant-numeric: tabular-nums; }

/* ---------- estructura ---------- */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 640px; margin: 0 auto; background: var(--papel); position: relative; overflow: hidden; }
@media (min-width: 700px) { .app { box-shadow: 0 0 0 1px var(--contorno), 0 0 60px rgba(0, 0, 0, .14); } }

.aviso-archivo { width: calc(100% - 32px); max-width: 28rem; margin: 12vh auto 0; padding: 20px; background: #fff; color: #161513; border-radius: var(--radio); box-shadow: var(--sombra); }
.aviso-archivo h1 { margin-bottom: 8px; font-size: 1.125rem; line-height: 1.3; }

.hdr {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  min-height: calc(60px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) calc(8px + env(safe-area-inset-right)) 0 calc(14px + env(safe-area-inset-left));
  background: var(--negro); color: #fff; position: relative; z-index: 2;
  border-bottom: 2px solid var(--oro);
}
.hdr__brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; min-height: 44px; }
.hdr__logo { height: 40px; width: auto; flex: none; }
.hdr__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.hdr__name { font-family: var(--display); font-weight: 700; font-size: 1.375rem; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr__sub { font-family: var(--display); font-weight: 600; font-size: .875rem; color: var(--oro); letter-spacing: .06em; text-transform: uppercase; }
.hdr__bell { position: relative; display: grid; place-items: center; width: 48px; height: 48px; color: #fff; border-radius: 12px; }
.dot { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--oro); box-shadow: 0 0 0 2px var(--negro); }

.update-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 16px; background: var(--negro-2); color: #fff; font-size: .9375rem; }
.login .update-bar { width: 100%; max-width: 440px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }

.main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; scroll-padding-top: 16px; outline: none; scrollbar-width: thin; scrollbar-color: var(--linea-fuerte) transparent; }
.page { padding: 18px 16px 32px; }
.page__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; min-height: 44px; }
.page__titles { min-width: 0; }
.page__sub { color: var(--tinta-2); font-size: .9375rem; margin-top: 2px; }
.page__actions { flex: none; margin-left: auto; display: flex; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -8px 0 0 -6px; padding-right: 8px; color: var(--enlace); font-weight: 600; text-decoration: none; }
.h1 { font-family: var(--display); font-size: 2.125rem; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; }
.h2 { font-family: var(--display); font-size: 1.1875rem; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--tinta); display: inline-flex; align-items: center; gap: 8px; }
.h2__n { font-family: var(--display); color: var(--tinta-2); font-weight: 600; }
.h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 650; text-wrap: balance; }
.section { margin-top: 24px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; min-height: 32px; }
.section > .card + .card, .page > .card + .card, .section > .card + .nota-link { margin-top: 12px; }
.vacio { padding: 2px 2px 0; }

.nav {
  flex: none; position: relative; z-index: var(--z-nav);
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin: 0 max(10px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); border-radius: 22px;
  background: var(--nav-fondo); box-shadow: 0 6px 24px rgba(0, 0, 0, .18), 0 0 0 1px var(--contorno);
}
.nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: var(--nav-h); padding: 6px 0 5px; font-family: var(--display); font-size: .8125rem; font-weight: 600; letter-spacing: .01em; color: var(--nav-tinta); text-decoration: none; }
.nav__txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «Entrenaments» (valenciano) tiene que caber: con la letra condensada cabe desde 345 px; por debajo, un punto menos y menú más ancho */
@media (max-width: 344px) { .nav { margin-left: 6px; margin-right: 6px; } .nav__item { font-size: .75rem; letter-spacing: 0; } .nav__ic { width: 46px; } }
.nav__ic { display: grid; place-items: center; width: 54px; height: 30px; border-radius: 15px; transition: background-color .15s ease; }
.nav__item.is-on { color: var(--nav-activo); font-weight: 700; }
/* el fondo de la pestaña activa es uno solo (.nav__pill) que se desliza de una a otra */
.nav > a.nav__item { position: relative; z-index: 1; }
.nav__pill { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; pointer-events: none; transform: translateX(calc(var(--i) * 100%)); transition: transform .45s cubic-bezier(.34, 1.32, .5, 1), opacity .2s ease; }
.nav__pill .nav__ic { background: var(--nav-activo-fondo); }
.nav__pill .nav__txt { visibility: hidden; }
.nav__pill.is-oculta { opacity: 0; }
.nav__item.is-on .nav__ic svg { animation: icono-activo .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes icono-activo { from { transform: scale(.7) translateY(2px); } }

/* ---------- tarjetas y filas ---------- */
.card { background: var(--superficie); border-radius: var(--radio); padding: 16px; box-shadow: 0 0 0 1px var(--contorno), var(--sombra); }
.card--list { padding: 0; overflow: hidden; }
.card--list > * + * { border-top: var(--hair) solid var(--linea); }
.card + .card { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; background: none; border: 0; text-align: left; color: inherit; text-decoration: none; }
.row--link, .row--button, .row--check { cursor: pointer; }
.row--check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--acento); }
.row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row__title { font-weight: 600; overflow-wrap: anywhere; }
.row__sub { font-size: .875rem; color: var(--tinta-2); overflow-wrap: anywhere; }
.row__icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--tinta-2); }
.row.is-sel { background: var(--acento-fondo); }
.row.is-inactivo { opacity: .6; }
.chev { width: 16px; height: 16px; color: var(--linea-fuerte); flex: none; }
.row--link:active, .row--button:active, .row--check:active { background: var(--campo); }
@media (hover: hover) and (pointer: fine) { .row--link:hover, .row--button:hover, .row--check:hover { background: var(--campo); } }

.datebox { flex: none; width: 50px; height: 54px; border-radius: 10px; background: var(--negro); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; gap: 2px; box-shadow: inset 0 -3px 0 var(--oro); }
.datebox__m { font-family: var(--display); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--oro); }
.datebox__d { font-family: var(--display); font-size: 1.625rem; font-weight: 700; }
.datebox--off { background: var(--campo); color: var(--tinta-2); box-shadow: none; }
.datebox--off .datebox__m { color: var(--tinta-2); }
@media (prefers-color-scheme: dark) { .datebox { background: #000; box-shadow: inset 0 -3px 0 var(--oro), 0 0 0 1px var(--linea); } .datebox--off { background: var(--campo); box-shadow: none; } }

.facts { padding: 4px 16px; }
.facts > div { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 12px 0; }
.facts > div + div { border-top: var(--hair) solid var(--linea); }
.facts dt { display: flex; align-items: center; gap: 8px; color: var(--tinta-2); font-size: .875rem; }
.facts dd { font-weight: 550; overflow-wrap: anywhere; }
.dd-camiseta { display: flex; align-items: center; gap: 10px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 16px; color: var(--tinta-2); }
.empty__title { font-weight: 600; color: var(--tinta); }
.empty__text { max-width: 34ch; font-size: .9375rem; }
.card .empty { padding: 16px 8px; }
.fade { animation: fade .18s ease-out; }
.fade.is-stale { opacity: .6; transition: opacity .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- etiquetas ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .8125rem; font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--neutro-fondo); color: var(--neutro-tinta); vertical-align: middle; }
.pill--ok { background: var(--ok-fondo); color: var(--ok-tinta); }
.pill--aviso { background: var(--aviso-fondo); color: var(--aviso-tinta); }
.pill--error { background: var(--error-fondo); color: var(--error-tinta); }
.pill--acento { background: var(--acento-fondo); color: var(--enlace); }
.pill--oro { background: var(--oro); color: var(--sobre-oro); }
.punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--neutro); }
.punto--ok { background: var(--ok); } .punto--error { background: var(--error); } .punto--aviso { background: var(--aviso); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--small { min-height: 44px; padding: 0 14px; font-size: .9375rem; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--acento); color: var(--sobre-acento); }
.btn--accent { background: var(--oro); color: var(--sobre-oro); }
.btn--ghost { background: transparent; border-color: var(--linea-fuerte); color: var(--tinta); }
.btn--danger { background: transparent; border-color: var(--error); color: var(--error-tinta); }
.btn--si { background: var(--ok-boton); color: #fff; }
.btn--no { background: var(--error-boton); color: #fff; }
.btn--whatsapp { background: #1F7A4D; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover:not(:disabled) { background: var(--acento-fuerte); }
  .btn--ghost:hover:not(:disabled) { background: var(--campo); }
}
.btn-row { display: flex; gap: 12px; margin-top: 16px; }
.btn-row > .btn { flex: 1; }
.btn-row--start { margin-top: 12px; flex-wrap: wrap; }
.btn-row--start > .btn { flex: 0 0 auto; }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--tinta-2); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--campo); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.acciones-mini { display: flex; gap: 16px; }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: .875rem; font-weight: 600; color: var(--tinta); }
.field__hint { font-size: .8125rem; color: var(--tinta-2); }
.field__error, .form-error { display: flex; gap: 8px; align-items: flex-start; font-size: .9375rem; color: var(--error-tinta); }
.form-error { background: var(--error-fondo); padding: 10px 12px; border-radius: 10px; margin: 0; }
.form-error .ic { margin-top: 2px; }
.form-info { display: flex; gap: 8px; align-items: flex-start; background: var(--ok-fondo); color: var(--ok-tinta); padding: 10px 12px; border-radius: 10px; font-size: .9375rem; }
.form-info--neutro { background: var(--campo); color: var(--tinta); }
.input { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 1rem; line-height: 1.3; background: var(--superficie); border: 1px solid var(--linea-fuerte); border-radius: var(--radio-sm); appearance: none; -webkit-appearance: none; }
select.input { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus-visible { outline: 2px solid var(--tinta); outline-offset: 1px; }
.input::placeholder { color: var(--tinta-3); opacity: 1; }
input[type="date"].input, input[type="time"].input { min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 359px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 2px 0; cursor: pointer; font-size: .9375rem; }
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--acento); }
.check__hint { display: block; font-size: .8125rem; color: var(--tinta-2); }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--linea-fuerte); border-radius: 12px; cursor: pointer; background: var(--superficie); }
.choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--acento); flex: none; }
.choice.is-on { border-color: var(--acento); background: var(--acento-fondo); box-shadow: 0 0 0 1px var(--acento); }
.choice__t { display: block; font-weight: 600; }
.choice__s { display: block; font-size: .875rem; color: var(--tinta-2); }

.tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 16px; background: var(--campo); border-radius: 12px; }
.tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--tinta-2); font-weight: 600; font-size: .9375rem; cursor: pointer; white-space: nowrap; }
.tab.is-on { background: var(--superficie); color: var(--tinta); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

/* selector de dos opciones */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--campo); border-radius: 12px; }
.seg__opt { flex: 1; min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--tinta-2); font-weight: 600; cursor: pointer; }
.seg__opt.is-on { background: var(--acento); color: var(--sobre-acento); }
.seg--small .seg__opt { min-height: 40px; font-size: .875rem; padding: 0 10px; }

.fchip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linea-fuerte); background: var(--superficie); color: var(--tinta); font-size: .9375rem; font-weight: 550; cursor: pointer; white-space: nowrap; }
.fchip.is-on { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); font-weight: 650; }
.sistemas { display: flex; gap: 8px; margin: 0 -16px 10px; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; }
.sistemas::-webkit-scrollbar { display: none; }

/* ---------- caras ---------- */
.cara { position: relative; flex: none; display: inline-block; border-radius: 50%; background: var(--negro); }
.cara img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cara__ini { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: var(--oro); font-family: var(--display); font-weight: 700; }
.cara__dorsal { position: absolute; right: -4px; bottom: -3px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: var(--oro); color: var(--sobre-oro); font-family: var(--display); font-weight: 700; font-size: .875rem; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--superficie); }

/* ---------- entrenos ---------- */
.entreno { padding: 0; overflow: hidden; }
.entreno__cab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.entreno__titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.entreno__titulo strong { font-family: var(--display); font-size: 1.375rem; line-height: 1.1; font-weight: 700; text-transform: uppercase; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.entreno__sub { font-size: .9375rem; color: var(--tinta-2); }
.entreno__lugar { display: flex; align-items: center; gap: 4px; font-size: .875rem; }
.entreno__accion { padding: 0 16px 14px; }
.entreno__pregunta { font-weight: 650; margin-bottom: 10px; }
.entreno__plazo { margin-top: 10px; font-size: .875rem; color: var(--tinta-2); }
.entreno__cerrado { padding: 0 16px 14px; }
.card > .entreno__cerrado { padding: 0; }
.entreno__cerrado p:first-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.entreno__cancelado { display: flex; align-items: center; gap: 8px; padding: 0 16px 14px; color: var(--tinta-2); font-weight: 550; }
.card > .entreno__cancelado { padding: 0; }
.entreno.is-cancelado .entreno__titulo strong { color: var(--tinta-2); text-decoration: line-through; text-decoration-thickness: 2px; }
.entreno__pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 16px; border-top: var(--hair) solid var(--linea); text-decoration: none; color: inherit; background: var(--papel); }
.entreno__ver { flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--enlace); font-size: .9375rem; }
.cuentas { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .875rem; color: var(--tinta-2); }
.cuentas__i { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.entreno--principal { box-shadow: 0 0 0 1px var(--contorno), 0 0 0 1px var(--contorno), var(--sombra); }
.voy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.voy__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 12px; border-radius: 14px; border: 2px solid var(--linea-fuerte); background: var(--superficie); color: var(--tinta); font-family: var(--display); font-size: 1.375rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .1s ease; }
.voy__btn:active { transform: scale(.97); }
.voy__btn--si.is-on { background: var(--ok-boton); border-color: var(--ok-boton); color: #fff; }
.voy__btn--no.is-on { background: var(--error-boton); border-color: var(--error-boton); color: #fff; }
.voy__btn:disabled { cursor: default; }
.nota-tec { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; }
.nota-tec .ic { margin-top: 2px; }
.card + .nota-tec { margin-top: 14px; }
.hoja-jug { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 16px; }

/* ---------- partidos ---------- */
.lista-partidos > .partido + .partido { margin-top: 12px; }
.partido { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.partido__comp { font-family: var(--display); font-weight: 600; font-size: .9375rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.partido__equipos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.partido__eq { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--display); font-weight: 700; font-size: 1.1875rem; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.partido__eq img { flex: none; width: auto; height: 41px; }
.partido__equipos > .partido__eq:last-child { flex-direction: row-reverse; text-align: right; }
.partido__rival { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--campo); color: var(--tinta-2); font-size: 1.125rem; }
.partido__vs { font-family: var(--display); font-weight: 700; color: var(--tinta-3); font-size: 1.25rem; }
.partido__cuando { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .9375rem; color: var(--tinta-2); }
.partido__cond { margin-left: auto; font-weight: 600; color: var(--tinta); }
.partido__pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.partido__pie--centro { justify-content: center; }
.partido--detalle { align-items: stretch; text-align: center; background: var(--negro); color: #fff; box-shadow: inset 0 -3px 0 var(--oro), var(--sombra); padding: 18px 16px 20px; }
.partido--detalle .partido__comp { color: var(--oro); }
.partido--detalle .partido__rival { background: rgba(255, 255, 255, .12); color: #fff; }
.partido--detalle .partido__vs { color: rgba(255, 255, 255, .5); }
.partido__equipos--grande .partido__eq { flex-direction: column; text-align: center; font-size: 1.25rem; }
.partido__equipos--grande > .partido__eq:last-child { flex-direction: column; text-align: center; }
.partido__equipos--grande .partido__eq img { height: 60px; }
.partido__equipos--grande .partido__rival { width: 56px; height: 56px; font-size: 1.75rem; }
.partido__fecha { font-family: var(--display); font-weight: 600; font-size: 1.125rem; text-transform: uppercase; letter-spacing: .04em; color: rgba(255, 255, 255, .8); margin-top: 4px; }
.partido__hora { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: .95; color: var(--oro); font-variant-numeric: tabular-nums; }
.partido--detalle .pill--neutro { background: rgba(255, 255, 255, .14); color: #fff; }
.partido--detalle .pill--ok { background: rgba(124, 213, 148, .2); color: #A9EBBB; }

/* escudos de los rivales: recortados con fondo blanco, van sobre una pastilla blanca (igual en claro y en oscuro) */
.escudo { flex: none; display: block; border-radius: 22%; background: #fff; overflow: hidden; box-shadow: 0 0 0 1px var(--linea); }
.escudo img, .partido__equipos .partido__eq .escudo img { width: 100%; height: 100%; object-fit: contain; }
.partido--detalle .escudo { box-shadow: none; }

/* calendario de liga */
.calendario .row { gap: 10px; padding: 8px 12px 8px 6px; }
.calendario .row__title { font-size: .9375rem; line-height: 1.25; }
.jornada__n { flex: none; width: 30px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--tinta-2); font-variant-numeric: tabular-nums; }
.jornada__dcha { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.jornada__marcador, .jornada__hora { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jornada__res, .jornada__prox, .jornada__falta { font-size: .75rem; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.jornada__res--g { color: var(--ok-tinta); }
.jornada__res--p { color: var(--error-tinta); }
.jornada__res--e { color: var(--tinta-2); }
.jornada__prox, .jornada__falta { color: var(--enlace); }
.calendario .row.is-proximo { background: var(--acento-fondo); }
.section > .card + .nota { margin-top: 10px; }

/* hoja de un partido (cuerpo técnico) y partido del calendario en el editor de la convocatoria */
.hoja-partido { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.hoja-partido__eq { display: flex; align-items: center; gap: 12px; }
.hoja-partido__eq strong { display: block; font-weight: 650; line-height: 1.3; }
.hoja-partido__eq .muted { display: block; }
.marcador { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.marcador legend { padding: 0; margin-bottom: 6px; }
.marcador__fila { display: flex; align-items: center; gap: 12px; }
.marcador__fila > span { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.marcador__n { flex: none; width: 68px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.375rem; }
.vinculado { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radio-sm); background: var(--campo); }

.camiseta { flex: none; display: block; color: var(--tinta); }

.chips-jug { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 8px; }
.chip-jug { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 4px 8px; background: var(--superficie); border-radius: var(--radio); box-shadow: 0 0 0 1px var(--contorno); }
.chip-jug__nombre { font-weight: 600; font-size: .9375rem; line-height: 1.2; overflow-wrap: anywhere; }
.chip-jug__pos { font-size: .75rem; color: var(--tinta-2); }
.editor .section:first-child { margin-top: 0; }
.guardar { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.nota-link { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; border-radius: var(--radio); background: var(--acento-fondo); color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.nota-link .ic:last-child { margin-left: auto; }

/* ---------- pista (alineación) ---------- */
.pista { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 212 / 222; border-radius: 16px; overflow: hidden;
  background-color: #121211; background-image: radial-gradient(120% 80% at 50% 100%, #1F1E1B 0%, #121211 60%, #0B0B0A 100%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), var(--sombra); }
.pista__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pista__l { fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 1.4; }
.pista__p { fill: rgba(255, 255, 255, .55); }
.pista__porteria { fill: none; stroke: var(--oro); stroke-width: 1.6; }
.pista__jug { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 86px; padding: 0; border: 0; background: none; color: #fff; font: inherit; }
button.pista__jug { cursor: pointer; }
.pista__jug .cara { box-shadow: 0 0 0 2px var(--oro), 0 4px 12px rgba(0, 0, 0, .5); }
.pista__dorsal { position: absolute; top: 34px; left: calc(50% + 14px); min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: var(--oro); color: var(--sobre-oro); font-family: var(--display); font-weight: 700; font-size: .875rem; line-height: 22px; text-align: center; }
.pista__nombre { max-width: 100%; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .62); font-family: var(--display); font-weight: 600; font-size: .9375rem; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pista__nombre--vacio { color: rgba(255, 255, 255, .8); }
.pista__vacio { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .55); color: #fff; }
button.pista__jug:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; border-radius: 12px; }
@media (max-width: 360px) { .pista__jug { width: 74px; } .pista__nombre { font-size: .8125rem; } }

/* ---------- plantilla ---------- */
.fichas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 480px) { .fichas { grid-template-columns: repeat(4, 1fr); } }
.ficha { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0 0 10px; border: 0; border-radius: var(--radio); overflow: hidden; background: var(--superficie); color: inherit; text-align: center; cursor: pointer; box-shadow: 0 0 0 1px var(--contorno), var(--sombra); }
.ficha__foto { position: relative; display: block; aspect-ratio: 1; background: var(--negro); border-bottom: 3px solid var(--oro); }
.ficha__foto img { width: 100%; height: 100%; object-fit: cover; }
.ficha__foto .cara { position: absolute; inset: 0; margin: auto; }
.ficha__dorsal { position: absolute; left: 7px; top: 4px; font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; color: var(--oro); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.ficha__nombre { margin-top: 8px; padding: 0 4px; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.ficha__ape { padding: 0 4px; font-size: .8125rem; color: var(--tinta-2); line-height: 1.2; overflow-wrap: anywhere; }
.ficha__sub { padding: 2px 4px 0; font-size: .75rem; color: var(--tinta-3); }
.ficha-grande { width: 100%; max-width: 380px; margin: 0 auto 8px; border-radius: 12px; }
.ficha-datos { margin: -4px 0 12px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- avisos ---------- */
.avisos > .notice + .notice, .section > .notice + .notice { margin-top: 12px; }
.notice__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.notice .prose { margin-top: 6px; }
.notice__foot { margin-top: 2px; }
.notice--important { background: var(--importante-fondo); box-shadow: 0 0 0 1px var(--importante-borde), var(--sombra); }
a.notice--link { display: block; color: inherit; text-decoration: none; }

/* ---------- más ---------- */
.perfil { display: flex; align-items: center; gap: 14px; }
.perfil__txt { display: flex; flex-direction: column; min-width: 0; }
.perfil__txt strong { font-family: var(--display); font-size: 1.375rem; line-height: 1.1; text-transform: uppercase; }
.pie { margin-top: 28px; text-align: center; font-family: var(--display); font-weight: 600; letter-spacing: .08em; color: var(--tinta-3); text-transform: uppercase; font-size: .875rem; }
.club-escudo { display: flex; justify-content: center; padding: 8px 0 18px; }
.club-escudo img { height: 160px; width: auto; }
.estados { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.resumen-avisos { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 12px; }
.resumen-avisos .ic { margin-top: 2px; }
.pin-nuevo { margin-bottom: 20px; padding: 16px; border-radius: var(--radio); background: var(--acento-fondo); text-align: center; }
.pin-nuevo__cifras { font-family: var(--display); font-weight: 700; font-size: 3.25rem; line-height: 1.1; letter-spacing: .25em; padding-left: .25em; font-variant-numeric: tabular-nums; }
.bloque-acceso { margin-top: 20px; padding-top: 16px; border-top: var(--hair) solid var(--linea); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bloque-acceso.stack { align-items: stretch; }
.steps { list-style: decimal; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.nota { display: flex; gap: 8px; align-items: flex-start; font-size: .875rem; color: var(--tinta-2); background: var(--campo); padding: 10px 12px; border-radius: 10px; }
.nota .ic { margin-top: 2px; }

/* icono | texto | cerrar; el botón va debajo del texto (así el texto no queda estrujado en móviles estrechos) */
.banner { position: relative; display: grid; grid-template-columns: 40px 1fr 44px; align-items: start; gap: 8px 12px; margin-bottom: 4px; padding: 12px 6px 12px 12px; background: var(--superficie); border-radius: var(--radio); box-shadow: 0 0 0 1px var(--contorno), var(--sombra); }
.banner > .btn { grid-column: 2; grid-row: 2; justify-self: start; }
.banner + .banner { margin-top: 10px; }
.banner > .icon-btn { grid-column: 3; grid-row: 1; margin-top: -6px; }
.banner__ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--negro); color: var(--oro); }
.banner__main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .875rem; line-height: 1.3; color: var(--tinta-2); }
.banner__main strong { color: var(--tinta); font-size: .9375rem; }

/* ---------- hoja inferior y avisos emergentes ---------- */
.sheet-root { position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vv-h, 100%); z-index: var(--z-sheet); display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .58); animation: fade .2s ease-out; touch-action: none; }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: 92%; display: flex; flex-direction: column; background: var(--superficie); color: var(--tinta); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); outline: none; animation: rise .26s cubic-bezier(.2, .8, .2, 1); }
.sheet__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 4px 20px; }
.sheet__head .h2 { text-transform: none; font-size: 1.375rem; letter-spacing: 0; }
/* min-height: 0 es imprescindible: sin él, Safari (iPhone) no deja encoger el cuerpo y lo de abajo no se puede alcanzar */
.sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scroll-padding: 12px 0 24px; padding: 8px 20px 24px; }
.sheet__body > .card--list { box-shadow: 0 0 0 1px var(--linea); }
@media (max-height: 520px) { .sheet { max-height: 100%; border-radius: 0; } }
@media (hover: none) and (pointer: coarse) { .sheet-open .main { overflow: hidden; } }
@keyframes rise { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { .sheet-root { align-items: center; } .sheet { border-radius: 20px; } }

.toast-region { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); z-index: var(--z-toast); display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.toast { max-width: 480px; padding: 12px 16px; border-radius: 12px; background: var(--tinta); color: var(--papel); font-size: .9375rem; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); animation: rise .2s ease-out; }
.toast--ok { background: var(--ok-boton); color: #fff; }
.toast--error { background: var(--error-boton); color: #fff; }

/* ---------- entrada ---------- */
.splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: var(--negro); }
.splash img { height: 160px; width: auto; }
.splash .spin { border-color: rgba(255, 255, 255, .2); border-top-color: var(--oro); }
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: calc(14px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); background: var(--negro); color: #fff; }
.login__idioma { width: 100%; max-width: 440px; display: flex; justify-content: flex-end; }
.login__idioma .seg { background: rgba(255, 255, 255, .1); }
.login__idioma .seg__opt { color: rgba(255, 255, 255, .8); }
.login__idioma .seg__opt.is-on { background: var(--oro); color: var(--sobre-oro); }
.login__top { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.login__logo { height: 131px; width: auto; margin-bottom: 6px; }
.login__title { font-family: var(--display); font-size: 2.25rem; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.login__sub { font-family: var(--display); color: var(--oro); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.login__card { width: 100%; max-width: 440px; padding: 16px; background: var(--superficie); color: var(--tinta); border-radius: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.login__card .tabs { margin: 0; }
.login__pregunta { font-family: var(--display); font-weight: 700; font-size: 1.375rem; text-transform: uppercase; margin-bottom: 10px; }
.login__nota { margin: -4px 0 12px; }
.login__instalar { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: none; color: #fff; font-weight: 600; cursor: pointer; }
.login__demo { max-width: 440px; font-size: .8125rem; line-height: 1.45; color: rgba(255, 255, 255, .75); text-align: center; }
.login__demo strong { color: #fff; }
.quien { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 420px) { .quien { grid-template-columns: repeat(4, 1fr); } }
.quien__btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 10px 2px 8px; border: 0; border-radius: 12px; background: none; color: inherit; cursor: pointer; text-align: center; }
.quien__btn:active { background: var(--campo); }
@media (hover: hover) and (pointer: fine) { .quien__btn:hover { background: var(--campo); } }
.quien__nombre { margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; line-height: 1; text-transform: uppercase; }
.quien__ape { font-size: .75rem; color: var(--tinta-2); line-height: 1.2; overflow-wrap: anywhere; }
.pin { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.pin > .link { align-self: flex-start; }
.pin__quien { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pin__quien strong { font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; line-height: 1.1; }
.pin__puntos { display: flex; justify-content: center; gap: 16px; padding: 6px 0; }
.pin__punto { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--linea-fuerte); transition: background-color .1s ease, border-color .1s ease; }
.pin__punto.is-on { background: var(--tinta); border-color: var(--tinta); }
.pin__puntos.is-error .pin__punto { border-color: var(--error); animation: temblar .3s ease; }
@keyframes temblar { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; width: 100%; margin: 0 auto; }
.tecla { min-height: 58px; border: 0; border-radius: 14px; background: var(--campo); color: var(--tinta); font-family: var(--display); font-size: 1.75rem; font-weight: 600; cursor: pointer; }
.tecla:active { background: var(--linea); transform: scale(.97); }
.tecla--borrar { display: grid; place-items: center; background: none; color: var(--tinta-2); }
.tecla:disabled { opacity: .5; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 52px; }
.pw__btn { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--tinta-2); cursor: pointer; }

.spin { display: inline-block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--linea); border-top-color: var(--tinta); animation: spin .8s linear infinite; }
.spin--sm { width: 18px; height: 18px; border-width: 2px; border-color: currentColor; border-top-color: transparent; opacity: .8; }
.spin-wrap { display: grid; place-items: center; padding: 40px 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================================================
   Efectos (ui/efectos.js): presentación al abrir, bienvenida al entrar y entradas de cada pantalla.
   Solo transform y opacity (van finos en cualquier móvil). Con «reducir movimiento» no se ven (bloque de abajo).
   ===================================================================================================== */
.intro, .bienv { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; overflow: hidden; cursor: pointer; color: #fff; -webkit-tap-highlight-color: transparent; }
.intro { background: var(--negro); }
.intro.is-saliendo, .bienv.is-saliendo { background: transparent; }
/* franjas verticales como la primera equipación: de fondo y, al salir, se abren como un telón (unas suben y otras bajan) */
/* blancas y negras, como la camiseta; el centro se oscurece para que el escudo y el nombre se lean bien */
.franjas { position: absolute; inset: 0; display: flex; }
.franja { flex: 1 1 0; height: 100%; background: #0E0E0E; }
.franja:nth-child(even) { background: #ECEAE5; }
.franjas::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 48% at 50% 50%, rgba(10, 10, 10, .97) 45%, rgba(10, 10, 10, .78) 70%, rgba(10, 10, 10, .35) 100%); }
.franjas--arriba::after { animation: aparece .45s ease-out both; }
.is-saliendo .franjas::after { animation: sin-sombra .25s ease-out forwards; }
@keyframes sin-sombra { to { opacity: 0; } }
.franjas--arriba .franja { transform-origin: 50% 0; animation: franja-baja .5s cubic-bezier(.65, 0, .25, 1) both; animation-delay: calc(var(--i) * 32ms); }
.is-saliendo .franja { animation: franja-sube .62s cubic-bezier(.7, 0, .25, 1) both; animation-delay: calc(var(--i) * 38ms); }
.is-saliendo .franja:nth-child(even) { animation-name: franja-cae; }
@keyframes franja-baja { from { transform: scaleY(0); } }
@keyframes franja-sube { to { transform: translateY(-101%); } }
@keyframes franja-cae { to { transform: translateY(101%); } }

.intro__centro, .bienv__centro { position: relative; width: 100%; max-width: 100vw; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; }
.intro__nombre, .bienv__nombre { max-width: 100%; text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.is-saliendo .intro__centro, .is-saliendo .bienv__centro { animation: centro-sale .38s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes centro-sale { to { opacity: 0; transform: scale(1.06); } }

.intro__escudo { position: relative; width: 146px; height: 200px; animation: escudo-entra .85s cubic-bezier(.2, 1.3, .4, 1) .12s both; }
.intro__escudo img { width: 100%; height: 100%; filter: drop-shadow(0 12px 32px rgba(207, 169, 83, .28)); }
/* destello dorado que cruza el escudo: solo sobre el dibujo del escudo (máscara con la propia imagen) */
.brillo-escudo { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(../icons/escudo-320.png) center / contain no-repeat; mask: url(../icons/escudo-320.png) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 236, 190, .9) 50%, transparent 62%) 160% 0 / 300% 100% no-repeat;
  mix-blend-mode: screen; animation: brillo 1.05s cubic-bezier(.5, 0, .3, 1) .7s both; }
@keyframes brillo { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes escudo-entra { from { opacity: 0; transform: translateY(14px) scale(.72); } }
.intro__nombre { margin-top: 18px; font-family: var(--display); font-weight: 700; font-size: 2.375rem; line-height: 1; text-transform: uppercase; letter-spacing: .02em; animation: nombre-entra .75s cubic-bezier(.2, .8, .2, 1) .5s both; }
/* sin cambiar el ancho del texto (antes se animaba el espaciado y en iPhone empujaba el escudo hacia un lado) */
@keyframes nombre-entra { from { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(6px); } }
.intro__linea { display: block; width: 120px; height: 2px; margin: 14px 0 12px; background: var(--oro); animation: linea .6s cubic-bezier(.65, 0, .25, 1) .85s both; }
@keyframes linea { from { transform: scaleX(0); } }
.intro__lema { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: .22em; text-transform: uppercase; color: var(--oro); animation: aparece .55s ease-out 1.05s both; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } }

/* bienvenida al entrar con el PIN: cara con aro dorado que se dibuja, «Hola,», nombre y dorsal o cargo */
.bienv__foto { position: relative; width: 150px; height: 150px; animation: escudo-entra .7s cubic-bezier(.2, 1.3, .4, 1) .28s both; }
.bienv__foto .cara { box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.bienv__aro { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); transform: rotate(-90deg); overflow: visible; }
.bienv__aro circle { fill: none; stroke: var(--oro); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 302; stroke-dashoffset: 302; animation: aro 1.05s cubic-bezier(.65, 0, .25, 1) .45s forwards; }
@keyframes aro { to { stroke-dashoffset: 0; } }
.bienv__hola { margin-top: 26px; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: .28em; text-transform: uppercase; color: var(--oro); animation: aparece .5s ease-out .55s both; }
.bienv__nombre { margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 2.625rem; line-height: 1; text-transform: uppercase; animation: nombre-entra .7s cubic-bezier(.2, .8, .2, 1) .65s both; }
.bienv__sub { margin-top: 10px; font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; color: var(--oro); animation: aparece .5s ease-out .95s both; }

/* mientras se ve la presentación, lo de debajo espera para entrar cuando se abre el telón */
.con-intro :is(.login__top img, .login__title, .login__sub, .login__card, .quien li, .fade > *) { animation-play-state: paused !important; }

/* entrada */
.login__top img { animation: escudo-entra .8s cubic-bezier(.2, 1.3, .4, 1) both; }
.login__title { animation: nombre-entra .65s cubic-bezier(.2, .8, .2, 1) .12s both; }
.login__sub { animation: aparece .5s ease-out .3s both; }
.login__card { animation: subir .55s cubic-bezier(.2, .8, .2, 1) .22s both; }
.quien li { animation: cara-entra .5s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(.32s + var(--i, 0) * 28ms); }
@keyframes cara-entra { from { opacity: 0; transform: translateY(12px) scale(.86); } }
.pin__punto.is-on { animation: punto .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes punto { from { transform: scale(.35); } }

/* cada pantalla entra por partes (las secciones una detrás de otra) */
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }
.fade > * { animation: subir .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.fade > :nth-child(2) { animation-delay: .06s; }
.fade > :nth-child(3) { animation-delay: .12s; }
.fade > :nth-child(4) { animation-delay: .18s; }
.fade > :nth-child(5) { animation-delay: .24s; }
.fade > :nth-child(n+6) { animation-delay: .3s; }
a.card { transition: transform .15s ease; }
a.card:active { transform: scale(.985); }

/* «Voy» / «No voy»: al marcar, el botón late una vez y sale una onda de su color */
.voy__btn.is-pulso { animation: pulso .5s cubic-bezier(.2, 1.4, .4, 1), onda .7s ease-out; }
.voy__btn--si { --onda: rgba(26, 122, 60, .5); }
.voy__btn--no { --onda: rgba(179, 38, 30, .45); }
@keyframes pulso { 0% { transform: scale(.93); } 55% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes onda { from { box-shadow: 0 0 0 0 var(--onda); } to { box-shadow: 0 0 0 16px transparent; } }

/* partido: los dos equipos entran cada uno por su lado */
.partido__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.partido__top .partido__comp { min-width: 0; text-wrap: balance; }
.partido__top .pill { flex: none; }
.partido__equipos > .partido__eq:first-child { animation: desde-izq .65s cubic-bezier(.2, .8, .2, 1) .08s backwards; }
.partido__equipos > .partido__eq:last-child { animation: desde-der .65s cubic-bezier(.2, .8, .2, 1) .08s backwards; }
.partido__vs { animation: aparece .4s ease-out .4s backwards; }
@keyframes desde-izq { from { opacity: 0; transform: translateX(-26px); } }
@keyframes desde-der { from { opacity: 0; transform: translateX(26px); } }

/* la temporada en números */
.temporada { padding: 14px 12px 12px; }
.temporada__cifras { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.cifra { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.cifra + .cifra { border-left: var(--hair) solid var(--linea); }
.cifra__n { font-family: var(--display); font-weight: 700; font-size: 2.25rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cifra:nth-child(2) .cifra__n { color: var(--ok-tinta); }
.cifra:nth-child(4) .cifra__n { color: var(--error-tinta); }
.cifra__t { font-size: .75rem; font-weight: 600; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .04em; }
.temporada__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; padding: 10px 4px 0; border-top: var(--hair) solid var(--linea); font-size: .875rem; color: var(--tinta-2); }
.temporada__pie strong { color: var(--tinta); font-variant-numeric: tabular-nums; }
.forma { display: inline-flex; gap: 5px; }
.forma__r { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-family: var(--display); font-weight: 700; font-size: .875rem; color: #fff; animation: cara-entra .45s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(.3s + var(--i) * 70ms); }
.forma__r--g { background: var(--ok-boton); }
.forma__r--e { background: var(--neutro-tinta); }
.forma__r--p { background: var(--error-boton); }
@media (prefers-color-scheme: dark) { .forma__r--e { background: #6B665E; } }

/* alineación: las líneas de la pista se dibujan de abajo arriba y los jugadores salen uno a uno (el portero primero) */
.pista__svg { animation: lineas .9s cubic-bezier(.65, 0, .25, 1) backwards; }
@keyframes lineas { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.pista__jug { animation: jug-entra .6s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(.3s + var(--i, 0) * 95ms); }
@keyframes jug-entra { from { opacity: 0; scale: .35; } }

/* plantilla: las fichas aparecen una tras otra; la ficha oficial se gira y le pasa un brillo al abrirla */
.fichas > li { animation: cara-entra .5s cubic-bezier(.2, 1.2, .4, 1) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.ficha-revela { position: relative; display: block; width: 100%; max-width: 380px; margin: 0 auto 8px; border-radius: 12px; overflow: hidden; animation: ficha-entra .75s cubic-bezier(.2, 1, .3, 1) backwards; }
.ficha-revela .ficha-grande { margin: 0; }
.ficha-revela::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 240, 205, .5) 48%, transparent 64%) 160% 0 / 300% 100% no-repeat;
  mix-blend-mode: screen; animation: brillo 1.15s cubic-bezier(.5, 0, .3, 1) .35s both; }
@keyframes ficha-entra { from { opacity: 0; transform: perspective(900px) rotateY(-26deg) scale(.88); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .spin { animation: spin 1.6s linear infinite !important; }
}
@media print { .nav, .hdr, .toast-region { display: none; } .app { height: auto; overflow: visible; } .main { overflow: visible; } }
