/* ==========================================================================
   UWR WORLD — Tournament page template (one tournament + the list of them)
   Builds on main.css tokens. Accent: --tp (cyan); live states use --signal.
   ========================================================================== */
.tournament-page { --tp: var(--cyan); --tp-2: var(--turquoise); --tp-bg: #0d3866; --tp-soft: color-mix(in srgb, var(--tp) 14%, transparent); --tp-line: color-mix(in srgb, var(--tp) 42%, transparent);
  background: var(--abyss); }
.tp-wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.tp-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.tp-ssr { max-width: 760px; margin: 0 auto; padding: 80px var(--gutter); color: var(--text-2); }
.tp-ssr h1, .tp-ssr h2 { color: var(--text); margin: 24px 0 10px; }
.tp-demo-banner { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 9px var(--gutter); background: #1a0b16; border-bottom: 1px solid rgba(255,64,129,.35); color: #fbcfe8; font-size: .84rem; text-align: center; }

/* Accent button */
.tp-btn { --bg: var(--tp); --fg: #021226; --bd: var(--tp); box-shadow: 0 12px 40px -12px color-mix(in srgb, var(--tp) 80%, transparent); }
.tp-btn:hover { --bg: color-mix(in srgb, var(--tp) 80%, #fff); }
.tp-btn.is-live { --bg: var(--signal); --bd: var(--signal); --fg: #fff; box-shadow: 0 0 0 0 rgba(255,64,129,.6); }
@media (prefers-reduced-motion: no-preference) { .tp-btn.is-live { animation: tp-pulse 2s infinite; } }
@keyframes tp-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,64,129,.55); } 70% { box-shadow: 0 0 0 14px rgba(255,64,129,0); } 100% { box-shadow: 0 0 0 0 rgba(255,64,129,0); } }

/* ---------- Header ---------- */
.tp-top { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; gap: 18px; padding-inline: var(--gutter); border-bottom: 1px solid transparent; transition: background var(--t-med), border-color var(--t-med); }
.tp-top.is-solid { background: rgba(2, 8, 18, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-color: var(--line); }
/* The UWR World logo (.brand, .brand-mark, .brand-word from main.css), as on the home page */
.tp-brand { white-space: nowrap; flex: none; }
.tp-nav { margin-left: auto; min-width: 0; }
.tp-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
/* Many sections: the links scroll sideways instead of running under the language menu and the button. */
.tp-nav { overflow: hidden; }
.tp-nav ul { overflow-x: auto; padding-right: 28px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tp-nav ul::-webkit-scrollbar { display: none; }
.tp-nav li { flex: none; }
.tp-nav a { display: block; padding: 10px 12px; border-radius: var(--radius-pill); color: var(--text-2); text-decoration: none; font: 600 .88rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; transition: color var(--t-fast), background var(--t-fast); }
.tp-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tp-top > .btn { flex: none; }
/* The language menu: before the button; on narrow screens only the globe (the open list shows the names). */
.tp-top > .tp-lang { flex: none; }
@media (max-width: 560px) { .tp-top { gap: 10px; } .tp-top > .tp-lang > summary { padding: 0 10px; } .tp-top > .tp-lang > summary > span { display: none; } }
@media (max-width: 940px) { .tp-nav ul { display: none; } }
@media (max-width: 420px) { .tp-brand .brand-word { font-size: 1.2rem; } .tp-brand .brand-mark { width: 28px; height: 28px; } .tp-top > .btn { padding: 9px 12px; font-size: .74rem; } }

/* ---------- Hero ---------- */
.tp-hero { position: relative; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + clamp(48px, 9vw, 110px)) 0 clamp(56px, 8vw, 96px); overflow: hidden; isolation: isolate; text-align: center; }
.tp-hero-water { position: absolute; inset: 0; z-index: -1;
  background: var(--cover, none) center / cover no-repeat, radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--tp) 28%, transparent), transparent 70%), radial-gradient(120% 90% at 50% 10%, var(--tp-bg) 0%, color-mix(in srgb, var(--tp-bg) 45%, #020812) 50%, var(--abyss) 100%); }
.tp-hero-water::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 46px, rgba(125,211,252,.06) 52px 62px, transparent 70px 130px); mask-image: linear-gradient(#000, transparent 85%); -webkit-mask-image: linear-gradient(#000, transparent 85%); }
.tp-hero-water::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,8,18,.45), rgba(2,8,18,.2) 40%, var(--abyss)); }
.tp-hero-in { display: grid; justify-items: center; gap: 18px; }
.tp-hero-logo { width: clamp(96px, 12vw, 136px); height: auto; max-height: 136px; object-fit: contain; filter: drop-shadow(0 16px 40px rgba(0,0,0,.6)); }
.tp-geo { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font: 600 .95rem/1.2 var(--font-display); letter-spacing: .2em; text-transform: uppercase; flex-wrap: wrap; justify-content: center; }
.tp-geo .flag { width: 24px; height: 16px; }
.tp-h1 { font-size: clamp(2.4rem, 7.4vw, 6.4rem); line-height: .9; text-transform: uppercase; max-width: 18ch; text-wrap: balance; filter: drop-shadow(0 10px 40px rgba(2,8,18,.5)); }
.tp-tagline { max-width: 62ch; font-size: var(--fs-lead); color: var(--text-2); text-wrap: pretty; }
.tp-when { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.tp-status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--tp-line); background: var(--tp-soft); color: var(--text); font: 600 .78rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.tp-status.is-live { border-color: rgba(255,64,129,.55); background: rgba(255,64,129,.14); }
.tp-status.is-finished { border-color: var(--line-strong); background: rgba(255,255,255,.04); color: var(--text-2); }
.tp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
@media (prefers-reduced-motion: no-preference) { .tp-dot { animation: tp-blink 1.2s infinite; } }
@keyframes tp-blink { 50% { opacity: .2; } }
.tp-dates { display: inline-flex; gap: 8px; align-items: center; color: var(--text); font: 600 1.1rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.tp-dates i { color: var(--tp); }
.tp-count { display: flex; gap: 10px; align-items: flex-end; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.tp-count span { display: grid; justify-items: center; min-width: 78px; padding: 12px 10px 10px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(4,20,42,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tp-count b { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1 var(--font-display); color: var(--text); }
.tp-count small { font: 500 var(--fs-mono)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.tp-count em { font-style: normal; color: var(--muted); align-self: center; }
.tp-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.tp-socials { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tp-socials a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: rgba(8,27,49,.4); color: var(--text-2); text-decoration: none; font-size: .88rem; transition: color var(--t-fast), border-color var(--t-fast); }
.tp-socials a:hover { color: var(--text); border-color: var(--tp); }
.tp-socials.is-block { justify-content: flex-start; }

/* ---------- Facts strip ---------- */
.tp-facts { border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(12,34,64,.55), rgba(12,34,64,.25), rgba(12,34,64,.55)); }
.tp-facts-in { margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tp-facts-in > div { padding: 24px 16px; display: grid; gap: 6px; align-content: start; text-align: center; border-left: 1px solid var(--line); }
.tp-facts-in > div:first-child { border-left: 0; }
.tp-facts dt { font: 500 var(--fs-mono)/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tp-facts dd { margin: 0; font: 700 clamp(1.25rem, 2.4vw, 1.75rem)/1.05 var(--font-display); color: var(--text); text-wrap: balance; }
.tp-facts p { color: var(--text-2); font-size: .84rem; }
@media (max-width: 620px) { .tp-facts-in { grid-template-columns: 1fr 1fr; } .tp-facts-in > div { border-left: 0; border-top: 1px solid var(--line); } .tp-facts-in > div:nth-child(-n+2) { border-top: 0; } .tp-facts-in > div:nth-child(2n) { border-left: 1px solid var(--line); } }

/* ---------- Sections ---------- */
.tp-sec { padding: clamp(56px, 8vw, 104px) 0; scroll-margin-top: var(--header-h); }
.tp-sec-alt { background: linear-gradient(180deg, rgba(12,34,64,.45), rgba(12,34,64,.15)); border-block: 1px solid var(--line); }
.tp-k { color: var(--tp); display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.tp-k::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.tp-h2 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); text-transform: uppercase; line-height: .94; max-width: 22ch; text-wrap: balance; }
.tp-h3 { margin: 34px 0 14px; color: var(--text-2); }
.tp-lead { margin-top: 14px; color: var(--text-2); font-size: var(--fs-lead); max-width: 60ch; }
.tp-prose { margin-top: 20px; display: grid; gap: 14px; color: var(--text-2); font-size: 1.04rem; max-width: 64ch; }
.tp-card { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; background: var(--navy); }

/* About */
.tp-about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .tp-about { grid-template-columns: 1fr; } }
.tp-keyfacts dl { margin: 0 0 18px; display: grid; gap: 14px; }
.tp-keyfacts dt { color: var(--muted); margin-bottom: 4px; }
.tp-keyfacts dd { margin: 0; color: var(--text); font: 600 1.1rem/1.2 var(--font-display); letter-spacing: .02em; }

/* Filters (category / time) */
.tp-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; }
.tp-filter button { padding: 9px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font: 600 .84rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.tp-filter button small { color: var(--muted); margin-left: 4px; font-family: var(--font-mono); letter-spacing: 0; }
.tp-filter button.is-active { background: var(--tp); border-color: var(--tp); color: #021226; }
.tp-filter button.is-active small { color: #021226; }

/* Teams */
.tp-teams { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.tp-team { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: rgba(8,27,49,.7); }
.tp-team[hidden] { display: none; }
.tp-team.is-intent { border-style: dashed; }
.tp-team.is-gold { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.tp-team.is-silver { border-color: color-mix(in srgb, var(--silver) 50%, transparent); }
.tp-team.is-bronze { border-color: color-mix(in srgb, var(--bronze) 55%, transparent); }
.tp-team:has(.tp-team-pos) { grid-template-columns: 40px auto minmax(0, 1fr); }
.tp-team-pos { display: grid; place-items: center; gap: 2px; font: 700 1.5rem/1 var(--font-display); color: var(--text-2); }
.tp-team-pos i { font-size: .8rem; }
.tp-team-pos.is-gold { color: var(--gold); } .tp-team-pos.is-silver { color: var(--silver); } .tp-team-pos.is-bronze { color: var(--bronze); }
.tp-team-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.06); border: 1px solid var(--line); flex: none; }
.tp-team-logo { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.tp-team-flag { width: 100%; height: 100%; object-fit: cover; }
.tp-team-mono { font: 700 1rem/1 var(--font-display); color: var(--text); }
.tp-team-txt { display: grid; gap: 3px; min-width: 0; }
.tp-team-txt strong { font: 700 1.25rem/1.05 var(--font-display); text-transform: uppercase; letter-spacing: .02em; color: var(--text); overflow-wrap: anywhere; }
.tp-team-txt > span { color: var(--text-2); font-size: .86rem; }
.tp-team-txt small { color: var(--muted); font-size: .78rem; }
.tp-team-txt small a { color: var(--muted); }
.tp-team-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.tp-team-links a { color: var(--tp); font: 600 .78rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.tp-team-links a:hover { text-decoration: underline; }
.tp-empty { margin-top: 26px; display: grid; justify-items: center; gap: 8px; text-align: center; padding: clamp(28px, 5vw, 48px) 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--text-2); }
.tp-empty i { font-size: 1.8rem; color: var(--tp); margin-bottom: 4px; }
.tp-empty strong { color: var(--text); }

/* Podiums */
.tp-podiums { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; margin-top: 24px; }
.tp-podium[hidden] { display: none; }
.tp-podium { padding: 20px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 60%), var(--navy); }
.tp-podium h3 { color: var(--gold); margin-bottom: 16px; font-weight: 500; }
.tp-podium ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; }
.tp-podium li { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 14px 6px 0; border-radius: 12px 12px 0 0; background: rgba(255,255,255,.04); border-top: 3px solid currentColor; }
.tp-podium li.is-gold { color: var(--gold); padding-top: 28px; }
.tp-podium li.is-silver { color: var(--silver); padding-top: 18px; }
.tp-podium li.is-bronze { color: var(--bronze); }
.tp-podium strong { color: var(--text); font: 700 1rem/1.05 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.tp-podium em { font: 700 2rem/1 var(--font-display); font-style: normal; padding-bottom: 10px; }

/* Matches */
.tp-day { margin: 30px 0 10px; color: var(--text-2); }
.tp-day[hidden] { display: none; }
.tp-matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tp-match { display: grid; gap: 6px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(8,27,49,.6); }
.tp-match[hidden] { display: none; }
.tp-match-meta { color: var(--muted); }
.tp-match-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; }
.tp-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp-side:last-child { flex-direction: row-reverse; text-align: right; }
.tp-side b { font: 700 1.1rem/1.05 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; color: var(--text-2); }
.tp-side .tp-team-logo, .tp-side .tp-team-flag, .tp-side .tp-team-mono { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.tp-side .tp-team-flag { width: 30px; height: 20px; border-radius: 3px; }
/* Teams without a crest: the initials sit centred in the circle (the right-hand side's text-align must not push them) */
.tp-side .tp-team-mono { display: grid; place-items: center; text-align: center; background: rgba(255,255,255,.06); font-size: .8rem; }
.tp-side.is-tbd b { color: var(--muted); font-weight: 600; }
.win-a .tp-side:first-child b, .win-b .tp-side:last-child b { color: var(--text); }
.tp-score { min-width: 78px; text-align: center; font: 700 1.6rem/1 var(--font-display); color: var(--text); padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.05); }
.tp-score i { font-style: normal; color: var(--muted); margin: 0 6px; font-size: 1rem; }
.tp-match small { color: var(--muted); font-size: .8rem; }
/* Long calendars stay short: day tabs + category, lower rows (on wide screens the time and group sit to the left) */
.tp-match-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; }
.tp-match-filters .tp-filter { margin: 0; }
.tp-days + .tp-filter { padding-left: 22px; border-left: 1px solid var(--line); }
.tp-match-filters ~ .tp-day[hidden] + .tp-matches { margin-top: 18px; }
.tp-matches[hidden], .tp-team[hidden], .tp-podium[hidden], .tp-more[hidden] { display: none; }
#partidos .tp-match { padding: 8px 14px; gap: 4px; }
#partidos .tp-score { min-width: 66px; padding: 4px 8px; font-size: 1.3rem; }
#partidos .tp-side b { font-size: 1rem; }
#partidos .tp-side .tp-team-logo, #partidos .tp-side .tp-team-mono { width: 26px; height: 26px; }
@media (min-width: 760px) {
  #partidos .tp-match { grid-template-columns: 168px minmax(0, 1fr); column-gap: 16px; align-items: center; }
  #partidos .tp-match-meta { font-size: .72rem; line-height: 1.35; }
  #partidos .tp-match small { grid-column: 2; }
}
@media (max-width: 560px) { .tp-days + .tp-filter { padding-left: 0; border-left: 0; } }
.tp-more-wrap { margin: 18px 0 0; text-align: center; }
.tp-more i { margin-right: 8px; }
@media (max-width: 560px) { .tp-match-row { gap: 8px; } .tp-side b { font-size: .95rem; } .tp-score { min-width: 64px; font-size: 1.3rem; } .tp-side .tp-team-logo, .tp-side .tp-team-flag, .tp-side .tp-team-mono { display: none; } }

/* Live */
.tp-live.is-live { background: radial-gradient(80% 120% at 0% 0%, rgba(255,64,129,.14), transparent 60%), linear-gradient(180deg, rgba(12,34,64,.5), rgba(12,34,64,.2)); border-block: 1px solid rgba(255,64,129,.3); }
.tp-live.is-live .tp-k { color: var(--signal); }
.tp-streams { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.tp-stream { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--navy); color: var(--text); text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast); }
.tp-stream:hover { border-color: var(--tp); transform: translateY(-2px); }
.tp-stream > i:first-child { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--tp-soft); color: var(--tp); font-size: 1.3rem; }
.tp-live.is-live .tp-stream > i:first-child { background: rgba(255,64,129,.16); color: var(--signal); }
.tp-stream strong { display: block; font: 700 1.15rem/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.tp-stream small { color: var(--muted); font-size: .82rem; }
.tp-stream-go { color: var(--muted); }

/* Programme */
.tp-prog-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .tp-prog-grid { grid-template-columns: 1fr; } }
.tp-prog { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--tp-line); }
.tp-prog li { position: relative; display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 0 12px 20px; }
.tp-prog li::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--abyss); border: 2px solid var(--tp); }
.tp-prog li.is-past::before { background: var(--tp); }
.tp-prog li.is-past { opacity: .62; }
.tp-prog time { font: 600 .95rem/1.25 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--tp); }
.tp-prog strong { display: block; color: var(--text); font-weight: 500; }
.tp-prog div span { display: block; color: var(--text-2); font-size: .88rem; margin-top: 2px; }
.tp-prog em { font-style: normal; color: var(--turquoise); align-self: start; }
.tp-prog.is-compact { margin-top: 14px; }
.tp-prog.is-compact li { grid-template-columns: 1fr auto; }
.tp-prog.is-compact time { grid-column: 1 / -1; font-size: .85rem; }
.tp-fed h3 { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-weight: 500; }
.tp-fed h3 i { color: var(--tp); }
@media (max-width: 560px) { .tp-prog li { grid-template-columns: 1fr auto; } .tp-prog time { grid-column: 1 / -1; } }

