@media (pointer: coarse) and (max-device-width: 1024px) {
  .desktop-instructions {
    display: none;
  }
  .mobile-instructions {
    display: block;
  }
  .right-btn-container {
    /*display: none;*/
    right: 0;
    top: 0;
  }
   .controls-container {
    display: none;
  }
  .logo-img-container {
    display: none;
  }
  .left-btn-container .ui-button::after {
    /*display: none;*/
    width: 40vw;
    text-align: left;
  }
  .left-btn-container {
    left: 0;
    bottom: 0;
  }
  .burger-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(46, 136, 64, 0.8);
    z-index: 1000;
  }
  .burger-menu-btn span {
    display: block;
    width: 30px;
    height: 4px;
    background-color: white;
    margin: 4px 0;
  }
  .ui-button:hover, .ui-button.hovered {
    background-position: center top;
    border: 1px solid rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
  }
  .left-btn-container .toggle-audio-btn {
    display: block;
  }
  .map-controls-container {
    display: none;
  }
}

@media (orientation: portrait) {
  .intro-layer h1 {
    font-size: 48px;
    width: 90vw;
  }
  .intro-layer h2 {
    font-size: 32px;
    width: 90vw;
  }
  .mobile-logo {
    display: block;
    width: 60%;
  }
  .intro-layer-container {
    height: 80vh;
  }
  .intro-layer-content {
    gap: 8px;
  }
  .intro-button {
    width: 90vw;
  }
  .patrons {
    right: 0;
    left: 0;
    width: 100vw;
    justify-content: center;
    height: 12vh;
    bottom: 5vh;
  }
  .logo {
    display: none;
    width: 33vw;
  }
  .text-info-point-container,
  .pano-info-container {
    width: 100vw;
    height: 100vh;
  }
  .text-info-point-container {
    background-color: rgba(46, 136, 64, 1.0);
  }
  .pano-info-container {
    top: 0;
    left: 0;
    background-color: rgba(46, 136, 64, 1.0);
  }
  .text-info-point-content,
  .pano-info-content {
    top: 10vh;
    left: 10vw;
    width: 80vw;
    height: 75vh;
  }
  .ol-title {
    font-size: 28px;
  }
  .img-info-point-content {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .info-point-section-container {
    background-color: rgba(46, 136, 64, 1.0);
  }
  .text-section {
    position: absolute;
    top: 10vh;
    left: 10vw;
    bottom: 55vh;
    right: 10vw;
    overflow: auto;
    padding-right: 24px;
  }
  .img-info-point-close-btn {
    background: url(../img/close-white-cross.svg) no-repeat 0 0;
    background-size: 100%;
  }
  .img-info-audio-btn-container {
    bottom: 2vh;
  }
  .img-section {
    justify-content: flex-start;
  }
  .info-point-section-container.image-container {
    height: 50vh;
    background-color: rgba(255, 255, 255, 1.0);
  }
  #img-info-point-image, #bsl-img-info-point-image {
    max-height: 20vh;
    margin-top: 2vh;
  }
  .image-select-container {
    margin-top: 2vh;
  }
  #instructions img {
    width: 80vw;
    margin-top: 20vh;
  }
  .ui-button::after {
    font-size: 14px;
  }
  .weather-widget-container {
    z-index: 1200;
    top: 0;
    right: 0;
    width: 100vw;
  }
  .weather-widget-close-btn {
    left: 7px;
    right: auto;
  }
  .accessibility-widget-container {
    z-index: 1200;
    top: 0;
    right: 0;
    width: 100vw;
  }
  .accessibility-widget {
    width: 100vw;
  }
  .accessibility-widget-body {
    height: calc(100vh - 80px);
    overflow-y: scroll;
    scrollbar-color: rgba(46, 136, 64, 1.0) white;
  }
  /* For Chrome, Edge, and Safari */
  .accessibility-widget::-webkit-scrollbar {
    width: 24px;
  }
  .accessibility-widget-body::-webkit-scrollbar-track {
    background: white; /* Track color */
  }
  .accessibility-widget-body::-webkit-scrollbar-thumb {
    background-color: rgba(46, 136, 64, 1.0);
  }
  .main-container {
    width: 80vw;
  }
  figure img {
    width: auto;
    height: auto;
    max-width: 80vw;
    max-height: 1000px;
  }
  .static-version {
    overflow-x: clip;
  }
  .bsl-welcome-container, .bsl-text-info-point-container {
    width: 100vw;
    height: 100vh;
    background-color: rgba(46, 136, 64, 1.0);
  }

  #bsl-welcome-video,
  #bsl-info-video,
  #bsl-text-info-point-video,
  #bsl-img-info-point-video {
    width: 100vw;
    height: auto;
  }

  #bsl-welcome-video,
  #bsl-info-video,
  #bsl-text-info-point-video {
    margin-bottom: 100px;
  }

  .bsl-welcome-content a {
    width: 90vw;
    text-align: center;
    margin: auto;
  }
}

/* iPhone SE */
@media only screen and (max-width: 375px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait) {
  .patrons {
    bottom: 5dvh;
  }
  .intro-layer h1 {
    font-size: 40px;
  }
  .intro-layer h2 {
    font-size: 24px;
  }
  .intro-layer-content {
    gap: 16px;
  }
}

@media (orientation: landscape) and (max-width: 1024px) {
  #landscapeOverlay {
    display: flex;
  }
}

@media (orientation: portrait) {
  /* make viewport extend under the phone’s UI */
  html { 
    padding-bottom: env(safe-area-inset-bottom);
  }

  #patrons {
    position: fixed;
    left: 0;
    bottom: calc(5vh + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    width: 100vw;
    display: flex;
    justify-content: center;
    gap: 20px;
    height: 12vh;
    z-index: 20;
  }

  .pano-info-audio-btn-container,
  .text-info-audio-btn-container,
  .img-info-audio-btn-container {
    bottom: calc( env(safe-area-inset-bottom, 12px) + 12px );
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .pano-info-container,
  .text-info-point-container {
    /* undo the desktop offsets */
    top: 0;
    left: 0;
  
    /* you already have these, but just to be explicit: */
    width: 100vw;
    height: 100vh;
  }

  /* make the pano overlay cover the visible screen exactly */
  .partial-overlay, 
  .pano-info-container,
  .text-info-point-container {
    position: fixed;
    inset: 0;        /* shorthand for top:0; right:0; bottom:0; left:0 */
    width: auto;     /* inset takes care of width/height */
    height: auto;
    background-color: rgba(46,136,64,1.0);
  }

  /* your audio strip already has bottom:12px; left:0; right:0; */
  /* you can also tack on safe-area padding if you need: */
  .pano-info-audio-btn-container {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
