/* SIBARI LEAGUES · la app.

   Una sola hoja. Sale del manual de marca 7.0 (marca/salida/MARCA.md del
   repositorio odoo-sibari): los grises de Apple, la escala de letra de Apple
   con su interlineado y su espaciado, botones en pildora, campos de 56, la
   cuna como firma y el acento de la division.

   El acento es el que pone la web en las paginas de Leagues
   (sibari_division_theme/division_theme.css):
     acento  #BC5900  lo que se pulsa: botones, enlaces, foco, lo elegido
     fuerte  #8D4300  al pasar y al pulsar, y el enlace sobre K4 o espuma
     espuma  #FDEEE0  fondo de lo activo y de la opcion elegida
     #EC7200 es la identidad: vive en la pastilla del bloqueo y en los
             iconos, nunca en un texto pequeno (3,01:1 sobre blanco).
   Solo el error lleva un color que no es de la marca. */

@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blanco: #FFFFFF;
  --k2: #FAFAFC;
  --k4: #F5F5F7;
  --k9: #E8E8ED;
  --k12: #D2D2D7;
  --k44: #86868B;
  --k55: #6E6E73;
  --k65: #424245;
  --k70: #333336;
  --k88: #1D1D1F;
  --negro: #000000;
  --error: #E81028;

  --acento: #BC5900;
  --acento-fuerte: #8D4300;
  --espuma: #FDEEE0;
  --identidad: #EC7200;

  --r-xs: 4px;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-pildora: 999px;
  --sombra: 0 8px 24px rgba(29, 29, 31, 0.16);
  --rapido: 150ms ease;

  --letra: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;

  /* LA CABECERA. Aire igual arriba, a la izquierda y hasta la cuna.
     El tramo alto de la cuna pasa por el centro del bloqueo, la subida
     es lo que hay de ahi al tramo bajo y la transicion mide 2 x subida. */
  /* Las medidas del manual ("La cuna", Medidas): cinta 80, aire 20, subida 40,
     transicion 80 y el bloqueo a (40 - 20) x 2 = 40. El bloqueo es el de la division
     ENTERO, SIBARI con la pastilla LEAGUES colgando (caja 192,70 x 58,95), igual que en
     la web: 20 de aire encima y 20 hasta la cuna, y la cuna pasa por su centro. */
  --aire: 20px;
  --bloqueo: 40px;                 /* alto del bloqueo SIBARI LEAGUES entero */
  --bloqueo-ancho: 131px;          /* 192,70 x 40 / 58,95 */
  --trazo: 2px;
  /* Excepcion a la paleta, solo para las tarjetas del arbitro: se reconocen por su color. */
  --tarjeta-amarilla: #FFCC00;
  --tarjeta-roja: #E81028;
  /* El mismo aire encima del bloqueo que entre el bloqueo y el trazo: 20 + 40 + 20 y el
     trazo debajo, para que el grosor no se coma aire. El trazo bajo queda centrado en 81. */
  --cinta: calc(var(--aire) * 2 + var(--bloqueo) + var(--trazo));
  --alto: calc(var(--aire) + var(--bloqueo) / 2);          /* centro del tramo alto: 40 */
  --subida: calc(var(--cinta) - var(--trazo) / 2 - var(--alto));
  --transicion: calc(var(--subida) * 2);
  --quiebro: calc(var(--aire) + var(--bloqueo-ancho));
  --menu-x: calc(var(--quiebro) + var(--transicion));
  --lateral: calc(var(--menu-x) - 32px);
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--blanco);
  color: var(--k88);
  font: 400 17px/1.47059 var(--letra);
  letter-spacing: -0.022em;
  font-feature-settings: 'cv11';
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
h1 { font-size: 48px; line-height: 1.08349; font-weight: 600; letter-spacing: -0.003em; }
h2 { font-size: 21px; line-height: 1.19048; font-weight: 600; letter-spacing: 0.011em; }
h3 { font-size: 17px; line-height: 1.23536; font-weight: 600; letter-spacing: -0.022em; }
strong, b { font-weight: 600; }
small, .small { font-size: 14px; line-height: 1.42859; letter-spacing: -0.016em; }
.tiny { font-size: 14px; line-height: 1.42859; letter-spacing: -0.016em; }
.muted { color: var(--k55); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.4; }
svg { flex-shrink: 0; }
table, .stat-value, .fixture-score, .points, .big-score, .clock-display, .leader-score,
.jersey-number, .rank-value, .data-pairs dd, .competition-stats strong, .league-price { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: -64px; left: 16px; padding: 12px 16px; background: var(--blanco); border-radius: var(--r-m); }
.skip-link:focus { top: 16px; }

/* utilidades del marcado */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: grid; gap: 24px; align-content: start; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.right { text-align: right; }
.full { width: 100%; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.divider { border: 0; border-top: 1px solid var(--k9); margin: 24px 0; }
.eyebrow { font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; font-weight: 500; color: var(--k55); margin-bottom: 4px; }

/* ------------------------------------------------------- arranque */
.initial-loader { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--k55); font-size: 14px; }
.initial-loader img { height: 56px; width: auto; }
.loading-state { display: grid; place-items: center; gap: 16px; padding: 96px 0; color: var(--k55); font-size: 14px; }
.loading-ring { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--k9); border-top-color: var(--identidad); animation: girar 800ms linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ------------------------------------------------ cabecera y cuna */
.app-layout { min-height: 100vh; padding-top: var(--cinta); padding-left: var(--lateral); }
.app-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--cinta);
  background: var(--blanco);
}
.app-brand { position: absolute; top: var(--aire); left: var(--aire); line-height: 0; border-radius: var(--r-s); }
.app-brand .brand-lockup { display: block; height: var(--bloqueo); width: auto; }
/* Un solo trazo, dibujado por app.js a la medida de la ventana. */
.cuna { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cuna path { fill: none; stroke: var(--k88); stroke-width: var(--trazo); shape-rendering: geometricPrecision; }
/* Encima del tramo alto, la banda de servicio. */
.header-service {
  position: absolute; top: 0; right: 24px;
  height: calc(var(--alto) - var(--trazo) / 2);
  display: flex; align-items: center; gap: 8px;
}
.header-service .icon-button { width: 36px; height: 36px; }
.header-service .avatar { width: 32px; height: 32px; }
/* Debajo, donde acaba la transicion: donde estamos. */
.header-title {
  position: absolute; left: var(--menu-x); right: 24px;
  top: calc(var(--alto) + var(--trazo) / 2); bottom: var(--trazo);
  display: flex; align-items: center;
}
.topbar-title { font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; font-weight: 600; color: var(--k88); }
.header-service .mobile-menu { display: none; }

/* ------------------------------------------------------- lateral */
.sidebar {
  position: fixed; top: var(--cinta); bottom: 0; left: 0; z-index: 40;
  width: var(--lateral);
  display: flex; flex-direction: column;
  padding: 24px 16px 16px var(--aire);
  background: var(--blanco);
  overflow-y: auto; scrollbar-width: thin;
}
.workspace-switch { display: grid; gap: 8px; padding-bottom: 24px; margin-bottom: 16px; border-bottom: 1px solid var(--k9); }
.context-label, .nav-label { font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; font-weight: 600; color: var(--k55); }
.nav-label { margin: 24px 12px 8px; }
.context-meta { font-size: 14px; line-height: 1.28577; color: var(--k55); }
.nav-list { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 8px 12px;
  border-radius: var(--r-m);
  font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; font-weight: 600;
  color: var(--k70);
  transition: background-color var(--rapido), color var(--rapido);
}
.nav-item svg { color: var(--k55); transition: color var(--rapido); }
.nav-item:hover { background: var(--k4); color: var(--k88); }
.nav-item.active { background: var(--espuma); color: var(--k88); }
.nav-item.active svg { color: var(--acento); }
.nav-count {
  margin-left: auto; min-width: 24px; padding: 4px 8px;
  border-radius: var(--r-pildora); background: var(--k4); color: var(--k88);
  font-size: 12px; line-height: 1.33337; font-weight: 600; text-align: center;
}
.sidebar-bottom { margin-top: auto; padding-top: 24px; display: grid; gap: 4px; }
.sidebar-profile { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 16px 0 0 12px; border-top: 1px solid var(--k9); }
.sidebar-profile strong { display: block; font-size: 14px; line-height: 1.28577; }
.sidebar-profile small { display: block; font-size: 12px; line-height: 1.33337; font-weight: 600; color: var(--k55); }
.sidebar-backdrop { position: fixed; inset: var(--cinta) 0 0 0; z-index: 45; background: rgba(232, 232, 237, 0.4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: aparecer 320ms ease-out; }

/* --------------------------------------------------------- pagina */
.main { display: block; max-width: calc(1320px + 48px); padding: 48px 24px 96px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.page-head h1 { margin-bottom: 24px; }
.page-head p { font-size: 21px; line-height: 1.381; letter-spacing: 0.011em; color: var(--k55); max-width: 680px; }
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.back-link { display: inline-flex; margin-bottom: 24px; }
.back-link svg { transform: scaleX(-1); }
.section-title { margin: 32px 0 16px; }

/* ------------------------------------------------------- botones */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 21px;
  border: 1px solid var(--acento); border-radius: var(--r-pildora);
  background: transparent; color: var(--acento);
  font-size: 17px; line-height: 1.17648; font-weight: 400; letter-spacing: -0.022em;
  white-space: nowrap; text-align: center;
  transition: background-color var(--rapido), color var(--rapido), border-color var(--rapido);
}
.button:hover:not(:disabled) { background: var(--acento); color: var(--blanco); }
.button:active:not(:disabled) { background: var(--acento-fuerte); border-color: var(--acento-fuerte); color: var(--blanco); }
.button.primary { background: var(--acento); color: var(--blanco); }
.button.primary:hover:not(:disabled), .button.primary:active:not(:disabled) { background: var(--acento-fuerte); border-color: var(--acento-fuerte); }
.button.large { min-height: 44px; padding: 11px 21px; }
.button.full { width: 100%; }
/* El boton de texto: sin caja, en el acento, con la flecha detras. */
.button.ghost, .text-link {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 0; padding: 0; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--acento);
  font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; font-weight: 400;
  transition: color var(--rapido), background-color var(--rapido), box-shadow var(--rapido);
}
.button.ghost:hover:not(:disabled), .text-link:hover { color: var(--acento-fuerte); }
.notice a:hover { color: var(--k88); }
.icon-button {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r-pildora); background: transparent; color: var(--k88);
  position: relative; transition: background-color var(--rapido);
}
.icon-button:hover { background: var(--k4); }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--identidad); box-shadow: 0 0 0 2px var(--blanco); }
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--k4); color: var(--k70);
  font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: 0;
}
a.avatar { transition: background-color var(--rapido); }
a.avatar:hover { background: var(--k9); }

