/* site.css owns the palette, fonts, hero, cards and filter components.
   These rules adapt those shared components to the explorer layout. */
.explorer-page {
  --theater-color: #7044a8;
  --jazz-color: #1469a2;
  --gallery-color: #a34c04;
  line-height: 1.5;
}
[hidden] { display: none !important; }
.explorer { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: min-content 1fr; gap: 16px; align-items: start; }
.explorer > .filter-container { grid-row: 1 / 3; }
#itinerary-panel { grid-column: 2; }
.explorer > .filter-container { padding: 14px; margin-bottom: 0; }
.explorer > .content-panel { padding: 18px; }
.explorer details > summary { cursor: pointer; font-weight: 600; }
.explorer details[open] > .filter-toggle-btn .arrow { transform: rotate(0deg); }
.explorer .filter-group { padding: 12px; gap: 12px; min-width: 0; }
.explorer .filter-group > .filter-group-label { font-size: .75rem; letter-spacing: .09em; }
.explorer .filter-group .neighborhood-option { padding: 7px 5px; font-size: .88rem; }
.explorer .neighborhood-select-trigger { width: 100%; font-size: .88rem; }
.explorer .neighborhood-select-dropdown { z-index: 1100; }
.explorer .neighborhood-select-dropdown.open { max-height: 250px; }
.explorer .filter-fieldset { display: flex; flex-direction: column; gap: 12px; }
.explorer .filter-fieldset > .neighborhood-option { margin: 0; }
.explorer .filter-fieldset > .cal-preset { align-self: flex-start; }
.explorer .filter-fieldset > .hint { margin: 0; }
.explorer .filter-actions { margin-top: 0; }
.explorer input, .explorer select, .explorer textarea { font: inherit; }
.explorer .map-button, .event select,
.time-fields input, #mode, #copy-text {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
}
.explorer .map-button { min-height: 40px; cursor: pointer; }
.explorer .map-button:hover { background: var(--accent-soft); border-color: var(--accent); }
.explorer .map-button[aria-pressed=true] { background: var(--accent); color: var(--card); }
button:disabled { opacity: .5; cursor: default; }
.explorer label { display: block; margin: .35rem 0; }
.explorer label.neighborhood-option { display: flex; }
.explorer .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.explorer input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.hint, #tile-status { color: var(--muted); font-size: .82rem; }
.hint { margin: .3rem 0; }
.legend, .stop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.legend { margin: 12px 0; }
.time-slider { display: grid; grid-template-rows: 32px; position: relative; }
.time-slider input {
  grid-area: 1/1; pointer-events: none; width: 100%; height: 32px;
  background: transparent; appearance: none; margin: 0;
}
.time-slider::before { content: ''; position: absolute; background: var(--accent); height: 4px; top: 14px; left: 2px; right: 2px; }
.time-slider input::-webkit-slider-thumb {
  appearance: none; pointer-events: auto; background: var(--card);
  border: 2px solid var(--accent); border-radius: 50%; width: 23px; height: 23px;
}
.time-slider input::-moz-range-thumb {
  pointer-events: auto; background: var(--card);
  border: 2px solid var(--accent); border-radius: 50%; width: 20px; height: 20px;
}
.time-fields { display: flex; gap: 8px; }
.time-fields label { min-width: 0; font-size: .75rem; color: var(--muted); }
.time-fields input { width: 100%; padding: 8px; margin-top: 4px; }
#time-label { margin: 0; font-weight: 600; }
.explorer .cal-presets { margin-bottom: 0; gap: 8px; }
.filter-custom { font-size: .85rem; margin: 0; }
.filter-custom > summary { color: var(--accent); margin-bottom: 8px; }
.explorer .cal-day { min-height: 32px; }
.category { font-weight: 600; font-size: .78rem; display: inline-flex; border-radius: 999px; padding: 4px 9px; background: var(--card); }
.theater { color: var(--theater-color); border: 1px solid var(--theater-color); }
.jazz { color: var(--jazz-color); border: 1px solid var(--jazz-color); }
.gallery { color: var(--gallery-color); border: 1px solid var(--gallery-color); }
#map { height: 62vh; min-height: 340px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
#results { margin-top: 16px; }
.event { padding: 18px; margin-bottom: 14px; overflow-wrap: anywhere; }
.event h3 { font-size: 1.25rem; margin: 6px 0; }
.event p:not(.description):not(.schedule-label) { margin: 6px 0; }
.event .production-head h3 { font-size: 1.6rem; line-height: 1.15; }
.event .production-head .category { margin-bottom: 6px; }
.event select { width: 100%; }
.event label { font-size: .85rem; color: var(--muted); }
.planned-time-slider { display: block; width: 100%; min-height: 32px; margin: 4px 0; accent-color: var(--accent); }
.planned-time-value { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; margin-top: 4px; }
.event .occurrences { display: grid; gap: 8px; }
.event .visit-schedule { grid-template-columns: minmax(0, 1fr); }
.event .attendance-choice { display: block; padding: 0; border: 0; background: transparent; }
.event .schedule-datetime { font-size: 1.02rem; }
.selection-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.saved-status { color: var(--olive); font-weight: 700; }
.explorer .primary-action { background: var(--accent); color: white; border-color: var(--accent); text-decoration: none; }
.explorer .primary-action:hover { background: var(--ink); color: white; }
.explorer .quiet-action { background: transparent; border-color: transparent; padding: 5px 8px; color: var(--ink-soft); }
.event .schedule-links { justify-content: flex-start; gap: 12px 24px; font-size: .83rem; }
.event-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: .85rem; margin-top: 16px; }
.event-sources a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; }
.event .visit-schedule > label { margin: 14px 0; }
.more-times, .alternate-visit { margin: 12px 0; font-size: .88rem; }
.more-times .schedule-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.alternate-visit > .visit-schedule { padding-top: 10px; }
.discovery-marker { width: max-content; height: 30px; }
.pin { display: flex; align-items: center; width: max-content; max-width: 240px; background: white; color: #292521; border: 1px solid #777; border-radius: 18px; height: 30px; padding: 3px 9px 3px 6px; white-space: nowrap; box-shadow: 0 1px 4px #0002; }
.pin .category { padding: 0 3px; border: 0; background: transparent; flex-shrink: 0; }
.pin-name { overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; margin-left: 3px; }
.location-cluster { display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); border: 1px solid #777; box-shadow: 0 1px 4px #0002; font-weight: 600; }
.stop-pin { background: var(--accent); color: var(--card); border: 2px solid var(--card); min-width: 30px; border-radius: 16px; padding: 3px; text-align: center; font-weight: 700; white-space: nowrap; }
#selection-panel { margin-top: 16px; padding: 20px; scroll-margin: 16px; }
#close-selection { float: right; margin: 0 0 10px 16px; }
#selection-content { clear: both; }
.back-to-venues { margin: 12px 0; }
.event-art { display: block; width: auto; max-width: 100%; height: auto; max-height: 320px; object-fit: contain; border-radius: 10px; margin: 0 0 14px; }
.selected-visit { padding: 12px 0; border-top: 1px solid var(--line); }
.selected-visit h4 { font-size: 1.1rem; margin: 0 0 10px; }
.location-popup > h3, .cluster-popup > h3 { margin: 0 20px 4px 0; font-size: 1.1rem; }
.location-popup > .event { margin-top: 16px; }
.venue-choice { display: flex; align-items: baseline; gap: 10px; text-align: left; width: 100%; padding: 12px 0; background: transparent; color: var(--ink); border: 0; border-top: 1px solid var(--line); cursor: pointer; font: inherit; }
.venue-heading { display: flex; align-items: baseline; gap: 10px; }
.venue-choice .category, .venue-heading .category { flex-shrink: 0; }
.venue-choice:hover { color: var(--accent); }
.popup-choices .event { box-shadow: none; }
.leaflet-container { font-family: inherit; font-size: 14px; line-height: 1.5; }
.leaflet-container a { color: var(--accent); }
.leaflet-control-attribution:has(.map-credits) { background: transparent; padding: 5px; }
.map-credits { display: flex; padding: 4px 8px; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 1px 4px #0002; max-width: min(420px,calc(100vw - 60px)); }
.map-credits > summary { display: inline-block; float: right; margin-left: 6px; font-size: 18px; line-height: 24px; cursor: pointer; }
.map-credits > summary::-webkit-details-marker { display: none; }
.map-credits > span { font-size: 11px; line-height: 24px; }
.map-credits:not([open]) > summary { margin-left: 0; }
#stops { padding-left: 24px; }
#stops li { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#stops h3 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif; font-size: 1.15rem; margin: 5px 0; }
#stops p { font-size: .85rem; margin: 5px 0; }
#stops .stop-when { font-size: 1rem; font-weight: 700; color: var(--accent); }
.stop-details { font-size: .8rem; margin: 8px 0; color: var(--ink-soft); }
.itinerary-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#itinerary-empty { color: var(--ink-soft); margin: 12px 0 0; }
.stop-actions { gap: 5px; margin-top: 8px; }
.stop-actions .map-button { font-size: .78rem; padding: 6px 8px; }
.warning, #route-error { color: var(--accent); }
#directions a { display: block; margin: 8px 0; }
#notice:not(:empty) { padding: 12px 18px; margin-top: 16px; border-radius: 12px; background: var(--accent-soft); }
#date-notice { position: fixed; z-index: 2000; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; width: max-content; max-width: min(560px,calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: #59443b; color: #fffaf4; box-shadow: 0 6px 24px #0003; font-size: .95rem; line-height: 1.5; }
#date-notice button { flex-shrink: 0; min-width: 44px; min-height: 44px; border: 1px solid #fff6; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 1.4rem; cursor: pointer; }
#copy-text { width: 100%; resize: vertical; }
#itinerary-panel { position: relative; font-size: .9rem; }
#itinerary-panel > summary { font-size: 1.1rem; min-height: 44px; line-height: 44px; padding-right: 160px; }
.explorer #clear { position: absolute; top: 18px; right: 18px; min-height: 44px; background: #59443b; border-color: #59443b; color: #fffaf4; }
.explorer #clear:hover { background: var(--ink); border-color: var(--ink); }
#itinerary-panel > button { margin: 4px 0; }
#count { margin: 0 0 12px; padding: 14px 18px; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; line-height: 1.4; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
#tile-status:empty { display: none; }
#share { margin: 4px; }
#timestamps { font-size: .78rem; }
.explorer-footer { margin-top: 32px; font-size: .85rem; color: var(--ink-soft); }
.view-map #results .event.resolved { display: none; }
@media (max-width: 720px) {
  .explorer-page .hero { padding: 18px; border-radius: 20px; }
  .explorer-page .hero h1 { font-size: 2rem; margin: 5px 0 10px; }
  .explorer-page .hero .eyebrow { font-size: .65rem; margin-bottom: 6px; }
  .explorer-page .hero .subtitle { font-size: .85rem; margin-bottom: 12px; }
  .explorer-page .jump-nav { gap: 6px; }
  .explorer-page .jump-nav a { padding: 8px 10px; font-size: .82rem; }
  .event .production-head { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 12px; }
  .event .card-art { width: 72px; height: 72px; aspect-ratio: 1; }
  .event .production-head:not(:has(.card-art)) { grid-template-columns: minmax(0,1fr); }
  .event .production-head h3 { font-size: 1.15rem; }
  .explorer { display: flex; flex-direction: column; }
  .explorer > * { width: 100%; }
  .explorer > .filter-container { padding: 16px; }
  #map { height: 52vh; }
}
@media (prefers-reduced-motion: reduce) {
  .explorer *, .leaflet-container * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* Keep the developing plan within reach without changing discovery state. */
html { scroll-padding-bottom: 110px; }
.has-plan { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
#plan-bar { position: fixed; z-index: 1900; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -3px 16px #0001; }
#plan-bar button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--accent-soft); color: var(--ink); font: inherit; cursor: pointer; }
#plan-bar-summary { font-size: .9rem; }
.has-plan #date-notice { bottom: calc(84px + env(safe-area-inset-bottom)); }
.plan-actions, .time-adjustments { display: flex; flex-wrap: wrap; gap: 8px; }
.explorer .stop-actions .map-button, .time-adjustments .map-button { min-width: 44px; min-height: 44px; }
.planned-time-editor { width: 100%; margin: 12px 0; }
.time-confirmation { display: block; font-size: .82rem; min-height: 1.5em; color: var(--accent); }
.edit-planned-time > summary { min-height: 44px; padding: 10px 0; }
.time-checks { margin: 8px 0; }
#map, #itinerary-heading, #route-controls { scroll-margin-top: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 720px) {
  .event .production-head-main { display: contents; }
  .event .production-head-main > * { grid-column: 2; }
  .event .production-head-main > .occurrences,
  .event .production-head-main > .more-times,
  .event .production-head-main > .alternate-visit { grid-column: 1 / -1; }
  .event .production-head:not(:has(.card-art)) .production-head-main > * { grid-column: 1 / -1; }
  .event .card-art { grid-row: 1 / 3; }
  #plan-bar { gap: 6px; }
  #plan-bar-summary { flex: 1; font-size: .78rem; }
  #plan-bar button { font-size: .85rem; padding: 8px; }
}
