/* Torneos — on top of app.css. The «Ola» identity of hazit.es (same as /escuela and /entrenadores,
   see hazit-home DESIGN.md): cerulean glass banner, blue for every choice, ball-yellow only for the
   primary action, sea-mist ground; Unbounded for headings and numbers, Hanken Grotesk for text.
   Same Hazit bar and the same column as hazit.es/entrenadores (1120 px, 24 px sides; 16 px on phones). */
:root {
  --bg: #e3eff6; --surface: #ffffff; --text: #0b1d29; --muted: #3f5869; --line: #cddde8; --track: #e7eff4;
  --accent: #0f6e9e; --accent-ink: #0b5a82; --accent-soft: #d4e9f5; --hot: #ffd43b; --hot-ink: #241a00;
  --glass: #0e5a85; --glass-deep: #083650; --bar: #0b4170;
  --gold: #8a6500; --gold-soft: #fff3cc; --danger: #b42318;
  --head: "Unbounded", "Hanken Grotesk", system-ui, sans-serif; --body: "Hanken Grotesk", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a1720; --surface: #11212c; --text: #e3eef5; --muted: #9bb3c2; --line: #213847; --track: #162a37;
          --accent: #6cc0e8; --accent-ink: #6cc0e8; --accent-soft: #12324a; --glass: #0d4a6e; --glass-deep: #06263a; --bar: #0b4170;
          --gold: #f2c94c; --gold-soft: #2e2710; --danger: #f97066; }
}
body.tn-page { background: var(--bg); font-family: var(--body); color: var(--text); }
@media (min-width: 761px) { body.tn-page { background: var(--bg) linear-gradient(180deg, #cfe6f3 0, var(--bg) 560px) no-repeat; } }
@media (min-width: 761px) and (prefers-color-scheme: dark) { body.tn-page { background: var(--bg) linear-gradient(180deg, #0c2638 0, var(--bg) 560px) no-repeat; } }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.015em; text-wrap: balance; }
p { text-wrap: pretty; }

/* the Hazit bar lives in hazit-bar.css (shared with Padel Hub); here only the print sheet's header reset */
header.pr-head { position: static; backdrop-filter: none; border-top: 0; margin: 0 0 14px; }
main { padding-bottom: 40px; min-height: 60vh; }
.tn-loading, .tn-hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.tn-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px;
           border-top: 1px solid var(--line); padding: 24px 0 40px; }
.tn-foot a { color: inherit; }

/* ---------- buttons ---------- */
.tn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: transform .15s cubic-bezier(.22, 1, .36, 1), background-color .2s, opacity .2s; }
.tn-btn:active { transform: scale(.98); }
.tn-btn:disabled { opacity: .45; cursor: not-allowed; }
.tn-btn.primary { background: var(--hot); color: var(--hot-ink); }
.tn-btn.primary:hover:not(:disabled) { background: #ffc61a; }
.tn-btn.ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.tn-btn.glass { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.tn-btn.glass:hover { background: rgba(255,255,255,.2); }
.tn-btn.danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); margin-top: 4px; }
.tn-btn.small { min-height: 36px; font-size: 13px; padding: 0 12px; }
.tn-btn.wide { width: 100%; }
.tn-btn:focus-visible, .chip:focus-visible, .tn-tabs button:focus-visible, .tn-card:focus-visible, .tn-cp:focus-visible, .tn-cg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tn-link { background: none; border: 0; color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 600; padding: 4px 2px; cursor: pointer; }
.tn-x { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; flex: none; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { color: #06263a; } }

/* ---------- the glass banner (list, tournament, create) ---------- */
.tn-glass { position: relative; overflow: hidden; isolation: isolate; color: #fff; margin: 0 -16px; padding: 20px 20px 26px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.09) 0 1.5px, transparent 1.5px 16px),
              repeating-linear-gradient(-45deg, rgba(255,255,255,.09) 0 1.5px, transparent 1.5px 16px),
              linear-gradient(180deg, var(--glass), var(--glass-deep));
  animation: tn-drift 2.4s cubic-bezier(.16, 1, .3, 1) .2s 1 both; }
@keyframes tn-drift { from { background-position: -48px -6px, 48px -6px, 0 0; } to { background-position: 0 0, 0 0, 0 0; } }
.tn-glass::before { content: ""; position: absolute; z-index: -1; inset: -20% auto -20% -40%; width: 38%; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent); animation: tn-sheen 1.6s cubic-bezier(.22, 1, .36, 1) .3s both; }
@keyframes tn-sheen { from { left: -40%; } to { left: 115%; } }
/* same as hazit.es/entrenadores (the model): 31/42 px Unbounded 800 at 1.08, 13ch / 16ch; text #d9ecf7 */
.tn-glass h1 { margin: 0; font-size: 31px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; max-width: 13ch; color: #fff; }
.tn-glass > p { margin: 8px 0 0; max-width: none; font-size: 15px; line-height: 1.45; color: #d9ecf7; }
.tn-glass > p b { font-weight: 700; }
.tn-glass > .tn-btn { margin-top: 18px; }
.tn-glass.over { padding-bottom: 76px; }
.tn-glass.slim h1 { font-size: 28px; }
.tn-crumb { background: none; border: 0; padding: 0; margin: 0 0 14px; font: inherit; font-size: 14px; color: #d9ecf7; cursor: pointer; }
.tn-crumb:hover { color: #fff; text-decoration: underline; }
.tn-g-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; color: #d9ecf7; }
.tn-g-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: #e8f4fb; }
.tn-g-facts b { font: 700 17px/1 var(--head); color: #fff; }
.tn-g-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.skel-glass { min-height: 220px; }
@media (min-width: 761px) {
  .tn-glass { margin: 18px 0 0; padding: 40px; border-radius: 20px; }
  .tn-glass h1 { font-size: 42px; max-width: 16ch; }
  .tn-glass > p { margin-top: 12px; max-width: 46ch; }
  .tn-glass.over { padding-bottom: 84px; }
  .tn-glass.slim h1 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .tn-glass, .tn-glass::before { animation: none; } .tn-glass::before { display: none; } }

/* ---------- list: the filter card over the banner's edge, then the cards ---------- */
.tn-filters { position: relative; z-index: 1; margin-top: -56px; background: var(--surface); border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 14px 26px -18px rgba(8, 54, 80, .6); display: grid; gap: 4px; }
.tn-frow { display: grid; gap: 2px; min-width: 0; }
.tn-frow > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.tn-frow .chips { padding: 6px 0 4px; }
@media (min-width: 761px) {
  .tn-filters { margin: -60px 20px 0; padding: 18px 20px; }
  .tn-frow { grid-template-columns: 96px 1fr; align-items: center; }
}
.tn-count { color: var(--muted); font-size: 14px; font-weight: 600; margin: 22px 0 10px; }
.tn-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tn-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border-radius: 20px; padding: 18px;
  color: inherit; text-decoration: none; box-shadow: 0 1px 0 rgba(8, 54, 80, .04);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s; }
.tn-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -20px rgba(8, 54, 80, .45); }
.tn-card-top { display: flex; gap: 14px; align-items: flex-start; }
.tn-date { flex: none; width: 58px; height: 62px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-content: center; text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tn-date b { font: 800 24px/1 var(--head); letter-spacing: -.02em; }
.tn-card.s-finished .tn-date { background: var(--track); color: var(--muted); }
.tn-card-id { min-width: 0; }
.tn-card h3 { font-size: 19px; line-height: 1.15; margin: 6px 0 4px; }
.tn-meta { margin: 0; color: var(--muted); font-size: 14px; }
.tn-meta.small { font-size: 13px; margin-top: 6px; }
.tn-meta.small b { color: var(--text); font-family: var(--head); }
.tn-card-foot { margin-top: auto; }
.tn-bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.tn-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.tn-champ { margin: auto 0 0; font-weight: 700; color: var(--gold); }
.tn-catline { margin: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
/* the category strip: 2ª [M][F][X] 3ª [M][F][X] … */
.tn-strip { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.tn-lv { display: inline-flex; align-items: center; gap: 3px; }
.tn-lv b { font: 700 12px/1 var(--head); color: var(--text); margin-right: 3px; min-width: 18px; }
.tn-lv i { font-style: normal; width: 21px; height: 21px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: var(--track); color: color-mix(in srgb, var(--muted) 55%, transparent); }
.tn-lv i.on { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .tn-lv i.on { color: #06263a; } }
.tn-status { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; display: inline-block; }
.s-open > .tn-status, .tn-status.s-open { background: #dcfce7; color: #14532d; }
.tn-status.s-closed { background: var(--track); color: var(--muted); }
.tn-status.s-running { background: #fff1d6; color: #7a4a00; }
.tn-status.s-finished { background: var(--gold-soft); color: var(--gold); }
.tn-glass .tn-status { box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.skel { min-height: 170px; background: linear-gradient(90deg, var(--surface), var(--track), var(--surface)); background-size: 200% 100%; animation: tn-sk 1.4s ease-in-out infinite; }
.skel.tall { min-height: 260px; margin-top: 16px; }
@keyframes tn-sk { to { background-position: -200% 0; } }
.tn-empty { text-align: center; padding: 40px 16px; background: var(--surface); border-radius: 18px; }
.tn-empty p { color: var(--muted); margin: 6px 0 0; }
.tn-org { margin-top: 36px; background: var(--accent); color: #fff; border-radius: 20px; padding: 24px; display: grid; gap: 16px; }
.tn-org h2 { margin: 0; font-size: 22px; }
.tn-org p { margin: 6px 0 0; opacity: .92; }
.tn-org .tn-btn { justify-self: start; }
@media (prefers-color-scheme: dark) { .tn-org { background: var(--glass); } }
@media (min-width: 761px) { .tn-org { grid-template-columns: 1fr auto; align-items: center; padding: 28px 32px; } }

/* ---------- one tournament: the category matrix over the banner's edge ---------- */
.tn-catpick { position: relative; z-index: 1; margin-top: -56px; background: var(--surface); border-radius: 18px; padding: 12px;
  box-shadow: 0 14px 26px -18px rgba(8, 54, 80, .6);
  display: grid; grid-template-columns: 58px repeat(var(--gcols), 1fr); gap: 6px; align-items: stretch; }
.tn-catpick.list { display: block; padding: 6px 14px; }
.tn-catpick > small { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.tn-cp-lv { display: flex; align-items: center; font: 700 13px/1.1 var(--head); }
.lg { display: none; } .sh { display: inline; }
.tn-cp { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: 7px 4px; cursor: pointer;
  display: grid; justify-items: center; gap: 1px; font: inherit; min-height: 48px; transition: background-color .15s, border-color .15s; }
.tn-cp b { font: 700 17px/1.1 var(--head); }
.tn-cp small { font-size: 11px; color: var(--muted); }
.tn-cp:hover { border-color: var(--accent); }
.tn-cp.s-running { background: #fff8e8; border-color: #f5d79a; }
.tn-cp.s-finished { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.tn-cp.mine { box-shadow: inset 0 0 0 2px var(--hot); }
.tn-cp[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tn-cp[aria-pressed="true"] small { color: #d9ecf7; }
.tn-cp.none { display: grid; place-items: center; color: var(--line); border: 1px dashed var(--line); border-radius: 12px; }
@media (prefers-color-scheme: dark) {
  .tn-cp.s-running { background: #2a2210; border-color: #5a4515; }
  .tn-cp[aria-pressed="true"] { color: #06263a; } .tn-cp[aria-pressed="true"] small { color: #06263a; }
}
@media (min-width: 761px) {
  .tn-catpick { margin: -60px 20px 0; padding: 16px 18px; grid-template-columns: 120px repeat(var(--gcols), 1fr); gap: 8px; }
  .lg { display: inline; } .sh { display: none; }
  .tn-cp { grid-template-columns: auto auto; align-items: baseline; justify-content: center; gap: 8px; min-height: 46px; }
  .tn-cp-lv { font-size: 14px; }
}
.tn-cathead { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin: 24px 0 0; }
.tn-cathead h2 { margin: 0; font-size: 24px; }
@media (min-width: 761px) { .tn-cathead h2 { font-size: 30px; } }
.tn-cs { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #14532d; white-space: nowrap; }
.tn-cs.s-running { background: #fff1d6; color: #7a4a00; }
.tn-cs.s-finished { background: var(--gold-soft); color: var(--gold); }
.tn-trophy { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: 16px;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.tn-trophy span { font-size: 28px; }
.tn-trophy small { display: block; color: var(--gold); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.tn-trophy b { font: 700 17px/1.2 var(--head); }
.tn-tabs { display: flex; gap: 4px; margin: 16px 0 14px; background: var(--surface); border-radius: 999px; padding: 4px; overflow-x: auto; scrollbar-width: none;
  box-shadow: 0 1px 0 rgba(8, 54, 80, .05); }
.tn-tabs::-webkit-scrollbar { display: none; }
.tn-tabs button { flex: 1 0 auto; border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tn-tabs button[aria-current="page"] { background: var(--accent); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) { .tn-tabs button[aria-current="page"] { color: #06263a; } }
@media (min-width: 761px) { .tn-tabs { display: inline-flex; } .tn-tabs button { flex: 0 0 auto; padding: 9px 20px; } }

.tn-box { background: var(--surface); border-radius: 18px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 0 rgba(8, 54, 80, .04); }
.tn-h2 { font-size: 18px; margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.tn-h2 small { font: 600 13px var(--body); color: var(--muted); }
.tn-h3 { font: 700 15px/1.25 var(--head); letter-spacing: -.01em; color: var(--text); margin: 0 0 12px; }
.tn-h3.sp { margin-top: 18px; }
.tn-desc { margin: 0; white-space: pre-line; line-height: 1.55; }
.tn-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tn-facts small { display: block; color: var(--muted); font-size: 12px; }
.tn-facts b { font-size: 15px; }
.tn-cta { display: grid; gap: 10px; }
.tn-cta > b { font: 700 17px/1.2 var(--head); }
.tn-cta p { margin: 0; color: var(--muted); }
.tn-mine { display: grid; gap: 10px; box-shadow: inset 0 0 0 2px var(--hot); }
.tn-mine .tn-h3 { margin: 0; }
.tn-mine-row { display: flex; align-items: center; gap: 10px; }
.tn-mine-row > div { display: grid; gap: 4px; min-width: 0; flex: 1; }
.tn-mine-row small { color: var(--muted); font-size: 13px; }
.tn-catlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tn-catlist button { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; text-align: left;
  border: 0; background: none; font: inherit; color: inherit; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.tn-catlist button:hover, .tn-catlist button.on { background: var(--accent-soft); }
.tn-catlist small { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.tn-catlist .tn-cs { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .tn-info { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
  .tn-info-side { position: sticky; top: 16px; }
  .tn-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .tn-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 16px; }
}

/* ---------- pairs ---------- */
.tn-av { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; }
.tn-ini { display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); }
.tn-pair { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tn-avs { display: inline-flex; flex: none; }
.tn-avs > * + * { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.tn-pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tn-pair.win .tn-pn { font-weight: 800; }
.tn-pair.tbd .tn-pn { color: var(--muted); }
.tn-seed { font-size: 10px; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); border-radius: 4px; padding: 0 4px; flex: none; }
.tn-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tn-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tn-n { width: 24px; text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; flex: none; }
.tn-elo { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- matches + bracket ---------- */
.tn-match { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; display: grid; gap: 6px; }
.tn-match.done { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.tn-match.bye { opacity: .65; border-style: dashed; }
.tn-ml { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.tn-ml .tn-pair { flex: 1; }
.tn-match.done .tn-ml:not(.win) { color: var(--muted); }
/* every set in a white box, like padel.hazit.es: the winners' sets filled blue */
.tn-sets { display: flex; gap: 4px; font-variant-numeric: tabular-nums; flex: none; }
.tn-sets i { font-style: normal; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; font-size: 14px; font-weight: 600;
  color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.tn-sets i.took { color: var(--accent-ink); font-weight: 700; background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.tn-ml.win .tn-sets i.took { color: #fff; background: var(--accent); box-shadow: none; }
@media (prefers-color-scheme: dark) { .tn-ml.win .tn-sets i.took { color: #06263a; } }
.tn-when { color: var(--muted); font-size: 12px; }
.tn-score-btn { justify-self: start; border: 0; background: var(--accent-soft); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 700;
  padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.tn-list { display: grid; gap: 8px; margin-top: 12px; }
/* phones: one round per screen width, snapping, with the next round peeking in; PC: every round side by side, wider */
.tn-bracket { display: grid; grid-template-columns: repeat(var(--cols), minmax(min(300px, 80vw), 1fr)); gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 0 16px 10px; margin: 0 -16px; }
.tn-col { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; }
.tn-col-ms { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.tn-col .tn-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (min-width: 761px) {
  .tn-bracket { grid-template-columns: repeat(var(--cols), minmax(200px, 1fr)); margin: 0; padding: 18px; background: var(--surface);
    border-radius: 20px; scroll-padding-inline: 18px; gap: 20px; }
  .tn-bracket .tn-match { background: var(--bg); border-color: transparent; padding: 11px 13px; }
  .tn-bracket .tn-match.done { border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
  .tn-bracket .tn-ml { font-size: 15px; }
  .tn-bracket .tn-avs > * + * { box-shadow: 0 0 0 2px var(--bg); }
}
.tn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tn-table th { font-size: 11px; color: var(--muted); text-align: center; font-weight: 700; padding: 0 4px 6px; }
.tn-table th:nth-child(2) { text-align: left; }
.tn-table td { padding: 7px 4px; border-top: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.tn-table td:nth-child(2) { text-align: left; max-width: 0; width: 100%; }
.tn-table tr.q td:first-child { color: #15803d; font-weight: 800; }
.tn-when-edit { display: flex; gap: 6px; margin-top: 6px; }
.tn-when-edit input { flex: 1; min-width: 0; }

/* ---------- forms ---------- */
.tn-form { display: grid; gap: 14px; }
.tn-create { margin-top: 16px; max-width: 760px; gap: 0; }
@media (min-width: 761px) { .tn-create { margin: 18px auto 0; } }
.tn-create .tn-box { display: grid; gap: 14px; }
.tn-create .tn-box > .tn-h2 { margin: 0; }
.tn-form label, .tn-cta label, .tn-box > label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tn-form fieldset { border: 0; padding: 0; margin: 0; }
input, textarea, select { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.tn-row { display: flex; gap: 10px; }
.tn-row > * { flex: 1; min-width: 0; }
.tn-row.center { align-items: center; flex-wrap: wrap; }
.tn-row.center > .chips { flex: 0 1 auto; padding: 0; }
.tn-num { width: 90px; flex: none !important; }
.tn-err { color: var(--danger); margin: 0 0 12px; font-weight: 600; }
.tn-steps { display: grid; gap: 10px; }
.tn-steps .tn-h3 { margin: 0; }
.tn-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tn-pick button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 4px 10px 4px 4px; font: inherit; font-size: 14px; cursor: pointer; }
.tn-pick button small { color: var(--muted); font-size: 11px; }
.tn-pick button.new { border-style: dashed; padding-left: 10px; }
.tn-picked { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 12px; }
.tn-picked small { color: var(--muted); }
/* the category grid (create / manage): Primera…Iniciación down, Masculina/Femenina/Mixta across */
.tn-catgrid { display: grid; grid-template-columns: 96px repeat(3, 1fr); gap: 6px; align-items: center; }
.tn-catgrid > small { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.tn-cg-lv { border: 0; background: none; font: 700 13px/1.2 var(--head); color: var(--text); text-align: left; padding: 8px 0; cursor: pointer; }
.tn-cg-lv:hover { color: var(--accent-ink); }
.tn-cg { height: 44px; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--surface); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s cubic-bezier(.22, 1, .36, 1); }
.tn-cg:active { transform: scale(.96); }
.tn-cg:hover { border-color: var(--accent); }
.tn-cg[aria-pressed="true"] { background: var(--accent); border: 1.5px solid var(--accent); }
.tn-cg:disabled { cursor: not-allowed; opacity: .55; }
@media (prefers-color-scheme: dark) { .tn-cg { color: #06263a; } }
@media (min-width: 761px) { .tn-catgrid { grid-template-columns: 130px repeat(3, 1fr); gap: 8px; } }

/* ---------- score sheet + toast ---------- */
.tn-modal { position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / .45); display: grid; align-items: end; justify-items: center; }
.tn-sheet { background: var(--bg); width: min(520px, 100%); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px;
  animation: tn-up .3s cubic-bezier(.22, 1, .36, 1); }
@media (min-width: 640px) { .tn-modal { align-items: center; } .tn-sheet { border-radius: 20px; } }
@keyframes tn-up { from { transform: translateY(24px); opacity: 0; } }
.tn-sheet h3 { margin: 0; }
.tn-grid { display: grid; grid-template-columns: 1fr repeat(3, 52px); gap: 8px; align-items: center; }
.tn-grid small { color: var(--muted); font-size: 11px; text-align: center; }
.tn-grid input { text-align: center; padding: 10px 4px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tn-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  animation: tn-up .3s cubic-bezier(.22, 1, .36, 1); max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: reduce) { .tn-card, .tn-btn, .tn-sheet, .tn-toast, .skel, .tn-cg { animation: none; transition: none; } }

/* ---------- printable view (/t/<slug>/imprimir): A4 landscape, one sheet per category, black on white ---------- */
.pr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; padding: 14px 16px; background: var(--surface); border-radius: 16px; }
.pr-bar select { width: auto; flex: 1 1 220px; }
.pr-bar .tn-hint { flex-basis: 100%; margin: 0; }
.pr-sheet { background: #fff; color: #111; border-radius: 12px; padding: 22px 26px; margin-bottom: 18px; font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow-x: auto; }
.pr-head { background: none; padding: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 14px; }
.pr-head h1 { margin: 0; font-size: 20px; color: #111; }
.pr-head p { margin: 4px 0 0; color: #444; }
.pr-cat { text-align: right; }
.pr-cat b { display: block; font: 800 18px/1.1 var(--head); color: #0b4170; }
.pr-cat span { color: #444; }
.pr-champ { font-weight: 800; margin: 0 0 10px; }
.pr-bracket { display: grid; grid-template-columns: repeat(var(--cols), minmax(170px, 1fr)); gap: 14px; min-width: calc(var(--cols) * 175px); }
.pr-col { display: grid; grid-template-rows: auto 1fr; }
.pr-col h2, .pr-g h2, .pr-pairs h2 { font: 700 11px/1.2 var(--body); text-transform: uppercase; letter-spacing: .08em; color: #444; margin: 0 0 8px; }
.pr-col-ms { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.pr-m { border: 1px solid #999; border-radius: 4px; break-inside: avoid; }
.pr-m.bye { border-style: dashed; color: #666; }
.pr-ml { display: flex; align-items: center; min-height: 22px; }
.pr-ml + .pr-ml { border-top: 1px solid #ccc; }
.pr-ml.win .pr-pn { font-weight: 800; }
.pr-pn { flex: 1; min-width: 0; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-pn small { color: #666; }
.pr-ml i { font-style: normal; width: 20px; align-self: stretch; display: grid; place-items: center; border-left: 1px solid #ccc; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-when { display: block; padding: 2px 6px; border-top: 1px dotted #ccc; color: #555; font-size: 10px; }
.pr-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.pr-g .tn-table { font-size: 11px; color: #111; }
.pr-g .tn-table td { border-color: #ccc; padding: 3px 4px; }
.pr-g .tn-table th { color: #444; }
.pr-gms { display: grid; gap: 6px; margin-top: 8px; }
.pr-pairs ol { columns: 2; margin: 0; padding-left: 20px; line-height: 1.8; }
.pr-foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid #ccc; color: #666; font-size: 10px; }
@page { size: A4 landscape; margin: 10mm; }
@media print {
  body.tn-page, body.tn-page.tn-print { background: #fff !important; }
  .hz-bar, .tn-foot, .pr-bar, #acc-pop { display: none !important; }
  .hz-wrap { max-width: none; padding: 0; }
  main { padding: 0; min-height: 0; }
  .pr-sheet { box-shadow: none; border-radius: 0; padding: 0; margin: 0; overflow: visible; break-after: page; }
  .pr-sheet:last-child { break-after: auto; }
  .pr-bracket { min-width: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- sign-up form (/t/<slug>/inscripcion), kit & payments, the organizer's list (2026-11-20) ---------- */
.tn-field { display: grid; gap: 8px; }
.tn-field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.tn-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-seg button { min-height: 44px; min-width: 96px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s; }
.tn-seg.sizes button { min-width: 52px; padding: 0 10px; }
.tn-seg button:hover { border-color: var(--accent); }
.tn-seg button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .tn-seg button[aria-checked="true"] { color: #06263a; } }
.tn-seg button:focus-visible, .tn-payopts button:focus-visible, .tn-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tn-step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; flex: none; }
@media (prefers-color-scheme: dark) { .tn-step { color: #06263a; } }
.tn-h2 small { font-weight: 600; }
.tn-opt { font-weight: 500; color: var(--muted); }
.tn-catfixed { margin: 0; font: 700 18px/1.2 var(--head); }
.tn-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.tn-warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff1d6; color: #7a4a00; font-weight: 600; font-size: 14px; }
@media (prefers-color-scheme: dark) { .tn-warn { background: #3a2a10; color: #ffcf80; } }
.tn-kit { margin: 0; font-weight: 600; }
.tn-payopts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tn-payopts button { text-align: left; display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; }
.tn-payopts button small { color: var(--muted); font-size: 13px; }
.tn-payopts button[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.tn-pay-info { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.tn-pay-info p { margin: 0; }
.tn-iban { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tn-iban code { font: 700 16px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; word-break: break-all; }
.tn-num-big { font-family: var(--head); font-size: 17px; }
.tn-copy { border: 1px solid var(--line); background: var(--surface); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 700;
  border-radius: 8px; padding: 4px 10px; cursor: pointer; min-height: 30px; }
.tn-paydet { border-top: 1px solid var(--line); padding-top: 10px; }
.tn-paydet summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); }
.tn-paydet .tn-pay-info { margin-top: 8px; }
.tn-check { display: flex !important; align-items: flex-start; gap: 10px; font-size: 14px !important; font-weight: 500 !important; color: var(--text) !important; cursor: pointer; line-height: 1.45; }
.tn-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); padding: 0; }
.tn-consent { display: grid; gap: 14px; }
.tn-sub { display: grid; gap: 10px; padding-left: 30px; }
.tn-create .tn-row:last-child { margin-top: 4px; }
.tn-done { text-align: center; justify-items: center; }
.tn-done-big { margin: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--accent-soft); color: var(--accent-ink); }
.tn-done .tn-pay-info { text-align: left; width: 100%; box-sizing: border-box; }
@media (max-width: 520px) { .tn-create .tn-row:not(.center) { flex-direction: column; } }
/* organizer: the sign-ups */
.tn-signups { margin-top: 2px; }
.tn-signups-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tn-signups-head .tn-h3 { margin: 0; margin-right: auto; }
.tn-signups-head .chips { padding: 0; }
.tn-sl { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.tn-sl li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.tn-sl li.paid { background: color-mix(in srgb, #15803d 8%, var(--bg)); }
.tn-sl li.paid .tn-check span { color: #15803d; font-weight: 700; }
@media (prefers-color-scheme: dark) { .tn-sl li.paid .tn-check span { color: #7ee2a0; } }
.tn-sl-who { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tn-sl-cat { font-weight: 700; color: var(--accent-ink); font-size: 12px; }
.tn-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; font-size: 14px; }
.tn-who small { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 5px; padding: 0 5px; }
.tn-who .tn-size { color: var(--accent-ink); }
.tn-who span { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 13px; }
.tn-who a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.tn-who a:hover { color: var(--accent-ink); text-decoration: underline; }
.tn-sl-pay { display: grid; gap: 4px; justify-items: end; text-align: right; flex: none; }
.tn-sl-pay small { color: var(--muted); font-size: 12px; }

/* Like Escuela: on phones the banner's blue keeps going behind the card on its edge and fades into sea mist */
.tn-flood { position: relative; height: 0; }
@media (max-width: 760px) {
  .tn-flood::before { content: ""; position: absolute; z-index: -1; left: -16px; right: -16px; top: -2px; height: 300px; pointer-events: none;
    background: linear-gradient(180deg, var(--glass-deep) 0, #2f7fa9 35%, #a9d2e8 68%, transparent 100%); }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) { .tn-flood::before { background: linear-gradient(180deg, var(--glass-deep) 0, #0b3047 45%, transparent 100%); } }
.tn-flood + .tn-filters, .tn-flood + .tn-catpick { position: relative; z-index: 1; }
.tn-shirt { padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.tn-size-pick select { max-width: 220px; }

/* Ranking de torneos (its own Elo): top 10 + you + Ver más, like Padel Hub's ranking */
.tn-rank { margin-top: 32px; background: var(--surface); border-radius: 20px; padding: 18px; }
.tn-rank-head h2 { margin: 0; font-size: 22px; }
.tn-rank-head p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.tn-rk { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tn-rk li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; min-width: 0; }
.tn-rk li.p1 { background: #fff8db; } .tn-rk li.p2 { background: #f3f6f8; } .tn-rk li.p3 { background: #fdf1e7; }
.tn-rk .rk { width: 24px; text-align: center; font: 700 15px/1 var(--head); color: var(--muted); flex: none; }
.tn-rk li.p1 .rk { color: #a87b00; } .tn-rk li.p2 .rk { color: #6b7480; } .tn-rk li.p3 .rk { color: #a0592a; }
.tn-rk .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tn-rk .st { color: var(--muted); font-size: 13px; flex: none; }
.tn-rk .pts { font: 700 16px/1 var(--head); flex: none; min-width: 48px; text-align: right; }
.tn-rk li.gap { justify-content: center; color: var(--muted); letter-spacing: .3em; padding: 0; }
.tn-rk li.me { background: #fff4cc; box-shadow: inset 0 0 0 1.5px #e0b300; }
.tn-rk li.me .rk { color: #a87b00; }
.tn-rk li.me.blink { animation: tn-me .55s ease-in-out .35s 2; }
@keyframes tn-me { 50% { background: #ffe07a; } }
@media (prefers-reduced-motion: reduce) { .tn-rk li.me.blink { animation: none; } }
@media (prefers-color-scheme: dark) {
  .tn-rk li.p1 { background: #29240f; } .tn-rk li.p2 { background: #1d2730; } .tn-rk li.p3 { background: #2a1e15; }
  .tn-rk li.me { background: #3a3008; box-shadow: inset 0 0 0 1.5px #f5c84b; }
  @keyframes tn-me { 50% { background: #5c4a0c; } }
}
.tn-more { width: 100%; margin-top: 10px; min-height: 44px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--surface);
  color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.tn-more:hover { border-style: solid; border-color: var(--accent); }
.tn-more span { font-weight: 400; color: var(--muted); }
.tn-more i { font-style: normal; display: inline-block; margin-left: 6px; transition: transform .2s; }
.tn-more[aria-expanded="true"] i { transform: rotate(180deg); }

/* ====== «Marea» (2026-11-22): the family look of hazit.es/escuela and /entrenadores ======
   PC: the deep band runs the full width under the bar; on the list the headline sits left and the
   animated draw (marea-hero.js, hazit-home hero/tn-cuadro) stands on the band's foot at the right.
   Everywhere: cards, the main action and the filter card get an ink edge with a short hard shadow;
   a chosen chip is ball-yellow. Phones keep Ola's composition. */
body.tn-page { --ink-edge: #0b1d29; --deep: #0a3550; }
@media (prefers-color-scheme: dark) { body.tn-page { --ink-edge: #000; --deep: #081f2f; } }
body.tn-page .hz-bar { background: var(--deep); }
.tn-card { border: 2px solid var(--ink-edge); box-shadow: 4px 4px 0 var(--ink-edge);
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), box-shadow .15s cubic-bezier(.2, .8, .2, 1); }
.tn-card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink-edge); }
.tn-card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink-edge); }
.tn-card.skel { border-color: transparent; box-shadow: none; }
.tn-btn.primary { border: 2px solid var(--ink-edge); box-shadow: 3px 3px 0 var(--ink-edge); }
.tn-btn.primary:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink-edge); }
.tn-filters, .tn-catpick { border: 2px solid var(--ink-edge); box-shadow: 4px 4px 0 var(--ink-edge); }
.chip[aria-pressed="true"] { background: var(--hot); border-color: var(--ink-edge); color: var(--hot-ink); }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { color: var(--hot-ink); } }
.tn-mar-stage { display: none; }
@media (min-width: 900px) {
  body.tn-page { overflow-x: clip; background: var(--bg); }
  .tn-glass { position: relative; overflow: visible; margin: 0; padding: 48px 0 56px; border-radius: 0; background: none; animation: none; }
  .tn-glass::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); left: calc(50% - 50vw); width: auto;
    transform: none; background: var(--deep); animation: none; }
  .tn-glass h1 { font-size: 56px; line-height: 1; letter-spacing: -.035em; }
  .tn-glass.slim h1 { font-size: 44px; }
  .tn-glass > p, .tn-mar-copy > p { font-size: 17px; }
  .tn-glass.over { padding-bottom: 56px; }
  .tn-glass.tn-mar { display: grid; grid-template-columns: minmax(0, 1fr) 440px; column-gap: 56px; padding: 0; }
  .tn-mar-copy { align-self: center; padding: 48px 0 56px; }
  .tn-mar-copy h1 { max-width: 11ch; }
  .tn-mar-copy > p { margin: 14px 0 0; max-width: 40ch; line-height: 1.45; color: #d9ecf7; }
  .tn-mar-copy > .tn-btn { margin-top: 22px; }
  .tn-mar-stage { display: block; width: 440px; align-self: end; margin-top: 8px; }
  .tn-filters, .tn-catpick { margin: 32px 0 0; }
}
