/* Mobile layouts use the document flow, so search results and travel details can grow. */
@media (max-width: 820px) {
  :root { --gutter: 20px; --section-space: 64px; }
  .header-inner { gap: 10px; }
  .mobile-app-link, .menu-toggle { min-height: 44px; }
  .menu-toggle { width: 44px; height: 44px; flex: 0 0 44px; }
  .nav.is-open { max-height: calc(100dvh - var(--header-height)); padding-bottom: max(20px,env(safe-area-inset-bottom)); overflow-y: auto; border-bottom: 1px solid var(--line); }
  .hero { display: flex; flex-direction: column; min-height: calc(100svh - var(--header-height)); padding-bottom: 16px; }
  .hero-copy { position: relative; inset: auto; width: auto; margin: 38px 20px 0; }
  .hero-copy h1 { max-width: 620px; margin-inline: auto; font-size: clamp(32px,8.5vw,52px); line-height: 1.06; letter-spacing: -.04em; }
  .hero-copy h1 span { white-space: normal; }
  .hero-copy p { max-width: 42ch; font-size: 16px; line-height: 1.5; }
  .hero-actions { flex-wrap: wrap; gap: 8px; }
  .hero-actions .button { min-height: 48px; padding-inline: 17px; font-size: 14px; }
  .hero-map-controls { position: relative; inset: auto; align-self: flex-end; flex: none; margin: 28px 16px 26px; }
  .hero-map-controls button, .map-zoom-controls button { width: 44px; height: 44px; }
  .product-demo { position: relative; inset: auto; flex: none; width: calc(100% - 24px); max-width: 640px; margin: auto auto 0; padding: 14px; transform: none; border-radius: 16px; }
  .demo-topline { flex-wrap: wrap; gap: 4px 8px; }
  .demo-topline p { font-size: 15px; }
  .demo-tabs button, .map-reset, .map-filter-row button { min-height: 44px; }
  .demo-search { gap: 8px; min-height: 52px; padding-left: 10px; }
  .demo-search input { width: 0; min-width: 0; font-size: 16px; }
  .demo-search button { flex: none; min-width: 72px; min-height: 44px; padding-inline: 12px; font-size: 14px; }
  .demo-results { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 7px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #ccc5bd transparent; }
  .demo-results::-webkit-scrollbar { display: block; height: 3px; }
  .demo-results::-webkit-scrollbar-thumb { background: #ccc5bd; border-radius: 4px; }
  .demo-results .demo-result, .demo-results .demo-result:nth-child(n+3) { display: flex; flex: 0 0 min(83%,235px); min-width: 0; min-height: 80px; gap: 9px; padding: 10px; scroll-snap-align: start; }
  .demo-result-image { width: 46px; height: 52px; flex-basis: 46px; }
  .demo-result-copy strong { font-size: 15px; white-space: normal; }
  .demo-result-copy .demo-result-place, .demo-result-copy .demo-result-status { font-size: 13px; }
  .demo-result-arrow { font-size: 16px; }
  .demo-note { margin-top: 9px; font-size: 12px; line-height: 1.5; }
  .hero-trip-action { grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding-top: 12px; }
  .hero-trip-copy { grid-column: 1/-1; }
  .hero-trip-copy small { overflow: visible; white-space: normal; line-height: 1.5; }
  .hero-trip-add { justify-content: center; min-height: 44px; padding: 10px 12px; line-height: 1.35; }
  .hero-trip-link { min-height: 44px; display: flex; align-items: center; }
  .selected-festival { flex-wrap: wrap; }
  .selected-festival .button { min-height: 44px; }
  .map-filter-row { flex-wrap: wrap; }
  .hero-map-fallback { position: relative; inset: auto; margin: 12px 20px; }

  .section-intro h2, .map-section-heading h2, .membership-heading h2, .plan-story h2, .faq-heading h2 { font-size: clamp(30px,7.7vw,42px); line-height: 1.12; letter-spacing: -.035em; }
  .destination-explorer, .plan-showcase, .agenda-showcase, .proposal-layout { min-width: 0; }
  .festival-options { scrollbar-width: thin; scrollbar-color: #c8c3bb transparent; }
  .festival-options button { min-height: 52px; gap: 8px; padding: 10px; white-space: normal; line-height: 1.4; text-align: left; }
  .festival-options button span { white-space: normal; text-align: right; }
  .festival-detail > img { height: auto; aspect-ratio: 16/10; object-fit: cover; }
  .festival-detail-copy { padding: 20px; }
  .trip-planner { padding: 22px 18px; }
  .trip-planner-intro h3 { font-size: 26px; line-height: 1.2; }
  .trip-planner-fields { gap: 14px 10px; }
  .trip-planner-fields > label:first-child { grid-column: 1/-1; }
  .trip-planner-fields label { min-width: 0; }
  .trip-planner-fields input, .trip-planner-fields select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding-inline: 10px; font-size: 16px; }
  .trip-planner-fields input[type="date"] { appearance: none; }
  .trip-planner-fields input[type="date"]::-webkit-date-and-time-value { text-align: left; }
  .trip-planner-fields .button { min-width: 0; min-height: 48px; padding: 10px; font-size: 14px; white-space: normal; }
  .trip-planner-fields [data-trip-add-label] { min-width: 0; font-size: inherit; line-height: 1.3; }
  .trip-stop { grid-template-columns: 30px minmax(0,1fr); gap: 8px 10px; padding: 12px; }
  .trip-stop-actions { grid-column: 2; justify-content: flex-end; }
  .trip-stop-actions button { min-width: 44px; min-height: 44px; }
  .trip-footer { gap: 12px; font-size: 14px; }
  .trip-footer .quiet-link { min-height: 44px; }
  .festival-photo { min-height: 180px; }

  .discovery-mode-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .discovery-mode-button { min-width: 0; min-height: 76px; padding: 10px; }
  .discovery-mode-button small { font-size: 12px; line-height: 1.4; }
  .map-discovery-count { font-size: 14px; }
  .map-filter-group { width: 100%; gap: 8px; }
  .map-filter-row--main { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .map-filter-row--main button { padding-inline: 6px; font-size: 13px; }
  .national-map-explorer { margin-inline: 0; }
  .national-map-shell { min-height: 0; height: clamp(300px,52svh,420px); border: 1px solid var(--line); border-radius: 14px; }
  .map-detail-panel { position: relative; inset: auto; margin-top: 12px; pointer-events: auto; }
  .map-selection { grid-template-columns: 76px minmax(0,1fr); align-items: start; gap: 12px; padding: 16px; }
  .map-selection-image { width: 76px; height: 88px; object-fit: cover; }
  .map-selection-copy { grid-column: 2; min-width: 0; }
  .map-selection h3, .map-selection .selected-place { overflow: visible; white-space: normal; }
  .map-selection .selected-place, .map-selection .status-label { font-size: 13px; line-height: 1.45; }
  .map-selection-actions { grid-column: 1/-1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .map-selection-actions .button { grid-column: auto; grid-row: auto; width: 100%; min-height: 46px; margin: 0; padding: 10px 8px; font-size: 13px; }
  .map-selection-actions .button { min-width: 0; gap: 6px; white-space: normal; }
  .map-selection-actions [data-trip-add-label] { min-width: 0; font-size: inherit; }
  .map-empty-state { padding: 24px 20px; }
  .map-empty-state > p:not(.map-empty-note) { font-size: 16px; }

  .membership-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
  .membership-heading > div > p { font-size: 16px; }
  .membership-grid { grid-template-columns: 1fr; gap: 16px; }
  .membership-card { display: flex; gap: 0; padding: 24px; }
  .membership-card-heading { flex-wrap: wrap; gap: 10px; }
  .membership-card-heading > div { flex: 1 1 175px; }
  .membership-card-heading p { font-size: 15px; }
  .membership-price { margin: 24px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
  .membership-price strong { font-size: 46px; }
  .membership-period { margin: -5px 0 18px; font-size: 14px; }
  .membership-card ul { gap: 12px; font-size: 15px; }
  .membership-action { width: 100%; min-height: 48px; margin-top: 24px; font-size: 15px; }
  .membership-offer-model { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .membership-offer-model span { font-size: 15px; }

  .plan-workspace, .agenda-workspace { min-width: 0; padding: 22px 18px; }
  .plan-workspace-heading, .agenda-heading { flex-wrap: wrap; gap: 10px; }
  .plan-demo-location { max-width: 100%; white-space: normal; }
  .plan-fields { gap: 14px; }
  .plan-fields label { min-width: 0; }
  .plan-fields select { min-width: 0; width: 100%; min-height: 48px; font-size: 16px; }
  .plan-workspace .plan-preview { padding: 18px; }
  .plan-workspace .plan-preview strong { font-size: 20px; overflow-wrap: anywhere; }
  .plan-preview-stops li { grid-template-columns: 48px minmax(0,1fr); gap: 8px; }
  .plan-preview-stops strong, .plan-preview-stops small { font-size: 14px; }
  .agenda-tabs button { min-height: 44px; padding-inline: 18px; }
  .plan-document-dialog { max-height: calc(100dvh - 20px); overscroll-behavior: contain; }
  .plan-document-header { gap: 12px; }
  .plan-document-header > div { min-width: 0; }
  .plan-document-close { width: 44px; height: 44px; }
  .plan-document-footer .button { min-height: 48px; padding-block: 12px; }
  .document-section-heading, .document-note { gap: 8px; }

  .how-step-body { padding: 20px 0; }
  .how-step-body .quiet-link { min-height: 44px; }
  .how-preview--search { height: auto; min-height: 286px; }
  .step-search input { font-size: 16px; }
  .step-results button { min-height: 52px; }
  .step-experience-card { min-width: 0; }
  .step-experience-card strong, .step-experience-card small { overflow-wrap: anywhere; }
  .faq-list summary { display: grid; grid-template-columns: minmax(0,1fr) 28px; gap: 10px; padding-block: 16px; }
  .proposal-card { min-width: 0; padding: 22px 18px; }
  .proposal-form label, .proposal-form input, .proposal-form select, .proposal-form textarea { min-width: 0; max-width: 100%; }
  .proposal-form input, .proposal-form select, .proposal-form textarea { font-size: 16px; }
  .proposal-form input, .proposal-form select { min-height: 48px; }
  .proposal-captcha { flex-wrap: wrap; gap: 10px; }
  .proposal-form-actions .button { width: 100%; min-height: 48px; }
  .footer-column { gap: 0; }
  .footer-column a { display: flex; align-items: center; min-height: 44px; }
  .footer-bottom { padding-bottom: env(safe-area-inset-bottom); }
  .image-credits a { overflow-wrap: anywhere; }
}
/* Date inputs need their own row on narrow tablets and phones in landscape. */
@media (min-width: 821px) and (max-width: 1024px) {
  .trip-planner-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trip-planner-fields > label:first-child { grid-column: 1/-1; }
  .trip-planner-fields label, .trip-planner-fields input, .trip-planner-fields select { min-width: 0; width: 100%; }
  .trip-planner-fields .button { min-width: 0; white-space: normal; }
  .trip-planner-fields [data-trip-add-label] { font-size: inherit; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .hero-copy { margin-inline: 16px; }
  .hero-copy h1 { font-size: 31px; }
  .hero-actions .button { padding-inline: 13px; }
  .product-demo { padding: 12px; }
  .trip-planner-fields { grid-template-columns: 1fr; }
  .hero-trip-action { grid-template-columns: 1fr; }
  .hero-trip-link { justify-content: center; }
  .membership-card { padding: 20px; }
  .map-selection { padding: 12px; grid-template-columns: 60px minmax(0,1fr); gap: 10px; }
  .map-selection-image { width: 60px; height: 76px; }
}
