/* /includes/style.css */
* { box-sizing: border-box; }

/* =========================================================
   VARIABLES GLOBALES
   ========================================================= */
:root{
  --pc-bg:#d7e2ef;
  --pc-surface:#ffffff;
  --pc-surface-2:#f8fafc;
  --pc-border:#d9e2ee;
  --pc-border-soft:#e7edf5;
  --pc-text:#162233;
  --pc-text-soft:#5f6f82;
  --pc-primary:#16324f;
  --pc-primary-2:#1f6f8b;
  --pc-accent:#f4b400;
  --pc-success:#198754;
  --pc-danger:#c43d33;
  --pc-shadow:0 14px 36px rgba(15, 23, 42, 0.10);
  --pc-shadow-soft:0 8px 22px rgba(15, 23, 42, 0.07);
  --pc-radius:18px;
  --pc-radius-sm:12px;
  --pc-max:1120px;
  --pc-nav-max:980px;
}

/* =========================================================
   FONDO Y BASE
   ========================================================= */
html{
  min-height: 100%;
  background: radial-gradient(1400px 900px at 20% 0%, #d7e2ef 0%, #c4d1e2 45%, #afbdd1 100%);
}

body{
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  padding: 20px 14px 34px;
  color: var(--pc-text);
  background: transparent;
}

body > .card,
body > .table-wrap,
body > .notice,
body > .rules,
body > h1,
body > h2,
body > hr,
body > .site-nav-outer,
body > .site-nav-divider{
  max-width: var(--pc-max);
  margin-left: auto;
  margin-right: auto;
}

hr{
  border:0;
  border-top:1px solid #e9e9e9;
  margin: 16px 0 22px;
}

/* =========================================================
   NAVEGACIÓN PÚBLICA
   ========================================================= */
.site-nav-outer{
  width:min(100%, var(--pc-max));
  margin:0 auto 14px;
}

.site-nav-wrap,
.site-nav-divider{
  max-width:var(--pc-nav-max);
  margin:0 auto;
  padding:0 12px;
  box-sizing:border-box;
}

.mobile-nav-toggle{
  display:none;
  width:100%;
  padding:12px 14px;
  border:1px solid var(--pc-border);
  border-radius:14px;
  background:#fff;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
  color:var(--pc-primary);
  box-shadow:var(--pc-shadow-soft);
}

.main-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  align-items:center;
  width:100%;
  padding:12px;
  background:rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border:1px solid var(--pc-border);
  border-radius:18px;
  box-sizing:border-box;
  position:relative;
  z-index:50;
  box-shadow:var(--pc-shadow-soft);
}

