/* ==========================================================================
   THE FUD PIT — STANDALONE WEB & MOBILE RESPONSIVE LAYER (DESKTOP + MOBILE)
   Loaded after pit-assets/fuds-pit-arena.css on pit.html
   ========================================================================== */

html.fuds-pit-standalone,
html.fuds-pit-standalone body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #12110f;
  color: #f4efe6;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

body.fuds-pit-standalone {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ==========================================================================
   INTEGRAL EMBEDDED SECTION INSIDE FUDSOFFICIAL.COM (html.fuds-pit-embedded)
   Lives natively inside <main id="site-main-content"> alongside the real
   fudsofficial.com Header, Left Sidebar, Collector Profile & all sections!
   ========================================================================== */
html.fuds-pit-embedded .fud-pit-section {
  padding: 26px 20px 28px;
  scroll-margin-top: 90px;
}

/* Break out of .container (z-index: 2) stacking context when fullscreen */
html.fuds-pit-embedded #fud-pit.is-fullscreen-host {
  z-index: 100500 !important;
}

/* THE FUD PIT — Red pulsing arena glow in left sidebar & mobile nav rail */
@keyframes fudPitRedPulse {
  0%, 100% {
    background: rgba(255, 34, 68, 0.13);
    border-color: rgba(255, 59, 92, 0.68);
    box-shadow: inset 3px 0 0 #ff2b4a, 0 0 10px rgba(255, 34, 68, 0.24);
  }
  50% {
    background: rgba(255, 34, 68, 0.28);
    border-color: #ff4766;
    box-shadow: inset 3px 0 0 #ff5470, 0 0 22px rgba(255, 34, 68, 0.64), 0 0 6px rgba(255, 71, 102, 0.42);
  }
}

@keyframes fudPitRedPulseMobile {
  0%, 100% {
    background: rgba(255, 34, 68, 0.15);
    border-color: rgba(255, 59, 92, 0.72);
    box-shadow: 0 0 8px rgba(255, 34, 68, 0.26);
  }
  50% {
    background: rgba(255, 34, 68, 0.32);
    border-color: #ff4766;
    box-shadow: 0 0 16px rgba(255, 34, 68, 0.68);
  }
}

html.fuds-pit-embedded .side-nav-rail .desktop-nav .nav-link.nav-pill-fudpit {
  color: #ff4766 !important;
  font-weight: 800 !important;
  border-color: rgba(255, 59, 92, 0.72) !important;
  animation: fudPitRedPulse 1.65s ease-in-out infinite;
}

html.fuds-pit-embedded .side-nav-rail .desktop-nav .nav-link.nav-pill-fudpit .neon-ico {
  stroke: #ff4766 !important;
  filter: drop-shadow(0 0 6px rgba(255, 43, 74, 0.78));
}

html.fuds-pit-embedded .side-nav-rail .desktop-nav .nav-link.nav-pill-fudpit:hover {
  background: rgba(255, 34, 68, 0.34) !important;
  border-color: #ff5c77 !important;
  color: #ff7088 !important;
  box-shadow: inset 3px 0 0 #ff5c77, 0 0 26px rgba(255, 34, 68, 0.75) !important;
}

html.fuds-pit-embedded .side-nav-rail .desktop-nav .nav-link.nav-pill-fudpit.active {
  color: #ff5c77 !important;
  border-color: #ff3b5c !important;
  animation: fudPitRedPulse 1.4s ease-in-out infinite;
}

@media (max-width: 1080px) {
  html.fuds-pit-embedded .side-nav-rail .desktop-nav .nav-link.nav-pill-fudpit,
  html.fuds-pit-embedded .side-nav-rail .desktop-nav .nav-link.nav-pill-fudpit.active {
    animation: fudPitRedPulseMobile 1.55s ease-in-out infinite;
  }
}

html.fuds-pit-embedded.fuds-pit-fs header,
html.fuds-pit-embedded.fuds-pit-fs #side-nav-rail {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Keep the 3 Hero CTA buttons crisp on 1 balanced horizontal row on desktop */
html.fuds-pit-embedded .hero-buttons {
  gap: 10px;
  align-items: center;
}

@media (min-width: 769px) {
  html.fuds-pit-embedded .hero-buttons {
    flex-wrap: nowrap;
  }
  html.fuds-pit-embedded .hero-buttons .cta-btn {
    font-size: 0.76rem;
    padding: 13px 16px;
  }
}

html.fuds-pit-embedded .hero-buttons .pit-hero-cta {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  border-color: #00f0ff;
  animation: none;
  box-shadow: 4px 4px 0 #000, 0 0 18px rgba(0, 240, 255, 0.22);
}

html.fuds-pit-embedded .hero-buttons .pit-hero-cta:hover {
  background: #00f0ff;
  color: #04090d;
  box-shadow: 4px 4px 0 #000, 0 0 26px rgba(0, 240, 255, 0.45);
}

.fp-site-shell {
  position: relative;
  background: #151311;
  border: 3px solid #000;
  box-shadow:
    inset 3px 3px 0 #554e45,
    inset -3px -3px 0 #0d0c0a,
    0 22px 60px rgba(0, 0, 0, 0.72),
    0 0 32px rgba(181, 238, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fp-site-shell.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100500 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border: 0 !important;
  box-shadow: none !important;
}

.fp-site-strip {
  flex-shrink: 0;
  min-height: 44px;
  padding: 6px 14px;
  background: #24211e;
  border-bottom: 3px solid #000;
  box-shadow: inset 2px 2px 0 #4e483f, inset -2px -2px 0 #12100e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fp-site-strip-l {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.fp-site-dot {
  width: 8px;
  height: 8px;
  background: #b5ee00;
  border: 1.5px solid #000;
  flex-shrink: 0;
}

.fp-site-kicker {
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 10px;
  color: #c8ff26;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
}

.fp-site-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #bab2a8;
  white-space: nowrap;
}

