/* ==========================================================================
   MajorX XR — shared responsive layer (mobile + tablet)
   --------------------------------------------------------------------------
   Adds mobile/tablet behaviour WITHOUT changing the desktop design. Every rule
   lives in a max-width media query and overrides inline styles with !important
   (inline styles otherwise win). Containers are hooked by their INLINE STYLE
   via attribute selectors — NOTE the DC runtime re-renders styles through React,
   which normalises to "property: value" (SPACE after colon), so selectors match
   that form. Loaded via each page's <helmet> (alongside xr-mobile-nav.js).

   Breakpoints:  ≤1024 tablet-landscape   ≤860 mobile + tablet-portrait   ≤460 small
   ========================================================================== */

html, body { max-width: 100%; }

/* Neutralise the DC runtime's FULL_PAGE_CSS (html/body/#dc-root height:100%).
   That pinning turned SOME pages (e.g. Rewards) into an inner-scroll trap where
   the document never scrolls — so the body-level burger behaved as if fixed
   and drifted apart from the header while everything else scrolled. With
   height:auto the DOCUMENT scrolls on every page, consistently. */
html, body { height: auto !important; }
#dc-root, #dc-root > .sc-host { height: auto !important; }

/* Mobile-only team labels in the match scoreboard — never shown on desktop. */
.mx-scorers-label { display: none; }

/* Desktop nav: animated underline sliding in on hover (active tab keeps its
   own static underline). */