.main-nav .nav-link,
.main-nav .nav-trigger{
  text-decoration:none;
  color:var(--pc-text);
  padding:9px 13px;
  border-radius:12px;
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  background:#f6f8fb;
  border:none;
  white-space:nowrap;
  box-sizing:border-box;
  line-height:1.2;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-trigger:hover{
  background:#eaf1f8;
  color:var(--pc-primary);
  transform:translateY(-1px);
}

.main-nav .is-active{
  background:linear-gradient(135deg, var(--pc-primary) 0%, var(--pc-primary-2) 100%) !important;
  color:#fff !important;
  font-weight:800;
  box-shadow:0 8px 18px rgba(22,50,79,.18);
}

.nav-item{ position:relative; }
.nav-trigger{ display:inline-flex; align-items:center; gap:8px; }
.nav-caret{ font-size:.80em; line-height:1; opacity:.75; transform:translateY(1px); }

.nav-dropdown{
  position:absolute;
  top:calc(100% + 2px);
  left:0;
  min-width:250px;
  background:#fff;
  border:1px solid var(--pc-border);
  border-radius:16px;
  box-shadow:var(--pc-shadow);
  padding:8px;
  z-index:1000;
  display:none;
  flex-direction:column;
  gap:4px;
}

.nav-item.desktop-open > .nav-dropdown{ display:flex; }
.nav-item.desktop-open > .nav-trigger{
  background:#eaf1f8;
  color:var(--pc-primary);
}

.nav-dropdown a{
  text-decoration:none;
  color:var(--pc-text);
  padding:9px 11px;
  border-radius:10px;
  display:block;
  white-space:nowrap;
  font-weight:600;
}

.nav-dropdown a:hover{ background:#f4f7fb; }
.nav-dropdown a.active-sub{
  background:#e9f1fb;
  color:var(--pc-primary);
  font-weight:800;
}

.nav-sep{
  color:#9aa8b8;
  padding:8px 2px;
  align-self:center;
}

.site-nav-divider hr{ margin:0; }

/* =========================================================
   MARCA / LOGO CABECERA
   ========================================================= */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand-image-only {
  display: inline-flex;
  align-items: center;
}

.site-brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.site-brand-logo-full {
  height: 58px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  display: block;
}

.site-brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.site-brand-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #16324f;
}

.site-brand-subtitle {
  margin-top: 4px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f4b400;
}

/* =========================================================
   TÍTULOS
   ========================================================= */
.section-title{
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.15;
  color: var(--pc-primary);
  letter-spacing: -0.02em;
}

h1{
  font-size: 30px;
  margin: 16px 0 12px;
  color: var(--pc-primary);
  letter-spacing: -0.02em;
}

h2{
  font-size: 22px;
  margin: 18px 0 10px;
  color: var(--pc-primary);
}

h3, h4{
  color: var(--pc-primary);
}

.small-help,
.muted{
  color: var(--pc-text-soft);
}

/* =========================================================
   TARJETAS
   ========================================================= */
.card{
  background:rgba(255,255,255,.96);
  border:1px solid var(--pc-border);
  border-radius:var(--pc-radius);
  box-shadow:var(--pc-shadow);
  padding:18px;
}

.subtle{
  background:linear-gradient(180deg, #f7faff 0%, #f1f5fa 100%);
  border:1px solid var(--pc-border-soft);
  padding:12px 14px;
  border-radius:14px;
  margin:12px 0 16px;
}

/* =========================================================
   MENSAJES
   ========================================================= */
.ok,
.bad,
.notice{
  border-radius:14px;
  padding:12px 14px;
  margin: 14px 0;
}

.ok{
  background:#ecfdf5;
  border:1px solid #b7ebce;
  color:#155a35;
}

.bad{
  background:#fff1f1;
  border:1px solid #efc4c4;
  color:#8e2828;
}

.notice{
  border:1px solid #d6e5fb;
  background:#f3f7ff;
}

.notice.danger{
  border-color:#efc4c4;
  background:#fff1f1;
}

/* =========================================================
   FORMULARIOS
   ========================================================= */
.field { min-width: 0; }

.field label{
  display:block;
  font-weight:650;
  margin:0 0 6px;
  line-height:1.2;
}

label{
  display:block;
  font-weight:650;
  margin:0 0 6px;
  line-height:1.2;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="email"],
select,
textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid #cfcfcf;
  border-radius:12px;
  background:#fff;
  outline:none;
  color:var(--pc-text);
  font:inherit;
}

textarea{
  resize:vertical;
  min-height:120px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus{
  border-color:#7a7a7a;
  box-shadow:0 0 0 3px rgba(0,0,0,0.06);
}

input[type="date"],
input[type="datetime-local"]{
  appearance: auto;
  -webkit-appearance: auto;
  box-sizing: border-box;
  min-height: 40px;
  padding-right: 40px;
  line-height: normal;
  font-size: 14px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  opacity: 1;
  cursor: pointer;
}

.small-help{
  display:block;
  margin-top:6px;
  font-size:12px;
  line-height:1.35;
  white-space:normal;
  padding-bottom:2px;
}

.pass-wrap{
  position: relative;
}

.pass-wrap input{
  padding-right: 44px;
}

.pass-toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:transparent;
  cursor:pointer;
  padding:6px 8px;
  border-radius:10px;
  line-height:1;
  opacity:.75;
}

.pass-toggle:hover{
  background:rgba(0,0,0,0.06);
  opacity:1;
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn,
button,
input[type="submit"],
input[type="button"]{
  background:linear-gradient(135deg, var(--pc-primary) 0%, var(--pc-primary-2) 100%);
  color:#fff;
  border:0;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  padding:10px 15px;
  box-shadow:0 8px 18px rgba(22,50,79,.16);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
  text-decoration:none;
  display:inline-block;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover{
  transform:translateY(-1px);
  filter:brightness(.98);
}

.btn-secondary{
  background:#eef3f8;
  color:var(--pc-primary);
  border:1px solid var(--pc-border);
  box-shadow:none;
}

.btn-secondary:hover{
  background:#e3ebf4;
  color:var(--pc-primary);
}

/* =========================================================
   GRID GENERAL
   ========================================================= */
.match-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px 18px;
  align-items:start;
}

/* =========================================================
   PISTAS / SORTEOS INTERIORES
   ========================================================= */
.pista-card{
  margin-top:14px;
  border:1px solid #dfe8f5;
  border-radius:14px;
  background:linear-gradient(180deg, #f7fbff 0%, #ffffff 65%);
}

.pista-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}

.pista-card h3{
  margin:0;
  font-size:18px;
}

.pista-head h3{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,0.05);
}

.pista-card:nth-of-type(1){
  background: linear-gradient(180deg, #e9f2ff 0%, #ffffff 68%);
  border-color: #cfe0ff;
}
.pista-card:nth-of-type(2){
  background: linear-gradient(180deg, #eafaf0 0%, #ffffff 68%);
  border-color: #c9efd7;
}
.pista-card:nth-of-type(3){
  background: linear-gradient(180deg, #fff6e6 0%, #ffffff 68%);
  border-color: #ffe0ad;
}
.pista-card:nth-of-type(4){
  background: linear-gradient(180deg, #fde9f3 0%, #ffffff 68%);
  border-color: #f7c7df;
}

/* =========================================================
   AUTOCOMPLETE
   ========================================================= */
.ac-wrap{ position:relative; }

.ac-suggestions{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  background:#fff;
  border:1px solid #cfd6e6;
  border-radius:12px;
  box-shadow:0 14px 26px rgba(0,0,0,0.12);
  z-index:9999;
  max-height:220px;
  overflow:auto;
  display:none;
}

.ac-item{
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #f0f0f0;
}

.ac-item:last-child{ border-bottom:0; }
.ac-item:hover{ background:#f4f8ff; }
.ac-item .nick{ font-weight:650; }

.player-ac.invalid,
input.invalid{
  border-color:#d83b3b !important;
  background:#fff5f5 !important;
  box-shadow:0 0 0 3px rgba(216,59,59,0.12) !important;
}

/* =========================================================
   TABLAS
   ========================================================= */
.table-wrap,
.table-responsive{
  width:100%;
  max-width:100%;
  margin-top:14px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border-radius:16px;
  border:1px solid var(--pc-border);
  background:#fff;
  box-shadow:0 6px 20px rgba(15,23,42,.06);
}

.table-responsive > table,
.table-wrap > table{
  margin:0;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:760px;
}

thead th{
  position:sticky;
  top:0;
  background:#edf3fa;
  color:var(--pc-primary);
  text-align:left;
  font-weight:800;
  padding:12px;
  border-bottom:1px solid #e3e6ee;
}

tbody td{
  padding:10px 12px;
  border-bottom:1px solid #eef0f4;
  vertical-align:top;
}

tbody tr:nth-child(even){ background:#fbfdff; }
tbody tr:hover{ background:#eef5ff; }

table th:first-child,
table td:first-child{
  width:70px;
  text-align:right;
  color:#333;
}

table th:nth-child(4),
table td:nth-child(4){
  width:90px;
  text-align:center;
}

/* Se elimina el estilo global de la 5ª columna porque hacía que
   cualquier tabla con cinco columnas mostrara ese encabezado y sus celdas
   más pequeñas y en tipografía monoespaciada. Si alguna tabla concreta
   necesita ese formato, conviene aplicarlo con una clase específica. */

/* =========================================================
   RULES / TEXTOS
   ========================================================= */
.rules{ line-height:1.55; }
.rules h2{ margin-top:18px; }
.rules h3{ margin-top:14px; }

/* =========================================================
   FOOTER
   ========================================================= */
/* Bloque base del footer gestionado más abajo con la versión completa */

/* =========================================================
   UTILIDADES
   ========================================================= */
.text-right{ text-align:right !important; }
.no-underline{ text-decoration:none !important; }
.btn-link{ text-decoration:none !important; display:inline-block; }
.fw-700{ font-weight:700; }
.fs-12{ font-size:12px; }
.is-hidden{ display:none; }
.overflow-auto{ overflow:auto; }
.max-h-360{ max-height:360px; }
.minw-260{ min-width:260px; }
.inline-badge{ display:inline-block; padding:4px 8px; margin:0; }
.list-clean{ margin:0; padding-left:18px; }
.actions-row{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.filters-inline{ display:flex; gap:12px; flex-wrap:wrap; align-items:end; margin:12px 0; }
.media-toolbar{ display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.media-toolbar-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.field-end{ display:flex; align-items:end; }
.card-spaced{ margin-top:12px; }
.card-gap-bottom{ margin-bottom:14px; }
.bad-spaced{ margin-top:12px; }
.table-spaced{ margin-top:12px; }
.match-grid-spaced{ margin-top:12px; }
.small-help-spaced{ margin-top:10px; }

.mt-0{ margin-top:0 !important; }
.mt-6{ margin-top:6px !important; }
.mt-8{ margin-top:8px !important; }
.mt-10{ margin-top:10px !important; }
.mt-12{ margin-top:12px !important; }
.mt-16{ margin-top:16px !important; }
.mt-18{ margin-top:18px !important; }
.mb-8{ margin-bottom:8px !important; }
.mb-10{ margin-bottom:10px !important; }
.mb-12{ margin-bottom:12px !important; }
.mb-14{ margin-bottom:14px !important; }
.ml-6{ margin-left:6px !important; }
.ml-8{ margin-left:8px !important; }
.my-10{ margin:10px 0 !important; }
.my-12-8{ margin:12px 0 8px !important; }
.my-16-8{ margin:16px 0 8px !important; }

.table-simple{ width:100%; border-collapse:collapse; }
.th-basic{ text-align:left; padding:10px; border-bottom:1px solid #eee; }
.td-basic{ padding:10px; border-bottom:1px solid #f3f4f6; }
.td-empty{ padding:12px; }

/* =========================================================
   FOTOS JORNADAS
   ========================================================= */
.slide-image{
  width:100%;
  max-height:70vh;
  object-fit:contain;
  border-radius:16px;
  display:block;
  background:#f4f7fb;
}

/* =========================================================
   SORTEO PÚBLICO
   ========================================================= */
.big{
  font-size:22px;
  font-weight:800;
  letter-spacing:-0.02em;
}

.topline{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  align-items:flex-start;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin:12px 0 14px;
}

.select{
  padding:10px 12px;
  border:1px solid var(--pc-border);
  border-radius:12px;
  background:#fff;
  font-weight:700;
}

.hr{
  height:1px;
  background:var(--pc-border);
  margin:16px 0;
}

.code{
  font-weight:900;
  letter-spacing:.6px;
  color:var(--pc-primary);
}

.pista{
  margin-top:14px;
  padding:14px;
  border:1px solid var(--pc-border);
  border-radius:14px;
  background:linear-gradient(180deg, #f9fbfe 0%, #ffffff 100%);
}

.pair{
  padding:8px 0;
  border-bottom:1px dashed #e7edf5;
}

.pair:last-child{ border-bottom:0; }

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
  margin-top:10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border:1px solid var(--pc-border);
  border-radius:999px;
  background:#fff;
  color:var(--pc-text);
  font-weight:600;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  color:#6b7280;
}

.badge.published{ background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.badge.scheduled{ background:#eff6ff; border-color:#bfdbfe; color:#1e40af; }
.badge.draft{ background:#f8fafc; border-color:#dbe3ee; color:#617085; }

#countdown{
  display:inline-block;
  margin-top:8px;
  padding:10px 12px;
  border:1px solid var(--pc-border);
  border-radius:12px;
  background:#fbfcfe;
}

/* =========================================================
   IMAGEN PISTAS / ZOOM
   ========================================================= */
.zoom-img{
  display:inline-block;
  position:relative;
  margin:12px 0 18px;
  cursor:zoom-in;
}

.zoom-img .img-thumb{
  width:220px;
  height:auto;
  border-radius:12px;
  display:block;
}

.zoom-img .zoom-overlay{
  position:fixed;
  inset:0;
  display:none;
  z-index:9999;
  background:rgba(0,0,0,0.55);
  align-items:center;
  justify-content:center;
  padding:24px;
}

.zoom-img .zoom-overlay img{
  max-width:min(1000px, 92vw);
  max-height:88vh;
  height:auto;
  width:auto;
  border-radius:14px;
  box-shadow:0 10px 35px rgba(0,0,0,0.45);
}

.zoom-img:hover .zoom-overlay{
  display:flex;
}

/* =========================================================
   ADMIN
   ========================================================= */
.admin-buttons {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  margin-top:14px;
}

.admin-buttons .btn {
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:44px;
  padding:10px 16px;
  line-height:1.2;
  box-sizing:border-box;
}

/* =========================================================
   RANKING EVOLUCIÓN
   ========================================================= */
.evo-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

.evo-card {
  background: rgba(255,255,255,.96);
  border:1px solid var(--pc-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--pc-shadow-soft);
  margin-bottom: 16px;
}

.evo-toolbar,
.evo-legend-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.evo-toolbar{ margin-bottom:14px; }

.evo-toolbar button,
.evo-toolbar select,
.evo-legend-actions button {
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--pc-border);
  background:#fff;
  cursor:pointer;
  color:var(--pc-text);
  font-weight:700;
  box-shadow:none;
}

.evo-status,
.small-muted,
.evo-scroll-hint{
  font-size:13px;
  color:var(--pc-text-soft);
}

.evo-debug {
  margin:10px 0 14px;
  font-size:13px;
  color:#3f4d5d;
  background:#f8fafe;
  border:1px solid #e3eaf3;
  border-radius:12px;
  padding:10px 12px;
}

.evo-error {
  display:none;
  margin:10px 0 14px;
  font-size:14px;
  color:#842029;
  background:#f8d7da;
  border:1px solid #f5c2c7;
  border-radius:12px;
  padding:10px 12px;
}

.canvas-scroll {
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  border-radius:14px;
  scroll-behavior:auto;
}

.canvas-inner { min-width:100%; }
.canvas-wrap { position:relative; height:72vh; min-height:460px; }

.evo-legend {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:8px;
  margin-top:10px;
}

.evo-legend label {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  background:#fafcff;
  border:1px solid #e8eef6;
  padding:8px 10px;
  border-radius:12px;
}

/* =========================================================
   FASES FINALES
   ========================================================= */
.phase-bracket-wrap{
  overflow-x:auto;
  margin-top:18px;
  padding-bottom:8px;
}

.phase-bracket{
  min-width:1080px;
  display:grid;
  grid-template-columns:360px 150px 360px;
  gap:24px;
  align-items:center;
}

.phase-left,
.phase-right{
  display:grid;
}

.phase-left{
  grid-template-rows:1fr 1fr;
  gap:64px;
  padding-top:20px;
}

.phase-center{
  position:relative;
  height:560px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.phase-right{
  grid-template-rows:1fr 1fr;
  gap:108px;
  padding-top:78px;
}

.phase-match{
  background:#fff;
  border:1px solid var(--pc-border);
  border-radius:18px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.phase-match h3{
  margin:0 0 6px 0;
  font-size:1rem;
}

.phase-date{
  font-size:.88rem;
  color:var(--pc-text-soft);
  margin-bottom:10px;
}

.phase-team{
  background:#fafcff;
  border:1px solid #e9eff6;
  border-radius:12px;
  padding:10px 12px;
  line-height:1.45;
  min-height:48px;
  display:flex;
  align-items:center;
}

.phase-team + .phase-team{
  margin-top:8px;
}

.phase-vs{
  text-align:center;
  font-weight:700;
  color:var(--pc-text-soft);
  margin:8px 0;
}

.phase-center svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}

.phase-subtitle{
  margin-top:8px;
  color:var(--pc-text-soft);
  font-size:.95rem;
}

.phase-legend{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:center;
  margin-top:12px;
  font-size:.95rem;
  color:#555;
}

.phase-legend-item{
  display:flex;
  align-items:center;
  gap:8px;
}

.phase-legend-line{
  width:34px;
  height:0;
  border-top-width:4px;
  border-top-style:solid;
  border-radius:999px;
}

.phase-legend-line.win{ border-top-color:#198754; }
.phase-legend-line.lose{ border-top-color:#dc3545; }

/* =========================================================
   HOME / INDEX
   ========================================================= */
.home-shell {
  width: min(1400px, calc(100% - 24px));
  margin: 0 auto 32px;
}

.home-hero {
  padding: 18px;
}

.home-intro {
  margin-bottom: 16px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.home-hero-main,
.home-hero-side {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 18px;
}

.home-hero-main h2,
.home-hero-side h2,
.section-head h2,
.quick-link-card h3 {
  margin-top: 0;
}

.home-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quick-links-grid--rules {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  padding: 14px;
  min-height: 150px;
}

.quick-link-card p {
  margin: 0;
  color: var(--pc-text-soft);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.info-panel {
  background: #f8fafc;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.home-list {
  margin: 0 0 14px;
  padding-left: 18px;
}

.home-list li + li {
  margin-top: 6px;
}

/* Tarjetas de situación actual */
.stats-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
  margin:18px 0 0;
}

.stat-card {
  background:#ffffff;
  border:1px solid #d9e2ec;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(15, 23, 42, 0.08);
  padding:18px;
}

.stat-label {
  color:#48617a;
  font-size:0.9rem;
  font-weight:700;
  margin-bottom:8px;
}

.stat-value {
  color:#16324f;
  font-size:2rem;
  font-weight:800;
  line-height:1.1;
  margin-bottom:6px;
}

.stat-help {
  color:#6b7280;
  font-size:0.9rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .home-hero-grid,
  .home-grid-two,
  .stats-grid,
  .quick-links-grid--rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .mobile-nav-toggle{ display:block; }

  .main-nav{
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding:10px;
    margin-top:8px;
  }

  .main-nav.is-open{ display:flex; }

  .nav-item,
  .main-nav .nav-link{
    width:100%;
  }

  .main-nav .nav-link,
  .main-nav .nav-trigger{
    width:100%;
    justify-content:space-between;
  }

  .nav-dropdown{
    position:static;
    min-width:unset;
    width:100%;
    margin-top:6px;
    box-shadow:none;
    border:1px solid #ededed;
  }

  .nav-item.desktop-open > .nav-dropdown{ display:none; }
  .nav-item.open > .nav-dropdown{ display:flex; }
  .nav-sep{ display:none; }

  .phase-bracket{
    min-width:960px;
    grid-template-columns:320px 140px 320px;
    gap:16px;
    align-items:center;
  }

  .phase-center{
    height:540px;
  }

  .phase-right{
    gap:96px;
    padding-top:72px;
  }

  .phase-left{
    gap:52px;
  }

  .match-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px){
  .zoom-img:hover .zoom-overlay{ display:none; }
  .zoom-img .img-thumb{ width:100%; max-width:380px; }

  .evo-wrap{ padding:10px; }
  .canvas-wrap{ height:62vh; min-height:420px; }

  .filters-inline,
  .actions-row,
  .media-toolbar,
  .media-toolbar-actions{
    align-items:stretch;
  }
}

@media (max-width: 760px) {
  .site-brand-logo {
    height: 42px;
  }

  .site-brand-logo-full {
    height: 44px;
    max-width: 220px;
  }

  .site-brand-title {
    font-size: 1.2rem;
  }

  .site-brand-subtitle {
    font-size: 0.95rem;
  }

  .home-shell {
    width: min(100% - 16px, 100%);
  }

  .home-hero-grid,
  .home-grid-two,
  .stats-grid,
  .quick-links-grid,
  .quick-links-grid--rules {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-actions {
    flex-direction: column;
  }

  .home-actions .btn,
  .section-head .btn {
    width: 100%;
  }

  .quick-link-card {
    min-height: auto;
  }
}

/* ===== RANKING ===== */

.rank-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 10px;
  border-radius:999px;
  font-weight:800;
  border:1px solid var(--pc-border);
  background:#f4f7fb;
  color:var(--pc-primary);
}

.ranking-gold{
  background:linear-gradient(135deg, #f7d774 0%, #e5b93c 100%);
  border-color:#d2a62d;
  color:#5a4300;
}

.ranking-silver{
  background:linear-gradient(135deg, #edf1f5 0%, #cfd6dd 100%);
  border-color:#b8c1cb;
  color:#44515f;
}

.ranking-bronze{
  background:linear-gradient(135deg, #e8bb93 0%, #c98a5d 100%);
  border-color:#b87444;
  color:#5b3316;
}

.rank-row-gold{
  background:linear-gradient(90deg, rgba(247,215,116,.22) 0%, rgba(255,255,255,1) 72%) !important;
}

.rank-row-silver{
  background:linear-gradient(90deg, rgba(214,221,229,.28) 0%, rgba(255,255,255,1) 72%) !important;
}

.rank-row-bronze{
  background:linear-gradient(90deg, rgba(201,138,93,.18) 0%, rgba(255,255,255,1) 72%) !important;
}

.ranking-leader{
  display:grid;
  grid-template-columns:90px 1fr auto;
  gap:18px;
  align-items:center;
}

.ranking-leader-pos{
  width:90px;
  height:90px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.8rem;
  font-weight:900;
  box-shadow:0 8px 22px rgba(15, 23, 42, 0.10);
}

.ranking-leader-main{
  min-width:0;
}

.ranking-leader-name{
  font-size:1.55rem;
  font-weight:800;
  line-height:1.1;
}

.ranking-leader-name a{
  text-decoration:none;
}

.ranking-leader-stats{
  display:grid;
  gap:8px;
  background:#f8fafc;
  border:1px solid var(--pc-border);
  border-radius:14px;
  padding:14px 16px;
  min-width:190px;
}

.ranking-player-link{
  color:#16324f;
  font-weight:800;
  text-decoration:none;
  letter-spacing:0.15px;
}

.ranking-player-link:hover{
  color:#1f6f8b;
  text-decoration:underline;
  text-underline-offset:2px;
}

.ranking-help-message{
  margin-top:6px;
  font-size:0.95rem;
  color:var(--pc-text-soft);
  font-weight:600;
}

@media (max-width: 760px){
  .ranking-leader{
    grid-template-columns:1fr;
    text-align:center;
  }

  .ranking-leader-pos{
    margin:0 auto;
  }

  .ranking-leader-stats{
    min-width:0;
  }
}

/* ===== JORNADAS ===== */

.latest-positions-list{
  display:grid;
  gap:10px;
}

.latest-position-item{
  padding:10px 12px;
  border:1px solid var(--pc-border);
  border-radius:12px;
  background:#f8fafc;
  line-height:1.45;
}

/* ===== INDEX TOP 5 COMPACTO ===== */

.compact-table-wrap{
  overflow-x: visible;
}

.compact-rank-table{
  min-width: 0 !important;
  width: 100%;
  table-layout: auto;
}

.compact-rank-table thead th,
.compact-rank-table tbody td{
  padding: 9px 10px;
}

.compact-rank-table th:first-child,
.compact-rank-table td:first-child{
  width: 72px;
  text-align: center;
}

.compact-rank-table th:nth-child(2),
.compact-rank-table td:nth-child(2){
  width: auto;
}

.compact-rank-table th:nth-child(3),
.compact-rank-table td:nth-child(3){
  width: 110px;
  white-space: nowrap;
}

.compact-rank-table .rank-chip{
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
}

/* ===== INDEX ÚLTIMA JORNADA DESTACADA ===== */

.last-jornada-hero{
  display:grid;
  grid-template-columns:72px 1fr auto;
  gap:16px;
  align-items:center;
  padding:16px;
  border:1px solid var(--pc-border);
  border-radius:16px;
  background:linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  margin-bottom:14px;
}

.last-jornada-chip{
  width:72px;
  height:72px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.15rem;
  font-weight:900;
  color:var(--pc-primary);
  background:linear-gradient(135deg, #ffffff 0%, #e7eef8 100%);
  border:1px solid var(--pc-border);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

.last-jornada-main{
  min-width:0;
}

.last-jornada-title{
  font-size:1.35rem;
  font-weight:800;
  color:var(--pc-primary);
  line-height:1.1;
}

.last-jornada-meta{
  margin-top:6px;
  color:var(--pc-text-soft);
  font-weight:600;
}

.last-jornada-side{
  text-align:right;
  min-width:160px;
}

@media (max-width: 760px){
  .last-jornada-hero{
    grid-template-columns:1fr;
    text-align:center;
  }

  .last-jornada-chip{
    margin:0 auto;
  }

  .last-jornada-side{
    text-align:center;
    min-width:0;
  }
}

/* ===== INDEX SORTEO DESTACADO ===== */

.last-sorteo-hero{
  display:grid;
  grid-template-columns:72px 1fr auto;
  gap:16px;
  align-items:center;
  padding:16px;
  border:1px solid var(--pc-border);
  border-radius:16px;
  background:linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  margin-bottom:14px;
}

.last-sorteo-chip{
  width:72px;
  height:72px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.5rem;
  font-weight:900;
  color:var(--pc-primary);
  background:linear-gradient(135deg, #ffffff 0%, #e7eef8 100%);
  border:1px solid var(--pc-border);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

.last-sorteo-main{
  min-width:0;
}

.last-sorteo-title{
  font-size:1.35rem;
  font-weight:800;
  color:var(--pc-primary);
  line-height:1.1;
}

.last-sorteo-meta{
  margin-top:6px;
  color:var(--pc-text-soft);
  font-weight:600;
}

.last-sorteo-side{
  text-align:right;
  min-width:160px;
}

.sorteo-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-size:0.9rem;
  font-weight:800;
  border:1px solid var(--pc-border);
  background:#f8fafc;
  color:var(--pc-text-soft);
}

.sorteo-status-scheduled{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1e40af;
}

.sorteo-status-published{
  background:#ecfdf5;
  border-color:#a7f3d0;
  color:#065f46;
}

.sorteo-status-draft{
  background:#f8fafc;
  border-color:#dbe3ee;
  color:#617085;
}

@media (max-width: 760px){
  .last-sorteo-hero{
    grid-template-columns:1fr;
    text-align:center;
  }

  .last-sorteo-chip{
    margin:0 auto;
  }

  .last-sorteo-side{
    text-align:center;
    min-width:0;
  }
}

/* ===== INDEX FASES FINALES DESTACADO ===== */

.last-fases-hero{
  display:grid;
  grid-template-columns:72px 1fr auto;
  gap:16px;
  align-items:center;
  padding:16px;
  border:1px solid var(--pc-border);
  border-radius:16px;
  background:linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  margin-bottom:14px;
}

.last-fases-chip{
  width:72px;
  height:72px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.5rem;
  font-weight:900;
  color:var(--pc-primary);
  background:linear-gradient(135deg, #ffffff 0%, #e7eef8 100%);
  border:1px solid var(--pc-border);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

.last-fases-main{
  min-width:0;
}

.last-fases-title{
  font-size:1.35rem;
  font-weight:800;
  color:var(--pc-primary);
  line-height:1.1;
}

.last-fases-meta{
  margin-top:6px;
  color:var(--pc-text-soft);
  font-weight:600;
}

.last-fases-side{
  text-align:right;
  min-width:160px;
}

.fases-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-size:0.9rem;
  font-weight:800;
  border:1px solid #e7d59a;
  background:linear-gradient(135deg, #f7e6a7 0%, #efc95d 100%);
  color:#6a4c00;
}

@media (max-width: 760px){
  .last-fases-hero{
    grid-template-columns:1fr;
    text-align:center;
  }

  .last-fases-chip{
    margin:0 auto;
  }

  .last-fases-side{
    text-align:center;
    min-width:0;
  }
}

/* ===== HOME HERO DESTACADO ===== */

.home-hero-main--highlight{
  background: linear-gradient(135deg, #ffffff 0%, #f4f8fd 100%);
  border: 1px solid var(--pc-border);
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

.hero-kicker{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eaf1f8;
  color:var(--pc-primary);
  font-size:.82rem;
  font-weight:800;
  margin-bottom:12px;
}

.hero-title-main{
  margin:0 0 12px;
  font-size:2rem;
  line-height:1.05;
  color:var(--pc-primary);
  letter-spacing:-0.03em;
}

.hero-lead{
  margin:0 0 16px;
  font-size:1.02rem;
  line-height:1.55;
  color:#223246;
  max-width:60ch;
}

.hero-mini-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-bottom:16px;
}

.hero-mini-stat{
  background:#fff;
  border:1px solid var(--pc-border);
  border-radius:14px;
  padding:12px 14px;
  box-shadow:0 4px 12px rgba(15,23,42,.04);
}

.hero-mini-label{
  display:block;
  font-size:.82rem;
  font-weight:700;
  color:var(--pc-text-soft);
  margin-bottom:6px;
}

.hero-mini-value{
  display:block;
  font-size:1rem;
  font-weight:800;
  color:var(--pc-primary);
}

/* ===== SITUACIÓN ACTUAL MEJORADA ===== */

.situation-card{
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,251,255,.96) 100%);
}

.stat-card--accent{
  position:relative;
  overflow:hidden;
}

.stat-card--accent::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg, var(--pc-primary) 0%, var(--pc-primary-2) 100%);
}

.stat-card--accent .stat-value{
  font-size:2.15rem;
  letter-spacing:-0.02em;
}

.stat-card--accent .stat-label{
  text-transform:none;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 980px){
  .hero-mini-stats{
    grid-template-columns:1fr;
  }

  .hero-title-main{
    font-size:1.7rem;
  }
}

/* ===== RESUMEN JORNADA ===== */

.resumen-pistas-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.resumen-pista-card{
  border:1px solid var(--pc-border);
  background:linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.resumen-pista-card--gold{
  border-color:#e7d59a;
  background:linear-gradient(180deg, #fff8df 0%, #fffdf5 100%);
  box-shadow:0 12px 28px rgba(199, 149, 0, 0.10);
}

.resumen-pista-title-wrap{
  min-width:0;
}

.resumen-pair-block{
  border:1px solid var(--pc-border);
  background:#f8fafc;
  border-radius:14px;
  padding:12px 14px;
}

.resumen-pair-block + .resumen-pair-block{
  margin-top:12px;
}

.resumen-pair-block--gold{
  border-color:#ead28b;
  background:linear-gradient(180deg, #fff6d6 0%, #fffaf0 100%);
}

.resumen-pair-label{
  font-size:.88rem;
  font-weight:800;
  color:var(--pc-primary);
  margin-bottom:6px;
}

.resumen-pair-names{
  font-size:1rem;
  line-height:1.5;
  color:var(--pc-text);
}

@media (max-width: 760px){
  .resumen-pistas-grid{
    grid-template-columns:1fr;
  }
}

.phase-dot{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  margin-right:8px;
  transform:translateY(2px);
}

.phase-dot--in{
  background:#22c55e;
}

.phase-dot--out{
  background:#ef4444;
}

.movement-up{
  color:#15803d;
  font-weight:800;
}

.movement-down{
  color:#b91c1c;
  font-weight:800;
}

.movement-same{
  color:var(--pc-text-soft);
  font-weight:700;
}

/* ===== FOTOS JORNADAS ===== */

.gallery-featured-link{
  display:block;
  text-decoration:none;
}

.gallery-featured-image{
  width:100%;
  max-height:72vh;
  object-fit:contain;
  border-radius:18px;
  display:block;
  background:#f4f7fb;
  border:1px solid var(--pc-border);
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}

.gallery-card{
  background:#fff;
  border:1px solid var(--pc-border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--pc-shadow-soft);
}

.gallery-thumb-link{
  display:block;
  text-decoration:none;
}

.gallery-thumb-image{
  width:100%;
  aspect-ratio: 4 / 3;
  object-fit:cover;
  display:block;
  background:#eef3f8;
}

.gallery-card-body{
  padding:12px 14px;
}

.gallery-card-title{
  font-size:0.95rem;
  font-weight:800;
  color:var(--pc-primary);
  margin-bottom:6px;
}

.gallery-card-caption{
  font-size:0.92rem;
  line-height:1.45;
  color:var(--pc-text);
}

.gallery-card-caption--muted{
  color:var(--pc-text-soft);
}

@media (max-width: 980px){
  .gallery-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .gallery-grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   SORTEO PÚBLICO MODERNO
   ========================================================= */
.sorteo-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  color:#ffffff;
  font-weight:800;
  font-size:13px;
  letter-spacing:.01em;
  box-shadow:0 8px 18px rgba(22,50,79,.16);
}

.sorteo-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
}

.sorteo-summary-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid #d6e1ee;
  border-radius:16px;
  padding:14px;
  box-shadow:0 8px 18px rgba(15, 23, 42, .06);
}

.sorteo-summary-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#667085;
  margin-bottom:8px;
}

.sorteo-summary-value{
  font-size:20px;
  font-weight:800;
  color:#16324f;
}

.sorteo-countdown-wrap{
  display:flex;
  justify-content:center;
  margin-top:10px;
}

.sorteo-countdown{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-width:220px;
  padding:18px 24px;
  border-radius:18px;
  background:#16324f !important;
  background-image:linear-gradient(135deg, #16324f 0%, #2c5d86 100%) !important;
  color:#ffffff !important;
  font-size:clamp(2rem, 5vw, 3.2rem);
  font-weight:900;
  letter-spacing:.08em;
  line-height:1;
  box-shadow:0 14px 32px rgba(22,50,79,.22);
  border:1px solid rgba(22,50,79,.18);
  text-shadow:0 1px 2px rgba(0,0,0,.25);
  opacity:1 !important;
}

.sorteo-countdown-help{
  margin-top:14px;
  text-align:center;
}

.sorteo-pistas-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}

.sorteo-pista-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid #d6e1ee;
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 18px rgba(15, 23, 42, .06);
}

.sorteo-pista-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.sorteo-pista-head h3{
  margin:0;
  font-size:20px;
}

.sorteo-pairs-list{
  display:grid;
  gap:10px;
}

.sorteo-pair-item{
  background:#f8fafc;
  border:1px solid #d6e1ee;
  border-radius:14px;
  padding:12px 14px;
}

.sorteo-pair-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#667085;
  margin-bottom:6px;
}

.sorteo-pair-names{
  font-size:16px;
  font-weight:800;
  color:#1f2937;
}

.sorteo-players-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:12px;
}

.sorteo-player-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:#f8fafc;
  border:1px solid #d6e1ee;
  border-radius:14px;
  box-shadow:0 8px 18px rgba(15, 23, 42, .06);
}

.sorteo-player-order{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:inline-grid;
  place-items:center;
  border-radius:999px;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  color:#ffffff;
  font-weight:900;
  font-size:14px;
}

.sorteo-player-name{
  font-weight:800;
  color:#1f2937;
  min-width:0;
  word-break:break-word;
}

@media (max-width: 640px){
  .sorteo-summary-grid,
  .sorteo-pistas-grid,
  .sorteo-players-grid{
    grid-template-columns:1fr;
  }

  .sorteo-countdown{
    min-width:unset;
    width:100%;
    font-size:2.1rem;
  }
}

/* =========================================================
   HISTÓRICO DE SORTEOS
   ========================================================= */
.sorteo-history-toolbar{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.sorteo-history-jump{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:260px;
  flex:1 1 280px;
}

.sorteo-history-select{
  width:100%;
  min-width:220px;
}

.sorteo-history-toolbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.sorteo-history-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.sorteo-summary-value--sm{
  font-size:1rem;
  line-height:1.45;
}

.sorteo-summary-value--code{
  font-size:1rem;
  letter-spacing:.04em;
  word-break:break-word;
}

@media (max-width: 760px){
  .sorteo-history-toolbar{
    align-items:stretch;
  }

  .sorteo-history-jump{
    min-width:100%;
    flex-basis:100%;
  }

  .sorteo-history-toolbar-right{
    width:100%;
    justify-content:space-between;
  }

  .sorteo-history-actions .btn,
  .sorteo-history-toolbar .btn{
    width:auto;
  }
}

/* =========================================================
   HISTORICO PISTAS
   ========================================================= */
.history-issues-list{
  margin:10px 0 0 18px;
  padding:0;
}

.history-search-form{
  margin-top:6px;
}

.history-search-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:14px;
  align-items:end;
}

.historico-pistas-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.historico-pistas-stat-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.historico-pistas-stat-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.historico-pistas-stat-value{
  font-size:24px;
  font-weight:900;
  color:var(--pc-primary);
}

.historico-pistas-columns{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.historico-pistas-panel{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--pc-shadow-soft);
}

.historico-pistas-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.historico-pistas-panel-head h3{
  margin:0;
}

.historico-pistas-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  color:#fff;
  font-weight:800;
  font-size:13px;
  box-shadow:0 8px 18px rgba(22,50,79,.16);
}

.historico-pistas-track-list{
  display:grid;
  gap:12px;
}

.historico-pistas-track-item{
  display:grid;
  gap:7px;
}

.historico-pistas-track-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.historico-pistas-track-title{
  font-weight:800;
  color:var(--pc-text);
}

.historico-pistas-track-value{
  font-weight:800;
  color:var(--pc-primary);
}

.historico-pistas-track-value small{
  color:var(--pc-text-soft);
  font-weight:700;
}

.historico-pistas-track-bar{
  width:100%;
  height:12px;
  background:#eaf0f7;
  border-radius:999px;
  overflow:hidden;
  border:1px solid #d8e1ec;
}

.historico-pistas-track-bar span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  min-width:0;
}

.historico-pistas-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  color:#fff;
  font-weight:800;
  font-size:13px;
  line-height:1;
}

.historico-pistas-pill--soft{
  background:linear-gradient(135deg, #5d7896 0%, #7f9ab6 100%);
}

.notice-danger{
  border-left:4px solid #dc2626;
  background:#fff5f5;
}

@media (max-width: 980px){
  .historico-pistas-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .history-search-grid,
  .historico-pistas-summary-grid,
  .historico-pistas-columns{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   EMPAREJAMIENTOS
   ========================================================= */
.emparejamientos-search-grid{
  grid-template-columns:minmax(0, 1.2fr) minmax(220px, .7fr) auto;
}

.emparejamientos-form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.emparejamientos-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.emparejamientos-stat-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.emparejamientos-stat-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.emparejamientos-stat-value{
  font-size:24px;
  font-weight:900;
  color:var(--pc-primary);
}

.emparejamientos-next-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.emparejamientos-next-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.emparejamientos-next-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.emparejamientos-next-value{
  font-size:20px;
  font-weight:800;
  color:var(--pc-primary);
}

.emparejamientos-next-value--sm{
  font-size:1rem;
  line-height:1.45;
}

.emparejamientos-columns{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.emparejamientos-panel{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--pc-shadow-soft);
}

.emparejamientos-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.emparejamientos-panel-head h3{
  margin:0;
}

@media (max-width: 980px){
  .emparejamientos-summary-grid,
  .emparejamientos-next-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .emparejamientos-search-grid,
  .emparejamientos-summary-grid,
  .emparejamientos-next-grid,
  .emparejamientos-columns{
    grid-template-columns:1fr;
  }

  .emparejamientos-form-actions{
    width:100%;
  }
}

/* =========================================================
   FASE FINAL ORO / PLATA
   ========================================================= */
.fase-final-meta{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}

.fase-final-meta-item{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.fase-final-meta-label{
  display:block;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.fase-final-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.fase-final-player-card{
  display:flex;
  align-items:stretch;
  gap:12px;
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:18px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.fase-final-player-rank{
  width:54px;
  min-width:54px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  color:#fff;
  font-size:1.1rem;
  font-weight:900;
  box-shadow:0 8px 18px rgba(22,50,79,.16);
}

.fase-final-player-body{
  min-width:0;
  flex:1;
}

.fase-final-player-name{
  font-size:1.05rem;
  font-weight:900;
  color:var(--pc-primary);
  margin-bottom:8px;
}

.fase-final-player-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.fase-final-player-stats span{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#f3f7fb;
  border:1px solid #e1e8f1;
  color:var(--pc-text);
  font-size:.88rem;
  font-weight:700;
}

.fase-final-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  background:linear-gradient(135deg, #16324f 0%, #2c5d86 100%);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  margin-bottom:8px;
}

.fase-final-badge--gold{
  background:linear-gradient(135deg, #c79100 0%, #f4b400 100%);
  color:#1f2937;
}

.fase-final-badge--soft{
  background:linear-gradient(135deg, #7589a3 0%, #95a8bf 100%);
  color:#fff;
}

.phase-match--gold{
  border-color:#efd98a;
  background:linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.phase-match--consolation{
  border-color:#dbe4ee;
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

@media (max-width: 980px){
  .fase-final-meta{
    grid-template-columns:1fr;
  }

  .fase-final-grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   AJUSTES FASE PLATA
   ========================================================= */
.fase-final-badge--silver{
  background:linear-gradient(135deg, #6b7a8c 0%, #a7b3c2 100%);
  color:#ffffff;
}

.fase-final-badge--silver-strong{
  background:linear-gradient(135deg, #b8c2cf 0%, #e6ebf2 100%);
  color:#243447;
}

.phase-match--silver{
  border-color:#d8e0ea;
  background:linear-gradient(180deg, #f6f9fc 0%, #ffffff 100%);
}
/* =========================================================
   ENFRENTAMIENTOS DIRECTOS
   ========================================================= */
.enfrentamientos-search-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) auto;
  gap:14px;
  align-items:end;
}

.enfrentamientos-form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.enfrentamientos-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.enfrentamientos-stat-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.enfrentamientos-stat-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.enfrentamientos-stat-value{
  font-size:24px;
  font-weight:900;
  color:var(--pc-primary);
}

.enfrentamientos-stat-value--sm{
  font-size:1rem;
  line-height:1.4;
}

.enfrentamientos-note{
  padding:14px 16px;
  border:1px solid #dbe6f2;
  border-radius:14px;
  background:#f8fbff;
  color:var(--pc-text-soft);
  line-height:1.5;
}

.enfrentamientos-result{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid #e5e7eb;
}

.enfrentamientos-result.win{
  background:#ecfdf5;
  border-color:#a7f3d0;
  color:#065f46;
}

.enfrentamientos-result.lose{
  background:#fff1f2;
  border-color:#fecdd3;
  color:#be123c;
}

@media (max-width: 980px){
  .enfrentamientos-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .enfrentamientos-search-grid,
  .enfrentamientos-summary-grid{
    grid-template-columns:1fr;
  }

  .enfrentamientos-form-actions{
    width:100%;
  }
}
/* =========================================================
   RENDIMIENTO JUGADOR
   ========================================================= */
.rendimiento-search-grid{
  grid-template-columns:minmax(0, 1fr) auto;
}

.rendimiento-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.rendimiento-stat-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.rendimiento-stat-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.rendimiento-stat-value{
  font-size:24px;
  font-weight:900;
  color:var(--pc-primary);
}

.rendimiento-two-columns{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.rendimiento-panel{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--pc-shadow-soft);
}

.rendimiento-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.rendimiento-panel-head h3{
  margin:0;
}

.rendimiento-list{
  display:grid;
  gap:8px;
}

.rendimiento-list li{
  line-height:1.5;
}

@media (max-width: 980px){
  .rendimiento-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .rendimiento-search-grid,
  .rendimiento-summary-grid,
  .rendimiento-two-columns{
    grid-template-columns:1fr;
  }
}
/* =========================================================
   TARDONES
   ========================================================= */
.tardones-filter-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) auto;
  gap:14px;
  align-items:end;
}

.tardones-form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.tardones-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.tardones-stat-card{
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border:1px solid var(--pc-border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--pc-shadow-soft);
}

.tardones-stat-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--pc-text-soft);
  margin-bottom:8px;
}

.tardones-stat-value{
  font-size:24px;
  font-weight:900;
  color:var(--pc-primary);
}

.tardones-stat-value--sm{
  font-size:1rem;
  line-height:1.4;
}

.tardones-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid #e5e7eb;
  line-height:1;
}

.tardones-pill--danger{
  background:#fff1f2;
  border-color:#fecdd3;
  color:#be123c;
}

@media (max-width: 980px){
  .tardones-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .tardones-filter-grid,
  .tardones-summary-grid{
    grid-template-columns:1fr;
  }

  .tardones-form-actions{
    width:100%;
  }
}



/* header*/

.site-header-shell{
  width:100%;
}

.site-header-inner{
  width:min(100% - 32px, var(--pc-max, 1120px));
  margin:0 auto;
}

.site-header-divider-shell{
  margin-bottom: 24px;
}

.site-header-brand-row{
  display:flex;
  justify-content:center;
  align-items:center;
  margin-bottom:10px;
}

.site-nav-wrap--full{
  width:100%;
}

.main-nav--full{
  width:100%;
  box-sizing:border-box;
}

.site-nav-divider{
  width:100%;
}

.site-nav-divider hr{
  width:100%;
  margin:0;
}

@media (max-width: 900px){
  .site-header-inner{
    width:min(100% - 20px, var(--pc-max, 1120px));
  }

  .main-nav--full{
    width:100%;
  }
}
/* footer*/
.site-footer{
  width:min(1100px, calc(100% - 32px));
  margin:28px auto 24px;
}

.site-footer-card{
  padding:14px 18px;
  text-align:center;
}

.site-footer-title{
  margin:0 0 6px;
  font-size:0.98rem;
  font-weight:700;
  line-height:1.4;
}

.site-footer-text{
  display:block;
  font-size:0.92rem;
  line-height:1.55;
  opacity:.92;
  max-width:760px;
  margin:0 auto;
}


/* ===== Jornadas: foto dentro del bloque resumen de última jornada ===== */

.jornada-latest-main{
  display:grid;
  grid-template-columns:minmax(540px, 1.08fr) minmax(340px, 1fr);
  gap:18px;
  align-items:stretch;
}

.jornada-latest-summary{
  height:100%;
}

.jornada-latest-summary-grid{
  display:grid;
  grid-template-columns:190px minmax(220px, 1fr);
  gap:18px;
  align-items:stretch;
  min-height:100%;
}

.jornada-latest-meta{
  min-width:0;
}

.jornada-latest-thumb-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
}

.jornada-latest-thumb-link{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  text-decoration:none;
}

.jornada-latest-thumb-img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:340px;
  object-fit:contain;
  object-position:center top;
  border-radius:14px;
  box-shadow:0 10px 28px rgba(15, 23, 42, .10);
}

.jornada-latest-thumb-empty{
  width:100%;
  min-height:220px;
  border:1px dashed var(--pc-border, #cfd8e3);
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:24px;
  color:#6b7280;
  font-weight:700;
  font-size:.98rem;
  background:rgba(255,255,255,.45);
}

.jornada-latest-positions{
  height:100%;
}

@media (max-width: 1100px){
  .jornada-latest-main{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .jornada-latest-summary-grid{
    grid-template-columns:1fr;
  }

  .jornada-latest-thumb-wrap{
    justify-content:center;
  }

  .jornada-latest-thumb-img{
    width:100%;
    max-width:100%;
    height:auto;
    max-height:420px;
    object-fit:contain;
    object-position:center top;
    border-radius:12px;
  }

  .jornada-latest-thumb-empty{
    min-height:220px;
  }
}

@media (max-width: 640px){
  .jornada-latest-thumb-img{
    max-height:380px;
  }
}
/* ===== Resumen jornada: warning arriba + foto miniatura en medallistas ===== */

.resumen-top-grid{
  display:grid;
  grid-template-columns:minmax(420px, 1.05fr) minmax(320px, .95fr);
  gap:18px;
  align-items:stretch;
}

.resumen-warning-panel{
  height:100%;
}

.compact-list li + li{
  margin-top:6px;
}

.resumen-medal-photo-grid{
  display:grid;
  grid-template-columns:minmax(220px, 1fr) 180px;
  gap:16px;
  align-items:start;
}


.resumen-photo-mini-wrap{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  min-width:0;
}

.resumen-photo-mini-link{
  display:block;
  width:100%;
  max-width:180px;
  text-decoration:none;
}

.resumen-photo-mini-img{
  display:block;
  width:100%;
  height:220px;
  object-fit:cover;
  object-position:center top;
  border-radius:14px;
  box-shadow:0 10px 28px rgba(15, 23, 42, .10);
}

.resumen-photo-mini-empty{
  width:100%;
  max-width:180px;
  min-height:220px;
  border:1px dashed var(--pc-border, #cfd8e3);
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:16px;
  color:#6b7280;
  font-weight:700;
  background:rgba(255,255,255,.45);
}

@media (max-width: 1100px){
  .resumen-top-grid{
    grid-template-columns:1fr;
  }

  .resumen-medal-photo-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .resumen-photo-mini-img{
    width:100%;
    max-width:100%;
    height:auto;
    max-height:420px;
    object-fit:contain;
    object-position:center top;
    border-radius:12px;
  }

  .resumen-photo-mini-empty{
    min-height:220px;
  }
}
.resumen-summary-row{
  align-items:start;
}

/* =========================================================
   BUSCADOR DEL HEADER
   ========================================================= */
.site-header-brand-row{
  gap: 16px;
  flex-wrap: wrap;
}

.site-search-wrap{
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
  min-width: 180px;
}

.site-search-form{
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--pc-shadow-soft);
  transition: box-shadow .18s, border-color .18s;
}

.site-search-form:focus-within{
  border-color: var(--pc-primary-2);
  box-shadow: 0 0 0 3px rgba(31,111,139,.13), var(--pc-shadow-soft);
}

.site-search-input{
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 9px 4px 9px 14px;
  font-size: .92rem;
  color: var(--pc-text);
  font-family: inherit;
  min-width: 0;
}

.site-search-input::placeholder{ color: var(--pc-text-soft); }
.site-search-input::-webkit-search-cancel-button{ cursor: pointer; }

.site-search-btn{
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--pc-text-soft);
  display: flex;
  align-items: center;
  transition: color .15s;
}
.site-search-btn:hover{ color: var(--pc-primary); }

/* Dropdown de sugerencias */
.site-search-dropdown{
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  box-shadow: var(--pc-shadow);
  z-index: 2000;
  overflow: hidden;
  flex-direction: column;
}

.site-search-dropdown.is-open{ display: flex; }

.ssd-group-label{
  padding: 8px 14px 4px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--pc-text-soft);
  text-transform: uppercase;
}

.ssd-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--pc-text);
  transition: background .13s;
  outline: none;
}

.ssd-item:hover,
.ssd-item:focus{
  background: var(--pc-surface-2);
  color: var(--pc-primary);
}

.ssd-icon{ font-size: 1rem; flex-shrink: 0; }

.ssd-main{
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-weight: 600;
  font-size: .91rem;
  min-width: 0;
}

.ssd-sub{
  font-weight: 400;
  font-size: .8rem;
  color: var(--pc-text-soft);
}

.ssd-item mark,
.ssd-all mark{
  background: rgba(244,180,0,.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.ssd-all{
  display: block;
  padding: 9px 14px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--pc-primary-2);
  text-decoration: none;
  border-top: 1px solid var(--pc-border-soft);
  text-align: right;
  transition: background .13s;
  outline: none;
}

.ssd-all:hover,
.ssd-all:focus{ background: var(--pc-surface-2); }

.ssd-empty{
  padding: 14px;
  font-size: .88rem;
  color: var(--pc-text-soft);
  text-align: center;
}

@media (max-width: 900px){
  .site-search-wrap{
    max-width: 100%;
    flex: 1 1 100%;
    order: 3;
  }
  .site-header-brand-row{
    flex-wrap: wrap;
  }
}

/* =========================================================
   NAVEGACIÓN MÓVIL — BARRA INFERIOR + DRAWER
   ========================================================= */

/* Ocultar en escritorio */
.mobile-bottom-nav,
.mobile-drawer-overlay,
.mobile-drawer { display: none; }

@media (max-width: 900px) {

  /* ── Ocultar el botón hamburguesa clásico ── */
  .mobile-nav-toggle { display: none !important; }

  /* ── Barra inferior fija ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: var(--pc-surface);
    border-top: 1px solid var(--pc-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 18px rgba(15,23,42,0.09);
  }

  .mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px 8px;
    text-decoration: none;
    color: var(--pc-text-soft);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .03em;
    cursor: pointer;
    border: none;
    background: none;
    transition: color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
    border-radius: 0;
  }

  .mobile-bottom-nav__item:active,
  .mobile-bottom-nav__item.is-active {
    color: var(--pc-primary);
    background: var(--pc-border-soft);
  }

  .mobile-bottom-nav__icon {
    font-size: 1.35rem;
    line-height: 1;
  }

  .mobile-bottom-nav__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pc-primary-2);
    margin-top: 2px;
    opacity: 0;
  }

  .mobile-bottom-nav__item.is-active .mobile-bottom-nav__dot {
    opacity: 1;
  }

  /* ── Overlay del drawer ── */
  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 32, 0.45);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }

  .mobile-drawer-overlay.is-open {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Drawer lateral ── */
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 88vw);
    z-index: 901;
    background: var(--pc-surface);
    border-left: 1px solid var(--pc-border);
    box-shadow: -8px 0 32px rgba(15,23,42,0.14);
    transform: translateX(100%);
    transition: transform .27s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-drawer.is-open {
    transform: translateX(0);
  }

  .mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--pc-border-soft);
    position: sticky;
    top: 0;
    background: var(--pc-surface);
    z-index: 1;
  }

  .mobile-drawer__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pc-text);
  }

  .mobile-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--pc-border);
    border-radius: 10px;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--pc-text-soft);
    transition: background .13s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-drawer__close:active { background: var(--pc-border-soft); }

  .mobile-drawer__group {
    border-bottom: 1px solid var(--pc-border-soft);
    padding: 6px 0;
  }

  .mobile-drawer__group-label {
    padding: 8px 16px 4px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pc-text-soft);
  }

  .mobile-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: .92rem;
    color: var(--pc-text);
    text-decoration: none;
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-drawer__link:active { background: var(--pc-border-soft); }
  .mobile-drawer__link.is-active { color: var(--pc-primary); font-weight: 700; }

  .mobile-drawer__link-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
  }

  /* ── Ajustar padding del body para la barra inferior ── */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ── Selector de tema en el drawer móvil ── */
@media (max-width: 900px) {
  .mobile-drawer__theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--pc-border);
    border-radius: 10px;
    background: none;
    cursor: pointer;
    font-size: 1.15rem;
    margin-left: auto;
    margin-right: 8px;
    transition: background .13s;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-drawer__theme-btn:active { background: var(--pc-border-soft); }

  .mobile-drawer__theme-panel {
    border-bottom: 1px solid var(--pc-border-soft);
    padding: 10px 14px 12px;
    background: var(--pc-surface-2);
  }

  .mobile-drawer__theme-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pc-text-soft);
    margin: 0 0 8px;
  }

  .mobile-drawer__theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .mobile-drawer__theme-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--pc-border);
    border-radius: 20px;
    background: var(--pc-surface);
    cursor: pointer;
    font-size: .85rem;
    color: var(--pc-text);
    transition: background .12s, border-color .12s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-drawer__theme-option:active { background: var(--pc-border-soft); }

  .mobile-drawer__theme-option.is-active {
    border-color: var(--pc-primary-2);
    background: var(--pc-border-soft);
    font-weight: 700;
    color: var(--pc-primary);
  }
}

/* =========================================================
   BANNER SORTEO INMINENTE
   ========================================================= */
.sorteo-urgente-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--pc-max);
  margin: 0 auto 18px;
  padding: 14px 20px;
  background: var(--pc-surface);
  border: 2px solid var(--pc-accent);
  border-radius: var(--pc-radius-sm);
  box-shadow: 0 4px 16px rgba(244,180,0,.18);
  animation: banner-pulse 2.5s ease-in-out infinite;
}

@keyframes banner-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(244,180,0,.18); }
  50%       { box-shadow: 0 4px 24px rgba(244,180,0,.40); }
}

.sorteo-urgente-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  animation: icon-bounce 1.2s ease-in-out infinite;
}

@keyframes icon-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.sorteo-urgente-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--pc-text);
}

