/* EL MÍSTER — interfaz móvil (iPhone, iPad y navegador). Paleta de marca en docs/MARCA.md */
:root {
  --bg: #061a13; --bg2: #0a231a; --card: #0f2c21; --card2: #143728; --line: #224a39;
  --gold: #d4af37; --gold-hi: #f0d27a; --bone: #f4f1e8;
  --text: #f4f1e8; --muted: #adc4b8; --dim: #819d8f;   /* V5.3: más contraste en textos secundarios */
  --green: #2ecc71; --green2: #1e9c55; --blue: #3a9bdc; --yellow: #f1c40f; --red: #e74c3c; --orange: #e68c28;
  --r: 14px; --tap: 44px;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
  --nav: 62px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overscroll-behavior: none; }
body { font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: var(--tap); width: 100%; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
/* La zona de contenido es la que se desplaza (también en iPhone): sin min-height:0 crecería con el contenido y nada se desplazaría. */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.view { min-height: 0; }

/* Cabecera */
.top { padding: calc(var(--st) + 8px) calc(var(--sr) + 16px) 8px calc(var(--sl) + 16px); background: rgba(6,26,19,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; z-index: 5; }
.top h1 { font-size: 20px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .back { min-width: var(--tap); min-height: var(--tap); margin-left: -10px; font-size: 26px; color: var(--green); }
.top .money { font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.money.neg { color: var(--red); }

/* Contenido */
.view { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-padding-top: 12px; scroll-padding-bottom: calc(var(--nav) + var(--sb) + 16px); -webkit-overflow-scrolling: touch; padding: 14px calc(var(--sr) + 14px) calc(var(--nav) + var(--sb) + 18px) calc(var(--sl) + 14px); }
.grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 700; }
.card h3 { font-size: 17px; margin: 0 0 6px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .tiny { font-size: 11.5px; }
.good { color: var(--green); } .bad { color: var(--red); } .warn { color: var(--yellow); }
.b { font-weight: 700; } .num { font-variant-numeric: tabular-nums; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }
.center { text-align: center; }

/* Botones */
.btn { min-height: var(--tap); padding: 10px 16px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line);
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:active { transform: scale(.98); filter: brightness(1.15); }
.btn.primary { background: var(--green); color: #052012; border-color: transparent; }
.btn.blue { background: var(--blue); color: #04121d; border-color: transparent; }
.btn.danger { background: #5a1d18; border-color: #8a2d25; }
.btn.block { width: 100%; }
.btn.big { min-height: 54px; font-size: 18px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); white-space: nowrap; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--green); color: #052012; border-color: transparent; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { min-height: 40px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 4px 6px; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: 0 1px 0 var(--line); }
.toggle { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); }
.switch { width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--green); } .switch.on::after { transform: translateX(20px); }

/* Indicadores */
.bar { height: 7px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.pos { display: inline-block; min-width: 38px; text-align: center; border-radius: 6px; font-size: 12px; font-weight: 800; padding: 2px 4px; color: #081018; }
.pos.POR { background: #f1c40f; } .pos.DEF { background: #3a9bdc; } .pos.MED { background: #2ecc71; } .pos.DEL { background: #e74c3c; }
.ovr { min-width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--card2); }
.ovr.g { background: rgba(46,204,113,.18); color: var(--green); } .ovr.b { background: rgba(58,155,220,.18); color: var(--blue); }
.ovr.y { background: rgba(241,196,15,.16); color: var(--yellow); } .ovr.r { background: rgba(231,76,60,.18); color: var(--red); }
.ovr.range { font-size: 12px; color: var(--muted); }
.res { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.res.V { background: var(--green2); } .res.E { background: #b8901f; color: #1b1404; } .res.D { background: #a8392f; }   /* V verde, E dorado, D rojo (con letra siempre) */
.badge { width: 40px; height: 40px; flex: none; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card2); color: var(--muted); }
.pill.red { background: rgba(231,76,60,.2); color: #ff8f84; } .pill.yellow { background: rgba(241,196,15,.18); color: var(--yellow); }
.pill.green { background: rgba(46,204,113,.18); color: var(--green); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* Listas */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.item:last-child { border-bottom: 0; }
.item:active { background: var(--card2); }
.item .meta { font-size: 12.5px; color: var(--muted); }
.minibars { width: 64px; display: grid; gap: 4px; flex: none; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.t th { color: var(--muted); font-weight: 600; font-size: 12px; text-align: right; padding: 6px 4px; }
table.t td { text-align: right; padding: 9px 4px; border-top: 1px solid var(--line); }
table.t td:nth-child(2), table.t th:nth-child(2) { text-align: left; }
table.t tr.me td { background: rgba(58,155,220,.16); }
.zone-up, .zone-champ { box-shadow: inset 3px 0 0 var(--green); } .zone-po, .zone-euro { box-shadow: inset 3px 0 0 var(--blue); } .zone-down { box-shadow: inset 3px 0 0 var(--red); }

/* Inicio */
.hero { display: flex; gap: 14px; align-items: center; }
.hero .badge { width: 56px; height: 56px; }
.next { background: linear-gradient(160deg, #134a33, #0c2c20); border-color: #2a6447; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; margin: 10px 0 14px; }
.versus .badge { width: 54px; height: 54px; margin: 0 auto 6px; display: block; }
.versus .vs { font-weight: 900; color: var(--muted); font-size: 18px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg2); margin-top: 8px; font-size: 14px; }

/* Barra inferior */
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav) + var(--sb)); padding: 0 var(--sr) var(--sb) var(--sl);
  background: rgba(13,20,30,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); z-index: 6; }
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
.nav button svg { width: 25px; height: 25px; }
.nav button.on { color: var(--gold); }
.nav .count { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--red); color: #fff; font-size: 10px; border-radius: 9px; padding: 1px 5px; }

/* Hojas (paneles desplegables) */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 32; opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92%; background: var(--bg2); border-radius: 20px 20px 0 0; z-index: 33;
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .25s ease; border-top: 1px solid var(--line); }
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 4px; flex: none; }
.sheet .shead { display: flex; align-items: center; gap: 10px; padding: 4px 16px 10px; }
.sheet .shead h2 { flex: 1; margin: 0; font-size: 19px; }
.sheet .sbody { overflow-y: auto; padding: 0 calc(var(--sr) + 16px) calc(var(--sb) + 20px) calc(var(--sl) + 16px); }
.close { min-width: var(--tap); min-height: var(--tap); border-radius: 50%; font-size: 22px; color: var(--muted); }

/* Avisos y carga */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--st) + 60px); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 40; pointer-events: none; padding: 0 16px; }
.toast { background: #0a0f16; border: 1px solid var(--line); border-left: 4px solid var(--blue); padding: 10px 14px; border-radius: 12px; font-size: 14px; max-width: 520px; box-shadow: 0 6px 20px rgba(0,0,0,.4); animation: tin .25s ease; }
.toast.good { border-left-color: var(--green); } .toast.bad { border-left-color: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.busy { position: fixed; inset: 0; z-index: 38; background: rgba(8,12,18,.82); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 30px; text-align: center; }
.busy .bar { width: min(320px, 80vw); height: 9px; }
.splash { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 30px; }
.splash img { width: min(300px, 70vw); height: auto; }
.splash .slogan { color: var(--gold); font-weight: 700; letter-spacing: .02em; }
.brandline { width: 48px; height: 2px; background: var(--gold); border-radius: 2px; }
.splash h1 { margin: 0; font-size: 26px; }

/* Táctica */
.pitch { position: relative; width: 100%; aspect-ratio: 68 / 100; max-height: 62vh; margin: 0 auto; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(180deg, #23793f 0 10%, #1f6e39 10% 20%); border: 2px solid #3b9a5a; }
.pitch svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 72px; min-height: var(--tap); }
.slot .disc { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; border: 3px solid #fff; background: #0b3d2e; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.slot .nm { margin-top: 2px; font-size: 11px; font-weight: 700; background: rgba(5,20,10,.75); padding: 1px 5px; border-radius: 4px; max-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .rl { font-size: 9.5px; color: #cfe9d6; max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.sel .disc { border-color: var(--yellow); transform: scale(1.12); }
.slot.warn .nm { color: var(--yellow); } .slot.out .nm { color: #ff8f84; }

/* Partido */
.match { position: fixed; inset: 0; z-index: 25; background: var(--bg); display: flex; flex-direction: column; }
.score { padding: calc(var(--st) + 6px) calc(var(--sr) + 12px) 8px calc(var(--sl) + 12px); background: var(--bg2); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.score .tm { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; min-width: 0; }
.score .tm:last-child { justify-content: flex-end; text-align: right; }
.score .res2 { text-align: center; } .score .gl { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.score .clk { font-size: 13px; color: var(--green); font-weight: 700; }
.mbody { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.field { position: relative; flex: none; background: #1c6a36; }
.field canvas { display: block; width: 100%; height: 100%; }
.flash { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 34px; font-weight: 900; color: var(--yellow); text-shadow: 0 3px 12px rgba(0,0,0,.6); pointer-events: none; }
.mpanel { flex: 1; overflow-y: auto; padding: 10px calc(var(--sr) + 12px) 10px calc(var(--sl) + 12px); min-height: 0; }
.mctl { padding: 8px calc(var(--sr) + 12px) calc(var(--sb) + 8px) calc(var(--sl) + 12px); background: var(--bg2); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.log div { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; gap: 8px; }
.log b { color: var(--muted); min-width: 34px; font-variant-numeric: tabular-nums; }
.log .goal { color: var(--yellow); font-weight: 700; } .log .bad { color: #ff8f84; } .log .sub { color: #8cc8f0; } .log .card { color: var(--orange); }
.sbar { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; font-size: 14px; margin: 7px 0; font-variant-numeric: tabular-nums; }
.sbar .tw { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: flex; }

/* Formularios */
.field-row { display: grid; gap: 6px; margin-bottom: 12px; }
.field-row label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stepper { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: center; gap: 8px; }
.stepper button { min-height: var(--tap); border-radius: 12px; background: var(--card2); font-size: 22px; }
.stepper .v { text-align: center; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.attr { display: flex; justify-content: space-between; font-size: 14px; }

/* Más */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 14px; text-align: left; min-height: 92px; display: flex; flex-direction: column; gap: 6px; }
.tile svg { width: 26px; height: 26px; color: var(--green); }
.tile b { font-size: 16px; }

/* iPad y pantallas grandes: navegación lateral, varias columnas y panel lateral en lugar de hoja inferior */
@media (min-width: 820px) {
  :root { --nav: 0px; }
  #app { flex-direction: row; }
  .nav { position: static; width: calc(92px + var(--sl)); height: auto; grid-template-columns: 1fr; grid-auto-rows: 78px; align-content: start;
    padding: calc(var(--st) + 16px) 0 0 var(--sl); border-top: 0; border-right: 1px solid var(--line); order: -1; }
  .main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .view { padding-bottom: calc(var(--sb) + 24px); }
  .cols-2 { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .cols-3 { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr); }
  .span-2 { grid-column: span 2; }
  .sheet { left: auto; top: 0; width: min(480px, 46vw); max-height: none; border-radius: 0; transform: translateX(100%); border-top: 0; border-left: 1px solid var(--line); }
  .sheet.open { transform: none; }
  .sheet .grab { display: none; }
  .sheet .shead { padding-top: calc(var(--st) + 14px); }
  .pitch { max-height: 70vh; }
}
@media (min-width: 1180px) { .cols-3w { grid-template-columns: 1.2fr 1fr 1fr; } }
/* Partido en horizontal: campo a la izquierda, datos a la derecha */
@media (orientation: landscape) and (max-height: 600px), (min-width: 1000px) and (orientation: landscape) {
  .mbody { flex-direction: row; }
  .field { flex: 1.5; height: auto !important; margin-left: var(--sl); }   /* iPhone en horizontal: fuera de la isla y la muesca */
  .mside { flex: 1; display: flex; flex-direction: column; min-width: 280px; max-width: 420px; border-left: 1px solid var(--line); }
}
.mside { display: contents; }
@media (orientation: landscape) and (max-height: 600px), (min-width: 1000px) and (orientation: landscape) { .mside { display: flex; } }

/* ---------------- Centro de mando (V5, fase B) ---------------- */
.hub { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.hub-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 820px) { .hub { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } .hub-col:nth-child(3) { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
@media (min-width: 1280px) { .hub { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .95fr); } .hub-col:nth-child(3) { grid-column: auto; grid-template-columns: minmax(0, 1fr); } }
.hero-card .hero { margin-bottom: 10px; }
.hub-money { text-align: right; display: flex; flex-direction: column; } .hub-money b { color: var(--green); font-size: 17px; }
.hub-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.hub-kpis > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .kpi-v { color: var(--text); }
@media (max-width: 420px) { .hub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hub-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 0; border-bottom: 1px solid rgba(34, 74, 57, .6); text-align: left; min-height: var(--tap); }
.hub-row:last-child { border-bottom: 0; }
.hub-row .avatar { flex: 0 0 auto; }
.hub-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--bg2); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: 0 0 auto; }
.chev { color: var(--dim); font-size: 20px; }
.decision { background: rgba(212, 175, 55, .07); border-radius: 10px; padding-left: 6px; margin-bottom: 4px; }
.gold-t { color: var(--gold); }
.btn.gold { background: linear-gradient(180deg, #e9c55a, #c9a033); color: #1b1404; border-color: transparent; font-weight: 800; box-shadow: 0 6px 18px rgba(212, 175, 55, .22); }
.btn.gold:active { transform: translateY(1px); }
.advice { border-color: rgba(212, 175, 55, .35); }
.hub-news { padding: 6px 0 8px; border-bottom: 1px solid rgba(34, 74, 57, .6); }
table.mini td { padding: 6px 4px; } table.mini tr.me td { background: rgba(212, 175, 55, .10); }
.z-champ, .z-euro, .z-up { box-shadow: inset 3px 0 0 var(--green); } .z-po { box-shadow: inset 3px 0 0 var(--blue); } .z-down { box-shadow: inset 3px 0 0 var(--red); }
.card h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.avatar { border-radius: 50%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.radar-box { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.radar-box .radar { max-width: 100%; height: auto; }
.item .avatar { width: 36px; height: 36px; flex: 0 0 auto; }
.who { position: relative; flex: 0 0 auto; display: inline-flex; }
.who .avatar { width: 38px; height: 38px; }
.who .pos { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 9.5px; padding: 0 4px; line-height: 14px; }
.item .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .item .minibars { width: 46px; } }
.chip.gold-chip { background: rgba(212,175,55,.16); border-color: rgba(212,175,55,.55); color: var(--gold-hi); }
/* ---------------- Partido (V5): momentum, jugadores en directo y descanso ---------------- */
.mom { margin-bottom: 8px; }
.mom-bars { position: relative; display: flex; gap: 2px; height: 36px; align-items: stretch; margin-top: 3px; }
.mom-bars i { flex: 1; border-radius: 2px; min-width: 2px; }
.mom-mid { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.prow-live { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(34,74,57,.6); font-size: 14px; }
.pos-mini { font-size: 11px; font-weight: 800; color: var(--muted); width: 34px; }
.stam { width: 54px; height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; } .stam i { display: block; height: 100%; }
.rat { width: 34px; text-align: right; }
.ht-score { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 30px; }
.ht-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.ht-stat { background: var(--bg2); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.talks { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.talks .btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-height: 56px; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.fin-hero { background: linear-gradient(160deg, #134a33, #0c2c20); border-color: #2a6447; }
.fin-hero.win { border-color: rgba(212,175,55,.6); box-shadow: 0 0 0 1px rgba(212,175,55,.25) inset; }
.fin-hero.loss { background: linear-gradient(160deg, #2a1d1d, #0c2c20); }
.fin-score { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: start; gap: 8px; margin-top: 8px; }
.fin-tm { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.fin-num { font-size: 40px; font-weight: 900; text-align: center; line-height: 1.1; padding-top: 10px; }
.fin-tm b { display: block; max-width: 100%; font-size: 14px; line-height: 1.2; }
.fin-num { font-size: 34px; white-space: nowrap; }
.fin-num .tiny { font-size: 11px; font-weight: 600; }
/* ---------------- Navegación V5: menú lateral, búsqueda, bandeja y accesibilidad ---------------- */
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); font-size: 21px; line-height: 1; color: var(--text); flex: 0 0 auto; }
.icon-btn .count { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 10px; border-radius: 9px; padding: 1px 5px; line-height: 1.3; }
.top .money { margin-left: 4px; }
@media (min-width: 1180px) {
  .nav.wide { width: calc(232px + var(--sl)); grid-auto-rows: auto; gap: 2px; padding: 12px 10px 16px calc(var(--sl) + 10px); overflow-y: auto; }
  .nav.wide .nav-brand { padding: 6px 8px 14px; } .nav.wide .nav-brand img { width: 150px; height: auto; }
  .nav.wide button { height: 42px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
  .nav.wide button svg { width: 20px; height: 20px; }
  .nav.wide button.on { background: var(--card); box-shadow: inset 3px 0 0 var(--gold); }
  .nav.wide button .count { position: static; margin-left: auto; }
  .side-ico { width: 20px; text-align: center; font-size: 15px; }
}
.view, .sheet .sbody { zoom: var(--zoom, 1); }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
/* ---------------- Creación de carrera en 9 pasos ---------------- */
.wiz-steps { display: flex; gap: 4px; padding: 6px calc(var(--sr) + 16px) 0 calc(var(--sl) + 16px); }
.wiz-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); } .wiz-steps i.on { background: var(--gold); }
.choices { display: grid; gap: 8px; } .choices.grid-3 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); min-height: var(--tap); }
.choice.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(212,175,55,.4); background: var(--card2); }
.choice.off { opacity: .5; }
.avatars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.avatar-pick { display: flex; justify-content: center; padding: 8px; border-radius: 16px; border: 2px solid transparent; background: var(--card); }
.avatar-pick.on { border-color: var(--gold); } .avatar-pick .avatar { width: 64px; height: 64px; }
.presentation { background: linear-gradient(160deg, #134a33, #0c2c20); border-color: rgba(212,175,55,.5); }

/* ---- guardado automático, bienvenida y carreras */
.save-state { font-size: 11px; color: var(--muted); white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.save-state.ok::before { content: '✓ '; color: var(--good, #3fbf7f); }
.save-state.bad { color: var(--bad, #e5534b); font-weight: 700; cursor: pointer; text-decoration: underline; }
@media (max-width: 420px) { .save-state:not(.bad) { display: none; } }
.welcome { border: 1px solid var(--gold); background: linear-gradient(160deg, rgba(212, 175, 55, .10), transparent 60%), var(--card); text-align: left; }
.career { text-align: left; }
.career-empty { width: 100%; }
.btn.small.danger { color: var(--bad, #e5534b); }
/* ---- compartir */
.share-prev { display: flex; justify-content: center; background: var(--bg2); border-radius: 12px; padding: 8px; }
.share-canvas { max-width: 100%; max-height: 46vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
#shareText { font: inherit; font-size: 14px; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px; resize: vertical; box-sizing: border-box; }
.splash.menu { z-index: 30; }   /* el menú de carreras admite hojas (importar, avisos) por encima */

/* ---- «Ayúdanos a mejorar» (formulario compartido por la app y la web) */
.fb { display: grid; gap: 6px; text-align: left; }
.fb-intro { margin: 0 0 6px; color: var(--muted, #b9c4be); line-height: 1.5; }
.fb-l { font-size: 13px; font-weight: 700; margin-top: 6px; }
.fb-opt { font-weight: 400; color: var(--muted, #9aa8a0); font-size: 12px; }
.fb input:not([type=checkbox]):not([type=file]), .fb select, .fb textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line, rgba(255,255,255,.14)); background: var(--bg2, #0b241b); color: var(--text, #f4f1e8); }
.fb textarea { resize: vertical; min-height: 90px; }
.fb input[type=file] { font-size: 14px; color: var(--muted, #b9c4be); }
.fb :focus-visible { outline: 2px solid var(--gold, #d4af37); outline-offset: 1px; }
.fb .fb-bad { border-color: #e5534b !important; box-shadow: 0 0 0 2px rgba(229,83,75,.25); }
.fb-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .fb-2 { grid-template-columns: 1fr; } }
.fb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.fb-prev img { max-width: 160px; max-height: 120px; border-radius: 8px; margin-top: 6px; border: 1px solid var(--line, rgba(255,255,255,.14)); }
.fb-tech { font-size: 13px; background: rgba(212,175,55,.06); border: 1px solid rgba(212,175,55,.25); border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.fb-tech summary { cursor: pointer; }
.fb-tech ul { margin: 8px 0; padding-left: 18px; } .fb-tech li span { color: var(--muted, #9aa8a0); }
.fb-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; margin-top: 8px; }
.fb-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: #d4af37; }
.fb-check.fb-bad, .fb-check:has(.fb-bad) { color: #ff8b84; }
.fb-status { font-size: 14px; min-height: 1px; } .fb-status.bad { color: #ff8b84; } .fb-status a { color: #d4af37; }
.fb-send { margin-top: 6px; }
.fb-alt { font-size: 13px; color: var(--muted, #9aa8a0); text-align: center; } .fb-alt a { color: #d4af37; }
.fb-done { text-align: center; padding: 18px 6px; }
.fb-done-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 28px; font-weight: 900; background: #d4af37; color: #061a13; }
.fb-done h3 { font-size: 22px; margin: 0 0 6px; } .fb-ref { color: var(--muted, #9aa8a0); }
.div-seg button { font-size: 12px; padding: 4px 2px; white-space: nowrap; }
/* ---- crear tu propio club */
.cc-crest-prev { display: flex; justify-content: center; margin: 4px 0 10px; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.cc-chip { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); display: grid; place-items: center; padding: 0; }
.cc-chip.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,175,55,.35); }
.cc-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.cc-colors label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.cc-colors input[type=color] { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); padding: 2px; }
.cc-kits { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cc-kit { display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); }
.cc-kit.on { border-color: var(--gold); }
.choices.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 420px) { .choices.grid-2 { grid-template-columns: 1fr; } }
input[type=range] { width: 100%; accent-color: #d4af37; }
.cc-crest-prev .badge, .presentation .badge, .card.row > .badge { width: auto; height: auto; flex: none; }
.fb-off { background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.5); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.fb-send[disabled] { opacity: .55; cursor: not-allowed; }
.ver-chip { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted, #9fb3a8); }
.beta-chip { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #061a13; background: #d4af37; vertical-align: middle; }
/* ---- «Invítame a un café» (solo web) */
.coffee-card { border: 1px solid rgba(212,175,55,.45); background: linear-gradient(160deg, rgba(212,175,55,.08), transparent 60%), var(--card); }
.coffee-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
@media (max-width: 520px) { .coffee-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.coffee-tier { display: grid; gap: 2px; justify-items: center; padding: 10px 6px; border-radius: 12px; text-decoration: none; color: var(--text);
  border: 1px solid rgba(212,175,55,.45); background: rgba(212,175,55,.06); }
.coffee-tier b { color: var(--gold); font-size: 18px; } .coffee-name { font-size: 12px; color: var(--muted); }
.neg-rounds { margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: var(--bg2); }
.preview-strip { display: block; width: 100%; text-align: left; margin-top: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(212,175,55,.35); background: rgba(212,175,55,.06); color: var(--text); }
.timeline { border-left: 2px solid rgba(212,175,55,.35); margin-left: 10px; padding-left: 10px; }
.tl-row { display: flex; gap: 8px; padding: 5px 0; position: relative; }
.tl-row.big .small { font-weight: 700; color: var(--gold); }
.tl-ico { width: 20px; flex: none; text-align: center; margin-left: -21px; background: var(--card); }

/* ---- V5.2 · personalidad: prensa, grada, resumen, progreso ---- */
.season-prog { margin-top: 10px; }
.season-prog .bar { margin-top: 4px; }
.press-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 1px 7px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; background: rgba(244,241,232,.1); color: var(--muted); }
.press-tag.press-nac { background: rgba(212,175,55,.16); color: var(--gold); }
.press-tag.press-loc { background: rgba(46,160,103,.18); color: #7fd6a8; }
.press-tag.press-sen { background: rgba(214,69,69,.18); color: #ff9c9c; }
.hub-news b { display: block; margin-top: 3px; }
.press-front-mini { display: block; width: 100%; text-align: left; background: var(--bone, #f4f1e8); color: #10231b; border-radius: 10px; padding: 10px 12px; margin: 4px 0 8px; border-top: 5px solid var(--gold); }
.press-front-mini .tiny { font-weight: 800; letter-spacing: .04em; color: #4b5a52; }
.press-front-mini b { display: block; font-size: 17px; line-height: 1.2; margin-top: 2px; }
.press-front { background: #f4f1e8; color: #10231b; border-radius: 12px; padding: 16px; border-top: 8px solid var(--gold); text-align: center; }
.press-front .pf-mast { font-weight: 900; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; border-bottom: 2px solid #10231b; padding-bottom: 6px; }
.press-front .pf-date { font-size: 12px; color: #4b5a52; margin: 6px 0 10px; }
.press-front .pf-head { font-weight: 900; font-size: 24px; line-height: 1.15; }
.press-front .pf-sub { font-size: 15px; margin-top: 8px; color: #33443b; }
.fan-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(34,74,57,.6); align-items: flex-start; }
.fan-row:last-child { border-bottom: 0; }
.fan-av { flex: 0 0 30px; height: 30px; border-radius: 50%; background: rgba(212,175,55,.18); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.curious { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(212,175,55,.4); }
.link { color: var(--gold); text-decoration: underline; background: none; padding: 0 2px; min-height: 0; }
.resume-card { border: 1px solid rgba(212,175,55,.45); margin-bottom: 12px; animation: resumeIn .25s ease-out; }
.news-group { margin: 10px 0 2px; }
.news-group:first-child { margin-top: 0; }
@keyframes resumeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
html.reduce-motion .resume-card { animation: none; }

/* ---- V5.3 · tutorial y ayudas contextuales (no bloquean: solo el globo recibe toques) ---- */
.tut { position: fixed; left: 12px; right: 12px; max-width: 420px; margin: 0 auto; z-index: 90; background: var(--card, #10251d); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: tutIn .2s ease-out; }
.tut-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.tut-x { min-width: 36px; min-height: 36px; color: var(--muted); font-size: 18px; }
.tut-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.tut-ring { position: fixed; z-index: 89; pointer-events: none; border: 2px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 4px rgba(212,175,55,.25); transition: all .2s ease; }
.tip-toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--sb, 0px) + 84px); max-width: 460px; margin: 0 auto; z-index: 80; background: var(--card, #10251d); border: 1px dashed rgba(212,175,55,.6); border-radius: 12px; padding: 10px 12px; font-size: 14px; animation: tutIn .2s ease-out; }
@keyframes tutIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html.reduce-motion .tut, html.reduce-motion .tip-toast { animation: none; }
html.reduce-motion .tut-ring { transition: none; }

/* ---- V5.5 · editor de escudos ---- */
.ce h3 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ce-prev { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 4px; position: sticky; top: -2px; background: var(--bg2); z-index: 2; border-radius: 12px; }
.ce-big svg { width: 150px; height: 150px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.ce-rowwrap { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.ce-row { display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.ce-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.ce-wrap { flex-wrap: wrap; }
.ce-chip svg { vertical-align: -5px; }
.ce-sw { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ce-swatch { width: 30px; height: 30px; min-height: 30px; border-radius: 50%; border: 2px solid var(--line); }
.ce-sw input[type=color] { width: 40px; height: 32px; padding: 0; border: 0; background: none; }
.tlink { display: inline-flex; gap: 6px; align-items: center; color: inherit; text-align: left; min-height: 30px; }
.tlink svg { flex: 0 0 auto; }
/* ---- V5.4 · calendario con resultados ---- */
.cal-list { padding: 2px 12px; }
.cal-row { display: block; width: 100%; text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.cal-row:last-child { border-bottom: 0; }
.cal-row.dim { opacity: .6; }
.cal-top { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.cal-comp { font-weight: 700; } .cal-comp.c-C { color: var(--orange); } .cal-comp.c-E { color: var(--blue); } .cal-comp.c-P { color: var(--gold); }
.cal-main { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.cal-score { font-size: 18px; font-variant-numeric: tabular-nums; }
.cal-next { background: var(--card2); border-radius: 10px; padding: 8px 10px; border: 1px solid rgba(212,175,55,.5); }
/* ---- V5.3 · temas: oscuro (por defecto), claro y automático (según el sistema). Mismas variables de marca ---- */
html[data-theme="light"] {
  --bg: #f4f2eb; --bg2: #ebe7da; --card: #ffffff; --card2: #f3f0e6; --line: #d8d2bf;
  --gold: #a07b12; --gold-hi: #c39a2a; --bone: #10231b;
  --text: #10231b; --muted: #4c6157; --dim: #6b7c73;
  --green: #1b8a4c; --green2: #156f3d; --blue: #1f6aa5; --yellow: #a87c06; --red: #c0392b; --orange: #b8620f;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
  --bg: #f4f2eb; --bg2: #ebe7da; --card: #ffffff; --card2: #f3f0e6; --line: #d8d2bf;
  --gold: #a07b12; --gold-hi: #c39a2a; --bone: #10231b;
  --text: #10231b; --muted: #4c6157; --dim: #6b7c73;
  --green: #1b8a4c; --green2: #156f3d; --blue: #1f6aa5; --yellow: #a87c06; --red: #c0392b; --orange: #b8620f;
  color-scheme: light;
  }
}
html[data-theme="light"] .card, html[data-theme="auto"] .card { box-shadow: 0 1px 2px rgba(16,35,27,.06), 0 2px 10px rgba(16,35,27,.05); }

html[data-theme="light"] .next, html[data-theme="light"] .fin-hero { background: linear-gradient(160deg, #e3f1e8, #ffffff); border-color: #b9d6c4; }
html[data-theme="light"] .toast { background: #ffffff; box-shadow: 0 6px 20px rgba(16,35,27,.15); }
html[data-theme="light"] .btn.danger { background: #fbe5e2; border-color: #e3a49c; color: #8a2016; }
html[data-theme="light"] .pill.red, html[data-theme="light"] .slot.out .nm, html[data-theme="light"] .log .bad, html[data-theme="light"] .fb-status.bad { color: #b3261e; }
html[data-theme="light"] .log .sub { color: #1f6aa5; }
html[data-theme="light"] .hub-news, html[data-theme="light"] .fan-row { border-bottom-color: var(--line); }
html[data-theme="light"] .press-tag.press-loc { color: #157043; } .press-tag.press-sen { color: #a3241b; }
html[data-theme="light"] .tut, html[data-theme="light"] .tip-toast { background: #ffffff; }
html[data-theme="light"] .btn { box-shadow: none; }
@media (prefers-color-scheme: light) {
html[data-theme="auto"] .next, html[data-theme="auto"] .fin-hero { background: linear-gradient(160deg, #e3f1e8, #ffffff); border-color: #b9d6c4; }
html[data-theme="auto"] .toast { background: #ffffff; box-shadow: 0 6px 20px rgba(16,35,27,.15); }
html[data-theme="auto"] .btn.danger { background: #fbe5e2; border-color: #e3a49c; color: #8a2016; }
html[data-theme="auto"] .pill.red, html[data-theme="auto"] .slot.out .nm, html[data-theme="auto"] .log .bad, html[data-theme="auto"] .fb-status.bad { color: #b3261e; }
html[data-theme="auto"] .log .sub { color: #1f6aa5; }
html[data-theme="auto"] .hub-news, html[data-theme="auto"] .fan-row { border-bottom-color: var(--line); }
html[data-theme="auto"] .press-tag.press-loc { color: #157043; } .press-tag.press-sen { color: #a3241b; }
html[data-theme="auto"] .tut, html[data-theme="auto"] .tip-toast { background: #ffffff; }
html[data-theme="auto"] .btn { box-shadow: none; }
}

html[data-theme="light"] .top { background: rgba(244,242,235,.94); border-bottom-color: var(--line); }
html[data-theme="light"] .nav { background: rgba(255,255,255,.96); border-top-color: var(--line); }
html[data-theme="light"] .pitch .slot .nm { color: #ffffff; }
html[data-theme="light"] .pitch .slot .disc { color: #ffffff; }
html[data-theme="light"] .pitch .slot .rl { color: #e6f5ea; }
html[data-theme="light"] .pitch .slot.warn .nm, html[data-theme="light"] .pitch .slot.warn .disc { color: #ffd84a; }
@media (prefers-color-scheme: light) {
html[data-theme="auto"] .top { background: rgba(244,242,235,.94); border-bottom-color: var(--line); }
html[data-theme="auto"] .nav { background: rgba(255,255,255,.96); border-top-color: var(--line); }
html[data-theme="auto"] .pitch .slot .nm { color: #ffffff; }
html[data-theme="auto"] .pitch .slot .disc { color: #ffffff; }
html[data-theme="auto"] .pitch .slot .rl { color: #e6f5ea; }
html[data-theme="auto"] .pitch .slot.warn .nm, html[data-theme="auto"] .pitch .slot.warn .disc { color: #ffd84a; }
}

html[data-theme="light"] .nav-brand { background: #0b3d2e; border-radius: 12px; margin: 8px; }
@media (prefers-color-scheme: light) { html[data-theme="auto"] .nav-brand { background: #0b3d2e; border-radius: 12px; margin: 8px; } }
/* prototipo de navegación v2 */
.side-h { padding: 12px 14px 4px; text-transform: uppercase; letter-spacing: .06em; }
.nav-emoji { font-size: 21px; line-height: 25px; }
.subnav.scroll { display: flex; overflow-x: auto; scrollbar-width: none; } .subnav.scroll button { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }
.ce-tools [hidden], .btn[hidden] { display: none !important; }

/* ---- V5.7 · etiqueta de país de las competiciones ([ESP], [ING]…): texto, sin banderas emoji ---- */
.cc-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 1px 5px; border-radius: 5px; vertical-align: 1px; border: 1px solid var(--line); color: var(--muted); background: var(--bg2); }
.cc-ESP { color: #e0a33a; } .cc-ING { color: #8fb4ff; } .cc-ITA { color: #6fd39a; } .cc-FRA { color: #7aa7ff; } .cc-ALE { color: #f2c94c; } .cc-EUR { color: var(--gold); }
html[data-theme="light"] .cc-ESP { color: #9a5b00; } html[data-theme="light"] .cc-ING { color: #1f4fa8; } html[data-theme="light"] .cc-EUR { color: #7a5c00; }

/* ---- Momentos decisivos: integrados en el partido 2D (el campo nunca se tapa) ---- */
.mrow { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 6px; }
.mlab { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mrow .seg button { font-size: 13px; min-height: 38px; line-height: 1.1; }
.dmp { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px calc(var(--sr) + 12px) calc(var(--sb) + 8px) calc(var(--sl) + 12px); background: var(--bg); }
.dmp[hidden] { display: none; }
.match.dm-on .mpanel, .match.dm-on .mctl { display: none; }
.match.dm-play .dmp { flex: none; padding-bottom: 6px; }
.dmp-card { border-top: 3px solid var(--gold, #d4af37); padding-top: 6px; animation: dmIn .22s ease-out; }
@keyframes dmIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dm-fam { color: var(--gold, #d4af37); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.dmp h2 { margin: 1px 0 3px; font-size: 21px; line-height: 1.15; }
.dm-text { margin: 0 0 6px; line-height: 1.35; font-size: 14px; }
.dm-narr { font-size: 18px; font-weight: 650; line-height: 1.35; margin: 8px 0 12px; }
.dm-pls { display: grid; gap: 2px; margin-bottom: 6px; }
.dm-pl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 3px 0; border-top: 1px solid var(--line); font-size: 13px; }
.dm-pl > b { max-width: 60%; }
.dm-attrs { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; }
.dm-attrs span { white-space: nowrap; font-size: 12px; }
.dm-attrs i { font-style: normal; color: var(--muted); }
.dm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.dm-opt { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; gap: 1px; min-height: 58px; padding: 8px 10px; white-space: normal; touch-action: manipulation; }
.dm-opt b { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.dm-opt .tiny { line-height: 1.2; }
.dm-opt:focus-visible { outline: 3px solid var(--gold, #d4af37); }
.dm-opt:disabled { opacity: .55; }
.dm-seg button { font-size: 13px; }
.dm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.dm-tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--card2, rgba(255,255,255,.06)); border: 1px solid var(--line); }
.dm-risk { margin-top: 2px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dm-risk.hi { color: #e5534b; } .dm-risk.lo { color: var(--muted); }
html[data-theme="light"] .dm-risk.hi { color: #b42318; }
.dm-advice { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--gold, #d4af37); background: var(--card2, rgba(255,255,255,.05)); border-radius: 6px; }
.dm-more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.dm-more .btn { min-height: 38px; padding: 4px 6px; font-size: 12.5px; line-height: 1.15; white-space: normal; }
.dm-strip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--gold, #d4af37); font-size: 14px; }
.dm-live { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold, #d4af37); animation: dmPulse 1s ease-in-out infinite; }
@keyframes dmPulse { 50% { opacity: .25; transform: scale(.7); } }
.dm-go { position: relative; overflow: hidden; }
.dm-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.55); transform-origin: left; animation: dmBar 3s linear forwards; }
@keyframes dmBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .dmp-card, .dm-live, .dm-bar { animation: none; } }
/* Tableta y ordenador: el panel ocupa la columna lateral junto a un campo grande */
@media (orientation: landscape) and (max-height: 600px), (min-width: 1000px) and (orientation: landscape) {
  .dmp { padding: 12px calc(var(--sr) + 14px) 12px 14px; border-bottom: 1px solid var(--line); }
  .match.dm-play .dmp { border-bottom: 0; }
  .dmp h2 { font-size: 24px; }
  .dm-more { grid-template-columns: 1fr 1fr; }
}

/* ---- Partido en curso (Inicio) ---- */
.live-card { border: 1px solid var(--gold, #d4af37); }
.live-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 12px 0 4px; font-weight: 700; }
.live-score span:last-child { text-align: right; }
.live-score b { font-size: 30px; font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* Teléfonos (iPhone SE a iPhone 15): el panel de decisión cabe sin apenas desplazar */
@media (max-height: 900px) and (orientation: portrait) {
  .dmp { padding-top: 4px; }
  .dmp h2 { font-size: 18px; margin: 0 0 2px; }
  .dm-text { font-size: 13px; line-height: 1.3; margin-bottom: 4px; }
  .dm-tags { display: none; }
  .dm-pls { margin-bottom: 2px; }
  .dm-pl { padding: 1px 0; font-size: 12px; gap: 0 6px; }
  .dm-attrs { gap: 0 8px; }
  .dm-attrs span { font-size: 11.5px; }
  .dm-opts { gap: 5px; margin-top: 4px; }
  .dm-opt { min-height: 48px; padding: 6px 8px; }
  .dm-opt b { font-size: 13px; }
  .dm-opt .tiny { font-size: 11px; }
  .dm-risk { font-size: 9.5px; margin-top: 0; }
  .dm-more { margin-top: 4px; gap: 4px; }
  .dm-more .btn { min-height: 34px; font-size: 11.5px; }
}
