:root {
    --connect4-size: min(68vh, 680px, 62vw);
    --disc-red: #f34b6d;
    --disc-red-light: #ff9aad;
    --disc-yellow: #f4bd35;
    --disc-yellow-light: #fff09a;
    --board-blue: #6e55e8;
}

.connect4-brand-mark {
    display: grid;
    grid-template-columns: repeat(4, 7px);
    gap: 3px;
    align-items: end;
    width: 40px;
    height: 35px;
    padding: 5px;
    border: 1px solid rgba(177,159,255,.25);
    border-radius: 10px;
    background: rgba(128,101,245,.10);
}
.connect4-brand-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--disc-red); box-shadow: 0 0 9px rgba(243,75,109,.5); }
.connect4-brand-mark i:nth-child(2), .connect4-brand-mark i:nth-child(4) { background: var(--disc-yellow); box-shadow: 0 0 9px rgba(244,189,53,.42); }

.connect4-mode-icon {
    display: grid;
    grid-template-columns: repeat(4, 11px);
    align-content: center;
    justify-content: center;
    gap: 4px;
}
.connect4-mode-icon i { width: 11px; height: 11px; border-radius: 50%; background: var(--disc-red); box-shadow: 0 0 12px rgba(243,75,109,.45); }
.connect4-mode-icon i:last-child { background: var(--disc-yellow); box-shadow: 0 0 12px rgba(244,189,53,.42); }