.sorteo-urgente-text strong {
  font-size: 1rem;
  font-weight: 700;
}

.sorteo-urgente-fecha {
  font-size: .85rem;
  color: var(--pc-text-soft);
}

.sorteo-urgente-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  background: #f4b400;
  color: #162233;
  font-weight: 700;
  font-size: .9rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s, transform .12s;
  white-space: nowrap;
}

.sorteo-urgente-btn:hover {
  background: #e0a500;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .sorteo-urgente-banner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }
  .sorteo-urgente-btn {
    width: 100%;
    text-align: center;
  }
}



/* =========================================================
   OCULTAR ACCESOS RÁPIDOS EN MÓVIL
   (duplican la barra inferior)
   ========================================================= */
@media (max-width: 900px) {
  .hide-on-mobile { display: none !important; }
}

/* =========================================================
   COMPARATIVA HEAD-TO-HEAD
   ========================================================= */
.enf-compare-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-radius-sm);
  overflow: hidden;
}

.enf-cmp-header {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  padding: 10px 16px;
  background: var(--pc-surface-2);
  border-bottom: 1px solid var(--pc-border-soft);
}

.enf-cmp-player {
  font-weight: 700;
  font-size: .95rem;
  color: var(--pc-primary);
}

.enf-cmp-header .enf-cmp-player:last-child { text-align: right; }

