/* Avelorin Atelier v2 – shared layout + reliable native scrolling. */
:root { color-scheme: light; }
html { min-height:100%; height:auto; overflow-x:clip; overflow-y:auto; scroll-padding-top:5.5rem; -webkit-text-size-adjust:100%; }
body { min-height:100%; height:auto; overflow-x:clip; overflow-y:visible; overscroll-behavior-y:auto; }
body.atelier-scroll-locked { overflow:hidden !important; touch-action:none; }
#mobile-atelier-menu.hidden, #gallery-lightbox.hidden { display:none !important; }
#mobile-atelier-menu { z-index:100; max-height:100dvh; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
#gallery-lightbox { z-index:110; }
main, section, footer { max-width:100%; }
img,video { max-width:100%; }
section[id],#narrative { scroll-margin-top:6rem; }
a[aria-disabled="true"] { opacity:.55; pointer-events:none; cursor:default; }
:where(a,button,input,select,textarea):focus-visible { outline:2px solid #705b3f; outline-offset:3px; }
header nav a[aria-current="page"] { color:#020605; font-weight:700; }
#mobile-atelier-menu a[aria-current="page"] { color:#705b3f; text-decoration:underline; text-underline-offset:.3em; }
.material-symbols-outlined { display:inline-flex; justify-content:center; align-items:center; vertical-align:middle; font-family:inherit!important; line-height:1; font-weight:400; font-style:normal; flex-shrink:0; }
.material-symbols-outlined svg { width:1em; height:1em; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#atelier-menu-toggle, #atelier-menu-close { min-width:44px; min-height:44px; }
header a[data-path="home"] { white-space:nowrap; }
@media (max-width:1023px) {
  header a[data-path="home"] { font-size:clamp(1.03rem,3.4vw,1.45rem); letter-spacing:.08em; }
  #mobile-atelier-menu .font-headline-md { font-size:clamp(1.7rem,5vw,2.2rem); line-height:1.12; }
}
@media (max-width:767px) {
  main h1 { overflow-wrap:break-word; }
  main .text-display-hero-mobile, main .text-display-hero, main .text-headline-lg { font-size:clamp(2.45rem,9.4vw,3.25rem); line-height:1.08; }
  main .text-headline-md { font-size:clamp(1.75rem,7vw,2.35rem); line-height:1.2; }
  main .text-body-lg { font-size:1rem; line-height:1.6; }
  main .py-space-3xl { padding-top:4rem; padding-bottom:4rem; }
  main .py-space-2xl { padding-top:3rem; padding-bottom:3rem; }
  #gallery-lightbox { padding:.65rem; align-items:center; }
  #gallery-lightbox>div.relative { max-height:calc(100dvh - 1.3rem); overflow-y:auto; }
  #gallery-lightbox>div.relative>div:first-child { height:min(32vh,250px); min-height:180px; flex-shrink:0; }
  #gallery-lightbox>div.relative>div:last-child { padding:1.15rem; overflow:visible; }
  #gallery-lightbox>button[aria-label="Previous image"],
  #gallery-lightbox>button[aria-label="Next image"] { top:min(27vh,200px); transform:translateY(-50%); padding:.25rem; background:rgba(0,0,0,.5); color:white; }
  #gallery-lightbox>button[aria-label="Previous image"] { left:.85rem; }
  #gallery-lightbox>button[aria-label="Next image"] { right:.85rem; }
  #gallery-lightbox>button[aria-label="Close Lightbox"] { top:.75rem;right:.75rem;background:rgba(0,0,0,.65);color:white; }
  #atelier-player-container { min-height:340px; }
  #atelier-player-container>.absolute.bottom-0 { padding:.75rem; }
}
@media (max-width:390px) { header a[data-path="home"] { font-size:1.03rem;letter-spacing:.045em; } #mobile-atelier-menu { padding:1rem; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { animation-duration:.01ms!important;transition-duration:.01ms!important; } }
