/* Estilos de cada pantalla. */

/* =========================================================
   1. ESTADIO (paneles como Economía)
   ========================================================= */
.stadium { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; }
.stadium__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stadium__head h2 { margin: 0; font-size: clamp(18px, 4vh, 28px); }
.stadium__chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stadium__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; align-items: stretch; }
.stadium__col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.stadium__view { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.stadium__art { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; border-radius: 14px; background: radial-gradient(ellipse at 50% 30%, #1d4fb8, #0a2160 80%); box-shadow: inset 0 0 0 2px rgba(99, 194, 255, 0.35); }
.stadium__art svg { display: block; width: 100%; height: 100%; max-height: 100%; }
.stadium__level { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stadium__name { display: flex; flex-direction: column; }
.stadium__name b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--yellow); }
.stadium__fixture { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; font-family: var(--font-display); font-size: 1.1rem; }
.stadium__fixture b { color: var(--pink); font-weight: 400; }
.stadium__match p { margin: 0; text-align: center; }
.stadium__prices { display: flex; flex-direction: column; gap: 4px; }
.stadium__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.stadium__facts li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; border-radius: 10px; background: rgba(7, 26, 69, 0.45); font-size: 0.85rem; }
.stadium__facts span { color: var(--muted); }
.stadium__facts b { color: #fff; font-weight: 600; text-align: right; }
.stadium__estimate { margin: 0 0 6px; font-size: 0.85rem; }
.stadium__prices .btn { margin-top: auto; }
.stadium__live { padding: 0 6px; border-radius: 6px; background: var(--red); color: #fff; text-decoration: none; }
.pips { display: flex; gap: 6px; }
.pip { width: 26px; height: 10px; border-radius: 5px; background: #ffffff22; }
.pip.is-on { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
@media (max-width: 760px), (max-height: 500px), (orientation: portrait) {
  .stadium__body { grid-template-columns: 1fr; flex: none; }
  .stadium__view, .stadium__col { flex: none; }
  .stadium__art { flex: none; }
  .stadium__art svg { height: auto; max-height: 52vh; }
}
@media (max-height: 500px) {
  .stadium__art svg { max-height: 36vh; }
}

/* Informe semanal / resultado */
.report__match {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #0b0f33;
  text-align: center;
  font-weight: 600;
}
.report__match b { font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: var(--yellow); }
.report__match em { grid-column: 1 / -1; font-style: normal; font-family: var(--font-display); letter-spacing: 1px; }
.report__match--win em { color: var(--green); }
.report__match--loss em { color: #ff7b84; }
.report__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report__list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.report__list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.report__season { font-weight: 600; color: var(--yellow); }

/* =========================================================
   2. LA PIZARRA
   ========================================================= */
.tactics {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 8px 56px 8px 12px;
  background: radial-gradient(ellipse at 50% 0%, #1d2a74, var(--bg) 70%);
}
.tactics__bar { display: flex; gap: 8px; flex-wrap: wrap; }

.pitch {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.12), transparent 70%),
    repeating-linear-gradient(90deg, #36c94f 0 10%, #2db345 10% 20%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.2), 0 6px 0 #0a3d17;
  container-type: size;
}
.pitch__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.slot {
  --card-h: calc(min(21cqh, 120px) * var(--k, 1)); /* --k: más pequeño si hay 5 en una línea */
  position: absolute;
  left: calc(var(--x) * 1%); /* 4-3-3 atacando a la derecha (en vertical, hacia arriba: ver portrait.css) */
  top: calc(var(--y) * 1%);
  width: calc(var(--card-h) * 0.72);
  height: var(--card-h);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: calc(var(--card-h) * 0.08);
}
.slot > .card { position: relative; z-index: 1; }
.slot__empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--font-display);
  font-size: calc(var(--card-h) * 0.35);
  color: rgba(255, 255, 255, 0.7);
}
.slot__label {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  transform: translate(-50%, -55%);
  padding: 0 0.5em;
  border-radius: 999px;
  background: rgba(8, 20, 12, 0.8);
  font-size: max(9px, calc(var(--card-h) * 0.12));
  font-weight: 600;
  pointer-events: none;
}
.slot--training::before {
  content: '';
  position: absolute;
  inset: -9%;
  z-index: 0;
  border-radius: calc(var(--card-h) * 0.14);
  background: rgba(124, 246, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(190, 252, 255, 0.9), 0 0 18px 8px rgba(124, 246, 255, 0.75);
  animation: halo 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes halo { 50% { opacity: 0.55; box-shadow: 0 0 0 2px rgba(190, 252, 255, 0.6), 0 0 8px 3px rgba(124, 246, 255, 0.5); } }
.slot.is-drop-target { outline: 3px solid var(--yellow); outline-offset: 5px; }

.bench {
  --card-h: clamp(62px, 17vh, 112px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 16px;
  background: rgba(11, 14, 42, 0.8);
  box-shadow: inset 0 0 0 2px var(--line);
  transition: box-shadow 0.15s;
}
.bench.is-drop-target { box-shadow: inset 0 0 0 3px var(--yellow); }
.bench__track {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
  min-height: calc(var(--card-h) + 8px);
  align-items: center;
}
.bench__nav { flex: none; width: 34px; height: 60%; border: 0; border-radius: 10px; background: #ffffff14; font-size: 22px; cursor: pointer; }
.bench__empty { margin: 0 auto; color: var(--muted); }

.drawer {
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  z-index: 40;
  display: flex;
  width: min(320px, 85%);
  transform: translateX(calc(100% - 46px));
  transition: transform 0.3s cubic-bezier(0.2, 1.1, 0.4, 1);
}
.drawer.is-open { transform: none; }
.drawer__tab {
  flex: none;
  align-self: center;
  width: 46px;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  font-size: 20px;
  cursor: pointer;
  box-shadow: -4px 4px 0 rgba(0, 0, 0, 0.3);
}
.drawer__tab span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-size: 14px; }
.drawer__body {
  flex: 1;
  overflow: auto;
  padding: 14px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: inset 0 0 0 2px #ffffff22;
}
.opt-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: #ffffff10;
  text-align: left;
  cursor: pointer;
}
.opt small { display: block; color: var(--muted); font-size: 0.75rem; }
.opt__icon { font-size: 22px; }
.opt.is-active { background: linear-gradient(90deg, rgba(255, 210, 63, 0.25), rgba(255, 210, 63, 0.08)); box-shadow: inset 0 0 0 2px var(--yellow); }

/* =========================================================
   3. GIMNASIO (entrenamiento individual)
   ========================================================= */
.gym {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr;
  gap: 14px;
  padding: 12px;
  background: radial-gradient(circle at 70% 30%, #26338a, #0f1440 70%);
}
.gym__list { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.gym__list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 6px; }
.gym__list-head h2 { margin: 0; font-size: 1.2rem; }
.gym__list-head .chip { cursor: pointer; border: 0; color: var(--text); font-size: 0.75rem; }
.gym__rows { flex: 1; overflow: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.gym-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: #ffffff0d;
  text-align: left;
  cursor: pointer;
}
.gym-row:hover { background: #ffffff1a; }
.gym-row.is-selected { background: linear-gradient(90deg, rgba(255, 61, 139, 0.45), rgba(163, 92, 255, 0.25)); box-shadow: inset 0 0 0 2px var(--pink); }
.gym-row.is-bench { opacity: 0.7; }
.gym-row__face { font-size: 22px; }
.gym-row__name { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gym-row__name small { display: block; color: var(--muted); font-weight: 400; font-size: 0.72rem; }
.gym-row__focus { font-size: 18px; }
.gym-row__pts { font-family: var(--font-display); color: var(--yellow); font-size: 0.9rem; min-width: 2.6em; text-align: right; }
.gym-row__pts.is-empty, .pts-cell.is-empty { color: #6f769f; }
.gym-row__arrow { position: absolute; top: 2px; left: 4px; color: #14ff6a; font-size: 10px; text-shadow: 0 0 6px #14ff6a; animation: arrow-blink 1s ease-in-out infinite; }

.gym__detail {
  --card-h: clamp(150px, 46vh, 280px);
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 18px;
  padding: 6px;
}
.gym__card { position: sticky; top: 0; padding-top: 10px; }
.gym__card .card { cursor: default; }
.gym__info h2 { margin-bottom: 0.1em; font-size: clamp(18px, 4vh, 26px); }
.gym__info h3 { margin-top: 14px; font-size: 1rem; }

.potential { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 210, 63, 0.08); box-shadow: inset 0 0 0 2px rgba(255, 210, 63, 0.35); }
.potential__head { display: flex; justify-content: space-between; font-weight: 600; }
.potential__head b { font-family: var(--font-display); font-weight: 400; color: var(--yellow); font-size: 1.2rem; }
.potential__track { height: 8px; margin: 6px 0; border-radius: 4px; background: #ffffff18; overflow: hidden; }
.potential__track i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--yellow)); box-shadow: 0 0 10px var(--yellow); }

.focus-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.focus-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
}
/* El aspecto (colores, relieve) viene de .btn: verde el elegido, azul (.btn--ghost) los demás */
.focus-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.focus-btn__icon { font-size: clamp(24px, 6vh, 38px); }
.focus-btn__name { font-family: var(--font-display); font-size: clamp(11px, 2.2vh, 14px); }
.focus-btn__star { position: absolute; top: 4px; right: 8px; color: var(--yellow); font-size: 12px; }

/* Barras de estadísticas (gimnasio, ojeo) */
.stat-bars { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stat-bar { display: grid; grid-template-columns: 8.5em 1fr 2.4em; align-items: center; gap: 8px; font-size: 0.88rem; }
.stat-bar__track { height: 12px; border-radius: 6px; background: #ffffff14; overflow: hidden; }
.stat-bar__track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4f6bff, var(--cyan)); }
.stat-bar.is-primary .stat-bar__label::after { content: ' ★'; color: var(--yellow); }
.stat-bar.is-focus .stat-bar__track i { background: linear-gradient(90deg, #1f9d55, var(--green)); box-shadow: 0 0 10px rgba(61, 255, 122, 0.6); }
.stat-bar.is-focus .stat-bar__label { color: var(--green); font-weight: 600; }
.stat-bar__value { font-family: var(--font-display); font-weight: 400; text-align: right; }
.stat-bars--compact { gap: 3px; margin-bottom: 8px; }
.stat-bars--compact .stat-bar { grid-template-columns: 4.5em 1fr 2em; font-size: 0.78rem; }
.stat-bars--compact .stat-bar__track { height: 8px; }

/* Fichas de estadísticas (mercado) y mejoras (informe) */
.stat-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 3px 0; font-size: 0.82rem; }
.stat-chips b { margin-left: 2px; font-family: var(--font-display); font-weight: 400; color: var(--cyan); }
.stat-ups { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.stat-up { padding: 2px 8px; border-radius: 999px; background: rgba(61, 255, 122, 0.14); font-size: 0.78rem; }
.stat-up b { color: var(--green); }
.stat-up small { color: var(--yellow); }

.empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }

@media (max-width: 900px), (max-height: 460px) {
  .gym { grid-template-columns: minmax(180px, 32%) 1fr; gap: 8px; padding: 8px; }
  .gym__detail { --card-h: clamp(110px, 40vh, 200px); gap: 10px; }
  .stat-bar { grid-template-columns: 6.5em 1fr 2em; font-size: 0.78rem; }
  .focus-btn { padding: 6px 2px; }
}

/* =========================================================
   PLANTILLA (tabla de estadísticas)
   ========================================================= */
.squad { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: radial-gradient(ellipse at 30% 0%, #26338a, var(--bg) 70%); }
.squad__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.squad__head h2 { margin: 0 8px 0 0; font-size: clamp(18px, 4vh, 26px); }
.squad__table { flex: 1; min-height: 0; overflow: auto; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.squad-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.squad-table th { position: sticky; top: 0; z-index: 1; padding: 8px 6px; background: #161c55; color: var(--muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.squad-table th small { display: block; font-size: 0.65rem; }
.squad-table th.sortable { cursor: pointer; user-select: none; }
.squad-table th.sortable:hover, .squad-table th.is-sorted { color: var(--text); }
.squad-table td { padding: 6px; text-align: center; border-top: 1px solid #ffffff10; white-space: nowrap; }
.squad-table tbody tr { cursor: pointer; }
.squad-table tbody tr:hover td { background: #ffffff0f; }
.squad-table tr.is-starter .squad-name { color: #fff; }
.squad-name { display: flex; align-items: center; gap: 8px; text-align: left !important; font-weight: 600; }
.squad-name small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.squad-face { font-size: 22px; }
.lvl { display: inline-block; min-width: 2.2em; padding: 2px 6px; border-radius: 8px; font-family: var(--font-display); color: #1b1030; }
.lvl--bronze { background: linear-gradient(160deg, #f3ad6b, #8a4b1c); }
.lvl--silver { background: linear-gradient(160deg, #fff, #8796ad); }
.lvl--gold { background: linear-gradient(160deg, #fff3a6, #d08f00); }
.lvl--platinum { background: linear-gradient(160deg, #4d9dff, #0a2370); color: #fff; box-shadow: 0 0 8px rgba(70, 150, 255, 0.85); }
.lvl--diamond { background: linear-gradient(160deg, #6a3df0, #0d1d55); color: #fff; box-shadow: 0 0 8px rgba(110, 225, 255, 0.9); }
.stat-cell { font-family: var(--font-display); color: hsl(var(--h) 85% 62%); }
.stat-cell.is-primary { background: rgba(255, 255, 255, 0.04); }
.stat-cell.is-focus { box-shadow: inset 0 -3px 0 var(--green); }
.pts-cell { font-family: var(--font-display); color: var(--yellow); }

@media (max-width: 900px), (max-height: 460px) {
  .squad { padding: 8px; }
  .squad-table td, .squad-table th { padding: 4px 3px; }
  .squad-face { display: none; }
}

/* =========================================================
   4. RED DE OJEADORES
   ========================================================= */
.scouting { position: absolute; inset: 0; overflow: hidden; }
.scouting.is-traveling .scouting__catalog { opacity: 0.12; pointer-events: none; transition: opacity 0.35s; }
.scouting__catalog {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
}
.scouting__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scouting__head h2 { margin: 0; font-size: clamp(18px, 4vh, 28px); }
.scouting__chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scouting__intro { margin: -4px 0 0; font-size: 0.88rem; }
.scout-cards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.scout-card { display: flex; flex-direction: column; gap: 10px; }
.scout-card.is-locked { filter: saturate(0.5) brightness(0.85); }
.scout-card__top { display: flex; align-items: center; gap: 12px; }
.scout-card__top h3 { margin: 0 0 2px; font-size: 1.1rem; }
.scout-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  font-size: 34px;
  line-height: 0;
  border: 3px solid var(--tile-edge);
  border-radius: 14px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.22) 44%, transparent 45%),
    linear-gradient(180deg, var(--tile-a) 0%, var(--tile-b) 50%, var(--tile-c) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 3px 0 var(--tile-edge);
}
.scout-card__stars { color: var(--yellow); letter-spacing: 2px; font-size: 1rem; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); }
.scout-card__stars i { font-style: normal; color: #ffffff30; }
.scout-card__blurb { margin: 0; font-size: 0.85rem; color: var(--muted); }
.scout-card__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.scout-card__facts li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; border-radius: 10px; background: rgba(7, 26, 69, 0.45); font-size: 0.82rem; }
.scout-card__facts span { color: var(--muted); }
.scout-card__facts b { color: #fff; font-weight: 600; white-space: nowrap; }
.scout-card__buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.scout-card__price { display: flex; flex-direction: column; font-family: var(--font-display); font-size: 1.35rem; color: var(--green); line-height: 1.1; }
.scout-card__price small { font-family: var(--font-body); font-size: 0.7rem; color: var(--muted); }
@media (max-width: 860px), (max-height: 500px) {
  .scout-cards { grid-template-columns: 1fr; flex: none; }
}

.scouting__fx { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.scouting__fx.is-active { pointer-events: auto; }

/* Viaje: avión o furgoneta */
.fx-trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-trail path {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 3;
  stroke-dasharray: 1; /* con pathLength=1: se "dibuja" de 0 a 1 */
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px var(--yellow));
  animation: trail 2s ease-in-out forwards;
}
@keyframes trail { to { stroke-dashoffset: 0; } }
.fx-plane {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  transform: translate(-50%, -50%);
  font-size: clamp(28px, 7vh, 48px);
  animation: fly 2s ease-in-out forwards;
}
.fx-plane span { display: inline-block; animation: arc 2s ease-in-out forwards; filter: drop-shadow(0 0 10px #fff); }
@keyframes fly { to { left: var(--tx); top: var(--ty); } }
@keyframes arc { 50% { transform: translateY(-12vh) scale(1.4); } 100% { transform: scale(0.6); } }
.fx-road { position: absolute; left: 0; right: 0; bottom: 8%; height: 8%; background: repeating-linear-gradient(90deg, var(--yellow) 0 30px, transparent 30px 60px) center / 100% 3px no-repeat, #1b1f45; box-shadow: 0 0 20px rgba(255, 210, 63, 0.3); }
.fx-van { position: absolute; bottom: 9%; right: -10%; font-size: clamp(34px, 9vh, 60px); animation: drive 2.1s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
.fx-van span { display: inline-block; animation: bounce-van 0.25s ease-in-out infinite; }
@keyframes drive { to { right: 60%; } }
@keyframes bounce-van { 50% { transform: translateY(-3px); } }

/* Expediente y revelación */
.reveal { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: rgba(4, 6, 30, 0.78); backdrop-filter: blur(3px); animation: fade-in 0.3s; }
.reveal > * { grid-area: 1 / 1; }
.reveal__rays {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 150vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 210, 63, 0.22) 0 8deg, transparent 8deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 60%);
  mask-image: radial-gradient(circle, #000 10%, transparent 60%);
  animation: spin 14s linear infinite, fade-in 0.8s 1s both;
}
.reveal__folder { position: relative; width: clamp(200px, 32vw, 300px); aspect-ratio: 3 / 2; perspective: 900px; animation: pop-in 0.4s both, folder-out 0.5s 1.3s forwards; }
.reveal__folder-back, .reveal__folder-cover { position: absolute; inset: 0; border-radius: 6px 16px 16px 16px; }
.reveal__folder-back { background: #c9a254; box-shadow: 0 10px 0 #8c6a26; }
.reveal__folder-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f6dc9c, #dcb468);
  color: #3b2a0a;
  font-family: var(--font-display);
  font-size: 1.6rem;
  transform-origin: top;
  animation: cover-open 0.6s 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.reveal__folder-cover small { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; }
.reveal__stamp {
  position: absolute;
  z-index: 2;
  top: 12%;
  right: -8%;
  padding: 2px 10px;
  border: 3px solid #e0142a;
  border-radius: 6px;
  color: #e0142a;
  font-family: var(--font-display);
  transform: rotate(14deg);
  animation: stamp 0.35s 0.2s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes cover-open { to { transform: rotateX(-165deg); filter: brightness(0.6); } }
@keyframes stamp { from { transform: rotate(14deg) scale(3); opacity: 0; } }
@keyframes folder-out { to { transform: translateY(45%) scale(0.8); opacity: 0.25; } }

.reveal__card {
  --card-h: clamp(170px, 55vh, 320px);
  position: relative;
  z-index: 2;
  width: calc(var(--card-h) * 0.72);
  height: var(--card-h);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: card-shoot 0.75s 1.05s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes card-shoot { from { transform: translateY(35%) scale(0.1) rotate(-35deg); opacity: 0; } }
.flip { perspective: 1000px; }
.flip__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 1.4, 0.5, 1); }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__face .card { cursor: pointer; }
.flip__back .card { animation: back-pulse 1.4s ease-in-out infinite; }
@keyframes back-pulse { 50% { box-shadow: inset 0 0 0 4px var(--yellow), 0 0 50px rgba(255, 210, 63, 0.9); } }
.flip__front { transform: rotateY(180deg); }
.reveal__hint { align-self: end; margin-bottom: 5%; font-family: var(--font-display); font-size: 1.1rem; animation: blink 1.4s ease-in-out infinite; }
.reveal__info {
  z-index: 3;
  justify-self: end;
  width: min(34%, 340px);
  margin-right: 4%;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: inset 0 0 0 2px #ffffff22, 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: pop-in 0.35s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.reveal__info p { font-size: 0.9rem; }
.reveal__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* =========================================================
   5. MERCADO
   ========================================================= */
.market {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(rgba(34, 227, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(34, 227, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 100%,
    radial-gradient(ellipse at 50% 45%, #1d2a74, #070a26 70%);
}
.ticker { overflow: hidden; white-space: nowrap; padding: 5px 0; background: #000a; border-bottom: 2px solid #ffffff14; font-family: ui-monospace, 'Consolas', monospace; font-size: 13px; }
.ticker__track { display: inline-flex; gap: 32px; padding-left: 100%; animation: ticker 45s linear infinite; }
.ticker .pos { color: var(--green); }
.ticker .flat { color: var(--muted); }
@keyframes ticker { to { transform: translateX(-100%); } }

.coverflow { position: relative; min-height: 0; perspective: 1100px; }
.cf-stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.cf-item {
  --card-h: clamp(130px, 44vh, 290px);
  position: absolute;
  left: 50%;
  top: 52%;
  cursor: pointer;
  transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.1), opacity 0.4s;
}
.cf-item .card { cursor: pointer; }
.cf-item.is-selected .card { box-shadow: 0 0 0 3px #fff, 0 0 40px rgba(255, 210, 63, 0.65); }
.cf-timer {
  position: absolute;
  z-index: 3;
  top: calc(var(--card-h) * -0.06);
  right: calc(var(--card-h) * -0.08);
  padding: 0.25em 0.7em;
  border-radius: 999px;
  background: #0b0f33;
  box-shadow: inset 0 0 0 2px #ffffff40;
  font-family: var(--font-display);
  font-size: max(11px, calc(var(--card-h) * 0.07));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  animation: blink 2s ease-in-out infinite;
}
.cf-item.is-urgent .cf-timer { background: var(--red); animation: blink 0.6s steps(2) infinite; }
.cf-item.is-extended .cf-timer { background: var(--orange); color: #2b1300; animation: extend-flash 0.5s ease-out 3; }
.cf-item.is-extended .cf-timer::after {
  content: '+3:00';
  position: absolute;
  right: 0;
  top: -1.3em;
  color: var(--orange);
  text-shadow: 0 0 10px var(--orange);
  animation: float-up 1.6s ease-out forwards;
}
@keyframes extend-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 154, 31, 0.9); transform: scale(1.3); } 100% { box-shadow: 0 0 0 18px rgba(255, 154, 31, 0); } }
@keyframes float-up { to { transform: translateY(-20px); opacity: 0; } }
.cf-ribbon {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(var(--card-h) * -0.07);
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #003314;
  font-family: var(--font-display);
  font-size: max(10px, calc(var(--card-h) * 0.055));
  white-space: nowrap;
}
.cf-nav {
  position: absolute;
  z-index: 20;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #ffffff1c;
  font-size: 26px;
  cursor: pointer;
}
.cf-nav--prev { left: 16px; }
.cf-nav--next { right: 16px; }

.bidbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px 20px 14px;
  background: linear-gradient(0deg, #070a26 30%, transparent);
}
.bidbar__name { font-family: var(--font-display); font-size: clamp(15px, 3.2vh, 22px); }
.bidbar__info .muted { font-size: 0.78rem; }
.bidbar__current { margin-top: 2px; }
.bidbar__current b { font-family: var(--font-display); font-weight: 400; font-size: 1.2em; color: var(--yellow); }
.btn-bid {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px clamp(26px, 5vw, 56px);
  border: 0;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 25%, #ff7a82, #e0142a);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(20px, 4.8vh, 32px);
  line-height: 1.05;
  cursor: pointer;
  box-shadow: 0 7px 0 #8a0a18, 0 0 30px rgba(255, 59, 71, 0.55);
  animation: bid-pulse 1.6s ease-in-out infinite;
  transition: transform 0.08s;
}
.btn-bid b { font-weight: 400; font-size: 0.7em; }
.btn-bid:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 #8a0a18; }
.btn-bid:disabled { background: linear-gradient(180deg, #2bc46c, #1f9d55); box-shadow: 0 7px 0 #0c5a2e; animation: none; cursor: default; }
@keyframes bid-pulse { 50% { box-shadow: 0 7px 0 #8a0a18, 0 0 46px rgba(255, 59, 71, 0.9); } }
.bidbar__wage { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.bidbar__wage b { font-family: var(--font-display); font-weight: 400; font-size: clamp(15px, 3vh, 20px); }
.bidbar__wage b small { font-family: var(--font-body); font-size: 0.6em; color: var(--muted); }
.bidbar__wage > small { font-size: 0.75rem; }

@media (max-height: 420px) {
  .bidbar__info .muted, .bidbar__wage > small { display: none; }
}

/* Fin de temporada (dentro del informe) */
.season-end { margin-top: 12px; padding: 14px; border-radius: 16px; text-align: center; background: #0b0f33; box-shadow: inset 0 0 0 2px var(--line); }
.season-end__badge { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 6px; animation: pop-in 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.season-end--promotion { box-shadow: inset 0 0 0 3px var(--green), 0 0 26px rgba(61, 255, 122, 0.35); }
.season-end--promotion .season-end__badge { color: var(--green); text-shadow: 0 0 14px var(--green); }
.season-end--relegation { box-shadow: inset 0 0 0 3px var(--red), 0 0 26px rgba(255, 59, 71, 0.35); }
.season-end--relegation .season-end__badge { color: #ff7b84; }
.report__results li { justify-content: flex-start; }
.report__results .tag { margin-left: auto; }

/* =========================================================
   6. LIGA
   ========================================================= */
.league {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 32%);
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: radial-gradient(ellipse at 30% 0%, #26338a, var(--bg) 70%);
}
.league__head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.league__title { flex: 1; min-width: 200px; }
.league__title h2 { margin: 0; font-size: clamp(18px, 4vh, 28px); display: flex; align-items: center; gap: 8px; }
.league__progress { height: 6px; margin-top: 6px; border-radius: 3px; background: #ffffff18; overflow: hidden; max-width: 360px; }
.league__progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.league__nav { width: 40px; height: 40px; border: 0; border-radius: 12px; background: #ffffff18; font-size: 16px; cursor: pointer; }
.league__nav:disabled { opacity: 0.3; cursor: default; }
.league__legend { display: flex; gap: 8px; }
.zone { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.zone--promotion { background: rgba(61, 255, 122, 0.18); color: var(--green); }
.zone--relegation { background: rgba(255, 59, 71, 0.18); color: #ff7b84; }
.zone--champion { background: rgba(255, 210, 63, 0.2); color: var(--yellow); }
.zone--playoff { background: rgba(255, 159, 67, 0.2); color: var(--orange); }
.standings .zone { white-space: nowrap; }
.league__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-picker { display: flex; align-items: center; gap: 6px; }
.group-picker .league__nav { width: 34px; height: 34px; }
.group-picker select {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #161c55;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--line);
}
.group-picker .btn { padding: 6px 12px; font-size: 0.82rem; }
.link-btn { padding: 2px 6px; border: 0; border-radius: 6px; background: #ffffff14; color: var(--cyan); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { background: #ffffff24; }
.playoffs { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.playoff-block h3 { font-size: 1rem; margin-bottom: 6px; }
.playoff--home .fx-team:not(.fx-team--away), .playoff--away .fx-team--away { color: var(--green); font-weight: 600; }

.league__table { min-height: 0; overflow: auto; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings th { position: sticky; top: 0; z-index: 1; padding: 10px 6px; background: #161c55; color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.standings td { padding: 8px 6px; text-align: center; border-top: 1px solid #ffffff10; }
.standings .team-col { text-align: left; width: 100%; white-space: nowrap; font-weight: 600; }
.team-crest { display: inline-block; width: 1.6em; text-align: center; margin-right: 6px; }
.standings .pts { font-family: var(--font-display); font-size: 1.15rem; color: var(--yellow); }
.standings tr.is-me td { background: linear-gradient(90deg, rgba(255, 61, 139, 0.32), rgba(163, 92, 255, 0.18)); }
.standings tr.is-me .team-col { color: #fff; }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #ffffff14; font-family: var(--font-display); }
.rank--promotion { background: var(--green); color: #fff; text-shadow: 0 1px 2px rgba(0, 40, 10, 0.7); }
.rank--relegation { background: var(--red); color: #fff; }
.rank--champion { background: var(--yellow); color: #fff; text-shadow: 0 1px 2px rgba(80, 50, 0, 0.8); box-shadow: 0 0 12px var(--yellow); }
.rank--playoff { background: var(--orange); color: #fff; text-shadow: 0 1px 2px rgba(60, 25, 0, 0.7); }
.form { white-space: nowrap; }
.form-dot { display: inline-block; width: 10px; height: 10px; margin: 0 2px; border-radius: 50%; }
.form-dot--w { background: var(--green); }
.form-dot--d { background: #8d93b8; }
.form-dot--l { background: var(--red); }

.league__side { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.league__side section { padding: 12px; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.league__side h3 { font-size: 1rem; }
.fixtures { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fixtures li { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 0.82rem; }
.fixtures li.is-me { background: rgba(255, 61, 139, 0.25); box-shadow: inset 0 0 0 2px rgba(255, 61, 139, 0.6); }
.fixtures b { font-family: var(--font-display); font-weight: 400; color: var(--yellow); white-space: nowrap; }
.fx-team { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-team--away { text-align: right; }

@media (max-width: 900px), (max-height: 460px) {
  .league { grid-template-columns: 1fr minmax(200px, 38%); gap: 8px; padding: 8px; }
  .standings td, .standings th { padding: 5px 4px; }
  .hide-sm { display: none; }
}
.stat-bar--potential .stat-bar__track i { background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.stat-bar--potential .stat-bar__value { color: var(--yellow); }
.squad__section { margin: 12px 12px 4px; font-size: 1rem; }
.squad__section:first-child { margin-top: 10px; }
.squad-table + .squad__section { margin-top: 18px; }
.squad-table th { top: 0; }

/* Enlaces a equipos */
.team-link { color: inherit; text-decoration: none; border-bottom: 1px dashed transparent; transition: color 0.15s, border-color 0.15s; }
.team-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.rival { color: inherit; text-decoration: none; border-radius: 999px; padding: 2px 8px 2px 2px; transition: background 0.15s; }
.rival:hover { background: #ffffff1a; }
.standings tr.is-highlight td { background: linear-gradient(90deg, rgba(34, 227, 255, 0.28), rgba(34, 227, 255, 0.08)); }
.standings tr.is-highlight .team-col { color: #fff; }

/* =========================================================
   FICHA DE EQUIPO (rival)
   ========================================================= */
.team-view {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: radial-gradient(ellipse at 30% 0%, #1f3d7a, var(--bg) 70%);
}
.team-view__head { display: flex; align-items: center; gap: 12px; }
.team-view__crest {
  width: clamp(48px, 11vh, 68px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 30% 30% 50% 50%;
  background: linear-gradient(135deg, var(--cyan), #2a3dbd);
  box-shadow: inset 0 0 0 3px #ffffff66, 0 3px 0 #0007;
  font-size: clamp(26px, 6vh, 38px);
}
.team-view__title h2 { margin: 0 0 4px; font-size: clamp(18px, 4vh, 28px); }
.team-view__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; }
.tab {
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: #ffffff12;
  font-family: var(--font-display);
  font-size: 0.95rem;
  cursor: pointer;
}
.tab:hover { background: #ffffff20; }
.tab.is-active { background: linear-gradient(90deg, var(--cyan), #2a7bff); color: #04122e; box-shadow: 0 4px 0 #0007; }
.team-view__body { min-height: 0; overflow: auto; }

.team-complex { display: grid; grid-template-columns: 1fr minmax(220px, 30%); gap: 12px; height: 100%; }
.team-complex__scene {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 18px;
  background:
    repeating-linear-gradient(26.565deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 54px),
    repeating-linear-gradient(-26.565deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 54px),
    linear-gradient(180deg, #5b2a9e 0%, #ff6f91 14%, #57c763 14.2%, #2f9443 100%);
  box-shadow: inset 0 0 0 3px #ffffff22;
}
.team-complex__stadium { position: absolute; left: 50%; top: 52%; width: min(72%, 130vh); transform: translate(-50%, -50%); }
.team-complex__stadium svg, .team-complex__clinic svg, .team-complex__scout svg, .team-complex__tree svg { display: block; width: 100%; }
.team-complex__clinic { position: absolute; left: 3%; top: 10%; width: 16%; }
.team-complex__scout { position: absolute; right: 3%; top: 4%; width: 13%; }
.team-complex__tree { position: absolute; width: 5%; }
.team-complex__info { display: flex; flex-direction: column; gap: 10px; }
.info-card { padding: 12px; border-radius: 16px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.info-card h3 { font-size: 1rem; }
.info-card p { margin: 4px 0 0; font-size: 0.88rem; }

.team-league { display: grid; grid-template-columns: 1fr minmax(240px, 34%); gap: 12px; height: 100%; }
.team-league .league__table, .team-league__games { min-height: 0; overflow: auto; }
.team-league__games { padding: 12px; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.fixtures--numbered li { grid-template-columns: auto 1fr auto 1fr; }
.fixtures--numbered li::before { content: attr(data-day); color: var(--muted); font-size: 0.72rem; font-weight: 600; }

.team-squad { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.team-squad__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.team-squad .squad__table { flex: 1; }
.team-squad .squad-table td { padding: 7px 10px; }

@media (max-width: 900px), (max-height: 460px) {
  .team-view { padding: 8px; gap: 6px; }
  .team-complex, .team-league { grid-template-columns: 1fr minmax(180px, 36%); gap: 8px; }
}

/* =========================================================
   AYUDA
   ========================================================= */
.help {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(200px, 25%) 1fr;
  gap: 14px;
  padding: 12px 14px;
  background: radial-gradient(ellipse at 30% 0%, #26338a, var(--bg) 70%);
}
.help__index { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: auto; padding: 10px; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.help__index h2 { margin: 4px 6px 8px; font-size: 1.3rem; }
.help__topic { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.help__topic span { font-size: 20px; width: 26px; text-align: center; }
.help__topic:hover { background: #ffffff12; }
.help__topic.is-active { background: linear-gradient(90deg, var(--cyan), #2a7bff); color: #04122e; }
.help__content { min-height: 0; overflow: auto; padding: 16px 22px; border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); line-height: 1.5; animation: screen-in 0.25s ease; }
.help__content h2 { font-size: clamp(20px, 4.5vh, 30px); color: var(--cyan); text-shadow: 0 0 12px rgba(34, 227, 255, 0.4); }
.help__content h3 { margin-top: 18px; font-size: 1.05rem; color: var(--yellow); }
.help__content ul, .help__content ol { margin: 0 0 10px; padding-left: 1.3em; }
.help__content li { margin-bottom: 4px; }
.help__content a:not(.btn) { color: var(--cyan); }
.help-steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.help-steps li { counter-increment: step; position: relative; min-height: 26px; padding-left: 34px; }
.help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  font-family: var(--font-display);
  font-size: 0.85rem;
}
.help-table { width: 100%; max-width: 680px; margin: 8px 0 12px; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.help-table th { padding: 6px 10px; text-align: left; background: #161c55; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }
.help-table td { padding: 6px 10px; border-top: 1px solid #ffffff12; }
.help-table tr:nth-child(even) td { background: #ffffff06; }
.help-tip { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 210, 63, 0.1); }
/* Botón "Ir a…": el botón estándar (.btn), solo con hueco encima y sin subrayado */
.help-goto { display: inline-flex; margin-top: 10px; text-decoration: none; }

@media (max-width: 900px), (max-height: 460px) {
  .help { grid-template-columns: 56px 1fr; gap: 8px; padding: 8px; }
  .help__index { padding: 6px 4px; }
  .help__index h2 { display: none; }
  .help__topic { justify-content: center; padding: 8px 0; font-size: 0; }
  .help__content { padding: 12px 14px; }
}
.opt__effect { margin-top: 2px; font-weight: 600; }
.opt__effect.pos { color: var(--green); }
.opt__effect.neg { color: #ff7b84; }

/* =========================================================
   PARTIDO EN DIRECTO
   ========================================================= */
.match {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: radial-gradient(ellipse at 50% 0%, #26338a, var(--bg) 70%);
}
.match__board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(11, 14, 42, 0.8);
  box-shadow: inset 0 0 0 2px var(--line), 0 0 24px rgba(34, 227, 255, 0.15);
}
.match__team { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.match__team--away { flex-direction: row-reverse; text-align: right; }
.match__crest {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(40px, 9vh, 60px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0b0f33;
  box-shadow: inset 0 0 0 2px #ffffff33;
  font-size: clamp(22px, 5vh, 34px);
}
.match__team--home .match__crest { box-shadow: inset 0 0 0 3px var(--home), 0 0 14px var(--home); }
.match__team--away .match__crest { box-shadow: inset 0 0 0 3px var(--away), 0 0 14px var(--away); }
.match__team--home .match__name { color: var(--home); }
.match__team--away .match__name { color: var(--away); }
.match__name { font-family: var(--font-display); font-size: clamp(14px, 3vh, 22px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match__center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.match__tag { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.8px; color: var(--muted); text-transform: uppercase; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: live-blink 1.2s infinite; }
@keyframes live-blink { 50% { opacity: 0.25; } }
.match__score { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: clamp(30px, 8vh, 54px); line-height: 1; }
.match__score b { font-weight: 400; color: var(--yellow); text-shadow: 0 0 16px rgba(255, 210, 63, 0.5); font-variant-numeric: tabular-nums; }
.match__score span { color: var(--muted); }
.match__pens { min-height: 1em; font-size: 0.8rem; font-weight: 600; color: var(--orange); }
.match__clock { display: flex; align-items: baseline; gap: 8px; }
.match__clock b { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--cyan); font-variant-numeric: tabular-nums; }
.match__clock small { color: var(--muted); font-size: 0.75rem; }

.match__timeline { position: relative; height: 6px; border-radius: 3px; background: #ffffff18; }
.match__timeline i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width 0.25s linear; }
.match__mark { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--yellow); }

.match__body { display: grid; grid-template-columns: 1fr minmax(240px, 34%); gap: 10px; min-height: 0; }
.match__feed, .match__side section, .match__pitch { border-radius: 18px; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }
.match__feed { display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.match__feed h3 { font-size: 1rem; margin-bottom: 6px; }
.match__feed ol { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ev { --team: var(--home); position: relative; flex: none; display: grid; grid-template-columns: 2.8em 1.5em 1fr auto; align-items: center; gap: 6px; padding: 6px 8px 6px 20px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, 0.045); font-size: 0.86rem; animation: ev-in 0.35s ease; }
.ev--away { --team: var(--away); padding: 6px 20px 6px 8px; }
/* Minuto en pastilla del color del equipo */
.ev__min { justify-self: center; min-width: 2.3em; padding: 1px 7px; border-radius: 999px; background: var(--team); color: #06122e; font-family: var(--font-display); font-size: 0.8rem; text-align: center; }
.ev__min:empty { display: none; }
.ev__crest { text-align: center; }
/* Punto del color del equipo: a la izquierda el local y a la derecha el visitante */
.ev::before { content: ''; position: absolute; top: calc(50% - 4px); left: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--team); box-shadow: 0 0 6px var(--team); pointer-events: none; }
.ev--away::before { left: auto; right: 6px; }
.ev__score { display: none; }
.ev--whistle { --team: var(--yellow); padding: 6px 8px; margin: 4px 7%; background: none; color: var(--yellow); font-weight: 700; }
.ev--whistle::before { display: none; }
/* Goles: fondo del equipo, borde dorado, marcador y un destello que cruza la línea al aparecer */
.ev--goal { font-weight: 600; background: color-mix(in srgb, var(--team) 24%, transparent); outline: 2px solid var(--gold, #ffd23f); outline-offset: -2px; }
.ev--goal::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%); transform: translateX(-100%); animation: ev-sweep 1.6s ease-out 0.2s 1 both; }
.ev--goal .ev__score { display: inline-block; padding: 1px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.4); color: var(--yellow); font-size: 1rem; white-space: nowrap; }
@keyframes ev-sweep { to { transform: translateX(100%); } }
/* Tarjetas y lesiones: fondo suave para que no pasen desapercibidas */
.ev--red, .ev--injury { background: rgba(255, 70, 90, 0.22); }
.ev--yellow { background: rgba(255, 210, 63, 0.16); }
.ev--red .ev__text, .ev--injury .ev__text { font-weight: 700; }
/* Ocasiones, paradas y córners: solo texto, sin fondo ni punto */
.ev--minor { background: none; opacity: 0.8; padding-top: 2px; padding-bottom: 2px; }
.ev--minor::before { display: none; }
@keyframes ev-in { from { opacity: 0; transform: translateY(-6px); } }

.match__side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.match__side section { padding: 10px 12px; }
.match__side h3 { font-size: 0.95rem; margin-bottom: 6px; }
.match__pitch {
  --pitch-max-h: 250px;
  position: relative;
  flex: none;
  align-self: center;
  width: min(100%, calc(var(--pitch-max-h) * 1.55));
  aspect-ratio: 1.55;
  overflow: hidden;
  background:
    radial-gradient(ellipse 9.5% 14.7% at 50% 50%, transparent 92%, #ffffff55 93%, #ffffff55 99%, transparent 100%),
    linear-gradient(90deg, transparent calc(50% - 1px), #ffffff55 calc(50% - 1px), #ffffff55 calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #2f9443 0 10%, #37a64d 10% 20%);
}
.match__pitch::before, .match__pitch::after {
  content: '';
  position: absolute;
  top: 25%;
  width: 13%;
  height: 50%;
  border: 2px solid #ffffff55;
}
.match__pitch::before { left: 0; border-left: 0; }
.match__pitch::after { right: 0; border-right: 0; }
/* Jugadores: cabeza y hombros (la cara de su carta) con la camiseta de su equipo; el portero, de amarillo.
   Los hombros quedan en el punto del campo donde está el jugador */
.pdot {
  position: absolute;
  z-index: 1;
  width: 6.6%;
  min-width: 15px;
  aspect-ratio: 1;
  transform: translate(-50%, -70%);
  transition: opacity 0.4s, transform 0.25s;
  line-height: 0;
  pointer-events: auto;
}
.pdot svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.3)); }
.pdot.is-off { opacity: 0; transform: translate(-50%, -70%) scale(0); }
/* El que lleva el balón: más grande, con un halo blanco y un pequeño bote */
.pdot.is-carrier { z-index: 2; transform: translate(-50%, -70%) scale(1.3); }
.pdot.is-carrier svg { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.3)); animation: pf-run 0.42s ease-in-out infinite; }
@keyframes pf-run { 50% { transform: translateY(-7%); } }
.match__ball {
  position: absolute;
  z-index: 3;
  width: 3%;
  min-width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 45%, #d9dde8 70%);
  box-shadow: 0 0 0 1.5px #111a, 0 0 10px 2px #fff, 0 3px 2px #0007;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* Halo que late alrededor del balón para encontrarlo de un vistazo */
.match__ball::after {
  content: '';
  position: absolute;
  inset: -110%;
  border-radius: 50%;
  border: 2px solid #fff;
  opacity: 0;
  animation: ball-ping 1.4s ease-out infinite;
}
.match__ball.is-flying { box-shadow: 0 0 0 1.5px #111a, 0 0 16px 4px #fff, 0 6px 4px #0005; }
@keyframes ball-ping { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(1.3); opacity: 0; } }
/* Estela del pase, del color del equipo que lo da */
.pitch__trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.pitch__trail line { stroke-width: 2.5; stroke-dasharray: 5 4; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; }
.pitch__trail .trail--home { stroke: var(--home); filter: drop-shadow(0 0 3px var(--home)); }
.pitch__trail .trail--away { stroke: var(--away); filter: drop-shadow(0 0 3px var(--away)); }
.match__pitch-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.match__carrier { min-height: 1.3em; font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.carrier--home { color: var(--home); }
.carrier--away { color: var(--away); }
.mstat { display: grid; grid-template-columns: 3em 1fr 3em; align-items: center; gap: 2px 6px; margin-bottom: 6px; font-size: 0.82rem; }
.mstat span { text-align: center; color: var(--muted); }
.mstat b { font-family: var(--font-display); font-weight: 400; font-variant-numeric: tabular-nums; }
.mstat b:last-of-type { text-align: right; }
.mstat__bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--away); overflow: hidden; }
.mstat__bar i { display: block; height: 100%; background: var(--home); }
.mstat b:first-child { color: var(--home); }
.mstat b:last-of-type { color: var(--away); }
.shootout__row { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.pen { width: 14px; height: 14px; border-radius: 50%; }
.pen--in { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pen--out { background: var(--red); }
.match__actions { display: flex; justify-content: center; }

.match__flash {
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: 5;
  font-family: var(--font-display);
  font-size: clamp(40px, 14vh, 110px);
  color: var(--yellow);
  text-shadow: 0 0 30px var(--yellow), 0 6px 0 #0008;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
}
.match__flash.is-on { animation: goal-flash 2.6s ease forwards; }
@keyframes goal-flash {
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(-4deg); }
  25%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(2deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}
.match--empty { place-items: center; }
.match__empty { max-width: 420px; padding: 24px; border-radius: 18px; text-align: center; background: rgba(11, 14, 42, 0.75); box-shadow: inset 0 0 0 2px var(--line); }

.report__goals { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 0.8rem; color: var(--muted); }
.report__goals div { display: flex; flex-direction: column; gap: 2px; }
.report__goals div:last-child { text-align: right; }

/* =========================================================
   ECONOMÍA
   ========================================================= */
.economy {
  position: absolute;
  inset: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.15fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  background: radial-gradient(ellipse at 30% 0%, #1f5a3c, var(--bg) 70%);
}
.economy__head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.economy__head h2 { margin: 0; font-size: clamp(18px, 4vh, 28px); }
.economy__chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eco-balance { display: flex; flex-direction: column; padding: 4px 14px; border-radius: 14px; background: #0b0f33; font-family: var(--font-display); font-size: 1.5rem; color: var(--green); line-height: 1.1; box-shadow: inset 0 0 0 2px var(--line); }
.eco-balance.neg { color: #ff7b84; }
.eco-balance small { font-family: var(--font-body); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.economy__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.eco-card { position: relative; padding: 12px 14px; border-radius: 18px; background: rgba(11, 14, 42, 0.78); box-shadow: inset 0 0 0 2px var(--line); }
.eco-card h3 { font-size: 1rem; margin: 0 0 8px; }
.eco-card h4 { display: flex; justify-content: space-between; margin: 10px 0 6px; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.eco-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.eco-card__head h3 { margin: 0; }
.eco-season { display: flex; gap: 6px; }
.eco-season .league__nav { width: 30px; height: 30px; font-size: 12px; }
.eco-lines, .eco-bars, .eco-moves { list-style: none; margin: 0; padding: 0; }
.eco-lines li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #ffffff10; font-size: 0.9rem; }
.eco-lines li:first-child { border-top: 0; }
.eco-line__label small, .eco-move__label small { display: block; color: var(--muted); font-size: 0.75rem; }
.eco-net { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--line); font-weight: 700; }
.eco-bar { display: grid; grid-template-columns: minmax(120px, 42%) 1fr auto; align-items: center; gap: 8px; padding: 3px 0; font-size: 0.85rem; }
.eco-bar.is-empty .eco-bar__label { color: var(--muted); }
.eco-bar__track { height: 10px; border-radius: 4px; background: #ffffff10; overflow: hidden; }
.eco-bar__fill { display: block; height: 100%; min-width: 0; border-radius: 0 4px 4px 0; }
.eco-bar__fill--income { background: var(--green); }
.eco-bar__fill--expense { background: var(--red); }
.eco-bar b { min-width: 6.5em; text-align: right; font-variant-numeric: tabular-nums; }
.eco-chart__box { min-height: 170px; }
.eco-chart__svg { display: block; touch-action: pan-y; }
.eco-chart__grid { stroke: #ffffff14; stroke-width: 1; }
.eco-chart__zero { stroke: var(--red); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.7; }
.eco-chart__tick { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.eco-chart__area { fill: rgba(34, 227, 255, 0.12); }
.eco-chart__line { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.eco-chart__last { fill: var(--cyan); stroke: #0b0e2a; stroke-width: 2; }
.eco-chart__cross { stroke: #ffffff66; stroke-width: 1; }
.eco-chart__dot { fill: var(--cyan); stroke: #fff; stroke-width: 2; }
.eco-chart__tip { position: absolute; z-index: 2; display: flex; flex-direction: column; padding: 5px 10px; border-radius: 10px; background: #161c55; box-shadow: 0 4px 14px #0008, inset 0 0 0 1px var(--line); pointer-events: none; white-space: nowrap; }
.eco-chart__tip b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.eco-chart__tip span { font-size: 0.72rem; color: var(--muted); }
.eco-moves-box { max-height: 340px; overflow: auto; }
.eco-moves__day { margin: 8px 0 2px; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.eco-moves__day:first-child { margin-top: 0; }
.eco-move { display: grid; grid-template-columns: 1.6em 1fr auto; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid #ffffff0c; font-size: 0.86rem; }
.eco-move b { font-variant-numeric: tabular-nums; }
.report__link { align-self: flex-start; font-size: 0.85rem; color: var(--cyan); }
@media (max-width: 760px) {
  .economy { grid-template-columns: 1fr; }
}

/* ---------- Lesiones y Hospital ---------- */
.injury-tag { color: #ff7b84; font-weight: 700; }
.building__alert { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.85em; }
.clinic { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
.clinic h3 { font-size: 1rem; margin: 0 0 8px; }
.patient, .kit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: #ffffff0a; }
.patient__face { font-size: 30px; }
.patient__info, .kit__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.patient__info small, .kit__info small { color: var(--muted); font-size: 0.75rem; }
.patient__bar { height: 6px; border-radius: 3px; background: #ff3b4733; overflow: hidden; }
.patient__bar i { display: block; height: 100%; background: var(--green); }
.patient__actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 45%; font-size: 0.75rem; text-align: right; }
.patient__actions .btn { padding: 4px 8px; font-size: 0.8rem; }
.kit__icon { font-size: 26px; }
.kit__stock { font-family: var(--font-display); font-size: 1.1rem; color: var(--yellow); }
.kit .btn { padding: 6px 10px; font-size: 0.82rem; white-space: nowrap; }
.report__injuries { margin-top: 10px; }
.report__injuries h3 { font-size: 1rem; }
@media (max-width: 760px), (max-height: 500px) {
  .clinic { grid-template-columns: 1fr; }
}

/* ---------- Botiquines ---------- */
.medical { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; }
.medical__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.medical__head h2 { margin: 0; font-size: clamp(18px, 4vh, 28px); }
.medical__chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.medical__body { flex: 1; min-height: 0; align-items: stretch; }
.medical__body > section { padding: 12px 14px; border-radius: 18px; background: rgba(11, 14, 42, 0.78); box-shadow: inset 0 0 0 2px var(--line); align-self: stretch; overflow: auto; }

/* Con los paneles apilados (pantallas estrechas o bajas) cada uno toma su altura natural y la pantalla se desplaza */
@media (max-width: 760px), (max-height: 500px) {
  .medical__body { flex: none; }
  .medical__body > section { align-self: start; overflow: visible; }
}

/* Estado vacío del Hospital */
.clinic__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px 12px; text-align: center; }
.clinic__empty span { font-size: 44px; line-height: 1; }
.clinic__empty b { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--green); }
.clinic__empty small { color: var(--muted); }

/* Tienda: icono en su casilla y existencias como una pastilla */
/* Nombres con la misma letra que los de Plantilla (Rubik 600, blanco) */
.kit__info b, .patient__info b { font-weight: 600; color: #fff; }
.kit__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; font-size: 30px; line-height: 0; }
.kit__stock { flex: none; min-width: 2.6em; padding: 2px 8px; border-radius: 999px; background: #0b0f33; text-align: center; box-shadow: inset 0 0 0 2px var(--line); }

/* =========================================================
   INICIO
   ========================================================= */
.home {
  position: absolute;
  inset: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(min-content, 1fr);
  gap: 12px;
  padding: 12px 14px;
}
.home-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border-radius: 18px; background: rgba(11, 14, 42, 0.78); }
.home-card h3 { margin: 0; font-size: 1.05rem; }
.home-card__body { flex: 1; min-height: 0; }
.home-card__body p { margin: 4px 0; font-size: 0.9rem; }
.home-card__go { align-self: flex-start; padding: 0.4em 0.9em; font-size: 0.85rem; }
.home-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 4px 0; font-weight: 700; }
.home-match span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-match span:last-child { text-align: right; }
.home-match b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--yellow); }
.home-table { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.home-table li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 10px; font-size: 0.88rem; }
.home-table li.is-me { background: linear-gradient(90deg, rgba(255, 162, 31, 0.45), rgba(255, 210, 63, 0.15)); }
.home-table .rank { width: 24px; height: 24px; font-size: 0.8rem; }
.home-table__team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-table b { font-family: var(--font-display); font-weight: 400; color: var(--yellow); }
.home-big { font-family: var(--font-display); font-size: 1.8rem; color: var(--gold, var(--yellow)); }
.home-bar { height: 8px; border-radius: 4px; background: #ffffff18; overflow: hidden; }
.home-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }
@media (max-width: 900px) { .home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =========================================================
   CALENDARIO Y ESTADÍSTICAS
   ========================================================= */
.cal, .stats { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; }
.cal__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal__head h2 { margin: 0 8px 0 0; font-size: clamp(18px, 4vh, 28px); }
.cal-card, .stats-card { padding: 12px 14px; border-radius: 18px; background: rgba(11, 14, 42, 0.78); }
.cal-card h3, .stats-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.cal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-row { display: grid; grid-template-columns: 3.4em 1.6em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(7, 26, 69, 0.45); font-size: 0.92rem; }
.cal-row__day { font-family: var(--font-display); color: var(--muted); }
.cal-row__rival { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.cal-row__status { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cal-row.is-played { opacity: 0.85; }
.cal-row.is-next { background: linear-gradient(90deg, rgba(255, 162, 31, 0.45), rgba(255, 210, 63, 0.15)); box-shadow: inset 0 0 0 2px var(--yellow); opacity: 1; }
.cal-score { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; color: var(--yellow); }
.cal-row--playoff .cal-row__rival { font-family: var(--font-display); font-weight: 400; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(7, 26, 69, 0.5); box-shadow: inset 0 0 0 2px rgba(99, 194, 255, 0.3); }
.stat-tile span { font-size: 0.78rem; color: var(--muted); }
.stat-tile b { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.stats-card__head h3 { margin: 0; }
.stats-card__tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stats-card__tools .tab { padding: 5px 10px; font-size: 0.8rem; }
.stats-card__tools .league__nav { width: 32px; height: 32px; font-size: 12px; }
.stats-table-box { overflow: auto; border-radius: 12px; }
.stats-table { width: 100%; }
.stats-table td { text-align: center; }
.stats-table td.squad-name { text-align: left; }
.stats-hot { color: var(--yellow); font-family: var(--font-display); font-size: 1.1rem; }

/* =========================================================
   BUSCAR Y EMPLEADOS
   ========================================================= */
.search, .staff { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; }
.search-card, .staff-card { padding: 12px 14px; border-radius: 18px; background: rgba(11, 14, 42, 0.78); }
.search-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; }
.search-filters__group { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.search-filters__group input[type='range'] { width: 170px; accent-color: var(--yellow); }
.search-filters__group select { height: 34px; padding: 0 10px; border-radius: 10px; font: inherit; font-weight: 700; }
.search-filters .tab { padding: 5px 12px; font-size: 0.85rem; }
.search-results { flex: 1; min-height: 0; overflow: auto; }
.search-table { width: 100%; }
.search-table td { text-align: center; }
.search-table td.squad-name { text-align: left; }
.search-table small { display: block; font-size: 0.72rem; }
.search-price { font-family: var(--font-display); font-weight: 400; color: var(--yellow); }
.search-actions { white-space: nowrap; }
.search-actions .btn { padding: 0.35em 0.8em; font-size: 0.8rem; }
.search-table tr.is-me td { background: rgba(61, 255, 122, 0.12); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.staff-card { display: flex; flex-direction: column; gap: 6px; }
.staff-card__who { display: flex; align-items: center; gap: 10px; }
.staff-card__who h3 { margin: 0; font-size: 0.95rem; }
.staff-card__face { font-size: 38px; line-height: 1; }
.staff-card p { margin: 0; font-size: 0.86rem; }
.staff-card__status { flex: 1; color: var(--yellow); font-weight: 700; }
.staff-card .btn { align-self: flex-start; padding: 0.4em 0.9em; font-size: 0.82rem; }

.stat-bar--stamina .stat-bar__track i { background: hsl(var(--h) 80% 48%); }
.stat-bar--stamina .stat-bar__value { color: hsl(var(--h) 90% 62%); }

/* Copa y Amistosos */
.cup { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.cup__card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 560px; padding: 16px; }
.cup__card p { margin: 0; }
.cup__big { font-size: 3rem; line-height: 1; }

/* Iconos de los botiquines: una casilla con degradado del tono del botiquín, como las baldosas del menú */
.kit__icon, .kit-ico {
  border: 3px solid var(--tile-edge);
  border-radius: 12px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.22) 44%, transparent 45%),
    linear-gradient(180deg, var(--tile-a) 0%, var(--tile-b) 50%, var(--tile-c) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 3px 0 var(--tile-edge);
}
.kit__icon .ico { filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.25)); }
.kit-ico { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; margin-right: 0.35em; font-size: 0.95rem; line-height: 0; vertical-align: middle; border-width: 2px; border-radius: 9px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 0 var(--tile-edge); }
.kit-ico .ico { stroke-width: 2.4; }

.kind-badge { margin-left: 6px; padding: 1px 5px; border-radius: 6px; background: #ffffff14; color: var(--muted); font-size: 0.65rem; font-weight: 600; vertical-align: middle; }
.kind-badge--real { background: #ffffff22; color: var(--cyan); }

/* Formaciones: 2 columnas, de la más defensiva (arriba) a la más ofensiva (abajo) */
.formation-hint { margin: 0 0 6px; font-size: 0.78rem; }
.formation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.formation-opt { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0; padding: 6px 4px; }
.formation-opt b { font-size: 1.05rem; letter-spacing: 0.03em; }
.formation-opt small { font-size: 0.7rem; }

/* Botón de Tácticas de la barra y cierre del menú: solo en móvil vertical (ver portrait.css) */
.chip--tactics, .drawer__close { display: none; }

/* Segunda línea de cada jugador con el precio de venta: solo en móvil vertical (ver portrait.css) */
.squad-sellrow { display: none; }
