/* JDNJ 2026. Digital palette from juveniles 2026.pdf, page 4.
   Purple is sampled from the applications; it has no labelled swatch in the PDF.
   This final layer applies to both layouts without changing sports data or medals. */
:root {
  /* Para desactivar el trazado, elimina esta línea: vuelve al SVG original. */
  --brand-skyline-image: url("/img/brand/caracas-skyline-animated.svg?v=1791914407896");
  --brand-purple: #683167;
  --brand-plum: #3b1749;
  --brand-deep: #24102f;
  --brand-orchid: #9e389e;
  --brand-pink: #ce4173;
  --brand-pink-light: #d04c7b;
  --brand-coral: #d46640;
  --brand-yellow: #e4be51;
  --brand-blue: #34679c;
  --brand-blue-light: #4a7ab9;
  --brand-teal: #4a8782;
  --brand-green: #5eab58;
  --brand-grass: #7db557;
  --brand-leaf: #5ead63;
  --brand-forest: #5ba761;
  --brand-pine: #55a162;
  --brand-jade: #549c74;
  --brand-orange: #db8546;
  --brand-ochre: #dec44f;
  --brand-cream: #efde95;
  --brand-lime: #dfdf5f;
  --brand-purple-rgb: 104 49 103;
  --brand-deep-rgb: 36 16 47;
  --brand-green-rgb: 94 171 88;
  --brand-blue-rgb: 52 103 156;
  --brand-blue-light-rgb: 74 122 185;
  --brand-yellow-rgb: 228 190 81;
  --brand-orange-rgb: 219 133 70;
  --brand-coral-rgb: 212 102 64;
  --brand-pink-rgb: 206 65 115;
  --brand-teal-rgb: 74 135 130;
  --brand-lime-rgb: 223 223 95;
  --brand-paper: #faf7fb;
  --brand-line: #e7dfe9;
  --dark: var(--brand-deep);
  --charcoal: #35213e;
  --ink: #302037;
  --muted: #746879;
  --line: var(--brand-line);
  --soft: var(--brand-paper);
  --blue: var(--brand-blue);
  --green: var(--brand-green);
  --orange: var(--brand-orange);
  --gold: var(--brand-yellow);
  --red: var(--brand-pink);
  --cyan: var(--brand-teal);
  --purple: var(--brand-purple);
  --magenta: var(--brand-pink);
  --shadow: 0 16px 44px rgba(60, 23, 73, .10);
  --brand-spectrum: linear-gradient(90deg, var(--brand-blue), var(--brand-teal) 20%, var(--brand-green) 39%, var(--brand-yellow) 60%, var(--brand-orange) 78%, var(--brand-pink));
}
body:not(.mobile-shell):not([data-page="streaming"]) {
  background: var(--brand-paper);
}
.site-header,
html[data-theme="dark"] .site-header {
  background: #30143e;
  border-bottom-color: rgba(255,255,255,.14);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand-spectrum);
}
.brand img { width: 124px; height: 45px; max-width: 100%; }
.main-nav a::after { background: var(--brand-yellow); }
.main-nav a:hover,
.main-nav a.active { color: #fff; }
.main-nav a.active .bi { color: var(--brand-yellow); }
.hero:not(.game-hero) .hero-bg,
.hero.home-hero .hero-bg {
  background:
    linear-gradient(90deg, rgba(41,14,54,.98) 0%, rgba(57,17,71,.94) 44%, rgba(70,23,82,.60) 100%),
    var(--brand-skyline-image, url("/img/brand/caracas-skyline.svg?v=1791897791996")) right bottom / auto 90% no-repeat,
    radial-gradient(ellipse at 80% 10%, #ae44ad, #632778 55%, #281033);
  animation: none;
  filter: none;
}
.hero:not(.game-hero)::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 28px, rgba(255,255,255,.045) 29px, transparent 30px);
  pointer-events: none;
}
.hero::after { background: linear-gradient(0deg, rgba(36,16,47,.55), transparent); }
.hero h1 { font-style: normal; letter-spacing: -.035em; }
.hero .eyebrow { color: #f2d86c; font-style: normal; }
.hero.brand-home { min-height: 455px; }
.hero.brand-home .hero-content {
  width: min(610px, calc(57% - var(--hero-side)));
  padding: 55px 0 55px;
}
.hero.brand-home .hero-title-row { display: block; }
.hero.brand-home .event-countdown { width: 330px; margin-top: 22px; }
.hero.brand-home h1 { font-size: clamp(36px,4.3vw,60px); line-height: 1.04; }
.hero.brand-home p { font-size: 16px; max-width: 500px; }
.hero-brand-signature {
  position: absolute;
  z-index: 2;
  width: min(35vw,480px);
  height: auto;
  right: clamp(32px,6vw,110px);
  top: 50%;
  transform: translateY(-50%);
  filter: drop-shadow(0 12px 22px rgba(21,4,30,.18));
}
.event-countdown { border-color: rgba(255,255,255,.28); box-shadow: 0 12px 28px rgba(23,5,33,.2); }
.event-countdown-label,
.m-hero .event-countdown-label {
  color: #3b2440;
  background: linear-gradient(110deg, #e4be51, #efde95);
}
.event-countdown-grid { background: #eadfed; }
.event-countdown-grid b { color: var(--brand-purple); }
.btn.primary,
.m-primary,
.mobile-shell .m-primary {
  background: linear-gradient(135deg, #853984, #683167);
  color: #fff;
  box-shadow: 0 5px 16px rgba(104,49,103,.16);
}
.btn.primary:hover,
.m-primary:hover { background: #572555; }
.hero .btn.primary { background: #e4be51; color: #39213f; box-shadow: none; }
.hero .btn.primary:hover { background: #efde95; }
:is(.tabs, .sport-tabs, .medal-filter-tabs) :is(a,button).active,
.chip.active,
.calendar-date-strip button.active,
.date-carousel button.active,
.pagination-pages a.active {
  background: var(--brand-purple);
  border-color: var(--brand-purple);
  color: #fff;
}
:is(.section-head,.m-section-head) > a,
.badge-link,
.m-home-news-read,
.m-home-result-link { color: var(--brand-purple); }
:is(input,select,button,a):focus-visible { outline-color: var(--brand-purple); }
.preference-list input { accent-color: var(--brand-purple); }
.home-stat-grid .stat-card { border-color: #e7dfe9; box-shadow: 0 6px 20px rgba(60,23,73,.045); }
.home-stat-grid .stat-card:first-child .stat-icon { --icon-accent: var(--brand-purple); }
.home-stat-grid .stat-card:nth-child(2) .stat-icon { --icon-accent: var(--brand-blue); }
.home-stat-grid .stat-card:nth-child(3) .stat-icon { --icon-accent: var(--brand-green); }
.home-stat-grid .stat-card:nth-child(4) .stat-icon { --icon-accent: var(--brand-yellow); }
.home-stat-grid .stat-card:nth-child(5) .stat-icon { --icon-accent: var(--brand-pink); }
.home-news-card { box-shadow: 0 8px 25px rgba(64,25,76,.055); }
.home-summary-panel { border-color: var(--brand-line); }
.home-sport-card { border-left-color: var(--brand-purple); }
.home-sport-card.tone-green { border-left-color: var(--brand-green); }
.home-sport-card.tone-blue { border-left-color: var(--brand-blue); }
.home-sport-card.tone-gold { border-left-color: var(--brand-yellow); }
.home-sport-card.tone-red { border-left-color: var(--brand-pink); }
.organizers { border-top: 1px solid var(--brand-line); }
.org-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}
.org-strip img {
  display: block;
  width: 100%;
  height: 80px;
  max-width: 180px;
  max-height: 80px;
  padding: 8px 12px;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
@media (max-width: 1200px) {
  .organizers { grid-template-columns: 1fr; gap: 18px; }
  .org-strip { width: 100%; max-width: 740px; }
}
@media (max-width: 600px) {
  .org-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
.site-footer {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(270px,1.5fr) 1.2fr 1fr 1fr 1.25fr;
  padding-top: 44px;
  padding-bottom: 100px;
  background: linear-gradient(120deg, #33143f, #4d1e5b 60%, #291033);
}
.site-footer::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  background: var(--brand-skyline-image, url("/img/brand/caracas-skyline.svg?v=1791897791996")) right bottom / auto 180px repeat-x;
  opacity: .16;
  pointer-events: none;
}
.footer-brand img { width: 290px; height: auto; max-width: 100%; }
.site-footer > * { position: relative; z-index: 1; }
.site-footer h3 { color: #f0d56a; }
.graphic-calendar-bubble { background: var(--brand-purple); box-shadow: 0 8px 24px rgba(67,19,78,.24); }
.graphic-calendar-bubble:hover { background: #512451; }
/* Mobile shares the same identity. Data panels retain a quiet reading surface. */
body.mobile-shell {
  --bg: #faf7fb;
  --bg-2: #f0e9f3;
  --text: #302037;
  --panel: #fff;
  --panel-2: #fff;
  --muted: #746879;
  --line: #e7dfe9;
  color: var(--text);
  background: var(--bg);
}
.mobile-shell :is(.m-hero,.m-profile-hero,.m-venue-hero),
.mobile-shell .m-integrated .m-hero {
  color: #fff;
  background:
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(255,255,255,.045) 29px, transparent 30px),
    radial-gradient(ellipse at 100% 0%, #99429d, #622775 55%, #331440);
}
.mobile-shell .m-hero-art {
  right: 0;
  bottom: 0;
  width: 100%;
  height: 55%;
  background: var(--brand-skyline-image, url("/img/brand/caracas-skyline.svg?v=1791897791996")) right bottom / auto 100% no-repeat;
  opacity: .22;
  filter: none;
}
.mobile-shell :is(.m-hero,.m-profile-hero,.m-venue-hero)::after { background: linear-gradient(0deg, rgba(37,12,49,.55), transparent); }
.mobile-shell .m-logo img { width: 118px; height: auto; }
.mobile-shell .m-logo-full { width: min(100%,310px); flex: 1; }
.mobile-shell .m-logo-full img { width: 100%; }
.mobile-shell .m-hero.home { padding-top: 28px; padding-bottom: 24px; min-height: 0; }
.mobile-shell .m-hero.home .m-topline { display:block; padding-top:14px; }
.mobile-shell .m-hero.home .m-logo-full { display:block; width:100%; max-width:350px; margin-inline:auto; }
.mobile-shell .m-hero.home .m-notify { position:absolute; top:-14px; right:0; width:32px; height:32px; border-radius:11px; font-size:17px; }
.mobile-shell .m-hero.home .m-hero-copy { width: 100%; margin-top: 24px; }
.mobile-shell .m-hero.home h1 { font-size: 30px; line-height: 1.15; font-style: normal; }
.mobile-shell .m-hero.home .m-hero-copy > p { font-size: 13px; line-height: 1.55; max-width: 290px; }
.mobile-shell .m-hero .m-location { color: #f2e8f4; }
.mobile-shell .m-hero .m-location i { color: #e4be51; }
.mobile-shell .m-hero .m-eyebrow { color: #efde95; }
.mobile-shell .m-hero .event-countdown { margin-top: 22px; }
.mobile-shell .m-hero .event-countdown-grid b { color: var(--brand-purple); }
.mobile-shell .m-integrated .m-logo img { width: 92px; }
.mobile-shell :is(.m-panel,.m-card) { background: #fff; border-color: var(--brand-line); box-shadow: 0 8px 24px rgba(60,23,73,.055); }
.mobile-shell .m-stat { background: #fff; backdrop-filter: none; border-color: var(--brand-line); box-shadow: 0 8px 24px rgba(60,23,73,.08); }
.mobile-shell .m-stat span { color: #45344d; }
.mobile-shell .m-stat.tone-green { color: #42753f; }
.mobile-shell .m-stat.tone-gold { color: #826418; }
.mobile-shell .m-stat.tone-red { color: #a32e59; }
.mobile-shell .m-stat.tone-green i { --icon-accent: var(--brand-purple); }
.mobile-shell .m-stat.tone-blue i { --icon-accent: var(--brand-blue); }
.mobile-shell .m-stat.tone-gold i { --icon-accent: var(--brand-yellow); }
.mobile-shell .m-stat.tone-red i { --icon-accent: var(--brand-pink); }
.mobile-shell .m-mini-grid i.tone-green { --icon-accent: var(--brand-green); }
.mobile-shell .m-mini-grid i.tone-blue { --icon-accent: var(--brand-blue); }
.mobile-shell .m-mini-grid i.tone-gold { --icon-accent: var(--brand-yellow); }
.mobile-shell .m-mini-grid i.tone-red { --icon-accent: var(--brand-pink); }
.mobile-shell .m-home-result-heading small { color: #4a7646; }
.mobile-shell .m-home-result-score { background: #f3edf5; }
.mobile-shell .mobile-bottom-nav { background: rgba(255,253,255,.97); border-color: var(--brand-line); color: #746879; box-shadow: 0 -6px 26px rgba(60,23,73,.07); }
.mobile-shell .mobile-bottom-nav a.active { color: var(--brand-purple); }
.mobile-shell .mobile-bottom-nav :is(a,summary) { color: #75637d; }
.mobile-shell .mobile-bottom-nav a.active { color: var(--brand-purple); }
.mobile-shell .mobile-bottom-nav .m-more-panel { background: #fff; color: #302037; border-color: var(--brand-line); }
.mobile-shell .m-active-filters span { background: #efe3f1; color: #683167; }
.mobile-shell .m-sport-cover.is-logo { background: linear-gradient(135deg,#7d3484,#331440); }
/* Dark mode uses plum surfaces, with accessible light accents. */
html[data-theme="dark"] {
  --ink: #f5edf7;
  --muted: #c2b3c9;
  --line: #51345c;
  --soft: #201129;
  --brand-paper: #201129;
}
html[data-theme="dark"] :is(body:not([data-page="streaming"]),.page-band,.profile-page) { background: #201129; color: #f5edf7; }
html[data-theme="dark"] :is(.stat-card,.sport-card,.athlete-card,.state-card,.venue-card,.venue-info-card,.game-meta-card,.game-winner-card,.roster-group,.news-card:not(.media-card),.event-card,.download-card,.table-card,.detail-shell,.compact-row,.athlete-result-card,.chart-card,.panel-card,.auth-card,.profile-panel,.filter-bar,.tabs,.category-row,.date-carousel,.tourney-card,.home-empty-state,.home-sport-card,.home-summary-panel,.home-summary-card,.home-summary-bars) { background-color: #302039; border-color: #51345c; }
html[data-theme="dark"] .stat-card em { color:#a9c8e8; }
html[data-theme="dark"] :is(.medal-table,.table-card table) { background:#302039; }
html[data-theme="dark"] :is(table th,.medal-table-full th) { color:#e3d7e8; background:#271531; }
html[data-theme="dark"] .medal-table-full tbody tr:nth-child(even) { background:#392440; }
html[data-theme="dark"] .medal-table-full tfoot td { background:#41284b; }
html[data-theme="dark"] :is(.rank-pill,.medal-total,.compact-score,.result-score,.panel-score) { background:#472d51; color:#f5edf7; border-color:#654471; }
html[data-theme="dark"] :is(.tabs,.sport-tabs,.medal-filter-tabs) :is(a,button).active,
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .pagination-page.active { background:#85437f; border-color:#a3669e; color:#fff; }
html[data-theme="dark"] :is(.section-head,.m-section-head) > a,
html[data-theme="dark"] :is(.badge-link,.m-home-news-read,.m-home-result-link) { color: #ef9bca; }
html[data-theme="dark"] body.mobile-shell {
  --bg: #201129; --bg-2: #302039; --text: #f5edf7; --panel: #302039; --muted: #c2b3c9; --line: #51345c;
}
html[data-theme="dark"] .mobile-shell :is(.m-panel,.m-card,.m-filter-sheet,.mobile-bottom-nav .m-more-panel) { background: #302039; border-color: #51345c; color: #f5edf7; }
html[data-theme="dark"] .mobile-shell .m-stat { background: #302039; border-color:#51345c; }
html[data-theme="dark"] .mobile-shell .m-stat span { color:#f5edf7; }
html[data-theme="dark"] .mobile-shell .m-stat.tone-green { color:#a7ce96; }
html[data-theme="dark"] .mobile-shell .m-stat.tone-blue { color:#9bbfe5; }
html[data-theme="dark"] .mobile-shell .m-stat.tone-gold { color:#efde95; }
html[data-theme="dark"] .mobile-shell .m-stat.tone-red { color:#ef9bca; }
html[data-theme="dark"] .mobile-shell :is(.m-table,.m-medal-list,.m-medal-row,.m-medal-total) { background:#302039; color:#f5edf7; border-color:#51345c; }
html[data-theme="dark"] .mobile-shell .m-integrated .page-band { --ink:#f5edf7; --muted:#c2b3c9; --line:#51345c; background:#201129; }
html[data-theme="dark"] .mobile-shell :is(.m-home-result,.m-home-result h3,.m-home-result-score strong) { color: #f5edf7; }
html[data-theme="dark"] .mobile-shell .m-home-result-score { background: #41294b; }
html[data-theme="dark"] .mobile-shell .m-home-result-score small { color: #c2b3c9; }
html[data-theme="dark"] .mobile-shell .mobile-bottom-nav { background: rgba(38,20,48,.98); color: #c2b3c9; border-color:#51345c; }
html[data-theme="dark"] .mobile-shell .mobile-bottom-nav :is(a,summary) { color:#c2b3c9; }
html[data-theme="dark"] .mobile-shell .mobile-bottom-nav a.active { color: #ef9bca; }
@media (max-width: 1200px) {
  .site-footer { grid-template-columns: minmax(250px,1.3fr) 1fr 1fr; }
  .hero-brand-signature { right: 4vw; width: 37vw; }
}
@media (max-width: 900px) {
  .hero.brand-home .hero-content { width: calc(100% - var(--hero-side) - 30px); padding-top: 28px; }
  .hero-brand-signature { position: relative; display: block; top: auto; right: auto; transform:none; width: min(350px,70%); margin: 36px auto 0; }
  .hero.brand-home { min-height: 0; }
  .hero.brand-home .hero-title-row { display: flex; align-items: center; flex-wrap: wrap; }
  .hero.brand-home .event-countdown { margin-top: 0; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .brand img { width: 98px; height: 38px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-brand img { width: 300px; }
  .hero.brand-home .hero-title-row { display: block; }
  .hero.brand-home .event-countdown { margin-top: 20px; }
}

/* Shared accents for badges, circular icons and decorative gradients. */
:root {
  --brand-green-ink: color-mix(in srgb, var(--brand-green) 45%, var(--brand-deep));
  --brand-yellow-ink: color-mix(in srgb, var(--brand-yellow) 45%, var(--brand-deep));
  --brand-pink-ink: color-mix(in srgb, var(--brand-pink) 70%, var(--brand-deep));
  --badge-live-fg: var(--brand-pink-ink);
  --badge-success-fg: var(--brand-green-ink);
  --badge-warning-fg: var(--brand-yellow-ink);
  --badge-info-fg: var(--brand-blue);
  --badge-muted-bg: rgb(var(--brand-purple-rgb) / .08);
  --badge-muted-fg: #746879;
}
.tone-green { --icon-accent: var(--brand-green); }
.tone-blue { --icon-accent: var(--brand-blue); }
.tone-gold { --icon-accent: var(--brand-yellow); }
.tone-red { --icon-accent: var(--brand-pink); }
.tone-dark { --icon-accent: var(--brand-purple); }
body :is(.stat-icon, .dot, .sports-page .sports-stat-grid .stat-icon,
  .calendar-summary-list .stat-icon, .home-stat-grid .stat-icon,
  .tourney-group-icon, .tourney-card-icon, .competition-detail-icon,
  .sport-overview-icon, .sport-detail-mark, .sport-next-icon, .history-context-icon,
  .home-summary-card > .bi, .home-summary-meter-icon, .home-sport-pictogram,
  .m-stat i, .m-mini-grid i, .m-photo-card i, .venue-icon, .metric-tile i) {
  color: var(--brand-deep);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 12%, #fff),
    color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 28%, #fff));
  border: 1px solid color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 36%, #fff);
  box-shadow: 0 5px 14px rgb(var(--brand-purple-rgb) / .08);
}
body :is(.home-summary-meter-icon, .home-summary-card > .bi) { --icon-accent: var(--brand-purple); }
body :is(.badge-featured, .news-card .badge-featured) { background: var(--brand-purple); color: #fff; }
body :is(.badge-tests, .badge-time, .badge-venue, .pill.tone-blue) { background: rgb(var(--brand-blue-rgb) / .12); color: var(--brand-blue); }
body :is(.badge-athletes, .pill.tone-red) { background: rgb(var(--brand-pink-rgb) / .12); color: var(--brand-pink-ink); }
body :is(.badge-states, .badge-category, .pill.tone-green, .status-chip.badge-success) { background: rgb(var(--brand-green-rgb) / .14); color: var(--brand-green-ink); border-color: rgb(var(--brand-green-rgb) / .3); }
body :is(.badge-medals, .badge-gold, .pill.tone-gold, .status-chip.badge-warning) { background: rgb(var(--brand-yellow-rgb) / .2); color: var(--brand-yellow-ink); border-color: rgb(var(--brand-yellow-rgb) / .4); }
body .status-chip.badge-live { color: var(--brand-pink-ink); background: rgb(var(--brand-pink-rgb) / .12); border-color: rgb(var(--brand-pink-rgb) / .3); }
body .status-chip.badge-info { color: var(--brand-blue); background: rgb(var(--brand-blue-rgb) / .12); border-color: rgb(var(--brand-blue-rgb) / .3); }
body :is(.medal-social-download-btn,.profile-social-download-btn,.calendar-download-btn.social,.venue-download-btn) {
  background: linear-gradient(120deg, var(--brand-purple), var(--brand-blue), var(--brand-teal));
  color: #fff;
  border-color: rgb(var(--brand-purple-rgb) / .22);
}
body :is(.medal-social-download-btn,.profile-social-download-btn,.calendar-download-btn.social,.venue-download-btn):hover {
  background: linear-gradient(120deg, var(--brand-plum), var(--brand-purple));
  color: #fff;
}
body :is(.profile-avatar,.athlete-avatar,.athlete-photo,.competition-participant-photo,.profile-photo-large,.athlete-feature-photo) {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  color: #fff;
}
/* Regional imagery remains intact; decorative framing follows the event brand. */
body :is(.state-card,.state-detail-hero,.game-delegation-cell,.roster-group) {
  --deleg-color: var(--brand-purple) !important;
  --deleg-color-dark: var(--brand-blue) !important;
}
body :is(.athlete-card,.athlete-feature-card,.athlete-profile-hero) {
  --athlete-color: var(--brand-purple) !important;
  --athlete-color-dark: var(--brand-blue) !important;
}
body .state-total-orb { background: linear-gradient(135deg, var(--brand-yellow), var(--brand-orange)); color: var(--brand-deep); }
body .document-download-center { background: linear-gradient(135deg, var(--brand-deep), var(--brand-purple), var(--brand-blue)); }
html[data-theme="dark"] {
  --badge-live-fg: color-mix(in srgb, var(--brand-pink) 55%, #fff);
  --badge-success-fg: color-mix(in srgb, var(--brand-green) 55%, #fff);
  --badge-warning-fg: var(--brand-cream);
  --badge-info-fg: color-mix(in srgb, var(--brand-blue) 50%, #fff);
  --badge-muted-fg: #c2b3c9;
}
html[data-theme="dark"] body :is(.stat-icon, .dot, .sports-page .sports-stat-grid .stat-icon,
  .calendar-summary-list .stat-icon, .home-stat-grid .stat-icon,
  .tourney-group-icon, .tourney-card-icon, .competition-detail-icon,
  .sport-overview-icon, .sport-detail-mark, .sport-next-icon, .history-context-icon,
  .home-summary-card > .bi, .home-summary-meter-icon, .home-sport-pictogram,
  .m-stat i, .m-mini-grid i, .m-photo-card i, .venue-icon, .metric-tile i) {
  color: color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 35%, #fff);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 20%, var(--brand-deep)),
    color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 38%, var(--brand-deep)));
  border-color: color-mix(in srgb, var(--icon-accent, var(--brand-purple)) 55%, var(--brand-deep));
}
html[data-theme="dark"] body :is(.badge-tests,.badge-time,.badge-venue,.pill.tone-blue,.status-chip.badge-info) { color: var(--badge-info-fg); background: rgb(var(--brand-blue-rgb) / .18); }
html[data-theme="dark"] body :is(.badge-athletes,.pill.tone-red,.status-chip.badge-live) { color: var(--badge-live-fg); background: rgb(var(--brand-pink-rgb) / .18); }
html[data-theme="dark"] body :is(.badge-states,.badge-category,.pill.tone-green,.status-chip.badge-success) { color: var(--badge-success-fg); background: rgb(var(--brand-green-rgb) / .18); }
html[data-theme="dark"] body :is(.badge-medals,.badge-gold,.pill.tone-gold,.status-chip.badge-warning) { color: var(--badge-warning-fg); background: rgb(var(--brand-yellow-rgb) / .18); }
body .sports-calendar-btn { background: linear-gradient(120deg, var(--brand-purple), var(--brand-blue), var(--brand-teal)); color: #fff; }
.swal2-icon.swal2-info { color: var(--brand-blue); border-color: var(--brand-blue); }
.swal2-icon.swal2-question { color: var(--brand-purple); border-color: var(--brand-purple); }
.swal2-icon.swal2-warning { color: var(--brand-yellow-ink); border-color: var(--brand-yellow); }
.swal2-icon.swal2-error { border-color: var(--brand-pink); }
.swal2-icon.swal2-error [class^="swal2-x-mark-line"] { background: var(--brand-pink); }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgb(var(--brand-green-rgb) / .3); }
.swal2-icon.swal2-success [class^="swal2-success-line"] { background: var(--brand-green); }
/* Keep competition headings readable across both layouts. */
body .sport-position-head > .dot,
body .competition-participants-head > .dot,
html[data-theme="dark"] body .sport-position-head > .dot,
html[data-theme="dark"] body .competition-participants-head > .dot {
  background: var(--brand-blue);
  color: #fff;
  border: 0;
  box-shadow: none;
}
/* Sports and their games share the configured banner in both layouts. */
.hero.sport-hero,
.hero.game-hero { animation: none; background: var(--brand-deep); }
.hero.sport-hero .hero-bg,
.hero.game-hero .hero-bg {
  background:
    linear-gradient(90deg, rgb(var(--brand-deep-rgb) / .94), rgb(var(--brand-deep-rgb) / .48)),
    var(--sport-banner, var(--brand-skyline-image, url("/img/brand/caracas-skyline.svg?v=1791897791996"))) center right / cover no-repeat,
    linear-gradient(120deg, var(--brand-plum), var(--brand-purple));
  opacity: 1;
  animation: none;
  filter: none;
}
/* Interior móvil: conservar el respaldo animado cuando no hay banner. */
.mobile-shell .m-integrated .m-hero:not(.has-sport-banner) .m-hero-art {
  display: block;
}
.m-hero.has-sport-banner .m-hero-art {
  background:
    linear-gradient(90deg, rgb(var(--brand-deep-rgb) / .93), rgb(var(--brand-deep-rgb) / .48)),
    var(--sport-banner) center / cover no-repeat,
    var(--brand-plum);
}
/* Medal counts remain compact controls; award details use the same view on PC/mobile. */
.medal-detail-trigger { appearance: none; border: 0; cursor: pointer; padding: 0; text-decoration: none; }
.medal-detail-trigger:not(.medal-total) { background: none; }
.m-medal-counts .medal-detail-trigger { font: inherit; color: inherit; }
.medal-detail-trigger:hover { text-decoration: none; }
.medal-detail-trigger:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 4px; }

.medal-detail-dialog { position: fixed; inset: auto; left: 50vw; top: 50dvh; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 28px)); max-height: min(85dvh, 900px); margin: 0; padding: 0; border: 1px solid var(--brand-line); border-radius: 20px; background: var(--brand-paper); color: var(--brand-deep); box-shadow: 0 24px 90px #24102f55; }
.medal-detail-dialog::backdrop { background: #24102fa8; backdrop-filter: blur(4px); }
.medal-detail-dialog > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 18px 22px; background: var(--brand-paper); border-bottom: 1px solid var(--brand-line); }
.medal-detail-dialog h2 { font-size: 22px; margin: 0; }
.medal-detail-dialog [data-medal-close] { cursor: pointer; border: 0; background: var(--brand-plum); color: white; width: 36px; height: 36px; flex: none; border-radius: 50%; }
[data-medal-detail-body] { padding: 0 22px 22px; }
.medal-detail-summary, .medal-detail-status { margin: 18px 0; }
.medal-detail-game { padding: 16px; margin-top: 12px; border: 1px solid var(--brand-line); border-radius: 14px; background: white; }
.medal-detail-game-title { display: block; color: var(--brand-purple); font-weight: 800; font-size: 18px; margin-top: 8px; }
.medal-detail-meta { color: #746879; font-size: 14px; margin: 6px 0; }
.medal-detail-game strong { display: block; margin: 8px 0; }
.medal-detail-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 13px; font-weight: 800; }
.medal-detail-badge.gold { background: #e4be5133; color: #886508; }
.medal-detail-badge.silver { background: #737b8426; color: #515962; }
.medal-detail-badge.bronze { background: #d466402b; color: #90401e; }
.medal-detail-mark { font-weight: 750; }
.medal-detail-game details { margin-top: 10px; }
.medal-detail-game summary { cursor: pointer; }
.medal-detail-game ul { padding-left: 20px; }
html[data-theme="dark"] .medal-detail-dialog, html[data-theme="dark"] .medal-detail-dialog > header { background: var(--brand-plum); color: #faf7fb; }
html[data-theme="dark"] .medal-detail-game { background: var(--brand-deep); }
html[data-theme="dark"] .medal-detail-meta { color: #d7c9dc; }
html[data-theme="dark"] .medal-detail-game-title { color: var(--brand-cream); }
html[data-theme="dark"] .medal-detail-badge { color: #faf7fb; }
@media(max-width: 600px) { .medal-detail-dialog h2 { font-size: 18px; } .medal-detail-dialog > header { padding: 14px; } [data-medal-detail-body] { padding: 0 14px 14px; } }
.medal-detail-game-list { display: grid; gap: 12px; }
.medal-detail-game-list .competition-result-card { width: 100%; min-width: 0; margin: 0; }
.medal-detail-game-list .competition-result-card-head { min-width: 0; }
.medal-detail-game-list .competition-result-card-head > span { min-width: 0; }
.medal-detail-game-list .competition-result-card-head strong { overflow-wrap: anywhere; }
.medal-detail-game-list .competition-result-side strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media(max-width: 600px) { .medal-detail-game-list .competition-result-side strong { font-size: 15px; } }
/* Compact result cards only inside the medal detail dialog. */
.medal-detail-dialog .medal-detail-game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.medal-detail-dialog .competition-result-card { min-height: 0; padding: 10px; gap: 8px; align-content: start; border-radius: 12px; }
.medal-detail-dialog .competition-result-card-head { grid-template-columns: 28px minmax(0, 1fr) 14px; gap: 7px; }
.medal-detail-dialog .competition-result-sport-icon { width: 28px; height: 28px; }
.medal-detail-dialog .competition-result-card-head strong { font-size: 13px; line-height: 1.2; white-space: normal; }
.medal-detail-dialog .competition-result-card-head small { margin-top: 3px; gap: 4px; }
.medal-detail-dialog .competition-result-ranking,
.medal-detail-dialog .competition-result-duel { gap: 5px; }
.medal-detail-dialog .competition-result-duel { grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr); }
.medal-detail-dialog .competition-result-side { min-height: 0; padding: 6px 4px; gap: 3px; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 7px; }
.medal-detail-dialog .competition-result-side > .competition-result-flag,
.medal-detail-dialog .competition-result-side > strong,
.medal-detail-dialog .competition-result-side > small { grid-column: 1 / -1; }
.medal-detail-dialog .competition-result-flag { width: 32px; height: 22px; }
.medal-detail-dialog .competition-result-side strong { font-size: 13px; line-height: 1.1; }
.medal-detail-dialog .competition-result-side small { font-size: 9px; }
.medal-detail-dialog .competition-result-side > b,
.medal-detail-dialog .competition-result-side > em { min-height: 18px; padding: 2px 4px; font-size: 9px; max-width: 100%; }
.medal-detail-dialog .competition-result-side > b:last-child { grid-column: 1 / -1; }
.medal-detail-dialog .competition-result-score { min-height: 0; padding: 6px 4px; gap: 3px; }
.medal-detail-dialog .competition-result-score b { font-size: 20px; }
.medal-detail-dialog .competition-result-card-foot { padding-top: 5px; }
@media(max-width: 640px) { .medal-detail-dialog .medal-detail-game-list { grid-template-columns: minmax(0, 1fr); } }
.medal-detail-header-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.medal-detail-header-count { color: #746879; font-size: 13px; font-weight: 600; white-space: nowrap; }
[data-medal-detail-body] { padding-top: 12px; }
html[data-theme="dark"] .medal-detail-header-count { color: #d7c9dc; }

/* Skyline builds once; print/reduced-motion always use the original artwork. */
@media (prefers-reduced-motion: reduce), print {
  :root { --brand-skyline-image: url("/img/brand/caracas-skyline.svg?v=1791897791996") !important; }
}

/* Alturas estables: portada amplia y cabeceras interiores uniformes. */
.hero:not(.brand-home):not(.home-hero) {
  height: 360px;
  min-height: 360px;
}
.hero:not(.brand-home):not(.home-hero) .hero-content {
  height: 100%;
  box-sizing: border-box;
  padding-top: 30px;
  padding-bottom: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero:not(.brand-home):not(.home-hero) .hero-content > p:not(.eyebrow) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.hero.brand-home, .hero.home-hero { height: 480px; min-height: 480px; }
.mobile-shell .m-hero:not(.home),
.mobile-shell .m-integrated .m-hero:not(.home) {
  box-sizing: border-box;
  height: 360px;
  min-height: 360px;
}
.mobile-shell .m-hero.home { height: 480px; min-height: 480px; }
.mobile-shell .m-hero:not(.home) .m-hero-copy > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}


/* Medallas compactas: únicamente icono, con nombre accesible y tooltip. */
.medal-icon-only,
.position-medal-tag.medal-icon-only,
.m-position-values .m-position-entity-head > .position-medal-tag.medal-icon-only,
.result-medal.medal-icon-only,
.competition-result-side > em.medal-icon-only,
.competition-result-card .competition-result-side > em.medal-icon-only,
.medal-detail-dialog .competition-result-side > em.medal-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-width: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  gap: 0;
  line-height: 1;
  font-size: 17px;
}
.medal-icon-only > span { line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }

/* Podios: marca y medalla comparten fila, como en la emergente. */
.competition-result-ranking .competition-result-side {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.competition-result-ranking .competition-result-side > .competition-result-flag,
.competition-result-ranking .competition-result-side > strong,
.competition-result-ranking .competition-result-side > small {
  grid-column: 1 / -1;
}
.competition-result-ranking .competition-result-side > b:last-child {
  grid-column: 1 / -1;
}

/* Portada móvil: logo con texto integrado y cuenta regresiva siempre visible. */
.mobile-shell .m-hero.home {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.mobile-shell .m-hero.home .m-hero-copy { margin-top: 12px; }
.mobile-shell .m-hero.home .event-countdown {
  flex: 0 0 auto;
  margin-top: auto;
  width: 100%;
}
.mobile-shell .m-hero.home .m-logo-full { max-width: 300px; }

/* Delegación: banner propio o skyline animado; sin fotografía antigua de respaldo. */
body .state-detail-hero { background: var(--brand-deep); }
.state-detail-hero .delegation-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(var(--brand-deep-rgb) / .94), rgb(var(--brand-deep-rgb) / .48)),
    var(--deleg-banner, var(--brand-skyline-image, url("/img/brand/caracas-skyline.svg?v=1791897791996"))) center bottom / cover no-repeat,
    linear-gradient(120deg, var(--brand-plum), var(--brand-purple));
}
body .state-detail-hero::before { content: none; animation: none; }
