/* HGP Island Mobile Fix v0.1.1
   Strictly loaded on selected Island page. No desktop styles.
*/
@media (max-width: 767px) {
  /* Limit the empty space after "Der Weg ist das Ziel."
     only if the JS verified the heading and its own section. */
  .hgpif-tight-section {
    box-sizing: border-box !important;
    height: var(--hgpif-section-height) !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-bottom: 0 !important;
  }
  .hgpif-tight-section .hgpi-photo-opening-stick,
  .hgpif-tight-section [class*="photo-opening-stick"] {
    height: 100% !important;
    min-height: 0 !important;
  }
  /* The "DIE REISE" label was colliding with the first chapter link. */
  .hgpif-rail {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    align-items: center !important;
    min-width: 0 !important;
  }
  /* Keep the original travel label visible and fixed on the left.
     The chapter links alone scroll on the right. A two-part flex row
     preserves the full touch-scrolling area at small iPhone widths. */
  .hgpif-rail > .hgpif-rail-label {
    display: flex !important;
    position: relative !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 12px 0 0 !important;
    max-width: 96px;
    white-space: nowrap !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
    letter-spacing: .13em !important;
    color: #d1b382 !important;
  }
  .hgpif-rail-scroll {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 20px !important;
    padding: 13px 17px 13px 4px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 17px;
  }
  .hgpif-rail-scroll::-webkit-scrollbar {
    display: none;
  }
  .hgpif-rail-link {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    min-height: 24px;
    align-items: center;
  }
  .hgpif-status {
    position: fixed; bottom: 14px; right: 10px; z-index: 99999;
    border: 1px solid rgba(218,179,126,.75);
    border-radius: 6px; padding: 7px 10px;
    background: rgba(8,24,25,.94);
    color: #edc993; font: 11px/1.5 Arial,sans-serif;
    pointer-events: none;
    box-shadow: 0 7px 24px rgba(0,0,0,.3);
  }
}
