/* Tipografía: Archivo variable (ancho 62–125 %). El ancho condensado da el carácter de marcador. */
/* Marca: Chakra Petch Bold itálica (SIL Open Font License) */
@font-face {
  font-family: 'Marca';
  src: url('/static/fonts/chakra-petch-latin-700-italic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/static/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
}

:root {
  --court: #1b4fb8;       /* azul de pista */
  --court-deep: #123a8c;
  --ink: #0c1a33;         /* azul tinta, el marcador */
  --surround: #eaf0f9;    /* zona exterior de la cancha */
  --rule: #d2dff0;
  --muted: #526381;
  --ball: #e4f240;        /* amarillo pelota, sólo acento */
  --alert: #c93a26;
  --ok: #17784a;
  --white: #fff;
  --r-card: 12px;
  --display: 'Archivo', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.5 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--surround);
  padding-bottom: 76px; /* barra inferior en celular */
}
a { color: var(--court); }
:focus-visible { outline: 3px solid var(--court); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 8px; background: #fff; padding: 8px 12px; z-index: 20; }

/* ---------- Encabezado y navegación ---------- */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--court); }
.top .in { max-width: 1040px; margin: auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 1.35rem/1 var(--display); font-stretch: 70%; letter-spacing: .01em; margin-right: auto; }
.brand span { font-family: 'Marca', var(--display); font-weight: 700; font-style: italic; font-stretch: normal; text-transform: uppercase; letter-spacing: .03em; font-size: 1.55rem; }
.brand svg { flex: none; }
.dnav { display: none; gap: 4px; }
.dnav a { color: #c9d6ee; text-decoration: none; padding: 8px 12px; border-radius: 99px; font-weight: 500; }
.dnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.dnav a[aria-current="page"] { color: var(--ink); background: var(--ball); font-weight: 700; }
.who { display: flex; align-items: center; gap: 10px; }
.who form { margin: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--court); color: #fff; display: grid; place-items: center; font: 700 .85rem/1 var(--display); }
.linkbtn { background: none; border: 0; color: #c9d6ee; font: inherit; cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
.login { color: var(--ink); background: var(--ball); text-decoration: none; font-weight: 700; padding: 7px 16px; border-radius: 99px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid var(--rule); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); }
.bar a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 9px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 500; position: relative; }
.bar a svg { width: 24px; height: 24px; }
.bar a[aria-current="page"] { color: var(--court); font-weight: 700; }
.bar a[aria-current="page"]::before { content: ''; position: absolute; top: 0; width: 36px; height: 3px; border-radius: 0 0 3px 3px; background: var(--court); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--alert); color: #fff; font: 700 .72rem/18px var(--display); text-align: center; }

main { max-width: 1040px; margin: auto; padding: 14px 16px 24px; }
footer { max-width: 1040px; margin: 0 auto; padding: 8px 16px 28px; color: var(--muted); font-size: .88rem; }
footer a { color: var(--muted); }