/* -------------------------------------------------------- campos */
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > span { font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; font-weight: 600; color: var(--k88); }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; min-height: 56px; padding: 0 15px;
  border: 1px solid var(--k44); border-radius: var(--r-m);
  background-color: var(--blanco); color: var(--k88);
  font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em;
  transition: border-color var(--rapido), box-shadow var(--rapido);
}
textarea { padding: 15px; min-height: 120px; resize: vertical; line-height: 1.47059; }
input[type=color] { width: 100%; height: 56px; padding: 8px; border: 1px solid var(--k44); border-radius: var(--r-m); background: var(--blanco); }
input::placeholder, textarea::placeholder { color: var(--k44); }
/* El foco de un campo es su borde, que pasa a 2 px en el acento: sin
   recuadro por fuera, que con el borde hacia dos cajas. */
input:not([type=checkbox]):not([type=radio]):focus-visible, select:focus-visible, textarea:focus-visible, input[type=color]:focus-visible {
  outline: 2px solid var(--acento); outline-offset: 3px;
}
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
input:disabled, select:disabled, textarea:disabled { background-color: var(--k4); color: var(--k55); }

/* El desplegable: la misma caja, la flecha con aire a la derecha. */
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 48px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%231D1D1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px;
  text-overflow: ellipsis;
}
/* Donde el navegador deja dibujar la lista (Chrome y Edge), la lista es un
   panel flotante y la opcion elegida va en la espuma de Leagues, nunca en
   el azul del sistema. */
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  /* El boton es el que ui.js pone delante de las opciones: el texto se
     recorta con puntos suspensivos y la flecha va en su propia columna,
     con 16 de aire a cada lado, sin nada por debajo de ella. */
  select { display: flex; align-items: stretch; padding: 0; background-image: none; }
  select::picker-icon { display: none; }
  select > button {
    all: unset; box-sizing: border-box;
    display: flex; align-items: center; gap: 16px;
    flex: 1 1 auto; min-width: 0; padding: 0 16px 0 15px;
    cursor: pointer;
  }
  select > button::after {
    content: ''; flex: none; width: 12px; height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%231D1D1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
    transition: transform 200ms ease-out;
  }
  select:open > button::after { transform: rotate(180deg); }
  select > button selectedcontent { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  select:disabled > button { cursor: not-allowed; }
  select > button:focus-visible { outline: none; }
  select:has(> button:focus-visible) { outline: 2px solid var(--acento); outline-offset: 3px; }
  ::picker(select) {
    margin-top: 8px; padding: 8px;
    border: 1px solid var(--k12); border-radius: var(--r-m);
    background: var(--blanco); box-shadow: var(--sombra);
    max-height: min(360px, 60vh);
    opacity: 0; transition: opacity 200ms ease-out, display 200ms allow-discrete, overlay 200ms allow-discrete;
  }
  ::picker(select):popover-open { opacity: 1; }
  @starting-style { ::picker(select):popover-open { opacity: 0; } }
  select option {
    display: flex; align-items: center; gap: 12px;
    min-height: 44px; padding: 8px 12px; border-radius: var(--r-s);
    font-size: 17px; line-height: 1.23536; color: var(--k88); cursor: pointer;
  }
  select option:hover, select option:focus-visible { background: var(--k4); outline: none; }
  select option:checked { background: var(--k4); font-weight: 600; }
  select option::checkmark { content: none; }
}

input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin: 0; accent-color: var(--acento); flex-shrink: 0; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 17px; line-height: 1.23536; cursor: pointer; }
.check input { margin-top: 0; }
.form-error { padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--error); border-radius: var(--r-m); color: var(--error); font-size: 14px; line-height: 1.42859; }
.confirm-copy { font-size: 17px; color: var(--k70); }

/* El buscador: una sola caja, la lupa dentro. */
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.filters > .small { margin-left: auto; color: var(--k55); }
.search-field {
  flex: 1 1 320px; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--k44); border-radius: var(--r-m); background: var(--blanco);
  color: var(--k55); cursor: text;
  transition: border-color var(--rapido), box-shadow var(--rapido);
}
.search-field input:not([type=checkbox]):not([type=radio]):not([type=color]) { min-height: 42px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.search-field input:not([type=checkbox]):not([type=radio]):not([type=color]):focus-visible { outline: none; border: 0; box-shadow: none; }
.search-field:focus-within { outline: 2px solid var(--acento); outline-offset: 3px; }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
.select-filter, #context-competition { min-height: 44px; width: auto; max-width: 100%; }
#context-competition { width: 100%; font-weight: 600; }
.filters .select-filter { flex: 0 1 280px; }

/* ------------------------------------------------------ pestanas */
/* La capsula de Apple, la de la web: gris K12, la elegida en K88. */
.tabs {
  display: inline-flex; max-width: 100%; gap: 0;
  padding: 4px; margin-bottom: 32px;
  border-radius: var(--r-m); background: var(--k9);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a {
  flex: 0 0 auto; min-height: 36px; padding: 0 16px;
  border: 0; border-radius: var(--r-s); background: transparent;
  color: var(--k70); font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; font-weight: 400;
  white-space: nowrap; transition: background-color var(--rapido), color var(--rapido);
}
.tabs button:hover, .tabs a:hover { color: var(--k88); }
.tabs a { display: inline-flex; align-items: center; justify-content: center; }
.tabs button.active, .tabs a.active { background: var(--k88); color: var(--blanco); font-weight: 600; }
.filters .tabs { margin: 0; }

/* -------------------------------------------------------- tarjetas */
.card { background: var(--blanco); border: 1px solid var(--k12); border-radius: var(--r-m); overflow: clip; }
.card.card-body, .card-body { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 16px; }
.card-head.bordered { padding-bottom: 24px; border-bottom: 1px solid var(--k9); }
.card-head p { margin-top: 4px; }
.card-foot { padding: 16px 24px; border-top: 1px solid var(--k9); font-size: 14px; line-height: 1.42859; color: var(--k55); }
.card > h2 + p, .card-body > h2 + p { margin-top: 16px; }

/* Cifras: tarjeta K4 sin borde. */
.summary-metrics { gap: 12px; }
.stat-card { display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--r-m); background: var(--k4); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; color: var(--k55); font-weight: 500; }
.stat-icon { color: var(--k44); display: inline-grid; }
.stat-value { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: 0; color: var(--k88); }
.stat-card p { font-size: 14px; line-height: 1.42859; color: var(--k55); }
.stat-card p:empty { display: none; }
.trend { margin-left: 8px; font-size: 14px; font-weight: 600; color: var(--k55); }

.notice { padding: 16px; border-radius: var(--r-m); background: var(--k4); color: var(--k88); font-size: 14px; line-height: 1.42859; }
.notice.warning { background: var(--k4); }
.notice a { color: var(--acento-fuerte); }

.empty-state { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; background: var(--k4); color: var(--identidad); }
.empty-state h3 { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; }
.empty-state p { max-width: 440px; color: var(--k55); }
.empty-state .button { margin-top: 16px; }

/* ------------------------------------------------ estados (pildora) */
.badge {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 4px 12px; border-radius: var(--r-pildora);
  background: var(--k4); color: var(--k88);
  font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; font-weight: 600; white-space: nowrap;
}
.badge.success, .badge.green { background: var(--espuma); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--identidad); }

