/* Phone-only polish. Nothing in this file applies at md (768px) or above. */
@media (max-width: 767px) {
  :root {
    --maragensea-header-height: 76px;
    --maragensea-newsbar-height: calc(88px + env(safe-area-inset-bottom, 0px));
    --maragensea-mobile-admin: 0px;
  }
  body.admin-bar { --maragensea-mobile-admin: 46px; }
  .elementor-location-header #first-header.header {
    height: 76px;
    min-height: 76px;
    padding: 12px 100px 12px 22px !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .elementor-location-header #first-header > .elementor-container { height: 100%; }
  .elementor-location-header .header-logo,
  .elementor-location-header .header-logo > .elementor-widget-wrap {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center;
    justify-content: flex-start;
  }
  .elementor-location-header .header-logo .elementor-widget { margin: 0; text-align: left; }
  .elementor-location-header .header-logo a { display: inline-flex; min-height: 44px; align-items: center; }
  .elementor-location-header .header-logo img { width: min(180px, 48vw); max-width: 180px !important; height: auto; }
  .elementor-location-header .maragensea-mobile-toggle {
    position: absolute;
    z-index: 10001;
    top: 16px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 74px;
    min-height: 44px;
    padding: 10px;
    border: 1px solid rgba(166,136,98,.45);
    border-radius: 0;
    background: rgba(5,14,15,.72);
    color: #c8b292;
    box-shadow: none;
    font: 500 11px/1.2 Montserrat, sans-serif;
    letter-spacing: .5px;
  }
  .elementor-location-header .maragensea-mobile-toggle:is(:hover,:focus,:active) { background: #0b1719; color: #f7f7df; }
  .maragensea-mobile-toggle__icon { display: grid; gap: 5px; width: 16px; }
  .maragensea-mobile-toggle__icon i { display: block; height: 1px; background: currentColor; transition: transform .2s ease; }
  .maragensea-mobile-toggle.is-active .maragensea-mobile-toggle__icon i:first-child { transform: translateY(3px) rotate(45deg); }
  .maragensea-mobile-toggle.is-active .maragensea-mobile-toggle__icon i:last-child { transform: translateY(-3px) rotate(-45deg); }
  .maragensea-mobile-menu[hidden] { display: none !important; }
  .elementor-location-header .maragensea-mobile-menu {
    position: absolute;
    z-index: 10000;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100dvh - 76px - var(--maragensea-mobile-admin) - var(--maragensea-newsbar-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 22px 18px;
    border-block: 1px solid rgba(166,136,98,.3);
    background: rgba(5,14,15,.98);
    box-shadow: 0 18px 28px rgba(0,0,0,.24);
  }
  .maragensea-mobile-menu ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
  .maragensea-mobile-menu li { margin: 0; padding: 0; }
  .elementor-location-header .maragensea-mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 12px 2px;
    border-bottom: 1px solid rgba(166,136,98,.16);
    color: #f7f7df;
    font: 400 13px/1.5 Montserrat, sans-serif;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
  }
  .elementor-location-header .maragensea-mobile-menu a:is(:hover,:focus) { color: #c8b292; background: transparent; }
  .maragensea-mobile-toggle:focus-visible,
  .maragensea-mobile-menu a:focus-visible { outline: 1px solid #a68862; outline-offset: 3px; }
  body.maragensea-mobile-menu-open .elementor-location-header { background: #050e0f !important; }

  /* Equal-height snap panels, with a readable scrollable region on short phones. */
  .maragensea-story__content,
  .maragensea-story__panel--about .maragensea-story__content,
  .maragensea-story__panel--vision .maragensea-story__content,
  .maragensea-story__panel--mission .maragensea-story__content {
    width: 100%;
    min-width: 0;
    height: calc(100% - var(--maragensea-header-height) - var(--maragensea-mobile-admin) - var(--maragensea-newsbar-height) - 20px);
    margin: calc(var(--maragensea-header-height) + var(--maragensea-mobile-admin)) 0 0;
    padding: clamp(24px, 5svh, 52px) 50px 24px 24px !important;
    justify-content: flex-start;
    align-self: flex-start;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(166,136,98,.4) transparent;
    -webkit-overflow-scrolling: touch;
  }
  .maragensea-story__content > * { flex-shrink: 0; }
  .maragensea-story h1 { font-size: clamp(30px, 8.7vw, 46px); line-height: 1.08; }
  .maragensea-story__eyebrow { font-size: 11px; line-height: 1.5; margin-bottom: 18px; letter-spacing: 2.5px; }
  .maragensea-story__panel--vision h2,
  .maragensea-story__panel--mission h2 { font-size: 14px; line-height: 1.4; letter-spacing: 2.5px; margin-bottom: 22px; }
  .maragensea-story__motto { font-size: 13px; line-height: 1.6; margin: 20px 0; }
  .maragensea-story__copy { max-width: 540px; font-size: 14px; line-height: 1.65; letter-spacing: .1px; }
  .maragensea-story__strapline { max-width: 500px; font-size: 10px; line-height: 1.8; letter-spacing: 1px; margin-top: 22px; }
  .maragensea-story__rail { right: 2px; gap: 0; }
  .maragensea-story__rail button { width: 44px; height: 44px; font-size: 9px; gap: 5px; }
  .maragensea-story__scroll-hint,
  .maragensea-story__continue { display: none; }
  .maragensea-story__ghost { font-size: 22vw; opacity: .035; }

  /* Touch controls share a consistent 44px row and safe-area clearance. */
  .maragensea-newsbar { height: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .maragensea-newsbar__flag { height: 88px; grid-template-rows: 44px 44px; }
  .maragensea-newsbar .maragensea-newsbar__pause { height: 44px; min-height: 44px; }
  .maragensea-newsbar button.maragensea-newsbar__status { min-height: 44px; }
  .maragensea-newsbar__contacts {
    max-height: calc(100dvh - var(--maragensea-newsbar-height) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .maragensea-newsbar__contact-value { white-space: normal; overflow-wrap: anywhere; }
  .maragensea-newsbar__contact-kind { font-size: 10px; }
  .maragensea-newsbar__contacts-hint { font-size: 11px; }
  @media (prefers-reduced-motion: reduce) {
    .maragensea-mobile-toggle__icon i { transition: none; }
  }
}
