/* Public layouts and fixed controls, shared across light and dark themes. */
body.publicArea {
  --kt-page-gutter: clamp(12px, 2.5vw, 34px);
  --kt-tab-space: 0px;
  --kt-dock-space: 88px;
}
body.publicArea:not(.authPage) > #mainContent {
  width: min(1440px, calc(100% - var(--kt-page-gutter) * 2));
  max-width: 1440px;
  margin-inline: auto;
}
body.albumShowcasePage:not(.authPage) > #mainContent { max-width: 1160px; }
body.publicArea #mainContent :is(h1,h2,h3) { overflow-wrap: anywhere; }
body.publicArea #mainContent :is(.sectionHeadPremium,.storeSectionHead,.albumTrackHeading) {
  min-width: 0;
  flex-wrap: wrap;
  column-gap: 14px;
}
body.publicArea .topbar .globalSearchWrap,
body.publicArea .topbar .headerActions,
body.publicArea #player .playerIdentity,
body.publicArea #player .playerInfo,
body.publicArea #fullPlayer .fullPlayerMeta,
body.publicArea #fullPlayer .fullActionDock { min-width: 0; }
body.publicArea .topbar .desktopNav > a:not([aria-current])::after { display: none; }
body.publicArea .topbar .desktopNav > a[aria-current] {
  color: var(--glass-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
body.publicArea .topbar .desktopNavMoreMenu {
  max-height: min(65dvh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.publicArea #mainContent :is(.loginPage,.signupShell,.guestCheckout) :is(input:not([type="radio"]):not([type="checkbox"]), select, textarea) {
  min-width: 0;
  max-width: 100%;
}
body.publicArea #mainContent :is(.loginCard,.signupFormCard,.guestCheckout,.releaseCheckoutSummary) {
  min-width: 0;
}
body.publicArea #mainContent :is(.albumTrackCopy,.artistTrackInfo,.catalogueMeta,.releaseCheckoutSummary) :is(strong,h1,h2,p) {
  overflow-wrap: anywhere;
}
body.publicArea #mainContent :is(.releaseCheckoutSummary,.albumReleaseControls,.artistTrackRow) :is(.btn,.ktQueueAdd) {
  max-width: 100%;
}
body.publicArea #mainContent :is(.spotifyFrontRail,.genreFilter,.homeNewRail) {
  overscroll-behavior-inline: contain;
}
body.publicArea #mainContent :is(.ktAlbumSection,.artistLabelSection,.albumTrackSection) {
  scroll-margin-top: 92px;
}
body.publicArea #mainContent .releaseCheckoutSummary { grid-template-columns: auto minmax(0, 1fr) auto; }
body.publicArea #fullPlayer .fullActionDock :is(.fullPurchase,.fullSocial) { flex-wrap: wrap; }
body.publicArea #fullPlayer #ktNowQueue { min-width: 0; }

@media (min-width: 1180px) {
  html body.publicArea > .topbar.topbar { column-gap: clamp(8px,1vw,15px); }
  body.publicArea .topbar .globalSearch { min-width: 0; }
}
@media (min-width: 901px) and (max-width: 1179px) {
  html body.publicArea > .topbar.topbar {
    grid-template-columns: auto minmax(0,1fr) minmax(140px,220px) auto;
    column-gap: 8px;
  }
  body.publicArea .topbar .globalSearchWrap { width: 100%; }
  body.publicArea .topbar .headerJoin { padding-inline: 9px; }
}
@media (max-width: 900px) {
  body.publicArea { --kt-tab-space: 58px; --kt-dock-space: 66px; }
  html body.publicArea > .topbar.topbar { top: 5px; margin-top: 6px; }
  body.publicArea #mainContent > :is(.albumShowcase,.ktAlbums,.premiumArtistProfile) { min-width: 0; }
  body.publicArea #mainContent :is(.catalogueHero,.ktAlbumsToolbar,.ktArtistBannerInner) { gap: 10px; }
  body.publicArea #mainContent .catalogueSearch { width: 100%; min-width: 0; }
  body.publicArea #mainContent .catalogueSearchInput { min-width: 0; }
  body.publicArea .mobileBottomNav {
    box-sizing: border-box;
    min-height: calc(var(--kt-tab-space) + env(safe-area-inset-bottom));
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
  body.publicArea #player.ktPlayerDock {
    bottom: calc(var(--kt-tab-space) + env(safe-area-inset-bottom) + 6px);
    width: calc(100% - 16px);
    max-width: 620px;
  }
  body.publicArea .siteFooter {
    padding-bottom: calc(24px + var(--kt-tab-space) + env(safe-area-inset-bottom));
  }
  body.publicArea:has(#player.is-active) .siteFooter {
    padding-bottom: calc(24px + var(--kt-tab-space) + var(--kt-dock-space) + env(safe-area-inset-bottom));
  }
  body.publicArea #fullPlayer .fullPlayerBody { width: 100%; min-width: 0; }
}
@media (max-width: 600px) {
  body.publicArea #mainContent .homeHero {
    min-height: 0;
    grid-template-columns: minmax(0,1fr) minmax(74px,30%);
    align-items: center;
    padding: clamp(12px,4vw,20px);
    gap: 9px;
  }
  body.publicArea #mainContent .homeHero h1 { font-size: clamp(1.18rem,5vw,1.9rem); line-height: 1.03; }
  body.publicArea #mainContent .homeHero .heroArtistName { font-size: clamp(.95rem,3.5vw,1.22rem); }
  body.publicArea #mainContent .homeHero .heroMiniCover { width: 100%; }
  body.publicArea #mainContent .homeHeroCopy,
  body.publicArea #mainContent .homeHero .heroButtons { min-width: 0; }
  body.publicArea #mainContent .homeHero .heroButtons { gap: 5px; }
  body.publicArea #mainContent .homeHero .heroButtons :is(.btn,.ktQueueAdd) { min-height: 36px; padding-inline: 7px; }
  body.publicArea #mainContent :is(.loginPage,.signupShell) {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
  }
  body.publicArea #mainContent :is(.loginCard,.signupFormCard) {
    order: -1;
    margin: 0;
    padding: clamp(12px,4vw,21px);
  }
  body.publicArea #mainContent :is(.loginShowcase,.signupPitch) { margin: 0; padding: 15px; }
  body.publicArea #mainContent :is(.ktAlbumSection,.albumTrackSection,.releaseCheckout) { margin-top: 14px; }
  body.publicArea #mainContent .releaseCheckoutSummary { grid-template-columns: minmax(44px,64px) minmax(0,1fr); gap: 9px; }
  body.publicArea #mainContent .releaseCheckoutSummary > strong { grid-column: 2; }
  body.publicArea #mainContent .releaseCheckoutSummary img { max-width: 100%; height: auto; }
  body.publicArea #mainContent .releaseCheckoutSummary h1 { font-size: clamp(1.11rem,4.6vw,1.45rem); line-height: 1.2; }
  body.publicArea #mainContent .catalogueCard .catalogueActions { margin-inline-start: 0; flex-wrap: wrap; }
  body.publicArea #mainContent .catalogueCard .catalogueActions > :is(a,button) { min-height: 36px; }
  body.publicArea #fullPlayer .fullArtworkWrap { max-width: min(100%,320px); }
  body.publicArea #fullPlayer #fullPlayerTitle { font-size: clamp(1.35rem,6vw,2rem); }
}