.enf-cmp-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  padding: 9px 16px;
  border-bottom: 1px solid var(--pc-border-soft);
  align-items: center;
  transition: background .1s;
}
.enf-cmp-row:last-of-type { border-bottom: 0; }
.enf-cmp-row:hover { background: var(--pc-surface-2); }

.enf-cmp-label {
  text-align: center;
  font-size: .8rem;
  color: var(--pc-text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.enf-cmp-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pc-text);
}

.enf-cmp-row .enf-cmp-val:last-child { text-align: right; }

.enf-cmp-better {
  color: var(--pc-success) !important;
}
.enf-cmp-worse {
  color: var(--pc-text-soft) !important;
  font-weight: 400 !important;
}

.enf-cmp-streak {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--pc-surface-2);
  border-top: 1px solid var(--pc-border-soft);
  font-size: .88rem;
  color: var(--pc-text-soft);
  flex-wrap: wrap;
}

.enf-cmp-streak strong { color: var(--pc-primary); }

@media (max-width: 640px) {
  .enf-cmp-row,
  .enf-cmp-header {
    grid-template-columns: 1fr 1.2fr 1fr;
    padding: 8px 10px;
  }
  .enf-cmp-label { font-size: .7rem; }
  .enf-cmp-val   { font-size: .92rem; }
}


