html {
  scrollbar-gutter: stable;
}

body {
  overflow-x: clip;
}

body.post-homepage-route:not(.themes-open):not(.discovery-open) {
  overflow-y: auto !important;
  height: auto !important;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .experience-menu-button,
.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .signin-link,
.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .list-ip-link {
  display: none !important;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  overflow: visible;
  white-space: nowrap;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .experience-signin,
.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control {
  appearance: none;
  min-height: auto !important;
  padding: .55rem .08rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--dest-ink, #121722) !important;
  font: inherit;
  font-weight: 780;
  text-decoration: none;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .experience-signin {
  order: 1;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control {
  order: 2;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: .38rem;
  cursor: pointer;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control small {
  font-size: inherit;
  font-weight: inherit;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control span {
  font-size: 1rem;
  line-height: 1;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .experience-signin:hover,
.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control:hover {
  color: var(--dest-blue, #1769ff) !important;
}

.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .experience-signin:focus-visible,
.header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control:focus-visible {
  outline: 2px solid var(--dest-blue, #1769ff);
  outline-offset: 4px;
}

/* Prevent the compact sticky header from animating width and grid geometry. */
.site-header-v4 {
  transition: box-shadow .16s ease, background-color .16s ease !important;
}

.header-row-v4,
.brand-v4 img,
.category-trigger-v4,
.global-search-v4,
.discovery-input-wrap,
.focus-nav-v4 {
  transition: none !important;
}

/* The World rail belongs only to the homepage browsing state. */
body.post-homepage-route .focus-nav-v4,
body.discovery-open .focus-nav-v4,
body.themes-open .focus-nav-v4 {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  pointer-events: none !important;
  transform: none !important;
}

/* With the World rail removed, overlays begin directly beneath the header. */
body.themes-open:not(.header-compact) .browse-mega-v4 {
  top: 78px !important;
  max-height: calc(100vh - 78px) !important;
}

body.header-compact.themes-open .browse-mega-v4 {
  top: 64px !important;
  max-height: calc(100vh - 64px) !important;
}

body.discovery-open:not(.header-compact) .discovery-suggestions-panel {
  inset: 78px 0 0 !important;
}

body.header-compact.discovery-open .discovery-suggestions-panel {
  inset: 64px 0 0 !important;
}

/* Keep the Explore hierarchy fully scrollable at every level. */
#departmentBar.is-open {
  overflow: hidden !important;
}

#departmentBar.is-open #departments[data-destination-owner="spinoutu-destination-registry-v1"] {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#departmentBar.is-open #departments[data-destination-owner="spinoutu-destination-registry-v1"] .visual-explore-menu {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.visual-explore-menu > section {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: max(48px, env(safe-area-inset-bottom)) !important;
}

.visual-explore-grid {
  align-content: start;
}

/* Every exact destination becomes a curated mini-marketplace rather than a repeated decision form. */
.route-curated-marketplace .destination-shell {
  padding-bottom: 120px;
}

.route-curation-editorial {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(34px, 6vw, 88px);
  align-items: center;
  margin: 56px 0 82px;
  padding: clamp(34px, 5vw, 72px);
  border-radius: 28px;
  background: linear-gradient(135deg, #f3f7ff 0%, #f8fafc 54%, #f5fbfa 100%);
  border: 1px solid #e4e9f1;
}

.route-curation-copy > span {
  color: var(--dest-blue, #1769ff);
  font-size: .72rem;
  font-weight: 860;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.route-curation-copy h2 {
  margin: .55rem 0 1rem;
  max-width: 760px;
  color: var(--dest-ink, #121722);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.25rem, 4vw, 4.5rem);
  line-height: .98;
  letter-spacing: -.043em;
}

.route-curation-copy p {
  margin: 0;
  max-width: 720px;
  color: var(--dest-muted, #626977);
  font-size: 1.03rem;
  line-height: 1.65;
}

.route-curation-lenses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.route-curation-lenses article {
  min-height: 190px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #e1e6ee;
  box-shadow: 0 15px 38px rgba(25, 35, 52, .06);
}

.route-curation-lenses small {
  color: var(--dest-blue, #1769ff);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.route-curation-lenses strong {
  color: var(--dest-ink, #121722);
  font-size: 1rem;
  line-height: 1.42;
}

.route-curation-ecosystem,
.route-curation-participation {
  margin-top: 88px;
}

.route-curation-visual-grid > button {
  min-height: 330px;
}

.route-curation-role-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-curation-role-grid > button {
  min-height: 210px;
}

.route-curated-marketplace .destination-all {
  margin-top: 96px;
}

.route-curated-marketplace .direction-circle-row {
  padding-bottom: 24px;
}

/* Opening frame: only the permanent SpinOut U promise. */
.editorial-hero.hero-opening-frame .hero-story-v4,
.editorial-hero.hero-opening-frame .experience-flexible-start {
  display: none !important;
}

.editorial-hero.hero-opening-frame .editorial-hero-content-v4 {
  justify-content: center !important;
}

/* Rotating frames: only the image-specific story and actions. */
.editorial-hero.hero-story-frame .hero-brand-line,
.editorial-hero.hero-story-frame .editorial-hero-content-v4 > h1,
.editorial-hero.hero-story-frame .experience-hero-support {
  display: none !important;
}

.editorial-hero.hero-story-frame .editorial-hero-content-v4 {
  justify-content: flex-start !important;
  padding-top: clamp(70px, 9vh, 118px) !important;
}

.editorial-hero.hero-story-frame .hero-story-v4 {
  max-width: 760px !important;
  margin-top: 0 !important;
}

.editorial-hero.hero-story-frame .experience-flexible-start {
  align-self: flex-start;
  margin-top: 1rem;
}

@media (max-width: 1050px) {
  .route-curation-editorial {
    grid-template-columns: 1fr;
  }

  .route-curation-lenses {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .route-curation-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.themes-open .browse-mega-v4 {
    top: 60px !important;
    max-height: calc(100vh - 60px) !important;
  }

  body.discovery-open .discovery-suggestions-panel {
    inset: 60px 0 0 !important;
  }

  body.header-compact .header-row-v4 {
    grid-template-columns: 40px 98px minmax(0, 1fr) auto !important;
  }

  .header-actions[data-destination-owner="spinoutu-destination-registry-v1"] {
    display: flex !important;
    gap: .45rem;
    font-size: 11px;
  }

  .header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control small {
    display: none;
  }

  .header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .campus-selector-control,
  .header-actions[data-destination-owner="spinoutu-destination-registry-v1"] .experience-signin {
    padding: .45rem .05rem !important;
  }

  .visual-explore-menu {
    min-height: 100% !important;
  }

  .visual-explore-menu > section {
    padding-bottom: max(64px, env(safe-area-inset-bottom)) !important;
  }

  .route-curation-editorial {
    margin: 34px 0 58px;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .route-curation-copy h2 {
    font-size: clamp(2.1rem, 11vw, 3.25rem);
  }

  .route-curation-lenses {
    grid-template-columns: 82vw 82vw 82vw;
    gap: 12px;
    margin-right: -22px;
  }

  .route-curation-lenses article {
    min-height: 168px;
  }

  .route-curation-role-grid {
    grid-template-columns: 1fr;
  }

  .route-curation-visual-grid > button {
    min-height: 270px;
  }

  .editorial-hero.hero-story-frame .editorial-hero-content-v4 {
    padding-top: 42px !important;
  }
}