.connect4-game-layout {
    grid-template-columns: minmax(0, var(--connect4-size)) 350px;
    align-items: center;
}
.connect4-game-layout .player-strip { grid-template-columns: 43px minmax(0,1fr) auto; }
.connect4-board-stage {
    position: relative;
    width: var(--connect4-size);
    max-width: 100%;
    margin: 8px auto;
    padding-top: calc(var(--connect4-size) * .095);
    filter: drop-shadow(0 34px 45px rgba(0,0,0,.34));
}
.connect4-board-stage::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 7%;
    right: 7%;
    bottom: -4%;
    height: 9%;
    border-radius: 50%;
    background: rgba(50,30,130,.46);
    filter: blur(18px);
}
.connect4-board {
    position: relative;
    z-index: 2;
    display: grid;
    width: 100%;
    aspect-ratio: 7 / 6;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: clamp(4px, .8vw, 10px);
    padding: clamp(9px, 1.45vw, 17px);
    overflow: hidden;
    border: 1px solid rgba(193,180,255,.42);
    border-radius: clamp(18px, 2.2vw, 28px);
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), transparent 30%),
        linear-gradient(145deg, #765ff0, #5037c7 75%, #3a2897);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.24),
        inset 0 -14px 30px rgba(30,17,100,.28),
        0 20px 50px rgba(60,35,165,.27);
}
.connect4-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 44%, #09090d 0 58%, #2e2080 60% 66%, rgba(255,255,255,.12) 68% 72%, #4b36ba 74%);
    box-shadow: inset 0 5px 10px rgba(0,0,0,.52), 0 1px 0 rgba(255,255,255,.14);
    cursor: pointer;
}
.connect4-cell::after {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    opacity: 0;
    transform: scale(.86);
    transition: transform .2s ease, opacity .2s ease, filter .2s ease;
}
.connect4-cell.is-red::after {
    opacity: 1;
    transform: scale(1);
    background: radial-gradient(circle at 34% 27%, var(--disc-red-light), var(--disc-red) 46%, #bd2447 100%);
    box-shadow: inset 0 2px 2px rgba(255,255,255,.38), inset 0 -7px 13px rgba(123,18,45,.25), 0 4px 9px rgba(38,5,17,.38);
}
.connect4-cell.is-yellow::after {
    opacity: 1;
    transform: scale(1);
    background: radial-gradient(circle at 34% 27%, var(--disc-yellow-light), var(--disc-yellow) 48%, #c18116 100%);
    box-shadow: inset 0 2px 2px rgba(255,255,255,.46), inset 0 -7px 13px rgba(122,72,3,.2), 0 4px 9px rgba(35,23,2,.36);
}
.connect4-cell.is-new::after { animation: connect4-drop .52s cubic-bezier(.22,.82,.28,1.12) both; }
.connect4-cell.is-winning::after { animation: connect4-win 1s ease-in-out infinite; }
.connect4-cell.is-playable:hover { filter: brightness(1.13); }
.connect4-cell:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
.connect4-cell.is-disabled { cursor: default; }

.column-preview {
    position: absolute;
    z-index: 4;
    top: 0;
    left: 0;
    width: calc(100% / 7);
    aspect-ratio: 1;
    padding: 1.2%;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(var(--preview-column, 0) * 100%));
    transition: transform .16s cubic-bezier(.2,.8,.2,1), opacity .16s ease;
}
.column-preview::after {
    content: "";
    display: block;
    width: 76%;
    height: 76%;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 27%, var(--disc-red-light), var(--disc-red) 46%, #bd2447 100%);
    box-shadow: 0 8px 24px rgba(243,75,109,.34), inset 0 2px 2px rgba(255,255,255,.38);
}
.column-preview.is-yellow::after { background: radial-gradient(circle at 34% 27%, var(--disc-yellow-light), var(--disc-yellow) 48%, #c18116 100%); box-shadow: 0 8px 24px rgba(244,189,53,.3); }
.column-preview.is-visible { opacity: .88; }

.connect4-color-chip { width: 28px; height: 28px; border-radius: 50%; }
.connect4-color-chip--red { background: radial-gradient(circle at 34% 27%, var(--disc-red-light), var(--disc-red) 50%, #bd2447); box-shadow: 0 0 20px rgba(243,75,109,.3); }
.connect4-color-chip--yellow { background: radial-gradient(circle at 34% 27%, var(--disc-yellow-light), var(--disc-yellow) 50%, #c18116); box-shadow: 0 0 20px rgba(244,189,53,.28); }

.connect4-history-disc { flex: 0 0 14px; width: 14px; height: 14px; border-radius: 50%; }
.connect4-history-disc.is-red { background: var(--disc-red); box-shadow: 0 0 8px rgba(243,75,109,.25); }
.connect4-history-disc.is-yellow { background: var(--disc-yellow); box-shadow: 0 0 8px rgba(244,189,53,.22); }
.move-row { grid-template-columns: 15px minmax(0,1fr) auto; }
.connect4-panel-actions { display: grid; }

.connect4-result-symbol {
    display: grid;
    grid-template-columns: repeat(4, 15px);
    place-content: center;
    gap: 3px;
    background: linear-gradient(145deg, rgba(111,83,231,.32), rgba(56,36,146,.48));
}
.connect4-result-symbol i { width: 15px; height: 15px; border-radius: 50%; background: var(--disc-red); box-shadow: 0 0 11px rgba(243,75,109,.48); }
.connect4-result-symbol.is-loss i { background: var(--disc-yellow); box-shadow: 0 0 11px rgba(244,189,53,.4); }
.connect4-result-symbol.is-draw i:nth-child(even) { background: var(--disc-yellow); }

/* =========================================================
   PRISM PUISSANCE 4 10.8 · Tournois, bracket et spectateurs
   ========================================================= */

.mode-card--tournament {
    grid-column: 1 / -1;
    min-height: 250px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
    align-items: center;
    gap: clamp(30px, 6vw, 90px);
    border-color: rgba(244, 189, 53, .13);
    background:
        radial-gradient(circle at 9% 50%, rgba(244, 189, 53, .08), transparent 30%),
        linear-gradient(135deg, rgba(26, 24, 30, .94), rgba(13, 13, 17, .88));
}
.mode-card--tournament .mode-card__halo {
    top: -170px;
    right: 12%;
    background: rgba(244, 189, 53, .12);
}
.tournament-card-copy {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 27px;
}
.tournament-card-copy .mode-icon { margin: 0; }
.tournament-card-copy h2 {
    margin-top: 8px;
    font-size: clamp(31px, 4vw, 48px);
}
.tournament-card-copy p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}
.tournament-card-action {
    display: grid;
    gap: 13px;
    padding: 20px;
    border: 1px solid rgba(244, 189, 53, .1);
    border-radius: 21px;
    background: rgba(0, 0, 0, .15);
}
.tournament-card-action .mode-note { margin: 0; }
.tournament-mode-icon {
    position: relative;
    overflow: hidden;
    color: #ffe7a2;
}
.tournament-mode-icon i {
    position: absolute;
    width: 18px;
    height: 1px;
    background: rgba(244, 189, 53, .58);
    box-shadow: 0 0 8px rgba(244, 189, 53, .35);
}
.tournament-mode-icon i:nth-child(1) { left: 11px; top: 22px; }
.tournament-mode-icon i:nth-child(2) { left: 11px; bottom: 22px; }
.tournament-mode-icon i:nth-child(3) { right: 11px; top: 22px; }
.tournament-mode-icon i:nth-child(4) { right: 11px; bottom: 22px; }
.tournament-mode-icon i:nth-child(1),
.tournament-mode-icon i:nth-child(2) { transform-origin: right; transform: rotate(26deg); }
.tournament-mode-icon i:nth-child(3),
.tournament-mode-icon i:nth-child(4) { transform-origin: left; transform: rotate(-26deg); }
.tournament-mode-icon span {
    position: relative;
    z-index: 2;
    font-size: 23px;
    text-shadow: 0 0 18px rgba(244, 189, 53, .55);
}
.tournament-size-control {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}
.tournament-size-control button {
    min-height: 43px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    transition: transform .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}
.tournament-size-control button:hover {
    transform: translateY(-1px);
    color: var(--text);
    background: rgba(255, 255, 255, .055);
}
.tournament-size-control button.is-active {
    border-color: rgba(244, 189, 53, .28);
    background: rgba(244, 189, 53, .1);
    color: #ffe5a0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.tournament-watch-section {
    margin-top: 22px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid rgba(72, 213, 221, .13);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 0, rgba(72, 213, 221, .07), transparent 34%),
        rgba(14, 15, 20, .82);
}
.tournament-watch-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}
.tournament-watch-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(23px, 3vw, 32px);
    font-weight: 580;
    letter-spacing: -.035em;
}
.tournament-watch-heading .text-button { margin: 0; }
.tournament-watch-list { display: grid; gap: 10px; }
.tournament-watch-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 94px;
    padding: 17px 19px;
    border: 1px solid rgba(72, 213, 221, .1);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(14, 28, 35, .78), rgba(11, 13, 19, .92));
    transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.tournament-watch-card:hover {
    border-color: rgba(72, 213, 221, .28);
    background: linear-gradient(135deg, rgba(16, 35, 42, .86), rgba(11, 13, 19, .95));
    transform: translateY(-1px);
}
.tournament-watch-card__copy { min-width: 0; }
.tournament-watch-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}
.tournament-watch-card__title strong {
    color: #e9ffff;
    font-size: 14px;
    letter-spacing: .04em;
}
.tournament-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7ff4ed;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .11em;
}
.tournament-live-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #58e4dc;
    box-shadow: 0 0 11px rgba(88, 228, 220, .7);
    animation: spectator-live 1.45s ease-in-out infinite;
}
.tournament-watch-card p {
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tournament-watch-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8fe9e5;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    text-align: right;
    transition: color .2s ease, transform .2s ease;
}
.tournament-watch-link::before { content: "→ "; }
.tournament-watch-link:hover {
    color: #d8ffff;
    transform: translateX(2px);
}
.tournament-watch-link:focus-visible {
    outline: 2px solid #8fe9e5;
    outline-offset: 5px;
    border-radius: 3px;
}
.tournament-watch-empty {
    margin: 0;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, .08);
    border-radius: 14px;
    color: var(--muted-2);
    font-size: 10px;
    text-align: center;
}
.tournament-watch-empty.is-error { color: #ee9aad; }

.tournament-queue-modal { width: min(470px, 100%); }
.tournament-queue-emblem {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    margin: 0 auto 25px;
    border: 1px solid rgba(244, 189, 53, .2);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(244, 189, 53, .16), transparent 66%),
        rgba(255, 255, 255, .02);
    color: #ffe8a9;
    font-size: 26px;
    box-shadow: 0 0 50px rgba(244, 189, 53, .1);
    animation: tournament-emblem 2.4s ease-in-out infinite;
}
.tournament-queue-count {
    display: grid;
    gap: 5px;
    margin: 25px 0 12px;
}
.tournament-queue-count strong {
    color: #fff0c0;
    font-size: 28px;
    font-weight: 620;
    letter-spacing: -.04em;
}
.tournament-queue-count span {
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .14em;
}
.tournament-queue-track {
    height: 4px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, .065);
}
.tournament-queue-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8d73ff, #f4bd35);
    box-shadow: 0 0 17px rgba(244, 189, 53, .38);
    transition: width .65s cubic-bezier(.2, .8, .2, 1);
}
.tournament-queue-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 12px;
    margin: 16px 0 12px;
}
.tournament-queue-dots i {
    width: 7px;
    height: 7px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    background: rgba(255, 255, 255, .035);
}
.tournament-queue-dots i.is-filled {
    border-color: rgba(244, 189, 53, .28);
    background: #f4bd35;
    box-shadow: 0 0 9px rgba(244, 189, 53, .5);
    animation: queue-dot-in .38s cubic-bezier(.2, .8, .2, 1) both;
}

