:root {
  --bg: #0b1426;
  --bg2: #101e38;
  --card: #16264a;
  --card-hi: #1d3160;
  --line: #24395f;
  --txt: #eaf2ff;
  --muted: #8da3c5;
  --acc: #2dd4a8;
  --acc2: #1aa3c9;
  --warn: #f5b942;
  --bar: rgba(11, 20, 38, .92);
  --splash-glow: #142447;
}
html[data-theme="light"] {
  --bg: #f2f5fa;
  --bg2: #e8edf5;
  --card: #ffffff;
  --card-hi: #e9f0fa;
  --line: #d4dde9;
  --txt: #16243c;
  --muted: #5c6f8d;
  --acc: #0c9f7d;
  --acc2: #0d7fa6;
  --warn: #b07b10;
  --bar: rgba(242, 245, 250, .92);
  --splash-glow: #dde7f3;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { overflow-x: hidden; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--txt);
  max-width: 480px; margin: 0 auto; overflow-x: hidden;
}

.screen { display: none; min-height: 100dvh; flex-direction: column; }
.screen.active { display: flex; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Splash ── */
.splash { justify-content: center; align-items: center; background: radial-gradient(circle at 50% 30%, var(--splash-glow) 0%, var(--bg) 70%); }
.splash-inner { text-align: center; padding: 24px; width: 100%; }
.logo-img { width: 150px; max-height: 160px; object-fit: contain; border-radius: 18px; filter: drop-shadow(0 0 24px rgba(45,212,168,.35)); }
/* Wordmark estilo FIFA: FIFA en blanco, PHY en verde, pesado e itálico */
.app-name {
  margin-top: 18px; font-size: 58px; line-height: 1;
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900; font-style: italic; letter-spacing: -1.5px;
  animation: popin .7s cubic-bezier(.2, .9, .3, 1.3) both;
}
@keyframes brandflow { to { background-position: 300% 0; } }
.wm-f { color: var(--txt); }
.wm-p { color: var(--acc); text-shadow: 0 0 20px rgba(45, 212, 168, .45); }
.app-sub { color: var(--muted); margin-top: 6px; font-size: 13px; }
.progress { margin: 34px auto 10px; width: 70%; height: 6px; background: var(--card); border-radius: 3px; overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 3px; transition: width .3s ease; }
.load-info { color: var(--muted); font-size: 12px; min-height: 16px; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  background: var(--bar); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar-actions { position: absolute; right: 12px; display: flex; gap: 8px; }
.iconbtn {
  background: var(--card); color: var(--txt); border: 1px solid var(--line); cursor: pointer;
  width: 34px; height: 34px; border-radius: 10px; font-size: 16px; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.iconbtn:active { background: var(--card-hi); }
.topbar.center { justify-content: center; }
.brand { font-weight: 700; letter-spacing: 1px; font-size: 16px; display: inline-flex; align-items: baseline; gap: 5px; }
.brand-name {
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900; font-style: italic; font-size: 19px; letter-spacing: -.8px;
}
.brand b { color: var(--acc); }
.title { font-weight: 700; font-size: 17px; white-space: normal; line-height: 1.12; }
.back {
  background: var(--card); color: var(--txt); border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 10px; font-size: 22px; line-height: 1; flex: none;
}
.back:active { background: var(--card-hi); }

.content { flex: 1; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }

/* ── Home ── */
.menu { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.bigbtn {
  display: flex; align-items: center; gap: 16px; width: 100%;
  background: linear-gradient(135deg, var(--card), var(--bg2));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 18px; color: var(--txt); cursor: pointer; text-align: left;
}
.bigbtn:active { transform: scale(.98); border-color: var(--acc); }
.bigbtn-icon { font-size: 34px; }
.tour-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; flex: none; background: #fff; padding: 3px; }
.bigbtn-txt { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bigbtn-txt b { font-size: 19px; }
.bigbtn-txt small { color: var(--muted); font-size: 13px; }
.chev { color: var(--acc); font-size: 28px; }
.home-stats { text-align: center; color: var(--muted); font-size: 12px; margin-top: 12px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.feat-grid button {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 4px; color: var(--txt); font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.feat-grid button:active { border-color: var(--acc); background: var(--card-hi); }
.langs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.langs button {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer;
}
.langs button { display: inline-flex; align-items: center; gap: 6px; }
.langs button svg { width: 18px; height: 12px; border-radius: 2px; display: block; }
.langs button.on { background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #fff; border-color: transparent; }
.source { text-align: center; color: var(--muted); font-size: 11px; margin-top: 14px; }

/* ── Listas de tarjetas (equipos / métricas) ── */
.card-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px; color: var(--txt); cursor: pointer; text-align: left;
}
.card-item:active { background: var(--card-hi); border-color: var(--acc); }
.card-item .flag { width: 42px; height: 28px; border-radius: 5px; object-fit: cover; background: var(--bg2); flex: none; }
.card-item .flag-emoji { font-size: 30px; flex: none; }
/* Bandera por imagen (ENG/SCO/WAL) embebida donde iría el emoji */
.flag-mini { display: inline-block; width: 1.32em; height: 0.92em; object-fit: cover; border-radius: 2px; vertical-align: -0.14em; background: var(--bg2); }
.flag-emoji .flag-mini { width: 1.05em; height: 0.74em; vertical-align: -0.05em; }
.card-item .micon { font-size: 24px; width: 34px; text-align: center; flex: none; }
.card-item .ctxt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.card-item .ctxt b { font-size: 16px; }
.card-item .ctxt small { color: var(--muted); font-size: 12px; }
.card-item .chev { font-size: 22px; }

/* ── Ranking ── */
.ranking-head { padding: 14px 16px 0; }
.ranking-head h2 { font-size: 20px; margin-bottom: 12px; }
.toggle { display: flex; background: var(--card); border-radius: 12px; padding: 4px; gap: 4px; }
.toggle button {
  flex: 1; padding: 9px 0; border: none; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 14px;
}
.toggle button.on { background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #06281f; }
html[data-theme="light"] .toggle button.on { color: #fff; }
.legend { color: var(--warn); font-size: 12px; margin-top: 10px; min-height: 15px; }
.legend:empty { display: none; }

/* ── Análisis Táctico: selector de visualización ── */
.at-vizsel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.viz-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 4px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); color: var(--muted);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.viz-card:active { transform: scale(.95); }
.viz-card .vc-i { font-size: 21px; line-height: 1; filter: grayscale(.3); }
.viz-card .vc-l { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.15; }
.viz-card.active {
  background: linear-gradient(150deg, var(--acc), var(--acc2)); color: #06281f;
  border-color: transparent; box-shadow: 0 4px 14px rgba(45,212,168,.28);
}
.viz-card.active .vc-i { filter: none; }
html[data-theme="light"] .viz-card.active { color: #fff; }

/* ── Selector de partido (listado) ── */
.at-matchlist { display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }
.at-match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  position: relative; padding: 14px 16px 22px; border-radius: 14px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); color: var(--txt);
  transition: transform .12s ease, border-color .12s ease;
}
.at-match:active { transform: scale(.98); }
.at-match:hover { border-color: var(--acc); }
.atm-side { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; }
.atm-side:first-of-type { justify-content: flex-start; }
.atm-side:last-of-type { justify-content: flex-end; }
.atm-flag { font-size: 19px; }
.atm-score { display: flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 900; }
.atm-score i { color: var(--muted); font-style: normal; }
.atm-meta {
  position: absolute; bottom: 6px; left: 0; right: 0; text-align: center;
  font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .3px;
}

/* ── Selector de equipo (rejilla) ── */
.at-teamgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 2px; }
.at-team {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 13px;
  cursor: pointer; background: var(--card); border: 1.5px solid var(--line); color: var(--txt);
  font-size: 14px; font-weight: 700; text-align: left;
  transition: transform .12s ease, border-color .12s ease;
}
.at-team:active { transform: scale(.97); }
.at-team:hover { border-color: var(--acc); }
.att-flag { font-size: 22px; }

/* ── Comparativa por categorías ── */
.at-compare { padding: 12px 14px; }
.cmp-head { display: flex; justify-content: space-between; font-size: 15px; font-weight: 900; margin-bottom: 10px; }
.cmp-cat { margin-bottom: 14px; }
.cmp-cat h4 {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.cmp-row { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; margin-bottom: 9px; }
.cmp-v { font-size: 14px; font-weight: 800; text-align: center; opacity: .55; }
.cmp-v.lead { opacity: 1; }
.cmp-bars { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 2px 0; }
.cmp-lbl {
  grid-column: 1 / 3; grid-row: 2; text-align: center; font-size: 10.5px;
  font-weight: 600; color: var(--muted); margin-top: 2px;
}
.cmp-bar { grid-row: 1; height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; display: flex; }
.cmp-bar i { height: 100%; display: block; margin-left: auto; border-radius: 4px; }
.cmp-bar.r i { margin-left: 0; margin-right: auto; }

/* ── Detalle de partido: banda de marcador + pestañas ── */
.at-scoreband {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 10px; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--line);
}
.asb-team { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.asb-team:first-child { justify-content: flex-start; }
.asb-team:last-child { justify-content: flex-end; }
.asb-flag { font-size: 22px; }
.asb-score { display: flex; align-items: center; gap: 7px; font-size: 22px; font-weight: 900; }
.asb-score i { color: var(--muted); font-style: normal; }
.at-tabbar {
  display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; padding: 4px;
  background: var(--card); border-radius: 12px; scrollbar-width: none;
}
.at-tabbar::-webkit-scrollbar { display: none; }
.at-tab {
  flex: 1 0 auto; white-space: nowrap; padding: 8px 12px; border: none; border-radius: 9px;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.at-tab.on { background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #06281f; }
html[data-theme="light"] .at-tab.on { color: #fff; }

/* ── Resumen: chips de stats ── */
.atr-stats { display: flex; flex-direction: column; gap: 10px; }
.atr-stat { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.atr-stat span { font-size: 18px; font-weight: 900; }
.atr-stat span:first-child { text-align: right; }
.atr-stat span:last-child { text-align: left; }
.atr-stat small { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; min-width: 72px; }

/* ── Canvas / dirección de ataque ── */
.at-canvas-panel { text-align: center; padding: 10px; }
.at-canvas-panel canvas {
  width: 100%; max-width: 600px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
}
.at-attack {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: var(--muted); margin-top: 8px;
}
.at-attack b { color: var(--acc); letter-spacing: 1px; }
.poschips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.poschips button {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 11px; cursor: pointer;
}
.poschips button.on { background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #fff; border-color: transparent; }
.poschips .pclabel { align-self: center; font-size: 14px; margin-right: 2px; }
.teamfav { font-size: 20px; padding: 6px; cursor: pointer; flex: none; user-select: none; }
.teamfav:active { transform: scale(1.2); }

.rank-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px 10px 10px; margin-bottom: 8px; position: relative; overflow: hidden;
  cursor: pointer;
}
.rank-row:active { background: var(--card-hi); border-color: var(--acc); }
.rank-row .bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(45,212,168,.07); }
.rank-pos { width: 30px; text-align: center; font-weight: 800; color: var(--muted); font-size: 15px; flex: none; z-index: 1; }
.rank-pos.medal { font-size: 20px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; position: relative; z-index: 1;
  background: var(--card-hi); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--acc); overflow: hidden; border: 2px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.rank-info { flex: 1; min-width: 0; z-index: 1; }
.rank-info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info small { color: var(--muted); font-size: 12px; }
.rank-val { text-align: right; z-index: 1; flex: none; }
.rank-val b { font-size: 16px; color: var(--acc); display: block; }
.rank-val small { font-size: 11px; color: var(--muted); }
.inferred-badge { color: var(--warn); font-weight: 800; margin-left: 2px; }
.rank-row.inferred { border-left: 3px solid var(--warn); }

.empty-note { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 0; }

/* ── Partidos ── */
.match-card {
  display: block; width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin-bottom: 12px; cursor: pointer; color: var(--txt);
  text-align: center;
}
button.match-card:active { background: var(--card-hi); border-color: var(--acc); }
.match-card.static { cursor: default; background: linear-gradient(135deg, var(--card), var(--bg2)); }
.mc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-team { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.mc-team .flag-emoji { font-size: 34px; }
.mc-team b { font-size: 12px; letter-spacing: .5px; }
.mc-score { font-size: 26px; font-weight: 800; color: var(--acc); white-space: nowrap; }
.mc-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 10px; }

.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 6px; }
.mgrid button {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; color: var(--txt); font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: left;
}
.mgrid button:active { border-color: var(--acc); background: var(--card-hi); }

.mvp {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: linear-gradient(135deg, rgba(45,212,168,.16), var(--card));
  border: 1px solid rgba(45,212,168,.45); border-radius: 14px;
  padding: 12px; margin-bottom: 14px;
}
.mvp:active { background: var(--card-hi); }
.mvp .rank-info small { display: block; color: var(--warn); font-size: 11px; margin-bottom: 2px; }

/* ── Buscador ── */
.searchbar {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; color: var(--txt); font-size: 15px; margin-bottom: 12px; outline: none;
}
.searchbar:focus { border-color: var(--acc); }

/* ── Comparador ── */
.cmp-slots { display: flex; gap: 10px; margin-bottom: 14px; align-items: stretch; }
.cmp-slot {
  flex: 1; background: var(--card); border: 1px dashed var(--line); border-radius: 14px;
  padding: 12px 8px; color: var(--txt); cursor: pointer; text-align: center; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.cmp-slot.filled { border-style: solid; }
.cmp-slot.a.filled { border-color: var(--acc); }
.cmp-slot.b.filled { border-color: #8a7df0; }
.cmp-slot b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cmp-slot small { color: var(--muted); font-size: 11px; }
.cmp-vs { align-self: center; font-weight: 800; color: var(--muted); }
.cmp-row { padding: 9px 2px; border-bottom: 1px solid var(--line); }
.cmp-row:last-child { border-bottom: none; }
.cmp-label { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.cmp-vals { display: flex; align-items: center; gap: 8px; }
.cmp-vals .cv { width: 84px; font-size: 13px; font-weight: 700; flex: none; }
.cmp-vals .cv.a { text-align: left; }
.cmp-vals .cv.b { text-align: right; }
.cmp-vals .cv.win.a { color: var(--acc); }
.cmp-vals .cv.win.b { color: #8a7df0; }
.duo { flex: 1; display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg2); }
.duo .da { background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.duo .db { background: linear-gradient(90deg, #1aa3c9, #8a7df0); }
.radar-shape2 { fill: rgba(138,125,240,.22); stroke: #8a7df0; stroke-width: 2; stroke-linejoin: round; }
.radar-key { display: flex; justify-content: center; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.radar-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* ── Quiz ── */
.quiz-score { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.quiz-q { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.quiz-cards { display: flex; gap: 10px; margin-bottom: 14px; }
.quiz-card {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 8px; color: var(--txt); cursor: pointer; text-align: center; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.quiz-card:active { border-color: var(--acc); }
.quiz-card.right { border-color: var(--acc); background: rgba(45,212,168,.12); }
.quiz-card.wrong { border-color: #e0556b; background: rgba(224,85,107,.10); }
.quiz-card b { font-size: 13px; }
.quiz-card .qv { font-size: 16px; font-weight: 800; color: var(--acc); }
.quiz-result { text-align: center; font-size: 17px; font-weight: 800; min-height: 24px; margin-bottom: 10px; }
.quiz-next {
  display: block; width: 100%; padding: 13px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #06281f; font-weight: 800; font-size: 15px;
}

/* ── Ficha: extras ── */
.favbtn {
  position: absolute; top: 10px; right: 10px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 50%; width: 36px; height: 36px; font-size: 18px; cursor: pointer; line-height: 1;
}
.hero { position: relative; }
.actionrow { display: flex; gap: 8px; margin-bottom: 14px; }
.actionrow .loadchip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 12px; color: var(--txt); padding: 10px 6px; text-align: center;
}
.sharebtn {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--txt); font-size: 13px; font-weight: 700; padding: 10px 6px; cursor: pointer;
}
.sharebtn:active { border-color: var(--acc); }
.pm-match { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
.pm-match .mlabel { width: 110px; flex: none; font-size: 12px; }
.pm-match .mlabel small { display: block; color: var(--muted); font-size: 11px; }
.pm-match .track { flex: 1; height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.pm-match .fill { height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 5px; }
.pm-match .mval { width: 64px; text-align: right; font-size: 12px; font-weight: 700; flex: none; }

/* ── Once Físico ── */
.xiselect {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--txt); font-size: 14px; font-weight: 600; padding: 12px; margin-bottom: 12px;
}
.pitch {
  position: relative; width: 100%; aspect-ratio: 100 / 150;
  background: linear-gradient(180deg, #1a7a44, #125c33);
  border-radius: 18px; overflow: hidden; margin-bottom: 10px;
}
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch-lines rect, .pitch-lines line, .pitch-lines circle { fill: none; stroke: rgba(255,255,255,.35); stroke-width: .7; }
.xi-chip {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 92px; text-align: center; cursor: pointer;
}
.xi-avatar { width: 50px; height: 50px; border-width: 2px; }
.xi-chip b { font-size: 11px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.xi-chip small { font-size: 10px; color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.xi-score {
  position: absolute; top: -8px; right: 8px; z-index: 2;
  min-width: 26px; height: 26px; border-radius: 50%; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.gold { background: linear-gradient(135deg, #f7d774, #caa53d); color: #3a2c00; }
.silver { background: linear-gradient(135deg, #e6ecf5, #9fb0c4); color: #1d2a3a; }
.bronze { background: linear-gradient(135deg, #d9a06b, #9c6b3c); color: #371d05; }

/* Nota física en la ficha */
.score-badge {
  position: absolute; right: 10px; bottom: 10px;
  width: 54px; height: 54px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* ── Modo informe (stories) ── */
.rpt {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 20%, var(--splash-glow) 0%, var(--bg) 75%);
}
.rpt-progress {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; gap: 4px; z-index: 30;
}
.rpt-progress i { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; display: block; }
.rpt-progress i b { display: block; height: 100%; width: 0; background: var(--acc); }
.rpt-progress i.done b { width: 100%; }
.rpt-progress i.cur b { animation: rptbar 6s linear forwards; }
@keyframes rptbar { from { width: 0 } to { width: 100% } }
.rpt-close {
  position: absolute; top: calc(22px + env(safe-area-inset-top)); right: 14px; z-index: 40;
  background: var(--card); color: var(--txt); border: 1px solid var(--line);
  width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer;
}
.rpt-slide {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 60px 26px; position: relative; z-index: 10; min-height: 100dvh;
}
.rpt-nav { position: absolute; inset: 0; display: flex; z-index: 20; }
.rpt-nav div:first-child { width: 34%; }
.rpt-nav div:last-child { flex: 1; }
.rpt.last .rpt-nav { display: none; }

.rpt-photo {
  width: 150px; height: 150px; border-radius: 50%; position: relative; overflow: hidden;
  background: var(--card-hi); border: 3px solid var(--acc); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 44px; color: var(--acc);
  box-shadow: 0 0 50px rgba(45, 212, 168, .35);
}
.rpt-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.rpt-name { font-size: 30px; font-weight: 900; margin-top: 18px; line-height: 1.15; }
.rpt-title { font-size: 17px; font-weight: 800; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.rpt-sub { color: var(--muted); font-size: 15px; margin-top: 8px; }
.rpt-chips { display: flex; gap: 8px; margin-top: 14px; }
.rpt-hint { color: var(--muted); font-size: 12px; position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 0; right: 0; }
.rpt-big b {
  font-size: 64px; font-weight: 900; line-height: 1.05;
  background: linear-gradient(90deg, var(--acc), var(--acc2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rpt-diff { font-weight: 800; font-size: 15px; margin-top: 14px; }
.rpt-diff.up { color: var(--acc); }
.rpt-diff.down { color: var(--warn); }
.rpt-stats { display: flex; gap: 10px; margin-top: 30px; width: 100%; justify-content: center; flex-wrap: wrap; }
.rpt-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; min-width: 90px; opacity: 0; animation: fadeup .6s ease forwards;
}
.rpt-stat b { display: block; font-size: 18px; color: var(--acc); }
.rpt-stat small { color: var(--muted); font-size: 10px; }
.rpt-radar { width: 100%; max-width: 330px; }
.rpt-radar svg { width: 100%; height: auto; }
.rpt-radar .radar-shape, .rpt-radar .radar-dot { transform-origin: 50% 49%; animation: radarin 1.1s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes radarin { from { transform: scale(0); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.rpt-matches { width: 100%; max-width: 380px; }
.rpt-matches .pm-match { opacity: 0; }
.growbar { display: block; animation: growfrom0 1s ease both; }
@keyframes growfrom0 { from { width: 0 } }
.rpt-badges { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; }
.rpt-badge {
  background: var(--card); border: 1px solid rgba(45, 212, 168, .45); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; font-weight: 700; text-align: left; opacity: 0;
}
.rpt-actions { display: flex; gap: 10px; margin-top: 26px; width: 100%; max-width: 340px; }
.rpt-actions .quiz-next { flex: 1; }

.fadeup { opacity: 0; animation: fadeup .7s ease forwards; }
@keyframes fadeup { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
.pop { opacity: 0; animation: popin .6s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes popin { from { opacity: 0; transform: scale(.4) } to { opacity: 1; transform: scale(1) } }

/* ── Instalación ── */
.installbtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #fff;
  font-weight: 800; font-size: 15px;
}
.quiz-next { color: #fff; }

/* ── Ficha de jugador ── */
.hero {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--card), var(--bg2));
  border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px;
}
.hero-photo {
  width: 96px; height: 116px; border-radius: 14px; flex: none; position: relative;
  background: var(--card-hi); overflow: hidden; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px; color: var(--acc);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.hero-info { flex: 1; min-width: 0; }
.hero-info h2 { font-size: 20px; line-height: 1.2; margin-bottom: 6px; }
.hero-info .team { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--txt); }
.chip b { color: var(--acc); }
.hero-note { color: var(--warn); font-size: 12px; margin: -4px 0 14px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 14px 10px; margin-bottom: 14px;
}
.panel h3 { font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 8px; letter-spacing: .5px; }
.radar-wrap { display: flex; justify-content: center; }
.radar-wrap svg { width: 100%; max-width: 320px; height: auto; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-shape { fill: rgba(45,212,168,.25); stroke: var(--acc); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--acc); }
.radar-label { fill: var(--muted); font-size: 9px; font-family: inherit; }
.radar-pct { fill: var(--txt); font-size: 8.5px; font-weight: 700; }

.pmetric { padding: 10px 2px 12px; border-bottom: 1px solid var(--line); }
.pmetric:last-child { border-bottom: none; }
.pm-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pm-label { font-size: 14px; font-weight: 600; }
.pm-val { color: var(--acc); font-size: 15px; flex: none; }
.pm-bar { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.pm-bar small { width: 58px; color: var(--muted); font-size: 11px; flex: none; }
.pm-bar .track { flex: 1; height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.pm-bar .fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.pm-bar .fill.world { background: linear-gradient(90deg, #8a7df0, #1aa3c9); }
.pm-bar .fill.pos { background: linear-gradient(90deg, #f5b942, #e0556b); }
.pm-bar span { width: 38px; text-align: right; font-size: 12px; font-weight: 700; flex: none; }

#modes-btn { position: absolute; left: 12px; }
.modes-theme {
  position: absolute; z-index: 5;
  top: calc(14px + env(safe-area-inset-top)); right: 14px;
}

/* ════════ Selector de modo ════════ */
.modes { background: radial-gradient(circle at 50% 22%, var(--splash-glow) 0%, var(--bg) 70%); }
.modes-inner { display: flex; flex-direction: column; justify-content: center; min-height: 100%; gap: 12px; }
.modes-head { text-align: center; margin-bottom: 8px; }
.modes-logo { width: 76px; height: 76px; object-fit: contain; margin-bottom: 6px; }
.modes-q { color: var(--muted); font-size: 14px; margin-top: 4px; }
.modecard {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 16px; color: var(--txt); cursor: pointer; text-align: left;
  transition: transform .12s, border-color .12s;
}
.modecard:active { transform: scale(.98); border-color: var(--acc); }
.modecard-ic { font-size: 32px; width: 44px; text-align: center; flex: none; }
.modecard-tx { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.modecard-tx b { font-size: 18px; }
.modecard-tx small { color: var(--muted); font-size: 13px; }

/* ════════ Datos de Juego · rejilla de categorías ════════ */
.catgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.catcard {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 14px; color: var(--txt); cursor: pointer; text-align: left;
  transition: transform .12s, border-color .12s;
}
.catcard:active { transform: scale(.97); border-color: var(--acc); background: var(--card-hi); }
.catcard-ic { font-size: 28px; }
.catcard b { font-size: 15px; line-height: 1.2; }
.catcard small { color: var(--muted); font-size: 12px; }

/* ════════ Informe completo · cards por categoría ════════ */
.rcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rcard-head b { font-size: 16px; flex: 1; }
.rcard-ic { font-size: 22px; }
.rcard-share { font-size: 20px; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.rcard-share:active { background: var(--card-hi); }
.rcard-radar { display: flex; justify-content: center; margin: 4px 0 10px; }
.rcard-radar svg { width: 220px; height: auto; }
.rcard-row { margin-top: 7px; }
.rcard-row .rcard-lab { flex: 1; width: auto; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-row .rcard-val { display: flex; flex-direction: column; align-items: flex-end; width: auto; font-size: 13px; font-weight: 700; flex: none; }
.rcard-row .rcard-val small { width: auto; color: var(--muted); font-size: 11px; font-weight: 600; }

/* ════════ EN VIVO ════════ */
.live-slot:empty { display: none; }
.livecard {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 4px;
  background: linear-gradient(135deg, rgba(229,57,53,.18), var(--card));
  border: 1px solid #e53935; border-radius: 16px; padding: 14px 14px;
  color: var(--txt); cursor: pointer; text-align: left;
}
.livecard:active { transform: scale(.98); }
.livecard.recent { background: linear-gradient(135deg, rgba(245,185,66,.16), var(--card)); border-color: var(--warn); }
.live-pill.recent { background: var(--warn); color: #2a1c00; }
.live-mtxt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.live-mtxt b { font-size: 15px; }
.live-mtxt small { color: var(--muted); font-size: 12px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: #e53935; color: #fff; font-weight: 800; font-size: 12px;
  padding: 4px 10px; border-radius: 20px; letter-spacing: .5px;
}
.live-pill.ended { background: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: livepulse 1.1s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.live-board {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 12px; margin-bottom: 12px;
}
.lb-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; font-size: 13px; }
.lb-team .flag-emoji { font-size: 34px; }
.lb-score { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lb-score b { font-size: 30px; font-weight: 900; }
.live-ctrl { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.live-ctrl .xiselect { flex: 1; margin: 0; }

/* ════════ Campo en vivo (alineaciones) ════════ */
.lineup-pitch { aspect-ratio: 100 / 150; }
.lineup-chip {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 64px; text-align: center; cursor: pointer;
}
.lineup-chip .lu-dot {
  min-width: 42px; height: 28px; padding: 0 7px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45); border: 1.5px solid rgba(255, 255, 255, .55);
}
.lineup-chip b { font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); white-space: nowrap; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
.lu-line {
  position: absolute; left: 4px; transform: translateY(-50%);
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  color: rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .28);
  padding: 1px 5px; border-radius: 6px;
}
/* Banquillo (suplentes que jugaron) */
.lu-bench { display: flex; flex-direction: column; gap: 12px; }
.lu-bench-team { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lu-bench-h { width: 100%; color: var(--muted); font-weight: 800; }
.lu-sub {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card-hi); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 9px; color: var(--txt); cursor: pointer; font-size: 12px;
}
.lu-sub b { font-weight: 700; }
.lu-sub span { color: var(--acc); font-weight: 800; }
.lu-sub i { color: var(--muted); font-style: normal; font-size: 11px; }

/* ════════ Hub: pills extra ════════ */
.live-pill.upcoming { background: var(--card-hi); color: var(--muted); }
.livecard.upcoming { opacity: .65; border-color: var(--line); background: var(--card); cursor: default; }
.livecard:disabled { pointer-events: none; }

/* ════════ Aviso de récords batidos ════════ */
.rec-slot:empty { display: none; }
.recalert {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 4px;
  background: linear-gradient(135deg, rgba(245,185,66,.22), var(--card));
  border: 1px solid var(--warn); border-radius: 16px; padding: 14px 14px;
  color: var(--txt); cursor: pointer; text-align: left;
}
.recalert:active { transform: scale(.98); }
.recalert-ic { font-size: 28px; flex: none; }
.recalert-tx { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.recalert-tx b { font-size: 14px; }
.recalert-tx small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recalert-x { flex: none; color: var(--muted); font-size: 16px; padding: 4px 6px; border-radius: 8px; }
.recalert-x:active { background: var(--card-hi); }
.rec-badge { color: var(--warn); font-weight: 800; font-size: 10px; letter-spacing: .5px; }
.record-new { box-shadow: inset 3px 0 0 var(--warn); }

.leaders-cat { font-size: 15px; margin: 14px 2px 8px; color: var(--muted); letter-spacing: .5px; }
.seeall {
  width: 100%; margin-top: 8px; background: transparent; border: 1px dashed var(--line);
  border-radius: 10px; color: var(--acc); font-weight: 700; font-size: 13px; padding: 9px; cursor: pointer;
}
.seeall:active { background: var(--card-hi); }

/* ════════ Tabla de clasificación ════════ */
.sttable { display: flex; flex-direction: column; gap: 2px; }
.st-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 30px 38px 34px; align-items: center; gap: 6px;
  padding: 9px 6px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.st-row:not(.st-head):active { background: var(--card-hi); }
.st-head { color: var(--muted); font-size: 11px; font-weight: 700; cursor: default; padding-bottom: 4px; }
.st-head span:not(.st-team), .st-row span:not(.st-team):not(.st-pos):not(.st-pts) { text-align: center; }
.st-pos { text-align: center; color: var(--muted); font-weight: 700; }
.st-team { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-team .flag-emoji, .st-team .flag-mini { font-size: 18px; flex: none; }
.st-pts { text-align: center; font-weight: 800; color: var(--acc); }
.st-qual { box-shadow: inset 3px 0 0 var(--acc); }
.st-qual .st-pos { color: var(--acc); }

/* ════════ Timeline del partido ════════ */
.tl { display: flex; flex-direction: column; gap: 4px; }
.tl-row {
  display: grid; grid-template-columns: 46px 26px 1fr; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.tl-row.a { grid-template-columns: 1fr 26px 46px; text-align: right; }
.tl-row.a .tl-txt { order: -1; }
.tl-min { color: var(--muted); font-weight: 800; font-size: 13px; }
.tl-row.a .tl-min { text-align: right; }
.tl-ic { font-size: 18px; text-align: center; }
.tl-txt { display: flex; flex-direction: column; min-width: 0; }
.tl-txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-txt small { color: var(--muted); font-size: 11px; }
.tl-row.a .tl-txt { align-items: flex-end; }

/* ════════ Modo Prensa ════════ */
.press-note { color: var(--muted); font-size: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.pressfact {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
}
.pf-ic { font-size: 30px; flex: none; }
.pf-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-tx b { font-size: 14px; }
.pf-tx small { color: var(--muted); font-size: 12px; }
.pf-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.press-export { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-btn {
  background: var(--card-hi); border: 1px solid var(--line); border-radius: 10px;
  color: var(--txt); font-size: 12px; font-weight: 700; padding: 8px 11px; cursor: pointer; white-space: nowrap;
}
.pf-btn:active { border-color: var(--acc); background: var(--bg2); }
.press-export .pf-btn { flex: 1; text-align: center; }

/* Prensa: foto del jugador en titulares + plantilla por posición */
.pf-vis { position: relative; flex: none; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
.pf-vis .avatar { width: 46px; height: 46px; }
.pf-badge { position: absolute; bottom: -3px; right: -5px; font-size: 17px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.squad-pos { margin-bottom: 8px; }
.squad-pos h4 { font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: .5px; margin: 10px 2px 6px; }

/* ════════ Tiempo efectivo ════════ */
.te-big { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.te-big-n { font-size: 40px; font-weight: 900; color: var(--acc); line-height: 1; }
.te-big-l { font-size: 14px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.te-bar { height: 12px; border-radius: 7px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.te-bar-eff { height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 7px; }
.te-legend { font-size: 11px; color: var(--muted); margin-top: 7px; }
.te-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: -1px; margin: 0 3px 0 6px; }
.te-dot.eff { background: var(--acc); }
.te-dot.dead { background: var(--bg2); border: 1px solid var(--line); }

.te-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 44px; align-items: center; gap: 8px; width: 100%; padding: 9px 4px; background: none; border: none; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--txt); }
.te-row:last-child { border-bottom: none; }
.te-row:active { background: var(--card-hi); }
.te-row-teams { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; overflow: hidden; white-space: nowrap; }
.te-row-teams .flag-emoji { font-size: 16px; }
.te-score { color: var(--muted); font-weight: 800; margin: 0 3px; }
.te-row-bar { min-width: 0; }
.te-row-pct { text-align: right; font-weight: 900; color: var(--acc); font-size: 15px; }

.te-score-head { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 10px; }
.te-sh-team { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 17px; font-weight: 800; }
.te-score-head .te-sh-team:last-child { justify-content: flex-end; }
.te-sh-team .flag-emoji { font-size: 22px; }
.te-sh-score { font-size: 24px; font-weight: 900; color: var(--acc); white-space: nowrap; }

.te-h-pct { float: right; color: var(--acc); font-weight: 900; }
.te-sub { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; align-items: center; padding: 5px 0; font-size: 13px; color: var(--muted); }
.te-sub > .te-bar { grid-column: 1 / -1; }
.te-sub-tot { color: var(--txt); }
.te-sub-v { text-align: right; white-space: nowrap; }
.te-sub small { font-size: 11px; opacity: .8; }

.te-hyd-card { border-color: var(--warn); background: linear-gradient(180deg, color-mix(in srgb, var(--warn) 9%, var(--card)), var(--card)); }
.te-hyd-lead { font-size: 13px; color: var(--txt); margin: 2px 0 10px; line-height: 1.45; }

.te-cause { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) 46px; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.te-cause-n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.te-cause-n small { color: var(--muted); }
.te-cause-bar { height: 8px; border-radius: 5px; background: var(--bg2); overflow: hidden; min-width: 0; }
.te-cause-bar span { display: block; height: 100%; background: var(--muted); border-radius: 5px; }
.te-cause-s { text-align: right; color: var(--muted); font-weight: 700; }

.te-back { background: none; border: none; color: var(--acc); font-size: 14px; font-weight: 700; padding: 4px 0 10px; cursor: pointer; }
.te-approx { margin-top: 8px; color: var(--warn); font-size: 11px; }
.te-venue { font-size: 12px; color: var(--muted); margin: -2px 0 8px; }
.te-weather { font-size: 13px; color: var(--txt); margin: -2px 0 8px; opacity: .92; }
.te-dim { color: var(--muted); font-weight: 400; }

/* Pausas de hidratación: ranking */
.hyd-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px 4px; background: none; border: none; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--txt); text-align: left; }
.hyd-row:last-child { border-bottom: none; }
.hyd-row:active { background: var(--card-hi); }
.hyd-rank { text-align: center; font-weight: 800; color: var(--muted); font-size: 15px; }
.hyd-rank.medal { font-size: 18px; }
.hyd-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hyd-match { display: flex; align-items: center; gap: 5px; font-size: 14px; min-width: 0; overflow: hidden; white-space: nowrap; }
.hyd-match .flag-emoji { font-size: 16px; }
.hyd-sc { color: var(--muted); font-weight: 800; margin: 0 2px; }
.hyd-half { color: var(--acc); font-weight: 700; font-size: 12px; margin-left: 4px; }
.hyd-wx { font-size: 12.5px; color: var(--txt); opacity: .9; }
.hyd-venue { font-size: 11.5px; color: var(--muted); }
.hyd-dur { font-weight: 900; color: var(--acc); font-size: 18px; white-space: nowrap; }

/* Tarjetas */
.tj-yr { font-weight: 800; font-size: 13px; white-space: nowrap; }
.tj-card { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tj-card:last-child { border-bottom: none; }
.tj-card:active { background: var(--card-hi); }
.tj-ic { font-size: 16px; flex: none; width: 30px; text-align: center; }
.tj-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tj-name { font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tj-link { color: var(--acc); cursor: pointer; }
.tj-team { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 4px; }
.tj-meta { font-size: 12px; color: var(--muted); }
.tj-bucket { display: grid; grid-template-columns: 56px minmax(0, 1fr) 28px; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
.tj-bk-l { color: var(--muted); }
.tj-bk-bar { height: 9px; border-radius: 5px; background: var(--bg2); overflow: hidden; }
.tj-bk-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--warn), #e0863a); border-radius: 5px; }
.tj-bk-v { text-align: right; font-weight: 700; }

/* Árbitros */
.arb-co { color: var(--muted); font-weight: 700; font-size: 12px; }
.arb-m { padding: 8px 2px; border-bottom: 1px solid var(--line); }
.arb-m:last-child { border-bottom: none; }
.arb-m-h { display: block; font-size: 14px; }
.arb-m-s { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Rating tipo SofaScore */
.rt-pill { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #06281f; vertical-align: 1px; }
.rt-chip b { color: inherit; }
.rt-hot { background: #2dd4a8; color: #06281f; }
.rt-ok { background: var(--warn); color: #2a1c00; }
.rt-low { background: #e9707a; color: #2a0006; }
.chip.rt-chip.rt-hot { border-color: transparent; background: #2dd4a8; color: #06281f; }
.chip.rt-chip.rt-ok { border-color: transparent; background: var(--warn); color: #2a1c00; }
.chip.rt-chip.rt-low { border-color: transparent; background: #e9707a; color: #2a0006; }
.sub-rat { display: grid; grid-template-columns: 88px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.sr-l { color: var(--muted); font-weight: 700; }
.sr-bar { height: 10px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.sr-bar span { display: block; height: 100%; border-radius: 6px; }
.sr-v { text-align: right; font-weight: 800; }
.sub-rat-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.sub-rat-legend .srl { display: inline-flex; align-items: center; gap: 5px; }
.sub-rat-legend .rt-pill { min-width: 26px; text-align: center; }