/* ------------------------------------------------------- escudos */
.crest {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: var(--r-s);
  background: var(--team-color, var(--k70)); color: var(--blanco);
  font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: -0.01em;
}
.crest.light { color: var(--k88); box-shadow: inset 0 0 0 1px var(--k12); }
.crest.large { width: 44px; height: 44px; border-radius: var(--r-m); font-size: 14px; }
.crest.xl { width: 72px; height: 72px; border-radius: var(--r-l); font-size: 21px; }
.team-cell { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.team-cell strong { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------- tablas */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.23536; }
thead th {
  padding: 12px 16px; text-align: left; white-space: nowrap;
  background: var(--k88); color: var(--k4);
  font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; font-weight: 600;
}
tbody td { padding: 12px 16px; border-top: 1px solid var(--k12); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tbody td p { margin-top: 4px; }
tbody tr.highlight td { background: var(--espuma); }
td a:hover .team-cell strong { color: var(--acento); }
.rank-cell { width: 56px; text-align: center; }
.rank-value { font-weight: 600; }
.points { font-weight: 600; }
.standings-table th:not(:nth-child(2)), .standings-table td:not(:nth-child(2)) { text-align: right; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.form-dots { display: inline-flex; gap: 4px; }
.form-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; }
.form-dot.W { background: var(--k88); color: var(--blanco); }
.form-dot.D { background: var(--k9); color: var(--k88); }
.form-dot.L { background: var(--blanco); color: var(--k55); box-shadow: inset 0 0 0 1px var(--k12); }
.mobile-table-note { display: none; }
.jersey-number { font-weight: 600; }

/* ---------------------------------------------------- resumen */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dashboard-grid > *, .overview-columns > *, .stack > *, .grid > * { min-width: 0; }
.next-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; border-radius: var(--r-m); background: var(--k4); }
.next-strip h2 { margin: 8px 0 16px; font-size: 24px; line-height: 1.16667; letter-spacing: 0.009em; }
.next-strip .muted { color: var(--k55); }

.agenda-row, .directory-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 24px;
  border-top: 1px solid var(--k9); transition: background-color var(--rapido);
}
.card-head + .agenda-row, .card-head.bordered + .agenda-row { border-top: 0; }
.agenda-row:hover, .directory-row:hover { background: var(--k2); }
.agenda-row > svg, .directory-row > svg { color: var(--k44); }
.agenda-date { display: grid; width: 56px; flex-shrink: 0; }
.agenda-date strong { font-size: 17px; }
.agenda-date span { font-size: 14px; color: var(--k55); }
.agenda-row .grow { display: grid; gap: 4px; }
.agenda-row .grow strong { font-weight: 600; }
.directory-list .directory-row:first-child { border-top: 0; }
.directory-row .grow { display: grid; gap: 4px; }

/* Un partido en una fila. */
.fixture-row {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px minmax(0, 1fr) 132px;
  align-items: center; gap: 16px; padding: 16px 24px;
  border-top: 1px solid var(--k9); transition: background-color var(--rapido);
}
.card-head + .fixture-row, .card-head.bordered + .fixture-row { border-top: 0; }
.fixture-row:hover { background: var(--k2); }
.fixture-row.is-live { background: var(--espuma); }
.fixture-row > .badge { justify-self: end; }
.fixture-date { display: grid; font-size: 14px; line-height: 1.28577; color: var(--k55); }
.fixture-date strong { font-size: 17px; line-height: 1.23536; color: var(--k88); }
.fixture-score { text-align: center; font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; font-weight: 600; white-space: nowrap; }
.fixture-score.upcoming { color: var(--k55); font-weight: 400; }
/* En el calendario del organizador el boton va al lado del partido. */
.card > .row { gap: 0; padding-right: 16px; border-top: 1px solid var(--k9); }
.card > .row .fixture-row { border-top: 0; }
.card > .card-head + .row { border-top: 0; }

.leader { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--k9); }
.leader:first-child { border-top: 0; }
.leader > .small { width: 16px; text-align: center; color: var(--k55); font-weight: 600; }
.leader div { flex: 1; min-width: 0; }
.leader p { font-size: 14px; color: var(--k55); }
.leader-score { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; font-weight: 600; }

/* ------------------------------------------------- competiciones */
.league-card { display: flex; flex-direction: column; }
.league-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px; background: var(--k4); }
.league-emblem {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-l);
  background: var(--blanco); color: var(--identidad);
}
.league-card .card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.league-card h2 { font-size: 24px; line-height: 1.16667; letter-spacing: 0.009em; }
.league-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--k55); }
.league-description { color: var(--k55); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; }
.league-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--k9); }
.league-details span { display: block; font-size: 12px; line-height: 1.33337; font-weight: 600; color: var(--k55); }
.league-details strong { font-size: 17px; }
.league-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 24px; }
.league-price { display: grid; font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; font-weight: 600; }
.league-price small { font-size: 14px; line-height: 1.42859; font-weight: 400; color: var(--k55); }

.competition-hero { display: flex; align-items: center; gap: 24px; padding: 32px; margin-bottom: 32px; background: var(--k4); border: 0; }
.competition-hero .league-emblem { width: 72px !important; height: 72px !important; }
.competition-info { flex: 1; min-width: 0; }
.competition-info h1 { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; margin: 4px 0 24px; }
.competition-info p { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--k55); }
.competition-stats { display: flex; gap: 32px; }
.competition-stats div { display: grid; text-align: right; }
.competition-stats strong { font-size: 40px; line-height: 1.1; letter-spacing: 0; font-weight: 600; }
.competition-stats span { font-size: 14px; color: var(--k55); }
.competition-hero + .row { margin-bottom: 32px; }
.competition-hero + .row .tabs { margin: 0; }

/* ---------------------------------------------------- equipos */
.team-heading { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.team-heading h1 { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; margin-bottom: 24px; }
.team-heading p { color: var(--k55); }
.data-pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.data-pairs dt { font-size: 14px; color: var(--k55); }
.data-pairs dd { font-size: 28px; line-height: 1.14286; letter-spacing: 0.007em; font-weight: 600; margin-top: 4px; }

/* ------------------------------------------------------- bolsa */
.market-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.market-card > .row { margin-bottom: 8px; }
.market-card h3 { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; }
.market-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.market-tag { padding: 4px 12px; border-radius: var(--r-pildora); background: var(--k4); font-size: 12px; line-height: 1.33337; font-weight: 600; }
.market-card .description { color: var(--k55); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.market-card .button { margin-top: auto; }
.application-row { display: grid; gap: 12px; padding: 24px; border-top: 1px solid var(--k9); }
.application-row:first-child { border-top: 0; }
.application-row h3 { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; }

/* ------------------------------------------------ instalaciones */
.venue-card h3 { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; margin-bottom: 16px; }
.venue-card .card-body > p { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--k55); margin-bottom: 16px; }
.pitch-row { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--k9); }

