/* Shared inline icons retain their line weight and colour on iOS and desktop. */
.icon{display:inline-block;width:1em;height:1em;flex:none;vertical-align:-.125em;pointer-events:none}
.text-link>.icon,.mobile-menu a>.icon,.showcase-utility a>.icon{margin-left:.55em}
.showcase-arrows button{display:grid;place-items:center}
.gallery-next-label{min-width:0}

/* Only confirmed pointer input hides link/button rings. Keep focus in place,
   preserve native behaviour before input/without JS, and show keyboard focus. */
html[data-focus-input="pointer"] :is(a,button):focus{outline:none}
html[data-focus-input="keyboard"] :is(a,button):focus{outline:3px solid #c66b3d}

/* The label keeps the approved desktop close control unchanged. */
.gallery-close .gallery-close-label{font:inherit;margin-left:0}

@media (max-width:800px), (max-width:1000px) and (max-height:500px){
  .gallery{
    inset:0;
    width:100%;
    max-width:none;
    height:100%;
    height:100dvh;
    max-height:none;
    margin:0;
    padding:0 max(18px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .gallery-head{
    align-items:flex-start;
    gap:14px;
    padding:max(18px,env(safe-area-inset-top)) 0 18px;
    margin-bottom:22px;
  }
  .gallery-head>div{min-width:0}
  .gallery-head .eyebrow{display:block;font-size:9px;letter-spacing:.1em;line-height:1.6}
  .gallery-head h2{font-size:clamp(27px,6.8vw,38px);line-height:1.12;margin-top:7px;overflow-wrap:anywhere}
  .gallery-close{
    display:grid;
    place-items:center;
    flex:0 0 44px;
    width:44px;
    height:44px;
    padding:0;
    border:1px solid var(--line);
    border-radius:50%;
  }
  .gallery-close .gallery-close-label{display:none}
  .gallery-close .gallery-close-icon{font-size:26px;line-height:1;margin:0}
  .gallery-intro{display:block;margin-bottom:28px}
  .gallery-intro>p:first-child{font-size:14px;line-height:1.8;max-width:640px}
  .gallery-count{margin-top:16px;font-size:11px;line-height:1.5;white-space:normal}
  .gallery-images{gap:30px}
  .gallery-images figure{min-width:0}
  .gallery-images figcaption{gap:16px;font-size:12px;line-height:1.65}
  .gallery-images figcaption>span:first-child{flex-shrink:0;font-size:10px}
  .gallery-images figcaption>span:last-child{min-width:0;overflow-wrap:anywhere}
  .gallery-end{align-items:flex-start;flex-direction:column;gap:20px;padding-top:32px}
  .gallery-end .text-link{display:flex;align-items:center;min-height:44px;max-width:100%;font-size:13px;line-height:1.6;text-align:left;white-space:normal;padding:9px 0;overflow-wrap:anywhere}
}

@media (max-width:1000px) and (max-height:500px){
  .gallery-head{padding-top:max(10px,env(safe-area-inset-top));padding-bottom:10px}
  .gallery-head h2{font-size:26px;margin-top:3px}
}