@media (min-width: 820px) {
  body { padding-bottom: 0; }
  .bar { display: none; }
  .dnav { display: flex; }
  main { padding-top: 24px; }
}

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--display); font-stretch: 68%; font-weight: 800; line-height: 1; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: 1.85rem; margin: 34px 0 14px; }
h3 { font-size: 1.35rem; margin: 22px 0 10px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 2px solid var(--court); border-radius: 99px; background: var(--court); color: #fff; font: 700 1rem/1 'Archivo', sans-serif; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--court-deep); border-color: var(--court-deep); }
.btn.ball { background: var(--ball); border-color: var(--ball); color: var(--ink); }
.btn.ball:hover { background: #d6e52e; border-color: #d6e52e; }
.btn.ghost { background: transparent; color: var(--court); }
.btn.ghost:hover { background: #fff; }
.btn.danger { background: transparent; color: var(--alert); border-color: var(--alert); }
.btn.danger:hover { background: #fdeeea; }
.btn.light { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn.light:hover { background: rgba(255, 255, 255, .12); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack > * + * { margin-top: 12px; }
form { margin: 0; }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .88rem; margin-top: 4px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid #aebfdb; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(27, 79, 184, .3); border-color: var(--court); }
input::placeholder { color: #8b9ab4; }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 14px; background: #fff; border: 1px solid var(--rule); border-left: 5px solid var(--court); }
.notice.err { border-left-color: var(--alert); background: #fff6f4; }
.notice.ok { border-left-color: var(--ok); }

/* ---------- Superficies ---------- */
.card { background: #fff; border: 1px solid var(--rule); border-radius: var(--r-card); padding: 16px; margin: 0 0 12px; }
.card > :last-child { margin-bottom: 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; background: #fff; border: 1px solid var(--rule); font-size: .84rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chip.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.chip.warn { background: #fff7d6; border-color: #eadb86; }
.chip.bad { background: #fdeeea; border-color: #f2c2b8; color: #8f2514; }
.chip.ok { background: #e6f5ec; border-color: #b5dfc6; color: #115a37; }

/* ---------- Portada ---------- */
.hero { position: relative; overflow: hidden; background: var(--court); color: #fff; border-radius: 20px; padding: 30px 22px 28px; margin: 4px 0 8px; isolation: isolate; }
.hero h1 { max-width: 9ch; font-size: clamp(2.9rem, 12vw, 5.2rem); line-height: .9; }
.hero p { max-width: 36ch; margin: 14px 0 20px; color: #dbe7ff; font-size: 1.05rem; }
.hero .court { position: absolute; z-index: -1; right: -40px; bottom: -34px; width: min(440px, 92%); height: auto; }
.court path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-opacity: .4; stroke-dasharray: 1; stroke-dashoffset: 0; }
.court .net { stroke-dasharray: 5 4; stroke-opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .court path:not(.net) { animation: draw 1.6s cubic-bezier(.4, 0, .2, 1) both; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}
@media (min-width: 820px) {
  .hero { padding: 48px 44px 44px; }
  .hero h1 { max-width: 12ch; }
  .hero { min-height: 430px; }
  .hero .court { width: min(540px, 52%); right: -30px; bottom: -40px; }
}
.todo { display: inline-flex; align-items: center; gap: 12px; background: rgba(12, 26, 51, .55); padding: 10px 10px 10px 16px; border-radius: 99px; text-decoration: none; color: #fff; font-weight: 600; }
.todo b { background: var(--ball); color: var(--ink); border-radius: 99px; min-width: 28px; height: 28px; display: grid; place-items: center; font: 800 1rem/1 var(--display); padding: 0 8px; }

.cols { display: grid; gap: 0 28px; }
@media (min-width: 820px) { .cols { grid-template-columns: 1.15fr 1fr; align-items: start; } }

/* ---------- Torneos ---------- */
.tlist { display: grid; gap: 10px; }
.tcard { display: grid; grid-template-columns: 68px 1fr; gap: 14px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px; color: inherit; text-decoration: none; transition: border-color .15s; }
.tcard:hover { border-color: var(--court); }
.tcard h3 { margin: 0 0 6px; font-size: 1.5rem; }
.date { align-self: start; background: var(--court); color: #fff; border-radius: 8px; height: 68px; display: grid; align-content: center; justify-items: center; line-height: 1; }
.date b { font: 800 2rem/1 var(--display); font-stretch: 68%; }
.date span { font-size: .78rem; font-weight: 600; margin-top: 3px; text-transform: lowercase; }
.date.live { background: var(--ink); }
.date.live span { font-size: .8rem; text-align: center; padding: 0 4px; margin: 0; }
.date.off { background: #8c9ab2; }
.tmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.spots { display: grid; gap: 4px; }
progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: #dbe6f6; }
progress::-webkit-progress-bar { background: #dbe6f6; }
progress::-webkit-progress-value { background: var(--court); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--court); }

.back { display: inline-block; margin-bottom: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--court); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 8px; }
.facts div { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 14px; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 2px 0 0; font: 800 1.5rem/1.1 var(--display); font-stretch: 68%; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.champ { background: var(--ink); color: #fff; border-radius: var(--r-card); padding: 18px 20px; margin: 14px 0; display: flex; align-items: center; gap: 16px; }
.champ .ballmark { width: 42px; height: 42px; flex: none; }
.champ small { display: block; color: #c9d6ee; }
.champ strong { font: 800 2rem/1 var(--display); font-stretch: 68%; }

/* ---------- Marcador de transmisión ---------- */
.sbs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.sb { background: var(--ink); color: #fff; border-radius: 6px; overflow: hidden; font-variant-numeric: tabular-nums; }
.sb-row { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 46px; padding-left: 14px; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .82); }
.sb-row:first-child { border-top: 0; }
.sb-row.win { color: #fff; font-weight: 800; }
.sb-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: inherit; }
.sb-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-mark { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sb-row.win .sb-mark { background: var(--ball); }
.sb-sets { display: flex; align-self: stretch; }
.sb-set { width: 46px; display: grid; place-items: center; font: 700 1.45rem/1 var(--display); font-stretch: 70%; background: rgba(255, 255, 255, .06); border-left: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .55); }
.sb-set.w { color: #fff; background: rgba(255, 255, 255, .15); }
.sb-set.wo { width: auto; padding: 0 12px; font-size: 1.1rem; color: var(--ball); }
.sb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(255, 255, 255, .08); color: #c9d6ee; font-size: .86rem; }
.sb-foot .tag { background: var(--ball); color: var(--ink); font-weight: 700; padding: 1px 9px; border-radius: 99px; }
.sb-foot .tag.bad { background: #ffb4a6; }
.sb.dim { opacity: .75; }

/* ---------- Posiciones y ranking ---------- */
.stand { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; font-variant-numeric: tabular-nums; }
.stand th { text-align: center; font-weight: 600; color: var(--muted); font-size: .85rem; padding: 8px 6px; border-bottom: 1px solid var(--rule); background: #f6f9fe; }
.stand th:nth-child(2) { text-align: left; }
.stand td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--rule); }
.stand tr:last-child td { border-bottom: 0; }
.stand td:first-child { width: 38px; font: 800 1.2rem/1 var(--display); font-stretch: 68%; color: var(--court); }
.stand td:nth-child(2) { text-align: left; font-weight: 600; }
.stand tr.adv td:first-child { box-shadow: inset 4px 0 0 var(--ball); }
.stand tr.me td { background: #eef4ff; }
.legend { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: .86rem; }
.legend i { width: 4px; height: 16px; background: var(--ball); border-radius: 2px; box-shadow: 0 0 0 1px #d4e03a; }
.groups { display: grid; gap: 22px; }

.bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.round { flex: 0 0 min(300px, 84%); scroll-snap-align: start; display: grid; align-content: space-around; gap: 12px; }
.round h3 { margin: 0 0 2px; font-size: 1.2rem; color: var(--muted); }
@media (min-width: 820px) { .bracket { margin: 0; padding: 0 0 10px; } }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid var(--rule); border-radius: 99px; padding: 4px; margin: 0 0 14px; }
.tabs a { padding: 7px 16px; border-radius: 99px; text-decoration: none; color: var(--muted); font-weight: 600; }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }

.rk { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; }
.rk li { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--rule); }
.rk li:first-child { border-top: 0; }
.rk-pos { font: 800 1.7rem/1 var(--display); font-stretch: 68%; color: var(--court); text-align: center; }
.rk li.first .rk-pos { width: 38px; height: 38px; border-radius: 50%; background: var(--ball); color: var(--ink); display: grid; place-items: center; font-size: 1.4rem; }
.rk-name { font-weight: 700; line-height: 1.2; }
.rk-name small { display: block; font-weight: 400; color: var(--muted); }
.rk-pts { font: 800 1.7rem/1 var(--display); font-stretch: 68%; text-align: right; font-variant-numeric: tabular-nums; }
.rk-pts small { display: block; font: 400 .78rem/1.2 'Archivo', sans-serif; color: var(--muted); }
.rk li.me { background: #eef4ff; box-shadow: inset 4px 0 0 var(--court); }

/* ---------- Mis partidos ---------- */
.mcard { background: #fff; border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px; margin: 0 0 12px; }
.mhead { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.mhead strong { font: 800 1.2rem/1.1 var(--display); font-stretch: 68%; }
.due { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.due b { font-weight: 700; }
.due .late { color: var(--alert); font-weight: 600; }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--court); font-weight: 600; padding: 4px 0; }
details.walk summary { color: var(--alert); }
details[open] > summary { margin-bottom: 8px; }
.empty { background: #fff; border: 1px dashed #aebfdb; border-radius: var(--r-card); padding: 22px; text-align: center; color: var(--muted); }

/* ---------- Aliados, reglas, tablas ---------- */
.spons { display: flex; flex-wrap: wrap; gap: 10px; }
.spons > a, .spons > span { display: block; padding: 12px 18px; border: 1.5px dashed #9fb4d6; border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.spons small { display: block; color: var(--muted); }
.prose { max-width: 66ch; }
.prose h3 { margin-top: 28px; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .85rem; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.formcard { max-width: 460px; margin: 18px auto; }
.formcard h1 { margin-bottom: 18px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: 150px; min-height: 38px; }

/* utilidades */
.mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; } .m0 { margin-bottom: 0; }
@media (max-width: 819px) { .hero .court { opacity: .35; } }

a.plain { color: inherit; text-decoration: none; } a.plain:hover { text-decoration: underline; }
.rk-name a { color: inherit; text-decoration: none; } .rk-name a:hover { text-decoration: underline; }
.hist { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.hist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--rule); }
.hist li:first-child { border-top: 0; }
.hist .res { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e7ecf5; color: var(--muted); font-weight: 700; font-size: .85rem; }
.hist li.won .res { background: var(--ball); color: var(--ink); }
.hist small { display: block; color: var(--muted); }
.hist .sc { font-variant-numeric: tabular-nums; font-weight: 600; }
.btn svg { width: 18px; height: 18px; flex: none; }
.tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; padding: 7px 13px; font-size: .95rem; }
a.avatar { text-decoration: none; }
.tabs { gap: 2px; } .tabs a { padding: 7px 10px; font-size: .9rem; }

/* Casilla de aceptación (registro, cancelar torneo) */
.check, .field label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; line-height: 1.4; cursor: pointer; }
.check input, .field .check input { width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; margin: .15rem 0 0; flex: none; accent-color: #1a4fc0; }
footer a { white-space: nowrap; }

/* Selector de zona */
.picker { display: flex; gap: 8px; align-items: center; }
.picker select { min-height: 40px; max-width: 220px; padding: 0 10px; }
.row.between { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.tmeta a.chip { text-decoration: none; }

/* Niveles con descripción */
.levels { border: 0; margin: 0; padding: 0; }
.levels legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.lvl { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid #aebfdb; border-radius: 10px; margin-bottom: 6px; cursor: pointer; background: #fff; font-weight: 400; }
.field label.lvl { display: flex; margin-bottom: 6px; }
.lvl input, .field .lvl input { width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; margin: .2rem 0 0; flex: none; accent-color: #1a4fc0; }
.lvl strong { display: block; }
.lvl small { display: block; color: var(--muted, #5b6b85); line-height: 1.35; }
.lvl:has(input:checked) { border-color: #1a4fc0; background: #eef3fd; }

/* Cuestionario de nivel */
.quiz { margin-bottom: 18px; }
.quiz legend { margin-bottom: 8px; }
.lvl-big { font-size: 3rem; font-weight: 800; line-height: 1; margin: 4px 0 8px; }
.result { border: 2px solid #1a4fc0; scroll-margin-top: 80px; }

/* Pelota que pelotea sobre la cancha del inicio */
.court .rally circle { fill: var(--ball); }
.court .rally .hop path { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-opacity: .7; stroke-dasharray: none; animation: none; }
.court .rally .shadow { fill: #0c1a33; opacity: .35; }
.court .rally { transform: translate(300px, 120px); }
@media (prefers-reduced-motion: no-preference) {
  .court .rally { opacity: 0; animation: rally 7s 1.7s cubic-bezier(.45, .05, .55, .95) infinite; }
  .court .rally .hop { animation: hop 7s 1.7s ease-in-out infinite; }
  @keyframes rally {
    0%   { opacity: 0; transform: translate(352px, 40px); }
    3%   { opacity: 1; }
    12%  { transform: translate(58px, 138px); }
    24%  { transform: translate(330px, 122px); }
    36%  { transform: translate(52px, 46px); }
    48%  { transform: translate(318px, 64px); }
    51%  { opacity: 1; }
    56%, 100% { opacity: 0; transform: translate(300px, 64px); }
  }
  @keyframes hop {
    0%, 12%, 24%, 36%, 48%, 100% { transform: scale(1) translateY(0); }
    6%, 18%, 30%, 42% { transform: scale(1.55) translateY(-9px); }
  }
}

/* Marcador del inicio (pantallas anchas) */
.board { display: none; }
@media (min-width: 820px) {
  .board { display: block; position: absolute; top: 44px; right: 44px; width: 236px; background: rgba(12, 26, 51, .88); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 14px 16px 12px; box-shadow: 0 12px 30px rgba(7, 17, 38, .35); }
  .board-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .board-head span { font-family: 'Marca', var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; }
  .board-head i { width: 9px; height: 9px; border-radius: 50%; background: var(--ball); box-shadow: 0 0 0 4px rgba(228, 242, 64, .18); }
  .sb-line { display: flex; align-items: baseline; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); }
  .sb-line span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #b9c9ea; }
  .sb-line b { font: 700 1.9rem/1 'Marca', var(--display); font-style: italic; color: var(--ball); font-variant-numeric: tabular-nums; }
  .board p { margin: 9px 0 0; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #8fa6d6; max-width: none; }
}

/* Rama */
.branch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.branch legend { grid-column: 1 / -1; }
.branch .lvl { margin-bottom: 0; align-items: center; }
.chip.rama-f { background: #fde7f1; color: #8a1650; border-color: #f6bfd8; }
.chip.rama-m { background: #e3ecfd; color: #123a8c; border-color: #bcd0f6; }

/* Crear torneos: varias categorías y ramas a la vez */
.multi { margin-bottom: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid #aebfdb; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.field label.opt { display: inline-flex; margin: 0; }
.opt input { width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 0; accent-color: #1a4fc0; }
.opt:has(input:checked) { border-color: #1a4fc0; background: #eef3fd; }
.multi .small { margin: 8px 0 0; }

/* Dobles */
.chip.rama-x { background: #efe6fd; color: #4b1f8f; border-color: #d4c1f6; }
.chip.dobles { background: #0c1a33; color: #e4f240; border-color: #0c1a33; }
.tabrow { display: flex; flex-wrap: wrap; gap: 8px; }
.tabrow .tabs { margin: 0; }
.team { white-space: nowrap; }
.filters { display: grid; gap: 8px; margin-top: 18px; scroll-margin-top: 80px; }
.filters .tabs { margin: 0; }
.rk-name > span a { color: inherit; }

/* Flyer */
.flyers { display: grid; gap: 18px; }
@media (min-width: 760px) { .flyers { grid-template-columns: 1fr 1fr; align-items: start; } }
.flyer { display: grid; gap: 12px; }
.flyer img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 24px rgba(12, 26, 51, .18); background: #0c1a33; }
.flyer .row { gap: 8px; flex-wrap: wrap; }

/* Registrados por zona */
.zone-stats summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; cursor: pointer; }
.zone-stats table { margin-top: 10px; }
.stats td small { display: block; font-size: .72rem; color: var(--muted, #5b6b85); }
.stats td.ok { background: #e6f6ea; }
.stats td.ok small { color: #1b7a3a; font-weight: 600; }
.stats td.near b { color: #123a8c; }
.stats tr.sum th, .stats tr.sum td { border-top: 2px solid #c9d6f2; }
.picker input[type=number] { width: 80px; min-height: 40px; }

/* RTA Masters y campeones */
.masters { margin-top: 18px; padding: 18px 18px 14px; border-radius: 16px; background: linear-gradient(160deg, #1a4fc0, #0c1a33); color: #fff; }
.masters p { margin: 8px 0 0; line-height: 1.45; }
.masters a { color: #e4f240; }
.masters .m-head { display: flex; flex-direction: column; }
.masters .m-kicker { color: #e4f240; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.masters strong { font: 800 1.9rem/1.05 var(--display); font-stretch: 68%; }
.masters .m-clock { font-size: .86rem; color: #c9d6f2; }
.mtag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #e4f240; color: #0c1a33; font-size: .68rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.rk li.cutline { border-bottom: 2px dashed #e4b800; }
.chip.trophy { background: #fff7cc; border-color: #f0d75a; color: #5c4700; text-decoration: none; }
.champs td { vertical-align: top; }
.chip.masters-chip { background: linear-gradient(135deg, #f7d85c, #e4b800); color: #3d2f00; border-color: #e4b800; font-weight: 700; }
.qlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.qlist li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.08); }
.qlist .rk-pos { font-size: 1.2rem; color: #e4f240; }
.qlist a { color: #fff; }
.qlist .okc { color: #e4f240; font-weight: 700; }
.masters-f .check { margin-top: 4px; }

/* Contacto: campo trampa para robots y bandeja del admin */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg p { margin: 0 0 6px; }
.msg-body { white-space: pre-wrap; background: var(--bg, #f4f6fa); border-radius: 8px; padding: 8px 10px; }
textarea { padding: 10px 14px; resize: vertical; }

/* Zona que se está armando */
.building h3 { margin: 0 0 6px; }
.building p { margin: 0 0 10px; }
.meter { display: block; width: 100%; height: 12px; }
.meter .m-bg { fill: #e3e9f4; } .meter .m-fg { fill: var(--court); }

/* Aviso de torneos nuevos en la zona */
.notice.opening { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.notice.opening > span { flex: 1 1 220px; }
.notice.opening form { margin: 0; }
.notice .linkbtn { color: var(--muted); }

/* Canal de WhatsApp */
.card.channel h3 { margin: 0 0 6px; }
.wa-channel { border-color: #1fa855; color: #12753b; }
.btn.block.wa-channel { background: #1fa855; color: #fff; }
.post textarea { font-size: 14px; line-height: 1.4; }

/* Selector de deporte (Tenis | Pádel) en el encabezado */
.sports { display: flex; background: rgba(255, 255, 255, .1); border-radius: 99px; padding: 3px; flex: none; }
.sports a { color: #c9d6ee; text-decoration: none; padding: 6px 11px; border-radius: 99px; font-weight: 600; font-size: .86rem; line-height: 1; }
.sports a[aria-current="true"] { background: #fff; color: var(--ink); }
@media (max-width: 420px) {
  .top .in { gap: 10px; }
  .brand span { font-size: 1.3rem; }
  .sports a { padding: 6px 9px; font-size: .8rem; }
}

/* Cancha de pádel: las paredes de cristal se marcan un poco más */
.court .glass { stroke-width: 4.5; stroke-opacity: .55; }
footer .assoc { opacity: .75; font-size: .92em; }

.chip.club-chip { background: var(--surround); border-color: var(--rule); color: var(--court-deep); }
