/* ============================================================
   9–0 · Liga Colombiana
   Aesthetic: vintage fútbol "almanaque" / Panini sticker-album.
   Warm newsprint paper, ink type, tricolor flag accents,
   collectible sticker-cards, chalk-lined pitch.
   ============================================================ */

:root {
  /* Tricolor, muted toward vintage print inks */
  --amarillo: #f2c014;
  --amarillo-osc: #d39a00;
  --azul: #143d7a;
  --azul-osc: #0e2b56;
  --rojo: #c43a2c;
  --rojo-osc: #9c2a1f;
  --verde: #2f6e44;
  --verde-osc: #245636;

  /* Paper & ink */
  --paper: #f4ead4;
  --paper-2: #efe1c4;
  --paper-3: #e7d6b2;
  --ink: #211c15;
  --ink-soft: #6a604c;
  --line: #cdbb93;
  --chalk: rgba(255, 248, 233, .72);

  --radio: 4px;
  /* Hard "printed sticker" offset shadow */
  --stamp: 5px 5px 0 var(--ink);
  --stamp-sm: 3px 3px 0 var(--ink);

  --fdisplay: "Saira Condensed", "Arial Narrow", sans-serif;
  --fbody: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--fbody);
  color: var(--ink);
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(20, 61, 122, .05) 0, transparent 38%),
    radial-gradient(circle at 84% 8%, rgba(196, 58, 44, .05) 0, transparent 40%),
    radial-gradient(1200px 700px at 50% -8%, rgba(255, 255, 255, .55) 0, transparent 60%);
  position: relative;
}

/* Halftone dot texture + grain overlay (fixed, non-interactive) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(33, 28, 21, .14) 1px, transparent 1.4px);
  background-size: 7px 7px;
  opacity: .5;
  mix-blend-mode: multiply;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .06;
  mix-blend-mode: multiply;
}

#app, .topbar, .footer { position: relative; z-index: 1; }

a {
  color: var(--rojo);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

/* -------- Topbar -------- */
.topbar {
  text-align: center;
  padding: 38px 16px 16px;
}
.topbar h1 {
  margin: 0;
  font-family: var(--fdisplay);
  font-size: clamp(78px, 16vw, 132px);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -3px;
  color: var(--azul);
  text-transform: uppercase;
  /* layered "printed ink" shadow for the giant scoreline */
  text-shadow:
    4px 4px 0 var(--paper),
    7px 7px 0 var(--amarillo),
    11px 11px 0 var(--ink);
}
.topbar h1 .dash {
  color: var(--rojo);
  -webkit-text-fill-color: var(--rojo);
  margin: 0 2px;
}
.tagline {
  font-family: var(--fbody);
  font-style: italic;
  color: var(--ink-soft);
  margin: 22px auto 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.4;
}
.tagline::before, .tagline::after { content: "—"; opacity: .5; margin: 0 8px; }

/* -------- Layout / screens -------- */
#app { max-width: 1040px; margin: 0 auto; padding: 12px 16px 48px; }
.screen { display: none; }
.screen.active { display: block; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) rotate(-.4deg); } to { opacity: 1; transform: none; } }