/* ---------------------------------------------------- ajustes */
.settings-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--k9); }
.settings-row:first-of-type, h2 + .settings-row { border-top: 0; }
.settings-row > svg { color: var(--k55); }
.settings-row p { font-size: 14px; line-height: 1.42859; color: var(--k55); margin-top: 4px; }
.activity-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--k4); color: var(--k70); }

/* ------------------------------------------------------ partido */
.sync-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin-bottom: 24px; border-radius: var(--r-m); background: var(--k4); font-size: 14px; line-height: 1.42859; color: var(--k70); }
.sync-bar.offline svg { color: var(--error); }
.sync-bar .button { min-height: 0; padding: 4px 11px; font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; }
.referee-board { padding: 24px; }
.live-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin: 32px 0; text-align: center; }
.live-team { display: grid; justify-items: center; gap: 12px; font-size: 17px; font-weight: 600; line-height: 1.23536; }
.big-score { font-size: 64px; line-height: 1.0625; font-weight: 600; letter-spacing: -0.009em; }
.live-score .tiny { display: block; margin-top: 8px; color: var(--k55); }
.live-score > div:nth-child(2) { max-width: 200px; }
.sync-bar .flex { flex-wrap: nowrap; gap: 8px; }
.referee-board > .notice { text-align: center; }
.referee-board > .button { display: flex; margin: 0 auto; }
.clock-display { font-size: 80px; line-height: 1.05; font-weight: 600; letter-spacing: -0.015em; text-align: center; }
.clock-label { margin-top: 8px; text-align: center; font-size: 14px; color: var(--k55); }
.clock-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.event-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 24px; border-top: 1px solid var(--k9); }
.event-action {
  display: grid; justify-items: center; gap: 8px; padding: 24px 12px;
  border: 0; border-radius: var(--r-m); background: var(--k4); color: var(--k88);
  font-size: 17px; font-weight: 600; transition: background-color var(--rapido);
}
.event-action svg { color: var(--acento); }
.event-action:hover { background: var(--k9); }
.referee-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.referee-board > .mt .button { width: 100%; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 56px 32px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--k9); }
.timeline li:first-child { border-top: 0; }
.timeline-minute { font-size: 14px; line-height: 1.28577; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline-minute small { color: var(--k55); font-weight: 400; }
.timeline li p { font-size: 14px; line-height: 1.42859; color: var(--k55); }
.timeline .voided { text-decoration: line-through; color: var(--k55); }
.timeline .badge { margin-top: 8px; }
.record-notes { white-space: pre-wrap; overflow-wrap: anywhere; }

details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ''; width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform var(--rapido); }
details[open] summary::before { transform: rotate(45deg); }
.clock-history { list-style: none; margin: 16px 0 0; padding: 0; }
.clock-history li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--k9); font-size: 14px; line-height: 1.42859; }
.clock-history small { display: block; color: var(--k55); }
.event-time-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.event-context, .event-note, .review-events { margin: 12px 0; padding: 16px; border-radius: var(--r-m); background: var(--k4); }
.event-context summary, .event-note summary, .review-events summary { font-size: 14px; }
.event-context[open] summary, .event-note[open] summary, .review-events[open] summary { margin-bottom: 16px; }
.sync-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--k9); }
.sync-item .error { color: var(--error); }
.dashboard-aside h2 { margin-bottom: 16px; }

/* -------------------------------------------------------- acta */
.report-heading { margin-bottom: 24px; }
.report-brand .brand-lockup { display: block; height: 48px; width: auto; }
.report-score { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; margin-bottom: 16px; border-radius: var(--r-m); background: var(--k4); font-weight: 600; }
.report-score b { font-size: 40px; line-height: 1.1; letter-spacing: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.record-section { margin-top: 32px; padding-bottom: 8px; border-bottom: 1px solid var(--k9); }
.record-rosters { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.record-rosters ul, .record-events { list-style: none; padding: 0; margin: 0; }
.record-rosters li { display: flex; gap: 12px; padding: 8px 0; font-size: 14px; }
.record-rosters small { margin-left: auto; color: var(--k55); }
.record-events li { padding: 12px 0; border-bottom: 1px solid var(--k9); break-inside: avoid; }
.record-events strong, .record-events span, .record-events small { display: block; }
.record-digest { font-size: 14px; line-height: 1.42859; color: var(--k55); overflow-wrap: anywhere; }

/* ------------------------------------------------------- pagos */
.price-list { display: grid; gap: 0; margin: 8px 0 16px; border-radius: var(--r-m); background: var(--k4); }
.price-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--k9); }
.price-list > div:first-child { border-top: 0; }
.price-list dt { color: var(--k70); }
.price-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-block { display: grid; gap: 8px; padding: 24px 0; border-top: 1px solid var(--k9); }
.pay-block:first-of-type { border-top: 0; padding-top: 0; }
.pay-block.muted-block { color: var(--k55); }
.pay-amount { display: flex; align-items: baseline; gap: 12px; font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-amount small { font-size: 14px; font-weight: 400; color: var(--k55); }
.pay-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.pay-transfer { margin-top: 8px; padding: 16px; border-radius: var(--r-m); background: var(--k4); }
.pay-transfer summary { font-size: 14px; }
.pay-transfer[open] summary { margin-bottom: 8px; }
.pay-transfer p + p { margin-top: 8px; }
.installments { list-style: none; margin: 8px 0 0; padding: 0; border-radius: var(--r-m); border: 1px solid var(--k9); }
.installments li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--k9); }
.installments li:first-child { border-top: 0; }
.installments li span:first-child { display: grid; }
.installments small { color: var(--k55); font-size: 14px; }
.installments li.paid { color: var(--k55); }
.installment-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.payments-table td { vertical-align: top; }
.payments-table td p { margin-top: 4px; }
.right-actions { justify-content: flex-end; flex-wrap: nowrap; }

/* -------------------------------------------------- aviso y modal */
.notification { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--k9); }
.notification:first-child { border-top: 0; padding-top: 0; }
.notification p { font-size: 14px; color: var(--k70); }
.notification small { color: var(--k55); }

dialog#modal::backdrop { background: rgba(0, 0, 0, 0.48); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
dialog#modal[open] { animation: aparecer 200ms ease-out; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; }
#modal-body > .notice, #modal-form > .notice { margin-top: 16px; }
#modal-body h3.mb { margin-bottom: 8px; }

#toast-region { position: fixed; left: 50%; bottom: 32px; z-index: 80; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--r-pildora); background: var(--k88); color: var(--blanco);
  box-shadow: var(--sombra); font-size: 14px; line-height: 1.42859;
  animation: aparecer 200ms ease-out;
}
.toast.error { background: var(--blanco); color: var(--k88); box-shadow: var(--sombra), inset 0 0 0 1px var(--error); }
.toast.error svg { color: var(--error); }

/* --------------------------------------------------------- entrada */
/* Antes de la app: iniciar sesion o crear la cuenta de la web. Una sola
   columna centrada, como la de Apple, con la cabecera y la cuna de la app. */
.entry-page { min-height: 100vh; padding-top: var(--cinta); }
.entry { width: min(480px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 96px; }
.entry h1 { text-align: center; }
.entry-lead { margin: 16px 0 32px; text-align: center; font-size: 21px; line-height: 1.381; letter-spacing: 0.011em; color: var(--k55); }
.entry-tabs { display: flex; width: 100%; margin-bottom: 32px; }
.entry-tabs a { flex: 1 1 0; }
.entry-notice { margin-bottom: 16px; background: var(--espuma); }
.entry-form .field { margin-bottom: 24px; }
.entry-privacy { margin: 0 0 24px; font-size: 14px; line-height: 1.42859; letter-spacing: -0.016em; color: var(--k55); }
.entry-privacy .text-link { font-size: inherit; line-height: inherit; }
/* El boton de enviar, abajo a la derecha y en el acento (manual, formularios). */
.entry-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.entry-actions .text-link { font-size: 14px; }
.entry-actions .button { margin-left: auto; min-width: 160px; }
.entry-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--k9); text-align: center; }