/* Venue */
.tp-venue { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .tp-venue { grid-template-columns: 1fr; } }
.tp-addr { margin: 18px 0 0; display: flex; gap: 10px; align-items: baseline; color: var(--text); font-size: 1.05rem; }
.tp-addr i { color: var(--tp); }
.tp-venue-dl { margin: 22px 0 24px; display: grid; gap: 16px; }
.tp-venue-dl dt { color: var(--muted); margin-bottom: 4px; }
.tp-venue-dl dd { margin: 0; color: var(--text-2); }
.tp-map { height: clamp(300px, 42vw, 460px); border-radius: var(--radius-lg); border: 1px solid var(--line-strong); overflow: hidden; background: var(--navy); z-index: 0; }
.tp-pin { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--tp); box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.tp-pin i { transform: rotate(45deg); color: #021226; font-size: 1rem; }

/* Photos */
.tp-gallery { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(150px, 20vw, 240px); gap: 12px; }
.tp-gallery li { position: relative; }
.tp-gallery li:first-child { grid-column: span 2; grid-row: span 2; }
.tp-gallery button { width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--navy); }
.tp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.tp-gallery button:hover img { transform: scale(1.05); }
.tp-credit { position: absolute; left: 10px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(2,8,18,.7); color: var(--text-2); font-size: .7rem; pointer-events: none; }
@media (max-width: 620px) { .tp-gallery { grid-template-columns: 1fr 1fr; } }
.tp-videos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.tp-videos p { margin-top: 8px; color: var(--text-2); font-size: .9rem; }
.tp-yt, .tp-videos iframe { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); overflow: hidden; padding: 0; cursor: pointer; background: #000; display: block; }
.tp-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.tp-yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(2,8,18,.7); border: 2px solid #fff; color: #fff; }
.tp-ig { display: grid; justify-items: start; gap: 8px; }
.tp-ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; width: 100%; }
.tp-ig-grid .instagram-media { min-width: 0 !important; margin: 0 !important; }

