.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; }
.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; }
@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(36px + env(safe-area-inset-bottom)); }
  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 { top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left)); width: calc(100% - 178px); min-height: 44px; }
  .map-results { top: calc(70px + env(safe-area-inset-top)); left: 12px; }
  .map-event-card { left: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); 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 { top: auto; right: auto; left: 50%; bottom: calc(36px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
  .map-welcome { top: 29%; max-height: 50dvh; overflow-y: auto; }
  .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 - 155px); bottom: calc(64px + env(safe-area-inset-bottom)); }
  .contribute-cta { right: auto; left: 50%; transform: translateX(-50%); }
  .map-welcome { left: 12px; top: 145px; transform: none; width: 45%; max-height: calc(100dvh - 205px); padding: 12px; }
  .map-welcome h2 { font-size: 22px; }
  .connection-status { left: 12px; right: auto; width: 44%; }
}