/* ------------------------------------------------- pantallas medias */
@media (max-width: 1250px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .overview-columns { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hasta 1068, el corte de Apple: el lateral se esconde tras el menu. */
@media (max-width: 1068px) {
  h1 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
  .app-layout { padding-left: 0; }
  .sidebar { width: 300px; opacity: 0; visibility: hidden; transition: opacity 200ms ease-out, visibility 200ms; padding-left: 16px; }
  .sidebar.open { opacity: 1; visibility: visible; box-shadow: var(--sombra); z-index: 46; }
  .header-service .mobile-menu { display: inline-grid; }
  .main { padding: 48px 24px 96px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competition-info h1, .team-heading h1 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
  .competition-hero { flex-wrap: wrap; }
  .competition-stats { width: 100%; }
  .competition-stats div { text-align: left; }
}

/* ------------------------------------------------------------ movil */
/* Hasta 734. El mismo aire arriba, a la izquierda y hasta la cuna. La cuna
   arranca bajo el bloqueo y sube lo justo para que los tres iconos quepan
   debajo del tramo alto, a la derecha de la curva, con los 44 px que pide
   todo lo que se pulsa en movil. La transicion sigue siendo 2 x subida. */
@media (max-width: 734px) {
  :root {
    --aire: 16px;
    --bloqueo: 32px;
    --bloqueo-ancho: 105px;        /* 192,70 x 32 / 58,95 */
    --cinta: calc(var(--aire) * 2 + var(--bloqueo) + var(--trazo));
    --subida: 46px;                /* 44 de iconos + el trazo */
    --alto: calc(var(--cinta) - var(--trazo) / 2 - var(--subida));
    --transicion: calc(var(--subida) * 2);
  }
  body { font-size: 17px; }
  h1 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; }
  /* Los iconos viven entre el final de la curva y el borde, nunca antes: si
     falta sitio -una barra de desplazamiento, un movil estrecho- se estrechan
     en vez de pisar la curva. */
  .header-service {
    top: calc(var(--alto) + var(--trazo) / 2); left: var(--menu-x); right: 4px;
    height: 44px; gap: 0; justify-content: flex-end;
  }
  .header-service .icon-button, .header-service .avatar { flex: 0 1 44px; width: auto; min-width: 32px; height: 44px; }
  .header-service .icon-button { border-radius: var(--r-m); }
  /* El perfil sigue siendo un circulo de 32 aunque su caja se estreche. */
  .header-service .avatar { border-radius: 0; background: radial-gradient(circle at center, var(--k4) 15.5px, transparent 16px); }
  .header-title { display: none; }
  .sidebar { width: min(320px, 88vw); }
  .main { padding: 32px 16px 96px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 24px; margin-bottom: 32px; }
  .page-head p { font-size: 19px; line-height: 1.4211; letter-spacing: 0.012em; }
  .page-actions .button { flex: 1 1 auto; }
  .grid, .stack { gap: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-metrics { gap: 8px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 32px; line-height: 1.125; }
  .card-head { padding: 16px 16px 12px; flex-wrap: wrap; }
  .card-head.bordered { padding-bottom: 16px; }
  .card.card-body, .card-body { padding: 16px; }
  .card-foot { padding: 12px 16px; }
  .filters { gap: 8px; margin-bottom: 24px; }
  .filters .select-filter, .search-field { flex: 1 1 100%; }
  .filters > .small { margin-left: 0; }
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1 0 auto; }

  .fixture-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: 'fecha fecha estado' 'local marcador visitante';
    row-gap: 12px; column-gap: 12px; padding: 16px;
  }
  .fixture-date { grid-area: fecha; display: flex; align-items: baseline; gap: 8px; }
  .fixture-date strong { font-size: 14px; }
  .fixture-row > .badge { grid-area: estado; }
  .fixture-row > .team-cell:nth-child(2) { grid-area: local; }
  .fixture-row > .fixture-score { grid-area: marcador; }
  .fixture-row > .team-cell:nth-child(4) { grid-area: visitante; justify-self: end; flex-direction: row-reverse; text-align: right; }
  .fixture-row .team-cell strong { white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.28577; }
  .card > .row { flex-wrap: wrap; padding: 0 16px 16px 0; }
  .card > .row > .button { margin-left: 16px; }
  .agenda-row, .directory-row { padding: 16px; }

  .standings-extra, .roster-status { display: none; }
  .mobile-table-note { display: block; padding: 12px 16px; font-size: 14px; line-height: 1.42859; color: var(--k55); }
  thead th, tbody td { padding: 12px 8px; }
  thead th:first-child, tbody td:first-child { padding-left: 16px; }
  thead th:last-child, tbody td:last-child { padding-right: 16px; }
  table { font-size: 14px; }

  .competition-hero { padding: 24px; gap: 16px; }
  .competition-hero + .row { flex-direction: column; align-items: stretch; }
  .competition-hero + .row .flex .button { flex: 1 1 auto; }
  .team-heading { flex-wrap: wrap; gap: 16px; }
  .team-heading .page-actions { width: 100%; }
  .data-pairs { grid-template-columns: 1fr 1fr; }
  .next-strip { flex-direction: column; align-items: stretch; padding: 16px; }
  .league-bottom { flex-direction: column; align-items: stretch; }

  .live-score { gap: 8px; margin: 24px 0; }
  .live-team { font-size: 14px; line-height: 1.28577; }
  .live-score > div:nth-child(2) { max-width: 120px; }
  .live-team .crest.xl { width: 56px; height: 56px; font-size: 17px; border-radius: var(--r-m); }
  .sync-bar { flex-wrap: wrap; }
  .big-score { font-size: 48px; line-height: 1.08349; }
  .clock-display { font-size: 64px; line-height: 1.0625; }
  .timeline li { grid-template-columns: 48px 32px minmax(0, 1fr) auto; padding: 16px; gap: 8px; }
  .event-time-fields { grid-template-columns: 1fr 1fr; }
  .event-time-fields .field:first-child { grid-column: 1 / -1; }
  .record-rosters { grid-template-columns: 1fr; }

  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .button { width: 100%; }
  #toast-region { bottom: 16px; }
  .pay-actions { justify-content: stretch; }
  .pay-actions .button { flex: 1 1 100%; }
  .right-actions { flex-wrap: wrap; justify-content: flex-start; }
  .installments li { grid-template-columns: minmax(0, 1fr) auto; }
  .installments li .badge { grid-column: 1 / -1; justify-self: start; }
  .entry { padding: 48px 0 64px; }
  .entry-lead { font-size: 19px; line-height: 1.4211; letter-spacing: 0.012em; }
  .entry-actions { flex-direction: column-reverse; align-items: stretch; }
  .entry-actions .button { width: 100%; margin-left: 0; }
  .entry-actions .text-link, .entry-actions .small { align-self: center; }
}

/* Por debajo de 375 (los moviles mas estrechos): el bloqueo baja a 28 para que los
   tres iconos sigan cabiendo pasada la curva. 28 de alto son 92 de ancho,
   por encima del minimo de 70 del manual. */
@media (max-width: 374px) {
  :root { --bloqueo: 28px; --bloqueo-ancho: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .app-header, .sidebar, .page-actions, .sync-bar, #toast-region, dialog { display: none !important; }
  .app-layout { padding: 0; }
  .main { padding: 0; max-width: none; }
  thead th { background: var(--negro); color: var(--blanco); print-color-adjust: exact; }
}

/* Inscripción en un paso: los datos del equipo nuevo solo cuando se elige crearlo. */
.new-team { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.new-team legend { padding: 0; margin-bottom: 8px; }
.new-team[hidden] { display: none; }
.notice.danger { background: var(--k4); color: var(--k88); }

/* Escudo con imagen: la imagen entera sobre blanco, sin el color del equipo. */
.crest.image { background: var(--blanco); box-shadow: inset 0 0 0 1px var(--k9); overflow: hidden; }
.crest.image img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.crest-field .crest-picker { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crest-field input[type=file] { min-width: 0; flex: 1; font-size: 14px; }
.crest-field small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.42859; }
.crest-field .check { margin-top: 8px; }

/* Partidos abiertos */
.pickup-list { display: grid; gap: 16px; }
.pickup-card h2 { margin: 4px 0 16px; }
.pickup-card > .pickup-head { align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 0; border-top: 0; }
.pickup-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.pickup-side { background: var(--k2); border-radius: var(--r-m); padding: 16px; min-width: 0; }
.pickup-side h3 { font-size: 17px; margin: 0; }
.pickup-side ol { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.pickup-side li { font-size: 17px; padding: 8px 12px; border-radius: var(--r-s); background: var(--blanco); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickup-side li.me { background: var(--espuma); color: var(--k88); font-weight: 600; }
.pickup-side li.free { background: transparent; color: var(--k55); box-shadow: inset 0 0 0 1px var(--k9); }
.news-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--k9); }
.news-toggle p { margin: 0; }
@media (max-width: 734px) {
  .pickup-sides { grid-template-columns: 1fr; }
  .news-toggle { flex-direction: column; align-items: flex-start; }
}
.pickup-card { padding: 24px; }


/* En directo */
.live-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.33337; font-weight: 600; color: var(--k88); }
.live-label .status-dot { background: var(--identidad); animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-label .status-dot { animation: none; } }
.live-strip { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--r-m); background: var(--k4); color: var(--k88); font-size: 14px; line-height: 1.42859; text-decoration: none; }
.live-strip > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.live-strip:hover { color: var(--k88); background: var(--k9); }
.nav-live { margin-left: auto; background: var(--identidad); }
.live-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.live-card { display: grid; gap: 16px; padding: 24px; color: var(--k88); text-decoration: none; transition: border-color var(--rapido); }
.live-card:hover { color: var(--k88); border-color: var(--k44); }
.live-card-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.live-card-team { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 14px; line-height: 1.28577; font-weight: 600; min-width: 0; }
.live-card-result { font-size: 40px; line-height: 1.1; letter-spacing: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.live-video { display: inline-flex; align-items: center; gap: 4px; color: var(--k55); }
.big-score.flash { animation: gol 2.4s ease-out; }
@keyframes gol { 0%, 40% { transform: scale(1.08); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .big-score.flash { animation: none; } }
#stream-dock { margin-bottom: 24px; }
.stream-card { display: grid; gap: 12px; }
.stream-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-m); overflow: hidden; background: var(--negro); }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-meta { gap: 16px; flex-wrap: wrap; }
@media (max-width: 734px) {
  #stream-dock { margin: -32px -16px 24px; }
  .stream-frame { border-radius: 0; }
  .stream-meta { padding: 0 16px; }
}

/* Descargar app: solo en el movil y mientras no este instalada. El bloque es el de "Proximo partido". */
.install-app, .install-banner { display: none; }
.can-install .install-app { display: flex; width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.can-install:not(.install-dismissed) .install-banner { display: flex; }
.install-banner { position: relative; }
.install-banner > div { padding-right: 32px; }
.install-close { position: absolute; top: 8px; right: 8px; color: var(--k55); }
.install-steps { margin: 0 0 16px; padding-left: 24px; display: grid; gap: 12px; font-size: 17px; line-height: 1.47059; }
.install-steps svg { vertical-align: -3px; }

/* Abierta desde la pantalla de inicio: es la app, no una pestaña de la web. */
.standalone .back-to-web { display: none; }
@media (display-mode: standalone) { .back-to-web { display: none; } }

/* ==========================================================================
   Escala de Apple por rol: escritorio, tableta (hasta 1068) y movil (hasta 734).
   ========================================================================== */
.next-strip .button:not(.primary) { color: var(--acento-fuerte); border-color: var(--acento-fuerte); }
.next-strip .button:not(.primary):hover:not(:disabled) { background: var(--acento-fuerte); color: var(--blanco); }
@media (max-width: 1068px) {
  .league-card h2, .next-strip h2 { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; }
  .stat-value, .competition-stats strong, .report-score b, .live-card-result { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; }
  .big-score { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; }
  .clock-display { font-size: 64px; line-height: 1.0625; letter-spacing: -0.009em; }
  .pay-amount { font-size: 28px; line-height: 1.14286; letter-spacing: 0.007em; }
  .data-pairs dd { font-size: 24px; line-height: 1.16667; letter-spacing: 0.009em; }
}
@media (max-width: 734px) {
  h2 { font-size: 19px; line-height: 1.21053; letter-spacing: 0.012em; }
  .competition-info h1, .team-heading h1 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; }
  .stat-value, .competition-stats strong, .report-score b, .live-card-result { font-size: 28px; line-height: 1.14286; letter-spacing: 0.007em; }
  .big-score { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
  .clock-display { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; }
  .pay-amount { font-size: 24px; line-height: 1.16667; letter-spacing: 0.009em; }
  .data-pairs dd { font-size: 21px; line-height: 1.19048; letter-spacing: 0.011em; }
  /* Todo lo que se pulsa, 44 */
  .tabs button, .tabs a { min-height: 44px; }
  .check { min-height: 44px; align-items: center; }
}
/* Campos de 56, tambien el buscador y el selector de competicion */
.search-field { min-height: 56px; }
.select-filter, #context-competition { min-height: 56px; }
/* La etiqueta enlazada encima del titulo: el camino de vuelta, sin flecha */
.page-label { font-size: 12px; line-height: 1.33337; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.page-label a { color: var(--acento-fuerte); text-decoration: none; }
.page-label a:hover { color: var(--k88); }
.form-error { display: flex; gap: 8px; align-items: flex-start; }
.form-error svg { color: var(--error); flex-shrink: 0; margin-top: 4px; }
.secret-box { display: block; background: var(--k4); border-radius: var(--r-m); padding: 16px; font: inherit; overflow-wrap: anywhere; }
.link-chevron { vertical-align: -2px; margin-left: 2px; }
.entry-privacy .info-icon { color: var(--acento); vertical-align: -2px; margin-right: 4px; }
.form-error[hidden] { display: none; }
/* Tarjetas: la unica excepcion de color de la app, porque el color es la tarjeta */
.activity-icon.tarjeta-yellow svg rect, .activity-icon.tarjeta-second_yellow svg rect { fill: var(--tarjeta-amarilla); stroke: var(--tarjeta-amarilla); }
.activity-icon.tarjeta-red svg rect { fill: var(--tarjeta-roja); stroke: var(--tarjeta-roja); }
.access-choice { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.access-choice legend { font-size: 14px; line-height: 1.42859; font-weight: 600; margin-bottom: 8px; }
.access-password { display: none; }
#modal-form:has(input[name=access][value=password]:checked) .access-password { display: block; }
/* Calendario del organizador: quien arbitra cada partido, o el aviso si falta */
.fixture-referee { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 0 16px; font-size: 14px; line-height: 1.42859; color: var(--k55); white-space: nowrap; }
.fixture-referee svg { flex-shrink: 0; }
@media (max-width: 734px) {
  .card > .row.fixture-admin { flex-wrap: wrap; padding-bottom: 12px; }
  .card > .row.fixture-admin > .grow { flex: 1 1 100%; }
  .card > .row.fixture-admin .fixture-referee { flex: 1 1 auto; }
}
/* Arbitros */
.referee-row { border-top: 1px solid var(--k9); }
.card-head + .referee-row { border-top: 0; }
.referee-row .settings-row { padding: 16px 24px; }
.referee-matches { padding: 0 24px 16px; }
.referee-matches summary { cursor: pointer; font-size: 14px; line-height: 1.42859; color: var(--acento-fuerte); padding: 4px 0 8px; }
.referee-matches .fixture-row { border-top: 1px solid var(--k9); }

/* ==========================================================================
   MODO PARTIDO: el arbitro en el campo. Sin cabecera ni menu, todo a mano.
   ========================================================================== */
.modo-partido .app-header, .modo-partido .sidebar, .modo-partido .sidebar-backdrop, .modo-partido #stream-dock { display: none !important; }
.modo-partido .app-layout { padding: 0; }
.modo-partido .mode-row .button { padding-inline: 12px; }
.modo-partido .main { padding: 16px 16px 48px; max-width: 640px; margin: 0 auto; }
.mode { display: grid; gap: 24px; }
.mode-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.mode-exit { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--k88); text-decoration: none; font-size: 17px; }
.mode-exit:hover { color: var(--acento-fuerte); }
.mode-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.42859; color: var(--k55); }
.mode-board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.mode-team { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 17px; font-weight: 600; min-width: 0; }
.mode-score { font-size: 64px; line-height: 1.0625; letter-spacing: -0.009em; font-weight: 600; font-variant-numeric: tabular-nums; }
.mode-score.flash { animation: gol 2.4s ease-out; }
.mode-clock { text-align: center; font-size: 64px; line-height: 1.0625; letter-spacing: -0.009em; font-weight: 600; font-variant-numeric: tabular-nums; }
.mode-when { text-align: center; font-size: 14px; line-height: 1.42859; color: var(--k55); margin: 0; }
.mode-actions { display: grid; gap: 12px; }
.mode-hint { text-align: center; font-size: 17px; line-height: 1.47059; color: var(--k70); margin: 0; }
.mode-big { width: 100%; min-height: 56px; font-size: 21px; }
.mode-wide { width: 100%; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-row .button { width: 100%; }
.mode-events { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-event { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 96px; border: 0; border-radius: var(--r-m); background: var(--k4); color: var(--k88); font: inherit; font-size: 21px; font-weight: 600; cursor: pointer; }
.mode-event svg { color: var(--acento); }
.mode-event:hover, .mode-event:active { background: var(--k9); }
.mode-event:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }
.mode-more summary { cursor: pointer; font-size: 17px; color: var(--acento-fuerte); padding: 8px 0; }
.mode-more > * + * { margin-top: 12px; }
.mode-recent h2 { font-size: 17px; line-height: 1.23536; margin-bottom: 8px; }
.mode-recent-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--k9); }
.mode-recent-row small { display: block; font-size: 14px; line-height: 1.42859; color: var(--k55); }
.mode-minute { width: 48px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--k55); }
.mode-launch { width: 100%; margin-bottom: 24px; }
@media (max-width: 374px) { .mode-score, .mode-clock { font-size: 48px; } .mode-row { grid-template-columns: 1fr; } }
/* Movil: filas de botones que no caben pasan a la linea siguiente; ningun boton se sale */
@media (max-width: 734px) {
  .referee-secondary-actions { grid-template-columns: 1fr; }
  .button { max-width: 100%; white-space: normal; }
  .right-actions, .page-actions, .flex { flex-wrap: wrap; }
}