.tp-lightbox { padding: 0; border: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible; }
.tp-lightbox::backdrop { background: rgba(2,8,18,.9); }
.tp-lightbox figure { margin: 0; }
.tp-lightbox img { max-width: 94vw; max-height: 84vh; border-radius: var(--radius); display: block; }
.tp-lightbox figcaption { margin-top: 8px; color: var(--text-2); font-size: .82rem; text-align: center; }
.tp-lb-x, .tp-lb-prev, .tp-lb-next { position: fixed; color: var(--text); background: rgba(2,8,18,.6); }
.tp-lb-x { top: 16px; right: 16px; } .tp-lb-prev { left: 16px; top: 50%; } .tp-lb-next { right: 16px; top: 50%; }

/* History */
.tp-history { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.tp-history li { display: grid; grid-template-columns: 70px minmax(110px, 180px) minmax(0, 1fr); gap: 12px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tp-hy { font: 700 1.5rem/1 var(--font-display); color: var(--text); }
.tp-hc { color: var(--text-2); font-weight: 500; display: grid; }
.tp-hc small { color: var(--muted); font-size: .76rem; }
.tp-hpod { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tp-hpod > span { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 3px solid currentColor; }
.tp-hpod .is-gold { color: var(--gold); } .tp-hpod .is-silver { color: var(--silver); } .tp-hpod .is-bronze { color: var(--bronze); }
.tp-hp { display: inline-flex; align-items: center; gap: 8px; }
.tp-hp b { color: var(--text); font-weight: 500; }
.tp-hp .flag { width: 22px; height: 15px; }
.tp-history li.is-next { background: linear-gradient(90deg, var(--tp-soft), transparent 70%); padding-left: 12px; border-radius: 10px 0 0 10px; }
.tp-history li.is-next .tp-hy { color: var(--tp); }
.tp-hnext { color: var(--tp); }
.tp-src { margin-top: 14px; }
@media (max-width: 620px) { .tp-history li { grid-template-columns: 60px 1fr; } .tp-hpod { grid-column: 1 / -1; } }

/* Sponsors */
.tp-sponsors { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tp-sponsors li.is-main { grid-column: span 2; }
.tp-sponsors a, .tp-sponsors li > span { height: 100%; min-height: 120px; display: grid; place-items: center; gap: 8px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); text-decoration: none; color: var(--text); text-align: center; transition: border-color var(--t-fast); }
.tp-sponsors a:hover { border-color: var(--tp); }
.tp-sponsors img { max-width: 100%; max-height: 64px; object-fit: contain; }
.tp-sponsors li.is-main img { max-height: 90px; }
.tp-sponsors strong { font: 700 1.2rem/1.1 var(--font-display); text-transform: uppercase; }
.tp-sponsors small { color: var(--muted); }
@media (max-width: 420px) { .tp-sponsors li.is-main { grid-column: auto; } }

/* Sources */
.tp-sources { padding-block: clamp(40px, 6vw, 64px); }
.tp-sources-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.tp-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tp-links a { color: var(--text-2); text-decoration: none; }
.tp-links a:hover { color: var(--tp); text-decoration: underline; }

/* The calendar (/torneos/) */
.tp-hero-list { padding-bottom: clamp(40px, 6vw, 72px); }
.tp-cal-sec { padding-top: clamp(28px, 4vw, 48px); }
.tp-cal-filters { position: sticky; top: var(--header-h); z-index: 20; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; padding: 14px 0; background: rgba(2,8,18,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.tp-cal-filters .tp-filter { margin: 0; }
.tp-cal-filters label { display: grid; gap: 6px; min-width: 160px; flex: 0 1 220px; }
.tp-cal-filters label span { color: var(--muted); }
.tp-cal-filters select { appearance: none; -webkit-appearance: none; width: 100%; padding: 10px 34px 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--text); font: 500 .92rem/1.2 var(--font-body);
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2394A3B8' stroke-width='2'/%3E%3C/svg%3E") right 12px center / 12px 8px no-repeat; }
.tp-cal-filters select:focus-visible { outline: 2px solid var(--tp); outline-offset: 2px; }
.tp-cal-count { margin: 16px 0 0; color: var(--muted); }
.tp-month { margin-top: 30px; }
.tp-month-h { font-size: clamp(1.5rem, 3vw, 2.2rem); text-transform: uppercase; color: var(--text); padding-bottom: 10px; border-bottom: 2px solid var(--tp-line); }
.tp-cal { list-style: none; margin: 0; padding: 0; }
.tp-cal li { border-bottom: 1px solid var(--line); }
.tp-cal li > a, .tp-cal li > div { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 8px; color: var(--text); text-decoration: none; border-radius: 10px; transition: background var(--t-fast); }
.tp-cal li > a:hover { background: rgba(56,189,248,.07); }
.tp-cal li.is-past { opacity: .7; }
.tp-cal-day { display: grid; justify-items: center; padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.tp-cal li.has-page .tp-cal-day { border-color: var(--tp-line); background: var(--tp-soft); }
.tp-cal-day b { font: 700 1.35rem/1 var(--font-display); white-space: nowrap; }
.tp-cal-day small { font: 500 var(--fs-mono)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.tp-cal-txt { display: grid; gap: 4px; min-width: 0; }
.tp-cal-txt strong { font: 700 1.2rem/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.tp-cal-meta { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .88rem; }
.tp-cal-meta .flag { width: 20px; height: 14px; }
.tp-cal-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.tp-cal-go { color: var(--muted); margin-left: 4px; }
@media (max-width: 640px) {
  .tp-cal li > a, .tp-cal li > div { grid-template-columns: 60px minmax(0, 1fr); }
  .tp-cal-tags { grid-column: 2; justify-content: flex-start; }
  .tp-cal-filters { position: static; }
  .tp-cal-filters label { flex: 1 1 140px; min-width: 0; }
}

/* Footer */
.tp-foot { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.tp-foot-in { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; color: var(--muted); }
.tp-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.tp-foot a { color: var(--text-2); text-decoration: none; }
.tp-foot a:hover { color: var(--tp); }

/* ==========================================================================
   Competitions: brand stripe, competition pill, divisions, competition page, palmarés
   ========================================================================== */
.has-brand .tp-top::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--tp), var(--tp-2)); }
.tp-comp-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--tp-line); background: rgba(2,8,18,.45); color: var(--text); font: 600 .9rem/1.1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; text-align: center; transition: border-color var(--t-fast), background var(--t-fast); }
.tp-comp-pill i { color: var(--tp); font-size: .8em; }
a.tp-comp-pill:hover { border-color: var(--tp); background: var(--tp-soft); }

/* Divisions of the season */
.tp-divs-sec { padding-block: clamp(40px, 6vw, 72px); }
.tp-divs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tp-divs li > a, .tp-divs li > div { position: relative; height: 100%; display: grid; gap: 6px; align-content: start; padding: 18px 18px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: rgba(8,27,49,.55); color: var(--text); text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast); }
.tp-divs li > a:hover { border-color: var(--tp); transform: translateY(-2px); }
.tp-divs li.is-current > div { border-color: var(--tp); background: linear-gradient(160deg, var(--tp-soft), rgba(8,27,49,.6)); box-shadow: inset 0 3px 0 var(--tp); }
.tp-div-n { color: var(--tp); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.tp-divs strong { font: 700 1.25rem/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.tp-div-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); font-size: .9rem; }
.tp-div-meta .flag { width: 20px; height: 14px; }
.tp-divs em { justify-self: start; margin-top: 4px; color: var(--tp-2); font-style: normal; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.tp-divs .tp-status { justify-self: start; padding: 5px 10px; font-size: .68rem; }

/* Competition page */
.tp-hero-logo.is-series { width: clamp(120px, 16vw, 180px); max-height: 180px; }
.tp-s-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; }
.tp-s-stats span { padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--tp-line); background: var(--tp-soft); color: var(--text); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.tp-next { padding-block: 18px; }
.tp-next-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k go" "name go" "meta go"; gap: 6px 24px; align-items: center; padding: 20px 24px; border-radius: var(--radius-lg); border: 1px solid var(--tp-line); background: linear-gradient(110deg, var(--tp-soft), rgba(8,27,49,.5) 60%); color: var(--text); text-decoration: none; box-shadow: inset 4px 0 0 var(--tp); transition: border-color var(--t-fast); }
a.tp-next-card[href]:hover { border-color: var(--tp); }
.tp-next-card .tp-k { grid-area: k; margin: 0; }
.tp-next-card strong { grid-area: name; font: 700 clamp(1.3rem, 2.6vw, 1.9rem)/1.05 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.tp-next-meta { grid-area: meta; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
.tp-next-meta .flag { width: 20px; height: 14px; }
.tp-next-go, .tp-next-card .tp-status { grid-area: go; color: var(--tp); font: 600 .9rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 640px) { .tp-next-card { grid-template-columns: 1fr; grid-template-areas: "k" "name" "meta" "go"; } .tp-next-go { white-space: normal; } }
.tp-linked { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.tp-linked a, .tp-linked span { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.05rem/1.2 var(--font-display); letter-spacing: .02em; }
.tp-linked a:hover { color: var(--tp); }
.tp-linked img { width: 32px; height: 32px; object-fit: contain; }

/* Editions, season by season */
.tp-season + .tp-season { margin-top: 34px; }
.tp-season-h { font-size: clamp(1.3rem, 2.4vw, 1.8rem); text-transform: uppercase; color: var(--text); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--tp-line); }
.tp-eds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tp-eds li > a, .tp-eds li > div { height: 100%; display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--navy); color: var(--text); text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast); }
.tp-eds li > a:hover { border-color: var(--tp); transform: translateY(-2px); }
.tp-eds li.is-linked > a, .tp-eds li.is-linked > div { background: rgba(8,27,49,.4); border-style: dashed; }
.tp-ed-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 1.4em; }
.tp-ed-div { color: var(--tp); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.tp-ed-comp { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.tp-ed-top .tp-status { padding: 4px 10px; font-size: .66rem; }
.tp-eds strong { font: 700 1.15rem/1.15 var(--font-display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.tp-ed-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); font-size: .88rem; }
.tp-ed-meta .flag { width: 20px; height: 14px; }
.tp-ed-champs { display: grid; gap: 6px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.tp-ed-champ { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.tp-ed-champ > i { color: var(--gold); }
.tp-ed-champ small { color: var(--muted); font: 500 .7rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* A team in one line: mark + name */
.tp-tc { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tp-tc > img, .tp-tc > .tp-team-mono { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.06); font-size: .7rem; }
.tp-tc > .tp-team-flag { flex: none; width: 26px; height: 18px; border-radius: 3px; object-fit: cover; }
.tp-tc > .tp-team-logo { background: #fff; padding: 2px; object-fit: contain; }
.tp-tc b { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }

/* Palmarés */
.tp-pal-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .tp-pal-grid { grid-template-columns: 1fr; } }
.tp-pal + .tp-pal { margin-top: 10px; }
.tp-pal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tp-pal-t { width: 100%; border-collapse: collapse; min-width: 480px; }
.tp-pal-t th, .tp-pal-t td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tp-pal-t thead th { font: 500 var(--fs-mono)/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: rgba(8,27,49,.6); }
.tp-pal-t tbody tr:last-child > * { border-bottom: 0; }
.tp-pal-t tbody th { font: 700 1.1rem/1.1 var(--font-display); color: var(--text); white-space: nowrap; }
.tp-pal-t tbody th a { color: inherit; text-decoration: none; }
.tp-pal-t tbody th a:hover { color: var(--tp); }
.tp-pal-t tbody th small { display: block; margin-top: 3px; color: var(--muted); font: 400 .78rem/1.2 var(--font-body); }
.tp-pal-t td.is-gold { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--gold) 70%, transparent); }
.tp-pal-t td.is-silver { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--silver) 60%, transparent); }
.tp-pal-t td.is-bronze { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bronze) 60%, transparent); }
.tp-titles ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.tp-titles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.tp-titles-n { font: 700 1.4rem/1 var(--font-display); color: var(--tp-2); }
.tp-titles-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.tp-titles-bar span { display: block; width: var(--w); height: 100%; background: linear-gradient(90deg, var(--tp), var(--tp-2)); }

/* Calendar: competition line */
.tp-cal-comp { display: inline-flex; align-items: center; gap: 8px; color: var(--tp); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.tp-cal-comp img { width: 22px; height: 22px; object-fit: contain; }
/* Meta lines: the flag stays inline with the text when it wraps */
.tp-next-meta, .tp-ed-meta, .tp-div-meta { display: block; }
.tp-next-meta .flag, .tp-ed-meta .flag, .tp-div-meta .flag { display: inline-block; vertical-align: -2px; margin-right: 8px; }

/* Club crest + small country flag (club tournaments). The mark is no longer clipped so the flag can sit on its edge. */
.tp-team-mark { position: relative; overflow: visible; }
.tp-team-mark > .tp-team-logo, .tp-team-mark > .tp-team-flag, .tp-team-mark > .tp-team-mono { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; }
.tp-flag-badge { position: absolute; right: -5px; bottom: -3px; width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 2px var(--navy); }
.tp-side .tp-flag-badge { display: none; }
.tp-tc-mark { position: relative; flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; }
.tp-tc-mark > .tp-team-logo, .tp-tc-mark > .tp-team-mono { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.06); font-size: .7rem; }
.tp-tc-mark > .tp-team-logo { background: #fff; padding: 2px; object-fit: contain; }
.tp-tc-mark .tp-flag-badge { right: -4px; bottom: -2px; width: 13px; height: 9px; border-radius: 2px; box-shadow: 0 0 0 1.5px var(--navy); }
/* Palmarés: long club names wrap between words, never letter by letter; the table scrolls sideways on phones */
.tp-pal-t { min-width: 640px; }
.tp-pal-t td { min-width: 170px; }
.tp-pal-t .tp-tc b { overflow-wrap: normal; word-break: normal; }

/* ---------- Format and points, entries, technical staff (formatHTML, staffHTML) ---------- */
.tp-format { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .tp-format { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.tp-format-facts { margin: 0; display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.tp-format-facts dt, .tp-entry dt { color: var(--muted, #94A3B8); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.tp-format-facts dd, .tp-entry dd { margin: 4px 0 0; font: 600 1.05rem/1.3 var(--font-display, inherit); }
.tp-points h3, .tp-format-note h3 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #94A3B8); }
.tp-points ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tp-points li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line, rgba(148,163,184,.2)); }
.tp-points li:last-child { border-bottom: 0; }
.tp-points b { font: 700 1.2rem/1 var(--font-display, inherit); }
.tp-format-note { margin-top: 18px; }
.tp-entry { margin-top: 18px; display: grid; gap: 12px; }
.tp-entry dl { margin: 0; display: grid; gap: 12px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.tp-entry-state { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; vertical-align: middle; background: rgba(148,163,184,.18); }
.tp-entry-state.is-open { background: rgba(110,231,183,.16); color: #6EE7B7; }
.tp-refs { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.tp-ref { display: flex; gap: 16px; align-items: flex-start; }
.tp-ref-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(56,189,248,.14); font: 700 1.2rem/1 var(--font-display, inherit); }
.tp-ref-photo img { width: 100%; height: 100%; object-fit: cover; }
.tp-ref div { min-width: 0; display: grid; gap: 4px; }
.tp-ref strong { font: 700 1.2rem/1.15 var(--font-display, inherit); text-transform: uppercase; }
.tp-ref-role { margin: 0; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent, #38BDF8); }
.tp-ref-where { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.tp-ref-facts { font-size: .76rem; color: var(--muted, #94A3B8); }
.tp-ref-note { margin: 4px 0 0; font-size: .9rem; color: var(--muted, #94A3B8); }
.tp-staff { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tp-staff li { display: flex; gap: 12px; align-items: center; }
.tp-staff .tp-ref-photo { width: 46px; height: 46px; font-size: .9rem; }
.tp-staff div { display: grid; gap: 2px; min-width: 0; }
.tp-staff span, .tp-staff small { color: var(--muted, #94A3B8); font-size: .86rem; }


/* ---------- live results (Home 1.31.0): what is played now, the games and the group tables ---------- */
.tp-now { border-block: 1px solid rgba(255,64,129,.35); background: linear-gradient(180deg, rgba(255,64,129,.08), transparent 70%); }
.tp-now-list .tp-match { border-color: rgba(255,64,129,.55); }
.tp-now-none { margin-top: 18px; color: var(--text-2); }
.tp-match.is-live { border-color: rgba(255,64,129,.55); background: rgba(255,64,129,.08); }
.tp-match.is-live .tp-score { background: rgba(255,64,129,.18); }
.tp-match.is-mine { box-shadow: inset 3px 0 0 var(--tp); }
.tp-live-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: #fff; font: 600 .72rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.tp-now-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.tp-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-2); }
.tp-follow select { min-height: 44px; max-width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--navy); color: var(--text); font: inherit; }
.tp-mine-next { color: var(--tp); font-weight: 500; }
.tp-now-upd { color: var(--muted); font-size: .78rem; }
.tp-tables { display: grid; gap: 18px; margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.tp-table-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(8,27,49,.6); padding: 16px; min-width: 0; }
.tp-table-card[hidden] { display: none; }
.tp-table-card h3 { margin: 0 0 10px; color: var(--text-2); font-size: .85rem; }
.tp-table-card h3 em { margin-left: 8px; color: var(--tp); font-style: normal; }
.tp-table-scroll { overflow-x: auto; }
.tp-table { width: 100%; min-width: 360px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
.tp-table th, .tp-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.tp-table th { color: var(--muted); font: 500 .72rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.tp-table th abbr { text-decoration: none; }
.tp-table td:nth-child(2), .tp-table th:nth-child(2) { text-align: left; }
.tp-table td:nth-child(2) .tp-side { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; text-align: left; }
.tp-table td:nth-child(2) .tp-side b { font-size: .95rem; }
.tp-table td:nth-child(2) .tp-team-logo, .tp-table td:nth-child(2) .tp-team-mono, .tp-table td:nth-child(2) .tp-team-flag { width: 24px; height: 24px; font-size: .62rem; }
.tp-table td:nth-child(2) .tp-flag-badge, .tp-table td:nth-child(2) .tp-team-mono { display: none; }
.tp-table tr.is-mine td { background: var(--tp-soft); }
.tp-table tbody tr:last-child td { border-bottom: 0; }

/* «Wins only» ranking: the two short paragraphs of the card. */
.tp-points p { margin: 0; line-height: 1.55; }
.tp-points p + p { margin-top: .7em; color: var(--muted, #94A3B8); font-size: .95em; }
/* The figures never break over two lines («0–0», «+12»): only the team name wraps. */
.tp-table th:not(:nth-child(2)), .tp-table td:not(:nth-child(2)) { white-space: nowrap; }

/* ---------- «Compartir»: a small button on every game and every table, and how long is left until a game ---------- */
.tp-match { position: relative; padding-right: 58px; }
#partidos .tp-match { padding-right: 58px; }
.tp-share-mini { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-2); font-size: .9rem; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.tp-share-mini:hover, .tp-share-mini:focus-visible { color: var(--tp, var(--turquoise)); border-color: currentColor; background: rgba(255,255,255,.08); }
.tp-share-mini:disabled { opacity: .5; cursor: progress; }
.tp-match .tp-share-mini { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.tp-table-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-share-cal { margin-left: auto; }
.tp-left { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tp, var(--turquoise)) 18%, transparent); color: var(--tp, var(--turquoise)); font-weight: 500; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.tp-mine-next .tp-left { font-family: var(--font-mono); font-size: .78rem; }
@media print { .tp-share-mini, .tp-share-cal, [data-share] { display: none !important; } }