.card {
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: var(--radio);
  padding: 26px;
  box-shadow: var(--stamp);
}
.card h2 {
  font-family: var(--fdisplay);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 26px 0 14px;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.card h2:first-child { margin-top: 0; }
/* numbered section ticks, drawn from the leading digit in markup */
.card h2 { position: relative; }

/* -------- Option grids (setup) -------- */
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.option {
  display: flex; flex-direction: column; gap: 4px;
  text-align: left; cursor: pointer;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radio); padding: 15px;
  color: var(--ink);
  box-shadow: var(--stamp-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.option:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.option:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.option.selected {
  background: var(--amarillo);
  box-shadow: 5px 5px 0 var(--azul);
}
.opt-title { font-family: var(--fdisplay); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .5px; }
.opt-sub { color: var(--ink-soft); font-size: 13.5px; font-style: italic; }
.option.selected .opt-sub { color: var(--azul-osc); }
.opt-shape { font-family: var(--fdisplay); color: var(--rojo); font-size: 16px; letter-spacing: 2px; font-weight: 700; }
.option.selected .opt-shape { color: var(--azul-osc); }

/* -------- Buttons -------- */
.primary {
  font-family: var(--fdisplay);
  background: var(--verde);
  color: var(--paper); border: 2.5px solid var(--ink); border-radius: var(--radio);
  padding: 13px 24px; font-size: 21px; font-weight: 800; cursor: pointer;
  text-transform: uppercase; letter-spacing: 1px;
  box-shadow: var(--stamp);
  transition: transform .12s ease, box-shadow .12s ease;
}
.primary:hover { transform: translate(-1px, -2px); box-shadow: 6px 7px 0 var(--ink); }
.primary:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.primary.big { width: 100%; margin-top: 10px; font-size: 26px; padding: 16px; }
.ghost-btn {
  font-family: var(--fdisplay);
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radio);
  padding: 10px 18px; cursor: pointer; font-size: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  box-shadow: var(--stamp-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.ghost-btn:hover { background: var(--amarillo); transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.ghost-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.ghost-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* -------- Draft -------- */
.draft-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .draft-layout { grid-template-columns: 1fr; } }

.draft-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.badge {
  font-family: var(--fdisplay);
  background: var(--azul); color: var(--paper); font-weight: 800;
  padding: 7px 14px; border-radius: 999px; font-size: 16px;
  text-transform: uppercase; letter-spacing: .5px;
  border: 2px solid var(--ink);
  box-shadow: var(--stamp-sm);
}
.badge.ghost { background: var(--paper); color: var(--ink); }

/* Vintage chalk-lined pitch */
.pitch {
  position: relative;
  background:
    repeating-linear-gradient(0deg, var(--verde) 0 46px, var(--verde-osc) 46px 92px);
  border: 3px solid var(--ink);
  border-radius: var(--radio);
  padding: 18px 12px;
  display: flex; flex-direction: column-reverse; gap: 12px;
  min-height: 440px;
  box-shadow: var(--stamp), inset 0 0 60px rgba(0,0,0,.35);
  overflow: hidden;
}
/* chalk markings: outer box, halfway line, centre circle */
.pitch::before {
  content: "";
  position: absolute; inset: 12px;
  border: 2px solid var(--chalk);
  border-radius: 2px;
  pointer-events: none;
}
.pitch::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 116px; height: 116px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--chalk);
  border-radius: 50%;
  box-shadow: 0 -1px 0 var(--chalk);
  pointer-events: none;
}
.pitch-line { display: flex; justify-content: center; gap: 8px; position: relative; z-index: 1; }
.slot {
  flex: 1 1 0; min-width: 0; max-width: 96px; min-height: 70px;
  background: rgba(15, 30, 18, .55);
  border: 2px dashed var(--chalk);
  border-radius: var(--radio);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 5px; font-size: 11px; color: var(--chalk);
  backdrop-filter: blur(1px);
  transition: transform .15s ease;
}
.slot.filled {
  border-style: solid; border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--stamp-sm);
  animation: stampIn .3s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes stampIn { 0% { transform: scale(1.35) rotate(-3deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.slot .slot-pos { font-family: var(--fdisplay); font-weight: 800; color: var(--rojo); font-size: 13px; letter-spacing: .5px; }
.slot.filled .slot-pos { color: var(--azul); }
.slot .slot-name { font-family: var(--fbody); font-weight: 600; font-size: 12px; line-height: 1.05; margin-top: 3px; overflow-wrap: anywhere; }
.slot .slot-meta { font-family: var(--fdisplay); color: var(--ink-soft); font-size: 11px; margin-top: 2px; letter-spacing: .3px; }
.slot.target {
  border-color: var(--amarillo); border-style: solid;
  box-shadow: 0 0 0 3px var(--amarillo);
  animation: pulseTarget 1.1s ease-in-out infinite;
}
@keyframes pulseTarget { 0%,100% { box-shadow: 0 0 0 3px var(--amarillo); } 50% { box-shadow: 0 0 0 6px rgba(242,192,20,.45); } }

/* Phones: keep the whole pitch within the viewport (no pinch-to-zoom needed) */
@media (max-width: 480px) {
  #app { padding: 10px 10px 40px; }
  .pitch { padding: 12px 6px; min-height: 360px; }
  .pitch-line { gap: 5px; }
  .slot { min-height: 58px; padding: 3px 2px; }
  .slot .slot-pos { font-size: 12px; }
  .slot .slot-name { font-size: 10.5px; }
  .slot .slot-meta { font-size: 10px; }
  .roll-panel { padding: 14px 12px; }
}

/* -------- Roll panel -------- */
.roll-panel {
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: var(--radio); padding: 18px;
  box-shadow: var(--stamp);
}
.roll-banner {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background:
    repeating-linear-gradient(135deg, var(--azul) 0 14px, var(--azul-osc) 14px 28px);
  border: 2.5px solid var(--ink);
  border-radius: var(--radio); padding: 18px 14px; margin-bottom: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), var(--stamp-sm);
}
.roll-club { font-family: var(--fdisplay); font-size: 32px; font-weight: 900; color: var(--paper); text-transform: uppercase; line-height: .95; letter-spacing: .5px; text-align: center; }
.roll-decade {
  font-family: var(--fdisplay); font-size: 17px; color: var(--amarillo); font-weight: 800;
  letter-spacing: 3px; text-transform: uppercase;
  border-top: 2px solid rgba(242,192,20,.4); padding-top: 4px; margin-top: 2px;
}
.roll-banner.spin { animation: stamp .45s cubic-bezier(.3,1.4,.5,1); }
@keyframes stamp { 0% { transform: scale(1.12) rotate(-1.5deg); } 60% { transform: scale(.98) rotate(.6deg); } 100% { transform: none; } }
.roll-hint { font-style: italic; color: var(--ink-soft); font-size: 14px; text-align: center; margin: 10px 0 14px; }

.roll-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .roll-cards { grid-template-columns: 1fr; } }

/* Collectible sticker-card */
.pcard {
  text-align: left; cursor: pointer;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radio); padding: 11px 12px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  box-shadow: var(--stamp-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  animation: dealIn .32s ease both;
}
.roll-cards .pcard:nth-child(2) { animation-delay: .04s; }
.roll-cards .pcard:nth-child(3) { animation-delay: .08s; }
.roll-cards .pcard:nth-child(4) { animation-delay: .12s; }
.roll-cards .pcard:nth-child(5) { animation-delay: .16s; }
.roll-cards .pcard:nth-child(6) { animation-delay: .20s; }
@keyframes dealIn { from { opacity: 0; transform: translateY(10px) rotate(-1deg); } to { opacity: 1; transform: none; } }
.pcard:hover:not(.disabled) { background: var(--amarillo); transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.pcard:active:not(.disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pcard.disabled {
  opacity: .5; cursor: not-allowed; box-shadow: none;
  background: var(--paper-3);
  border-style: dashed;
  filter: grayscale(.6);
}
.pcard.disabled .p-rating { background: var(--ink-soft); }
.pcard.disabled .p-pos { background: var(--paper-3); color: var(--ink-soft); }
/* position-choice buttons (when a multi-position player has several open slots) */
.pcard.pos-choice { background: var(--verde); color: var(--paper); border-color: var(--ink); }
.pcard.pos-choice .p-note { color: rgba(255,255,255,.82); }
.pcard.pos-choice .p-pos { background: var(--paper); color: var(--ink); }
.pcard.pos-choice:hover { background: var(--verde-osc); transform: translate(-1px,-2px); box-shadow: 5px 6px 0 var(--ink); }
.pcard .p-left { min-width: 0; }
.pcard .p-name { font-family: var(--fbody); font-weight: 700; font-size: 15px; line-height: 1.1; }
.pcard .p-note { font-style: italic; color: var(--ink-soft); font-size: 12px; }
.pcard .p-fill { color: var(--rojo); font-size: 12px; font-weight: 700; }
/* Rating: round ink "stamp" badge */
.pcard .p-rating {
  flex: none;
  font-family: var(--fdisplay);
  background: var(--rojo); color: var(--paper);
  font-weight: 900; font-size: 19px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.pcard .p-num {
  flex: none; font-family: var(--fdisplay); font-weight: 800;
  font-size: 15px; color: var(--ink-soft); min-width: 22px; text-align: center;
}
.pcard .p-pos {
  flex: none; font-family: var(--fdisplay); font-size: 13px; font-weight: 800; color: var(--ink);
  background: var(--amarillo);
  border: 2px solid var(--ink); border-radius: 3px; padding: 1px 7px;
  text-transform: uppercase; letter-spacing: .5px;
}

/* -------- Live match -------- */
.match-card { max-width: 620px; margin: 0 auto; }
.match-stage { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: repeating-linear-gradient(135deg, var(--azul) 0 14px, var(--azul-osc) 14px 28px);
  border: 2.5px solid var(--ink); border-radius: var(--radio);
  padding: 16px 14px; box-shadow: var(--stamp-sm);
}
.sb-team { text-align: center; }
.sb-name { font-family: var(--fdisplay); font-weight: 800; font-size: 20px; color: var(--paper); text-transform: uppercase; letter-spacing: .5px; line-height: 1; }
.sb-center { text-align: center; }
.sb-score { display: block; font-family: var(--fdisplay); font-weight: 900; font-size: 40px; color: var(--amarillo); line-height: 1; }
.sb-clock { display: block; font-family: var(--fdisplay); font-weight: 700; font-size: 15px; color: var(--paper); letter-spacing: 1px; margin-top: 2px; }

.match-feed {
  margin: 14px 0; padding: 10px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radio);
  min-height: 220px; max-height: 300px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.feed-line {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--fbody); font-size: 14px; line-height: 1.25;
  padding: 3px 6px; border-radius: 3px;
  animation: feedIn .25s ease both;
}
@keyframes feedIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.feed-line .fl-min { font-family: var(--fdisplay); font-weight: 800; font-size: 13px; color: var(--ink-soft); min-width: 30px; }
.feed-line.goal { background: var(--amarillo); font-weight: 700; }
.feed-line.goal.them { background: var(--paper-3); }
.feed-line.fulltime { background: var(--ink); color: var(--paper); font-family: var(--fdisplay); text-transform: uppercase; letter-spacing: .5px; justify-content: center; margin-top: 4px; }
.feed-line.fulltime .fl-txt { color: var(--paper); }

.match-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }

/* Interactive key-moment decision panel */
.match-decision {
  margin: 4px 0 14px; padding: 14px;
  background: var(--amarillo); border: 2.5px solid var(--ink); border-radius: var(--radio);
  box-shadow: var(--stamp);
  animation: momentIn .25s cubic-bezier(.3,1.3,.5,1) both;
}
@keyframes momentIn { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
.md-prompt { font-family: var(--fdisplay); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: .3px; color: var(--ink); text-align: center; margin-bottom: 12px; line-height: 1.1; }
.md-options { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.md-option {
  font-family: var(--fdisplay); font-weight: 800; font-size: 17px;
  text-transform: uppercase; letter-spacing: .5px;
  background: var(--paper); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: var(--radio);
  padding: 12px 18px; cursor: pointer; box-shadow: var(--stamp-sm);
  transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}
.md-option:hover { background: var(--verde); color: var(--paper); transform: translate(-1px,-2px); box-shadow: 5px 6px 0 var(--ink); }
.md-option:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }

/* -------- Group standings -------- */
.groups-standing { margin: 6px 0 16px; }
.group-table {
  width: 100%; border-collapse: collapse;
  border: 2.5px solid var(--ink); border-radius: var(--radio); overflow: hidden;
  box-shadow: var(--stamp-sm); background: var(--paper);
  font-family: var(--fdisplay);
}
.group-table th, .group-table td { padding: 8px 6px; text-align: center; font-size: 15px; }
.group-table thead th {
  background: var(--azul); color: var(--paper);
  text-transform: uppercase; letter-spacing: .5px; font-size: 13px; font-weight: 800;
  border-bottom: 2px solid var(--ink);
}
.group-table .gt-team { text-align: left; font-weight: 800; padding-left: 12px; }
.group-table tr.me { background: var(--amarillo); }
.group-table .gt-pts { font-weight: 900; font-size: 18px; }
.groups-note { font-family: var(--fbody); font-style: italic; color: var(--ink-soft); font-size: 14px; margin: 12px 0 4px; }

/* Tournament hub: totals strip + knockout bracket */
.hub-h { font-family: var(--fdisplay); text-transform: uppercase; letter-spacing: .5px; font-size: 20px; margin: 18px 0 8px; color: var(--ink); }
.group-table tr.win td:first-child { box-shadow: inset 4px 0 0 var(--verde); }
.group-table tr.loss td:first-child { box-shadow: inset 4px 0 0 var(--rojo); }
.group-table tr.draw td:first-child { box-shadow: inset 4px 0 0 var(--amarillo-osc); }
.hub-totals {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center;
  font-family: var(--fdisplay); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radio);
  padding: 10px 14px; margin-top: 10px; box-shadow: var(--stamp-sm);
}
.hub-totals b { color: var(--azul); }
.hub-totals .hub-pts b { color: var(--rojo); font-size: 18px; }

/* qualified (top-4) rows */
.group-table tr.q td { background: rgba(47,110,68,.10); }
.group-table tr.me.q td, .group-table tr.me td { background: var(--amarillo); }

/* Knockout bracket drawn as a real tree (Cuartos -> Semifinal -> Final) */
.bracket-tree { display: flex; align-items: stretch; gap: 0; margin-top: 6px; overflow-x: auto; }
.br-round { flex: 1 1 0; display: flex; flex-direction: column; min-width: 150px; }
.br-col-h { font-family: var(--fdisplay); text-transform: uppercase; letter-spacing: .5px; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; text-align: center; }
.br-matches { flex: 1 1 auto; display: flex; flex-direction: column; }
.br-pair { flex: 1 1 0; display: flex; flex-direction: column; justify-content: space-around; position: relative; }
.br-match { display: flex; align-items: center; justify-content: center; padding: 6px 15px; position: relative; }
.br-match > .br-tie { width: 100%; }

/* Connectors: outgoing stub (right), incoming stub (left), and a vertical line per pair. */
.br-round:not(:last-child) .br-match::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 15px; height: 2px; background: var(--ink); transform: translateY(-1px);
}
.br-round:not(:first-child) .br-match::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 15px; height: 2px; background: var(--ink); transform: translateY(-1px);
}
.br-round:not(:last-child) .br-pair:not(.single)::after {
  content: ""; position: absolute; right: 0; top: 25%; height: 50%; width: 2px; background: var(--ink);
}

.br-tie {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radio);
  padding: 8px 10px; box-shadow: var(--stamp-sm);
  display: grid; gap: 2px; text-align: center;
}
.br-tie.mine { border-color: var(--azul); border-width: 2.5px; }
.br-tie.win { background: rgba(47,110,68,.16); }
.br-tie.loss { background: rgba(196,58,44,.14); }
.br-tie.nextup { background: var(--amarillo); }
.br-tie.pending { opacity: .6; }
.br-team { font-family: var(--fbody); font-weight: 600; font-size: 13px; line-height: 1.15; }
.br-team.br-me { color: var(--rojo); font-weight: 800; }
.br-sc { font-family: var(--fdisplay); font-weight: 900; font-size: 15px; color: var(--ink); }

