/* Shared by restored and current pages. Keep mobile chrome opaque while scrolling. */
@media(max-width:1080px){
  :root{--hd:80px}
  html{background:var(--ink)}
  body{padding-top:0}
  .hd{position:sticky;top:0;width:100%;background:var(--ink);backdrop-filter:none}
  .hd-in{min-height:var(--hd)}
}
@media(max-width:360px){.hd .lg img{max-width:180px;height:auto}.hd-in{gap:8px}}
.messenger-links{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--contact-notice-height,0px));z-index:70;display:flex;flex-direction:column;gap:8px}
.messenger-link{display:grid;place-items:center;width:48px;height:48px;background:var(--block);color:var(--text);border:1px solid var(--accent);border-radius:50%;box-shadow:0 2px 8px #0004}
.messenger-link svg{width:26px;height:26px}
.messenger-link:hover,.messenger-link:focus-visible{background:var(--accent);color:var(--accent-text)}
.messenger-link:focus-visible{outline:2px solid var(--text);outline-offset:3px}
html.lb-on .messenger-links,body:has(dialog[open]) .messenger-links{visibility:hidden}

/* Keep native document scrolling stationary in embedded mobile browsers.
   The internal scrollport clips content before it can paint above the header. */
.site-scroll{display:contents}
@media(max-width:1080px){
  html,body{height:100%;overflow:hidden}
  body{height:100dvh}
  .site-scroll{display:block;height:100%;overflow:auto;overscroll-behavior-y:none;isolation:isolate;scroll-behavior:smooth}
  .site-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
}
@media(prefers-reduced-motion:reduce){.site-scroll{scroll-behavior:auto}}
