/* Tournament backgrounds, copy and responsive framing. Depth roles, controls and
   transitions come from the original home-hero-2.css. */
.hero--personalized { padding-top: calc(var(--section-anchor-offset) + 1rem); }
.hero--personalized .hero__bg {
    background: var(--tournament-hero-bg-color) var(--hero-bg-image-desktop, none) var(--hero-bg-position, center) / cover no-repeat;
    filter: brightness(0.7);
}
.hero--personalized .hero__entry-fx,
.hero--personalized .hero__ball-layer { display: none; }
.hero-2--tournament .hero__content { padding: 0; margin: 0; }
.hero-2--tournament .hero-2__controls[hidden] { display: none; }
.hero-2--tournament .hero-2__player img {
    object-position: var(--hero-player-focus-x, 50%) bottom;
    transform: translateY(var(--hero-player-offset-y, 0%)) scale(var(--hero-player-scale, 1));
    transform-origin: bottom center;
}
@media (max-width: 768px) {
    .hero-2--tournament {
        --tournament-player-gutter: 0.5rem;
        --tournament-player-top: var(--section-anchor-offset, 6.5rem);
        --tournament-controls-bottom: max(calc(max(2rem, env(safe-area-inset-bottom)) + 5svh), calc(6rem + env(safe-area-inset-bottom)));
    }
    /* Fit the centered image into the available viewport instead of limiting it
       to 64vw. Account for the original carousel scale to clear the navigation.
       Side/back players keep their original size, depth and motion. */
    .hero-2--tournament .hero-2__player[data-role="center"] {
        width: calc((100% - 2 * var(--tournament-player-gutter)) / var(--hero-2-center-scale));
        height: calc((75% - var(--tournament-player-top)) / var(--hero-2-center-scale));
    }
    /* Reserve the floating registration button, then the original 3.15rem
       carousel controls and a gap before the tournament actions. */
    .hero-2--tournament .hero-2__controls { bottom: var(--tournament-controls-bottom); }
    .hero-2--tournament .hero__content { bottom: calc(var(--tournament-controls-bottom) + 3.15rem + 1rem); }
    .hero--personalized .hero__bg { background-image: var(--hero-bg-image-mobile, none); }
}