.fp-site-strip-r {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.fp-strip-btn {
  height: 28px;
  padding: 0 10px;
  background: #332f29;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 #5e564b, inset -2px -2px 0 #151311, 0 2px 0 #000;
  color: #f4efe6;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 7.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.fp-strip-btn:hover {
  background: #b5ee00;
  color: #090d00;
  box-shadow: inset 2px 2px 0 #e6ff6b, inset -2px -2px 0 #5f8000, 0 2px 0 #000;
}

.fp-strip-btn.cyan {
  background: #1b2d34;
  color: #79eeff;
  box-shadow: inset 2px 2px 0 #316170, inset -2px -2px 0 #0d181c, 0 2px 0 #000;
}

.fp-strip-btn.cyan:hover {
  background: #1bc6e8;
  color: #020c10;
  box-shadow: inset 2px 2px 0 #84f2ff, inset -2px -2px 0 #0a6c8a, 0 2px 0 #000;
}

.fp-strip-btn.lime {
  background: #23300a;
  color: #ccff00;
  box-shadow: inset 2px 2px 0 #5a7a14, inset -2px -2px 0 #101704, 0 2px 0 #000;
}

.fp-strip-btn.lime:hover {
  background: #ccff00;
  color: #090d00;
  box-shadow: inset 2px 2px 0 #efff99, inset -2px -2px 0 #5f8000, 0 2px 0 #000;
}

.fp-strip-btn.admin-lock {
  background: #3b2a0b;
  color: #ffd43b;
  box-shadow: inset 2px 2px 0 #7a5814, inset -2px -2px 0 #1c1305, 0 2px 0 #000;
}

.fp-strip-btn.admin-lock:hover {
  background: #e6244d;
  color: #fff;
  box-shadow: inset 2px 2px 0 #ff7594, inset -2px -2px 0 #820c25, 0 2px 0 #000;
}

html.fuds-pit-embedded #fuds-pit-mount {
  width: 100%;
  height: 656px;
  position: relative;
  overflow: hidden;
  background: #12110f;
}

html.fuds-pit-embedded .fp-site-shell.is-fullscreen #fuds-pit-mount {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
}

html.fuds-pit-embedded #fuds2-pit-backdrop {
  position: relative !important;
  inset: auto !important;
  z-index: 5 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  background: #12110f !important;
  backdrop-filter: none !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

html.fuds-pit-embedded .fuds2-pit-window {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
}

html.fuds-pit-embedded #fuds2-open-chat-btn,
html.fuds-pit-embedded #fuds2-close-btn,
html.fuds-pit-embedded .fg-logo-pill {
  display: none !important;
}

html.fuds-pit-embedded .fg-battle-canvas {
  object-fit: cover !important;
  object-position: 50% 40% !important;
}