/* Registrar un evento: equipo y opciones en botones grandes */
.pick-team, .pick-choice { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.pick-team legend, .pick-choice legend { font-size: 14px; line-height: 1.42859; font-weight: 600; margin-bottom: 8px; }
.pick-team { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick-team legend { grid-column: 1 / -1; }
.pick-team-option { display: grid; justify-items: center; gap: 8px; padding: 16px 12px; border-radius: var(--r-m); background: var(--k4); text-align: center; font-size: 17px; line-height: 1.23536; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 2px transparent; min-width: 0; }
.pick-team-option span { overflow-wrap: anywhere; }
.pick-team-option input, .pick-choice-option input { position: absolute; opacity: 0; pointer-events: none; }
.pick-team-option:has(input:checked) { background: var(--espuma); box-shadow: inset 0 0 0 2px var(--acento); }
.pick-team-option:has(input:focus-visible), .pick-choice-option:has(input:focus-visible) { outline: 2px solid var(--acento); outline-offset: 3px; }
.pick-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-choice legend { width: 100%; }
.pick-choice-option { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 11px 21px; border-radius: var(--r-pildora); background: var(--k4); font-size: 17px; line-height: 1.17648; cursor: pointer; }
.pick-choice-option:has(input:checked) { background: var(--espuma); box-shadow: inset 0 0 0 2px var(--acento); font-weight: 600; }
.pick-choice-option.tarjeta-yellow::before, .pick-choice-option.tarjeta-second_yellow::before, .pick-choice-option.tarjeta-red::before { content: ""; width: 12px; height: 16px; border-radius: 2px; background: var(--tarjeta-amarilla); }
.pick-choice-option.tarjeta-red::before { background: var(--tarjeta-roja); }
.event-auto-time summary { font-size: 17px; }

/* Eventos del partido: los del local a la izquierda y los del visitante a la derecha, en espejo. */
.timeline li.lado-visitante, .mode-recent-row.lado-visitante { direction: rtl; }
.timeline li.lado-visitante > *, .mode-recent-row.lado-visitante > * { direction: ltr; text-align: right; }

/* Cuerpo tecnico del equipo */
.staff-list { display: grid; }
.staff-row { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--k9); }
.staff-row:first-child { border-top: 0; }
.staff-row small { display: block; font-size: 12px; line-height: 1.33337; color: var(--k55); }
.staff-row strong { display: block; font-size: 17px; line-height: 1.23536; font-weight: 600; }

/* Modo partido: el tiempo anadido, un boton grande con − a la izquierda, el numero en medio y + a la derecha */
.mode-added { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: stretch; min-height: 88px; border-radius: var(--r-m); background: var(--k4); overflow: hidden; }
.mode-added-step { border: 0; background: transparent; color: var(--acento); font-size: 40px; line-height: 1; font-weight: 400; cursor: pointer; touch-action: manipulation; }
.mode-added-step:active:not(:disabled) { background: var(--k9); }
.mode-added-step:disabled { color: var(--k44); opacity: 0.4; cursor: default; }
.mode-added-step:focus-visible { outline: 2px solid var(--acento); outline-offset: -4px; }
.mode-added-value { display: grid; place-content: center; text-align: center; gap: 4px; }
.mode-added-value b { font-size: 40px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.mode-added-value small { font-size: 12px; line-height: 1.33337; color: var(--k55); }

/* Plantilla: el contacto bajo el nombre y las acciones de cada ficha */
.roster-contact { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.roster-actions { gap: 8px; justify-content: flex-end; }
.roster-actions .button { padding-inline: 12px; }
.my-role { border: 0; margin: 0 0 16px; padding: 16px; border-radius: var(--r-m); background: var(--k4); min-width: 0; }
.my-role legend { padding: 0 4px; margin-bottom: 8px; }
.my-role[hidden], .my-role-player[hidden], .player-only[hidden] { display: none; }
@media (max-width: 734px) { .roster-actions { justify-content: flex-start; } }

/* Tu plantilla: el alta de todos los jugadores de una vez, fila a fila */
.alta-row { display: grid; grid-template-columns: 28px 56px minmax(0, 2fr) 88px minmax(0, 1.2fr) minmax(0, 1.4fr) 36px; grid-template-areas: 'n f name num pos doc x' 'n f mail mail phone also x'; gap: 12px; align-items: end; padding: 16px 0; border-top: 1px solid var(--k9); }
.alta-row .alta-n { grid-area: n; align-self: center; }
.alta-row .alta-photo { grid-area: f; align-self: center; }
.alta-row .a-name { grid-area: name; }
.alta-row .a-num { grid-area: num; }
.alta-row .a-pos { grid-area: pos; }
.alta-row .a-doc { grid-area: doc; }
.alta-row .a-mail { grid-area: mail; }
.alta-row .a-phone { grid-area: phone; }
.alta-row .a-also { grid-area: also; }
.alta-remove { grid-area: x; align-self: center; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--k9); color: rgba(0, 0, 0, 0.56); cursor: pointer; }
.alta-remove:hover { background: var(--k12); color: rgba(0, 0, 0, 0.72); }
.alta-remove:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.alta-remove svg { display: block; }
.alta-row:first-child { border-top: 0; padding-top: 0; }
.alta-row.alta-staff { grid-template-columns: 96px 56px minmax(0, 2fr) minmax(0, 1.2fr); grid-template-areas: 'n f name doc' 'n f mail phone'; }
.alta-row .field { margin-bottom: 0; }
.alta-row .field > span { white-space: nowrap; }
.alta-n { font-size: 14px; line-height: 1.28577; font-weight: 600; color: var(--k55); padding-bottom: 16px; font-variant-numeric: tabular-nums; }
.alta-row.alta-error { background: var(--espuma); margin: 0 -24px; padding-inline: 24px; }
.alta-actions { justify-content: flex-end; margin-top: 8px; }
@media (max-width: 734px) {
  .alta-row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 36px; grid-template-areas: 'n n n x' 'f name name name' 'num num pos pos' 'doc doc doc doc' 'mail mail mail mail' 'phone phone phone phone' 'also also also also'; padding: 16px 0; }
  .alta-row.alta-staff { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: 'n n' 'f name' 'doc doc' 'mail mail' 'phone phone'; }
  .alta-n { padding-bottom: 0; }
  .alta-actions { flex-direction: column-reverse; }
  .alta-actions .button { width: 100%; }
}

/* Inscribir: elegir el equipo. El nuevo primero, con su +; los demas con buscador. */
.team-search { margin-bottom: 8px; }
.team-picker { display: grid; gap: 4px; padding: 4px; border-radius: var(--r-m); background: var(--k4); }
.team-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: var(--r-s); font-size: 17px; line-height: 1.23536; cursor: pointer; }
.team-option input { position: absolute; opacity: 0; pointer-events: none; }
.team-option:has(input:checked) { background: var(--blanco); box-shadow: inset 0 0 0 2px var(--acento); font-weight: 600; }
.team-option:has(input:focus-visible) { outline: 2px solid var(--acento); outline-offset: -2px; }
.team-option[hidden] { display: none; }
.team-option-plus { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--acento); color: var(--blanco); font-size: 23px; line-height: 1; font-weight: 400; }
.team-none { padding: 8px 12px; }

