/* Torneos de los Sábados — estilos compartidos (sitio público, /resultados y /admin).
   Diseño aprobado en el lienzo: blanco cálido, carbón, lima y verde cancha.
   Tamaños: celular < 760px · iPad 760–1099px · escritorio ≥ 1100px. */

:root {
  --cream: #F7F7F0;
  --ink: #172019;
  --lime: #D5EE54;
  --court: #526B2D;
  --muted: #535C54;
  --line: #D9DACB;
  --line-strong: #C4C7B6;
  --dashed: #A9AD98;
  --hover: #ECEDE0;
  --tint: #EEF5C8;
  --tint-new: #E9F3B5;
  --white: #FFFFFF;
  --on-dark: #F7F7F0;
  --on-dark-soft: #C8CFC4;
  --on-dark-label: #B7C0B3;
  --dark-line: #3A453B;
  --dark-empty: #6E786F;
  --green-line: #6E8549;
  --green-soft: #E4E9DC;
  --alert: #8A2B12;
  --alert-bg: #FBE6DD;

  --f-display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 1440px;
  color-scheme: light;
}
@media (min-width: 760px) { :root { --gutter: max(32px, env(safe-area-inset-left, 0px)); --gutter-r: max(32px, env(safe-area-inset-right, 0px)); } }
@media (min-width: 1100px) { :root { --gutter: 64px; --gutter-r: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 4px; }
a:hover { color: var(--court); }
h1, h2, h3 { text-wrap: balance; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.on-dark :focus-visible, .band-green :focus-visible { outline-color: var(--lime); }
[hidden] { display: none !important; }

.disp { font-family: var(--f-display); font-weight: 900; font-stretch: 125%; letter-spacing: -0.02em; }
.num { font-family: var(--f-display); font-weight: 800; font-stretch: 100%; font-variant-numeric: tabular-nums lining-nums; }
.lbl { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* ---------- animación funcional ---------- */
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes late { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes marca { 0% { background-color: var(--lime); } 100% { background-color: transparent; } }
.entra { animation: entra .35s ease-out; }
.flash { animation: marca 1.4s ease-out; }
.vivo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--court); animation: late 1.6s ease-in-out infinite; flex: none; }
.vivo-dot.osc { background: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .entra, .flash, .vivo-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  background: var(--lime); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px;
  font-size: 17px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--ink); background: #C9E43F; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-dark { background: var(--ink); color: var(--on-dark); }
.btn-dark:hover { background: #26322A; color: var(--on-dark); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 700; }
.btn-block { width: 100%; }
.btn-alert { background: var(--alert-bg); color: var(--alert); border-color: var(--alert); }
.btn-alert:hover { background: #F6D3C5; color: var(--alert); }

.lock {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 0 12px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.lock:hover { background: var(--hover); color: var(--ink); }

/* ---------- cabecera ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-name { font-size: 16px; line-height: 1.05; max-width: 190px; }
.brand-by { font-size: 11px; color: var(--muted); }
.header-side { display: flex; align-items: center; gap: 14px; }
.demo-tag { font-size: 12px; color: var(--muted); }
.demo-line { margin: 0; padding-bottom: 8px; font-size: 11px; color: var(--muted); }
.top-nav { display: none; gap: 8px; align-items: center; }
.navl {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: 6px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink);
}
.navl:hover { background: var(--hover); color: var(--ink); }
.navl[aria-current="page"] { background: var(--lime); }
.header-side .demo-tag { display: none; }

@media (min-width: 760px) {
  .site-header { padding-top: 20px; padding-bottom: 20px; gap: 24px; flex-wrap: wrap; }
  .brand { gap: 12px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 19px; max-width: none; line-height: 1; }
  .brand-by { font-size: 12px; }
  .top-nav { display: flex; }
  .demo-line { margin-top: -12px; }
}
@media (min-width: 1100px) {
  .demo-line { display: none; }
  .header-side .demo-tag { display: inline; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .brand-name { font-size: 17px; }
  .navl { padding: 10px 12px; }
}

/* ---------- barra inferior (celular) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--ink); border-top: 1px solid var(--dark-line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 54px; border-radius: 6px; color: var(--on-dark); text-decoration: none; font-size: 12px; font-weight: 600;
}
.bottom-nav a[aria-current="page"] { background: var(--lime); color: var(--ink); font-weight: 700; }
.bottom-nav a:focus-visible { outline-color: var(--lime); }
body.has-bottom-nav { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) {
  .bottom-nav { display: none; }
  body.has-bottom-nav { padding-bottom: 0; }
}

/* ---------- avisos de estado ---------- */
.notice { padding: 14px 16px; border-radius: 6px; font-size: 15px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.notice-ok { background: var(--cream); color: var(--ink); }
.notice-alert { background: var(--alert-bg); color: var(--alert); border: 1px solid var(--alert); }
.notice-info { background: var(--tint); color: var(--ink); }
.setup { max-width: 720px; margin: 64px auto; }
.field-error { align-self: flex-start; background: var(--lime); color: var(--ink); font-size: 14px; font-weight: 700; padding: 6px 10px; border-radius: 4px; }
.loading { padding: 48px 0; color: var(--muted); }
.example-flag { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--lime); padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- portada ---------- */
.hero { position: relative; padding-top: 18px; }
.hero-copy { position: relative; z-index: 1; }
.kicker { margin: 0 0 14px; color: var(--court); font-size: 11px; }
.hero-h1 { font-size: 56px; line-height: .9; margin: 0; }
.hero-h1 span { display: block; }
.hero-lead { font-size: 16px; line-height: 1.5; margin: 14px 0 0; max-width: 440px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 20px; }
.hero-ball { position: absolute; right: max(10px, env(safe-area-inset-right, 0px)); top: 10px; width: 118px; height: 118px; z-index: 0; }
.hero-art { display: none; }
.court-strip { display: block; width: 100%; height: auto; margin-top: 14px; }
.hero-actions-desk { display: none; }
.hero-mobile-cta { padding-top: 20px; padding-bottom: 8px; }
.hero-mobile-cta .btn { width: 100%; }

@media (min-width: 760px) {
  .hero { min-height: 560px; padding-top: 48px; }
  .hero-ball, .court-strip, .hero-mobile-cta { display: none; }
  .hero-art { display: block; position: absolute; right: 0; top: 40px; width: min(760px, 54vw); height: auto; z-index: 0; }
  .kicker { font-size: 12px; margin-bottom: 24px; }
  .hero-h1 { font-size: clamp(64px, 9.2vw, 132px); line-height: .88; }
  .hero-lead { font-size: 19px; margin-top: 32px; }
  .hero-actions-desk { display: flex; margin-top: 32px; padding-bottom: 56px; }
}
@media (min-width: 1100px) { .hero { min-height: 700px; padding-top: 56px; } }

/* franja oscura */
.band-dark { background: var(--ink); color: var(--on-dark); }
.band-dark a { color: var(--on-dark); }
.franja { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; column-gap: 16px; padding-top: 20px; padding-bottom: 18px; }
.franja > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.franja .lbl { font-size: 11px; color: var(--on-dark-label); }
.franja .big { font-size: 20px; }
.franja .mid { font-size: 15px; font-weight: 700; }
.franja .small { font-size: 13px; color: var(--on-dark-soft); }
.state-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.cupo { border-top: 1px solid var(--dark-line); padding-top: 16px; padding-bottom: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.cupo-count { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.cupo-count .num { font-size: 36px; color: var(--lime); line-height: 1; }
.slots { flex: 1 1 100%; display: flex; gap: 3px; }
.slots span { flex: 1; height: 12px; border-radius: 2px; border: 1.5px solid var(--dark-empty); }
.slots span.on { background: var(--lime); border-color: var(--lime); }
.cupo-total { color: var(--on-dark-soft); font-size: 15px; }
@media (min-width: 760px) {
  .franja { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; padding-top: 0; padding-bottom: 0; }
  .franja > div { padding: 28px 20px 24px; border-left: 1px solid var(--dark-line); gap: 8px; }
  .franja > div:first-child { padding-left: 0; border-left: 0; }
  .franja .big { font-size: 24px; }
  .franja .mid { font-size: 18px; }
  .franja .small { font-size: 15px; }
  .cupo { padding-top: 22px; padding-bottom: 28px; flex-wrap: nowrap; }
  .cupo-count .num { font-size: 44px; }
  .slots { flex: 1 1 420px; gap: 4px; }
  .slots span { height: 14px; }
}
@media (min-width: 1100px) { .franja .big { font-size: 26px; } .franja .mid { font-size: 20px; } }

/* formato */
.section { padding-top: 48px; padding-bottom: 56px; }
.formato-head h2 { font-size: 32px; line-height: 1; margin: 0; }
.formato-head p { margin: 10px 0 0; }
.stats { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
.stat { display: flex; align-items: baseline; gap: 16px; border-top: 4px solid var(--ink); padding: 14px 0 18px; }
.stat.lime { border-top-color: var(--lime); }
.stat .num { font-size: 64px; line-height: .9; width: 128px; flex: none; }
.stat span:last-child { font-size: 17px; font-weight: 600; }
.provisional { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
@media (min-width: 760px) {
  .section { padding-top: 80px; padding-bottom: 88px; }
  .formato { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .formato-head h2 { font-size: 40px; }
  .stats { display: contents; }
  .stat { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 18px; margin: 0; }
  .stat .num { font-size: clamp(64px, 7vw, 96px); width: auto; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .formato { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .formato-head { grid-column: 1 / -1; }
}

/* banda verde: formulario + cómo se juega */
.band-green { background: var(--court); color: var(--on-dark); }
.band-green-inner { padding-top: 48px; padding-bottom: 52px; display: flex; flex-direction: column; gap: 52px; }
.form { display: flex; flex-direction: column; gap: 20px; }
.form h2 { font-size: 38px; line-height: .95; margin: 0; }
.form .intro { margin: 12px 0 0; font-size: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 700; }
.input {
  height: 56px; padding: 0 14px; font-size: 17px; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: 6px; width: 100%;
}
.input.tel { font-variant-numeric: tabular-nums; }
.form-note { margin: 0; font-size: 13px; color: var(--green-soft); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--green-line); }
.steps li:last-child { border-bottom: 1px solid var(--green-line); }
.steps .num { font-size: 24px; line-height: 1.1; color: var(--lime); width: 34px; flex: none; }
.como h2 { font-size: 28px; line-height: 1; margin: 0 0 12px; }
@media (min-width: 760px) {
  .band-green-inner { flex-direction: row; flex-wrap: wrap; gap: 56px; padding-top: 80px; padding-bottom: 88px; }
  .form { flex: 1 1 380px; max-width: 540px; gap: 22px; }
  .form h2 { font-size: 48px; }
  .form .intro { font-size: 17px; }
  .input { height: 58px; font-size: 18px; padding: 0 16px; }
  .como { flex: 1 1 380px; }
  .como h2 { font-size: 36px; margin-bottom: 16px; }
  .steps li { gap: 22px; padding: 20px 0; font-size: 17px; }
  .steps .num { font-size: 32px; width: 44px; }
}
@media (min-width: 1100px) { .band-green-inner { gap: 80px; } }

/* inscritos */
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.list-head h2 { font-size: 34px; line-height: 1; margin: 0; }
.list-head p { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.list-head p .num { font-size: 30px; }
.inscritos { list-style: none; margin: 22px 0 0; padding: 0; border-top: 3px solid var(--ink); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.inscritos li { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.inscritos .n { font-size: 12px; color: var(--muted); width: 20px; flex: none; }
.inscritos .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inscritos li.libre .nm { color: var(--muted); font-weight: 400; }
.inscritos li.nuevo { background: var(--tint-new); }
.espera-note { margin: 20px 0 0; font-size: 15px; }
@media (min-width: 760px) {
  .list-head h2 { font-size: 52px; }
  .list-head p .num { font-size: 40px; }
  .inscritos { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; margin-top: 36px; }
  .inscritos li { min-height: 54px; gap: 14px; padding: 0 8px; }
  .inscritos .n { font-size: 14px; width: 24px; }
  .inscritos .nm { font-size: 17px; }
}
@media (min-width: 1100px) { .inscritos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* organizador */
.organiza { border-top: 3px solid var(--ink); padding-top: 28px; display: flex; gap: 18px; align-items: flex-start; }
.monogram { width: 72px; height: 72px; border-radius: 50%; background: var(--court); color: var(--lime); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.organiza .who { margin: 6px 0 0; font-size: 24px; line-height: 1; }
.organiza p { margin: 10px 0 0; font-size: 15px; }
@media (min-width: 760px) {
  .organiza { padding-top: 40px; gap: 32px; align-items: center; }
  .monogram { width: 112px; height: 112px; font-size: 38px; }
  .organiza .who { font-size: 36px; }
  .organiza p { font-size: 17px; max-width: 620px; }
}

/* pie */
.site-footer { background: var(--ink); color: var(--on-dark); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.site-footer p { margin: 0; }
.site-footer .small { font-size: 12px; color: var(--on-dark-soft); }
@media (min-width: 760px) { .site-footer .wrap { padding-top: 36px; padding-bottom: 36px; } .site-footer .small { font-size: 13px; } }

/* ---------- en vivo ---------- */
.live-band .wrap { padding-top: 22px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: flex-end; justify-content: space-between; }
.live-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.tag-live { background: var(--lime); color: var(--ink); padding: 5px 9px; border-radius: 4px; display: inline-flex; gap: 7px; align-items: center; }
.tag-outline { border: 2px solid var(--lime); color: var(--lime); padding: 4px 9px; border-radius: 4px; display: inline-block; }
.live-band h1 { font-size: 46px; line-height: .95; margin: 0; }
.live-band h1 em { font-style: normal; color: var(--lime); }
.live-meta { font-size: 13px; color: var(--on-dark-soft); }
.progress { flex: 1 1 100%; display: flex; flex-direction: column; gap: 10px; }
.progress-bar { display: flex; gap: 5px; }
.progress-bar span { flex: 1; height: 12px; border: 2px solid var(--dark-empty); border-radius: 2px; overflow: hidden; display: flex; }
.progress-bar span.done, .progress-bar span.cur { border-color: var(--lime); }
.progress-bar i { display: block; background: var(--lime); }
.progress p { margin: 0; font-size: 14px; color: var(--on-dark-soft); }
@media (min-width: 760px) {
  .live-band .wrap { padding-top: 40px; padding-bottom: 44px; }
  .live-band h1 { font-size: clamp(56px, 6vw, 76px); }
  .live-meta { font-size: 15px; }
  .progress { flex: 0 1 460px; }
  .progress-bar span { height: 14px; }
}

.mine { padding-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.mine-pick { display: flex; flex-direction: column; gap: 8px; }
.mine-pick label { font-size: 15px; font-weight: 700; }
.select { height: 54px; padding: 0 12px; font-size: 17px; font-weight: 600; color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: 6px; width: 100%; }
.mine-card { background: var(--lime); padding: 16px; border-radius: 6px; display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.mine-card .t { margin: 0; font-size: 11px; }
.mine-card .l { margin: 6px 0 0; font-size: 20px; line-height: 1.1; }
.mine-card .d { margin: 6px 0 0; font-size: 14px; }
.mine-card .p { text-align: right; flex: none; }
.mine-card .p .num { display: block; font-size: 40px; line-height: 1; }
.mine-card .p span:last-child { display: block; font-size: 12px; font-weight: 600; margin-top: 4px; }
.mine-empty { margin: 0; font-size: 15px; color: var(--muted); }
@media (min-width: 760px) {
  .mine { padding-top: 40px; flex-direction: row; flex-wrap: wrap; gap: 24px 32px; align-items: stretch; }
  .mine-pick { flex: 1 1 300px; max-width: 420px; }
  .mine-card, .mine-empty { flex: 2 1 420px; }
  .mine-card { padding: 20px 24px; align-items: center; flex-wrap: wrap; }
  .mine-card .l { font-size: 26px; }
  .mine-card .d { font-size: 16px; }
  .mine-card .p .num { font-size: 56px; }
  .mine-empty { align-self: center; font-size: 17px; }
}

.round-tabs { padding-top: 24px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.round-tab {
  min-height: 58px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer;
}
.round-tab .num { font-size: 20px; line-height: 1; }
.round-tab .rt-word { display: none; }
.round-tab small { font-size: 10px; font-weight: 700; }
.round-tab.pending { border-style: dashed; border-color: var(--dashed); color: var(--muted); }
.round-tab[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); border-style: solid; border-color: var(--ink); }
@media (min-width: 760px) {
  .round-tabs { padding-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
  .round-tab { min-width: 112px; min-height: 64px; padding: 8px 16px; align-items: flex-start; }
  .round-tab .rt-word { display: inline; }
  .round-tab small { font-size: 12px; font-weight: 600; }
}

.round-head { padding-top: 26px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.round-head h2 { font-size: 28px; line-height: 1; margin: 0; }
.round-head p { margin: 0; font-size: 13px; color: var(--muted); }
@media (min-width: 760px) { .round-head { padding-top: 36px; margin-bottom: 20px; } .round-head h2 { font-size: 40px; } .round-head p { font-size: 16px; } }

.matches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 760px) { .matches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; } }
@media (min-width: 1100px) { .matches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.match { border-top: 4px solid var(--ink); }
.match.mio { background: var(--tint); }
.match-body { display: flex; flex-direction: column; min-width: 0; }
.match-top { order: -1; }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; }
.court-chip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--court); color: var(--on-dark); padding: 4px 10px; border-radius: 4px; }
.court-chip .lbl { font-size: 10px; color: var(--green-soft); }
.court-chip .num { font-size: 22px; line-height: 1; color: var(--lime); }
.match-status { display: inline-flex; align-items: center; gap: 8px; }
.st { font-size: 11px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.st.live { color: var(--court); }
.your-tag { font-size: 10px; background: var(--ink); color: var(--lime); padding: 3px 6px; border-radius: 3px; }
.team { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); }
.team:last-child { padding-bottom: 12px; }
.team-names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team-names span { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-names span.yo { font-weight: 800; text-decoration: underline; text-decoration-color: var(--court); text-decoration-thickness: 3px; }
.score {
  width: 54px; height: 54px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 30px; border-radius: 4px; border: 2px solid var(--line-strong); color: var(--muted);
}
.score.win { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.score.tie { color: var(--ink); border-color: var(--ink); }
.score.live { background: var(--ink); color: var(--lime); border-color: var(--ink); }
@media (min-width: 760px) {
  .match { display: grid; grid-template-columns: 76px minmax(0, 1fr); }
  .match-court { background: var(--court); color: var(--on-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 0; grid-row: 1 / span 3; }
  .match-court .lbl { font-size: 10px; color: var(--green-soft); }
  .match-court .num { font-size: 46px; line-height: 1; color: var(--lime); }
  .match-body { display: flex; flex-direction: column; min-width: 0; }
  .match .court-chip { display: none; }
  .match-top { order: 3; padding: 9px 14px; border-top: 1px solid var(--line); }
  .team { padding: 12px 14px; }
  .team:first-child { border-top: 0; }
  .team-names span { font-size: 16px; }
  .score { width: 60px; height: 60px; font-size: 34px; }
}
@media (max-width: 759px) { .match-court { display: none; } }

.rests { margin-top: 18px; padding: 14px; border: 2px dashed var(--dashed); border-radius: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.rests .lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.rests span.yo { font-weight: 800; text-decoration: underline; text-decoration-color: var(--court); text-decoration-thickness: 3px; }
.rests .note { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
@media (min-width: 760px) { .rests { margin-top: 28px; padding: 16px 18px; } .rests .note { flex: 1 1 auto; text-align: right; } }

.empty-round { border-top: 4px solid var(--ink); border-bottom: 1px solid var(--line); padding: 28px 0; display: flex; flex-wrap: wrap; gap: 12px 64px; align-items: center; }
.empty-round .disp { margin: 0; font-size: 24px; line-height: 1.1; max-width: 560px; }
.empty-round p:last-child { margin: 0; font-size: 15px; max-width: 520px; }
@media (min-width: 760px) { .empty-round { padding: 48px 0; } .empty-round .disp { font-size: 34px; } .empty-round p:last-child { font-size: 17px; } }

/* tablas de clasificación */
.table-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.table-head h2 { font-size: 34px; line-height: 1; margin: 0; }
.table-head p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
@media (min-width: 760px) { .table-head h2 { font-size: 52px; } .table-head p { font-size: 16px; } }
.standings { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 48px; }
@media (min-width: 900px) { .standings.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-head, .st-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px 52px; gap: 6px; align-items: center; padding: 0 8px; }
.st-head { padding-top: 8px; padding-bottom: 8px; border-bottom: 3px solid var(--ink); font-size: 10px; color: var(--muted); }
.st-head span:nth-child(n+3), .st-row span:nth-child(n+3) { text-align: right; }
.st-list { list-style: none; margin: 0; padding: 0; }
.st-row { min-height: 42px; border-bottom: 1px solid var(--line); }
.st-row.yo { background: var(--tint); }
.st-row .pos { font-size: 16px; }
.st-row .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row.yo .nm { font-weight: 800; }
.st-row .pj { font-size: 14px; color: var(--muted); }
.st-row .pts { font-size: 18px; }
@media (min-width: 760px) {
  .st-head, .st-row { grid-template-columns: 56px minmax(0, 1fr) 56px 72px; padding: 0 10px; gap: 8px; }
  .st-head { font-size: 11px; padding-top: 0; padding-bottom: 10px; }
  .st-row { min-height: 46px; }
  .st-row .pos { font-size: 18px; }
  .st-row .nm { font-size: 16px; }
  .st-row .pts { font-size: 20px; }
}

/* ---------- ranking ---------- */
.podium-wrap { padding-top: 32px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin-top: 24px; }
.step { display: flex; flex-direction: column; align-items: stretch; text-align: center; min-width: 0; }
.step .who { padding: 0 4px 10px; display: flex; flex-direction: column; gap: 2px; align-items: center; min-width: 0; }
.step .who .nm { font-weight: 800; font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }
.step .who .pt { font-size: 13px; color: var(--muted); }
.step .block { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 12px; border-radius: 4px 4px 0 0; }
.step .block .num { font-size: 44px; line-height: 1; }
.step.p1 .block { background: var(--lime); color: var(--ink); height: 168px; border: 2px solid var(--ink); border-bottom: 0; }
.step.p2 .block { background: var(--court); color: var(--lime); height: 124px; }
.step.p3 .block { background: var(--ink); color: var(--lime); height: 92px; }
.podium-base { height: 10px; background: var(--ink); }
@media (min-width: 760px) {
  .podium { gap: 16px; max-width: 980px; }
  .step .who .nm { font-size: 22px; }
  .step .who .pt { font-size: 15px; }
  .step .block .num { font-size: 88px; }
  .step.p1 .block { height: 260px; }
  .step.p2 .block { height: 196px; }
  .step.p3 .block { height: 148px; }
}
.search { margin-top: 24px; max-width: 420px; }
.rk-head, .rk-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 48px 56px; gap: 6px; align-items: center; padding: 0 8px; }
.rk-head { padding-top: 8px; padding-bottom: 8px; border-bottom: 3px solid var(--ink); font-size: 10px; color: var(--muted); margin-top: 18px; }
.rk-head span:nth-child(n+3), .rk-row span:nth-child(n+3) { text-align: right; }
.rk-row { min-height: 46px; border-bottom: 1px solid var(--line); }
.rk-row .pos { font-size: 16px; }
.rk-row .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-row .pts { font-size: 18px; }
.move { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; }
.move.up { color: var(--court); }
.move.down { color: var(--alert); }
.move.same { color: var(--muted); }
.move.new { color: var(--ink); }
.rk-row.hit { background: var(--tint); }
@media (min-width: 760px) {
  .rk-head, .rk-row { grid-template-columns: 64px minmax(0, 1fr) 100px 100px 96px; padding: 0 10px; gap: 8px; }
  .rk-head { font-size: 11px; }
  .rk-row { min-height: 52px; }
  .rk-row .pos { font-size: 20px; }
  .rk-row .nm { font-size: 17px; }
  .rk-row .pts { font-size: 22px; }
}
.rk-extra { display: none; }
@media (min-width: 760px) { .rk-extra { display: inline; } }
.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 900px) { .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; } }
.points-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 3px solid var(--ink); }
.points-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.points-list .num { font-size: 20px; }
.history { list-style: none; margin: 16px 0 0; padding: 0; border-top: 3px solid var(--ink); }
.history li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 15px; }
.history .d { font-size: 14px; }
.history .w { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- acceso de Dario y panel ---------- */
.tool-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tool-title { font-size: 22px; line-height: 1; margin: 0; }
.login { max-width: 440px; margin: 48px auto 64px; display: flex; flex-direction: column; gap: 18px; }
.login h1 { font-size: 34px; line-height: 1; margin: 0; }
.login .input { border-color: var(--ink); }

.cap-list { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; padding-bottom: 48px; }
.cap { border-top: 4px solid var(--ink); padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.cap-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cap-teams { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px 12px; align-items: center; }
.cap-teams .names { font-size: 16px; font-weight: 600; line-height: 1.3; }
.cap-teams .vs { grid-column: 1 / -1; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.score-input { width: 92px; height: 72px; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 36px; font-variant-numeric: tabular-nums; border: 3px solid var(--ink); border-radius: 6px; background: var(--white); color: var(--ink); }
.cap-state { min-height: 22px; font-size: 14px; font-weight: 700; }
.cap-state.ok { color: var(--court); }
.cap-state.err { color: var(--alert); }
@media (min-width: 760px) {
  .cap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}
@media (min-width: 1100px) { .cap-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-top: 16px; padding-bottom: 4px; }
.admin-tabs button { min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 6px; background: transparent; font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer; }
.admin-tabs button[aria-selected="true"] { background: var(--ink); color: var(--on-dark); }
.panel { padding-top: 24px; padding-bottom: 64px; }
.panel h2 { font-size: 28px; line-height: 1; margin: 0 0 8px; }
.panel h3 { font-size: 13px; margin: 32px 0 10px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 20px 0; border-top: 3px solid var(--ink); }
.kpis div { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.kpis .num { display: block; font-size: 32px; line-height: 1.1; }
.kpis span:last-child { font-size: 14px; color: var(--muted); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis .num { font-size: 40px; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.toolbar .input { height: 48px; font-size: 16px; max-width: 360px; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.row .main { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; min-width: 0; }
.row .main .nm { font-weight: 700; font-size: 16px; }
.row .main .sub { font-size: 14px; color: var(--muted); }
.row .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1.5px solid var(--ink); }
.pill.ok { background: var(--lime); }
.pill.wait { background: transparent; border-style: dashed; }
.pill.off { color: var(--muted); border-color: var(--line-strong); }
.pill.paid { background: var(--court); color: var(--on-dark); border-color: var(--court); }
@media (min-width: 900px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .row .acts { justify-content: flex-end; }
}
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 880px; }
.form-grid .field label { font-size: 14px; }
.form-grid .input { height: 50px; font-size: 16px; }
@media (min-width: 760px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .wide { grid-column: 1 / -1; } }
.confirm-box { margin-top: 12px; padding: 14px; border: 2px solid var(--ink); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.confirm-box p { margin: 0; flex: 1 1 240px; }
.round-sum { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.round-sum li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.toast { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 50; background: var(--ink); color: var(--on-dark); padding: 12px 18px; border-radius: 6px; font-weight: 700; max-width: calc(100vw - 32px); text-align: center; }
@media (min-width: 760px) { .toast { bottom: 32px; } }
