.wamcHeader {
  position: relative;
}

.wamcTopbar {
  min-height: 82px;
}

.wamcNav {
  min-height: 48px;
}

.wamcNav nav {
  gap: clamp(14px, 2vw, 26px);
}

.wamcNav nav a,
.wamcHub {
  font-size: 0.94rem;
}

.wamcNavToggle {
  display: none;
}

.wamcMobilePortrait {
  display: none;
}

/* The disclosure sits directly beneath the scrolling affiliate ads. */
.wamcPage .amc-logo-scroll .als-disclosure,
.wamcPage [data-amc-logo-scroll] .als-disclosure {
  color: #fff !important;
  opacity: 1 !important;
}

/* Keep the station manager portrait fully visible instead of cropping or
   placing the hero caption over the image. */
.wamcLeadStory {
  align-items: center;
}

.wamcLeadImage {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
}

.wamcLeadImage img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #171821;
  position: relative;
  z-index: 1;
}

.wamcLeadImage::after {
  content: none !important;
  display: none !important;
}

.wamcLeadImage > span {
  position: static;
  padding: 18px 24px 22px;
  background: #171821;
}

@media (max-width: 980px) {
  .wamcHeader {
    position: relative !important;
    top: auto !important;
    z-index: 30;
  }

  .wamcLeadStory {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .wamcLeadImage {
    order: -1;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #171821 !important;
    isolation: isolate;
  }

  .wamcLeadImage img {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    display: block;
    object-fit: contain;
    object-position: center;
  }

  .wamcLeadCopy {
    order: 0;
    width: 100%;
    position: relative;
  }

  .wamcTopbar {
    min-height: 64px;
    padding: 8px 16px;
  }

  .wamcBrand > b {
    font-size: 2.35rem;
    letter-spacing: -0.2rem;
  }

  .wamcBrand > span {
    font-size: 0.82rem;
  }

  .wamcListenButton {
    min-height: 44px;
    padding: 11px 14px;
  }

  .wamcNav {
    min-height: 48px;
    padding: 0 14px;
    position: relative;
  }

  .wamcNavToggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
  }

  .wamcNavToggle::before {
    content: "\2630";
    font-size: 1.25rem;
    line-height: 1;
  }

  .wamcNav[data-open="true"] .wamcNavToggle::before {
    content: "\00d7";
    font-size: 1.55rem;
  }

  .wamcNav nav {
    width: min(92vw, 380px);
    max-height: 0;
    padding: 0;
    display: grid;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 14px;
    z-index: 100;
    overflow: hidden;
    background: #063f9f;
    border: 0 solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: max-height 180ms ease, opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  }

  .wamcNav[data-open="true"] nav {
    max-height: min(52vh, 430px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-width: 1px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .wamcNav nav a {
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    white-space: normal;
    font-size: 1rem;
    line-height: 1.35;
  }

  .wamcNav nav a:last-child {
    border-bottom: 0;
  }

  .wamcHub {
    margin-left: auto;
    border-left: 0;
    padding-left: 12px;
    font-size: 0.82rem;
  }
}

/* Use the original server-rendered portrait on phones and tablets. Keeping
   one hero avoids hydration restoring a second panel over the mobile photo. */
@media (max-width: 1024px) {
  html body .wamcPage .wamcLeadStory {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    gap: 0;
    background: #171821;
    overflow: hidden;
  }

  html body .wamcPage .wamcLeadCopy,
  html body .wamcPage .wamcMobilePortrait {
    display: none !important;
  }

  html body .wamcPage .wamcLeadImage {
    display: flex;
    flex-direction: column;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: #171821;
  }

  html body .wamcPage .wamcLeadImage img {
    display: block;
    position: static;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: center;
  }

  html body .wamcPage .wamcLeadImage > span {
    position: static;
    margin: 0;
    padding: 16px 18px 19px;
    background: #171821;
  }
}

@media (max-width: 620px) {
  .wamcTopbar {
    min-height: 60px;
  }

  .wamcBrand > b {
    font-size: 2.15rem;
  }

  .wamcBrand > span {
    font-size: 0.74rem;
    letter-spacing: 0.08rem;
  }

  .wamcNav {
    min-height: 46px;
  }

  .wamcNav nav {
    left: 10px;
    width: calc(100vw - 20px);
  }

  .wamcLeadImage,
  .wamcLeadImage img {
    height: auto;
    min-height: 0;
  }

  .wamcLeadImage {
    width: 100%;
    margin: 0;
  }

  .wamcLeadImage img {
    object-position: center;
  }

  .wamcLeadImage > span {
    padding: 16px 18px 19px;
  }

  .wamcHub {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wamcNav nav {
    transition: none;
  }
}

@media (max-width:980px) {
  html body .wamcPage .wamcHeader > nav,
  html body .wamcPage .wamcHeader > .menu,
  html body .wamcPage .wamcNav:not([data-open="true"]) nav,
  html body .wamcPage .wamcNav nav[hidden] {
    display:none !important;
    pointer-events:none !important;
  }
  html body .wamcPage .wamcNav[data-open="true"] nav:not([hidden]) {
    display:grid !important;
    grid-template-columns:1fr !important;
    background:#063f9f !important;
    color:#fff !important;
    pointer-events:auto !important;
  }
  html body .wamcPage .wamcNav nav a {
    color:#fff !important;
    background:transparent !important;
  }
}

/* The AMC hub dropdown must never overlay the mobile station document.
   This applies before scripts run and also to a restored/hydrated header. */
@media (max-width:980px) {
  html body:has(.wamcPage) header > nav,
  html body:has(.wamcPage) header > button.menu {
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
}

/* WAMC keeps its visible header navigation on mobile, with no disclosure. */
@media (max-width:980px) {
  html body .wamcPage .wamcNav {display:flex!important;flex-wrap:wrap;gap:0;padding:8px 14px;}
  html body .wamcPage .wamcNav .wamcNavToggle {display:none!important;}
  html body .wamcPage .wamcNav nav,
  html body .wamcPage .wamcNav:not([data-open="true"]) nav,
  html body .wamcPage .wamcNav[data-open="true"] nav:not([hidden]) {
    display:flex!important;position:static!important;flex-wrap:wrap!important;
    width:100%!important;max-height:none!important;overflow:visible!important;
    opacity:1!important;visibility:visible!important;transform:none!important;
    background:transparent!important;box-shadow:none!important;border:0!important;
    pointer-events:auto!important;gap:0 14px!important;
  }
  html body .wamcPage .wamcNav nav a {min-height:44px;padding:10px 0;border:0;}
}

/* NFT gallery button: AMC purple, gold outline, white lettering. */
html body .wamcPage .wamcNav nav a.amcNftNavLink,
html body .wamcPage .wamcNav nav a[data-amc-nft-nav],
html body .wamcPage .wamcNav nav a[href$="/nft"],
html body .wamcPage .wamcNav nav a[href$="/nft/"] {
  background:#6f2da8 !important;
  border:2px solid #d4af37 !important;
  border-radius:8px;
  color:#fff !important;
  padding:9px 14px !important;
}

/* Keep Juke and Box on separate lines in the footer player. */
.wamcPlayerBar .wamcGalaxyButton {text-align:center;line-height:1.15;}