@media (min-width: 769px) {
  /* Embedded Home view flows cleanly with the website page: ZERO inner scroll trap over LIVE LOBBY & ZERO clipped tutorial bar! */
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) #fuds-pit-mount:has(.fg-home) {
    height: auto;
    min-height: 656px;
    overflow: hidden;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) #fuds-pit-mount:has(.fg-home) #fuds2-pit-backdrop,
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) #fuds-pit-mount:has(.fg-home) .fuds2-pit-window {
    height: auto !important;
    min-height: 656px !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-home {
    height: auto !important;
    min-height: 656px !important;
    align-items: stretch !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-hero-side {
    padding: 58px 18px 22px !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-play-side {
    padding: 62px 22px 18px 12px !important;
    gap: 10px !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-hero-sprite {
    width: 210px !important;
    height: 210px !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-lobby-board {
    min-height: 280px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-lobby-scroll {
    overflow-y: visible !important;
    flex: 0 0 auto !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-mode-sheet.bounty-sheet {
    max-height: none !important;
    overflow-y: visible !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen .fg-topbar {
    padding: 0 max(22px, calc((100vw - 1240px) / 2)) !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen .fg-home {
    padding: 0 max(18px, calc((100vw - 1240px) / 2)) !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen .fg-hero-sprite {
    width: clamp(220px, 28vh, 276px) !important;
    height: clamp(220px, 28vh, 276px) !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen .fg-bhud {
    left: max(20px, calc((100vw - 1240px) / 2)) !important;
    right: max(20px, calc((100vw - 1240px) / 2)) !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen .fg-card-hand {
    left: max(20px, calc((100vw - 1180px) / 2)) !important;
    right: max(20px, calc((100vw - 1180px) / 2)) !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen .fg-tut-telegraph {
    right: calc(25.8% - 58px) !important;
    top: clamp(160px, 23vh, 250px) !important;
  }
}

@media (max-width: 1080px) {
  html.fuds-pit-embedded .fud-pit-section {
    scroll-margin-top: 152px;
  }
}

@media (max-width: 768px) {
  html.fuds-pit-embedded .fud-pit-section {
    padding: 16px 8px 20px;
    scroll-margin-top: 168px;
  }
  html.fuds-pit-embedded .fp-site-strip {
    padding: 6px 10px;
    gap: 6px;
  }
  html.fuds-pit-embedded .fp-site-strip-r {
    flex-wrap: wrap;
    gap: 5px;
  }
  html.fuds-pit-embedded .fp-strip-btn {
    height: 26px;
    padding: 0 7px;
    font-size: 7px;
  }
  html.fuds-pit-embedded .fp-site-meta {
    display: none;
  }
  html.fuds-pit-embedded #fuds-pit-mount {
    height: 700px;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) #fuds-pit-mount:has(.fg-home) {
    height: auto;
    min-height: 540px;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) #fuds-pit-mount:has(.fg-home) #fuds2-pit-backdrop,
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) #fuds-pit-mount:has(.fg-home) .fuds2-pit-window {
    height: auto !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-home {
    overflow-y: visible !important;
    height: auto !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-lobby-board {
    max-height: none !important;
    overflow: visible !important;
  }
  html.fuds-pit-embedded .fp-site-shell:not(.is-fullscreen) .fg-lobby-scroll {
    overflow-y: visible !important;
  }
  html.fuds-pit-embedded .fp-site-shell.is-fullscreen #fuds-pit-mount {
    height: auto;
    flex: 1 1 0;
  }
  html.fuds-pit-embedded .fg-profile-btn {
    max-width: 130px !important;
    padding: 0 7px !important;
  }
}

/* ==========================================================================
   INTEGRATED FUDS WEBSITE HEADER BAR (FULL-PAGE — NOT A POPUP!)
   ========================================================================== */
.fuds-site-hdr {
  flex-shrink: 0;
  height: 50px;
  padding: 0 18px;
  background: #151311;
  border-bottom: 3px solid #000;
  box-shadow: inset 0 -2px 0 #38332d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 60;
}

.fuds-site-hdr-l {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fuds-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #c8ff26;
  font-family: 'FudsPixel', monospace;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
}

.fuds-site-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  border: 2px solid #000;
  background: #24211e;
}

.fuds-site-chain {
  padding: 4px 8px;
  background: #24211e;
  border: 2px solid #000;
  box-shadow: inset 1.5px 1.5px 0 #4c463d, inset -1.5px -1.5px 0 #110f0d;
  font-family: 'FudsPixel', monospace;
  font-size: 7px;
  color: #bab2a8;
  white-space: nowrap;
}

.fuds-site-mob-tag {
  display: none;
  padding: 4px 8px;
  background: #b5ee00;
  border: 2px solid #000;
  box-shadow: inset 1.5px 1.5px 0 #e6ff6b, inset -1.5px -1.5px 0 #5f8000;
  font-family: 'FudsPixel', monospace;
  font-size: 7.5px;
  color: #090d00;
  white-space: nowrap;
}

.fuds-site-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fuds-site-link {
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #282521;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #524b42, inset -2px -2px 0 #13110f, 0 2px 0 #000;
  font-family: 'FudsPixel', monospace;
  font-size: 7.5px;
  color: #dbd4ca;
  white-space: nowrap;
  transition: transform 0.06s steps(2, end), background 0.08s ease;
}

.fuds-site-link:hover {
  background: #3b362f;
  color: #ffffff;
  transform: translateY(-1px);
}

.fuds-site-link.active {
  background: #b5ee00;
  color: #090d00;
  box-shadow: inset 2px 2px 0 #e6ff6b, inset -2px -2px 0 #5f8000, 0 2px 0 #000;
}

.fuds-site-hdr-r {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fuds-site-ext,
.fuds-site-admin-pill {
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #2e2a26;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #5c544a, inset -2px -2px 0 #141210, 0 2px 0 #000;
  font-family: 'FudsPixel', monospace;
  font-size: 7.5px;
  color: #f4efe6;
  cursor: pointer;
  white-space: nowrap;
}

.fuds-site-ext:hover,
.fuds-site-admin-pill:hover {
  background: #b5ee00;
  color: #090d00;
  box-shadow: inset 2px 2px 0 #e6ff6b, inset -2px -2px 0 #5f8000, 0 2px 0 #000;
}

.fuds-site-admin-pill.lock {
  background: #3b2a0b;
  color: #ffd43b;
  box-shadow: inset 2px 2px 0 #7a5814, inset -2px -2px 0 #1c1305, 0 2px 0 #000;
}

.fuds-site-admin-pill.lock:hover {
  background: #e6244d;
  color: #fff;
  box-shadow: inset 2px 2px 0 #ff7594, inset -2px -2px 0 #820c25, 0 2px 0 #000;
}

/* FULL-VIEWPORT MOUNT CONTAINER BELOW SITE HEADER */
.fuds-pit-mount {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #12110f;
}

/* Fallback splash inside mount (visible only during initial boot) */
.fuds-pit-boot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(181, 238, 0, 0.11), transparent 55%),
    #12110f;
  z-index: 1;
}

.fuds-pit-boot-title {
  font-family: 'FudsPixel', monospace;
  font-size: 20px;
  color: #c8ff26;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 #000;
}

.fuds-pit-boot-sub {
  font-size: 13px;
  font-weight: 800;
  color: #b0a89e;
}

.fuds-pit-boot-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 0;
  border: 3px solid #000;
  background: #b5ee00;
  color: #090d00;
  font-family: 'FudsPixel', monospace;
  font-size: 11px;
  cursor: pointer;
  box-shadow: inset 3px 3px 0 #e6ff6b, inset -3px -3px 0 #5f8000, 0 5px 0 #000;
}

/* ==========================================================================
   FULL-BLEED INTEGRAL WEBSITE ARENA (ZERO POPUP FRAME!)
   ========================================================================== */
html.fuds-pit-standalone #fuds2-pit-backdrop {
  position: relative !important;
  inset: auto !important;
  z-index: 5 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  background: #12110f !important;
  backdrop-filter: none !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

html.fuds-pit-standalone .fuds2-pit-window {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Hide X-only Chat, Close-to-blank, and duplicate FUD PIT badge in integrated website mode */
html.fuds-pit-standalone #fuds2-open-chat-btn,
html.fuds-pit-standalone #fuds2-close-btn,
html.fuds-pit-standalone .fg-logo-pill {
  display: none !important;
}

/* Subtle dark scrollbars inside arena scrollable views */
html.fuds-pit-standalone .fg-home,
html.fuds-pit-standalone .fg-ranks-wrap,
html.fuds-pit-standalone .fg-lb-scroll,
html.fuds-pit-standalone .fg-drawer-box,
html.fuds-pit-standalone .fg-draft-wrap {
  scrollbar-width: thin;
  scrollbar-color: #585147 transparent;
}

/* DESKTOP FULL-BLEED PROPORTIONS (> 768px — 1280x800 to 1920x1080+ Ultrawide) */
@media (min-width: 769px) {
  html.fuds-pit-standalone .fg-topbar {
    padding: 0 max(22px, calc((100vw - 1240px) / 2)) !important;
  }

  html.fuds-pit-standalone .fg-home {
    padding: 0 max(18px, calc((100vw - 1240px) / 2)) !important;
    grid-template-columns: 1.02fr 0.98fr !important;
  }

  html.fuds-pit-standalone .fg-hero-sprite {
    width: clamp(220px, 28vh, 276px) !important;
    height: clamp(220px, 28vh, 276px) !important;
  }

  html.fuds-pit-standalone .fg-lobby-board {
    min-height: 320px !important;
    max-height: min(460px, 56vh) !important;
  }

  html.fuds-pit-standalone .fg-battle-canvas {
    object-fit: cover !important;
    object-position: 50% 36% !important;
  }

  html.fuds-pit-standalone .fg-bhud {
    left: max(20px, calc((100vw - 1240px) / 2)) !important;
    right: max(20px, calc((100vw - 1240px) / 2)) !important;
  }

  html.fuds-pit-standalone .fg-card-hand {
    left: max(20px, calc((100vw - 1180px) / 2)) !important;
    right: max(20px, calc((100vw - 1180px) / 2)) !important;
    bottom: 18px !important;
  }

  html.fuds-pit-standalone .fg-corner-actions {
    right: max(20px, calc((100vw - 1240px) / 2)) !important;
  }

  html.fuds-pit-standalone .fg-tut-telegraph {
    right: calc(25.8% - 58px) !important;
    top: clamp(160px, 23vh, 250px) !important;
  }

  html.fuds-pit-standalone .fg-ranks-wrap {
    padding: 68px max(24px, calc((100vw - 1240px) / 2)) 20px !important;
  }

  html.fuds-pit-standalone .fg-draft-wrap {
    padding: 64px max(28px, calc((100vw - 1200px) / 2)) 24px !important;
  }
}

/* Compact laptop/tablet screens (769px - 1120px) */
@media (max-width: 1120px) and (min-width: 769px) {
  .fuds-site-chain {
    display: none;
  }
  .fuds-site-link {
    padding: 0 7px;
    font-size: 7px;
  }
  .fg-topbar {
    padding: 0 12px !important;
  }
  .fg-nav-btn {
    padding: 0 9px !important;
    font-size: 8.5px !important;
  }
}

/* ==========================================================================
   WALLET CHOOSER & MOBILE WALLET DEEP-LINK MODAL
   ========================================================================== */
.fuds-web-wmodal-ov,
.fuds-web-wmodal-ov * {
  box-sizing: border-box;
}

.fuds-web-wmodal-ov {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(9, 8, 7, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fuds-web-wmodal-card {
  width: 100%;
  max-width: 390px;
  background: #1e1c19;
  border: 4px solid #000;
  border-radius: 0;
  box-shadow: inset 3px 3px 0 #b5ee00, inset -3px -3px 0 #4d6900, 0 10px 0 #000, 0 24px 64px rgba(0, 0, 0, 0.92);
  padding: 16px;
  color: #f4efe6;
}

.fuds-web-wmodal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.fuds-web-wmodal-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'FudsPixel', monospace;
  font-size: 11px;
  color: #c8ff26;
}

.fuds-web-wmodal-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: #b5ee00;
  border: 1.5px solid #000;
}

.fuds-web-wmodal-x {
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: 3px solid #000;
  background: #332f29;
  box-shadow: inset 2px 2px 0 #625a4e, inset -2px -2px 0 #161411, 0 3px 0 #000;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.fuds-web-wmodal-x:hover {
  background: #e6244d;
  box-shadow: inset 2px 2px 0 #ff7594, inset -2px -2px 0 #820c25, 0 3px 0 #000;
}

.fuds-web-wmodal-sub {
  font-size: 12.5px;
  font-weight: 700;
  color: #ccc4ba;
  line-height: 1.45;
  margin-bottom: 12px;
}

.fuds-web-wmodal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fuds-web-wbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: #2b2723;
  border: 3px solid #000;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 #585147, inset -2px -2px 0 #141210, 0 4px 0 #000;
  color: #f6f1e7;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: transform 0.06s steps(2, end), background 0.08s ease;
}

.fuds-web-wbtn.recent {
  box-shadow: inset 2px 2px 0 #b5ee00, inset -2px -2px 0 #4d6900, 0 4px 0 #000;
}

.fuds-web-wbtn:hover {
  background: #3b362f;
  transform: translateY(-1px);
}

.fuds-web-wbtn:active {
  transform: translateY(2px);
}

.fuds-web-wbtn-l {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fuds-web-wbtn-ico {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: #151310;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fuds-web-wbtn-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fuds-web-wbtn-nm {
  font-size: 13px;
  font-weight: 900;
  color: #f6f1e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fuds-web-wbtn-tag {
  font-family: 'FudsPixel', monospace;
  font-size: 7px;
  color: #b0a89e;
}

.fuds-web-wbtn-tag.lime { color: #c8ff26; }
.fuds-web-wbtn-tag.cyan { color: #5ee9ff; }

.fuds-web-wbtn-go {
  font-family: 'FudsPixel', monospace;
  font-size: 8.5px;
  color: #c8ff26;
  flex-shrink: 0;
}

.fuds-web-wmodal-bot {
  margin-top: 12px;
  width: 100%;
  height: 42px;
  border-radius: 0;
  border: 3px solid #000;
  background: #b5ee00;
  box-shadow: inset 3px 3px 0 #e6ff6b, inset -3px -3px 0 #5f8000, 0 4px 0 #000;
  color: #090d00;
  font-family: 'FudsPixel', monospace;
  font-size: 9px;
  cursor: pointer;
}

/* ==========================================================================
   TOUCH DEVICES — PREVENT STICKY HOVER LIFT ON TAP
   ========================================================================== */
@media (hover: none) {
  .fg-card:hover:not(:disabled) {
    transform: none !important;
    z-index: auto !important;
  }
  .fg-big-btn:hover:not(:disabled),
  .fg-nav-btn:hover,
  .fg-ghost-pill:hover,
  .fg-chip-btn:hover:not(:disabled) {
    transform: none !important;
    filter: none !important;
  }
}

/* ==========================================================================
   MOBILE PORTRAIT & SMALL SCREENS (<= 768px — iPhone 390x844, Android 360x800)
   ========================================================================== */
@media (max-width: 768px) {
  .fuds-site-hdr {
    height: 40px;
    padding: calc(env(safe-area-inset-top, 0px)) 10px 0;
    gap: 8px;
  }

  .fuds-site-brand {
    font-size: 11px;
    gap: 6px;
  }

  .fuds-site-brand img {
    width: 22px;
    height: 22px;
  }

  .fuds-site-chain,
  .fuds-site-nav {
    display: none;
  }

  .fuds-site-mob-tag {
    display: inline-flex;
  }

  .fuds-site-ext,
  .fuds-site-admin-pill {
    height: 26px;
    padding: 0 7px;
    font-size: 6.5px;
  }

  html.fuds-pit-standalone #fuds2-pit-backdrop {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  html.fuds-pit-standalone .fuds2-pit-window {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  /* --- SLIM IN-FLOW MOBILE TOPBAR --- */
  .fg-topbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex-shrink: 0 !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 6px 8px !important;
    background: #181613 !important;
    border-bottom: 3px solid #000 !important;
    gap: 6px !important;
    pointer-events: auto !important;
  }

  .fg-logo-pill {
    display: none !important;
  }

  .fg-top-l {
    gap: 5px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .fg-nav-group {
    gap: 5px !important;
    min-width: 0 !important;
  }

  .fg-nav-btn {
    height: 31px !important;
    padding: 0 8px !important;
    font-size: 7.5px !important;
    gap: 4px !important;
    border-width: 2.5px !important;
    box-shadow: inset 2px 2px 0 #625a4e, inset -2px -2px 0 #161411, 0 3px 0 #000 !important;
    white-space: nowrap !important;
  }

  .fg-nav-btn.active {
    box-shadow: inset 2px 2px 0 #ffffff, inset -2px -2px 0 #9d9382, 0 3px 0 #000 !important;
  }

  .fg-nav-btn.lime {
    box-shadow: inset 2px 2px 0 #e6ff6b, inset -2px -2px 0 #5f8000, 0 3px 0 #000 !important;
  }

  .fg-top-r {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .fg-who-pill {
    height: 31px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
    gap: 4px !important;
    max-width: 102px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    border-width: 2.5px !important;
    box-shadow: inset 2px 2px 0 #585147, inset -2px -2px 0 #141210, 0 3px 0 #000 !important;
  }

  .fg-circle-btn {
    width: 30px !important;
    height: 30px !important;
    border-width: 2.5px !important;
    box-shadow: inset 2px 2px 0 #625a4e, inset -2px -2px 0 #161411, 0 3px 0 #000 !important;
  }

  .fg-toast {
    top: calc(52px + env(safe-area-inset-top, 0px)) !important;
    width: calc(100% - 20px) !important;
    max-width: 380px !important;
    font-size: 11.5px !important;
    padding: 7px 10px !important;
  }

  /* --- MOBILE HOME STAGE (STACKED FIGHTER TOP + TOUCH BUTTONS BELOW) --- */
  .fg-home {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background-position: center top !important;
    background-size: cover !important;
  }

  .fg-home::before {
    background:
      linear-gradient(180deg, rgba(12, 11, 9, 0.25) 0%, rgba(12, 11, 9, 0.56) 42%, rgba(12, 11, 9, 0.94) 76%, #0d0c0a 100%) !important;
  }

  .fg-home-fx-canvas {
    height: 290px !important;
    bottom: auto !important;
    object-fit: cover !important;
  }

  .fg-hero-side {
    padding: 12px 12px 8px !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .fg-fighter-stage-row {
    gap: 12px !important;
  }

  .fg-arrow-btn {
    width: 38px !important;
    height: 38px !important;
  }

  .fg-hero-sprite {
    width: 148px !important;
    height: 148px !important;
  }

  .fg-hero-shadow {
    width: 112px !important;
    height: 11px !important;
  }

  .fg-nameplate {
    margin-top: 6px !important;
    gap: 6px !important;
    max-width: 100% !important;
  }

  .fg-name-title {
    font-size: 16px !important;
    text-align: center !important;
  }

  .fg-badge {
    height: 26px !important;
    font-size: 8.5px !important;
    padding: 0 8px !important;
  }

  .fg-hero-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .fg-ghost-pill {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 8px !important;
    gap: 5px !important;
  }

  .fg-play-side {
    padding: 8px 14px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .fg-big-btn {
    padding: 11px 13px !important;
    gap: 10px !important;
  }

  .fg-big-title {
    font-size: 12.5px !important;
  }

  .fg-big-sub {
    font-size: 11.5px !important;
    margin-top: 3px !important;
  }

  .fg-big-icon {
    width: 46px !important;
    height: 46px !important;
  }

  .fg-btn-art {
    width: 30px !important;
    height: 30px !important;
  }

  .fg-tut-banner,
  .fg-live-strip {
    padding: 10px 12px !important;
    font-size: 8.5px !important;
  }

  /* Wager / Free / Bot Launch Sheets on Mobile (16px inputs prevent iOS zoom!) */
  .fg-mode-sheet {
    padding: 12px !important;
    gap: 9px !important;
  }

  .fg-sheet-title {
    font-size: 10.5px !important;
  }

  .fg-chips-row {
    gap: 5px !important;
  }

  .fg-chip-btn {
    height: 36px !important;
    font-size: 8px !important;
    padding: 0 6px !important;
  }

  .fg-field {
    height: 42px !important;
    font-size: 16px !important;
    padding: 0 10px !important;
  }

  .fg-speed-btn {
    height: 36px !important;
    font-size: 7.5px !important;
    padding: 0 6px !important;
    gap: 5px !important;
  }

  .fg-payout-bar {
    font-size: 11.5px !important;
    padding: 7px 10px !important;
  }

  /* --- MOBILE ACTIVE BATTLE SCREEN (HUD -> STAGE CANVAS -> 2x2 CARDS) --- */
  .fg-battle-root {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    background: #110f0d !important;
  }

  .fg-battle-root::before {
    display: none !important;
  }

  /* 1) Top In-Flow Compact Arcade HUD */
  .fg-bhud {
    order: 1 !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex-shrink: 0 !important;
    padding: 6px 8px 5px !important;
    background: #181613 !important;
    border-bottom: 3px solid #000 !important;
    grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr) !important;
    gap: 6px !important;
    z-index: 14 !important;
  }

  .fg-bhud-side {
    gap: 3px !important;
    min-width: 0 !important;
  }

  .fg-bhud-top {
    gap: 4px !important;
  }

  .fg-bname {
    font-size: 11px !important;
    gap: 3px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
  }

  .fg-brarity {
    display: none !important;
  }

  .fg-hp-readout {
    font-size: 10.5px !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  .fg-hp-readout .fg-px-ico {
    width: 11px !important;
    height: 11px !important;
  }

  .fg-hpbar {
    height: 13px !important;
    border-width: 2.5px !important;
    box-shadow: 0 2px 0 #000 !important;
  }

  .fg-orbs-row {
    gap: 4px !important;
    flex-wrap: wrap !important;
  }

  .fg-orbs {
    padding: 2px 4px !important;
    gap: 1.5px !important;
    border-width: 1.5px !important;
  }

  .fg-e-bolt {
    width: 11px !important;
    height: 11px !important;
  }

  .fg-orb-lbl {
    font-size: 9.5px !important;
    margin-left: 2px !important;
  }

  .fg-sp {
    font-size: 6.5px !important;
    padding: 2px 4px !important;
    gap: 2px !important;
  }

  .fg-turn-medal {
    gap: 3px !important;
    min-width: 0 !important;
  }

  .fg-turn-pill {
    min-width: 0 !important;
    width: 100% !important;
    padding: 4px 4px !important;
    border-width: 2.5px !important;
    box-shadow: inset 1.5px 1.5px 0 #585147, inset -1.5px -1.5px 0 #110f0d, 0 2px 0 #000 !important;
  }

  .fg-turn-t {
    font-size: 6.5px !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .fg-turn-state {
    margin-top: 2px !important;
    font-size: 6.5px !important;
    letter-spacing: 0.1px !important;
  }

  .fg-live-dot {
    width: 6px !important;
    height: 6px !important;
    margin-right: 3px !important;
  }

  .fg-winodds {
    width: 100% !important;
    padding: 2px 4px 3px !important;
    border-width: 2px !important;
  }

  .fg-winodds-nums {
    font-size: 6px !important;
    margin-bottom: 2px !important;
  }

  .fg-winodds-nums .lbl {
    font-size: 5.5px !important;
  }

  .fg-winodds-track {
    height: 5px !important;
  }

  .fg-threat-bar {
    gap: 2.5px !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }

  .fg-threat-chip {
    font-size: 5.5px !important;
    padding: 1.5px 3.5px !important;
    gap: 2px !important;
    border-width: 1.5px !important;
  }

  .fg-threat-chip .fg-px-ico {
    width: 9px !important;
    height: 9px !important;
  }

  /* 2) Middle Aspect-Preserved Pixel Stage Canvas (Zero Squashing, Both Fighters Full-Frame!) */
  .fg-battle-canvas {
    order: 2 !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    flex: 1 1 0 !important;
    min-height: 190px !important;
    max-height: min(78vw, 340px) !important;
    margin: auto 0 !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: 50% 42% !important;
    background: #07070c !important;
  }

  /* Floating Stage Overlays (Twist, Rival/Quit, Clash Verdict, Tutorial Telegraph) */
  .fg-twist-pill {
    top: 106px !important;
    padding: 3px 9px !important;
    font-size: 9.5px !important;
    gap: 5px !important;
    max-width: calc(100% - 16px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .fg-twist-tag {
    font-size: 7.5px !important;
  }

  .fg-corner-actions {
    top: 136px !important;
    right: 8px !important;
    flex-direction: row !important;
    gap: 5px !important;
  }

  .fg-mini-pill {
    height: 25px !important;
    padding: 0 7px !important;
    font-size: 7px !important;
    gap: 4px !important;
  }

  .fg-clash-verdict {
    top: 40% !important;
    min-width: 0 !important;
    width: calc(100% - 24px) !important;
    max-width: 360px !important;
    padding: 10px 12px !important;
  }

  .fg-cv-pill {
    font-size: 7px !important;
    padding: 2.5px 6px !important;
  }

  .fg-cv-title {
    font-size: 10.5px !important;
  }

  .fg-cv-sub {
    font-size: 11px !important;
  }

  .fg-tut-telegraph {
    top: 162px !important;
    right: 12px !important;
    padding: 5px 9px !important;
  }

  .fg-corner-actions:has(#fuds2-tut-skip) {
    top: 108px !important;
  }

  .fg-tut-tg-lbl {
    font-size: 6px !important;
  }

  .fg-tut-tg-mv {
    font-size: 9.5px !important;
  }

  /* 3) Tutorial Instruction Strip sits cleanly between Stage & 2x2 Cards (with room for TAP pointer!) */
  .fg-tut-strip {
    order: 3 !important;
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    flex-shrink: 0 !important;
    width: calc(100% - 16px) !important;
    margin: 4px auto 22px !important;
    padding: 7px 10px !important;
    gap: 8px !important;
    z-index: 18 !important;
  }

  .fg-tut-step-badge {
    font-size: 7px !important;
    padding: 3px 6px !important;
  }

  .fg-tut-rule {
    font-size: 8.5px !important;
  }

  .fg-tut-desc {
    font-size: 11px !important;
    margin-top: 2px !important;
  }

  .fg-hover-tip {
    display: none !important;
  }

  /* 4) Bottom 2x2 Thumb-Friendly Arcade Card Deck */
  .fg-card-hand {
    order: 4 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex-shrink: 0 !important;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    background: #141210 !important;
    border-top: 3px solid #000 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    align-items: stretch !important;
  }

  .fg-card {
    height: 120px !important;
    padding: 8px 9px 8px !important;
    border-width: 2.5px !important;
    box-shadow:
      inset 2px 2px 0 var(--card-hi, #625a4e),
      inset -2px -2px 0 var(--card-lo, #12100e),
      0 4px 0 var(--card-lip, #000),
      0 6px 0 #000 !important;
    touch-action: manipulation !important;
  }

  .fg-card.is-locked {
    transform: translateY(-3px) !important;
  }

  .fg-card.tut-focus {
    transform: translateY(-4px) !important;
  }

  .fg-card-key {
    display: none !important;
  }

  .fg-card-role {
    font-size: 7.5px !important;
    padding: 2px 5px !important;
    border-width: 1.5px !important;
  }

  .fg-twist-chip {
    font-size: 6.5px !important;
    padding: 1.5px 4px !important;
  }

  .fg-card-energy {
    padding: 1.5px 4px !important;
    font-size: 7.5px !important;
    border-width: 1.5px !important;
  }

  .fg-card-hero {
    gap: 7px !important;
  }

  .fg-card-ico {
    width: 34px !important;
    height: 34px !important;
    border-width: 2px !important;
  }

  .fg-card-ico img {
    width: 24px !important;
    height: 24px !important;
  }

  .fg-card-big-num {
    font-size: 18px !important;
    text-shadow: 2px 2px 0 #000 !important;
  }

  .fg-card-unit {
    font-size: 6.5px !important;
    margin-top: 2px !important;
  }

  .fg-card-name {
    font-size: 10.5px !important;
    text-shadow: 1.5px 1.5px 0 #000 !important;
  }

  .fg-card-stamp {
    font-size: 9px !important;
    padding: 2px 5px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .fg-tut-pointer {
    top: -24px !important;
    font-size: 7px !important;
    padding: 3.5px 7px !important;
  }

  /* K.O. & Waiting Room Modals on Mobile */
  .fg-ko-modal {
    top: 52% !important;
    width: calc(100% - 22px) !important;
    max-width: 420px !important;
    max-height: 82% !important;
    overflow-y: auto !important;
    padding: 16px 14px !important;
  }

  .fg-ko-h {
    font-size: 14px !important;
    gap: 7px !important;
  }

  .fg-rule-pills {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .fg-share-row {
    grid-template-columns: 1fr !important;
  }

  /* --- VS DRAFT & ACCEPT CHALLENGE SCREEN ON MOBILE --- */
  .fg-draft-wrap {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
  }

  .fg-vs-stage {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) !important;
    gap: 4px !important;
  }

  .fg-vs-spr {
    width: 104px !important;
    height: 104px !important;
  }

  .fg-vs-plate {
    padding: 6px 8px !important;
    max-width: 100% !important;
  }

  .fg-vs-name {
    font-size: 9px !important;
    text-align: center !important;
  }

  .fg-vs-tags {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  .fg-vs-emblem {
    font-size: 19px !important;
  }

  .fg-draft-relic-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* --- RANKINGS & X PFP BORDERS ON MOBILE --- */
  .fg-ranks-wrap {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 10px 10px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .fg-ranks-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .fg-ranks-cols {
    grid-template-columns: 1fr !important;
    flex: none !important;
    gap: 14px !important;
  }

  .fg-lb-scroll {
    max-height: 290px !important;
  }

  .fg-lb-card {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px 9px !important;
  }

  .fg-borders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  /* --- DRAWERS (4 CARDS, LOCKER, OPEN FIGHTS, RIVAL SCOUT, GUIDE) --- */
  .fg-drawer-backdrop {
    padding: 10px !important;
  }

  .fg-drawer-box {
    width: 100% !important;
    max-height: 90% !important;
    padding: 12px !important;
    gap: 10px !important;
  }

  .fg-drawer-box > div[style*="repeat(4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .fg-drawer-box > div[style*="repeat(4"] .fg-card {
    height: 126px !important;
  }

  .fg-drawer-box > div[style*="repeat(2"] {
    grid-template-columns: 1fr !important;
  }

  .fg-locker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .fg-locker-tile img {
    width: 56px !important;
    height: 56px !important;
  }

  .fg-tri-row {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }
}

/* Extra-narrow phones (<= 410px, e.g. iPhone 390px / Android 360px) */
@media (max-width: 410px) {
  .fg-topbar {
    padding: calc(5px + env(safe-area-inset-top, 0px)) 6px 5px !important;
    gap: 4px !important;
  }

  .fg-nav-group {
    gap: 4px !important;
  }

  .fg-nav-btn {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 6.5px !important;
    gap: 3px !important;
  }

  .fg-nav-btn .fg-px-ico {
    width: 11px !important;
    height: 11px !important;
  }

  .fg-circle-btn {
    width: 27px !important;
    height: 27px !important;
  }

  .fg-circle-btn .fg-px-ico {
    width: 13px !important;
    height: 13px !important;
  }

  .fg-who-pill {
    height: 28px !important;
    max-width: 78px !important;
    font-size: 10px !important;
    padding: 0 6px !important;
  }

  .fg-bhud {
    grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 5px 6px 4px !important;
  }

  .fg-card {
    height: 118px !important;
  }

  .fg-setup-btn {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 6.5px !important;
  }
  .fg-setup-btn .fg-setup-lbl {
    display: none !important;
  }
}

/* Onboarding & Mid-Fight Unlock responsive stack on phones (<= 768px) */
@media (max-width: 768px) {
  .fg-ob-box {
    width: 96% !important;
    max-height: 92% !important;
    padding: 12px 12px !important;
    gap: 8px !important;
  }
  .fg-ob-rules-grid {
    gap: 6px !important;
  }
  .fg-ob-rule-card {
    padding: 7px 8px !important;
  }
  .fg-ob-rule-name {
    font-size: 7px !important;
  }
  .fg-ob-rule-e {
    font-size: 6.5px !important;
    padding: 1.5px 4px !important;
  }
  .fg-ob-rule-beat {
    font-size: 10.5px !important;
  }
  .fg-ob-trust-row {
    gap: 5px !important;
  }
  .fg-ob-trust-pill {
    font-size: 6px !important;
    padding: 3px 6px !important;
  }
  .fg-ob-sec-bar {
    font-size: 10px !important;
    padding: 7px 9px !important;
  }
  .fg-ob-grid3 {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .fg-ob-steps {
    gap: 5px !important;
  }
  .fg-ob-step {
    font-size: 6.5px !important;
    padding: 0 5px !important;
    gap: 4px !important;
  }
  .fg-ob-ext-top {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .fg-ob-ext-btn {
    width: 100% !important;
  }
  .fg-ob-ready-card {
    flex-direction: column !important;
    text-align: center !important;
    gap: 8px !important;
  }
  .fg-ob-ready-pills {
    justify-content: center !important;
  }
  .fg-ob-dual-btns {
    grid-template-columns: 1fr !important;
  }
  .fg-ob-primary,
  .fg-ob-secondary {
    font-size: 8px !important;
    height: 40px !important;
  }
  .fg-session-unlock-bar {
    margin: 0 8px 6px !important;
    padding: 7px 9px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }
  .fg-su-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Simplified Live Bet Lobby on Mobile (<= 768px) */
  .fg-quick-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .fg-qbtn {
    height: 40px !important;
    padding: 0 5px !important;
    font-size: 7.5px !important;
    gap: 4px !important;
  }
  .fg-bounty-dual {
    flex-wrap: wrap !important;
  }
  .fg-mode-sheet.bounty-sheet {
    max-height: none !important;
    overflow-y: visible !important;
  }
  .fg-squad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .fg-bc-title {
    font-size: 8.5px !important;
  }
  .fg-bc-cta {
    padding: 5px 8px !important;
    font-size: 7px !important;
  }
  .fg-qbtn .fg-px-ico {
    width: 14px !important;
    height: 14px !important;
  }
  .fg-lobby-board {
    min-height: 220px !important;
    max-height: 310px !important;
  }
  .fg-lobby-hdr {
    padding: 8px 9px !important;
    gap: 6px !important;
  }
  .fg-lobby-row {
    padding: 7px 8px !important;
    gap: 7px !important;
  }
  .fg-lob-av {
    width: 38px !important;
    height: 38px !important;
  }
  .fg-lob-av img {
    width: 34px !important;
    height: 34px !important;
  }
  .fg-lob-handle {
    font-size: 12px !important;
    max-width: 96px !important;
  }
  .fg-lob-bet {
    font-size: 10.5px !important;
  }
  .fg-lob-cta {
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 7px !important;
  }

  /* Profile Modal responsive buttons on mobile */
  .fg-prof-box {
    width: 96% !important;
    padding: 13px !important;
  }
  .fg-prof-actions {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .fg-prof-name-form {
    flex-direction: column !important;
  }
  .fg-prof-save-btn {
    width: 100% !important;
  }
}

/* Mobile landscape phones (short height <= 500px) */
@media (max-height: 500px) and (max-width: 920px) {
  .fg-topbar {
    min-height: 38px !important;
    padding: 4px 8px !important;
  }
  .fg-card-hand {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding: 5px 8px !important;
    gap: 6px !important;
  }
  .fg-card {
    height: 92px !important;
    padding: 5px 6px !important;
  }
  .fg-card-ico {
    width: 26px !important;
    height: 26px !important;
  }
  .fg-card-big-num {
    font-size: 15px !important;
  }
  .fg-card-name {
    display: none !important;
  }
}

/* ============================================================================
   THE FUD PIT — X MINI WIDGET EXTENSION DOWNLOAD & 30s INSTALL CARD
   ============================================================================ */
.fx-ext-card {
  margin-top: 18px;
  background: linear-gradient(180deg, #141824 0%, #0b0e17 100%);
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px #26314c, 0 8px 0 #000, 0 18px 40px rgba(0, 0, 0, 0.55);
  color: #edf2ff;
  overflow: hidden;
}

.fx-ext-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: #0d1019;
  border-bottom: 3px solid #000;
  box-shadow: inset 0 -1px 0 rgba(204, 255, 0, 0.18);
}

.fx-ext-bar-l,
.fx-ext-bar-r {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-ext-kicker {
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 9.5px;
  color: #ccff00;
  letter-spacing: 0.04em;
}

.fx-ext-ver {
  padding: 3px 8px;
  background: #1c2438;
  border: 2px solid #000;
  color: #79eeff;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 8px;
}

.fx-ext-chip {
  padding: 3px 8px;
  background: #161b29;
  border: 2px solid #000;
  color: #9fb0cc;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 7px;
}

.fx-ext-chip.safe {
  background: #0f251b;
  color: #00ffa3;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 163, 0.35);
}

.fx-ext-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 22px 22px;
  align-items: stretch;
}

.fx-ext-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.fx-ext-head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.fx-ext-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  image-rendering: pixelated;
  border: 3px solid #000;
  box-shadow: 0 0 0 2px #ccff00, 0 4px 0 #000, 0 0 22px rgba(204, 255, 0, 0.32);
  background: #0d101d;
}

.fx-ext-title {
  margin: 0 0 8px 0;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #ffffff;
  text-shadow: 0 2px 0 #000;
}

.fx-ext-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #b7c3da;
}

.fx-ext-sub strong {
  color: #f8fafc;
}

.fx-ext-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-ext-perk {
  padding: 5px 9px;
  background: #0e1320;
  border: 2px solid #000;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 7.5px;
  box-shadow: 0 2px 0 #000;
}

.fx-ext-perk.lime { color: #ccff00; box-shadow: inset 0 0 0 1px rgba(204, 255, 0, 0.38), 0 2px 0 #000; }
.fx-ext-perk.cyan { color: #00e5ff; box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.38), 0 2px 0 #000; }
.fx-ext-perk.gold { color: #ffd000; box-shadow: inset 0 0 0 1px rgba(255, 208, 0, 0.38), 0 2px 0 #000; }

.fx-ext-cta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-ext-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #e0ff54 0%, #ccff00 62%, #9ad100 100%);
  color: #070b00;
  border: 3px solid #000;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.72), 0 4px 0 #4d6b00, 0 7px 0 #000, 0 0 24px rgba(204, 255, 0, 0.28);
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 10.5px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: transform 0.08s ease, filter 0.12s ease;
}

.fx-ext-dl-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.fx-ext-dl-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 2px 0 #4d6b00, 0 4px 0 #000;
}

.fx-ext-trust {
  font-size: 12px;
  color: #8293b2;
  line-height: 1.4;
}

.fx-ext-steps-col {
  background: #0c0f19;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 1px #1f2942;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-ext-steps-hdr {
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 9px;
  color: #79eeff;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
  border-bottom: 2px solid #182035;
}

.fx-ext-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fx-ext-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fx-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a2338;
  border: 2px solid #000;
  color: #ccff00;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 8px;
  box-shadow: 0 2px 0 #000;
  margin-top: 1px;
}

.fx-step-txt {
  font-size: 13px;
  line-height: 1.48;
  color: #c5d0e6;
}

.fx-step-txt strong {
  color: #ffffff;
}

.fx-step-note {
  color: #8b9bb8;
  font-size: 12px;
}

.fx-step-txt code {
  padding: 1px 6px;
  background: #171f33;
  border: 1px solid #2e3d5f;
  color: #ccff00;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.fx-copy-btn {
  margin-left: 6px;
  padding: 2px 7px;
  vertical-align: middle;
  background: #1a2a36;
  color: #79eeff;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #345c73, 0 2px 0 #000;
  font-family: 'FudsPixel', 'Press Start 2P', monospace;
  font-size: 7px;
  cursor: pointer;
}

.fx-copy-btn:hover {
  background: #00e5ff;
  color: #031016;
}

.fx-copy-btn.ok {
  background: #ccff00;
  color: #060a00;
}

@media (max-width: 900px) {
  .fx-ext-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .fx-ext-title {
    font-size: 11px;
  }
  .fx-ext-dl-btn {
    font-size: 9px;
  }
}