/* ===== Sorteo: campana push ===== */
.section-head--stack-mobile{
  gap:14px;
}

.sorteo-push-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:46px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid var(--pc-border, rgba(15,23,42,.16));
  background:var(--pc-surface, #fff);
  color:var(--pc-text, #162233);
  box-shadow:var(--pc-shadow-soft, 0 10px 24px rgba(15,23,42,.08));
  font-weight:700;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.sorteo-push-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15,23,42,.12);
}

.sorteo-push-btn:disabled{
  opacity:.72;
  cursor:not-allowed;
  transform:none;
}

.sorteo-push-btn.is-active{
  border-color:rgba(16,185,129,.42);
  background:rgba(16,185,129,.10);
}

.sorteo-push-btn-icon{
  font-size:1.1rem;
  line-height:1;
}

.sorteo-push-panel{
  display:grid;
  gap:12px;
}

.sorteo-push-copy{
  display:grid;
  gap:4px;
  color:var(--pc-text, #162233);
}

.sorteo-push-copy strong{
  font-size:.95rem;
}

.sorteo-push-copy span{
  color:var(--pc-text-soft, #5b677a);
  line-height:1.45;
}

.sorteo-push-status{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid transparent;
  font-weight:600;
}

.sorteo-push-status--muted{
  background:rgba(15,23,42,.05);
  border-color:rgba(15,23,42,.08);
  color:var(--pc-text-soft, #5b677a);
}

.sorteo-push-status--success{
  background:rgba(16,185,129,.12);
  border-color:rgba(16,185,129,.24);
  color:#0f766e;
}

.sorteo-push-status--warn{
  background:rgba(245,158,11,.12);
  border-color:rgba(245,158,11,.24);
  color:#b45309;
}

.sorteo-push-status--error{
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.24);
  color:#b91c1c;
}

@media (max-width: 720px){
  .section-head--stack-mobile{
    align-items:stretch;
  }

  .sorteo-push-btn{
    width:100%;
  }
}


/* =========================================================
   PORRA
   ========================================================= */
.porra-pairs-table table{
  min-width:0;
  table-layout:auto;
}

.porra-pairs-table thead th,
.porra-pairs-table tbody td{
  vertical-align:middle;
}

.porra-pairs-table th:first-child,
.porra-pairs-table td:first-child{
  width:120px;
  text-align:left;
}

.porra-pairs-table th:nth-child(3),
.porra-pairs-table td:nth-child(3){
  width:140px;
  text-align:left;
}

.porra-pairs-table--select th:first-child,
.porra-pairs-table--select td:first-child{
  width:82px;
  text-align:center;
}

.porra-select-col{
  text-align:center !important;
}

.porra-select-cell input[type="radio"]{
  transform:scale(1.05);
}

.porra-pair-num{
  display:inline-block;
  font-weight:800;
  white-space:nowrap;
}

.porra-pair-players{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  font-weight:700;
  color:var(--pc-primary);
}

.porra-pair-sep{
  color:#7f90a5;
  font-weight:700;
}

.porra-state-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:90px;
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  line-height:1;
  border:1px solid transparent;
}

.porra-state-badge--live{
  color:#0f4f8f;
  background:#edf5ff;
  border-color:#d7e7fb;
}

.porra-state-badge--winner{
  color:#9a6700;
  background:#fff6d6;
  border-color:#f2de9a;
}

@media (max-width: 640px){
  .porra-pairs-table th:first-child,
  .porra-pairs-table td:first-child{
    width:96px;
  }

  .porra-pairs-table th:nth-child(3),
  .porra-pairs-table td:nth-child(3){
    width:110px;
  }

  .porra-state-badge{
    min-width:72px;
    padding:6px 8px;
    font-size:12px;
  }
}

.porra-table{
  width:100%;
  min-width:0;
  table-layout:auto;
}

.porra-table th,
.porra-table td{
  white-space:normal;
}

.porra-table th:first-child,
.porra-table td:first-child{
  width:auto;
  text-align:left;
  color:inherit;
}

.porra-table th:nth-child(4),
.porra-table td:nth-child(4){
  width:auto;
  text-align:left;
}

.porra-table--summary{
  min-width:640px;
}

.porra-table--summary th,
.porra-table--summary td{
  text-align:center;
}

.porra-table--summary th:first-child,
.porra-table--summary td:first-child,
.porra-table--summary th:nth-child(4),
.porra-table--summary td:nth-child(4){
  text-align:center;
}

.porra-table--ranking{
  min-width:980px;
}

.porra-table--ranking th:nth-child(1),
.porra-table--ranking td:nth-child(1){
  width:74px;
  text-align:center;
}

.porra-table--ranking th:nth-child(3),
.porra-table--ranking td:nth-child(3),
.porra-table--ranking th:nth-child(5),
.porra-table--ranking td:nth-child(5),
.porra-table--ranking th:nth-child(6),
.porra-table--ranking td:nth-child(6),
.porra-table--ranking th:nth-child(7),
.porra-table--ranking td:nth-child(7),
.porra-table--ranking th:nth-child(8),
.porra-table--ranking td:nth-child(8),
.porra-table--ranking th:nth-child(9),
.porra-table--ranking td:nth-child(9){
  text-align:center;
}

.porra-table--ranking th:nth-child(4),
.porra-table--ranking td:nth-child(4){
  min-width:138px;
}

.porra-table--pairs{
  min-width:720px;
}

.porra-table--pairs th:nth-child(1),
.porra-table--pairs td:nth-child(1){
  width:88px;
  white-space:nowrap;
}

.porra-table--pairs th:nth-child(4),
.porra-table--pairs td:nth-child(4){
  width:132px;
}

.porra-table--pairs-select{
  min-width:760px;
}

.porra-table--pairs-select th:nth-child(1),
.porra-table--pairs-select td:nth-child(1){
  width:88px;
  text-align:center;
}

.porra-table--apuestas{
  min-width:980px;
}

.porra-table--apuestas th:nth-child(2),
.porra-table--apuestas td:nth-child(2),
.porra-table--apuestas th:nth-child(3),
.porra-table--apuestas td:nth-child(3),
.porra-table--apuestas th:nth-child(4),
.porra-table--apuestas td:nth-child(4),
.porra-table--apuestas th:nth-child(5),
.porra-table--apuestas td:nth-child(5){
  text-align:center;
}

.porra-table--palmares-summary{
  min-width:640px;
}

.porra-table--palmares-summary th,
.porra-table--palmares-summary td{
  text-align:center;
}

.porra-table--palmares-history{
  min-width:1080px;
}

.porra-table td strong{
  color:inherit;
}

/* =========================================================
   MI SORTEO — ¿Con quién juego?
   ========================================================= */
.mi-sorteo-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mi-sorteo-form { margin-top: 4px; }

.mi-sorteo-search-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.mi-sorteo-result {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px;
  border-radius: var(--pc-radius-sm);
  background: var(--pc-surface-2);
}

.mi-sorteo-result--pending  { border-left: 4px solid var(--pc-accent); }
.mi-sorteo-result--notfound { border-left: 4px solid var(--pc-text-soft); }

.mi-sorteo-result-icon  { font-size: 2rem; flex-shrink: 0; }
.mi-sorteo-result-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }

