/* MÍSTER FÚTBOL 26·27 — estética de menús inspirada en los mánager de los 90:
   fondo gris, barras verdes numeradas, rótulo dorado en relieve y tipografía ancha. */
:root {
  --bg: #9b9fa3;
  --bg-dark: #7f8387;
  --bar: #5a9631;
  --bar-hi: #7cbd47;
  --bar-lo: #3e7121;
  --bar-edge: #24470f;
  --ink: #ffffff;
  --ink-shadow: #172a0b;
  --ink-dark: #1d2126;
  --panel: #c8cbce;
  --panel-2: #b3b7bb;
  --panel-dark: #2c3036;
  --gold-1: #fff3b8;
  --gold-2: #f2c14a;
  --gold-3: #a8740d;
  --gold-4: #5c3d05;
  --red: #c8102e;
  --blue: #2667c9;
  --orange: #e98a15;
  --green-ok: #2f9e44;
  --yellow: #ffd60a;
  --focus: #ffffff;
  --f-display: "Russo One", "Arial Black", Impact, sans-serif;
  --f-body: "Rajdhani", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --f-digit: "VT323", "Courier New", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background-color: var(--bg);
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.035) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.18), transparent 60%);
  color: var(--ink-dark);
  font-family: var(--f-body);
  font-size: 17px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
img.badge { display: inline-block; vertical-align: middle; image-rendering: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { min-height: 100%; }
.screen {
  min-height: 100%;
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: scr-in .22s ease-out;
}
@keyframes scr-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .title-ball { animation: none !important; } }
.wrap { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- rótulo dorado */
.title-row { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 22px); width: 100%; margin-top: 6px; }
.title {
  font-family: var(--f-display); font-style: italic; text-transform: uppercase;
  font-size: clamp(38px, 9.5vw, 96px); line-height: .95; letter-spacing: .01em; text-align: center;
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 44%, var(--gold-3) 52%, #ffe28a 64%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 2px 0 #7a5208) drop-shadow(2px 2px 0 var(--gold-4)) drop-shadow(3px 3px 0 #2e2004) drop-shadow(0 6px 6px rgba(0,0,0,0.35));
  transform: skewX(-7deg); padding: 0 .08em;
}
.title small { display: block; font-size: .32em; letter-spacing: .32em; margin-top: .18em; }
.title-ball { width: clamp(34px, 6vw, 58px); height: auto; animation: spin 6s linear infinite; filter: drop-shadow(2px 3px 2px rgba(0,0,0,.4)); flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; max-width: 900px; }
.badge-row img { filter: drop-shadow(1px 1px 0 rgba(0,0,0,.35)); transition: transform .15s; }
.badge-row img:hover { transform: translateY(-3px) scale(1.12); }