body.has-tournament-arena { overflow: hidden; }
.tournament-arena {
    position: fixed;
    z-index: 1450;
    inset: 0;
    overflow: hidden;
    background: #070a11;
    color: var(--text);
    isolation: isolate;
    animation: tournament-arena-in .75s cubic-bezier(.16, .85, .26, 1) both;
}
.tournament-arena__backdrop {
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        linear-gradient(rgba(79, 223, 230, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 223, 230, .025) 1px, transparent 1px),
        radial-gradient(circle at 50% 44%, rgba(50, 220, 224, .075), transparent 37%),
        radial-gradient(circle at 50% 82%, rgba(244, 189, 53, .055), transparent 30%),
        linear-gradient(145deg, #090d17, #050810 62%, #090b12);
    background-size: 54px 54px, 54px 54px, auto, auto, auto;
}
.tournament-arena__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .055;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tournament-arena__header {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    min-height: 108px;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 32px 18px;
    text-align: center;
    pointer-events: none;
    background: linear-gradient(#070a11 0, rgba(7, 10, 17, .88) 65%, transparent);
}
.tournament-arena__header h1 {
    margin: 5px 0 0;
    color: #f7ecd3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 650;
    letter-spacing: .04em;
    text-shadow: 0 0 32px rgba(244, 189, 53, .14);
}
.tournament-arena__reward {
    position: absolute;
    right: 30px;
    top: 28px;
    display: grid;
    justify-items: end;
    gap: 3px;
}
.tournament-arena__reward span {
    color: var(--muted-2);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .15em;
}
.tournament-arena__reward strong { color: #ffe29a; font-size: 14px; }

.tournament-viewport {
    position: absolute;
    z-index: 2;
    inset: 90px 0 62px;
    overflow: hidden;
}
.tournament-camera {
    position: absolute;
    left: 0;
    top: 0;
    width: 1800px;
    height: 1100px;
    transform-origin: 0 0;
    will-change: transform;
    transition: transform 1.5s cubic-bezier(.16, .8, .18, 1);
}
.tournament-lines,
.tournament-nodes {
    position: absolute;
    inset: 0;
    width: 1800px;
    height: 1100px;
}
.tournament-line {
    fill: none;
    stroke: rgba(72, 213, 221, .3);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 4px rgba(72, 213, 221, .17));
    transition: stroke .45s ease, opacity .45s ease;
}
.tournament-line.is-complete { stroke: rgba(72, 231, 226, .7); }
.tournament-line.is-viewer {
    stroke: #f5c95b;
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(245, 201, 91, .5));
}
.tournament-line.is-animated {
    stroke-dasharray: 12 9;
    animation: tournament-route 1.1s linear infinite;
}
.tournament-loss-line {
    fill: none;
    stroke: #ba4c67;
    stroke-width: 3;
    stroke-dasharray: 11 9;
    filter: drop-shadow(0 0 8px rgba(186, 76, 103, .45));
    animation: tournament-route 1.1s linear infinite;
}
.bracket-match {
    position: absolute;
    display: grid;
    width: 218px;
    min-height: 68px;
    grid-template-rows: 1fr 1fr;
    overflow: hidden;
    border: 1px solid rgba(66, 217, 224, .22);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(11, 27, 36, .93), rgba(7, 15, 24, .96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 9px 25px rgba(0, 0, 0, .22);
    transform: translate(-50%, -50%);
    transition: border-color .4s ease, box-shadow .4s ease, opacity .4s ease, transform .4s ease;
}
.bracket-match.is-pending { opacity: .48; }
.bracket-match.is-current {
    z-index: 4;
    border-color: rgba(245, 201, 91, .82);
    box-shadow: 0 0 0 2px rgba(245, 201, 91, .08), 0 0 34px rgba(245, 201, 91, .18);
    transform: translate(-50%, -50%) scale(1.05);
}
.bracket-match.is-viewer:not(.is-current) { border-color: rgba(245, 201, 91, .38); }
.bracket-match.is-finished { border-color: rgba(72, 213, 221, .42); }
.bracket-match.is-watchable {
    cursor: pointer;
    border-color: rgba(72, 231, 226, .58);
    box-shadow: 0 0 0 1px rgba(72, 231, 226, .06), 0 0 28px rgba(72, 231, 226, .11);
}
.bracket-match.is-watchable:hover,
.bracket-match.is-watchable:focus-visible {
    z-index: 5;
    border-color: rgba(126, 255, 248, .92);
    outline: none;
    box-shadow: 0 0 0 2px rgba(126, 255, 248, .1), 0 0 42px rgba(72, 231, 226, .24);
    transform: translate(-50%, -50%) scale(1.07);
}
.bracket-match.is-watched {
    border-color: rgba(245, 201, 91, .86);
    box-shadow: 0 0 0 2px rgba(245, 201, 91, .1), 0 0 38px rgba(245, 201, 91, .2);
}
.bracket-match.is-final {
    width: 250px;
    min-height: 78px;
    border-color: rgba(245, 201, 91, .42);
    background:
        radial-gradient(circle at 50% 50%, rgba(245, 201, 91, .09), transparent 70%),
        linear-gradient(145deg, rgba(17, 29, 34, .96), rgba(8, 14, 21, .98));
}
.bracket-player {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 9px;
    color: #9aa7ad;
    font-size: 10px;
}
.bracket-player + .bracket-player { border-top: 1px solid rgba(66, 217, 224, .1); }
.bracket-player.is-winner {
    background: rgba(72, 213, 221, .07);
    color: #d8ffff;
}
.bracket-player.is-viewer {
    background: rgba(245, 201, 91, .08);
    color: #fff0be;
}
.bracket-player__avatar {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: #25333a;
    color: #e9faff;
    font-size: 8px;
    font-weight: 800;
}
.bracket-player__avatar img { width: 100%; height: 100%; object-fit: cover; }
.bracket-player strong {
    overflow: hidden;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bracket-player small {
    color: rgba(255, 255, 255, .28);
    font-size: 7px;
    font-weight: 800;
}
.bracket-player.is-winner small { color: #62e7df; }
.bracket-trophy {
    position: absolute;
    left: 900px;
    top: 28px;
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 1px solid rgba(245, 201, 91, .26);
    border-radius: 50%;
    background: rgba(245, 201, 91, .07);
    color: #ffe39b;
    font-size: 23px;
    transform: translateX(-50%);
    box-shadow: 0 0 35px rgba(245, 201, 91, .12);
}
.bracket-round-label {
    position: absolute;
    color: rgba(134, 213, 217, .52);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .16em;
    text-align: center;
    transform: translateX(-50%);
}

.loser-dock {
    position: absolute;
    left: 540px;
    top: 870px;
    display: grid;
    width: 720px;
    min-height: 168px;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 21px;
    border: 1px solid rgba(186, 76, 103, .24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 50%, rgba(186, 76, 103, .11), transparent 45%),
        rgba(8, 13, 20, .95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.loser-dock.is-viewer-destination {
    border-color: rgba(230, 101, 127, .68);
    box-shadow: 0 0 45px rgba(186, 76, 103, .16);
}
.loser-dock__title {
    display: grid;
    align-content: center;
    gap: 4px;
    padding-right: 18px;
    border-right: 1px solid rgba(186, 76, 103, .14);
}
.loser-dock__title span {
    color: #8e5663;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .18em;
}
.loser-dock__title strong {
    color: #d7a4af;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.05;
}
.loser-dock__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: center;
    gap: 7px;
    max-height: 124px;
    overflow: auto;
    padding-right: 4px;
    scrollbar-color: rgba(186, 76, 103, .34) transparent;
    scrollbar-width: thin;
}
.loser-entry {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 7px;
    border: 1px solid rgba(255, 255, 255, .045);
    border-radius: 8px;
    background: rgba(255, 255, 255, .022);
    color: #8e939a;
}
.loser-entry.is-viewer {
    border-color: rgba(230, 101, 127, .4);
    background: rgba(186, 76, 103, .09);
    color: #f4bac6;
}
.loser-entry i {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #2b2229;
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
}
.loser-entry i img { width: 100%; height: 100%; object-fit: cover; }
.loser-entry span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.loser-entry small { color: #754b56; font-size: 6px; font-weight: 800; }
.loser-empty {
    grid-column: 1 / -1;
    align-self: center;
    color: rgba(255, 255, 255, .22);
    font-size: 9px;
    text-align: center;
}

.tournament-faceoff,
.tournament-outcome {
    position: absolute;
    z-index: 30;
    top: 50%;
    left: 50%;
    width: min(680px, calc(100% - 32px));
    padding: clamp(25px, 4vw, 42px);
    border: 1px solid rgba(245, 201, 91, .2);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 0, rgba(245, 201, 91, .09), transparent 44%),
        rgba(7, 11, 18, .93);
    box-shadow: 0 45px 130px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .04);
    text-align: center;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(22px);
    animation: faceoff-in .72s cubic-bezier(.16, .85, .26, 1) both;
}
.tournament-faceoff::before,
.tournament-outcome::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -100vh -100vw;
    background: rgba(3, 6, 10, .48);
    backdrop-filter: blur(5px);
}
.faceoff-versus {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 26px 0 22px;
}
.faceoff-player {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 0;
}
.faceoff-player strong {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(16px, 3vw, 23px);
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.faceoff-player > span {
    color: var(--muted-2);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .15em;
}
.faceoff-avatar {
    display: grid;
    width: clamp(72px, 12vw, 108px);
    height: clamp(72px, 12vw, 108px);
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 27px;
    background: linear-gradient(145deg, #d8d2df, #8d8a95);
    color: #15121b;
    font-size: 28px;
    font-weight: 800;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .3);
}
.faceoff-player--opponent .faceoff-avatar {
    border-color: rgba(72, 213, 221, .2);
    background: linear-gradient(145deg, #b8dde0, #557379);
}
.faceoff-avatar img { width: 100%; height: 100%; object-fit: cover; }
.faceoff-vs {
    position: relative;
    display: grid;
    height: 90px;
    place-items: center;
}
.faceoff-vs span {
    position: relative;
    z-index: 2;
    color: #ffe39b;
    font-family: Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    text-shadow: 0 0 24px rgba(245, 201, 91, .45);
}
.faceoff-vs i {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(transparent, rgba(245, 201, 91, .5), transparent);
    transform: rotate(20deg);
}
.tournament-faceoff h2,
.tournament-outcome h2 {
    margin: 8px 0 8px;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 580;
    letter-spacing: -.045em;
}
.tournament-faceoff p,
.tournament-outcome p {
    margin: 0 auto 25px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}
.tournament-faceoff .button,
.tournament-outcome .button { min-height: 48px; }
.tournament-outcome { width: min(520px, calc(100% - 32px)); }
.tournament-outcome__symbol {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin: 0 auto 23px;
    border: 1px solid rgba(245, 201, 91, .22);
    border-radius: 50%;
    background: rgba(245, 201, 91, .08);
    color: #ffe39b;
    font-size: 26px;
    box-shadow: 0 0 42px rgba(245, 201, 91, .12);
}
.tournament-outcome.is-loss {
    border-color: rgba(210, 84, 111, .28);
    background:
        radial-gradient(circle at 50% 0, rgba(186, 76, 103, .11), transparent 44%),
        rgba(9, 10, 17, .95);
}
.tournament-outcome.is-loss .tournament-outcome__symbol {
    border-color: rgba(210, 84, 111, .28);
    background: rgba(186, 76, 103, .09);
    color: #f1a5b5;
}
.tournament-outcome.is-champion .tournament-outcome__symbol {
    animation: champion-symbol 1.7s ease-in-out infinite;
}
.tournament-outcome .xp-award { margin: 0 0 23px; }
.tournament-outcome > .text-button { margin-top: 14px; }

.tournament-arena__footer {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    min-height: 67px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 28px max(13px, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(7, 10, 17, .94) 44%, #070a11);
}
.tournament-arena__footer p { margin: 0; color: var(--muted); font-size: 9px; }
.tournament-arena__footer > div { display: flex; gap: 17px; }
.tournament-arena__footer .text-button { margin: 0; }

@keyframes tournament-emblem {
    0%, 100% { transform: scale(1); box-shadow: 0 0 50px rgba(244, 189, 53, .1); }
    50% { transform: scale(1.045); box-shadow: 0 0 65px rgba(244, 189, 53, .2); }
}
@keyframes queue-dot-in {
    from { opacity: 0; transform: scale(.3); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes tournament-arena-in {
    from { opacity: 0; filter: blur(8px); }
    to { opacity: 1; filter: blur(0); }
}
@keyframes faceoff-in {
    from { opacity: 0; transform: translate(-50%, -44%) scale(.94); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes tournament-route {
    to { stroke-dashoffset: -42; }
}
@keyframes champion-symbol {
    0%, 100% { transform: scale(1); box-shadow: 0 0 42px rgba(245, 201, 91, .12); }
    50% { transform: scale(1.08); box-shadow: 0 0 65px rgba(245, 201, 91, .3); }
}
@keyframes spectator-live {
    0%, 100% { opacity: .55; transform: scale(.82); }
    50% { opacity: 1; transform: scale(1.12); }
}

@keyframes connect4-drop {
    0% { transform: translateY(calc(-700% - 55px)) scale(.92); }
    68% { transform: translateY(7%) scale(1.02,.96); }
    84% { transform: translateY(-3%) scale(.98,1.02); }
    100% { transform: translateY(0) scale(1); }
}
@keyframes connect4-win {
    0%,100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(.82); filter: brightness(1.45); }
}

@media (max-width: 1100px) {
    :root { --connect4-size: min(66vh, 650px, 61vw); }
    .connect4-game-layout { grid-template-columns: minmax(0,var(--connect4-size)) 325px; }
}
@media (max-width: 860px) {
    :root { --connect4-size: min(calc(100vw - 38px), 680px); }
    .connect4-game-layout { grid-template-columns: 1fr; }
    .mode-card--tournament {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}
@media (max-width: 420px) {
    :root { --connect4-size: calc(100vw - 20px); }
    .connect4-board { gap: 3px; padding: 7px; border-radius: 17px; }
    .connect4-board-stage { padding-top: calc(var(--connect4-size) * .11); }
}
@media (max-width: 620px) {
    .connect4-game-layout .player-strip { grid-template-columns: 39px minmax(0,1fr) 26px; }
    .connect4-color-chip { width: 24px; height: 24px; }
    .tournament-card-copy {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .tournament-card-copy .mode-icon { width: 66px; height: 66px; border-radius: 19px; }
    .tournament-card-action { padding: 15px; }
    .tournament-watch-heading { align-items: center; }
    .tournament-watch-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .tournament-watch-card__title { align-items: flex-start; flex-direction: column; }
    .tournament-watch-card p { white-space: normal; }
    .tournament-watch-link { text-align: left; }
    .tournament-arena__header {
        min-height: 94px;
        padding-inline: 14px;
    }
    .tournament-arena__header h1 { font-size: 22px; }
    .tournament-arena__reward {
        position: static;
        display: none;
    }
    .tournament-viewport { inset: 79px 0 80px; }
    .tournament-arena__footer {
        min-height: 82px;
        align-items: flex-start;
        padding-inline: 15px;
    }
    .tournament-arena__footer p { max-width: 52%; line-height: 1.45; }
    .tournament-arena__footer > div { display: grid; justify-items: end; gap: 5px; }
    .faceoff-versus { grid-template-columns: minmax(0, 1fr) 45px minmax(0, 1fr); gap: 6px; }
    .faceoff-vs span { font-size: 19px; }
    .tournament-faceoff,
    .tournament-outcome { padding: 25px 18px; border-radius: 22px; }
    .tournament-faceoff h2,
    .tournament-outcome h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .connect4-cell.is-new::after,
    .connect4-cell.is-winning::after,
    .tournament-line,
    .tournament-loss-line,
    .tournament-queue-emblem,
    .tournament-outcome__symbol { animation: none; }
    .tournament-live-badge::before { animation: none; }
    .tournament-camera { transition-duration: .01ms; }
}