@media (min-width: 861px) {
  header nav a { position: relative; }
  header nav a::after {
    content: ""; position: absolute; left: 15px; right: 15px; bottom: 0; height: 2px;
    border-radius: 2px; background: linear-gradient(90deg, var(--accent-bright, #a855f7), var(--accent-deep, #6d28d9));
    box-shadow: 0 0 10px var(--glow, rgba(139, 92, 246, 0.45));
    transform: scaleX(0); transform-origin: left center;
    transition: transform 0.22s ease;
  }
  header nav a:hover::after { transform: scaleX(1); }
}

/* Player mentions that link to a MajorX profile (xr-players.js). Only the
   genuinely-linkable ones (data-mxp="1") get the affordance. */
.mx-plink[data-mxp="1"] { cursor: pointer; }
.mx-plink[data-mxp="1"]:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media (max-width: 1024px) {
  html, body { overflow-x: hidden; }
  /* Constrain content images — but NOT the absolutely-positioned cropped logo
     wordmark (its 114px width is intentional; clamping it squishes the mark). */
  img:not([style*="position: absolute"]) { max-width: 100%; }
}

/* ======================= TABLET (≤1024px) ======================= */
@media (max-width: 1024px) {
  [style*="max-width: 1720px"], [style*="max-width: 1700px"],
  [style*="max-width: 1500px"], [style*="max-width: 1300px"] { padding-left: 22px !important; padding-right: 22px !important; }
}

/* ============= MOBILE + TABLET-PORTRAIT (≤860px) ============= */
@media (max-width: 860px) {
  [style*="max-width: 1720px"], [style*="max-width: 1700px"],
  [style*="max-width: 1500px"], [style*="max-width: 1300px"] { padding-left: 15px !important; padding-right: 15px !important; }

  /* ---- NAV → hamburger drawer ----
     Hide every desktop nav control; the drawer (xr-mobile-nav.js) replaces them.
     Header collapses to logo + burger, single row (~56px). */
  /* Match the search box by its CONTENT (an <input type=search>) rather than a
     specific px width — different pages use 280px/250px/etc, and the old rule
     only caught 280px, so Match's 250px search leaked through next to the burger. */
  header nav,
  [data-search-root],
  header div:has(> input[type="search"]),
  header a[style*="var(--discord)"],
  header .xr-auth,
  header div[style*="gap: 12px"][style*="flex-shrink: 0"] { display: none !important; }
  header > div[style*="justify-content: space-between"] { justify-content: flex-start !important; padding-top: 11px !important; padding-bottom: 11px !important; }

  /* Decorative page-title icon (40px ringed circle) — pure ornament, drop it on
     mobile so the hero title gets the width. Shared across Rankings/Rewards/
     Transfers/Leagues. */
  span[style*="width: 40px"][style*="border: 1.5px solid rgba(255, 255, 255, 0.22)"] { display: none !important; }

  /* Rankings: position + region filters collapse onto stacked rows ~12px apart
     and read as one control. Split into two clear rows with a divider between. */
  .rk-filters { flex-direction: column !important; align-items: stretch !important; gap: 0 !important; }
  .rk-filters-reg { margin-top: 14px !important; padding-top: 14px !important; border-top: 1px solid var(--border) !important; }

  /* ---- content + sidebar layout grids → single column ----
     minmax(0,1fr) serialises to minmax(0px, 1fr) → match on the fixed-px tail. */
  [style*="grid-template-columns: 1fr auto"],
  [style*="grid-template-columns: 1fr 384px"],
  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns: 1fr 344px"],
  [style*="grid-template-columns: 1fr 340px"],
  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns: 288px 1fr"],
  [style*="grid-template-columns: 260px 1fr"],
  [style*="grid-template-columns: 8fr 4fr"],
  [style*="grid-template-columns: 150px 120px 1fr"],
  [style*="296px minmax"],
  [style*="300px 300px"],
  [style*="340px 300px"],
  [style*="300px 344px"] { grid-template-columns: 1fr !important; }

  /* ---- wide stat / standings tables → scroll horizontally (not clip) ---- */
  [style*="grid-template-columns: 46px minmax"],
  [style*="grid-template-columns: 36px 1fr 34px"],
  [style*="grid-template-columns: 64px 1.6fr"],
  [style*="grid-template-columns: 44px 1fr 56px"],
  [style*="grid-template-columns: 34px 1fr 34px"],
  [style*="grid-template-columns: 1fr 44px 44px 44px"],
  [style*="grid-template-columns: 1.3fr 1.6fr"],
  [style*="minmax(150px, 1.6fr) minmax(120px, 1.4fr)"] { min-width: 600px !important; }
  div:has(> [style*="grid-template-columns: 46px minmax"]),
  div:has(> [style*="grid-template-columns: 36px 1fr 34px"]),
  div:has(> [style*="grid-template-columns: 64px 1.6fr"]),
  div:has(> [style*="grid-template-columns: 44px 1fr 56px"]),
  div:has(> [style*="grid-template-columns: 34px 1fr 34px"]),
  div:has(> [style*="grid-template-columns: 1fr 44px 44px 44px"]),
  div:has(> [style*="grid-template-columns: 1.3fr 1.6fr"]),
  div:has(> [style*="minmax(150px, 1.6fr) minmax(120px, 1.4fr)"]) { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

  /* ---- hero headline scales down ---- */
  h1[style*="font-size: 44px"] { font-size: 30px !important; }
  h1[style*="font-size: 40px"] { font-size: 28px !important; }
  h1[style*="font-size: 36px"] { font-size: 26px !important; }
  h1[style*="font-size: 34px"] { font-size: 25px !important; }

  /* ---- Match scoreboard scorers ----
     Desktop is home-right-aligned | divider | away-left-aligned; stacked on
     mobile that loses team attribution. Show a team label per group, drop the
     divider, and left-align both groups (ball first). */
  .mx-scorers { grid-template-columns: 1fr !important; gap: 14px !important; }
  .mx-scorers-div { display: none !important; }
  .mx-scorers-label { display: block !important; }
  /* A team with no scorer rows contributes nothing — drop its lone label. */
  .mx-scorers-home:not(:has(> div)), .mx-scorers-away:not(:has(> div)) { display: none !important; }
  .mx-scorers-home > div { flex-direction: row-reverse; justify-content: flex-end !important; }
  .mx-scorers-home > div > span[style*="text-align: right"] { text-align: left !important; }
}

@media (max-width: 460px) {
  [style*="max-width: 1720px"], [style*="max-width: 1700px"],
  [style*="max-width: 1500px"], [style*="max-width: 1300px"] { padding-left: 12px !important; padding-right: 12px !important; }
}

/* ==========================================================================
   ONE HEADER LAYOUT AT MID WIDTHS (861-1100px)
   Home tidied its header for this range (no search box, wider nav gaps, an
   icon-only Discord button) in its own stylesheet; every other page kept the
   desktop layout, which at this width squashes the search to a sliver and
   pushes the account pill off the right edge. So each page switch between
   Home and anything else jumped the whole bar. Same rules, every page, and the
   stand-in header (#xr-prehead) too, so the bar is identical on both sides of
   a navigation.
   ========================================================================== */
@media (min-width: 861px) and (max-width: 1100px) {
  header:has(img[alt="XR"]) nav { gap: 14px !important; margin-left: 18px !important; }
  header:has(img[alt="XR"]) div:has(> input[type="search"]) { display: none !important; }
  header:has(img[alt="XR"]) a[style*="--discord"] { font-size: 0 !important; gap: 0 !important; padding: 10px 12px !important; }
}

/* ==========================================================================
   PAGE TO PAGE
   The site header is carried across documents unmoved (the xr-continuity
   block in each page + xr-prehead.js). Around it: the old page lifts away in
   170ms, the new one settles in, and when the page's own content mounts --
   which is after the transition, because the runtime boots after first paint
   -- it rises into place instead of popping in a frame. The content fill is
   BACKWARDS only and ends on transform:none: a transform left behind on a
   top-level container would become the containing block for every fixed
   overlay inside it (the match sheet's close button, hover cards).
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 170ms cubic-bezier(.4, 0, 1, 1) both xr-vt-out; }
  ::view-transition-new(root) { animation: 260ms cubic-bezier(0, 0, .2, 1) 40ms both xr-vt-in; }
  #dc-root > .sc-host > div > :not(header) { animation: xr-page-in 460ms cubic-bezier(.22, 1, .36, 1) backwards; }
  #dc-root > .sc-host > div > :not(header):nth-child(3) { animation-delay: 50ms; }
  #dc-root > .sc-host > div > :not(header):nth-child(n+4) { animation-delay: 100ms; }
}
/* NOT <main> ON A PHONE. An animated element is composited for as long as it
   runs, and <main> is the whole page: 29,000px tall on the Leagues page, 11,000
   on Teams. A layer that size is what iOS kills the tab for -- "A problem
   repeatedly occurred on majorx.app/xr/leagues". The rest still rise in, and
   the page-to-page transition (a screen-sized snapshot) still plays. */
@media (max-width: 860px) {
  #dc-root > .sc-host > div > main { animation: none !important; }
}
@keyframes xr-vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes xr-vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes xr-page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   LINE FILTERS (shared by every page)
   One row that never wraps and scrolls sideways when it runs out of room, the
   active option underlined in the page's own colour -- the replacement for
   the boxed pill rows that wrapped into three or four rows on a phone.
     .xr-ftabs  a page's main tab bar
     .xr-fbar   a filter row (competitions, positions, tiers, leagues)
     .xr-fmode  the small-caps switch above a filter row (Results / Upcoming)
   Buttons carry class "on" + aria-selected; nothing inline, so every page
   gets the same thing.
   ========================================================================== */
.xr-ftabs, .xr-fbar, .xr-fmode { display: flex; align-items: flex-end; min-width: 0; overflow-x: auto;
  overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.xr-ftabs::-webkit-scrollbar, .xr-fbar::-webkit-scrollbar, .xr-fmode::-webkit-scrollbar { display: none; }
.xr-ftabs > button, .xr-fbar > button, .xr-fmode > button {
  position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; margin: 0;
  background: none; border: 0; cursor: pointer; font-family: 'Rubik', sans-serif; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; transition: color .15s ease; }
.xr-ftabs > button:hover, .xr-fbar > button:hover, .xr-fmode > button:hover { color: var(--text-2, #cfc7e0); }
.xr-ftabs > button.on::after, .xr-fbar > button.on::after, .xr-fmode > button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent-bright, #a855f7); }
/* NOTHING MOVES WHEN YOU PICK ONE. On a phone these rows used to shift under your
   finger three ways, all fixed here:
   - the picked option went bold, grew 3-7px and shoved every option after it
     sideways -- the weight is now the same on and off, and the pick is the
     white label and the underline;
   - the underline hung 1px below the row (bottom:-1px, over the border), which
     made every row 1px scrollable UP AND DOWN, so a vertical swipe that started
     on a filter row grabbed the row instead of the page. The hairline is now an
     inset shadow inside the row, the underline sits on it, and overflow-y is
     hidden;
   - a shorter tab shrank the page under the bar (xr-mobile-nav.js holds the
     height; see holdOnSwitch there). */
.xr-ftabs { gap: 26px; box-shadow: inset 0 -1px 0 var(--border-2, rgba(255, 255, 255, 0.06)); }
.xr-ftabs > button { padding: 12px 0 13px; font-size: 14.5px; font-weight: 700; color: var(--text-3, #9a90b5); }
.xr-ftabs > button.on { color: #fff; }
.xr-ftabs > button.on::after { height: 2.5px; box-shadow: 0 0 10px var(--glow, rgba(139, 92, 246, 0.45)); }
.xr-fbar { gap: 22px; box-shadow: inset 0 -1px 0 var(--border-2, rgba(255, 255, 255, 0.06)); padding-right: 28px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.xr-fbar > button { padding: 10px 0 11px; font-size: 13px; font-weight: 600; color: var(--text-3, #9a90b5); }
.xr-fbar > button.on { color: #fff; }
.xr-fbar > button.on::after { box-shadow: 0 0 8px var(--glow, rgba(139, 92, 246, 0.45)); }
.xr-fmode { gap: 20px; }
.xr-fmode > button { padding: 4px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted, #6c6482); }
.xr-fmode > button.on { color: #fff; }
/* TAP TARGETS. A line button is only as wide as its label, which left "All", "EU" or
   "VFA" as 17-25px targets on a phone. An invisible ::before spans half the gap on each
   side (and the mode switch gains 8px of headroom, handed straight back by the margin),
   so every one is 36px+ without moving a pixel of the design. */
.xr-fbar > button::before { content: ""; position: absolute; top: 0; bottom: 0; left: -11px; right: -11px; }
.xr-fmode { padding-top: 10px; margin-top: -10px; }
.xr-fmode > button::before { content: ""; position: absolute; top: -10px; bottom: 0; left: -10px; right: -10px; }
/* A row that scrolls sideways (a page's tab bar): swipe and trackpad still
   scroll it, but the page's 8px purple scrollbar no longer draws a slab under
   it -- which is what the "big purple thing" under the league tabs was. The
   fade on the right says there is more. */
.xr-noscb { scrollbar-width: none; }
.xr-noscb::-webkit-scrollbar { display: none; }
.xr-scrollfade { padding-right: 28px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.xr-fcount { font-size: 11px; font-weight: 700; color: var(--muted, #6c6482); font-variant-numeric: tabular-nums; }
.xr-fbar > button.on .xr-fcount { color: var(--accent-bright, #a855f7); }
/* "Show more" as the site's line button - uppercase label, muted count, arrow; no fill,
   no pill. 44px tall, so it is a real target on a phone. */
.xr-more { display: flex; justify-content: center; margin-top: 18px; }
.xr-more > button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 18px;
  background: none; border: 0; cursor: pointer; font: 800 11.5px 'Rubik', sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2, #cfc7e0); -webkit-tap-highlight-color: transparent; transition: color .15s ease; }
.xr-more > button:hover { color: #fff; }
/* The site's line button - uppercase label and arrow, no fill (the boards' "STANDINGS ->").
   Replaces the white "Switch to rumours" pills. */
.xr-linkbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 2px; background: none;
  border: 0; cursor: pointer; font: 800 11.5px 'Rubik', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; color: var(--accent-bright, #a855f7); -webkit-tap-highlight-color: transparent; transition: color .15s ease; }
.xr-linkbtn:hover { color: #fff; }
/* A points deduction beside a standings total ("7 -2"), so a table whose points are
   lower than 3W+D explains itself instead of looking broken. */
.xr-ded { margin-left: 3px; font-size: 9.5px; font-weight: 800; color: var(--loss, #f87171); letter-spacing: 0;
  vertical-align: super; line-height: 0; cursor: help; }
.xr-more > button span { font-weight: 700; letter-spacing: .04em; color: var(--muted, #6c6482); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   MOBILE NAV DRAWER  (built by xr-mobile-nav.js at body level)
   ========================================================================== */
#xr-burger { display: none; }
#xr-drawer { display: none; }

@media (max-width: 860px) {
  #xr-burger {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    /* absolute: the burger sits in its spot at the top of the PAGE and scrolls
       away with the header — it does NOT follow the viewport. top:7 centres the
       40px button against the ~34px logo. */
    position: absolute; top: 7px; right: 14px; z-index: 70;
    width: 40px; height: 40px; padding: 0;
    border-radius: 11px; cursor: pointer;
    background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.34);
    -webkit-tap-highlight-color: transparent;
  }
  #xr-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #f5f3ff; }

  /* 9400: above the installed app's bottom tab bar (#xr-tabs, 9300), which
     used to sit ON TOP of the open menu and hide its last ~80px -- your card
     and Log out -- and below the notification centre (9500+). */
  #xr-drawer { display: block; position: fixed; inset: 0; z-index: 9400; pointer-events: none; }
  .xr-drawer-backdrop {
    position: absolute; inset: 0; background: rgba(4, 3, 8, 0.62); backdrop-filter: blur(2px);
    opacity: 0; transition: opacity 0.22s ease;
  }
  /* Top dropdown card — drops from under the header, inset + rounded. */
  .xr-drawer-panel {
    position: absolute; top: 8px; left: 8px; right: 8px;
    max-height: calc(100dvh - 16px); box-sizing: border-box;
    display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 18px;
    background: #0b0812; border: 1px solid rgba(139, 92, 246, 0.24); border-radius: 20px;
    box-shadow: 0 30px 70px -18px rgba(0, 0, 0, 0.9);
    transform: translateY(calc(-100% - 20px)); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto; font-family: 'Rubik', sans-serif;
  }
  #xr-drawer.xr-show { pointer-events: auto; }
  #xr-drawer.xr-show .xr-drawer-backdrop { opacity: 1; }
  #xr-drawer.xr-show .xr-drawer-panel { transform: translateY(0); }

  /* Team label above each scorer group (mobile only — base rule hides it). */
  .mx-scorers-label {
    font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: #9a90b5; padding-bottom: 2px;
  }

  .xr-drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; min-height: 34px; }
  /* XR brand mark only — clean, no squeezed wordmark. */
  .xr-drawer-brand { display: flex; align-items: center; text-decoration: none; height: 34px; }
  .xr-drawer-mark { height: 32px; width: auto; object-fit: contain; filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.55)); display: block; }
  .xr-drawer-close {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    border-radius: 9px; cursor: pointer; color: #cfc7e0;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(139, 92, 246, 0.2);
  }
  .xr-drawer-search {
    display: flex; align-items: center; gap: 8px; padding: 11px 13px; margin-bottom: 6px;
    border-radius: 11px; color: #9a90b5;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(139, 92, 246, 0.18);
  }
  .xr-drawer-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 14.5px; font-family: inherit; }
  /* Site-search results. They take the menu's place while a query is up, so
     they inherit its rhythm: same row height, same radius, same press state. */
  .xr-drawer-results { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; overflow-y: auto; }
  .xr-dres-head {
    margin: 10px 12px 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: #8a80a5;
  }
  .xr-dres-head:first-child { margin-top: 2px; }
  .xr-dres-note { margin: 12px; font-size: 13px; color: #8a80a5; }
  .xr-dres {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px;
    border-radius: 11px; text-decoration: none; color: #e9e4f7;
  }
  .xr-dres:active { background: rgba(139, 92, 246, 0.16); }
  .xr-dres-ico {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; display: block;
    background-color: rgba(255, 255, 255, 0.05); background-size: cover; background-position: center;
    border: 1px solid rgba(139, 92, 246, 0.18);
  }
  .xr-dres-ico.is-round { border-radius: 50%; }
  .xr-dres-ico.is-mono {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #a78bde;
  }
  .xr-dres-txt { display: flex; flex-direction: column; min-width: 0; }
  .xr-dres-txt b {
    font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .xr-dres-txt i { font-style: normal; font-size: 11px; color: #8a80a5; }
  .xr-drawer-body { display: flex; flex-direction: column; gap: 4px; }
  .xr-drawer-body[hidden] { display: none; }
  .xr-drawer-links { display: flex; flex-direction: column; gap: 1px; }
  .xr-drawer-links[hidden] { display: none; }
  /* One row height, one icon box, for every item -- the account items used to
     bring their own 16px icons and sat 4px left of the rest. */
  .xr-dlink {
    display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 12px;
    border-radius: 11px; text-decoration: none; color: #e9e4f7; font-size: 15px; font-weight: 600;
    -webkit-tap-highlight-color: transparent; transition: background .15s ease;
  }
  .xr-dlink:active { background: rgba(139, 92, 246, 0.16); }
  .xr-dlink.is-on { background: rgba(139, 92, 246, 0.12); color: #fff; }
  .xr-dlink.is-on .xr-dico { color: #d4bfff; }
  .xr-dico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: 0 0 22px; color: #a78bde; }
  .xr-dico svg { width: 20px; height: 20px; }
  /* The account block leads the menu now: signed out it is the Discord button,
     signed in it is your card and two line actions. */
  .xr-drawer-cta { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 8px; padding-bottom: 12px; border-bottom: 1px solid rgba(139, 92, 246, 0.14); }
  .xr-drawer-me { display: flex; flex-direction: column; gap: 8px; }
  .xr-drawer-auth { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    text-decoration: none; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(139, 92, 246, 0.22);
    -webkit-tap-highlight-color: transparent; }
  .xr-drawer-auth:active { background: rgba(139, 92, 246, 0.14); }
  .xr-drawer-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .xr-dact {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 10px;
    border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 700; color: #cfc7e0;
    border: 1px solid rgba(139, 92, 246, 0.22); -webkit-tap-highlight-color: transparent;
  }
  .xr-dact svg { width: 16px; height: 16px; flex: 0 0 16px; color: #a78bde; }
  .xr-dact:active { background: rgba(139, 92, 246, 0.14); }
  .xr-dact.is-out { color: #f3a5a5; border-color: rgba(248, 113, 113, 0.28); }
  .xr-dact.is-out svg { color: #f87171; }
  .xr-cta-discord {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px;
    border-radius: 11px; text-decoration: none; font-weight: 700; font-size: 14px; color: #fff;
    background: linear-gradient(135deg, #5865F2, #4752c4); border: 1px solid rgba(88, 101, 242, 0.6);
  }
  /* Lock body scroll while the drawer is open. */
  html.xr-nav-open, html.xr-nav-open body { overflow: hidden !important; }
}

@media (min-width: 861px) { #xr-burger, #xr-drawer { display: none !important; } }

/* ==========================================================================
   THE HEADER STAYS ON SCREEN ON PHONES
   It scrolled away with the page, so the menu was a scroll back to the top.
   position:sticky had been dead at <=1024px site-wide: `overflow-x: hidden`
   on html AND body makes the body its own scroll container, and a sticky box
   sticks to that (which never scrolls) instead of the viewport. `clip` cuts
   the sideways overflow the same way without creating a scroll container.
   Waking sticky wakes every other sticky box too, so each is placed here:
   the ones that belong under the header move down by its height, the desktop
   filter panels (League, Transfers) stay in the flow on a phone.
   ========================================================================== */
@supports (overflow: clip) {
  @media (max-width: 1024px) { html, body { overflow-x: clip; } }
}
@media (max-width: 860px) {
  :root { --xr-head-h: 57px; }
  #dc-root header:has(img[alt="XR"]) { position: sticky !important; top: 0 !important; z-index: 60 !important; }
  /* The burger and the bell are built at body level beside the header, so they
     are pinned with it rather than scrolled away from it. */
  #xr-burger, #xr-bell { position: fixed !important; }
  /* Sticky strips that sat at the very top now sit just under the header. */
  .rw-rail-wrap { top: var(--xr-head-h) !important; }
  aside[style*="position: sticky"][style*="top: 80px"] { position: static !important; }
}

/* ==========================================================================
   NO ZOOM WHEN A SEARCH BOX IS TAPPED
   iOS Safari zooms the whole page into any text field whose text is smaller
   than 16px the moment it takes focus, and leaves it zoomed. 16px on touch
   screens stops it; pinch-zoom still works for anyone who needs it.
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
  input[type="search"], input[type="text"], input[type="email"], input[type="number"],
  input[type="tel"], input[type="url"], input[type="password"], input:not([type]),
  textarea, select { font-size: 16px !important; }
}