/* ---------- barras verdes (menú) */
.menu { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.bar {
  position: relative; display: flex; align-items: center; gap: 18px; width: 100%;
  min-height: 46px; padding: 6px 18px; border: 2px solid transparent; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, var(--bar-hi) 0%, var(--bar) 18%, var(--bar) 70%, var(--bar-lo) 100%);
  box-shadow: inset 0 -2px 0 var(--bar-edge), 0 2px 0 rgba(0,0,0,.18);
  color: var(--ink); font-family: var(--f-display); text-transform: uppercase; letter-spacing: .07em;
  font-size: clamp(16px, 3.2vw, 24px);
  text-shadow: 2px 2px 0 var(--ink-shadow), 1px 1px 0 var(--ink-shadow);
  transition: transform .08s, filter .12s;
}
.bar .n { width: 1.3em; text-align: center; font-size: 1.05em; }
.bar .t { flex: 1; min-width: 0; }
.bar .meta { font-family: var(--f-body); font-weight: 700; font-size: .62em; letter-spacing: .04em; text-shadow: 1px 1px 0 var(--ink-shadow); opacity: .95; }
.bar:hover, .bar:focus-visible, .bar.sel { border-color: var(--focus); filter: brightness(1.08); outline: none; }
.bar:active { transform: translateY(1px); }
.bar.small { min-height: 38px; font-size: clamp(14px, 2.6vw, 18px); padding: 4px 14px; gap: 12px; }
.bar.gold { background: linear-gradient(180deg, #ffe9a0, var(--gold-2) 30%, #d79a1d 75%, var(--gold-3)); box-shadow: inset 0 -2px 0 var(--gold-4), 0 2px 0 rgba(0,0,0,.2); text-shadow: 2px 2px 0 var(--gold-4); }
.bar.grey { background: linear-gradient(180deg, #8e949b, #6d737a 30%, #5b6168 75%, #474c52); box-shadow: inset 0 -2px 0 #2b2f33; text-shadow: 2px 2px 0 #1b1e21; }
.bar.red { background: linear-gradient(180deg, #ef6b5e, #c8352a 30%, #a8281f 75%, #7b1912); box-shadow: inset 0 -2px 0 #4a0d08; text-shadow: 2px 2px 0 #4a0d08; }
.bar[disabled] { opacity: .5; cursor: not-allowed; filter: grayscale(.6); }
.strip {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 3px 18px; margin-top: -6px;
  background: repeating-linear-gradient(90deg, #4a4d51 0 2px, #3b3e42 2px 4px); color: #fff;
  font-family: var(--f-display); font-size: clamp(10px, 1.9vw, 13px); letter-spacing: .05em; text-transform: uppercase;
}
.led { font-family: var(--f-digit); font-size: 1.5em; line-height: 1; background: #120202; color: #ff3b30; padding: 0 6px; border: 1px solid #000; letter-spacing: .05em; }
.foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 14px; color: #2b2f33; }
.foot .bar { width: auto; }

/* ---------- paneles, tablas */
.panel { background: var(--panel); border: 2px solid #6e7378; box-shadow: inset 1px 1px 0 #e6e8ea, 2px 3px 0 rgba(0,0,0,.18); padding: 12px; }
.panel h2, .panel h3 { margin: 0 0 8px; font-family: var(--f-display); text-transform: uppercase; letter-spacing: .06em; font-weight: 400; }
.panel h2 { font-size: 20px; } .panel h3 { font-size: 16px; color: #2d3237; }
.head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 14px; min-height: 52px;
  background: linear-gradient(180deg, #3a3f45, #23272c); color: #fff; border-bottom: 3px solid var(--bar-lo);
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .05em;
}
.head .ttl { flex: 1; min-width: 0; font-size: clamp(16px, 3vw, 22px); text-shadow: 2px 2px 0 #000; }
.head .sub { font-family: var(--f-body); font-weight: 700; font-size: 14px; color: #c8e6b4; letter-spacing: .03em; text-transform: none; }
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl th { background: #24461a; color: #fff; font-family: var(--f-display); font-weight: 400; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 6px; text-align: left; position: sticky; top: 0; z-index: 3; }
.tbl td { padding: 5px 6px; border-bottom: 1px solid #a3a8ad; white-space: nowrap; }
.tbl tr:nth-child(even) td { background: rgba(255,255,255,.22); }
.tbl tr.me td { background: #fff3b0 !important; font-weight: 700; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #e3f2d6; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl td.c, .tbl th.c { text-align: center; }
.zone { display: inline-block; width: 6px; height: 18px; vertical-align: middle; margin-right: 6px; }
.z-ucl { background: var(--blue); } .z-uel { background: var(--orange); } .z-uecl { background: var(--green-ok); } .z-down { background: var(--red); } .z-up { background: var(--green-ok); } .z-po { background: #7fc96b; }
.form i { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; margin-right: 2px; }
.form .V { background: var(--green-ok); } .form .E { background: #8a9096; } .form .D { background: var(--red); }
.ovr { display: inline-block; min-width: 30px; text-align: center; font-weight: 700; color: #fff; padding: 0 4px; border-radius: 2px; font-family: var(--f-display); font-size: 13px; line-height: 20px; }
.o1 { background: #7a7f85; } .o2 { background: #b08d2a; } .o3 { background: #3f8f35; } .o4 { background: #1f6fbf; } .o5 { background: #7b2cbf; }
.pos-tag { display: inline-block; min-width: 34px; text-align: center; font-family: var(--f-display); font-size: 11px; line-height: 18px; color: #fff; border-radius: 2px; }
.l-POR { background: #c77d0a; } .l-DEF { background: #2a6fb5; } .l-MED { background: #3f8f35; } .l-DEL { background: #c0392b; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 2px; color: #fff; line-height: 16px; margin-left: 4px; font-family: var(--f-body); }
.t-inj { background: var(--red); } .t-sus { background: #222; } .t-xi { background: var(--bar); } .t-gen { background: #6c757d; }
.t-yel { background: #f2c200; color: #1d2126; text-shadow: none; } .t-yel.risk { background: #ff8a00; color: #1d2126; box-shadow: 0 0 0 2px #1d2126 inset; }
.teletipo .amarilla { color: #ffd84d; }
.fit { display: inline-block; width: 46px; height: 8px; background: #6d7378; vertical-align: middle; position: relative; }
.fit b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green-ok); }
.fit.mid b { background: #e0a800; } .fit.low b { background: var(--red); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { padding: 6px 12px; background: #7d8389; color: #fff; border: 0; cursor: pointer; font-family: var(--f-display); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
.tab.on { background: var(--bar); box-shadow: inset 0 -2px 0 var(--bar-edge), 0 0 0 2px #fff; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.muted { color: #4a5056; font-size: 14px; }
.big { font-family: var(--f-display); font-size: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px; cursor: pointer; border: 2px solid transparent;
  background: linear-gradient(180deg, var(--bar-hi), var(--bar) 30%, var(--bar-lo)); color: #fff; font-family: var(--f-display); text-transform: uppercase; letter-spacing: .05em; font-size: 14px;
  text-shadow: 1px 1px 0 var(--ink-shadow); box-shadow: inset 0 -2px 0 var(--bar-edge);
}
.btn:hover, .btn:focus-visible { border-color: #fff; }
.btn.alt { background: linear-gradient(180deg, #8e949b, #6d737a 30%, #4c5157); box-shadow: inset 0 -2px 0 #2b2f33; text-shadow: 1px 1px 0 #1b1e21; }
.btn.warn { background: linear-gradient(180deg, #ef6b5e, #c8352a 40%, #8f2018); box-shadow: inset 0 -2px 0 #4a0d08; }
.btn.goldb { background: linear-gradient(180deg, #ffe9a0, var(--gold-2) 35%, var(--gold-3)); text-shadow: 1px 1px 0 var(--gold-4); box-shadow: inset 0 -2px 0 var(--gold-4); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg .btn { min-height: 34px; font-size: 13px; padding: 4px 10px; }
.seg .btn.on { border-color: #fff; filter: brightness(1.15); box-shadow: inset 0 -2px 0 var(--bar-edge), 0 0 0 2px #1d2126; }
.seg .btn:not(.on) { background: linear-gradient(180deg, #8e949b, #6d737a 30%, #4c5157); box-shadow: inset 0 -2px 0 #2b2f33; }
label.f { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
input[type=text], input[type=number], select { font: inherit; font-size: 16px; padding: 6px 8px; border: 2px solid #6e7378; background: #f2f3f4; color: var(--ink-dark); min-height: 38px; }
input[type=range] { accent-color: var(--bar); width: 100%; }

/* ---------- selector de equipos */
.teamlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.tpick { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: #d8dbde; border: 2px solid transparent; cursor: pointer; text-align: left; font-weight: 700; font-size: 15px; box-shadow: 1px 1px 0 rgba(0,0,0,.2); min-width: 0; }
.tpick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpick:hover { border-color: var(--bar); }
.tpick.on { border-color: #1d2126; background: #fff3b0; }
.vs-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.vs-card .tn { font-family: var(--f-display); text-transform: uppercase; font-size: clamp(15px, 3vw, 22px); line-height: 1.1; }
.vs-card .vs { font-family: var(--f-display); font-size: 26px; color: var(--gold-3); text-shadow: 1px 1px 0 #fff; }
.kits { display: flex; gap: 4px; justify-content: center; align-items: center; }
.stars { color: #b8860b; letter-spacing: 1px; font-size: 14px; }

/* ---------- editor de alineación */
.lineup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: start; }
@media (max-width: 760px) { .lineup { grid-template-columns: 1fr; } }
.pitchbox { position: relative; width: 100%; aspect-ratio: 68 / 80; max-width: 100%; background: repeating-linear-gradient(180deg, #3f8f35 0 10%, #378330 10% 20%); border: 3px solid #e9efe6; box-shadow: 2px 3px 0 rgba(0,0,0,.25); overflow: hidden; }
.pitchbox::before { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 17%; border: 2px solid rgba(255,255,255,.8); border-bottom: 0; }
.pitchbox::after { content: ""; position: absolute; left: -2px; right: -2px; top: 0; height: 0; border-top: 2px solid rgba(255,255,255,.8); }
.pitchbox .cc { position: absolute; left: 50%; top: 0; width: 26%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; transform: translate(-50%, -50%); }
.slot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; background: none; border: 0; padding: 0; width: 23%; }
.slot .sh { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-size: 14px; color: #fff; text-shadow: 1px 1px 0 #000; border: 2px solid #fff; box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.slot .nm { font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.62); padding: 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 16px; }
.slot .rl { font-size: 10px; color: #fff; font-family: var(--f-display); opacity: .9; text-shadow: 1px 1px 0 #000; }
.slot.bad .sh { border-color: #ff5a4f; }
.slot.sel .sh { box-shadow: 0 0 0 4px var(--yellow); }
.slot.empty .sh { background: rgba(0,0,0,.35) !important; border-style: dashed; }
.sq tr.sel td { background: #ffe680 !important; }

/* ---------- modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,18,22,.62); display: flex; align-items: center; justify-content: center; z-index: 50; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 3px solid #e6e8ea; box-shadow: 0 0 0 3px #1d2126, 6px 8px 0 rgba(0,0,0,.35); }
.modal .head { position: sticky; top: 0; z-index: 2; }
.modal .body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.attr { display: grid; grid-template-columns: 44px 1fr 32px; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.attr .b { height: 10px; background: #7d8389; position: relative; }
.attr .b i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f9e44, #8bd36b); }
.pcard { display: flex; gap: 14px; align-items: center; }
.pcard .face { width: 76px; height: 76px; border: 3px solid #fff; box-shadow: 2px 2px 0 rgba(0,0,0,.25); background: #8db6d9; }
.pcard .bigovr { font-family: var(--f-display); font-size: 44px; line-height: 1; color: #1d2126; }
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #1d2126; color: #fff; padding: 10px 16px; border-left: 6px solid var(--bar-hi); z-index: 80; font-weight: 700; max-width: calc(100% - 32px); box-shadow: 0 4px 12px rgba(0,0,0,.4); animation: scr-in .2s; }

/* ---------- partido */
.match { position: fixed; inset: 0; background: #20232a; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.match canvas.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud-top { position: absolute; top: max(8px, env(safe-area-inset-top, 0px)); left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.score {
  display: flex; align-items: stretch; pointer-events: auto; font-family: var(--f-display); color: #fff; text-transform: uppercase;
  box-shadow: 0 3px 0 rgba(0,0,0,.4); border: 2px solid #0b0c0e;
}
.score .tm { display: flex; align-items: center; gap: 6px; padding: 3px 8px; background: #1b1e22; font-size: 15px; letter-spacing: .05em; }
.score .chip { width: 6px; align-self: stretch; }
.score .g { background: #f2f2f2; color: #111; min-width: 28px; text-align: center; font-size: 20px; line-height: 30px; }
.score .clock { background: #0b0c0e; color: #ff3b30; font-family: var(--f-digit); font-size: 26px; line-height: 30px; padding: 0 8px; min-width: 52px; text-align: center; }
.hud-btns { display: flex; gap: 6px; pointer-events: auto; }
.hbtn { width: 42px; height: 42px; border: 2px solid #0b0c0e; background: rgba(30,34,40,.85); color: #fff; font-family: var(--f-display); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hbtn.on { background: var(--bar); }
.radar { position: absolute; right: max(8px, env(safe-area-inset-right, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px)); border: 2px solid #0b0c0e; pointer-events: none; opacity: .92; }
.ticker { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(3px, env(safe-area-inset-bottom, 0px)); width: max-content; max-width: min(940px, calc(100% - 200px)); background: rgba(10,12,14,.5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); color: #fff; padding: 5px 14px; font-weight: 700; font-size: 18px; line-height: 1.25; border-left: 4px solid var(--bar-hi); pointer-events: none; text-align: center; }
.banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; }
.banner .big { display: inline-block; font-family: var(--f-display); font-style: italic; font-size: clamp(48px, 12vw, 120px); line-height: 1;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3) 55%, #ffe28a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(3px 3px 0 var(--gold-4)) drop-shadow(0 0 18px rgba(0,0,0,.6)); transform: skewX(-8deg); animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.banner .sm { display: block; margin-top: 6px; color: #fff; font-family: var(--f-display); font-size: clamp(16px, 3.5vw, 26px); text-shadow: 2px 2px 0 #000; text-transform: uppercase; }
.banner .card { display: inline-block; width: 34px; height: 46px; border-radius: 3px; box-shadow: 2px 2px 0 #000; animation: pop .4s; }
@keyframes pop { from { transform: skewX(-8deg) scale(.3); opacity: 0; } to { transform: skewX(-8deg) scale(1); opacity: 1; } }
.overlay { position: absolute; inset: 0; background: rgba(12,14,18,.72); display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); z-index: 20; }
.overlay .modal { max-width: 640px; }
.stat-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; font-weight: 700; }
.stat-row .lbl { text-align: center; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #3a3f45; }
.stat-row .bars { display: flex; height: 8px; margin-top: 2px; }
.stat-row .bars i { display: block; height: 100%; }
.evlist { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2px 8px; font-size: 14px; }
.evlist .l { text-align: right; } .evlist .m { text-align: center; font-family: var(--f-digit); font-size: 18px; color: #6b1010; }
/* mandos táctiles */
.touch { position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none; }
.joy { position: absolute; left: max(18px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), rgba(255,255,255,.05)); border: 2px solid rgba(255,255,255,.35); pointer-events: auto; touch-action: none; }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #c8c8c8 60%, #8a8a8a); box-shadow: 0 3px 6px rgba(0,0,0,.5); }
.abtn { position: absolute; width: 78px; height: 78px; border-radius: 50%; border: 3px solid rgba(255,255,255,.75); color: #fff; font-family: var(--f-display); font-size: 15px; pointer-events: auto; touch-action: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 rgba(0,0,0,.45); text-shadow: 1px 1px 0 #000; }
.abtn.pass { right: calc(max(18px, env(safe-area-inset-right, 0px)) + 92px); bottom: max(20px, env(safe-area-inset-bottom, 0px)); background: radial-gradient(circle at 35% 30%, #8fe36b, #2f9e44 70%); }
.abtn.shoot { right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(max(20px, env(safe-area-inset-bottom, 0px)) + 64px); background: radial-gradient(circle at 35% 30%, #ff8b7f, #c8352a 70%); }
.abtn.down { transform: scale(.92); filter: brightness(1.2); }
.power { position: absolute; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(max(20px, env(safe-area-inset-bottom, 0px)) + 150px); width: 78px; height: 8px; background: rgba(0,0,0,.6); border: 1px solid #fff; }
.power i { display: block; height: 100%; background: linear-gradient(90deg, #ffd60a, #ff3b30); width: 0; }
.has-touch .radar { bottom: auto; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 50px); }
.has-touch .ticker { font-size: 16px; bottom: auto; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 50px); max-width: calc(100% - 130px); left: max(8px, env(safe-area-inset-left, 0px)); transform: none; }
.keys-help { position: absolute; left: max(8px, env(safe-area-inset-left, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px)); color: #fff; background: rgba(0,0,0,.55); font-size: 13px; padding: 4px 8px; pointer-events: none; }

/* ---------- teletipo (modo resultado) */
.teletipo { background: #0c0f0c; color: #b6ff9e; font-family: var(--f-digit); font-size: 22px; padding: 12px; border: 3px solid #32402f; box-shadow: inset 0 0 22px rgba(80,255,80,.12); min-height: 220px; }
.teletipo .ln { animation: scr-in .2s; }
.teletipo .gol { color: #fff35c; }
.teletipo .roja { color: #ff6b5e; }
.bigscore { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: var(--f-display); font-size: clamp(28px, 7vw, 54px); }
.bigscore .sep { color: #6e7378; }

/* ---------- mánager */
.hub-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
@media (max-width: 600px) { .hub-top { grid-template-columns: auto 1fr; } .hub-top .money { grid-column: 1 / -1; } }
.hub-top .club { font-family: var(--f-display); font-size: clamp(18px, 4vw, 28px); text-transform: uppercase; line-height: 1.05; }
.money { font-family: var(--f-digit); font-size: 28px; background: #0c0f0c; color: #9dff7a; padding: 2px 10px; border: 2px solid #32402f; text-align: right; }
.meter { height: 10px; background: #6d7378; position: relative; width: 100%; max-width: 220px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #c8102e, #e0a800 45%, #2f9e44); }
.next { display: grid; gap: 10px; }
.news-item { padding: 6px 8px; border-left: 4px solid #6e7378; background: rgba(255,255,255,.35); font-size: 15px; }
.news-item.board { border-color: var(--gold-3); } .news-item.market, .news-item.offer { border-color: var(--blue); } .news-item.injury, .news-item.sus { border-color: var(--red); } .news-item.youth { border-color: var(--green-ok); } .news-item.league { border-color: #7b2cbf; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; }
.bracket { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bracket .tie { background: rgba(255,255,255,.4); padding: 6px; border: 1px solid #8a9096; font-size: 14px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 700px) { .cols-2 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; }
.kv b { font-weight: 700; }
.center { text-align: center; }
.spacer { flex: 1; }
.hide-sm { }
@media (max-width: 560px) { .hide-sm { display: none; } .tbl { font-size: 14px; } .tbl td { padding: 4px 4px; } }

.ev { display: inline-block; vertical-align: -2px; font-style: normal; }
.ev-goal { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #111 0 28%, #fff 30%); border: 1px solid #111; }
.ev-yel, .ev-red { width: 9px; height: 13px; border-radius: 1px; box-shadow: 1px 1px 0 rgba(0,0,0,.4); }
.ev-yel { background: #ffd60a; } .ev-red { background: #e5202e; }
.ev-inj { width: 13px; height: 13px; line-height: 12px; text-align: center; background: #c8102e; color: #fff; font-weight: 700; font-size: 12px; }

/* ---------- moneda del sorteo */
.coin-wrap { display: flex; justify-content: center; padding: 10px 0; perspective: 700px; }
.coin { position: relative; width: 150px; height: 150px; transform-style: preserve-3d; transition: transform 1.8s cubic-bezier(.2,.7,.3,1); }
.coin .face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 35% 30%, #fff3b8, #f2c14a 45%, #a8740d 100%); border: 6px solid #c99a2e; box-shadow: inset 0 0 0 4px rgba(92,61,5,.35), 0 6px 0 #5c3d05, 0 10px 18px rgba(0,0,0,.35);
  font-family: var(--f-display); color: #5c3d05; font-size: 20px; letter-spacing: .1em; text-shadow: 1px 1px 0 #ffe9a0; }
.coin .face span:first-child { font-size: 54px; line-height: 1; }
.coin .cruz { transform: rotateY(180deg); }
.coin.flip-cara { transform: rotateY(1800deg); }
.coin.flip-cruz { transform: rotateY(1980deg); }
.coin.rest-cara { transform: rotateY(0deg); transition: none; }
.coin.rest-cruz { transform: rotateY(180deg); transition: none; }
@media (prefers-reduced-motion: reduce) { .coin { transition-duration: .2s; } }

/* botón único de acción */
.abtn.act { width: 104px; height: 104px; font-size: 14px; line-height: 1.15; text-align: center; bottom: max(26px, env(safe-area-inset-bottom, 0px)); background: radial-gradient(circle at 35% 30%, #ffd36b, #e08a12 55%, #b5530a); }
.match:not(.has-touch) .power { right: auto; left: 50%; transform: translateX(-50%); bottom: max(46px, env(safe-area-inset-bottom, 0px)); width: 160px; height: 10px; }
.has-touch .power { bottom: calc(max(26px, env(safe-area-inset-bottom, 0px)) + 116px); right: max(30px, env(safe-area-inset-right, 0px)); }
.keys-help { bottom: auto; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 48px); }

/* ---------- logros */
.ach-toast { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 90; display: flex; gap: 12px; align-items: center; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: #1d2126; border: 3px solid #1d2126; box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 0 0 2px var(--gold-3); padding: 10px 16px 10px 12px; max-width: calc(100% - 32px); width: 420px; animation: ach-in .35s cubic-bezier(.2,1.4,.4,1); }
.ach-toast.out { transition: opacity .35s, transform .35s; opacity: 0; transform: translate(-50%, -20px); }
.ach-toast small { display: block; font-size: 11px; letter-spacing: .12em; font-weight: 800; color: #6b4a06; }
.ach-toast b { display: block; font-size: 18px; line-height: 1.1; }
.ach-toast span > span { display: block; font-size: 13px; }
.ach-ico { font-size: 30px; line-height: 1; flex: none; width: 40px; text-align: center; }
@keyframes ach-in { from { transform: translate(-50%, -40px) scale(.9); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 2px solid #6e7378; background: #e9ecef; }
.ach.on { border-color: #1d2126; background: linear-gradient(180deg, var(--gold-1), #f7dc86); }
.ach.off { opacity: .62; }
.ach b { display: block; }
.ach span > span { display: block; font-size: 13px; }
.ach small { display: block; font-size: 11px; color: #555; margin-top: 2px; }
.trophies { display: flex; flex-wrap: wrap; gap: 8px; }
.trophy { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 6px 8px; border: 2px solid #1d2126; background: linear-gradient(180deg, #fffbe6, #f4e3a3); text-align: center; }
.trophy .ico { font-size: 26px; line-height: 1.1; }
.trophy .num { font-size: 22px; font-weight: 800; line-height: 1; }
.trophy .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.trophy.game { background: linear-gradient(180deg, #eaf7e0, #bfe3a2); }
.obj-chip { display: inline-block; padding: 1px 7px; font-size: 12px; font-weight: 800; border: 2px solid #1d2126; text-transform: uppercase; letter-spacing: .03em; }
.obj-chip.ok { background: #bfe3a2; }
.obj-chip.riesgo { background: #ffd66b; }
.obj-chip.lejos { background: #f08a8a; }
.cup-round { margin-bottom: 10px; }
.cup-round h4 { margin: 6px 0 4px; }
.news-item.cup { border-color: #c9a227; }
.credit { font-family: 'Russo One', 'Rajdhani', sans-serif; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: #1d2126; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border: 2px solid #1d2126; box-shadow: inset 0 0 0 2px var(--gold-3), 0 3px 8px rgba(0,0,0,.35); padding: 5px 16px; margin: 2px 0 4px; }
.credit b { font-weight: 400; color: #7a1010; }

/* narración en móvil vertical: franja inferior propia, fuera del campo y semitransparente */
@media (orientation: portrait) and (max-width: 760px) {
  .match:not(.has-touch) .ticker { bottom: max(6px, env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 20px); width: calc(100% - 20px); font-size: 15px; padding: 4px 8px; background: rgba(10,12,14,.42); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .match:not(.has-touch) .ticker { font-size: 14px; padding: 2px 8px; bottom: 2px; background: rgba(10,12,14,.38); width: max-content; max-width: 76%; line-height: 1.2; }
}
.slot .fitbar { display: block; width: 34px; height: 4px; margin: 1px auto 0; background: rgba(0,0,0,.45); }
.slot .fitbar i { display: block; height: 100%; }
.report h3 { margin: 0 0 4px; }
.report .notes { display: grid; gap: 2px; font-size: 14px; }
.report .pos { color: #1e6b2a; } .report .neg { color: #a01818; }
.teletipo #tl { max-height: 42vh; overflow-y: auto; }
.teletipo .cambio { color: #8fd3ff; }
.tele-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; margin-top: 8px; }
@media (max-width: 560px) { .teletipo { font-size: 17px; min-height: 160px; } .tele-ctl { grid-template-columns: 1fr 1fr; } .tele-ctl .bar .t { font-size: 13px; } }
/* personal del club */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.staff { display: flex; gap: 10px; align-items: center; padding: 8px; border: 2px solid #6e7378; background: #e9ecef; }
.staff.vac { opacity: .75; border-style: dashed; }
.staff img { flex: none; border: 2px solid #1d2126; background: #cfd6dc; }
.staff .info { flex: 1; min-width: 0; }
.staff .info b { display: block; font-size: 16px; }
.staff .info small { display: block; color: #555; }
.staff .stars { color: #b07d00; }
.staff .acts { display: flex; flex-direction: column; gap: 4px; }

/* ---------- optimización móvil de los menús del manager */
@media (max-width: 600px) {
  .hub-top { grid-template-columns: 44px 1fr auto; gap: 8px; padding: 8px 10px; }
  .hub-top .money { grid-column: auto; font-size: 17px; padding: 1px 6px; align-self: start; }
  .hub-top img { width: 44px; height: 44px; }
  .hub-top .club { font-size: 17px; }
  .hub-top .muted { font-size: 12px; line-height: 1.25; }
  .hub-top .meter { max-width: 120px; }
  .bar.small { min-height: 34px; padding: 3px 10px; gap: 8px; font-size: 14px; }
  .bar .t { white-space: normal; line-height: 1.1; }
  .bar .meta { font-size: 9.5px; max-width: 42%; text-align: right; line-height: 1.15; }
  .wrap { gap: 10px; }
  .panel { padding: 10px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs .tab { flex: none; }
  .tbl td, .tbl th { padding: 4px 5px; font-size: 13px; }
  .vs-card .tn { font-size: 15px; }
  .grid3 { gap: 6px; }
  .ach-toast { width: calc(100% - 20px); padding: 6px 10px; }
  .ach-toast b { font-size: 15px; }
  .ach-toast .ach-ico { font-size: 22px; width: 28px; }
}
/* tanda de penaltis */
.shootout { display: grid; gap: 10px; }
.so-team { display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; padding: 8px; background: #e9ecef; border: 2px solid #6e7378; }
.so-team img { grid-row: span 2; }
.so-team b { font-size: 18px; }
.so-row { display: flex; gap: 4px; flex-wrap: wrap; min-height: 22px; }
.so-n { grid-row: 1 / span 2; grid-column: 3; font-family: var(--f-digit); font-size: 44px; line-height: 1; }
.pk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 14px; color: #fff; font-weight: 800; animation: pop .3s; }
.pk.g { background: #2f9e44; } .pk.f { background: #c92a2a; }
.so-msg { font-size: 18px; text-align: center; min-height: 2.6em; margin: 4px 0 0; }
.alt-pos { display: inline-block; margin-left: 3px; padding: 0 3px; font-size: 9.5px; line-height: 14px; font-weight: 800; color: #39424a; background: #d5dade; border: 1px solid #9aa2a8; border-radius: 2px; vertical-align: middle; letter-spacing: .02em; }
.slot.warn .sh { border-color: #f2c14a; }
@media (max-width: 760px) { .lineup { grid-template-columns: minmax(0, 1fr); } .lineup > * { min-width: 0; } }
.tbl-wrap { overflow-x: auto; }
@media (max-width: 600px) { .tbl.sq td:nth-child(3) { white-space: normal; } .alt-pos { font-size: 8.5px; padding: 0 2px; } }
/* resumen de la temporada */
.season-card .sc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.sc-stars { font-size: 34px; line-height: 1; color: #e0a800; text-shadow: 1px 1px 0 #7a5400; letter-spacing: 2px; }
.sc-stars span { color: #b9bfc4; text-shadow: none; }
.sc-phrase { margin: 4px 0 0; font-size: 18px; font-style: italic; font-weight: 700; }
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.champ { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: #e9ecef; border: 2px solid #9aa2a8; }
.champ.mine { background: linear-gradient(180deg, var(--gold-1), #f7dc86); border-color: #1d2126; }
.champ .ico { font-size: 22px; }
.champ small { display: block; font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: .04em; }
.champ b { display: block; font-size: 15px; line-height: 1.15; }

/* ---------- partida de dos jugadores (por turnos) */
.turn-bar { margin: 0 auto 6px; width: fit-content; max-width: 100%; padding: 6px 14px; background: #1d2126; color: #fff; border: 3px solid #1d2126; border-left-width: 12px; border-right-width: 12px; font-weight: 700; font-size: 15px; }
.turn-bar b { color: #ffd966; }
.turn-card { display: flex; flex-direction: column; align-items: center; gap: 4px; border-width: 5px !important; }
.turn-card img { margin: 6px 0; }
.duel-note { margin: 6px 0; padding: 8px 10px; background: #fff3b0; border: 3px solid #1d2126; font-size: 14px; }
.fr-players .btn { min-width: 0; }
.fr-2p { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.fr-2p label.f { flex: 1 1 200px; }

/* móviles estrechos: las clasificaciones caben enteras (con diferencia de goles) */
@media (max-width: 380px) { table.tbl { font-size: 13px; } table.tbl td, table.tbl th { padding: 4px 3px; } }
.show-sm { display: none; }
@media (max-width: 560px) { .show-sm { display: inline; } }
table.sqstats th .tab { letter-spacing: 0; padding: 2px 4px !important; }
@media (max-width: 560px) { table.sqstats td, table.sqstats th { padding-left: 3px; padding-right: 3px; } }
/* alineación: cambio a medias */
.lu-hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(10px, env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 10px; width: min(560px, calc(100% - 20px)); background: #1d2126; color: #fff; padding: 8px 10px 8px 14px; border: 2px solid var(--bar-hi); box-shadow: 0 6px 18px rgba(0,0,0,.45); font-size: 15px; }
.lu-hint span { flex: 1; }
.lu-hint .btn { flex: none; }
table.tbl.sq tr.fitpos td { background: #d6f0c9; }
table.tbl.sq tr.fitpos:hover td { background: #c4e8b2; }
/* plantilla (vista Datos): en pantallas estrechas la tabla se desliza de lado y el nombre queda fijo */
@media (max-width: 560px) {
  p.show-sm { display: block; }
  table.sqdata td.stick, table.sqdata th.stick { position: sticky; left: 0; z-index: 2; box-shadow: 2px 0 0 rgba(0,0,0,.18); }
  table.sqdata td.stick { background: var(--panel); }
  table.sqdata tr:nth-child(even) td.stick { background: #d6d8da; }
  table.sqdata th.stick { z-index: 4; background: #24461a; }
  table.sqdata td, table.sqdata th { padding-left: 5px; padding-right: 5px; }
}

/* Menú principal: columna derecha con noticias y minitabla de la liga */
.hub-side { display: flex; flex-direction: column; gap: 12px; align-self: start; min-width: 0; }
.hub-side > .panel { margin: 0; }
.mini-tbl { padding: 10px 12px 8px; }
.mini-tbl h3 { margin: 0 0 6px; }
.mini-tbl table.tbl { width: 100%; font-size: 14px; }
.mini-tbl td { padding: 4px 4px; white-space: nowrap; }
.mini-tbl .mt-pos { width: 38px; }
.mini-tbl td:nth-child(2) { width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mini-tbl .zone { height: 14px; width: 5px; margin-right: 5px; }
.mini-tbl .mt-note { margin: 6px 2px 0; font-size: 12px; }

/* Alineación: la tabla de jugadores cabe entera (sin recortar la columna Moral) */
table.tbl.sq th, table.tbl.sq td { padding-left: 5px; padding-right: 5px; }
.mini-tbl.click { cursor: pointer; }
.mini-tbl.click:hover h3 { color: var(--gold, #b8860b); }
table.tbl.sq .fit { width: 34px; }

/* Licencia Creative Commons al pie del menú principal */
.cc-box { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 640px; margin: 8px auto 0; padding: 10px 12px; background: rgba(255,255,255,.35); border: 1px solid rgba(0,0,0,.18); text-align: left; }
.cc-box .cc-badge { flex: none; line-height: 0; }
.cc-box img { display: block; width: 120px; height: 42px; }
.cc-box p { margin: 0; font-size: 13px; line-height: 1.4; color: #2b2f33; }
.cc-box a { color: #1c4f8c; }
@media (max-width: 480px) { .cc-box { flex-direction: column; text-align: center; } }
