/* Shared masthead for the studio and its product site. */
:root { --masthead-height: 88px; }
.site-header.site-masthead {
  display: block;
  min-height: var(--masthead-height);
  padding: 0;
}
.masthead-inner {
  max-width: 1460px;
  min-height: calc(var(--masthead-height) - 1px);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 68px);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: 'brand switch sections motion';
  align-items: center;
  gap: clamp(8px, 2vw, 26px);
}
.masthead-inner > :first-child { grid-area: brand; justify-self: start; }
.site-masthead .section-nav { grid-area: sections; margin: 0; justify-content: end; gap: clamp(6px, 1.2vw, 18px); }
.site-masthead .section-nav a {
  position: relative;
  padding-inline: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.site-masthead .section-nav a:hover, .site-masthead .section-nav a[aria-current=location] { color: var(--text); }
.site-masthead .section-nav a[aria-current=location]::after {
  content: '';
  position: absolute;
  inset: auto 9px 2px;
  height: 2px;
  background: var(--accent);
}
.site-masthead .site-switch {
  grid-area: switch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding-inline: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.site-masthead .site-switch:hover { border-color: var(--accent); color: var(--accent); }
.site-masthead .motion-control { grid-area: motion; white-space: nowrap; }
@media (max-width: 800px) {
  :root { --masthead-height: 107px; }
  html { scroll-padding-top: 119px; }
  .masthead-inner {
    grid-template-columns: minmax(0, 1fr) auto 44px;
    grid-template-areas: 'brand switch switch' 'sections sections motion';
    column-gap: 6px;
    row-gap: 4px;
    padding-block: 6px;
  }
  .site-masthead .site-switch { justify-self: end; max-width: 46vw; white-space: normal; line-height: 1.2; text-align: center; padding-inline: 9px; }
  .site-masthead .motion-control { grid-area: motion; justify-self: end; width: 44px; height: 44px; padding: 0; }
  .site-masthead .motion-control > span { display: none; }
  .site-masthead .section-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 0;
    font-size: clamp(11px, 3.1vw, 13px);
  }
  .site-masthead .section-nav a {
    display: grid;
    place-items: center;
    min-height: 44px;
    min-width: 0;
    padding-inline: 3px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .studio-site .scene-anchor { top: var(--masthead-height); }
  .shywish-site .experience-pin { top: var(--masthead-height); height: calc(100svh - var(--masthead-height)); }
  .studio-site .scene-anchor:has(.mascot-placeholder:not([hidden])) { top: 0; }
}

@media (max-width: 760px), (max-height: 660px) {
  .shywish-site .experience-pin { top: 0; height: auto; }
}

/* Keep translated labels and fallback fonts inside the viewport. */
html { overflow-x: clip; }
body { min-width: 0; }
.masthead-inner { min-width: 0; }
.studio-site .hero-stop h1 { max-width: 100%; overflow-wrap: anywhere; }
.studio-site .hero-stop h1 .outline { -webkit-text-stroke-width: 1px; }
@media (max-width: 700px) {
  .studio-site .universe-layout { width: 100%; }
  .studio-site .hero-stop { display: flex; padding: 22px 0 14px; }
  .studio-site .hero-stop h1 { font-size: clamp(38px, 11vw, 74px); margin: 0 0 14px; }
  .studio-site .hero-stop > p { margin: 0 0 10px; }
  .studio-site .hero-stop > .text-link { margin: 0; }
  .studio-site .scene-column { display: block; width: 100%; margin: 0; }
  .studio-site .scene-anchor { position: relative; top: auto; width: 100%; margin: 0; height: clamp(220px, 35svh, 310px); }
  .studio-site #journey { scroll-margin-top: 0; }
  .studio-site .mascot-guide .scene-caption { min-height: 0; }
  .studio-site .section-intro h2,.studio-site .lab-intro h2 { overflow-wrap: anywhere; }
}
@media (max-height: 460px) and (min-width: 701px) {
  .studio-site .scene-anchor { position: relative; top: auto; }
  .studio-site .hero-stop h1 { font-size: clamp(58px, 9vw, 105px); }
}
