/* Mobile discovery chrome, opted into by search and local programmes only. */
.search-mobile-intro, .search-mobile-actions, .search-filter-panel-header { display: none; }
.search-map-toggle { display: none; flex-shrink: 0; }
.search-results-heading { gap: 12px; }
.search-control { min-height: 44px; padding: 8px 12px; border: 1px solid #dce4dd; border-radius: 9px; background: #fff; color: #24332e; font-size: 14px; font-weight: 600; }
.search-control:focus-visible, .search-location:focus-visible { outline: 2px solid #285c50; outline-offset: 2px; }
.search-active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.search-active-filters:not(:empty) { padding-block: 8px; }
.search-active-filters button { min-height: 44px; padding: 6px 10px; border-radius: 20px; background: #edf6f1; color: #285c50; font-size: 14px; }
.search-order-label { color: #52615b; font-size: 13px; margin-bottom: 12px; }
.search-map-dialog { inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; background: white; color: #24332e; }
.search-map-dialog[open] { display: flex; flex-direction: column; }
.search-map-dialog::backdrop { background: #0008; }
.search-map-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; }
.search-map-header h2 { font-size: 16px; font-weight: 700; }
#mobile-map-status { padding: 0 16px 8px; font-size: 13px; }
#mobile-map-container { flex: 1; min-height: 180px; }
#mobile-map-preview { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
#mobile-map-preview a { display: block; color: #24332e; }
#mobile-map-preview h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
#mobile-map-preview p { margin-block: 4px; }
@media (max-width: 767px) {
    .discovery-page #site-navbar { position: relative; z-index: 45; box-shadow: none; }
    .discovery-page .platform-nav-row { min-height: 56px; padding-block: 4px; flex-wrap: wrap; gap: 4px; }
    .discovery-page .platform-nav-logo { width: auto; margin-right: auto; padding: 0; }
    .discovery-page .platform-nav-logo img { height: 44px; }
    .discovery-page .discovery-menu { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; }
    .discovery-page .platform-nav-main { display: contents; }
    .discovery-page .platform-nav-links, .discovery-page .platform-nav-guest-auth { display: none; order: 5; flex-basis: 100%; padding: 8px 0; }
    .discovery-page [data-navigation-open="true"] .platform-nav-links,
    .discovery-page [data-navigation-open="true"] .platform-nav-guest-auth { display: flex; }
    .discovery-page [data-testid="user-menu-button"] { width: 44px; height: 44px; }
    .search-page .search-desktop-hero { display: none; }
    .search-mobile-intro { display: block; padding: 12px 16px 0; background: white; }
    #mobile-search-form { display: flex; border: 1px solid #dce4dd; border-radius: 10px; overflow: hidden; }
    #mobile-search-query { flex: 1; width: 0; min-width: 0; border: 0; padding: 10px 12px; font-size: 16px; }
    #mobile-search-form button { border: 0; }
    .search-location { min-width: 0; flex: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: #285c50; }
    .search-controls-page #filters-section { top: 0 !important; padding-block: 8px; z-index: 40; box-shadow: 0 1px 3px #0001; }
    .search-mobile-actions { display: flex; gap: 8px; }
    .search-controls-page #mobile-filters-toggle { width: auto; padding: 8px 12px; box-shadow: none; transform: none; }
    .search-controls-page #mobile-filters { position: static; padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)); overflow-y: auto; background: white; z-index: 100; box-shadow: 0 -8px 40px #0004; border-radius: 18px 18px 0 0; animation: none; }
    .search-controls-page #mobile-filters .search-filter-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .search-filter-panel-header h2 { font-size: 20px; font-weight: 700; }
    .search-controls-page #mobile-filters select { font-size: 16px; min-height: 44px; }

    .search-page .search-map-column { display: none; }
    .search-page .search-results-layout { padding-top: 12px; }
    .search-page .search-results-heading { margin-bottom: 4px; }
    .search-results-heading h2 { font-size: 17px; }
    .search-results-heading p { font-size: 14px; }
    .program-page > main > section:first-child > div.relative { padding-block: 20px; }
    .program-page #program-local-digest-subscribe { margin: 16px; padding: 16px; }
    .search-controls-page #location-correction-modal { z-index: 110; overflow-y: auto; align-items: flex-start; padding-block: 16px; }
}
/* The map becomes a dedicated view on tablets too. */
@media (max-width: 1023px) {
    .search-map-toggle { display: block; }
    .search-page .search-map-column { display: none; }
}

.search-filter-dialog { width: 100%; max-width: none; max-height: 90dvh; margin: auto 0 0; padding: 0; border: 0; border-radius: 18px 18px 0 0; background: white; }
.search-filter-dialog::backdrop { background: #0006; }
body:has(.search-filter-dialog[open], .search-map-dialog[open]) { overflow: hidden; }
#events-list { scroll-margin-top: calc(var(--search-filters-height, 60px) + 12px); }
.program-show-all { display: none; }
@media (max-width: 1023px) {
    .program-show-all { display: inline-flex; align-items: center; min-height: 44px; color: #285c50; font-size: 14px; font-weight: 600; }
    .program-day-expanded [data-carousel-track], .program-day-expanded [data-program-mobile-track] { overflow: visible; padding-right: 0; }
    .program-day-expanded [data-carousel-track] > div, .program-day-expanded [data-program-mobile-track] > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .program-day-expanded article { max-width: none; }
    .program-day-expanded [data-program-hint], .program-day-expanded [data-program-fade] { display: none !important; }
}
@media (max-width: 767px) {
    #program-local-digest-subscribe[data-active="true"] .program-digest-copy { display: none; }
}
@media (max-width: 359px) {
    .program-day-expanded [data-carousel-track] > div, .program-day-expanded [data-program-mobile-track] > div { grid-template-columns: minmax(0, 1fr); }
}
#search-update-status:not(.sr-only) { margin: 12px 16px; padding: 12px; background: #fff4dc; color: #654310; border-radius: 8px; }

@media (max-width: 767px) {
    .search-results-heading p { display: none; }
    .search-page .search-order-label { margin-bottom: 8px; }
    .search-mobile-actions #mobile-date-toggle { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 767px) {
    .search-controls-page #mobile-filters > div.search-filter-panel-header { position: sticky; top: 0; background: white; z-index: 2; }
    .search-controls-page #mobile-filters > p.search-filter-panel-header { position: sticky; top: 56px; background: white; z-index: 2; }
}

@media (max-width: 767px) {
    .home-search-page .hero-buttons { display: none; }
    .home-search-page #filters-section { top: var(--site-navbar-height, 5rem) !important; }
}