/* Fullscreen FX overlay: qualification pop-up + rival roulette */
.fx-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(33, 28, 21, .58); animation: fxFade .25s ease both; padding: 20px;
}
.fx-card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 8px;
  box-shadow: var(--stamp); padding: 26px 36px; text-align: center; max-width: 92vw;
}
.fx-card.pop { animation: fxPop .5s cubic-bezier(.2,1.2,.3,1) both; }
.fx-card.draw { min-width: min(420px, 88vw); }
.fx-emoji { font-size: 46px; line-height: 1; }
.fx-title { font-family: var(--fdisplay); font-weight: 900; font-size: 46px; text-transform: uppercase; letter-spacing: 1px; color: var(--verde); margin-top: 6px; }
.fx-sub { font-family: var(--fbody); font-style: italic; font-size: 17px; color: var(--ink-soft); margin-top: 6px; }
.fx-h { font-family: var(--fdisplay); text-transform: uppercase; letter-spacing: .5px; font-size: 18px; color: var(--ink-soft); }
.fx-name { font-family: var(--fdisplay); font-weight: 900; font-size: 34px; color: var(--azul); margin-top: 10px; min-height: 42px; line-height: 1.1; }
.fx-name.landed { color: var(--rojo); text-shadow: 3px 3px 0 var(--amarillo); animation: fxPop .55s cubic-bezier(.2,1.2,.3,1) both; }
@keyframes fxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxPop {
  0% { opacity: 0; transform: scale(.5) rotate(-5deg); }
  60% { opacity: 1; transform: scale(1.06) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .fx-overlay, .fx-card.pop, .fx-name.landed, .dg-team, .pk { animation: none; } }

/* Penalty shootout tracker (green = anotó, red = falló) */
.shoot-track { background: var(--paper-2); border: 2.5px solid var(--ink); border-radius: var(--radio); padding: 9px 11px; margin: 8px 0; box-shadow: var(--stamp-sm); }
.pk-row { display: flex; align-items: center; gap: 9px; margin: 4px 0; }
.pk-lbl { font-family: var(--fdisplay); font-weight: 800; font-size: 13px; min-width: 70px; max-width: 70px; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-dots { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.pk { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--ink); display: inline-block; animation: fxPop .3s cubic-bezier(.2,1.2,.3,1) both; }
.pk.in { background: var(--verde); }
.pk.out { background: var(--rojo); }
.pk-num { font-family: var(--fdisplay); font-weight: 900; font-size: 18px; min-width: 20px; text-align: right; }

/* Group draw overlay */
.fx-card.draw-groups { min-width: min(560px, 92vw); max-height: 86vh; overflow: auto; }
.dg-wrap { display: flex; gap: 14px; margin: 12px 0 14px; text-align: left; }
.dg-col { flex: 1 1 0; min-width: 0; }
.dg-h { font-family: var(--fdisplay); text-transform: uppercase; letter-spacing: .5px; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; text-align: center; }
.dg-list { display: flex; flex-direction: column; gap: 5px; }
.dg-team {
  font-family: var(--fbody); font-weight: 600; font-size: 13px;
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--radio);
  padding: 6px 8px; box-shadow: var(--stamp-sm); overflow-wrap: anywhere;
  animation: fxPop .35s cubic-bezier(.2,1.2,.3,1) both;
}
.dg-team.me { background: var(--amarillo); font-weight: 800; }
.draw-groups .primary { width: 100%; }
@media (max-width: 480px) { .dg-team { font-size: 12px; padding: 5px 6px; } .dg-wrap { gap: 8px; } .fx-card.draw-groups { padding: 20px 16px; } }

/* Goal pop-up overlay */
.goal-pop {
  position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%);
  z-index: 120; pointer-events: none; text-align: center;
  padding: 14px 30px; border: 3px solid var(--ink); border-radius: var(--radio);
  box-shadow: 8px 8px 0 var(--ink);
  animation: goalPop 1.5s cubic-bezier(.2,1.2,.3,1) both;
}
.goal-pop.us { background: var(--verde); color: var(--paper); }
.goal-pop.them { background: var(--rojo); color: var(--paper); }
.gp-big { font-family: var(--fdisplay); font-weight: 900; font-size: 52px; line-height: .9; text-transform: uppercase; letter-spacing: 1px; }
.gp-sub { font-family: var(--fbody); font-style: italic; font-size: 18px; margin-top: 4px; }
@keyframes goalPop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.4) rotate(-6deg); }
  18% { opacity: 1; transform: translate(-50%,-50%) scale(1.08) rotate(-2deg); }
  30% { transform: translate(-50%,-50%) scale(1) rotate(0); }
  80% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.05); }
}

