:root {
  --blue: #1577e0;
  --blue-dark: #0d5bb5;
  --blue-deep: #0a2540;
  --celeste: #74acdf;
  --ink: #0f172a;
  --muted: #5b6675;
  --line: #e6eaf0;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(13, 91, 181, 0.10);
  --maxw: 1140px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 18px; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; }
.brand img { width: 42px; height: 42px; }
.brand small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 15px; color: #344256; transition: color .15s; }
.nav-links a:hover { color: var(--blue); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 999px; cursor: pointer; border: 0; transition: transform .12s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(21,119,224,.35); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-ghost:hover { background: var(--bg-soft); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(116,172,223,.30), transparent 60%),
    linear-gradient(180deg, #f3f8ff 0%, #ffffff 70%);
  padding: 90px 0 70px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 850; }
.hero h1 .accent { color: var(--blue); }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 22px 0 32px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.hero-badges .item { }
.hero-badges .num { font-size: 30px; font-weight: 850; color: var(--blue-deep); }
.hero-badges .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-art {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; border-radius: 28px;
  background: radial-gradient(circle at 50% 40%, #ffffff, #eaf2fe);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero-art img { width: 64%; filter: drop-shadow(0 12px 24px rgba(13,91,181,.18)); }
.hero-art .ribbon {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--blue-deep); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 1px;
  padding: 9px 18px; border-radius: 999px; white-space: nowrap;
}
.flag-stripe { position:absolute; top:0; left:0; right:0; height:6px;
  background: linear-gradient(90deg, var(--celeste) 0 33%, #fff 33% 66%, var(--celeste) 66% 100%); }

/* ---------- Cards / disciplinas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .15s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe0f6; }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; margin-bottom: 18px;
}
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Institucional ---------- */
.about { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 18px; }
.about p { color: var(--muted); margin-bottom: 16px; font-size: 17px; }
.about .veteranos {
  display: flex; gap: 16px; align-items: center; margin-top: 26px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: 12px; padding: 18px 20px;
}
.about .veteranos img { width: 54px; }
.about .veteranos b { display: block; font-size: 15px; }
.about .veteranos span { font-size: 14px; color: var(--muted); }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px;
}
.stat .n { font-size: 34px; font-weight: 850; color: var(--blue); }
.stat .t { color: var(--muted); font-size: 14px; font-weight: 600; }

/* ---------- Horarios ---------- */
.sched { max-width: 720px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sched .row { display: flex; justify-content: space-between; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.sched .row:last-child { border-bottom: 0; }
.sched .row:nth-child(odd) { background: var(--bg-soft); }
.sched .day { font-weight: 700; }
.sched .hours { color: var(--blue-dark); font-weight: 600; }
.sched .closed { color: #b91c1c; font-weight: 600; }

/* ---------- Asociarse ---------- */
.join { background: linear-gradient(135deg, var(--blue-deep), var(--blue-dark)); color: #fff; }
.join .section-head h2 { color: #fff; }
.join .section-head p { color: #c9ddf6; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 44px; }
.step { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 26px; }
.step .n { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--blue-dark); font-weight: 850; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: #c9ddf6; font-size: 15px; }
.join .center { text-align: center; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info .line { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-info .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft); color: var(--blue); display: grid; place-items: center; flex: 0 0 auto; }
.contact-info b { display: block; font-size: 15px; }
.contact-info span { color: var(--muted); font-size: 15px; }
.map-box {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, #eef4fc, #eef4fc 12px, #f6f9fd 12px, #f6f9fd 24px);
  display: grid; place-items: center; min-height: 320px; color: var(--muted); text-align: center; padding: 24px;
}

/* ---------- Footer ---------- */
footer { background: var(--blue-deep); color: #cdd9e8; padding: 54px 0 30px; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand img { width: 48px; }
.foot-brand b { color: #fff; font-size: 16px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: #cdd9e8; font-size: 15px; }
.foot-links a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 22px; font-size: 13px; color: #94a8c0; text-align: center; }

/* ---------- Novedades y torneos ---------- */
.nov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.nov-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .2s;
}
.nov-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.nov-media {
  position: relative; aspect-ratio: 16/9; background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.nov-media.ph { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); }
.nov-media.ph svg { width: 56px; height: 56px; color: rgba(255,255,255,.85); }
.nov-badge {
  position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px; color: #fff;
}
.nov-badge.torneo { background: #d97706; }
.nov-badge.novedad { background: var(--blue); }
.nov-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.nov-body time { font-size: 13px; color: var(--muted); font-weight: 600; }
.nov-body h3 { font-size: 19px; margin: 6px 0 8px; }
.nov-body h3 a { color: var(--ink); transition: color .15s; }
.nov-body h3 a:hover { color: var(--blue); }
.nov-body p { color: var(--muted); font-size: 15px; flex: 1; }
.nov-readmore { display: inline-block; margin-top: 12px; color: var(--blue); font-weight: 700; font-size: 14px; }
.nov-readmore:hover { text-decoration: underline; }
.nov-share { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.nov-share .lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 2px; }
.share-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: #475569; transition: transform .12s, background .2s, color .2s, border-color .2s;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn.wa:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.x:hover  { background: #000; color: #fff; border-color: #000; }
.share-btn.cp:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nov-grid { grid-template-columns: 1fr; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 360px; margin: 0 auto; }
  .cards, .steps { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}

/* ---------- Agregados de la versión conectada al sistema ---------- */
.eyebrow.light { color: #9fc6f5; }
.foot-brand small { font-size: 13px; }
.muted-msg { color: var(--muted); text-align: center; grid-column: 1 / -1; }
.nov-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nov-badge { z-index: 1; }
.share-btn svg, .sbtn svg { width: 17px; height: 17px; }

/* Próximos eventos */
.events { max-width: 820px; margin: 0 auto 56px; display: grid; gap: 14px; }
.events h3.events-title { font-size: 14px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); text-align: center; margin-bottom: 4px; }
.event { display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.event .when { flex: 0 0 auto; width: 64px; text-align: center; border-radius: 12px; background: var(--bg-soft); padding: 8px 0; }
.event .when .d { display: block; font-size: 24px; font-weight: 850; color: var(--blue-deep); line-height: 1.1; }
.event .when .m { display: block; font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; }
.event h4 { font-size: 17px; }
.event .meta { font-size: 14px; color: var(--muted); }
.event p { font-size: 15px; color: #334155; margin-top: 4px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; margin-left: 6px; vertical-align: middle; }

/* Horarios: días especiales */
.special { max-width: 720px; margin: 22px auto 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; }
.special h3 { font-size: 15px; margin-bottom: 10px; }
.special ul { list-style: none; }
.special li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.special li:first-child { border-top: 0; }

/* Documentos */
.docs { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.doc { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.doc .ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fee2e2; color: #b91c1c; font-weight: 800; font-size: 12px; }
.doc .info { flex: 1; min-width: 0; }
.doc .info b { display: block; }
.doc .info span { font-size: 14px; color: var(--muted); }
.doc .cat { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .5px; }

/* Nota completa (articulo.html) */
.back { color: var(--blue); font-weight: 600; font-size: 15px; }
article.note { padding-top: 40px; padding-bottom: 70px; max-width: 820px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--blue); font-weight: 600; }
.note .nov-badge { position: static; display: inline-block; margin-bottom: 16px; }
.note h1 { font-size: clamp(28px, 5vw, 44px); }
.note .meta { color: var(--muted); font-size: 15px; margin: 16px 0 10px; }
.note .cover { margin: 26px 0 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.note .cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.note .body { font-size: 18px; color: #283242; margin-top: 26px; line-height: 1.7; }
.note .body p { margin-bottom: 18px; }
.gallery-title { font-size: 14px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); margin: 38px 0 16px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: none; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .15s; }
.gallery button:hover img { transform: scale(1.03); }
.share { display: flex; align-items: center; gap: 10px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.share .lbl { font-weight: 700; font-size: 15px; }
.sbtn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 10px; color: #fff; cursor: pointer; border: 0; }
.sbtn.wa { background: #25d366; } .sbtn.fb { background: #1877f2; } .sbtn.x { background: #000; }
.sbtn.cp { background: #eef2f7; color: #475569; }
.notfound { text-align: center; padding: 90px 20px; }
.notfound h1 { font-size: 26px; margin-bottom: 12px; }
.notfound p { color: var(--muted); margin-bottom: 24px; }
.lb { position: fixed; inset: 0; background: rgba(8,16,30,.92); display: none; place-items: center; z-index: 100; padding: 30px; }
.lb.open { display: grid; }
.lb img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.lb .close { position: absolute; top: 16px; right: 22px; color: #fff; font-size: 36px; background: none; border: 0; cursor: pointer; line-height: 1; }
.foot-simple { padding: 40px 0; text-align: center; font-size: 14px; }
.foot-simple a { color: #fff; font-weight: 600; }

@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } .event { flex-direction: column; } }
.map-box svg { margin: 0 auto 12px; }
.map-box b { display: block; color: var(--ink, #0f172a); }
.map-box .map-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 12px; }
.map-box small { font-size: 13px; }
.map-box.loaded { padding: 0; display: block; background: none; }
.map-box iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }
/* Botones flotantes de WhatsApp y redes */
.float-contact { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.float-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.25); transition: transform .15s ease, box-shadow .15s ease; }
.float-btn svg { width: 22px; height: 22px; }
.float-btn:hover, .float-btn:focus-visible { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 24px rgba(15,23,42,.3); }
.float-btn.whatsapp { width: 58px; height: 58px; background: #25d366; }
.float-btn.whatsapp svg { width: 30px; height: 30px; }
.float-btn.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.float-btn.facebook { background: #1877f2; }
/* Lugar libre al final para que los botones no tapen el pie de página. */
@media (max-width: 600px) { .float-contact { right: 14px; bottom: 14px; gap: 8px; } body:has(.float-contact) > footer { padding-bottom: 190px; } }
@media (prefers-reduced-motion: reduce) { .float-btn { transition: none; } }
@media print { .float-contact { display: none; } }

.contact-info a { color: inherit; text-decoration: underline; text-decoration-color: #c4d0e0; text-underline-offset: 3px; }
.contact-info a:hover { color: var(--blue); }
.brand span { white-space: nowrap; }

/* Con todos los enlaces (incluidos Tienda y Portal del socio) en una línea:
   letra un poco más chica, sin cortes, y el escudo nunca se encoge. */
.nav { gap: 24px; }
.brand { flex-shrink: 0; }
.nav-links { gap: 20px; }
.nav-links a { font-size: 14.5px; white-space: nowrap; }
.nav-links .btn { padding: 10px 20px; }

/* Menú hamburguesa antes de que el nombre del club choque con los enlaces. */
@media (max-width: 1200px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 18px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* Solicitud de ingreso (solicitud.html) */
.apply { max-width: 820px; padding-top: 40px; padding-bottom: 70px; }
.apply h1, .legal h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 18px; }
.apply-intro { color: var(--muted); margin-bottom: 28px; }
.apply-intro p { margin-bottom: 10px; }
.apply-intro .warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 12px 16px; }
.apply-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.apply-form legend { font-weight: 800; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); padding: 0 8px; }
.apply-form label { display: block; font-weight: 600; font-size: 14px; color: #334155; margin-bottom: 12px; }
.apply-form input:not([type=radio]):not([type=checkbox]), .apply-form select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid #d5dce6; border-radius: 10px;
  font: inherit; font-weight: 400; color: var(--ink); background: #fff;
}
.apply-form input:focus, .apply-form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,119,224,.15); }
.apply-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.apply-form .span2 { grid-column: 1 / -1; }
.apply-form .opt { font-weight: 500; color: #94a3b8; }
.apply-form .choice { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-weight: 600; font-size: 14px; color: #334155; }
.apply-form .choice label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 500; }
.apply-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.apply-form .check input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.apply-form .check a { color: var(--blue); text-decoration: underline; }
.apply-form .form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }
.apply-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.apply-form button[type=submit] { margin-top: 6px; }
.apply-done { text-align: center; padding: 50px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.apply-done h2 { font-size: 26px; margin-bottom: 12px; }
.apply-done p { color: var(--muted); margin-bottom: 24px; }
.legal { max-width: 820px; padding-top: 40px; padding-bottom: 70px; }
.legal h2 { font-size: 20px; margin: 26px 0 8px; }
.legal p { color: #334155; margin-bottom: 10px; }
.legal .muted { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .apply-form .grid2 { grid-template-columns: 1fr; } }

/* Portal del socio (portal.html) */
.portal { padding-top: 40px; padding-bottom: 70px; }
.portal h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 14px; }
.portal h2 { font-size: 18px; margin-bottom: 14px; }
.portal h3 { font-size: 15px; margin: 18px 0 6px; color: var(--blue); }
.portal-login { max-width: 520px; margin: 0 auto; }
.lead-sm { color: var(--muted); margin-bottom: 22px; }
.portal-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.portal-card label { display: block; font-weight: 600; font-size: 14px; color: #334155; margin-bottom: 12px; }
.portal-card input { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid #d5dce6; border-radius: 10px; font: inherit; font-weight: 400; }
.portal-card input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,119,224,.15); }
.portal-card select { display: block; width: 100%; margin-top: 6px; padding: 11px 40px 11px 13px; border: 1px solid #d5dce6; border-radius: 10px; font: inherit; font-weight: 400; background: #fff url("/assets/img/chevron-down.svg") no-repeat right 14px center / 16px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.portal-card select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,119,224,.15); }
.portal-card .hint, .portal .hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.portal-grid { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.profile .photo { margin-bottom: 16px; }
.profile .photo img { width: 140px; height: 175px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.profile .nophoto { width: 140px; height: 175px; border-radius: 12px; border: 1px dashed #c4d0e0; display: grid; place-items: center; text-align: center; font-size: 13px; color: var(--muted); padding: 10px; }
.profile dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.profile dt { color: var(--muted); }
.profile dd { font-weight: 600; }
.clu { margin-top: 16px; border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.clu.ok { background: #f0fdf4; color: #166534; }
.clu.soon { background: #fffbeb; color: #92400e; }
.clu.expired { background: #fef2f2; color: #b91c1c; }
.clu.none { background: var(--bg-soft); color: var(--muted); }
.notice { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; font-size: 15px; }
.notice.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.notice.info { background: var(--bg-soft); border: 1px solid var(--line); color: #334155; }
.notice.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.portal .form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.portal .docs { max-width: none; }
.credential { margin-top: 16px; display: grid; justify-items: start; gap: 12px; }
.credential img { width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-soft); }
.weapons { display: grid; gap: 12px; }
.weapon { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.weapon.inactive { background: var(--bg-soft); color: var(--muted); }
.weapon b { font-size: 16px; }
.weapon .tag.off { background: #e2e8f0; color: #475569; }
.weapon dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin-top: 10px; font-size: 14px; }
.weapon dt { color: var(--muted); font-size: 12px; }
.weapon dd { font-weight: 600; overflow-wrap: anywhere; }
.weapon .wdocs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.weapon .wdocs a { font-size: 13px; padding: 6px 12px; }
@media (max-width: 900px) { .portal-grid { grid-template-columns: 1fr; } }
.inline-link { color: var(--blue); font-weight: 600; text-decoration: underline; }
[hidden] { display: none !important; }

/* Tienda (tienda.html) */
.shop { padding-top: 40px; padding-bottom: 70px; }
.shop h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 12px; }
.shop .muted { color: var(--muted); }
.shop-intro { color: var(--muted); max-width: 720px; margin-bottom: 28px; }
.shop-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.shop-layout[hidden] { display: none; }
.shop-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.shop-filters .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; color: #334155; cursor: pointer; }
.shop-filters .chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.shop-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.shop-card.soldout { opacity: .6; }
.shop-img { aspect-ratio: 4 / 3; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-img img.placeholder { width: 40%; height: auto; object-fit: contain; opacity: .25; }
.shop-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-cat { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); }
.shop-body h3 { font-size: 17px; line-height: 1.25; }
.shop-desc { color: var(--muted); font-size: 14px; }
.shop-clu { font-size: 13px; color: #9a3412; background: #fff7ed; border-radius: 8px; padding: 4px 8px; }
.shop-price { margin-top: auto; padding-top: 6px; }
.shop-price b { font-size: 20px; color: var(--blue-deep); }
.shop-price span { color: var(--muted); font-size: 13px; }
.shop-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.stock { font-size: 13px; font-weight: 600; }
.stock.ok { color: #15803d; }
.stock.low { color: #c2410c; }
.stock.out { color: #b91c1c; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--bg-soft); font-size: 18px; font-weight: 700; color: var(--blue-deep); cursor: pointer; }
.qty button:disabled { opacity: .35; cursor: default; }
.qty span { min-width: 32px; text-align: center; font-weight: 700; }
.shop-cart { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.shop-cart h2 { font-size: 18px; margin-bottom: 12px; }
.shop-cart .btn { width: 100%; justify-content: center; margin-top: 14px; }
.shop-cart .btn:disabled { opacity: .5; cursor: default; box-shadow: none; transform: none; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-line b { display: block; }
.cart-line span { color: var(--muted); }
.cart-line-end { text-align: right; white-space: nowrap; }
.cart-line-end span { display: block; color: var(--ink); font-weight: 600; }
.cart-line .link { border: 0; background: none; color: #b91c1c; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.cart-total { display: flex; justify-content: space-between; padding-top: 12px; font-size: 17px; }
.shop-form { max-width: 820px; }
.shop-form h2 { font-size: 22px; margin-bottom: 4px; }
.shop-form > .muted { margin-bottom: 18px; }
.shop-form-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-cart { position: static; }
}
@media (max-width: 480px) { .shop-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .shop-body { padding: 10px 12px 12px; } .shop-actions { flex-direction: column; align-items: stretch; } .qty { justify-content: space-between; } }
.shop-filters[hidden], .cart-total[hidden] { display: none; }
.order-summary { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; color: #334155; }
.order-summary-total { font-weight: 700; color: var(--blue-deep); }
.shop-img { border: 0; padding: 0; width: 100%; cursor: pointer; position: relative; }
.shop-img-count { position: absolute; right: 8px; bottom: 8px; background: rgba(15,23,42,.7); color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }
.shop-name { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.shop-name:hover { color: var(--blue); }

/* Ficha del producto */
.product-dialog { margin: auto; border: 0; border-radius: var(--radius); padding: 0; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(10,37,64,.35); color: var(--ink); }
.product-dialog::backdrop { background: rgba(10,37,64,.55); }
.dlg-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); }
.dlg-grid { display: grid; grid-template-columns: 1.1fr 1fr; }
.dlg-gallery { position: relative; aspect-ratio: 4 / 3; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.dlg-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.dlg-photo img { width: 100%; height: 100%; object-fit: contain; }
.dlg-photo img.placeholder { width: 40%; height: auto; opacity: .25; }
.dlg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(255,255,255,.9); font-size: 28px; line-height: 1; cursor: pointer; color: var(--blue-deep); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.dlg-nav.prev { left: 10px; }
.dlg-nav.next { right: 10px; }
.dlg-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.dlg-thumbs:empty { display: none; }
.dlg-thumbs button { flex: 0 0 64px; height: 64px; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer; background: var(--bg-soft); }
.dlg-thumbs button.on { border-color: var(--blue); }
.dlg-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dlg-info { padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 32px); }
.dlg-info h2 { font-size: 24px; line-height: 1.2; padding-right: 30px; }
.dlg-info .shop-price { margin-top: 0; padding-top: 0; }
.dlg-text { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.dlg-text:empty { display: none; }
.rich { color: #334155; font-size: 15px; line-height: 1.6; }
.rich h3 { font-size: 18px; margin: 14px 0 6px; color: var(--ink); }
.rich h4 { font-size: 16px; margin: 12px 0 4px; color: var(--ink); }
.rich p { margin-bottom: 8px; }
.rich ul, .rich ol { padding-left: 22px; margin-bottom: 8px; }
.rich a { color: var(--blue); text-decoration: underline; }
@media (max-width: 760px) {
  .dlg-grid { grid-template-columns: 1fr; }
  .product-dialog { overflow-y: auto; }
  .dlg-info { max-height: none; padding: 20px 18px 24px; }
}
.shop-who { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 22px; font-size: 15px; color: #334155; }
.shop-who[hidden] { display: none; }
.shop-who a, .shop-lock a { color: var(--blue); font-weight: 600; text-decoration: underline; }
.shop-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-tags .tag { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.shop-tags .tag.members { background: #e8f1fd; color: var(--blue-dark); }
.shop-tags .tag.clu { background: #fff7ed; color: #9a3412; }
.shop-lock { font-size: 13px; color: #475569; background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; }

/* Portal: sus vistas son <section>, sin el margen grande de las secciones de la portada. */
.portal > section { padding: 0; }
/* Tarjetas del portal con ícono, texto y botón a la derecha (tienda, credencial). */
.portal-row { display: flex; align-items: center; gap: 18px; color: inherit; }
.portal-link { transition: border-color .15s, box-shadow .15s; }
.portal-link:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.portal-row-ico { flex: 0 0 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; display: flex; align-items: center; justify-content: center; }
.portal-row-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.portal-row-text b { font-size: 18px; }
.portal-row-text span { font-size: 14px; color: var(--muted); }
.portal-row .btn { flex-shrink: 0; }
.portal-row .btn[hidden] { display: none; }
#credentialCard .credential { justify-items: center; margin-top: 20px; }
#credentialCard .credential .hint { text-align: center; max-width: 420px; }
.profile .photo { display: flex; justify-content: center; }
.contact-info .line[hidden], .map-actions a[hidden] { display: none; }
@media (max-width: 640px) { .portal-row { flex-wrap: wrap; } .portal-row .btn { width: 100%; justify-content: center; } }

/* Sponsors (Club → Sponsors en TFR4) */
.sponsors { background: var(--bg-soft); }
.sponsors[hidden], .sp-slot[hidden] { display: none; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.sp-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.sp-media { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; background: #fff; border: 0; padding: 0; cursor: pointer; }
div.sp-media:not(.sp-frame) { cursor: default; }
.sp-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 999px; background: rgba(10,37,64,.75); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; padding-left: 4px; transition: background .15s; }
.sp-video:hover .sp-play { background: var(--blue); }
.sp-caption { padding: 12px 16px 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.sp-caption b { color: var(--ink); font-size: 15px; }
.sp-caption a { color: var(--blue); font-weight: 600; margin-left: auto; }
.sp-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #94a3b8; width: 100%; }
/* Banner (tienda y notas): imagen ancha y leyenda al costado. */
.sp-slot { margin: 0 0 24px; }
.note .sp-slot { margin-top: 36px; }
.sp-banner { flex-direction: row; align-items: stretch; }
.sp-banner .sp-media { aspect-ratio: auto; flex: 0 0 60%; height: 150px; }
.sp-banner .sp-frame { height: auto; aspect-ratio: 16 / 9; }
.sp-banner .sp-caption { border-top: 0; border-left: 1px solid var(--line); flex-direction: column; flex-wrap: nowrap; justify-content: center; }
.sp-banner .sp-caption a { margin-left: 0; }
@media (max-width: 640px) {
  .sp-banner { flex-direction: column; }
  .sp-banner .sp-media { flex: none; height: auto; aspect-ratio: 16 / 9; }
  .sp-banner .sp-caption { border-left: 0; border-top: 1px solid var(--line); }
}
/* Ventana emergente */
.sp-popup { margin: auto; border: 0; padding: 0; border-radius: var(--radius); width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(10,37,64,.35); overflow: hidden; }
.sp-popup::backdrop { background: rgba(10,37,64,.55); }
.sp-popup .sp-card { border: 0; border-radius: 0; }

/* ── Eventos y torneos (portada, evento.html y portal) ── */
.block-title { font-size: 14px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); margin: 0 0 18px; }
#eventsBlock, #resultsBlock { margin-top: 56px; }
#eventsBlock[hidden] { display: none; }
.nov-badge.evento { background: #0f766e; }
.ev-when { display: flex; align-items: center; gap: 10px; }
.ev-date { flex: 0 0 auto; width: 48px; text-align: center; border-radius: 10px; background: var(--bg-soft); padding: 4px 0; line-height: 1.1; }
.ev-date b { display: block; font-size: 20px; font-weight: 850; color: var(--blue-deep); }
.ev-date small { display: block; font-size: 11px; font-weight: 700; color: var(--blue); text-transform: uppercase; }
.ev-when time { font-size: 13px; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ev-chips:empty { display: none; }
.ev-chips .tag { margin-left: 0; }
.reg-chip { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.reg-chip.open { background: #dcfce7; color: #166534; }
.reg-chip.closed { background: #f1f5f9; color: #64748b; }
.reg-chip.pending { background: #fef3c7; color: #92400e; }
.tag.members { background: #dbeafe; color: #1e40af; }

.ev-page .ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-page .ev-meta .tag { margin-left: 0; }
.ev-cta { margin-top: 6px; }
.ev-cover { display: block; margin: 26px auto 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-soft); cursor: zoom-in; max-width: 100%; }
.ev-cover img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; margin: 0 auto; }
.ev-lead { font-size: 20px; color: #334155; margin-top: 22px; line-height: 1.55; }
.ev-page .body .rich { font-size: 18px; line-height: 1.7; color: #283242; }
.note .body .rich p { margin-bottom: 18px; }

.reg-box { margin-top: 40px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.reg-box > h2 { font-size: 26px; margin-bottom: 8px; }
.reg-lead { margin-bottom: 18px; }
.reg-status { border-radius: 12px; padding: 14px 18px; background: var(--bg-soft); border: 1px solid var(--line); }
.reg-status b { display: block; font-size: 17px; margin-bottom: 4px; }
.reg-status p { color: var(--muted); }
.reg-status.confirmed { background: #f0fdf4; border-color: #bbf7d0; }
.reg-status.pending { background: #fffbeb; border-color: #fde68a; }
.reg-form .fs-hint { margin: -4px 0 12px; font-size: 14px; }
.reg-form .fs-hint a { color: var(--blue); font-weight: 600; }
.opt-list { display: grid; gap: 10px; }
.apply-form .opt-card { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s; }
.apply-form .opt-card:has(input:checked) { border-color: var(--blue); background: #eff6ff; }
.apply-form .opt-card input { width: 18px; height: 18px; flex: 0 0 auto; }
.opt-card .opt-name { flex: 1; }
.opt-card .opt-price { color: var(--blue-deep); font-weight: 800; }
.pay-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-size: 15px; color: #334155; }
.pay-box dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 0; }
.pay-box dt { font-weight: 700; color: var(--muted); }
.pay-box dd { margin: 0; font-weight: 700; word-break: break-all; }
.pay-box .pay-holder { margin-top: 6px; font-weight: 600; }
.pay-box .pay-note { margin-top: 10px; font-size: 14px; color: var(--muted); }
.apply-form input[type=file] { font-size: 14px; margin-top: 6px; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Torneos: historial y resultados */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tourneys { padding-top: 40px; padding-bottom: 70px; }
.tourneys h1 { font-size: clamp(28px, 5vw, 44px); margin: 6px 0 10px; }
.tourneys section { padding: 0; }
.tourneys #upcomingBlock { margin: 30px 0 50px; }
.tourneys #upcomingBlock[hidden] { display: none; }
.t-history { margin-top: 30px; }
.t-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
/* Mismo alto para el buscador y los desplegables; la flecha del desplegable
   es propia (con aire respecto al texto), no la del navegador. */
.t-filters input[type=search], .t-filters select { box-sizing: border-box; height: 44px; font: inherit; font-size: 15px; line-height: 1.2; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background-color: #fff; color: var(--ink); }
.t-filters select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("/assets/img/chevron-down.svg"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; cursor: pointer; }
.t-filters input[type=search]:focus, .t-filters select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,119,224,.15); }
.t-filters label { display: flex; }
.t-filters .t-search { flex: 1 1 240px; }
.t-filters .t-search input { width: 100%; }
.t-filters .t-check { display: inline-flex; gap: 8px; align-items: center; height: 44px; font-size: 15px; color: #334155; cursor: pointer; }
.t-check input { width: 18px; height: 18px; margin: 0; }
.t-list { display: grid; gap: 10px; }
.t-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.t-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.t-name { font-weight: 800; color: var(--ink); }
.t-name:hover { color: var(--blue); }
.t-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.t-tags:empty { display: none; }
.t-tags .tag, .ev-meta .tag.disc { margin-left: 0; }
.tag.disc { background: #e0e7ff; color: #3730a3; }
.t-pdf { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; }
.t-pdf svg { width: 16px; height: 16px; }
.t-nores { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.t-more { text-align: center; margin-top: 18px; }
.t-more .btn[hidden] { display: none; }
.t-all { margin-top: 12px; text-align: right; }
#resultsBlock[hidden], #newsTitle[hidden] { display: none; }
.results-box .t-row { background: var(--bg-soft); }
.results-ico { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 10px; background: #fee2e2; color: #b91c1c; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 640px) {
  .t-filters .t-search, .t-filters .t-check { flex-basis: 100%; }
  .t-filters .t-check { height: auto; }
  .t-filters > label:not(.t-search):not(.t-check) { flex: 1 1 0; min-width: 0; }
  .t-filters select { width: 100%; }
  .t-row { flex-wrap: wrap; }
  .t-row .t-pdf { width: 100%; justify-content: center; }
}

/* Campo de teléfono: país + número */
.phone-field { margin-top: 6px; }
.phone-field .pf-row { display: flex; gap: 8px; }
.phone-field .pf-row > select.pf-country { flex: 0 0 auto; width: auto; margin-top: 0; padding-right: 34px; font-weight: 400; }
.phone-field .pf-row > input.pf-number { flex: 1 1 auto; min-width: 0; margin-top: 0; }
.phone-field .pf-hint { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; color: var(--muted); }
.phone-field .pf-hint.warn { color: #b45309; }
.apply-form .phone-field select.pf-country { -webkit-appearance: none; appearance: none; background: #fff url("/assets/img/chevron-down.svg") no-repeat right 10px center / 14px; }

/* Portal: barra de secciones (con marcas) y una sección por pantalla */
.p-top { margin-bottom: 14px; }
.p-top h1 { margin-bottom: 2px; }
.p-sub { color: var(--muted); font-size: 15px; }
.p-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 22px; padding: 4px; border-bottom: 1px solid var(--line); }
.p-nav::-webkit-scrollbar { display: none; }
.p-nav a { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #475569; white-space: nowrap; transition: background .15s, color .15s; }
.p-nav a svg { width: 18px; height: 18px; }
.p-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.p-nav a.on { background: var(--blue); color: #fff; }
/* Marca sobre el ícono: cantidad (eventos, pedidos) o "!" (perfil) */
.p-nav a { position: relative; }
.p-badge { position: absolute; top: 2px; left: 21px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.p-badge.warn { background: #f59e0b; }
.p-nav a.on .p-badge { box-shadow: 0 0 0 2px var(--blue); }
.p-nav a.p-nav-shop { margin-left: auto; color: var(--blue); border: 1px solid #cfe0f5; }
.p-nav a.p-nav-shop:hover { background: #eff6ff; }
.p-panel[hidden] { display: none; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.p-head h2 { margin-bottom: 0; }
#credentialCard { text-align: center; }
#credentialCard .credential { margin-top: 16px; }
@media (max-width: 640px) {
  .p-nav { margin-left: -24px; margin-right: -24px; padding-left: 20px; padding-right: 20px; }
  .p-nav a.p-nav-shop { margin-left: 0; }
}

/* Portal: mis pedidos de la tienda */
.my-orders { display: grid; gap: 10px; margin-top: 12px; }
.mo { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mo summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.mo summary::-webkit-details-marker { display: none; }
.mo summary::after { content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: url("/assets/img/chevron-down.svg") center / 16px no-repeat; transition: transform .15s; }
.mo[open] summary::after { transform: rotate(180deg); }
.mo-head { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mo-head small { color: var(--muted); font-size: 13px; }
.mo-total { white-space: nowrap; }
.mo-status { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #f1f5f9; color: #64748b; }
.mo-status.pending { background: #fef3c7; color: #92400e; }
.mo-status.confirmed { background: #dcfce7; color: #166534; }
.mo-status.delivered { background: #e0e7ff; color: #3730a3; }
.mo-status.cancelled, .mo-status.expired { background: #fee2e2; color: #991b1b; }
.mo-hint { margin: 0 14px 8px; font-size: 14px; color: var(--muted); }
.mo-items { list-style: none; margin: 0; padding: 0 14px; display: grid; gap: 8px; }
.mo-item { display: flex; align-items: center; gap: 10px; }
.mo-item img, .mo-noimg { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: 0 0 44px; border: 1px solid var(--line); }
.mo-noimg { display: flex; align-items: center; justify-content: center; background: var(--bg-soft); color: #94a3b8; }
.mo-noimg svg { width: 20px; height: 20px; }
.mo-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.mo-name small { color: var(--muted); font-size: 13px; }
.mo-sum { display: flex; justify-content: space-between; margin: 10px 14px 0; padding: 10px 0 12px; border-top: 1px solid var(--line); font-size: 15px; }
@media (max-width: 640px) {
  .mo summary { flex-wrap: wrap; }
  .mo-head { flex-basis: 100%; }
}

/* Portal: lista de eventos */
.pev-list { display: grid; gap: 10px; margin-top: 14px; }
.pev { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pev-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pev-name { font-weight: 800; color: var(--ink); }
.pev-name:hover { color: var(--blue); }
.pev-info > span { font-size: 14px; color: var(--muted); }
.pev-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pev-tags:empty { display: none; }
.pev-tags .tag { margin-left: 0; }
.pev .btn, .pev > .reg-chip { flex-shrink: 0; }

@media (max-width: 640px) {
  .reg-box { padding: 20px 16px; }
  .pev { flex-wrap: wrap; }
  .pev .btn, .pev > .reg-chip { width: 100%; justify-content: center; text-align: center; }
}

/* Portal como app: aviso para instalar y credencial guardada */
.install-box { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }
.install-box[hidden] { display: none; }
.install-box img { width: 48px; height: 48px; }
.install-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; color: var(--muted); min-width: 0; }
.install-text b { color: var(--ink); font-size: 15px; }
.install-actions { display: flex; gap: 8px; }
@media (max-width: 640px) {
  .install-box { grid-template-columns: 48px 1fr; }
  .install-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.saved-cred { text-align: center; margin-top: 4px; font-size: 14px; }
.saved-cred a { color: var(--blue); font-weight: 600; }
#offlineView .credential { justify-items: center; margin: 0 0 18px; }

/* ---------- Gestión de torneos (socios responsables) ---------- */
.mg-toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 120; pointer-events: none; background: var(--blue-deep); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(10,37,64,.3); max-width: calc(100vw - 32px); text-align: center; }
.mg-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }
.mg-field { display: block; font-weight: 600; font-size: 14px; color: #334155; margin-bottom: 12px; }
.mg-field small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.mg-field input, .mg-field select { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid #d5dce6; border-radius: 10px; font: inherit; font-weight: 400; background-color: #fff; }
.mg-field select { -webkit-appearance: none; appearance: none; padding-right: 40px; background: #fff url("/assets/img/chevron-down.svg") no-repeat right 14px center / 16px; cursor: pointer; }
.mg-field input:focus, .mg-field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,119,224,.15); }
.mg-field select:disabled { background-color: var(--bg-soft); color: var(--muted); cursor: default; }
.mg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* minmax(0, …): las filas no se ensanchan con un nombre largo (pasa a otra línea). */
.mg-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
.mg-row, .mg-rank, .mg-rank summary { min-width: 0; }
.mg-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; }
.mg-row:hover { border-color: #b9d3f3; background: var(--bg-soft); }
.mg-row.static { cursor: default; }
.mg-row.static:hover { border-color: var(--line); background: #fff; }
.mg-row.scored { border-color: #bbf7d0; background: #f7fdf9; }
.mg-num { flex: 0 0 auto; min-width: 46px; text-align: center; font-weight: 800; font-size: 14px; color: var(--blue); background: #eff6ff; border-radius: 8px; padding: 6px 8px; }
.mg-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mg-who b { overflow-wrap: anywhere; line-height: 1.25; }
.mg-who small { color: var(--muted); font-size: 13px; }
.mg-pending { color: var(--blue); font-weight: 700; font-size: 14px; white-space: nowrap; }
.mg-done { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; color: #166534; }
.mg-done small { color: var(--muted); font-size: 12px; }
.mg-edit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.mg-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: #f1f5f9; color: #475569; }
.mg-status.dq { background: #fef2f2; color: #b91c1c; }

/* Formulario a pantalla completa (en el teléfono sube desde abajo) */
body.mg-locked { overflow: hidden; }
.mg-sheet { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.55); display: flex; align-items: flex-end; justify-content: center; }
.mg-sheet-box { background: #fff; width: 100%; max-width: 560px; max-height: 94vh; max-height: 94dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 20px 0; }
.mg-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.mg-sheet-head h2 { font-size: 20px; line-height: 1.25; }
.mg-sheet-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.mg-close { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--bg-soft); color: #475569; font-size: 24px; line-height: 1; cursor: pointer; }
.mg-sheet .form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.mg-sheet .hint { font-size: 13px; color: var(--muted); }
input.mg-time { font-size: 28px; font-weight: 700; text-align: center; }
.mg-counters { display: grid; gap: 8px; margin: 6px 0 12px; }
.mg-counter { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 8px 14px; }
.mg-counter-label { display: flex; flex-direction: column; min-width: 0; }
.mg-counter-label b { font-size: 16px; }
.mg-counter-label small { color: var(--muted); font-size: 12px; }
.mg-counter-ctl { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mg-counter-ctl button { width: 46px; height: 46px; border-radius: 12px; border: 1px solid #cfe0f5; background: #eff6ff; color: var(--blue); font-size: 26px; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; }
.mg-counter-ctl button:active { background: #dbeafe; }
.mg-counter-ctl input { width: 58px; height: 46px; text-align: center; font: inherit; font-size: 20px; font-weight: 700; border: 1px solid #d5dce6; border-radius: 10px; -moz-appearance: textfield; appearance: textfield; }
.mg-counter-ctl input::-webkit-outer-spin-button, .mg-counter-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mg-live { display: flex; flex-wrap: wrap; gap: 6px 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 14px; }
.mg-live.ok { background: #f0fdf4; border-color: #bbf7d0; }
.mg-live.warn { background: #fffbeb; border-color: #fde68a; }
.mg-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 4px 0 12px; }
.mg-check input { width: 18px; height: 18px; }
.mg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mg-actions .btn { justify-content: center; }
.mg-sheet .mg-actions .btn-primary { flex: 1 1 200px; }
/* Los botones del formulario quedan siempre a la vista, al pie. */
.mg-sheet .mg-actions { position: sticky; bottom: 0; background: #fff; margin-top: 8px; padding: 12px 0 20px; border-top: 1px solid var(--line); }
.btn.mg-danger { color: #b91c1c; border-color: #fecaca; }
.btn.mg-danger:hover { background: #fef2f2; }

.mg-group select { margin-top: 0; width: auto; }
.mg-rank { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mg-rank summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.mg-rank summary::-webkit-details-marker { display: none; }
.mg-place { flex: 0 0 auto; min-width: 46px; text-align: center; font-weight: 800; font-size: 18px; }
.mg-rank.dq .mg-place { color: #b91c1c; font-size: 14px; }
.mg-rank.dnf .mg-place { color: #b45309; font-size: 14px; }
.mg-total { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.mg-total small { color: var(--muted); font-size: 12px; }
.mg-stages { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 6px; font-size: 13px; }
.mg-stages li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 6px; }
.mg-stages em { color: var(--muted); }
.mg-qr { text-align: center; }
.mg-qr img { display: block; width: 260px; max-width: 100%; height: auto; margin: 14px auto; border: 1px solid var(--line); border-radius: 12px; }
.mg-url { font-size: 13px; color: var(--muted); word-break: break-all; }
.mg-qr .mg-actions { justify-content: center; }
@media (min-width: 700px) {
  .mg-sheet { align-items: center; }
  .mg-sheet-box { border-radius: 20px; }
}

/* ---------- Resultados en vivo (página pública del QR) ---------- */
.wrap.pr { max-width: 720px; }
.pr-form { max-width: 420px; margin-top: 22px; }
.pr-form input { font-size: 24px; font-weight: 700; text-align: center; }
.pr-me { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.pr-me b { font-size: 20px; }
.pr-me small { display: block; color: var(--muted); font-size: 14px; }
.pr-place { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 14px; }
.pr-place b { font-size: 48px; font-weight: 800; line-height: 1; color: var(--blue); }
.pr-place span { color: var(--muted); }
.pr-place.dq b { color: #b91c1c; }
.pr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pr-stat { display: flex; flex-direction: column; background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; }
.pr-stat small { color: var(--muted); font-size: 12px; }
.pr-stat b { font-size: 18px; }
.pr-stat span { color: var(--muted); font-size: 12px; }
.pr-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pr-stage-head h3 { margin: 0; color: var(--ink); }
.pr-stage.pending .pr-stage-head { margin-bottom: 0; }
.pr-stage.pending h3 { color: var(--muted); }
.pr-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.pr-chip.on { background: #eff6ff; color: var(--blue); }
.pr-chip.dq { background: #fef2f2; color: #b91c1c; }
.pr-hits { font-size: 13px; color: var(--muted); margin-top: 10px; }
.pr-updated { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.pr-none { color: var(--muted); }

/* Gestión: motivo de descalificación, código de acceso */
.mg-field textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid #d5dce6; border-radius: 10px; font: inherit; font-weight: 400; resize: vertical; }
.mg-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,119,224,.15); }
.mg-dq-list { margin-top: 22px; }
.mg-dq-list h3 { margin: 0 0 8px; color: #b91c1c; }
.mg-code-box { margin: 14px auto 18px; padding: 16px; max-width: 360px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 10px; justify-items: center; }
.mg-code-box small { color: var(--muted); }
.mg-code { display: flex; gap: 8px; }
.mg-code span { width: 44px; height: 56px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #cfe0f5; border-radius: 10px; font-size: 28px; font-weight: 800; color: var(--blue-deep); }
.pr-form input.pr-code { letter-spacing: .5em; text-indent: .5em; }

/* Gestión: finalizar y archivos de resultados */
.mg-finish p { margin-bottom: 12px; }
.mg-finish.done { border-color: #bbf7d0; background: #f7fdf9; }
.mg-docs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.results-docs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.results-docs p { margin: 0; font-size: 14px; }

/* Portal: en pantallas anchas la barra de secciones pasa a otra línea (no se corta);
   en el teléfono sigue desplazándose de costado. */
@media (min-width: 900px) {
  .p-nav { flex-wrap: wrap; overflow: visible; row-gap: 6px; gap: 2px; padding-top: 10px; }
  .p-nav a { padding: 9px 11px; }
  .p-nav a.p-nav-shop { margin-left: auto; }
}
