.tournament-shell{max-width:1250px;margin:32px auto;padding:0 22px}.tournament-bar,.tournament-tabs{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}.tournament-shell h1{font-size:clamp(28px,5vw,54px);margin:0}.tournament-shell h2{font-size:22px}.tournament-shell select,.tournament-shell input,.tournament-shell textarea{width:100%;min-height:40px;padding:9px;background:#101e2d;color:#eefaff;border:1px solid #36536d;border-radius:8px}.tournament-shell label{display:grid;gap:6px;font-size:14px}.tournament-shell form{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}.tournament-shell form button{align-self:end}.tournament-shell textarea{min-height:90px}.tournament-shell button,.tournament-shell .button{padding:10px 16px;border-radius:8px;border:1px solid #3c6074;background:#122e3d;color:#eaffff;cursor:pointer}.tournament-shell button.active{background:#9ee000;color:#132000}.tournament-shell button:disabled{opacity:.5;cursor:default}.tournament-shell details{background:#101c29;border:1px solid #304b60;padding:18px;border-radius:14px;margin:18px 0}.tournament-shell summary{cursor:pointer;font-weight:700;margin-bottom:12px}.tournament-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:18px}.tournament-card{background:linear-gradient(135deg,#132b3b,#0d1926);border:1px solid #35556b;border-top:3px solid #70dce4;border-radius:14px;padding:20px;min-width:0}.tournament-card h3{margin:8px 0 16px}.tournament-player{display:flex;justify-content:space-between;gap:12px;padding:10px 0}.tournament-player.lost{color:#ff7c83}.tournament-player.won{color:#b6ee52}.tournament-small{font-size:13px;color:#afc5d3}.tournament-live{color:#a9ee55}.tournament-bracket{display:flex;gap:24px;overflow:auto;padding:12px 0 28px}.tournament-phase{flex:0 0 300px;display:grid;gap:18px;align-content:space-around}.level-chip{display:flex!important;align-items:center;gap:12px;width:100%;text-align:left;margin-top:10px}.difficulty-face{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#a33550;color:white;font-size:22px;border:3px solid #e0ebef;flex-shrink:0}.notice-stack{position:fixed;right:20px;top:22px;z-index:10000;max-width:min(360px,90vw)}.notice-toast{background:#123743;border-left:4px solid #9ee000;padding:18px;border-radius:10px;box-shadow:0 8px 30px #0008;animation:notice-in .25s ease-out}.notice-toast button{display:block;margin-top:10px}.tournament-inbox{max-height:380px;overflow:auto}.notice-item{padding:12px;border-bottom:1px solid #39576a}.tournament-error{color:#ffadb1}.tournament-wide{grid-column:1/-1}@keyframes notice-in{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0s!important;transition-duration:0s!important}}@media(max-width:600px){.tournament-shell{padding:0 12px}.tournament-phase{flex-basis:260px}}

html.tournament-page,body.tournament-page{height:auto;min-height:100%;overflow:auto} .tournament-page .topbar{position:sticky;top:0;z-index:20}.tournament-page .topbar>a{color:#a5e4ec;text-decoration:none;padding:10px}.tournament-shell p{margin:10px 0;line-height:1.5}.tournament-shell input[type=checkbox]{width:22px;height:22px;min-height:0;justify-self:start;accent-color:#9ee000}.tournament-shell input[type=range]{padding:0;min-height:26px}.tournament-shell select[multiple]{min-height:125px}.tournament-page dialog{max-width:min(650px,94vw);max-height:90vh;overflow:auto}.notice-stack{top:65px}.notice-toast{color:#f1fbff}.tournament-phase .tournament-card{position:relative}.tournament-phase:not(:last-child) .tournament-card:after{content:"";position:absolute;right:-25px;top:50%;width:24px;border-top:2px solid #668596}.tournament-podium{display:flex;gap:14px;flex-wrap:wrap}.tournament-podium>div{padding:18px;background:#20362d;border-bottom:3px solid #beeb48;border-radius:10px}
.tournament-bracket{position:relative}.bracket-lines{position:absolute;top:0;left:0;pointer-events:none;overflow:visible}.bracket-lines path{fill:none;stroke:#75b7c8;stroke-width:2}.tournament-phase .tournament-card:after{display:none}.tournament-phase{position:relative}.tournament-card{z-index:1}


/* --- Estados vacíos: antes eran frases sueltas flotando a media página --- */
.tournament-empty{display:grid;justify-items:center;gap:10px;text-align:center;max-width:520px;margin:38px auto;padding:38px 26px;background:linear-gradient(160deg,#132b3b,#0d1926);border:1px solid #2c4658;border-radius:18px}
.tournament-empty-icon{font-size:38px;line-height:1;opacity:.85}
.tournament-empty strong{font-size:19px;color:#eefaff}
.tournament-empty p{margin:0;max-width:42ch;color:#9fb6c6}

/* --- El zoom del cuadro ocupaba el ancho completo de la página --- */
.tournament-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:6px 0 4px}
.tournament-toolbar p{margin:0}
.tournament-zoom{display:flex;align-items:center;gap:10px;font-size:13px;color:#afc5d3;width:auto}
.tournament-zoom input[type=range]{width:170px}

/* --- Estado de la cabecera: sustituye al nombre de edición duplicado --- */
.tournament-status{font-size:13px;color:#9fb6c6;padding:5px 12px;border:1px solid #2f4d61;border-radius:999px}
.tournament-status.live{color:#0f1c07;background:#9ee000;border-color:#9ee000;font-weight:700}

/* --- Punto rojo latiente junto a "En directo" --- */
.live-dot{display:inline-block;width:9px;height:9px;margin-right:9px;border-radius:50%;background:#ff5a5f;box-shadow:0 0 0 0 #ff5a5f99;animation:live-pulse 1.8s infinite}
@keyframes live-pulse{70%{box-shadow:0 0 0 10px #ff5a5f00}100%{box-shadow:0 0 0 0 #ff5a5f00}}

/* --- Podio: oro, plata y bronce en vez de tres cajas verdes iguales --- */
.tournament-podium>div{display:flex;align-items:center;gap:10px;font-weight:600}
.podium-place{font-size:20px;font-weight:800}
.tournament-podium>div.podium-1{background:#3b3316;border-bottom-color:#ffd34d}
.tournament-podium>div.podium-1 .podium-place{color:#ffd34d}
.tournament-podium>div.podium-2{background:#2b3239;border-bottom-color:#cfd8e3}
.tournament-podium>div.podium-2 .podium-place{color:#cfd8e3}
.tournament-podium>div.podium-3{background:#382a1e;border-bottom-color:#d99154}
.tournament-podium>div.podium-3 .podium-place{color:#d99154}

/* --- Próximos grupos: bloque con ritmo, no párrafos sueltos --- */
.tournament-next{display:grid;gap:2px;border-left:3px solid #2f6d7a;padding-left:16px;margin:12px 0}
.tournament-next p{margin:6px 0}

/* --- Tarjetas: que respondan al ratón --- */
.tournament-card{transition:transform .18s ease,border-color .18s ease}
.tournament-card:hover{transform:translateY(-3px);border-color:#70dce4}
@media(prefers-reduced-motion:reduce){.tournament-card:hover{transform:none}.live-dot{animation:none}}

/* --- Formulario de inscripción --- */
.registration-shell{max-width:640px;margin:0 auto}
.registration-shell h1{font-size:clamp(24px,4vw,38px);margin:0 0 4px}
.registration-intro{color:#c2d6e2;margin:14px 0 26px}
.tournament-shell .registration-form{display:grid;gap:22px;grid-template-columns:1fr}
.tournament-shell .registration-field{display:grid;gap:6px}
.tournament-shell .registration-field>label{display:block;font-size:14px;color:#d8ecf6;margin-bottom:6px}
.tournament-shell .registration-form>p{margin:0}
.tournament-shell .registration-field.registration-checkbox{gap:2px}
.registration-help{margin:0;color:#8fa8b9}
.registration-req{color:#9ee000}
.tournament-shell .registration-check{display:flex;align-items:flex-start;gap:12px;font-size:15px;cursor:pointer}
.tournament-shell .registration-check input{width:22px;height:22px;min-height:0;flex-shrink:0;accent-color:#9ee000}
.tournament-shell .registration-submit{width:100%;background:#9ee000;color:#132000;font-weight:700;font-size:16px;padding:14px;border-color:#9ee000}
.registration-submit:disabled{opacity:.6}
.registration-back{display:inline-block;margin-top:14px;color:#9ee000}
@media(max-width:600px){.registration-shell{max-width:100%}}

/* --- Cuadro en espejo: pastillas compactas --- */
.bracket-mirror{align-items:stretch;gap:34px}
.bracket-mirror .tournament-phase{flex:0 0 190px;display:flex;flex-direction:column;gap:0}
/* El título va fijo arriba para que todas las rondas queden a la misma altura;
   los cruces se reparten por el hueco restante y así la final cae centrada. */
.bracket-mirror .tournament-phase h2{flex:0 0 auto;font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#8fb4c4;margin:0 0 14px;text-align:center}
.bracket-mirror .phase-body{flex:1;display:flex;flex-direction:column;justify-content:space-around;gap:10px;min-height:0}
.bracket-final .phase-body{justify-content:center;gap:26px}
.mini-match{display:grid!important;gap:0;width:100%;padding:0!important;overflow:hidden;text-align:left;background:#101f2c;border:1px solid #2f4d61;border-radius:9px;position:relative;transition:border-color .15s,transform .15s}
.mini-match:hover{border-color:#70dce4;transform:translateY(-2px)}
.mini-player{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px 13px;font-size:13px;color:#cfe3ee}
.mini-player+.mini-player{border-top:1px solid #24394a}
.mini-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-score{font-weight:700;color:#9fb6c6;flex-shrink:0}
.mini-player.won{color:#b6ee52;font-weight:700}
.mini-player.won .mini-score{color:#b6ee52}
.mini-player.lost{color:#ff7c83;opacity:.75}
.mini-player.pending{color:#7f97a8;font-style:italic}
.mini-match.live{border-color:#ff5a5f}
.mini-live{position:absolute;top:-1px;right:-1px;background:#ff5a5f;color:#1a0406;font-size:9px;font-weight:800;letter-spacing:.06em;padding:2px 6px;border-radius:0 8px 0 8px}

/* La final manda: se distingue del resto de columnas. */
.bracket-final{flex:0 0 230px!important}
.bracket-final h2{color:#ffd34d!important;font-size:15px!important}
.bracket-final .mini-match{border-color:#8a7430;background:linear-gradient(160deg,#2a2413,#14202c);box-shadow:0 0 0 1px #8a743044}
.bracket-final .mini-player{padding:15px 14px;font-size:14px}
.bracket-third{}
.bracket-third h3{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#8fb4c4;margin:0 0 6px;text-align:center;font-weight:600}
.tournament-warn{color:#e3c766}

/* En la mitad derecha los nombres miran hacia el centro. */
.bracket-mirror .tournament-phase:has(~.bracket-final){}
.bracket-mirror>.tournament-phase{position:relative}
@media(max-width:700px){.bracket-mirror .tournament-phase{flex-basis:150px}.bracket-final{flex:0 0 170px!important}}