/* -------- Results -------- */
.result-card { text-align: center; }
.result-card h2 { justify-content: center; font-size: 30px; }
.record {
  font-family: var(--fdisplay);
  font-size: 72px; font-weight: 900; margin: 4px 0 18px; letter-spacing: 2px;
  color: var(--azul);
  text-shadow: 3px 3px 0 var(--amarillo);
}
.match-list { display: flex; flex-direction: column; gap: 8px; max-width: 480px; margin: 0 auto 20px; }
.match-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radio);
  padding: 9px 14px; font-size: 14px;
  border-left-width: 7px;
  box-shadow: var(--stamp-sm);
}
.match-row.win { border-left-color: var(--verde); }
.match-row.loss { border-left-color: var(--rojo); }
.match-row.draw { border-left-color: var(--amarillo-osc); }
.match-row .m-round { font-family: var(--fdisplay); color: var(--ink-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.match-row .m-score { font-family: var(--fdisplay); font-weight: 900; font-size: 20px; background: var(--ink); color: var(--paper); padding: 2px 12px; border-radius: 3px; }
.match-row .m-opp { text-align: right; font-style: italic; }

.result-banner {
  font-family: var(--fdisplay);
  text-transform: uppercase; letter-spacing: 1px;
  font-size: 28px; font-weight: 900; padding: 20px; border-radius: var(--radio); margin: 8px 0 18px;
  border: 2.5px solid var(--ink);
  box-shadow: var(--stamp);
}
.result-banner.champ {
  background: repeating-linear-gradient(135deg, var(--amarillo) 0 18px, var(--amarillo-osc) 18px 36px);
  color: var(--ink);
  animation: champPop .5s cubic-bezier(.3,1.5,.5,1) both;
}
@keyframes champPop { 0% { transform: scale(.85) rotate(-2deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.result-banner.fail { background: var(--paper-3); color: var(--ink); }

.result-xi { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 22px; }
.xi-chip {
  font-family: var(--fbody); font-size: 13px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 13px;
  box-shadow: var(--stamp-sm);
}
.xi-chip b { font-family: var(--fdisplay); color: var(--rojo); margin-right: 4px; }

.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.footer {
  text-align: center; color: var(--ink-soft); font-size: 13px; font-style: italic;
  padding: 14px 16px 30px;
  border-top: 2px solid var(--line); max-width: 1040px; margin: 24px auto 0;
}
.footer-author {
  display: block; margin-top: 6px; font-style: normal; font-weight: 700;
  font-family: var(--fdisplay); letter-spacing: .5px; color: var(--ink);
}

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