/* Pro Tour · Azetismo Producciones — sistema visual */
:root {
  --bg: #080c1a;
  --bg-2: #0d1328;
  --surface: #121a35;
  --surface-2: #19234a;
  --surface-3: #212d5c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef2ff;
  --muted: #95a1c8;
  --faint: #7f8ab8;   /* contraste AA (4.5:1 o más) sobre las tarjetas */
  --lime: #d4ff3a;
  --lime-ink: #11180a;
  --blue: #4c7dff;
  --violet: #8b5cff;
  --ok: #33d68a;
  --warn: #ffb547;
  --danger: #ff5a6e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --gutter: 16px;
  --topbar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font);
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(76, 125, 255, .16), transparent 60%),
                    radial-gradient(900px 500px at -10% 10%, rgba(212, 255, 58, .07), transparent 60%);
  background-attachment: fixed; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; font-weight: 800; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.lime { color: var(--lime); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; height: var(--topbar);
  background: rgba(8, 12, 26, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1240px; margin: 0 auto; height: 100%; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Logotipo: marca (raqueta + pelota) + "PRO TOUR" en itálica condensada + bajada con trazo lima */
.brand .mark { flex-shrink: 0; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .mark { transform: rotate(-12deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-family: var(--display); font-size: 26px; font-style: italic; font-weight: 900; letter-spacing: .01em; text-transform: uppercase; line-height: .86; }
.brand-text b span { color: var(--lime); }
.brand-text small { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.brand-text small::before { content: ''; width: 14px; height: 2px; border-radius: 2px; background: var(--lime); flex-shrink: 0; }
/* Ícono de la app (mosaico como en la pantalla de inicio del celular) */
.app-icon { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 23%; background: radial-gradient(120% 90% at 20% 0%, #23336f 0%, #101a45 45%, #080c1a 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .35); }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; transition: .15s; }
.mainnav a:hover { color: var(--text); background: var(--surface); }
.mainnav a.active { color: var(--lime-ink); background: var(--lime); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

main { max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) 120px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); font-size: 30px; text-transform: uppercase; letter-spacing: .02em; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--lime); font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

.bottomnav { display: none; }

/* ---------- Componentes ---------- */
.card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.flat { background: var(--surface); }
.card h3 { font-size: 17px; font-weight: 700; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.btn-primary:hover { background: #e3ff74; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(255, 90, 110, .12); color: var(--danger); border-color: rgba(255, 90, 110, .3); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-icon { width: 38px; padding: 0; height: 38px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.open { color: var(--lime); background: rgba(212, 255, 58, .1); border-color: rgba(212, 255, 58, .25); }
.chip.live { color: #ff6b7d; background: rgba(255, 90, 110, .12); border-color: rgba(255, 90, 110, .3); }
.chip.live .dot { animation: pulse 1.2s infinite; }
.chip.done { color: var(--muted); }
.chip.ok { color: var(--ok); background: rgba(51, 214, 138, .1); border-color: rgba(51, 214, 138, .25); }
.chip.warn { color: var(--warn); background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .25); }
.chip.bad { color: var(--danger); background: rgba(255, 90, 110, .1); border-color: rgba(255, 90, 110, .25); }
.chip.info { color: #9db6ff; background: rgba(76, 125, 255, .12); border-color: rgba(76, 125, 255, .3); }
@keyframes pulse { 50% { opacity: .3; } }

.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 14px; }
.pill:hover { color: var(--text); }
.pill.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill small { opacity: .65; margin-left: 4px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin: 18px 0 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; padding: 12px 16px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; cursor: pointer; margin-bottom: -1px; }
.tab.active { color: var(--text); border-color: var(--lime); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--bg-2); outline: none; transition: .15s;
}
.textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(212, 255, 58, .15); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2395a1c8' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.select option { background: var(--surface); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--lime); margin-top: 2px; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--faint); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 56px 48px; min-height: 380px;
  background: linear-gradient(120deg, #0f1a45 0%, #13204f 45%, #1a1150 100%); border: 1px solid var(--line);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
}
.hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .03) 79px 80px); pointer-events: none; }
.hero h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(48px, 8vw, 96px); line-height: .9; letter-spacing: .01em; }
.hero h1 em { font-style: normal; color: var(--lime); display: block; }
.hero p { color: var(--muted); font-size: 17px; max-width: 520px; margin: 18px 0 26px; }
.hero-court { position: relative; aspect-ratio: 1 / 1.25; max-height: 320px; justify-self: center; }
.hero-court svg { width: 100%; height: 100%; }
.ball { position: absolute; width: 64px; height: 64px; right: 4%; top: 6%; animation: bounce 2.6s ease-in-out infinite; filter: drop-shadow(0 10px 20px rgba(212, 255, 58, .35)); }
@keyframes bounce { 50% { transform: translateY(26px) rotate(40deg); } }

/* Portada animada */
.hero-v2 { background: radial-gradient(900px 420px at 80% 30%, rgba(76, 125, 255, .22), transparent 60%), linear-gradient(120deg, #0d1840 0%, #13204f 45%, #1d1257 100%); }
.hero-v2 .hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-glow { position: absolute; width: 420px; height: 420px; right: 4%; top: 50%; margin-top: -210px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 255, 58, .16), transparent 65%); animation: glow 5s ease-in-out infinite; pointer-events: none; }
@keyframes glow { 50% { transform: scale(1.12); opacity: .6; } }
.hero-v2 h1 em { background: linear-gradient(100deg, var(--lime) 0%, var(--lime) 40%, #f6ffc9 50%, var(--lime) 60%, var(--lime) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 5s ease-in-out 1.2s infinite;
  padding-top: .14em; margin-top: -.14em; /* deja espacio a la tilde de PÁDEL dentro del brillo */ }
@keyframes shine { 0% { background-position: 100% 0; } 35%, 100% { background-position: 0 0; } }
.hero-v2 p { margin-bottom: 22px; }
.btn-cta { box-shadow: 0 0 0 0 rgba(212, 255, 58, .5); animation: cta 2.8s ease-out 1.6s infinite; }
@keyframes cta { 0% { box-shadow: 0 0 0 0 rgba(212, 255, 58, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(212, 255, 58, 0); } }
/* Entrada escalonada (solo la primera vez) */
/* El contenido es visible por defecto: la animación solo agrega la entrada (si el celular no anima, igual se ve) */
.reveal { animation: rise .75s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--d, 0) * 110ms + 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
/* Datos rápidos: próximo torneo, dirección y canchas */
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-v2 .hero-facts { grid-column: 1 / -1; position: relative; z-index: 1; margin-top: -4px; }
.hero-v2 { row-gap: 24px; }
.fact-txt em.lime { color: var(--lime); font-weight: 600; }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: rgba(8, 12, 26, .45); border: 1px solid var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .2s, border-color .2s; min-width: 0; }
a.fact:hover { transform: translateY(-2px); border-color: rgba(212, 255, 58, .5); }
.fact-ico { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(212, 255, 58, .12); color: var(--lime); }
.fact-ico svg { width: 18px; height: 18px; }
.fact-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fact-txt small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 2px 0; }
.fact-txt em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.fact-txt em strong { color: var(--lime); font-weight: 700; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 5px; vertical-align: 1px; animation: pulse 1.2s infinite; }
/* Cancha animada: líneas que se dibujan, jugadores que se mueven y un peloteo */
.hero-v2 .hero-court { z-index: 1; width: 100%; max-width: 250px; max-height: none; }
.hero-court .cl { stroke: rgba(255, 255, 255, .38); stroke-width: 3; }
.hero-court .net { stroke: var(--lime); stroke-width: 4; stroke-dasharray: 6 5; animation: net 1.6s linear infinite; }
@keyframes net { to { stroke-dashoffset: -22; } }
.animate .hero-court .cl { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.6, .1, .3, 1) .25s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-court .pl circle { fill: #9db6ff; stroke: rgba(8, 12, 26, .6); stroke-width: 2; }
.hero-court .pl-c circle, .hero-court .pl-d circle { fill: var(--lime); }
.hero-court .pl { transform-box: fill-box; transform-origin: center; animation: sway 2.4s ease-in-out infinite alternate; }
.hero-court .pl-b { animation-duration: 2.9s; animation-delay: -.8s; }
.hero-court .pl-c { animation-duration: 2.6s; animation-delay: -1.3s; }
.hero-court .pl-d { animation-duration: 3.1s; animation-delay: -.4s; }
@keyframes sway { from { transform: translateX(-9px); } to { transform: translateX(9px); } }
.rally { position: absolute; left: 31%; top: 15.7%; width: 0; height: 0; animation: rally 4.8s linear infinite; }
@keyframes rally { 0%, 100% { left: 31%; top: 15.7%; } 25% { left: 69%; top: 80.7%; } 50% { left: 70%; top: 18.6%; } 75% { left: 29%; top: 82.9%; } }
.rally-ball { position: absolute; width: 34px; height: 34px; left: -17px; top: -17px; filter: drop-shadow(0 0 14px rgba(212, 255, 58, .55)); animation: hop 1.2s ease-in-out infinite; }
.rally-ball svg { animation: spin 1.2s linear infinite; }
.rally-shadow { position: absolute; width: 26px; height: 10px; left: -13px; top: 8px; border-radius: 50%; background: rgba(0, 0, 0, .45); filter: blur(2px); animation: hopShadow 1.2s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(.85); } 50% { transform: translateY(-30px) scale(1.15); } }
@keyframes hopShadow { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(.55); opacity: .2; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .hero-facts { grid-template-columns: minmax(0, 1fr); }
  .fact-txt b { white-space: normal; }
  /* Celular: cancha animada pequeña junto al título */
  .hero-v2 .hero-court { display: block; position: absolute; right: 20px; top: 54px; width: 64px; max-width: none; opacity: .9; }
  .hero-v2 .rally { transform: scale(.42); }
  .hero-v2 .hero-court .pl circle { r: 9; }
  .hero-glow { width: 260px; height: 260px; right: -60px; top: 120px; margin-top: 0; }
}
@media (max-width: 360px) { .hero-v2 .hero-court { display: none; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 16px; }
.stat { background: var(--bg-2); padding: 18px 20px; }
.stat b { display: block; font-family: var(--display); font-size: 36px; line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); }

.search-bar { display: flex; gap: 8px; margin-top: 16px; }
.search-bar .input { flex: 1; }

/* ---------- Tarjetas de torneo ---------- */
.tcard { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; transition: .2s; }
.tcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.tcover { position: relative; height: 150px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.tcover h3 { font-family: var(--display); font-size: 30px; text-transform: uppercase; line-height: .95; position: relative; max-width: 85%; }
.tcover .chip { align-self: flex-start; position: relative; backdrop-filter: blur(6px); }
.tcover-art { position: absolute; right: -30px; bottom: -40px; width: 180px; opacity: .9; }
.theme-lime { background: linear-gradient(135deg, #203b0f, #0f1d3d 70%); }
.theme-sun { background: linear-gradient(135deg, #4a2108, #2b0f36 70%); }
.theme-ice { background: linear-gradient(135deg, #0b3a5a, #1b1450 70%); }
.theme-violet { background: linear-gradient(135deg, #3a1460, #0e1b44 70%); }
.tbody { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 15px; height: 15px; opacity: .8; }
.tfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.price b { font-family: var(--display); font-size: 26px; }
.price small { color: var(--muted); font-size: 12px; display: block; line-height: 1; }

.banner { border-radius: 24px; padding: 32px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.banner h1 { font-family: var(--display); font-size: clamp(38px, 6vw, 64px); text-transform: uppercase; line-height: .92; margin: 12px 0; position: relative; max-width: 760px; }
.banner p { color: rgba(238, 242, 255, .8); max-width: 640px; position: relative; }
.banner .meta { position: relative; color: rgba(238, 242, 255, .85); margin-top: 12px; }
.banner .row { position: relative; }
.banner .tcover-art { width: 280px; right: -40px; bottom: -70px; opacity: .55; }

.adminbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; border-radius: var(--radius); border: 1px dashed rgba(212, 255, 58, .35); background: rgba(212, 255, 58, .04); margin-bottom: 18px; }
.adminbar .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--lime); font-weight: 700; margin-right: 6px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; }
tr.qualified td:first-child { box-shadow: inset 3px 0 0 var(--lime); }
.pos { font-family: var(--display); font-size: 20px; font-weight: 800; width: 34px; }
.pts { font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--lime); }
.form-dots { display: flex; gap: 3px; }
.form-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.form-dots i.W { background: var(--ok); }
.pairname b { display: block; font-weight: 600; }
.pairname small { color: var(--muted); }

/* ---------- Partidos ---------- */
.match { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.match.is-live { border-color: rgba(255, 90, 110, .45); box-shadow: 0 0 0 1px rgba(255, 90, 110, .2) inset; }
.match-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.match-head .chip { height: 22px; font-size: 11px; }
.side { display: flex; align-items: center; gap: 10px; }
.side .names { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side.win .names { font-weight: 700; color: var(--text); }
.side.lose .names { color: var(--muted); }
.side .scores { display: flex; gap: 4px; }
.side .scores span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--bg-2); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.side.win .scores span.w { background: var(--lime); color: var(--lime-ink); }
.side .tick { width: 16px; color: var(--lime); }
.tbd { color: var(--faint); font-style: italic; }
.match-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

.round-title { font-family: var(--display); text-transform: uppercase; font-size: 20px; margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.round-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Cuadro ---------- */
.bracket-wrap { overflow-x: auto; padding-bottom: 12px; }
.bracket { display: flex; gap: 28px; min-width: max-content; }
.b-col { display: flex; flex-direction: column; width: 260px; }
.b-col h4 { font-family: var(--display); text-transform: uppercase; font-size: 18px; color: var(--muted); margin-bottom: 12px; text-align: center; }
.b-matches { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 14px; }
.b-match { position: relative; }
.b-col:not(:last-child) .b-match::after { content: ''; position: absolute; right: -28px; top: 50%; width: 28px; border-top: 2px solid var(--line-2); }
.b-match .match { padding: 10px 12px; }
.champion { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; width: 220px; gap: 10px; padding: 24px 16px; border-radius: var(--radius); background: radial-gradient(circle at 50% 0%, rgba(212, 255, 58, .25), transparent 70%), var(--surface); border: 1px solid rgba(212, 255, 58, .35); align-self: center; }
.champion svg { width: 48px; height: 48px; color: var(--lime); }
.champion b { font-family: var(--display); font-size: 22px; text-transform: uppercase; line-height: 1.05; }

/* ---------- Horarios ---------- */
.slot { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.slot-time { font-family: var(--display); font-size: 26px; line-height: 1; }
.slot-time small { display: block; font-family: var(--font); font-size: 12px; color: var(--muted); text-transform: none; margin-top: 4px; }
.slot-matches { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- Inscripción ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-style: normal; flex-shrink: 0; }
.step.active { color: var(--text); border-color: var(--lime); }
.step.active i, .step.done i { background: var(--lime); color: var(--lime-ink); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: calc(var(--topbar) + 16px); }
.catopt { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: .15s; }
.catopt:hover { border-color: var(--muted); }
.catopt input { accent-color: var(--lime); width: 18px; height: 18px; }
.catopt.sel { border-color: var(--lime); background: rgba(212, 255, 58, .05); }
.catopt .info { flex: 1; min-width: 0; }
.bar { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--lime); border-radius: 9px; }
.paymeth { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; }
.paymeth.sel { border-color: var(--lime); background: rgba(212, 255, 58, .05); }
.paymeth .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex-shrink: 0; }
.paymeth .ico svg { width: 22px; height: 22px; }
.summary-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; font-weight: 700; font-size: 16px; }
.summary-line.total b { font-family: var(--display); font-size: 30px; color: var(--lime); }
.success { text-align: center; padding: 40px 24px; }
.success .big { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--lime); color: var(--lime-ink); }
.success .big svg { width: 40px; height: 40px; }
.ref { display: inline-block; font-family: ui-monospace, Consolas, monospace; background: var(--bg-2); border: 1px dashed var(--line-2); padding: 8px 14px; border-radius: 10px; font-size: 18px; letter-spacing: .1em; margin: 12px 0; }

.pay-now { margin: 14px auto 6px; max-width: 420px; padding: 16px; border-radius: 16px; border: 1px solid rgba(212, 255, 58, .4); background: rgba(212, 255, 58, .06); }
.pay-now .btn { width: 100%; height: 52px; font-size: 16px; }

/* ---------- Ranking ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 20px; }
.pod { text-align: center; border-radius: var(--radius); padding: 22px 12px; background: var(--surface); border: 1px solid var(--line); }
.pod.first { padding-top: 34px; border-color: rgba(212, 255, 58, .4); background: radial-gradient(circle at 50% 0%, rgba(212, 255, 58, .18), transparent 70%), var(--surface); }
.avatar { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 22px; background: linear-gradient(135deg, var(--blue), var(--violet)); }
.pod.first .avatar { width: 68px; height: 68px; background: var(--lime); color: var(--lime-ink); font-size: 26px; }
.pod b { display: block; font-weight: 700; }
.pod .p { font-family: var(--display); font-size: 28px; color: var(--lime); }
.avatar-sm { width: 34px; height: 34px; font-size: 14px; margin: 0; flex-shrink: 0; }

/* ---------- Admin ---------- */
.kpi { padding: 18px 20px; }
.kpi span { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi span svg { width: 16px; height: 16px; }
.kpi b { display: block; font-family: var(--display); font-size: 38px; line-height: 1.1; margin-top: 6px; }
.kpi small { color: var(--faint); font-size: 12px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-item:last-child { border-bottom: 0; }

/* ---------- Modal y toast ---------- */
.modal-back { grid-template-columns: minmax(0, 1fr); position: fixed; inset: 0; z-index: 100; background: rgba(3, 5, 14, .72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); animation: rise .2s; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { font-family: var(--display); text-transform: uppercase; font-size: 24px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.score-grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 58px); gap: 8px; align-items: center; }
.score-grid .input { text-align: center; padding: 0 4px; font-weight: 700; font-size: 18px; }
.score-grid .lbl { font-size: 12px; color: var(--faint); text-align: center; text-transform: uppercase; letter-spacing: .08em; }
.score-grid .who { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; background: rgba(76, 125, 255, .1); border: 1px solid rgba(76, 125, 255, .3); color: #c5d4ff; }
.alert.warn { background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .3); color: #ffd9a0; }
.alert.err { background: rgba(255, 90, 110, .1); border-color: rgba(255, 90, 110, .3); color: #ffc1c9; }

#toast-root { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: rise .2s; display: flex; gap: 8px; align-items: center; }
.toast svg { width: 18px; height: 18px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .5; }

/* ---------- Vista jugador ---------- */
.avatar { overflow: hidden; flex-shrink: 0; color: #fff; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; margin: 0; }
.avatar-xl { width: 104px; height: 104px; font-size: 38px; margin: 0; border: 3px solid var(--lime); }
.duo { display: inline-flex; flex-shrink: 0; }
.duo .avatar { width: 30px; height: 30px; font-size: 12px; margin: 0; border: 2px solid var(--surface); }
.duo .avatar + .avatar { margin-left: -10px; }
.lvl { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(212, 255, 58, .12); color: var(--lime); border: 1px solid rgba(212, 255, 58, .3); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .02em; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.linklike:hover { color: var(--lime); }
.linklike:focus-visible, .btn:focus-visible, .pill:focus-visible, .tab:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.side .names.linklike { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side.mine .names { color: var(--lime); }
.match.is-mine { border-color: rgba(212, 255, 58, .35); }
tr.mine td { background: rgba(212, 255, 58, .05); }
.pairname.linklike { display: block; }

.welcome { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: center; padding: 24px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(120deg, #0f1a45, #16124a); }
.next { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 20px; background: radial-gradient(circle at 100% 0%, rgba(212, 255, 58, .14), transparent 55%), var(--surface); border: 1px solid rgba(212, 255, 58, .3); }
.next-when { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.next-when b { font-family: var(--display); font-size: 56px; line-height: .9; color: var(--lime); }
.next-when span { color: var(--muted); display: inline-block; }
.next-when span::first-letter, .incid-day::first-letter { text-transform: uppercase; }
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--bg-2); }
.vs-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.vs-team b { font-size: 14px; overflow-wrap: anywhere; }
.vs-team.me b { color: var(--lime); }
.vs-team .duo .avatar { width: 40px; height: 40px; font-size: 14px; }
.vs-x { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--faint); }

.bell { position: relative; }
.bell i { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.me-link { display: flex; border-radius: 50%; }
.me-link .avatar { border: 2px solid var(--lime); }
.feat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--lime); flex-shrink: 0; }
.feat-ico svg { width: 20px; height: 20px; }
.notifs { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notif:last-child { border-bottom: 0; }
.notif.unread { position: relative; }
.notif.unread::after { content: ''; position: absolute; right: 4px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }

.catbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.catbar label { font-size: 13px; font-weight: 600; color: var(--muted); }
.catbar .select { max-width: 360px; flex: 1; min-width: 200px; }

.pair-list { padding: 4px 16px; }
.pair-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pair-row:last-child { border-bottom: 0; }
.pair-row.is-mine .pairname b { color: var(--lime); }
.pr-num { width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.pair-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.pair-admin { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; width: 100%; padding-left: 46px; }

.court-head { display: grid; grid-template-columns: 90px repeat(var(--cols), minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.court-head span { display: flex; align-items: center; gap: 6px; }
.slot .courts { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; }
.court-cell { display: flex; flex-direction: column; min-width: 0; }
.court-cell .court-name { display: none; }
.court-cell.free { border: 1px dashed var(--line-2); border-radius: 14px; align-items: center; justify-content: center; min-height: 92px; }
.free-label { color: var(--faint); font-size: 13px; }

.incid { display: flex; flex-direction: column; gap: 8px; }
.incid-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.incid-day { display: inline-block; width: 110px; font-size: 14px; color: var(--muted); }
.tog { cursor: pointer; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--muted); transition: .15s; }
.tog input:checked + span { background: rgba(255, 90, 110, .14); border-color: rgba(255, 90, 110, .5); color: #ff9aa7; text-decoration: line-through; }
.tog input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }

.agenda { display: flex; flex-direction: column; gap: 10px; }
.agenda-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.agenda-head .block-count { font-variant-numeric: tabular-nums; }
.agenda-day { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.agenda-date { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 4px; }
.agenda-date > span:first-child { display: inline-block; }
.agenda-date > span:first-child::first-letter { text-transform: uppercase; }
.agenda-date .block-count { height: 22px; font-size: 11px; font-variant-numeric: tabular-nums; }
.agenda-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.agenda-note { grid-column: 1 / -1; font-size: 13px; color: var(--faint); align-self: center; padding: 4px 0; }
.agenda-day.locked .agenda-date { color: var(--faint); }
.agenda-day.locked .chip { height: 22px; font-size: 11px; }
.tog.hour span { width: 100%; justify-content: center; height: 32px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.profile { padding: 24px; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(circle at 0% 0%, rgba(76, 125, 255, .18), transparent 60%), var(--surface); }
.profile-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-top > * { min-width: 0; max-width: 100%; }
.profile-top h1 { overflow-wrap: anywhere; }
.avatar-wrap { position: relative; }
.photo-btn { position: absolute; right: -2px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); cursor: pointer; border: 3px solid var(--surface); }
.lvl-big { display: flex; flex-direction: column; align-items: center; padding: 12px 18px; border-radius: 16px; background: rgba(212, 255, 58, .1); border: 1px solid rgba(212, 255, 58, .35); }
.lvl-big span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); font-weight: 700; }
.lvl-big b { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--lime); font-variant-numeric: tabular-nums; }
.form-dots.big i { width: 12px; height: 12px; }

.pp-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.pp-player { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pp-player b { font-size: 15px; }
.pp-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
a.pod { display: block; }
a.list-item:hover b { color: var(--lime); }

/* ---------- Agenda de canchas ---------- */
.agenda-board { --px: 68px; }
.ab-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0; font-size: 12px; color: var(--muted); }
.ab-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line-2); display: inline-block; }
.sw.mine { background: rgba(212, 255, 58, .25); border-color: var(--lime); }
.sw.live { background: rgba(255, 90, 110, .25); border-color: var(--danger); }
.sw.done { background: var(--surface); border-color: var(--muted); border-left: 3px solid var(--faint); }
.ab-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.ab-grid { min-width: 100%; }
.ab-header, .ab-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(120px, 1fr)); }
.ab-header { border-bottom: 1px solid var(--line-2); background: var(--surface); }
.ab-header span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); border-left: 1px solid var(--line); white-space: nowrap; }
.ab-header span:first-child { border-left: 0; }
.ab-body { position: relative; height: calc(var(--rows) * var(--px)); }
.ab-times { position: relative; }
.ab-times span { position: absolute; left: 0; right: 8px; text-align: right; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; transform: translateY(-50%); }
.ab-times span:first-child { transform: none; padding-top: 2px; }
.ab-times span:last-child { transform: translateY(-100%); }
.ab-col { position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--px) - 1px), var(--line) calc(var(--px) - 1px), var(--line) var(--px)); }
/* Cada partido toma el color de su categoría (--cat) */
.ab-match { --cat: var(--blue); position: absolute; left: 4px; right: 4px; display: flex; flex-direction: column; gap: 3px; padding: 6px 8px 6px 9px; overflow: hidden; text-align: left; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line-2); border: 1px solid color-mix(in srgb, var(--cat) 45%, transparent); border-left: 5px solid var(--cat);
  background: var(--surface-2); background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 22%, var(--surface)) 0%, color-mix(in srgb, var(--cat) 8%, var(--surface)) 100%);
  color: var(--text); font: inherit; transition: transform .12s, box-shadow .12s; }
.ab-match > * { flex-shrink: 0; }
.ab-match { line-height: 1.25; }
.ab-match:hover { transform: translateY(-1px); box-shadow: var(--shadow); z-index: 2; }
.ab-match.done { opacity: .62; }
.ab-match.done:hover { opacity: 1; }
.ab-match.done .ab-team:not(.w) { color: var(--muted); }
.ab-match.live { box-shadow: 0 0 0 2px var(--danger); }
.ab-match.mine { box-shadow: 0 0 0 2px var(--lime), 0 0 18px rgba(212, 255, 58, .25); opacity: 1; }
.ab-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-width: 0; }
.ab-cat-pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cat); }
.ab-cat-pill .short { display: none; }
.ab-me { flex-shrink: 0; font-size: 9px; font-weight: 800; letter-spacing: .08em; color: var(--lime-ink); background: var(--lime); padding: 1px 5px; border-radius: 5px; }
.ab-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-meta b { font-family: var(--display); font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.ab-live { flex-shrink: 0; font-size: 9px; font-weight: 800; letter-spacing: .08em; color: #ff8a98; animation: pulse 1.2s infinite; }
.ab-team { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; min-width: 0; }
/* Filtro de categorías con su color */
.ab-cats { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.ab-cat-chip { --cat: var(--muted); display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 600 12px var(--font); cursor: pointer; }
.ab-cat-chip i { width: 10px; height: 10px; border-radius: 3px; background: var(--cat); }
.ab-cat-chip small { color: var(--faint); font-weight: 600; }
.ab-cat-chip.active { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 18%, transparent); }
.ab-cat-chip:first-child.active { border-color: var(--text); background: var(--surface-2); }
/* Tarjetas de partido con color de categoría (Horarios, Mis partidos) */
.match.has-cat { border-left: 4px solid var(--cat); }
.match .cat-tag { color: var(--cat, var(--text)); font-weight: 800; }
.ab-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-team b { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ab-team.w b { color: var(--lime); }
.ab-team.me span { color: var(--lime); }
.ab-now { position: absolute; left: 56px; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.ab-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.ab-now span { position: absolute; right: 6px; top: -20px; font-size: 10px; font-weight: 700; color: #fff; background: var(--danger); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 760px) {
  .agenda-board { --px: 58px; }
  .ab-header, .ab-body { grid-template-columns: 40px repeat(var(--cols), minmax(74px, 1fr)); }
  .ab-header span { font-size: 10px; letter-spacing: .04em; padding: 10px 2px; }
  .ab-header span svg { display: none; }
  .ab-times span { font-size: 10px; right: 4px; }
  .ab-now { left: 40px; }
  .ab-match { left: 2px; right: 2px; padding: 4px 5px; border-radius: 8px; }
  .ab-live { font-size: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
  .ab-match { padding: 4px 4px 4px 6px; border-left-width: 4px; gap: 2px; }
  .ab-cat-pill .full { display: none; }
  .ab-cat-pill .short { display: inline; font-size: 11px; }
  .ab-me { font-size: 8px; padding: 1px 3px; }
  .ab-meta { font-size: 9px; }
  .ab-meta b { font-size: 12px; }
  .ab-cat-chip { height: 28px; padding: 0 9px; font-size: 11px; }
  .ab-team { font-size: 10px; gap: 3px; }
  .ab-team b { font-size: 10px; }
}

/* ---------- Descargar app ---------- */
.app-strip { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(212, 255, 58, .3); background: linear-gradient(90deg, rgba(212, 255, 58, .1), transparent 70%), var(--surface); }
.app-strip svg { flex-shrink: 0; }
.app-hero { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(120deg, #0f1a45, #16124a); }
.app-phone { aspect-ratio: 9 / 17; max-width: 100%; border-radius: 28px; border: 3px solid var(--line-2); background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow); }
.app-phone b { font-family: var(--display); font-size: 24px; text-transform: uppercase; }
.app-phone span { font-size: 12px; color: var(--muted); }
.steps-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; }
.steps-list b { color: var(--text); }
.steps-list.big { font-size: 16px; gap: 14px; }
/* Bienvenida al escanear el QR */
.qr-welcome { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qw-icon { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 26px; border-radius: 26px; background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.qw-icon b { font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.qw-btn { height: 56px; font-size: 18px; }
.qr-welcome .steps-list { align-self: stretch; }
.qw-share { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--surface-3); color: #4c9dff; vertical-align: -6px; }
.modal-back.top { place-items: start center; padding: 16px; }
.modal-back.top .modal { border-radius: 20px; max-height: 78vh; }
/* Flecha que apunta al botón Compartir de Safari (barra inferior del iPhone) */
.ios-arrow { position: fixed; left: 50%; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 130; color: var(--lime); animation: iosArrow 1s ease-in-out infinite; pointer-events: none; }
@keyframes iosArrow { 50% { transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .ios-arrow { animation: none; } .ball { animation: none; } }
.card.highlight { border-color: rgba(212, 255, 58, .45); }
.qr-card { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border-color: rgba(212, 255, 58, .35); }
.qr { width: 216px; height: 216px; padding: 8px; background: #fff; border-radius: 12px; display: grid; place-items: center; color: #080c1a; font-size: 12px; text-align: center; flex-shrink: 0; }
.qr img, .qr canvas { display: block; }
@media (max-width: 760px) {
  .app-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .app-phone { width: 110px; justify-self: center; border-radius: 22px; }
  .app-phone b { font-size: 18px; }
}

footer.site { max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 120px; color: var(--faint); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-side { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  :root { --topbar: 58px; }
  .mainnav, .topbar-actions .hide-m { display: none; }
  .topbar-in { justify-content: space-between; gap: 8px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn-sm { padding: 0 9px; }
  .topbar-actions .btn-icon { width: 34px; height: 34px; }
  .brand { gap: 8px; min-width: 0; }
  .brand svg { width: 34px; height: 34px; }
  .brand-text b { font-size: 23px; }
  .brand-text small { font-size: 8.5px; letter-spacing: .2em; }
  main { padding-top: 16px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(8, 12, 26, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; color: var(--faint); font-weight: 600; border-radius: 12px; }
  .bottomnav a svg { width: 22px; height: 22px; }
  .bottomnav a.active { color: var(--lime); }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 32px 22px; min-height: 0; }
  .hero-court { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-4.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .banner { padding: 24px 20px; }
  .section-head h2 { font-size: 26px; }
  .steps .step span { display: none; }
  .steps .step { justify-content: center; }
  .slot { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pod { padding: 16px 6px; }
  .pod b { font-size: 13px; }
  .hide-sm { display: none; }
  .modal-back { place-items: end center; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .score-grid { grid-template-columns: minmax(0, 1fr) repeat(3, 48px); }
  .kpi b { font-size: 30px; }
  .welcome { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .next-when b { font-size: 46px; }
  .court-head { display: none; }
  .slot .courts { grid-template-columns: minmax(0, 1fr); }
  .court-cell .court-name { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--lime); font-weight: 700; margin-bottom: 4px; }
  .court-cell.free { display: none; }
  .incid-day { width: 100%; }
  .agenda-day { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .agenda-date { padding-top: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .agenda-hours { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile { padding: 18px; }
  .profile-top { gap: 14px; }
  .avatar-xl { width: 84px; height: 84px; font-size: 30px; }
  .lvl-big { flex-direction: row; gap: 10px; width: 100%; justify-content: center; }
  .pp-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-mid { grid-column: 1 / -1; order: -1; }
  .pair-admin { padding-left: 0; }
  .bottomnav a { font-size: 10px; }
}

@media print {
  .topbar, .bottomnav, .adminbar, footer.site, .tabs, .pills, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Revisión de diseño y UX ---------- */
.step-now { display: none; }
/* Pestañas y filtros deslizables: un degradado en el borde indica que hay más opciones */
.tabs.more-r, .pills.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.tabs.more-l, .pills.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.tabs.more-l.more-r, .pills.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.ab-legend .linklike { font-weight: 600; }
@media (max-width: 760px) {
  /* iPhone: con letra menor a 16 px la pantalla hace zoom al escribir */
  .input, .select, .textarea { font-size: 16px; }
  /* Áreas táctiles más cómodas */
  .btn-sm { height: 38px; }
  .btn-xs { height: 32px; padding: 0 12px; }
  .topbar-actions .btn-sm { height: 34px; }
  /* Inscripción: en el celular se ve el nombre del paso actual */
  .step-now { display: block; margin: -10px 0 18px; color: var(--muted); font-size: 14px; }
  .step-now b { color: var(--text); }
  /* Portadas: el dibujo de la cancha no compite con el texto */
  .banner .tcover-art { opacity: .28; }
  .catopt { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Celulares angostos (iPhone SE / 320-360 px): la barra superior cabe completa */
@media (max-width: 360px) {
  .topbar-in { padding-left: 10px; padding-right: 10px; }
  .brand { gap: 6px; }
  .brand svg { width: 30px; height: 30px; }
  .brand-text b { font-size: 20px; }
  .brand-text small { display: none; }
  .topbar-actions { gap: 2px; }
  .topbar-actions .btn-icon, .topbar-actions .avatar-sm { width: 32px; height: 32px; }
  .topbar-actions .btn-sm { padding: 0 7px; }
}