/* Mobile viewport hardening: prevent browser page zoom and iOS input focus zoom. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Eliminate double-tap page zoom without changing normal scrolling. */
a,
button,
[role="button"],
input,
select,
textarea,
label {
  touch-action: manipulation;
}

/* iOS Safari zooms focused fields when computed text is below 16px. */
@media (max-width: 1024px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* v0.2.1: mobile hero facts must never overlap the hero copy. */
@media (max-width: 700px) {
  .hero {
    height: auto !important;
    min-height: 100svh !important;
    padding-bottom: 94px;
  }

  .hero-content {
    width: calc(100% - 36px);
    margin-left: 18px;
    padding-top: 126px;
    padding-bottom: 0;
  }

  .hero-content h1 {
    margin-bottom: 22px;
  }

  .hero-lead {
    max-width: 100%;
    margin-bottom: 24px;
  }

  .hero-facts {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: calc(100% - 28px) !important;
    margin: 30px 14px 0;
  }
}

@media (max-width: 390px) {
  .hero-content {
    padding-top: 116px;
  }

  .hero-content h1 {
    font-size: clamp(48px, 15vw, 62px);
  }
}

/* v0.2.2 — pełny mobile polish po audycie całej strony */
@media (max-width: 700px) {
  :root { --mobile-gutter: 16px; }
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  main { overflow: clip; }

  .site-header {
    height: 68px !important;
    padding: 0 14px !important;
    gap: 8px;
    background: rgba(245,241,214,.94);
    color: var(--ink);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(38,26,7,.07);
  }
  .site-header.scrolled { height: 64px !important; }
  .site-header:not(.scrolled) .brand img { filter: none !important; }
  .brand { min-width: 0; gap: 9px; font-size: clamp(15px,4.5vw,18px); white-space: nowrap; }
  .brand img { width: 34px !important; height: 34px !important; flex: 0 0 34px; }
  .account-link { max-width: 108px; min-height: 42px; padding: 0 13px !important; display: inline-flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(255,255,255,.7); border:1px solid rgba(90,39,15,.12); font-size:12px !important; white-space:nowrap; }
  .menu-button { width: 42px !important; height: 42px !important; padding: 10px !important; background: rgba(255,255,255,.65) !important; border:1px solid rgba(90,39,15,.1); }

  .hero {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 28px !important;
    background: var(--green-deep);
  }
  .hero-art { height: 100%; }
  .hero-shade { background: linear-gradient(180deg,rgba(38,26,7,.18) 0%,rgba(38,26,7,.52) 42%,rgba(38,26,7,.9) 100%) !important; }
  .hero-content {
    width: auto !important;
    margin: 0 var(--mobile-gutter) !important;
    padding: 108px 0 0 !important;
  }
  .hero-content h1 {
    max-width: 100%;
    margin-bottom: 18px !important;
    font-size: clamp(50px,14.8vw,66px) !important;
    line-height: .92 !important;
    letter-spacing: -.05em;
  }
  .hero-lead { max-width:100% !important; margin-bottom:20px !important; font-size:15px !important; line-height:1.55 !important; }
  .hero-actions { gap:18px; flex-wrap:wrap; }
  .hero-actions .primary-button { min-height:50px; padding:0 20px; }
  .hero-actions-clean .text-button { min-height:42px; font-size:13px; }
  .hero-facts {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    margin: 24px var(--mobile-gutter) 0 !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    border-radius: 20px !important;
    background: rgba(38,26,7,.58) !important;
  }
  .hero-facts div { min-width:0; padding:14px 15px !important; }
  .hero-facts strong { font-size:24px !important; line-height:1.1; }
  .hero-facts span { font-size:9px !important; line-height:1.3; }

  .section { width: calc(100% - 32px) !important; padding: 64px 0 !important; }
  .section-heading,.gallery-head,.availability-copy,.map-section-head { margin-bottom:24px !important; }
  .eyebrow { margin-bottom:11px; font-size:10px; }
  h2,.amenities-catalog .section-heading h2,.stay-info-head h2,.map-section-head h2 { font-size:clamp(38px,11.5vw,50px) !important; line-height:1 !important; }
  .intro { gap:24px !important; }
  .intro-copy { font-size:15px; line-height:1.65; }
  .large-copy { font-size:20px !important; line-height:1.45 !important; }

  .feature-strip { grid-template-columns:1fr 1fr !important; }
  .feature { min-height:96px !important; padding:14px 12px !important; gap:11px !important; }
  .feature-icon { width:38px !important; height:38px !important; }
  .feature b { font-size:13px; line-height:1.25; }
  .feature small { font-size:10px; line-height:1.3; }

  .gallery { width:calc(100% - 20px) !important; }
  .gallery-head { gap:15px !important; }
  .gallery-head>p { font-size:14px; line-height:1.6; }
  .gallery-grid { gap:10px !important; }
  .gallery-grid figure { aspect-ratio:1/.78 !important; border-radius:20px !important; }
  .gallery-grid figure:not(:first-child) { aspect-ratio:1/.72 !important; }
  .gallery-grid figcaption { left:10px; right:10px; bottom:10px; padding:11px 13px; border-radius:13px; font-size:12px; }
  .gallery-more { width:100%; min-height:50px; margin-top:14px; }

  .amenities-catalog {
    width:calc(100% - 20px) !important;
    margin:20px auto !important;
    padding:44px 12px !important;
    border-radius:28px !important;
  }
  .amenities-catalog-head,.stay-info-head { display:block !important; margin-bottom:24px !important; }
  .amenities-catalog-head>p,.stay-info-head>p { margin-top:14px !important; font-size:14px !important; line-height:1.6 !important; }
  .amenities-featured { grid-template-columns:1fr 1fr !important; gap:9px !important; }
  .amenity-featured-card { min-width:0; min-height:112px !important; padding:14px !important; gap:10px !important; align-items:flex-start !important; flex-direction:column; }
  .amenity-featured-card>span { width:40px !important; height:40px !important; }
  .amenity-featured-card b { font-size:13px !important; }
  .amenity-featured-card small { font-size:11px !important; }
  .amenity-category-grid { columns:1 !important; }
  .amenity-category-card { margin-bottom:10px !important; border-radius:18px !important; }
  .amenity-category-toggle { gap:11px !important; padding:14px !important; }
  .amenity-category-icon { width:42px !important; height:42px !important; }
  .amenity-category-toggle b { font-size:14px !important; }
  .amenity-category-items { padding:0 14px 10px !important; }
  .amenity-row { grid-template-columns:34px 1fr !important; gap:10px !important; padding:12px 0 !important; }
  .amenity-row>span { width:34px !important; height:34px !important; }
  .amenity-highlight { grid-column:2; justify-self:start; margin-top:3px; }

  .stay-info { width:calc(100% - 20px) !important; padding:54px 12px !important; }
  .stay-info-grid { gap:9px !important; }
  .stay-info-grid article { grid-template-columns:42px 1fr !important; padding:15px !important; border-radius:18px !important; }
  .stay-info-grid article>span { width:42px !important; height:42px !important; }
  .stay-info-grid strong { font-size:15px !important; }
  .stay-info-grid p { font-size:12px !important; }
  .damage-note { gap:12px !important; padding:15px !important; border-radius:18px !important; }
  .damage-note>span { width:40px !important; height:40px !important; flex:0 0 40px; }
  .damage-note p { font-size:12px; }

  .availability { width:calc(100% - 20px) !important; gap:24px !important; }
  .availability-copy>p:not(.eyebrow) { margin-top:16px !important; font-size:14px !important; }
  .legend { flex-wrap:wrap; gap:10px 16px !important; margin-top:17px !important; }
  .calendar-card { padding:15px 9px !important; border-radius:22px !important; }
  .calendar-status { margin:0 0 14px !important; padding:11px !important; gap:9px !important; }
  .calendar-status button { padding:7px 8px !important; }
  .calendar-toolbar { grid-template-columns:38px 1fr 38px !important; margin-bottom:16px !important; }
  .calendar-toolbar button { width:38px !important; height:38px !important; }
  .calendar-toolbar strong { font-size:20px !important; }
  .calendar-weekdays { font-size:8px !important; }
  .calendar-days { gap:3px 2px !important; }
  .calendar-day { height:40px !important; min-height:40px !important; border-radius:10px !important; font-size:12px !important; }
  .calendar-selection-hint { margin:12px 4px 0 !important; font-size:10px !important; }
  .calendar-summary-bar { padding:13px !important; border-radius:15px !important; }

  .map-experience { width:calc(100% - 20px) !important; }
  .map-section-head>p { font-size:14px; line-height:1.6; }
  .interactive-map-shell { border-radius:22px !important; overflow:hidden; }
  .map-canvas-wrap { min-height:360px !important; }
  .map-origin-badge { right:9px !important; bottom:9px !important; left:9px !important; padding:9px !important; border-radius:15px !important; }
  .map-origin-logo { width:36px !important; height:36px !important; flex-basis:36px !important; }
  .map-origin-badge strong { font-size:12px !important; }
  .map-origin-badge>div>span { font-size:9px !important; }
  .map-sidebar { padding:16px 10px 16px !important; }
  .map-sidebar-head h3 { margin-bottom:13px !important; font-size:28px !important; }
  .route-mode-switch button { min-height:40px; padding:0 6px; font-size:10px; }
  .attraction-list { gap:7px !important; padding-top:12px !important; }
  .attraction-card { grid-template-columns:38px minmax(0,1fr) auto !important; padding:10px !important; gap:9px !important; border-radius:14px !important; }
  .attraction-icon { width:38px !important; height:38px !important; }
  .attraction-card b { font-size:11px !important; }
  .route-result { padding:16px !important; border-radius:18px !important; }
  .route-stats strong { font-size:22px !important; }
  .map-empty-route { padding:12px !important; }

  .closing-cta { min-height:0 !important; padding:58px 18px 64px !important; gap:28px !important; }
  .closing-cta h2 { font-size:clamp(40px,12vw,52px) !important; }
  .closing-cta .primary-button { width:100%; }
  footer { gap:18px !important; padding:30px 18px calc(105px + env(safe-area-inset-bottom)) !important; }
  footer>div { gap:6px !important; }

  .mobile-booking { left:10px !important; right:10px !important; height:56px !important; padding:0 22px !important; bottom:max(8px,env(safe-area-inset-bottom)) !important; }
  .chat-launcher { right:14px !important; bottom:76px !important; width:50px !important; height:50px !important; }
  .chat-panel { left:6px !important; right:6px !important; bottom:6px !important; height:calc(100dvh - 12px) !important; border-radius:22px !important; }

  .booking-modal-wide { max-height:96dvh !important; padding:34px 12px calc(18px + env(safe-area-inset-bottom)) !important; border-radius:24px 24px 0 0 !important; }
  .booking-intro { padding:0 38px 16px 4px !important; }
  .booking-intro h2 { font-size:34px !important; line-height:1 !important; }
  .booking-intro>p:last-child { font-size:13px; line-height:1.5; }
  .booking-progress { position:sticky; top:0; z-index:4; }
  .booking-step-panel { padding-left:1px; padding-right:1px; }
  .booking-calendar-shell { padding:10px 5px !important; }
  .booking-calendar-months .calendar-day { height:39px !important; }
  .booking-summary-sidebar { border-radius:18px !important; padding:15px !important; }
  .booking-navigation { gap:9px !important; }
  .booking-navigation button { min-height:50px; }
  .booking-rules-card summary { padding:15px !important; }
  .booking-rules-list { padding:0 15px 14px !important; }

  .lightbox figure { width:calc(100% - 24px); }
  .lightbox figure img { max-height:72dvh; object-fit:contain; }
}

@media (max-width: 380px) {
  .account-link { display:none !important; }
  .site-header { grid-template-columns:1fr auto !important; }
  .hero-content h1 { font-size:47px !important; }
  .amenities-featured { grid-template-columns:1fr !important; }
  .amenity-featured-card { min-height:auto !important; flex-direction:row !important; align-items:center !important; }
  .feature { padding:12px 9px !important; }
  .feature-icon { width:34px !important; height:34px !important; }
  .calendar-day { height:37px !important; min-height:37px !important; }
}

/* v0.2.4 — lekki liquid glass dla mobilnego CTA */
@media (max-width: 980px) {
  .mobile-booking {
    isolation: isolate;
    overflow: hidden;
    color: rgba(255, 255, 255, .98) !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.07) 42%, rgba(81,38,16,.20)),
      rgba(67, 35, 20, .56) !important;
    border: 1px solid rgba(255, 255, 255, .30) !important;
    -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
    backdrop-filter: blur(18px) saturate(145%) !important;
    box-shadow:
      0 15px 38px rgba(38, 26, 7, .23),
      inset 0 1px 0 rgba(255, 255, 255, .34),
      inset 0 -1px 0 rgba(255, 255, 255, .08) !important;
    text-shadow: 0 1px 10px rgba(38, 26, 7, .26);
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease !important;
  }

  .mobile-booking::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1px 22% auto 8%;
    height: 46%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0));
    pointer-events: none;
  }

  .mobile-booking::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 110px;
    height: 110px;
    right: -42px;
    top: -54px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 156, 80, .24), rgba(240, 156, 80, 0) 68%);
    pointer-events: none;
  }

  .mobile-booking span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-right: -10px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
    font-size: 20px;
    line-height: 1;
  }

  .mobile-booking:active {
    transform: scale(.985);
    background:
      linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08) 42%, rgba(81,38,16,.22)),
      rgba(67, 35, 20, .62) !important;
    border-color: rgba(255,255,255,.38) !important;
    box-shadow:
      0 9px 24px rgba(38,26,7,.22),
      inset 0 1px 0 rgba(255,255,255,.32) !important;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (max-width: 980px) {
    .mobile-booking {
      background: rgba(73, 39, 22, .91) !important;
    }
  }
}

