/*
 | Fixes to the compiled stylesheet, served as they are (not through the Vite build). Loaded by layouts/app after the
 | build's CSS: being outside any @layer, a rule here wins over the bundle's @layer components ones of the same weight.
 | Each block says where it belongs: fold it into that source file at the next `npm run build`, then delete it here.
 */

/* ── resources/css/server-page.css — the blocks under the hero: one rhythm ──
   The strips that hang from the hero (the owner's line, the invitation to claim, a cup prize waiting, the cup) stand
   0.875rem apart, as the hero from the crumbs; the cards' grid then comes at its own gap. Before: the claim band and
   the cup strip touched (0px), the grid came 20px under them while its cards are 24px apart. */
.sv-page > :is(.sv-line, .sv-cupprize, .sv-claimband, .sv-cup) { margin-top: 0.875rem; margin-bottom: 0; }
.sv-page > .sv-grid { margin-top: 1.25rem; }
@media (min-width: 64rem) { .sv-page > .sv-grid { margin-top: 1.5rem; } }

/* ── resources/css/owners.css — /add-server on a phone: the preview's long address widened the hero's one column past
   its edge (a grid item is as wide as its content unless told otherwise); the text and the buttons ran off the card. */
.ow-hero > * { min-width: 0; }

/* ── resources/css/tops.css (and the .gts-frame dropped from the hero in tops/index, tops/show) — the hero's layers ──
   The cover, the dark veil, the orange (the line along the top, the glow), the words: the veil and the orange had the
   same place, the veil last, so the orange never showed. */
.tp-hero::before { z-index: -3; }
.tp-hero::after { z-index: -2; }
.tp-hero__art { z-index: -1; }

/* ── resources/css/app.css + winter.css — what hangs under the bar, for whatever sticks under it ──
   --gts-nav-rows: the bar's second row (the links: from 1024px when they do not fit beside the logo — always in some
     languages, below 1280px in English), 2.75rem and its 1px border. The sticky side cards slid under it.
   --gw-hang: the winter theme's lights (24px under the bar) and its bauble (40px under it), while on the page.
   Every sticky element of the site keeps its own offset and adds both. */