/* ==========================================================================
   LA VENTANA (manual, "Modal"): la de Apple, una para todo. Caja blanca de 816,
   radio 28, relleno 76 (en movil 64 arriba y 24 a los lados); detras negro al
   48 % con desenfoque de 20. Rotulo 19/27 en 600 y titular 56/60 en 600. El
   cerrar, circulo de 36 en K9 con la X en negro al 56 %, a 20 de la esquina.
   Si no cabe, tipo pagina: 1260 de ancho, 40 arriba y abajo, y la capa se desplaza.
   ========================================================================== */
/* La capa ocupa la ventana y es ella la que se desplaza, como en Apple: la caja no lleva barra propia. */
dialog#modal { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 40px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.48) transparent; }
dialog#modal[open] { display: flex; flex-direction: column; }
dialog#modal::-webkit-scrollbar { width: 8px; }
dialog#modal::-webkit-scrollbar-track { background: transparent; }
dialog#modal::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(255, 255, 255, 0.48); }
.modal-box { position: relative; flex: none; width: min(816px, 100%); margin: auto; padding: 76px; border-radius: 28px; background: var(--blanco); color: var(--k88); box-shadow: var(--sombra); }
dialog#modal.wide .modal-box { width: min(1260px, 100%); }
.modal-close { position: absolute; top: 20px; right: 20px; z-index: 2; display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--k9); color: rgba(0, 0, 0, 0.56); cursor: pointer; }
.modal-close:hover { background: var(--k12); color: rgba(0, 0, 0, 0.72); }
.modal-close:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.modal-head { margin-bottom: 32px; }
.modal-eyebrow { margin: 0 0 8px; font-size: 19px; line-height: 1.4211; letter-spacing: 0.012em; font-weight: 600; color: var(--k88); }
.modal-head h2 { font-size: 56px; line-height: 1.07143; letter-spacing: -0.005em; font-weight: 600; overflow-wrap: anywhere; }
.modal-lead { margin: 0 0 24px; font-size: 19px; line-height: 1.4211; letter-spacing: 0.012em; font-weight: 600; color: var(--k70); }
@media (max-width: 1068px) {
  .modal-head h2 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
}
@media (max-width: 734px) {
  dialog#modal { padding: 40px 0 0; }
  .modal-box, dialog#modal.wide .modal-box { width: 100%; margin: auto 0 0; padding: 64px 24px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; }
  .modal-head { margin-bottom: 24px; }
  .modal-eyebrow { font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; }
  .modal-head h2 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; }
  .modal-lead { font-size: 17px; line-height: 1.47059; letter-spacing: -0.022em; }
}