/* v0.2.6 — premium mobile CTA: subtelne szkło bez mlecznej plamy */
@media (max-width: 980px) {
  .mobile-booking {
    isolation: isolate;
    overflow: hidden;
    height: 60px !important;
    padding: 0 10px 0 24px !important;
    color: #fff !important;
    background: rgba(43, 29, 20, .64) !important;
    border: 1px solid rgba(255, 255, 255, .20) !important;
    -webkit-backdrop-filter: blur(10px) saturate(118%) !important;
    backdrop-filter: blur(10px) saturate(118%) !important;
    box-shadow:
      0 12px 30px rgba(24, 14, 8, .22),
      inset 0 1px 0 rgba(255, 255, 255, .14) !important;
    text-shadow: none !important;
    font-weight: 780;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease !important;
  }

  .mobile-booking::before,
  .mobile-booking::after {
    content: none !important;
    display: none !important;
  }

  .mobile-booking span {
    width: 42px;
    height: 42px;
    margin-right: 0;
    border: 1px solid rgba(255, 255, 255, .26);
    background: rgba(255, 255, 255, .10);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    backdrop-filter: blur(8px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .17);
    font-size: 23px;
    font-weight: 500;
  }

  .mobile-booking:active {
    transform: scale(.985);
    background: rgba(43, 29, 20, .72) !important;
    border-color: rgba(255, 255, 255, .28) !important;
    box-shadow:
      0 8px 20px rgba(24, 14, 8, .20),
      inset 0 1px 0 rgba(255, 255, 255, .13) !important;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (max-width: 980px) {
    .mobile-booking { background: rgba(43, 29, 20, .94) !important; }
  }
}

/* v0.3.8: mapa zajmuje całą szerokość, szczegóły są nakładką po kliknięciu punktu. */
@media (max-width: 700px) {
  .interactive-map-shell { display:block !important; min-height:0 !important; }
  .map-canvas-wrap { min-height:540px !important; }
  .map-sidebar, .attraction-list, .map-sidebar-head { display:none !important; }
  .map-floating-controls { top:9px !important; right:9px !important; width:min(276px,calc(100% - 70px)) !important; }
  .map-empty-route { top:58px !important; right:9px !important; left:51px !important; margin:0 !important; padding:9px 10px !important; }
  .map-canvas-wrap > .route-result { position:absolute !important; right:9px !important; bottom:9px !important; left:9px !important; width:auto !important; max-height:72% !important; margin:0 !important; overflow:auto !important; }
  .map-canvas-wrap.route-open .map-origin-badge { display:none !important; }
}

/* v0.4.2: pełnoekranowy podgląd galerii na telefonach. */
@media (max-width: 760px) {
  .lightbox {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding:
      max(6px, env(safe-area-inset-top))
      4px
      max(6px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
  }

  .lightbox figure {
    position: relative !important;
    width: 100% !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .lightbox figure img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100vw - 8px) !important;
    max-height: calc(100dvh - 18px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    object-fit: contain !important;
    border-radius: 12px !important;
  }

  .lightbox figcaption {
    position: absolute !important;
    left: 50% !important;
    bottom: 10px !important;
    width: max-content !important;
    max-width: calc(100% - 88px) !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    color: rgba(255,255,255,.92) !important;
    background: rgba(20,14,8,.58) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    transform: translateX(-50%) !important;
  }

  #lightboxPrev,
  #lightboxNext {
    position: absolute !important;
    z-index: 3 !important;
    top: 50% !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    background: rgba(18,12,7,.46) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    transform: translateY(-50%) !important;
  }

  #lightboxPrev { left: max(8px, env(safe-area-inset-left)) !important; }
  #lightboxNext { right: max(8px, env(safe-area-inset-right)) !important; }

  #lightboxClose {
    z-index: 4 !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    width: 44px !important;
    height: 44px !important;
    border: 1px solid rgba(255,255,255,.2) !important;
    background: rgba(18,12,7,.58) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
  }
}