.mi-sorteo-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.mi-sorteo-result-header h2 { margin: 0; }

.mi-sorteo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mi-sorteo-card {
  border-radius: var(--pc-radius-sm);
  padding: 16px 14px;
  text-align: center;
  border: 1px solid var(--pc-border-soft);
  background: var(--pc-surface-2);
}

.mi-sorteo-card--partner { border-color: var(--pc-primary-2); background: rgba(31,111,139,.07); }
.mi-sorteo-card--pista   { border-color: var(--pc-accent);    background: rgba(244,180,0,.07); }
.mi-sorteo-card--rival   { border-color: var(--pc-border); }

.mi-sorteo-card-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--pc-text-soft);
  margin-bottom: 8px;
}

.mi-sorteo-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pc-text);
  line-height: 1.4;
}

.mi-sorteo-share { margin-top: 4px; }

/* ── Botón push (escritorio) ── */
.push-bell-btn {
  background: none;
  border: 1.5px solid var(--pc-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 5px 10px;
  line-height: 1;
  transition: background .15s;
  color: var(--pc-text);
  margin-left: .4rem;
}
.push-bell-btn:hover { background: var(--pc-border-soft); }

@media (max-width: 760px) {
  .mi-sorteo-search-row { flex-direction: column; }
  .mi-sorteo-search-row .btn { width: 100%; }
}

/* =========================================================
   RANKING — flechas de movimiento
   ========================================================= */
.mv-up {
  color: var(--pc-success);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
}
.mv-down {
  color: var(--pc-danger);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
}
.mv-same {
  color: var(--pc-text-soft);
  font-size: .85rem;
}
.text-center { text-align: center; }

/* =========================================================
   MI HISTORIAL
   ========================================================= */
.mi-historial-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mi-historial-nick {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pc-text);
}