/* Inscribir: elegir entre crear equipo o uno que ya gestiona. Tarjetas K4 sin borde, radio 12. */
.enroll-choice { display: grid; gap: 12px; }
.enroll-option { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 88px; padding: 20px 24px; border: 0; border-radius: var(--r-m); background: var(--k4); color: var(--k88); font: inherit; text-align: left; cursor: pointer; }
.enroll-option:hover { background: var(--k9); }
.enroll-option:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.enroll-option strong { display: block; font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; font-weight: 600; }
.enroll-option small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.42859; letter-spacing: -0.016em; color: var(--k55); }
.enroll-option > svg { flex: none; color: var(--k44); }
.enroll-option .team-option-plus { width: 40px; height: 40px; }
.team-option-plus svg { display: block; stroke-width: 2.25; }
.enroll-option .enroll-teams { background: var(--k88); }
.enroll-option .crest { flex: none; }
.step-back { display: inline-flex; align-items: center; gap: 4px; margin: -8px 0 24px; padding: 0; border: 0; background: none; font: inherit; font-size: 17px; cursor: pointer; }
.step-back svg { transform: rotate(180deg); }
@media (max-width: 734px) {
  .enroll-option { padding: 16px; min-height: 76px; gap: 12px; }
}

/* Lista de espera (organizador): el puesto delante, en cifras tabulares */
.waitlist-row { cursor: default; }
.waitlist-row:hover { background: none; }
.waitlist-pos { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--k4); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wait-new[hidden] { display: none; }

/* ==========================================================================
   FICHAS: la foto de cada ficha, en circulo como el avatar, o sus iniciales.
   ========================================================================== */
.photo { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--k4); color: var(--k55); font-size: 14px; line-height: 1; font-weight: 600; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.large { width: 56px; height: 56px; font-size: 17px; }
.photo.xl { width: 100%; height: 100%; border-radius: var(--r-m); font-size: 40px; }
.photo.empty svg { display: block; }
.alta-photo { position: relative; display: block; width: 56px; height: 56px; cursor: pointer; }
.alta-photo .photo { width: 56px; height: 56px; }
.alta-photo input, .photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.alta-photo:hover .photo.empty, .photo-picker:hover .photo.empty { background: var(--k9); }
.alta-photo:has(input:focus-visible), .photo-picker:has(input:focus-visible) { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 50%; }
.photo-picker { position: relative; display: inline-block; width: 56px; height: 56px; cursor: pointer; }
.photo-field small { display: block; }
.member-row { cursor: default; }
.member-row:hover { background: none; }
.member-row .button { flex: none; }

/* Mi ficha: la tarjeta de licencia. Tarjeta K4 sin borde, radio 12, foto 3:4 a la izquierda. */
.license { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 32px; padding: 32px; border-radius: var(--r-m); background: var(--k4); }
.license-photo { aspect-ratio: 3 / 4; border-radius: var(--r-m); overflow: hidden; background: var(--blanco); }
.license-photo .photo.xl { background: var(--blanco); }
.license-team { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.28577; letter-spacing: -0.016em; font-weight: 600; color: var(--k70); }
.license h2 { margin: 8px 0 24px; font-size: 40px; line-height: 1.1; letter-spacing: 0; }
.license-data { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 24px; margin: 0 0 16px; }
.license-data dt { font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; color: var(--k55); }
.license-data dd { margin: 4px 0 0; font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; font-weight: 600; font-variant-numeric: tabular-nums; }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card-stats { margin: 16px 0 48px; }
@media (max-width: 1068px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 734px) {
  .license { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .license-photo { width: 144px; }
  .license h2 { font-size: 28px; line-height: 1.14286; margin-bottom: 16px; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fichas para el arbitro: los dos equipos, cada ficha con su foto y su documento */
.id-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.id-team h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 21px; line-height: 1.19048; }
.id-team h3 .small { margin-left: auto; font-weight: 400; }
.id-team h4 { margin: 24px 0 8px; }
.id-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.id-card { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--r-m); background: var(--k4); }
.id-card .grow { display: grid; gap: 2px; min-width: 0; }
.id-card strong { font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; }
.id-number { display: inline-block; min-width: 28px; margin-right: 8px; font-variant-numeric: tabular-nums; color: var(--k55); }
.id-doc { font-size: 14px; line-height: 1.28577; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.id-missing { justify-self: start; padding: 2px 8px; border-radius: 980px; background: var(--blanco); font-size: 12px; line-height: 1.33337; font-weight: 600; color: var(--k88); }
@media (max-width: 734px) { .id-teams { grid-template-columns: 1fr; gap: 24px; } }
.id-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.card-head h2 .muted { font-weight: 400; }