:root { --gts-nav-rows: 0px; --gw-hang: 0px; }
@media (min-width: 64rem) { :root:has(#site-nav > .lg\:flex.h-11:not(.xl\:hidden)) { --gts-nav-rows: calc(2.75rem + 1px); } }
@media (min-width: 64rem) and (max-width: 79.99rem) { :root:has(#site-nav > .lg\:flex.h-11) { --gts-nav-rows: calc(2.75rem + 1px); } }
:root:has(.gw-lights) { --gw-hang: 1.5rem; }
:root:has(.gw-bauble) { --gw-hang: 2.5rem; }
.cmp-row--head { top: calc(4.5rem + var(--gts-nav-rows) + var(--gw-hang)); }
.cr-toc { top: calc(4.75rem + var(--gts-nav-rows) + var(--gw-hang)); }
.cp-tabs { top: calc(4.6rem + var(--gw-hang)); }
:is(.evp-side, .ag-preview > .dcp, .owc__result, .tp-side) { top: calc(5.5rem + var(--gts-nav-rows) + var(--gw-hang)); }
:is(.gtfr__side, .gtp-rail) { top: calc(5.75rem + var(--gts-nav-rows) + var(--gw-hang)); }
.gtp-rail { max-height: calc(100vh - 6.75rem - var(--gts-nav-rows) - var(--gw-hang)); }
:is(.gu-side, [data-layout="full"] .gu-toc, [data-layout="full"] .gu-side__cta, .gpl-side, .rqx-side) { top: calc(6rem + var(--gts-nav-rows) + var(--gw-hang)); }
.sv-page [id] { scroll-margin-top: calc(7.5rem + var(--gw-hang)); }
/* (the cup's own sticky rounds and anchors: public/css/cup.css, with the same two variables) */

/* ── resources/css/winter.css — the bauble hangs from the whole bar, its second row included (it hung from the first,
   in the middle of a two-row bar); Santa flies over the bar, not under it (his way back reached into it on a phone). */
.gw-bauble { top: calc(100% + 1px + var(--gts-nav-rows)); }
.gw-santa { z-index: 51; }

/* ── resources/css/winter.css — the snow on the panels with the targeting brackets (.gts-frame) ──
   It was their background: it took the place of their own glows (recruiting, privacy, maps) and lay under their art
   (events, guides, add-server, the server page, find), which tinted it. It now lies in its own layer — the place of the
   top-left bracket, which it covers anyway — above the panel's art and under its words, white everywhere; the middle
   strip drawn at its own proportions (126.67 × 38, not 120 × 38: a 1px gap ran along the top). Smaller on a phone. */
.gw-caps .gts-frame { isolation: isolate; background-image: revert-layer; background-repeat: revert-layer; background-position: revert-layer; background-size: revert-layer; }
.gw-caps .gts-frame::before {
    top: -1px;
    left: -1px;
    right: -1px;
    width: auto;
    height: 38px;
    z-index: -1;
    border: 0;
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-image: var(--gw-cap);
    background-repeat: no-repeat, no-repeat, repeat-x;
    background-position: left top, right top, left top;
    background-size: 220px 38px, 220px 38px, 126.67px 38px;
}
@media (max-width: 40rem) { .gw-caps .gts-frame::before { height: 24px; background-size: 140px 24px, 140px 24px, 80px 24px; } }
/* revert-layer gives back what a layered stylesheet says; resources/css/recruiting.css is in no layer, so its heroes'
   own glows are said again here (keep in step with it) */
.gw-caps .rqx-hero.gts-frame { background: radial-gradient(40rem 16rem at 100% 0%, rgba(255, 106, 43, 0.14), transparent 70%), radial-gradient(30rem 14rem at 0% 100%, rgba(88, 166, 255, 0.08), transparent 70%), var(--color-gtPanel); }
.gw-caps .rqs-hero.gts-frame { background: radial-gradient(36rem 14rem at 0% 0%, color-mix(in srgb, var(--rc-tone) 16%, transparent), transparent 70%), var(--color-gtPanel); }
.gw-caps :is(.fd-hero__bg, .evp-hero__art, .gu-hero__art, .ow-hero__art, .sv-hero__bg, .rqx-hero__art, .gk-hero__art, .ct-hero__art, .hl-wash) { z-index: -2; }
.gw-caps .gts-frame > .pointer-events-none.absolute.inset-0 { z-index: -2; }   /* the unnamed washes of the utility-built heads (/players) */

/* the heroes without the brackets (the cups', the tops'): the snow in their gold/orange layer, above the cover and the veil */
.gw-caps :is(.cp-hero__art, .tp-hero__art) {
    background-repeat: no-repeat, no-repeat, repeat-x, no-repeat, no-repeat;
    background-position: left top, right top, left top, 0 0, left top;
    background-size: 220px 38px, 220px 38px, 126.67px 38px, 100% 100%, 100% 3px;
}
@media (max-width: 40rem) { .gw-caps :is(.cp-hero__art, .tp-hero__art) { background-size: 140px 24px, 140px 24px, 80px 24px, 100% 100%, 100% 3px; } }
.gw-caps .cp-hero__art { background-image: var(--gw-cap), radial-gradient(28rem 16rem at 92% 30%, rgb(245 197 66 / 0.22), transparent 70%), linear-gradient(90deg, #f5c542, transparent 55%); }
.gw-caps .tp-hero__art { background-image: var(--gw-cap), radial-gradient(26rem 14rem at 8% 110%, color-mix(in srgb, var(--color-gtHighlight) 26%, transparent), transparent 70%), linear-gradient(90deg, var(--color-gtHighlight), transparent 55%); }

/* ── resources/css/winter.css — the snow on the cards: where it was wrong, where it was missing ──
   Not on the small "no servers yet" chips of /games (a .game-card too: the snow hid their names), nor on the podium's
   wrapper of /leaderboard (no box of its own: a strip floated over the seats) — on the seats instead. The About card of
   a game page keeps its glow (the snow had taken its ::after, cut to the glow's 42%): the snow takes its top line's place.
   The big cards and heads that had none: the season pass's head, a game's head, the cups of /cup, the podium of a top,
   the cup's "Now playing" cards, and the page heads built of utility classes only (marked .gw-head in their views:
   /games, /squads, a squad, /faq, /how-it-works). */
/* (the theme's own rule weighs .gw-caps :is(…):not(.gts-frame)::after: these take the same :not() to weigh as much, and win by coming later) */
.gw-caps :is(.game-chip, .lb-podium):not(.gts-frame)::after { content: none; }
.gw-caps .gm-about:not(.gts-frame)::after { top: -45%; right: -12%; left: auto; z-index: -1; width: 42%; height: auto; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--gm-c, var(--color-gtHighlight)) 15%, transparent), transparent); }
.gw-caps :is(.ps-hero, .gm-hero, .cp-game, .lb-seat, .tp-seat) { position: relative; }
.gw-caps :is(.ps-hero, .gm-hero, .gw-head, .cp-game, .lb-seat, .tp-seat:not(.is-mine), .cbl-m)::after, .gw-caps .gm-about::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    z-index: 3;
    height: 24px;
    opacity: 1;
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-image: var(--gw-cap);
    background-repeat: no-repeat, no-repeat, repeat-x;
    background-position: left top, right top, left top;
    background-size: 140px 24px, 140px 24px, 80px 24px;
    pointer-events: none;
}
@media (min-width: 40rem) { .gw-caps :is(.ps-hero, .gm-hero, .gw-head)::after { height: 38px; background-size: 220px 38px, 220px 38px, 126.67px 38px; } }
/* the podium seats keep their medal's colour line on top of the snow (their ::before, gold/silver/bronze) */
.gw-caps :is(.lb-seat, .tp-seat)::before { z-index: 4; }