.mi-historial-rank-badge {
  text-align: center;
  min-width: 64px;
}

.mi-historial-rank-pos {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pc-primary);
  line-height: 1;
}

.mi-historial-streak {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mi-historial-streak-icon { font-size: 2rem; }

.mi-historial-streak-num {
  font-size: 1.15rem;
  font-weight: 700;
}

.mi-historial-jornadas {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.mi-historial-jornada-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--pc-border-soft);
}

.mi-historial-jornada-row:last-child { border-bottom: 0; }

.mi-historial-jornada-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.mi-historial-jno-link {
  font-weight: 700;
  font-size: 1rem;
  color: var(--pc-primary-2);
  text-decoration: none;
}

.mi-historial-jno-link:hover { text-decoration: underline; }

.mi-historial-jornada-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mi-historial-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mi-hist-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 700;
}

.mi-hist-badge--win   { background: rgba(25,135,84,.15); color: var(--pc-success); }
.mi-hist-badge--loss  { background: rgba(196,61,51,.12); color: var(--pc-danger); }
.mi-hist-badge--medal { background: rgba(244,180,0,.15); color: #b8860b; }
.mi-hist-badge--late  { background: rgba(196,61,51,.10); color: var(--pc-danger); }

.mi-historial-jornada-pts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 40px;
}

