.pwa-actions { position: fixed; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 720; display: flex; gap: 6px; max-width: calc(100% - 160px); flex-wrap: wrap; }
.pwa-actions button { background: #faf9f6; border: 1px solid #287f79; border-radius: 20px; color: #184e49; padding: 10px 14px; min-height: 44px; }
.connection-status { position: fixed; z-index: 715; top: 154px; right: 12px; width: min(410px, calc(100% - 24px)); padding: 10px 14px; background: #fff4d6; color: #433719; border: 1px solid #c4a864; border-radius: 12px; font-size: 13px; line-height: 1.4; margin: 0; }
.map-event-card { position: fixed; left: 370px; width: min(540px, calc(100% - 390px)); z-index: 710; max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain; }
.preview-header { position: sticky; top: -19px; z-index: 1; display: flex; justify-content: flex-end; background: var(--surface); padding: 5px 0; }
#close-event-preview { min-height: 44px; min-width: 88px; }
.preview-summary:focus-visible { outline: 2px solid #287f79; outline-offset: -2px; }
.locate-map { position: absolute; z-index: 701; right: 20px; top: 24px; width: 48px; height: 48px; padding: 11px; background: var(--surface); box-shadow: 0 3px 12px #0002; }
.locate-map svg { width: 24px; height: 24px; }
.locate-map:focus-visible { outline: 3px solid #5926a6; outline-offset: 3px; }
/* Venues on the map (venues are first class, owner decisions 2026-10-13): a button under Locate, and a small square pin. */
.venue-pins-toggle { position: absolute; z-index: 701; right: 20px; top: 84px; width: 48px; height: 48px; padding: 11px; background: var(--surface); box-shadow: 0 3px 12px #0002; }
.venue-pins-toggle svg { width: 24px; height: 24px; }
.venue-pins-toggle[aria-pressed="true"] { background: var(--ink, #1b1b1f); color: var(--surface, #fff); }
.venue-pins-toggle:focus-visible { outline: 3px solid #5926a6; outline-offset: 3px; }
.venue-marker { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #1b1b1f); border: 2px solid currentColor; box-shadow: 0 2px 8px #0003; }
.venue-marker svg { width: 16px; height: 16px; }
.venue-marker.is-verified { background: var(--ink, #1b1b1f); color: var(--surface, #fff); border-color: var(--surface, #fff); }
.venue-popup { display: grid; gap: 4px; min-width: 180px; }
.venue-popup a { font-weight: 700; font-size: 15px; }
.map-location-status { position: absolute; z-index: 700; top: 84px; right: 80px; width: min(320px, calc(100% - 104px)); padding: 10px; border-radius: 12px; background: var(--surface); font-size: 13px; box-shadow: 0 3px 12px #0002; }
.buzz-button, .contribute-cta.buzz-button { background: #5926a6; color: #ffffff; border: 2px solid #ffffff; box-shadow: 0 3px 14px #25104466; }
.buzz-button:hover { background: #441b82; color: #ffffff; }
.buzz-button:focus-visible { outline: 3px solid #5926a6; outline-offset: 3px; }
.buzz-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; font-weight: 750; }
.buzz-button svg { width: 23px; height: 23px; }
.contribute-cta.buzz-button { min-height: 72px; padding: 8px 24px; gap: 20px; font-size: 26px; line-height: 1.2; }
.contribute-cta.buzz-button svg { width: 32px; height: 32px; }
.contribute-cta { top: auto; right: auto; left: 50%; bottom: calc(48px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
body.map-mode .pwa-actions { bottom: calc(36px + env(safe-area-inset-bottom)); }
body.account-open .pwa-actions, body.drawer-open .pwa-actions,
body.account-open .connection-status, body.drawer-open .connection-status { display: none; }
body.account-open .map-event-card, body.drawer-open .map-event-card,
body.account-open .contribute-cta, body.drawer-open .contribute-cta,
body.account-open .locate-map, body.drawer-open .locate-map,
body.account-open .venue-pins-toggle, body.drawer-open .venue-pins-toggle,
body.account-open .map-location-status, body.drawer-open .map-location-status { visibility: hidden; }
@media (max-width: 760px), (max-width: 940px) and (max-height: 500px) {
  .app-shell { display: block; height: auto; }
  .discovery-panel { min-height: 100dvh; border: 0; }
  .map-pane { display: none; }
  body.map-mode .discovery-panel { display: none; }
  body.map-mode .map-pane { display: block; }
  .mode-switch { display: flex; right: max(12px, env(safe-area-inset-right)); bottom: calc(var(--tab-bar, 0px) + 12px); }
  html, body { max-width: 100%; overflow-x: clip; }
  .map-pane { height: 100dvh; min-height: 100dvh; }
  .discovery-panel { padding-top: max(20px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  button, .chip, .source-link, .map-tool, .mode-button { min-height: 44px; }
  input, select, textarea { font-size: 16px !important; }
  .map-search { min-height: 44px; }
  .map-event-card { left: 12px; bottom: calc(var(--tab-bar, 0px) + 8px); width: calc(100% - 24px); border-radius: 22px 22px 14px 14px; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; padding: 15px 15px 18px; }
  .map-event-card h2 { font-size: 22px; }
  .preview-header { top: -15px; }
  .preview-summary { min-height: 0; }
  .preview-action { margin-top: 8px; }
  .preview-action .source-link { flex: 1 1 calc(50% - 8px); padding: 8px; text-align: center; justify-content: center; }
  .preview-action .chip { flex: 1 1 calc(50% - 8px); }
  .flyer-dialog { padding: 20px; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; }
  .flyer-dialog input[type=file] { max-width: 100%; }
  .flyer-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .contribute-cta.buzz-button { top: auto; right: auto; left: max(12px, env(safe-area-inset-left)); bottom: calc(36px + env(safe-area-inset-bottom)); transform: none; min-height: 54px; max-width: calc(100% - 158px); padding: 8px 14px; gap: 8px; font-size: 20px; }
  .contribute-cta.buzz-button svg { width: 24px; height: 24px; }
  .locate-map { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
  .venue-pins-toggle { top: calc(max(12px, env(safe-area-inset-top)) + 58px); right: max(12px, env(safe-area-inset-right)); }
  .map-location-status { top: calc(68px + env(safe-area-inset-top)); right: 70px; width: min(320px, calc(100% - 94px)); }
  /* The tab bar (tab-bar.css) has Buzz It on phones; the notice sits beside List | Map, above the bar. */
  .contribute-cta.buzz-button { display: none; }
  .pwa-actions, body.map-mode .pwa-actions { left: max(12px, env(safe-area-inset-left)); right: auto; bottom: calc(var(--tab-bar, 0px) + 12px); }
  /* On the map the credit line sits on the bar, so these sit above it. */
  body.map-mode .mode-switch, body.map-mode .pwa-actions { bottom: calc(var(--tab-bar, 0px) + 36px); }
  body.map-mode .map-event-card { bottom: calc(var(--tab-bar, 0px) + 32px); }
  /* The map stays uncluttered (owner decision 2026-10-04): installing is offered in the list view. */
  body.map-mode #install-app { display: none; }
  .connection-status { top: calc(155px + env(safe-area-inset-top)); font-size: 12px; }
  .pwa-actions { max-width: calc(100% - 150px); }
}
@media (max-width: 380px) {
  .map-event-card { max-height: 58dvh; }
  .map-event-card h2 { font-size: 20px; }
}
@media (max-width: 940px) and (max-height: 500px) and (orientation: landscape) {
  .map-event-card { left: auto; right: max(12px, env(safe-area-inset-right)); width: 48%; max-height: calc(100dvh - 220px); bottom: calc(var(--tab-bar, 0px) + 8px); }
  .connection-status { left: 12px; right: auto; width: 44%; }
}
