/* ULTRALUMEN 4C: additive, reversible responsive overrides. */
html { overflow-x: clip; }
body { min-width: 0; }
body img, body video, body iframe { max-width: 100%; }
body > main, body > main.ency-page, body > main.characters-page,
body > main.resonance-article, body > main.rel-page {
  width: min(96%, 1800px); max-width: 1800px;
  margin-left: auto; margin-right: auto;
}
body > main.ency-page, body > main.characters-page, body > main.resonance-article { padding-left: clamp(14px, 2vw, 34px); padding-right: clamp(14px, 2vw, 34px); }
/* Profile pages historically constrained to 1040px by seo-profiles.css. */
body.ul4c-seo-profile > header, body.ul4c-seo-profile > main, body.ul4c-seo-profile > footer {
  max-width: 1580px; width: min(94%, 1580px); margin-left: auto; margin-right: auto;
  padding-left: clamp(16px, 2vw, 36px); padding-right: clamp(16px, 2vw, 36px);
  box-sizing: border-box;
}
body.ul4c-seo-profile { font-size: 18px; }
body.ul4c-seo-profile main > section { padding: clamp(20px, 2vw, 34px); }
body.ul4c-seo-profile main > p, body.ul4c-seo-profile main > section p { max-width: 100ch; }
/* Keep image zoom hotspots tied to their original image dimensions. */
.ul4b-gateway { width: calc(100% - 24px)!important; max-width: 1920px!important; }
.ul4b-main-map > img { width: 100%; height: auto; display: block; }
.ul4b-video-card video { object-fit: contain; }
.ul4b-video-card figcaption { overflow-wrap: anywhere; }
/* Tablet and phone navigation only after the enhancement has installed its toggle. */
@media(max-width: 900px) {
  .nav.ul4c-nav-ready { display: flex!important; align-items: center!important; flex-wrap: wrap!important; gap: 10px!important; padding: 12px 16px!important; min-height: 64px!important; }
  .nav.ul4c-nav-ready .brand { flex: 1 1 auto; white-space: normal; letter-spacing: .14em; font-size: clamp(.75rem, 2.8vw, 1.1rem); }
  .ul4c-nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid #497bb5; border-radius: 9px; color: #f2f7ff; background: #102744; font: 600 15px/1.3 Arial,sans-serif; cursor: pointer; }
  .ul4c-nav-toggle:focus-visible { outline: 3px solid #ffca45; outline-offset: 2px; }
  .nav.ul4c-nav-ready > nav.ul-nav-v3 { display: none!important; width: 100%!important; }
  .nav.ul4c-nav-ready.ul4c-menu-open > nav.ul-nav-v3 { display: flex!important; flex-direction: column; align-items: stretch; gap: 0!important; padding: 6px 0 12px; }
  .nav.ul4c-nav-ready .ul-nav-v3 > a, .nav.ul4c-nav-ready .ul-nav-v3 > details { display: block; width: 100%; }
  .nav.ul4c-nav-ready .ul-nav-v3 > a, .nav.ul4c-nav-ready .ul-nav-v3 > details > summary { padding: 12px; display: block; min-height: 44px; font-size: 16px; white-space: normal; }
  .nav.ul4c-nav-ready .ul-nav-menu .ul-nav-submenu { position: static; min-width: 0; max-width: none; box-shadow: none; margin: 0 4px 8px; }
  .nav.ul4c-nav-ready .ul-nav-menu .ul-nav-submenu a { min-height: 42px; }
}
@media(min-width:901px) { .ul4c-nav-toggle { display: none!important; } }
@media(max-width: 700px) {
  body > main, body > main.ency-page, body > main.characters-page, body > main.resonance-article, body > main.rel-page { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; }
  body.ul4c-seo-profile > header, body.ul4c-seo-profile > main, body.ul4c-seo-profile > footer { width: 100%; padding-left: 16px; padding-right: 16px; }
  .ul4b-gateway { width: calc(100% - 16px)!important; margin: 8px auto 20px!important; }
  .ul4b-main-map { pointer-events: auto; } /* UL4C_COLLAGE_TAP_FIX_V1 */
  .ul4b-hotspots { display: block!important; pointer-events: auto; }
  .ul4b-mobile-links { display: grid!important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .ul4b-mobile-links a { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 62px; padding: 11px!important; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; font-size: clamp(.85rem, 3.6vw, 1rem)!important; }
  .ul4b-mobile-links a:last-child:nth-child(odd) { grid-column: 1/-1; }
  .ul4b-mobile-links .ul4c-link-arrow { flex-shrink: 0; color: #ffca45; }
  .ul4b-video-head { display: block; }
  .ul4b-video-head p { overflow-wrap: anywhere; }
  .ul4b-videos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .ul4b-video-card { min-width: 0; }
  .ul4b-video-card video { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
  .ul4b-video-card figcaption { padding: 8px; font-size: .82rem; line-height: 1.35; }
  .ency-hero, .characters-hero, .resonance-intro { grid-template-columns: minmax(0,1fr)!important; }
}
@media(max-width:370px) { .ul4b-mobile-links { grid-template-columns: 1fr!important; } .ul4b-mobile-links a:last-child:nth-child(odd){grid-column:auto;} }
@media(prefers-reduced-motion:reduce) { .ul4c-nav-toggle { transition:none; } }