.mi-historial-jornada-pts strong { font-size: 1.1rem; }


/* =========================================================
   AJUSTE FINO NAV MÓVIL
   Evita que los estilos globales de button/btn rompan la barra
   ========================================================= */
@media (max-width: 900px) {
  .mobile-bottom-nav {
    background: var(--pc-surface) !important;
    background-image: none !important;
    border-radius: 0 !important;
    overflow: hidden;
  }

  .mobile-bottom-nav__item,
  .mobile-bottom-nav__item:hover,
  .mobile-bottom-nav__item:focus,
  .mobile-bottom-nav__item:active {
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--pc-text-soft) !important;
    padding: 10px 4px 8px !important;
    transform: none !important;
    filter: none !important;
    text-decoration: none;
  }

  .mobile-bottom-nav__item.is-active,
  .mobile-bottom-nav__item[aria-current="page"] {
    background: var(--pc-border-soft) !important;
    color: var(--pc-primary) !important;
  }

  .mobile-bottom-nav__dot {
    background: var(--pc-primary-2) !important;
  }

  .mobile-drawer__close,
  .mobile-drawer__theme-btn {
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--pc-text-soft) !important;
  }

  .mobile-drawer__close:hover,
  .mobile-drawer__theme-btn:hover,
  .mobile-drawer__close:focus,
  .mobile-drawer__theme-btn:focus,
  .mobile-drawer__close:active,
  .mobile-drawer__theme-btn:active {
    background: var(--pc-border-soft) !important;
    color: var(--pc-text) !important;
    transform: none !important;
    filter: none !important;
  }
}
