/* Arena de torneos (2026-11-13): presentación competitiva de la vista de torneos, lobby «VS», cuadro con
   conectores y formulario de creación del admin (plantillas + vista previa). Se carga después del tema del
   menú para tener prioridad. Solo estilos: la lógica vive en js/app-tournaments.js. */

.tournaments-view {
    --t-gold: #fbbf24;
    --t-gold-deep: #b45309;
    --t-teal: #22d3ee;
    --t-teal-deep: #0e7490;
    --t-live: #fb923c;
    --t-ink: rgba(2, 6, 23, .55);
}

.t-icon { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.16em; margin-right: .35em; }

/* ------------------------------------------------------------------ cabecera */
.tournaments-hero-head {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, .35);
    background:
        radial-gradient(ellipse at 12% -10%, rgba(251, 191, 36, .28), transparent 55%),
        radial-gradient(ellipse at 95% 120%, rgba(34, 211, 238, .2), transparent 55%),
        linear-gradient(135deg, rgba(30, 27, 75, .92), rgba(15, 23, 42, .95) 55%, rgba(12, 74, 110, .55));
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tournaments-hero-head::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 26px);
}
.tournaments-hero-head > * { position: relative; z-index: 1; }
.tournaments-hero-copy h2 {
    margin: 2px 0 6px;
    font-family: "Kryvania Cinzel", Georgia, serif;
    font-size: clamp(1.9rem, 3.2vw, 2.7rem);
    letter-spacing: .06em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff7d6, #fbbf24 60%, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 18px rgba(251, 191, 36, .25);
}
.tournaments-hero-copy p { max-width: 70ch; }
.tournaments-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 14px;
    max-width: 720px;
}
.t-hero-stat {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(2, 6, 23, .45);
}
.t-hero-stat .t-icon { grid-row: span 2; width: 1.6em; height: 1.6em; margin: 0; color: var(--muted); }
.t-hero-stat strong { font-size: 1.45rem; line-height: 1; }
.t-hero-stat small { color: var(--muted); font-weight: 700; font-size: .75rem; }
.t-hero-stat.live { border-color: rgba(251, 146, 60, .55); }
.t-hero-stat.live .t-icon { color: var(--t-live); }
.t-hero-stat.open { border-color: rgba(34, 197, 94, .5); }
.t-hero-stat.open .t-icon { color: #4ade80; }
.t-hero-stat.gold { border-color: rgba(251, 191, 36, .6); background: rgba(251, 191, 36, .1); }
.t-hero-stat.gold .t-icon, .t-hero-stat.gold strong { color: var(--t-gold); }

/* ------------------------------------------------------------------ filtros y lista */
.tournaments-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tournaments-filter:empty { display: none; }
.t-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, .4);
    font-size: .8rem;
}
.t-filter-chip span { padding: 0 6px; border-radius: 999px; background: rgba(148, 163, 184, .2); font-size: .72rem; }
.t-filter-chip.active { border-color: var(--t-gold); background: rgba(251, 191, 36, .16); color: #fde68a; }

.tournaments-layout { grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); }
.tournaments-list { gap: 10px; }
.tournament-list-item {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(30, 41, 59, .8), rgba(2, 6, 23, .7));
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tournament-list-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--t-teal);
}
.tournament-list-item.type-official::before { background: linear-gradient(180deg, #fde68a, var(--t-gold), var(--t-gold-deep)); }
.tournament-list-item.type-official { background: linear-gradient(160deg, rgba(49, 39, 92, .85), rgba(2, 6, 23, .75)); }
button.tournament-list-item:hover,
button.tournament-list-item:focus-visible { transform: translateY(-2px); border-color: rgba(251, 191, 36, .55); box-shadow: 0 10px 22px rgba(0, 0, 0, .35); }
.tournament-list-item.selected { border-color: var(--t-gold); box-shadow: 0 0 0 1px rgba(251, 191, 36, .45), 0 12px 26px rgba(0, 0, 0, .4); background: linear-gradient(160deg, rgba(120, 53, 15, .5), rgba(2, 6, 23, .75)); }
.tournament-list-item.type-free.selected { border-color: var(--t-teal); box-shadow: 0 0 0 1px rgba(34, 211, 238, .4), 0 12px 26px rgba(0, 0, 0, .4); background: linear-gradient(160deg, rgba(14, 116, 144, .35), rgba(2, 6, 23, .75)); }
.tournament-list-item.status-cancelled,
.tournament-list-item.status-done { opacity: .82; }
.tli-ribbon {
    position: absolute;
    top: 8px;
    right: -1px;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px 3px 8px;
    border-radius: 8px 0 0 8px;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #083344;
    background: linear-gradient(135deg, #a5f3fc, var(--t-teal));
}
.type-official .tli-ribbon { color: #451a03; background: linear-gradient(135deg, #fef3c7, var(--t-gold)); }
.tli-top { display: flex; gap: 10px; align-items: center; padding-top: 16px; }
.tli-title { display: grid; gap: 4px; min-width: 0; }
.tournament-list-name { font-size: 1.02rem; font-weight: 800; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.tournament-list-item .tournament-crest { width: 36px; height: 36px; }
.tli-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tli-meta small { color: var(--muted); font-weight: 700; }
.tli-registered {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    color: #bbf7d0;
    background: rgba(34, 197, 94, .16);
    border: 1px solid rgba(34, 197, 94, .5);
}
.tournament-crest { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); }
.tournament-status-badge.status-full { background: rgba(244, 63, 94, .16); border-color: rgba(244, 63, 94, .55); color: #fecdd3; }
.tournament-status-badge.status-live { animation: tPulseBorder 2.2s ease-in-out infinite; }

.t-capacity { display: grid; gap: 4px; }
.t-capacity-bar { height: 7px; border-radius: 999px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.t-capacity-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--t-teal-deep), var(--t-teal)); transition: width .4s ease; }
.type-official .t-capacity-bar i, .t-capacity.large .t-capacity-bar i { background: linear-gradient(90deg, var(--t-gold-deep), var(--t-gold)); }
.t-capacity.hot .t-capacity-bar i { background: linear-gradient(90deg, #ea580c, #fb923c); }
.t-capacity.full .t-capacity-bar i { background: linear-gradient(90deg, #be123c, #fb7185); }
.t-capacity small { color: var(--muted); font-size: .76rem; }
.t-capacity small strong { color: var(--text); }
.t-capacity.large { margin: 12px 0 4px; }
.t-capacity.large .t-capacity-bar { height: 10px; }

.t-when { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.t-when.live { color: #fed7aa; }
.t-when.champion { color: #fde68a; }
.t-countdown { color: var(--text); font-variant-numeric: tabular-nums; }
.t-countdown.urgent { color: #fdba74; }

.tournament-empty-state {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 22px 12px;
    text-align: center;
    border: 1px dashed rgba(251, 191, 36, .35);
    border-radius: 16px;
    color: var(--muted);
}
.tournament-empty-state .tournament-crest { width: 58px; height: 58px; opacity: .85; }
.tournament-empty-state strong { color: var(--text); }

/* ------------------------------------------------------------------ detalle */
.tournament-detail-panel { overflow: hidden; }
.tournament-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: -4px -4px 6px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(34, 211, 238, .35);
    background:
        radial-gradient(ellipse at 0% 0%, rgba(34, 211, 238, .22), transparent 60%),
        linear-gradient(135deg, rgba(8, 47, 73, .9), rgba(2, 6, 23, .85));
}
.tournament-hero.type-official {
    border-color: rgba(251, 191, 36, .5);
    background:
        radial-gradient(ellipse at 0% 0%, rgba(251, 191, 36, .3), transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(168, 85, 247, .22), transparent 55%),
        linear-gradient(135deg, rgba(49, 46, 129, .92), rgba(2, 6, 23, .88));
}
.th-crest .tournament-crest { width: 76px; height: 76px; }
.th-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.th-format { color: var(--muted); font-size: .78rem; font-weight: 800; }
.tournament-hero h3 {
    margin: 6px 0 2px;
    font-family: "Kryvania Cinzel", Georgia, serif;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    letter-spacing: .03em;
    overflow-wrap: anywhere;
}
.tournament-hero .tournament-description { margin: 6px 0 0; color: #cbd5e1; }
.th-time {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 170px;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: center;
    background: rgba(2, 6, 23, .55);
    border: 1px solid rgba(148, 163, 184, .25);
}
.th-time small { color: var(--muted); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.th-time strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.th-time span { color: var(--muted); font-size: .75rem; }
.th-time.live { border-color: rgba(251, 146, 60, .55); }
.th-time.live strong { color: #fed7aa; }
.th-time.live .t-capacity { width: 100%; margin-top: 4px; }
.th-time.champion { border-color: rgba(251, 191, 36, .65); background: rgba(251, 191, 36, .12); }
.th-time.champion strong { color: #fde68a; }
.th-time .tournament-trophy { width: 40px; height: 40px; }

.tournament-security-chip.tournament-type-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.tournament-type-chip.official { color: #451a03; background: linear-gradient(135deg, #fef3c7, var(--t-gold, #fbbf24)); border: 1px solid #b45309; }
.tournament-type-chip.free { color: #083344; background: linear-gradient(135deg, #cffafe, var(--t-teal, #22d3ee)); border: 1px solid #0e7490; }

.tournament-facts div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    align-items: center;
    border-radius: 14px;
    background: rgba(2, 6, 23, .38);
}
.tournament-facts div.wide { grid-column: span 2; }
.tournament-facts .t-icon { grid-row: span 2; width: 1.5em; height: 1.5em; margin: 0; color: var(--t-gold); opacity: .9; }

.tournament-security-box { border-radius: 14px; }
.tournament-security-box > strong { display: inline-flex; align-items: center; }

.tournament-register-box.open {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(251, 191, 36, .55);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(251, 191, 36, .18), transparent 60%),
        rgba(120, 53, 15, .12);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .08);
}
.trb-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }
.trb-head strong { display: inline-flex; align-items: center; font-size: 1.1rem; color: #fde68a; }
.trb-head small, .tournament-register-box.open > small { color: var(--muted); }
.trb-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.trb-steps li { flex: 1 1 220px; }
.trb-steps li.trb-cta { flex: 0 0 auto; }
.trb-steps label { display: grid; gap: 5px; font-weight: 800; }
.trb-steps.hidden, .trb-nodeck.hidden { display: none; }
.tournament-register-button { display: inline-flex; align-items: center; font-size: 1.05rem; padding: 13px 22px; box-shadow: 0 8px 20px rgba(239, 68, 68, .3); }
.trb-nodeck { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px dashed rgba(56, 189, 248, .55); background: rgba(56, 189, 248, .08); }
.trb-nodeck p { margin: 0; }
.trb-nodeck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.trb-nodeck-actions button, .trb-hint button { display: inline-flex; align-items: center; }
.trb-hint { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tournament-register-box.registered { display: grid; grid-template-columns: auto 1fr auto; align-items: center; border-radius: 16px; }
.trb-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(34, 197, 94, .2); color: #4ade80; }
.trb-icon .t-icon { margin: 0; width: 1.4em; height: 1.4em; }
.tournament-alive { color: #86efac; font-weight: 800; }

.tournament-participants summary { display: inline-flex; align-items: center; }
.tournament-participants ul { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.tournament-participants li {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: linear-gradient(135deg, rgba(30, 41, 59, .7), rgba(2, 6, 23, .5));
}
.tournament-participants li.is-viewer { outline: none; border-color: rgba(56, 189, 248, .7); box-shadow: 0 0 0 1px rgba(56, 189, 248, .35); }
.tournament-participants li.is-out { opacity: .55; filter: grayscale(.6); }
.tp-body { display: grid; gap: 3px; min-width: 0; }
.tp-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-name .tournament-seed { margin-right: 6px; }
.tp-you { padding: 0 6px; border-radius: 999px; background: rgba(56, 189, 248, .2); color: #bae6fd; font-size: .68rem; }
.tp-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.t-avatar {
    --dom: #64748b;
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    font-weight: 900;
    color: #fff;
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--dom) 70%, white), var(--dom) 55%, #0f172a);
    box-shadow: 0 0 0 2px var(--dom), 0 0 14px color-mix(in srgb, var(--dom) 45%, transparent);
}
.t-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dom-celestial { --dom: #facc15; }
.dom-feral { --dom: #22c55e; }
.dom-imperial { --dom: #3b82f6; }
.dom-infernal { --dom: #ef4444; }
.dom-neutral, .dom-unknown, .dom-desconocido { --dom: #64748b; }

/* ------------------------------------------------------------------ lobby «VS» */
.tournament-lobby-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, .45);
    background:
        radial-gradient(ellipse at 50% -20%, rgba(251, 191, 36, .2), transparent 60%),
        linear-gradient(180deg, rgba(30, 27, 75, .85), rgba(2, 6, 23, .92));
}
.tournament-lobby-panel.is-final { border-color: var(--t-gold); box-shadow: 0 0 0 1px rgba(251, 191, 36, .4), 0 0 40px rgba(251, 191, 36, .18); }
.tournament-lobby-panel.is-live { border-color: var(--t-live); }
.tournament-lobby-panel.is-won { border-color: rgba(34, 197, 94, .7); }
.tournament-lobby-panel.is-lost { border-color: rgba(148, 163, 184, .4); }
.tl-arena { display: grid; gap: 10px; }
.tl-round-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .8rem;
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, .6);
    background: rgba(251, 191, 36, .12);
}
.tl-versus {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}
.tl-plate {
    --dom: #64748b;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    padding: 16px 12px;
    border-radius: 18px;
    text-align: center;
    border: 1px solid color-mix(in srgb, var(--dom) 55%, transparent);
    background:
        radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--dom) 28%, transparent), transparent 70%),
        rgba(2, 6, 23, .5);
    transition: box-shadow .25s ease, border-color .25s ease;
}
.tl-plate.self { clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); padding-right: 22px; }
.tl-plate.opponent { clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%); padding-left: 22px; }
.tl-plate .t-avatar { width: 64px; height: 64px; font-size: 1.5rem; }
.tl-plate small { color: var(--muted); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.tl-plate strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.tl-plate-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 1.2em; }
.tl-plate.is-ready { border-color: rgba(34, 197, 94, .8); box-shadow: inset 0 0 26px rgba(34, 197, 94, .18); }
.tl-plate.is-unknown { opacity: .65; border-style: dashed; }
.tl-score { display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 120px; text-align: center; }
.tl-vs {
    font-family: "Kryvania Cinzel", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: .1em;
    color: transparent;
    background: linear-gradient(180deg, #fff7d6, #f59e0b 60%, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
}
.tl-score-num { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.tl-score-num b { font-size: 2.6rem; line-height: 1; }
.tl-score-num i { font-style: normal; color: var(--muted); font-size: 1.6rem; }
.tl-score small { color: var(--muted); font-size: .72rem; max-width: 150px; }
.tl-pips-row { display: flex; gap: 14px; }
.tl-pips { display: inline-flex; gap: 4px; }
.tl-pips i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(148, 163, 184, .55); }
.tl-pips i.on { border-color: var(--t-gold); background: var(--t-gold); box-shadow: 0 0 8px rgba(251, 191, 36, .7); }
.tl-pips.opponent i.on { border-color: #f87171; background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, .6); }
.tl-live-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    color: #431407;
    background: var(--t-live);
    animation: tLivePulse 1.6s ease-in-out infinite;
}
.tournament-lobby-status { text-align: center; font-size: 1.02rem; }
.tournament-lobby-status.won { color: #86efac; text-shadow: 0 0 14px rgba(34, 197, 94, .35); }
.tl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.tl-steps.hidden { display: none; }
.tl-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(2, 6, 23, .35);
}
.tl-steps li span {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, .45);
    font-size: .72rem;
    color: #052e16;
}
.tl-steps li.active { color: var(--text); border-color: rgba(251, 191, 36, .55); }
.tl-steps li.active span { border-color: var(--t-gold); }
.tl-steps li.done { color: #bbf7d0; border-color: rgba(34, 197, 94, .45); }
.tl-steps li.done span { border-color: #22c55e; background: #22c55e; }
.tournament-lobby-actions { justify-content: center; align-items: center; }
.tournament-enter-button {
    display: inline-flex;
    align-items: center;
    font-size: 1.12rem;
    padding: 15px 28px;
    border-radius: 14px;
    letter-spacing: .02em;
    box-shadow: 0 10px 26px rgba(239, 68, 68, .35), 0 0 0 0 rgba(251, 191, 36, .6);
    animation: tCtaPulse 2.4s ease-in-out infinite;
}
.tl-waiting { display: inline-flex; align-items: center; gap: 4px; color: #bbf7d0; font-weight: 800; }
.tl-waiting i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: tDots 1.2s ease-in-out infinite; }
.tl-waiting i:nth-child(2) { animation-delay: .2s; }
.tl-waiting i:nth-child(3) { animation-delay: .4s; margin-right: 4px; }
.tl-deadline { display: grid; gap: 4px; text-align: center; }
.tl-deadline:empty { display: none; }
.tl-deadline-row { display: inline-flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.tl-deadline-row small, .tl-deadline > small { color: var(--muted); font-size: .76rem; }
.tl-deadline-row .t-countdown { font-size: 1.05rem; }
.tournament-lobby-chat { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, .18); }

/* ------------------------------------------------------------------ cuadro */
.tournament-bracket-panel {
    border: 1px solid rgba(251, 191, 36, .3);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, .12), transparent 55%),
        var(--panel);
}
.tournament-bracket-head .screen-kicker { display: inline-flex; align-items: center; }
.bracket-scroll { overflow-x: auto; padding-bottom: 6px; }
.bracket-mirrored {
    grid-template-columns: repeat(var(--bracket-columns, 1), minmax(170px, 1fr));
    column-gap: 30px;
    row-gap: 0;
    overflow: visible;
    min-width: min-content;
}
.bracket-column { grid-template-rows: auto 1fr; }
.bracket-column h4 {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, .45);
    border: 1px solid rgba(148, 163, 184, .18);
}
.bracket-column-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 0; }
.bracket-pair {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 14px;
    padding: 7px 0;
}
/* Conector «]» entre los dos enfrentamientos del par y la línea hacia la ronda siguiente. */
.bracket-left .bracket-pair:not(.single)::after,
.bracket-right .bracket-pair:not(.single)::after {
    content: "";
    position: absolute;
    top: 25%;
    bottom: 25%;
    width: 15px;
    border: 2px solid rgba(251, 191, 36, .45);
    pointer-events: none;
}
.bracket-left .bracket-pair:not(.single)::after { right: -15px; border-left: 0; border-radius: 0 10px 10px 0; }
.bracket-right .bracket-pair:not(.single)::after { left: -15px; border-right: 0; border-radius: 10px 0 0 10px; }
.bracket-left .bracket-pair::before,
.bracket-right .bracket-pair::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 15px;
    border-top: 2px solid rgba(251, 191, 36, .45);
    pointer-events: none;
}
.bracket-left .bracket-pair::before { right: -30px; }
.bracket-right .bracket-pair::before { left: -30px; }
.bracket-left .bracket-pair.single::before { right: -30px; width: 30px; }
.bracket-right .bracket-pair.single::before { left: -30px; width: 30px; }
.bracket-center { align-content: start; }
.bracket-center-stack { display: grid; justify-items: center; align-content: center; gap: 10px; height: 100%; width: 100%; justify-self: stretch; }
.bracket-center-stack > .bracket-column-matches,
.bracket-center-stack > .bracket-champion { width: 100%; }
.bracket-center .tournament-trophy { width: 70px; height: 70px; filter: drop-shadow(0 0 16px rgba(251, 191, 36, .45)); }
.bracket-match {
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(30, 41, 59, .85), rgba(2, 6, 23, .75));
    box-shadow: 0 6px 14px rgba(0, 0, 0, .3);
}
.bracket-match.is-bye { opacity: .7; }
.bracket-match.match-in_game { border-color: var(--t-live); box-shadow: 0 0 0 1px rgba(251, 146, 60, .4), 0 0 18px rgba(251, 146, 60, .3); }
.bracket-match.viewer-match { border-color: rgba(56, 189, 248, .8); box-shadow: 0 0 0 1px rgba(56, 189, 248, .35), 0 0 16px rgba(56, 189, 248, .2); }
.bracket-center .bracket-match { border-color: rgba(251, 191, 36, .6); }
.bracket-live {
    display: inline-block;
    width: fit-content;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .1em;
    color: #431407;
    background: var(--t-live, #fb923c);
    animation: tLivePulse 1.6s ease-in-out infinite;
}
.bracket-match > .bracket-live { position: absolute; top: -8px; left: 10px; }
.bracket-seed {
    display: inline-grid;
    place-items: center;
    min-width: 1.5em;
    margin-right: 6px;
    padding: 0 3px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 900;
    color: var(--muted);
    background: rgba(2, 6, 23, .55);
}
.bracket-slot.winner { background: linear-gradient(135deg, rgba(251, 191, 36, .38), rgba(239, 68, 68, .18)); box-shadow: inset 3px 0 0 var(--t-gold, #fbbf24); }
.bracket-slot.winner .bracket-wins { color: #fde68a; }
.bracket-champion.crowned { border-color: var(--t-gold, #fbbf24); background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, .3), rgba(251, 191, 36, .06)); box-shadow: 0 0 26px rgba(251, 191, 36, .25); }
.tournament-live-list strong { display: inline-flex; align-items: center; gap: 6px; }

.tournament-champion-banner { border-radius: 16px; box-shadow: 0 0 30px rgba(251, 191, 36, .18); }
.tournament-champion-banner strong { font-family: "Kryvania Cinzel", Georgia, serif; font-size: 1.35rem; }

/* ------------------------------------------------------------------ admin: plantillas, tipos y vista previa */
.admin-tournament-form > .admin-tournament-presets,
.admin-tournament-form > .admin-tournament-preview { grid-column: 1 / -1; }
.admin-tournament-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.admin-presets-label { flex-basis: 100%; font-weight: 800; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.admin-preset-card {
    display: grid;
    gap: 2px;
    flex: 1 1 190px;
    text-align: left;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, .4);
    background: linear-gradient(135deg, rgba(8, 47, 73, .7), rgba(2, 6, 23, .6));
}
.admin-preset-card.official { border-color: rgba(251, 191, 36, .55); background: linear-gradient(135deg, rgba(49, 46, 129, .75), rgba(2, 6, 23, .6)); }
.admin-preset-card small { color: var(--muted); font-weight: 600; }
.admin-preset-card.selected { box-shadow: 0 0 0 2px rgba(251, 191, 36, .7); }
.admin-preset-card:disabled { opacity: .45; cursor: not-allowed; }
.admin-sec-mode-card.mode-free { border-color: rgba(34, 211, 238, .45); }
.admin-sec-mode-card.mode-official { border-color: rgba(251, 191, 36, .5); }
.admin-sec-mode-card.mode-free.selected { background: rgba(34, 211, 238, .14); box-shadow: 0 0 0 2px rgba(34, 211, 238, .55); }
.admin-sec-mode-card.mode-official.selected { background: rgba(251, 191, 36, .14); box-shadow: 0 0 0 2px rgba(251, 191, 36, .6); }
.admin-tournament-preview {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 12px;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, .35);
    background: rgba(2, 6, 23, .3);
}
.admin-tournament-preview:empty { display: none; }
.admin-preview-head { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; }
.admin-preview-head small { color: var(--muted); }
.admin-tournament-preview .tournament-list-item { cursor: default; }
.admin-tournament-hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.admin-tournament-hints li { padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .2); background: rgba(2, 6, 23, .35); color: #cbd5e1; }
.admin-tournament-hints li.warn { border-color: rgba(251, 146, 60, .55); color: #fed7aa; }
.admin-tournament-hints li.error { border-color: rgba(239, 68, 68, .6); color: #fecaca; background: rgba(239, 68, 68, .1); }
#btnAdminTournamentSave.has-form-errors { filter: saturate(.4); }

/* ------------------------------------------------------------------ animaciones */
@keyframes tLivePulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes tPulseBorder { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); } 50% { box-shadow: 0 0 0 3px rgba(251, 146, 60, .22); } }
@keyframes tCtaPulse { 0%, 100% { box-shadow: 0 10px 26px rgba(239, 68, 68, .35), 0 0 0 0 rgba(251, 191, 36, .55); } 55% { box-shadow: 0 10px 26px rgba(239, 68, 68, .35), 0 0 0 10px rgba(251, 191, 36, 0); } }
@keyframes tDots { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .tournament-enter-button, .tl-live-tag, .bracket-live, .tournament-status-badge.status-live, .tl-waiting i { animation: none !important; }
    .tournament-list-item { transition: none; }
}

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 1100px) {
    .tournament-hero { grid-template-columns: auto minmax(0, 1fr); }
    .th-time { grid-column: 1 / -1; justify-self: stretch; }
}
@media (max-width: 900px) {
    .tournaments-layout { grid-template-columns: 1fr; }
    .admin-tournament-preview { grid-template-columns: 1fr; }
    .tl-versus { grid-template-columns: 1fr; }
    .tl-plate.self, .tl-plate.opponent { clip-path: none; padding: 14px 12px; }
    .tl-score { order: 2; }
    .tl-plate.opponent { order: 3; }
}
@media (max-width: 560px) {
    .tournament-hero { grid-template-columns: 1fr; text-align: left; }
    .th-crest .tournament-crest { width: 56px; height: 56px; }
    .tournament-register-box.registered { grid-template-columns: 1fr; }
}
