:root {
  --ink: #1a0a10;
  --muted: #6b5a54;
  --line: rgba(26, 10, 16, 0.12);
  --panel: rgba(255, 255, 255, 0.80);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --live-green: #007A58;
  --live-green-dark: #00554B;
  --live-green-soft: #DFF6EA;
  --accent: #00554B;
  --accent-2: #BC8E4C;
  --accent-3: #7D0037;
  --beige: #FFEBE1;
  --shadow: 0 20px 50px rgba(26, 10, 16, 0.10);
  --radius: 18px;
  --hero-bottom: 164px; /* top(14) + hero height(136) + gap(14) */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #FFEBE1;
}

.app-shell {
  width: 100%;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero {
  position: absolute;
  z-index: 800;
  top: 14px;
  left: 14px;
  right: auto;
  width: min(420px, calc(100% - 28px));
  margin: 0;
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 238, 0.88));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.08;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hero-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.hero-search-btn {
  display: none;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.hero-live-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(0, 122, 88, 0.38);
  border-radius: 999px;
  background: rgba(223, 246, 234, 0.98);
  color: #00554B;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0, 85, 75, 0.12);
}

.hero-live-link:hover,
.hero-live-link:focus-visible {
  outline: none;
  border-color: rgba(0, 122, 88, 0.62);
  background: rgba(245, 255, 248, 0.98);
  box-shadow: 0 8px 18px rgba(0, 85, 75, 0.18);
}

.hero-live-link.is-active {
  border-color: rgba(0, 122, 88, 0.82);
  background: rgba(0, 122, 88, 0.12);
  color: #003D34;
  box-shadow: 0 0 0 3px rgba(0, 122, 88, 0.18), 0 6px 14px rgba(0, 85, 75, 0.14);
}

.hero-live-link.is-active .hero-live-dot {
  background: #ff2d55;
  box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.22);
}

.hero-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #007A58;
  box-shadow: 0 0 0 4px rgba(0, 122, 88, 0.14);
  animation: liveDotBeat 1.45s ease-in-out infinite;
}


.layout {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  margin-top: 0;
}

.controls-panel,
.map-panel,
.list-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}


.panel-section + .panel-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.panel-section h2 {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.helper-text {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.ghost-btn,
.quick-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.ghost-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.quick-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
}

.quick-btn:hover,
.ghost-btn:hover {
  border-color: rgba(0, 85, 75, 0.35);
  background: rgba(255, 255, 255, 0.94);
}

.toggle-stack {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  padding: 8px 10px;
  color: #38424c;
  font-size: 13px;
}

.toggle-row input {
  accent-color: var(--accent);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.timeline-strip {
  margin-top: 10px;
  height: 68px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 244, 238, 0.92)),
    repeating-linear-gradient(
      90deg,
      rgba(19, 26, 34, 0.04) 0,
      rgba(19, 26, 34, 0.04) 1px,
      transparent 1px,
      transparent 14px
    );
  overflow: hidden;
  position: relative;
  cursor: ew-resize;
}

.timeline-strip:focus-visible {
  outline: 2px solid rgba(0, 85, 75, 0.5);
  outline-offset: 2px;
}

.timeline-bubble {
  position: absolute;
  bottom: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.76;
}

.timeline-marker {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), var(--accent), transparent);
  box-shadow: 0 0 0 1px rgba(0, 85, 75, 0.08);
}

.timeline-window {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(0, 85, 75, 0.22);
  border-right: 1px solid rgba(0, 85, 75, 0.22);
  background: rgba(0, 85, 75, 0.08);
}

.range-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.chip-grid {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}

.chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dot, var(--muted));
}

.chip.is-region::before {
  background: transparent;
  border: 1px solid rgba(19, 26, 34, 0.2);
}

.chip.is-off {
  opacity: 0.45;
}

.map-and-list {
  position: relative;
  min-height: 100vh;
  height: 100vh;
}

.map-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  border: 0;
  position: relative;
  contain: layout paint;
}

.map-style-float {
  position: absolute;
  top: var(--hero-bottom);
  left: 14px;
  z-index: 640;
}

.map-style-float-select {
  width: 170px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(8, 20, 28, 0.14);
}

.map-zoom-float {
  position: absolute;
  top: var(--hero-bottom);
  right: 14px;
  z-index: 640;
  display: grid;
  gap: 6px;
}

.map-zoom-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(19, 26, 34, 0.14);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(8, 20, 28, 0.14);
  color: #14242e;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
}

.map-zoom-btn:hover,
.map-zoom-btn:focus-visible {
  outline: none;
  border-color: rgba(0, 85, 75, 0.32);
  background: rgba(255, 255, 255, 0.98);
}

.map-theme-btn {
  font-size: 18px;
}

.visible-events-toolbox {
  position: absolute;
  top: 192px;
  left: 14px;
  z-index: 640;
  width: 350px;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 206px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(19, 26, 34, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 34px rgba(8, 20, 28, 0.12);
  overflow: hidden;
}

.visible-events-toolbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(19, 26, 34, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.visible-events-toolbox-head h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
}

.visible-events-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(19, 26, 34, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.visible-events-listbox {
  overflow: auto;
  padding: 8px;
}

.visible-events-empty {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(19, 26, 34, 0.12);
}

.visible-events-category + .visible-events-category {
  margin-top: 10px;
}

.visible-events-category-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 700;
  color: #2b3a45;
}

.visible-events-category-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.visible-events-category-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
}

.visible-events-items {
  display: grid;
  gap: 6px;
}

.visible-event-item {
  width: 100%;
  border: 1px solid rgba(19, 26, 34, 0.1);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 8px 9px;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.visible-event-item:hover,
.visible-event-item:focus-visible {
  border-color: rgba(0, 85, 75, 0.28);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.visible-event-item.is-active {
  border-color: rgba(0, 85, 75, 0.38);
  box-shadow: inset 0 0 0 1px rgba(0, 85, 75, 0.18);
  background: rgba(232, 248, 243, 0.95);
}

.visible-event-item-title {
  font-size: 12px;
  font-weight: 600;
  color: #14242e;
  line-height: 1.25;
  margin: 0 0 3px;
}

.visible-event-item-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
}

.map-toolbar {
  position: absolute;
  z-index: 650;
  left: 378px;
  right: 418px;
  top: 146px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 245, 238, 0.88);
  backdrop-filter: blur(12px);
}

.quick-range-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.quick-range-switch[hidden] {
  display: none !important;
}

.hero-range {
  margin-top: 12px;
  width: 100%;
}

.hero-categories {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.scope-mode-switch {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.scope-mode-btn {
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.scope-mode-btn:hover,
.scope-mode-btn:focus-visible {
  outline: none;
  border-color: rgba(0, 85, 75, 0.28);
  color: var(--ink);
}

.scope-mode-btn.is-active {
  color: var(--ink);
  background: rgba(232, 248, 243, 0.95);
  border-color: rgba(0, 85, 75, 0.35);
  box-shadow: inset 0 0 0 1px rgba(0, 85, 75, 0.12);
}

.quick-range-btn {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.quick-range-btn:hover,
.quick-range-btn:focus-visible {
  outline: none;
  border-color: rgba(0, 85, 75, 0.28);
  color: var(--ink);
}

.quick-range-btn.is-active {
  color: var(--ink);
  background: rgba(232, 248, 243, 0.95);
  border-color: rgba(0, 85, 75, 0.35);
  box-shadow: inset 0 0 0 1px rgba(0, 85, 75, 0.12);
}

.list-panel .map-toolbar {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: none;
}

.scope-note {
  margin: 6px 12px 2px;
  font-size: 11px;
  color: var(--muted);
}

.time-range-top {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.time-range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.time-range-head strong {
  color: var(--ink);
  font-size: 12px;
}

#timeRangePresetLabel {
  color: var(--accent);
  font-weight: 700;
}

.time-range-top input[type="range"] {
  margin: 0;
}

.time-range-labels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
}

.time-range-labels span {
  text-align: center;
}

.category-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-all-wrap {
  display: flex;
  justify-content: flex-end;
}

.toggle-all-chip {
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  padding: 5px 11px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
  transition: background 100ms ease, color 100ms ease;
}

.toggle-all-chip:hover {
  background: var(--accent);
  color: #fff;
}

.right-chip-grid {
  width: 100%;
  margin-top: 0;
  max-height: 120px;
  overflow: auto;
  padding-right: 2px;
}

.legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
}

.legend-item::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--legend-dot);
}

.toolbar-right {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: stretch;
  width: 100%;
}

.search-wrap input,
.sort-select {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  color: var(--ink);
  min-height: 36px;
}

.search-wrap input {
  width: 100%;
  padding: 7px 10px;
}

.sort-select {
  padding: 7px 10px;
  width: calc(50% - 3px);
  min-width: 0;
}

.search-wrap {
  width: 100%;
}

.search-wrap input:focus,
.sort-select:focus {
  outline: 2px solid rgba(0, 85, 75, 0.25);
  border-color: rgba(0, 85, 75, 0.35);
}

#map {
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
}

.maplibregl-map {
  background:
    radial-gradient(circle at 30% 15%, rgba(255, 255, 255, 0.35), transparent 25%),
    linear-gradient(180deg, #dce8e5 0%, #c5d9d4 100%);
  font-family: "DM Sans", sans-serif;
}

.maplibregl-popup-content {
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(8, 20, 28, 0.18);
}

.maplibregl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.94);
}

.maplibregl-popup-close-button {
  font-size: 16px;
  color: #516675;
  padding: 4px 8px;
}

.event-map-label {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.event-map-label span {
  display: inline-block;
  max-width: 180px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #121820;
  border: 1px solid rgba(18, 24, 32, 0.18);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-dot-symbol-wrap {
  background: transparent;
  border: 0;
  --symbol-scale: 1;
  width: 180px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.event-dot-symbol-wrap.is-urgent .event-dot-symbol {
  animation: urgentPulse 1s ease-in-out infinite;
}

.event-dot-title {
  display: none;
  max-width: 148px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #121820;
  border: 1px solid rgba(18, 24, 32, 0.16);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-dot-symbol-wrap.show-title .event-dot-title {
  display: inline-block;
}

.venue-bubble-wrap {
  background: transparent;
  border: 0;
}

.venue-bubble-shell {
  position: relative;
  width: 250px;
  min-height: 28px;
  pointer-events: auto;
}

.venue-bubble-shell.single-mini {
  width: 220px;
}

.venue-bubble-anchor {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  color: #07141c;
  background: color-mix(in srgb, var(--vb-color, #00554B) 88%, white 12%);
  border: 2px solid rgba(7, 20, 28, 0.9);
  box-shadow: 0 4px 12px rgba(8, 20, 28, 0.22);
  z-index: 3;
}

.venue-bubble-shell.is-left .venue-bubble-anchor {
  left: auto;
  right: 0;
}

.venue-bubble-shell.single-mini .venue-bubble-anchor {
  font-size: 13px;
}

.venue-bubble-panel {
  position: absolute;
  left: var(--vb-panel-x, 42px);
  top: var(--vb-shift-y, 0px);
  min-width: 150px;
  max-width: 210px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(14, 22, 30, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 10px 26px rgba(8, 20, 28, 0.18);
  backdrop-filter: blur(8px);
  transform-origin: left center;
  z-index: 2;
}

.venue-bubble-shell.is-left .venue-bubble-panel {
  left: auto;
  right: var(--vb-panel-x, 42px);
  transform-origin: right center;
}

.venue-bubble-shell.single-mini .venue-bubble-panel {
  padding: 5px 8px;
  min-width: 120px;
  max-width: 200px;
}

.single-mini-wrap .venue-bubble-row {
  margin-top: 0;
}

.single-mini-wrap .venue-bubble-row-btn {
  padding: 1px 0;
}

.venue-bubble-shell.is-enter .venue-bubble-panel {
  animation: venueBubbleIn 180ms ease-out;
}

.venue-bubble-shell::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: var(--vb-line-w, 14px);
  height: 2px;
  background: rgba(14, 22, 30, 0.22);
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
  transform-origin: left center;
  transform: translateY(-1px) rotate(var(--vb-line-angle, 0deg));
}

.venue-bubble-shell.is-left::after {
  left: auto;
  right: 14px;
  transform-origin: right center;
}

.venue-bubble-head {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 6px;
  color: #121d24;
}

.venue-bubble-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.2;
  color: #2b3a45;
  margin-top: 3px;
}

.venue-bubble-row-btn {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 2px 0;
  border-radius: 6px;
  cursor: pointer;
}

.venue-bubble-row-btn:hover,
.venue-bubble-row-btn:focus-visible {
  background: rgba(0, 85, 75, 0.08);
  outline: none;
}

.venue-bubble-row-btn.is-urgent {
  animation: urgentRowBlink 1.1s ease-in-out infinite;
  border-left: 2px solid rgba(125, 0, 55, 0.75);
  padding-left: 4px;
}

.venue-bubble-row-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-bubble-row-time {
  font-size: 10px;
  color: #4e6472;
  margin-left: 4px;
}

.venue-bubble-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.venue-bubble-more {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #00554B;
}

@keyframes venueBubbleIn {
  from {
    opacity: 0;
    transform: translateX(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes urgentPulse {
  0%, 100% {
    transform: scale(var(--symbol-scale, 1));
    filter: drop-shadow(0 0 0 rgba(125, 0, 55, 0));
  }
  50% {
    transform: scale(calc(var(--symbol-scale, 1) * 1.18));
    filter: drop-shadow(0 0 6px rgba(125, 0, 55, 0.75));
  }
}

@keyframes urgentRowBlink {
  0%, 100% { background: rgba(125, 0, 55, 0.04); }
  50% { background: rgba(125, 0, 55, 0.16); }
}

.event-cluster-wrap {
  position: relative;
  pointer-events: none;
  cursor: default;
  width: 0;
  height: 0;
}

.event-cluster-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  left: -7px;
  top: -7px;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

.event-cluster-card {
  position: absolute;
  left: var(--card-x, 10px);
  top: var(--card-y, -10px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(18, 24, 32, 0.14);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(8, 20, 28, 0.12);
  padding: 2px 7px 2px 6px;
  min-width: 110px;
  max-width: 190px;
  pointer-events: auto;
  cursor: pointer;
}

.event-cluster-card::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.event-cluster-card.is-card-right {
  border-left: 3px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-right::before {
  left: -8px;
  top: var(--card-hook-y, 50%);
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-left {
  border-right: 3px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-left::before {
  right: -8px;
  top: var(--card-hook-y, 50%);
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-top {
  border-bottom: 3px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-top::before {
  left: var(--card-hook-x, 50%);
  bottom: -8px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-bottom {
  border-top: 3px solid var(--cluster-color, #00554B);
}

.event-cluster-card.is-card-bottom::before {
  left: var(--card-hook-x, 50%);
  top: -8px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--cluster-color, #00554B);
}

.event-cluster-card-header {
  font-family: "DM Sans", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #0d1520;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.native-cluster-label {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  user-select: none;
}

.event-dot-label {
  max-width: 190px;
  padding: 1px 5px;
  border-radius: 3px;
  border: none;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  color: #1a2430;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: none;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}


.event-cluster-preview-line {
  font-family: "DM Sans", sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.15;
  color: #15222b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-cluster-preview-line + .event-cluster-preview-line {
  margin-top: 1px;
}

.event-cluster-preview-dt {
  color: #6b7f8a;
  font-weight: 500;
  margin-right: 2px;
}

.event-cluster-preview-more {
  margin-top: 2px;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #00554B;
}

.event-dot-symbol {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #101820;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  pointer-events: none;
  user-select: none;
  transform: scale(var(--symbol-scale, 1));
  transform-origin: center;
  transition: transform 140ms ease, opacity 140ms ease;
}

.maplibregl-map.map-style-dark .event-dot-symbol {
  color: #f7fbff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.maplibregl-map.map-style-dark .event-dot-title {
  background: rgba(17, 22, 28, 0.92);
  color: #eef3f7;
  border-color: rgba(255, 255, 255, 0.16);
}

.maplibregl-map.map-style-dark .venue-bubble-panel {
  background: rgba(17, 22, 28, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
}

.maplibregl-map.map-style-dark .venue-bubble-shell::after {
  background: rgba(255, 255, 255, 0.18);
}

.maplibregl-map.map-style-dark .venue-bubble-head {
  color: #eff5fa;
}

.maplibregl-map.map-style-dark .venue-bubble-row {
  color: #cfe0ea;
}

.maplibregl-map.map-style-dark .venue-bubble-row-btn:hover,
.maplibregl-map.map-style-dark .venue-bubble-row-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.maplibregl-map.map-style-dark .venue-bubble-row-btn.is-urgent {
  border-left-color: rgba(255, 138, 104, 0.95);
}

.maplibregl-map.map-style-dark .venue-bubble-row-time {
  color: #9fb8c7;
}

.maplibregl-map.map-style-dark .event-cluster-dot {
  color: #f5fbff;
  border-color: rgba(233, 247, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.maplibregl-map.map-style-dark .event-cluster-preview {
  background: rgba(17, 22, 28, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
}

.maplibregl-map.map-style-dark .event-cluster-preview-line {
  color: #e6f0f5;
}

.maplibregl-map.map-style-dark .event-map-label span {
  background: rgba(17, 22, 28, 0.92);
  color: #eef3f7;
  border-color: rgba(255, 255, 255, 0.18);
}

.popup-card h3 {
  margin: 0 0 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
}

.popup-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.map-hud {
  position: absolute;
  z-index: 500;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}

.hud-pill {
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: white;
  background: rgba(18, 24, 30, 0.72);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.list-panel {
  position: absolute;
  z-index: 700;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(380px, calc(100% - 28px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: rgba(255, 245, 238, 0.92);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  contain: layout paint;
  backdrop-filter: blur(12px);
}

.list-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
}

.list-header h2 {
  margin: 0;
  font-family: "DM Sans", sans-serif;
}

.list-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.event-list {
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  contain: layout paint;
  scrollbar-gutter: stable;
}

.event-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  padding: 11px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  text-align: left;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 156px;
}

.event-card:hover,
.event-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 85, 75, 0.35);
  box-shadow: 0 10px 24px rgba(12, 18, 24, 0.08);
  outline: none;
}

.event-card.active {
  border-color: rgba(0, 85, 75, 0.7);
  box-shadow: 0 0 0 2px rgba(0, 85, 75, 0.12) inset;
}

.event-card.is-urgent {
  box-shadow: 0 0 0 1px rgba(125, 0, 55, 0.35), 0 8px 20px rgba(125, 0, 55, 0.12);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.event-card h3 {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 0.96rem;
  line-height: 1.15;
}

.event-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.event-meta {
  margin-top: 7px;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.event-countdown {
  font-size: 11px;
  font-weight: 700;
  color: #00554B;
}

.event-countdown.is-urgent {
  color: #7D0037;
  animation: urgentRowBlink 1.1s ease-in-out infinite;
}

.event-meta strong {
  color: #27313a;
  font-weight: 600;
}

.event-desc {
  margin: 8px 0 0;
  color: #414b55;
  font-size: 12px;
  line-height: 1.35;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  line-height: 1.35;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .app-shell {
    height: auto;
    overflow: visible;
  }

  .hero {
    position: static;
    width: auto;
    margin: 12px 12px 0;
    right: auto;
    top: auto;
    left: auto;
    border-radius: 16px;
  }

  .layout {
    min-height: auto;
    height: auto;
  }

  .map-and-list {
    min-height: auto;
    height: auto;
  }

  .map-panel {
    min-height: auto;
    height: auto;
    border-radius: 0;
    border: 0;
  }

  .map-style-float {
    top: 10px;
    left: 10px;
  }

  .map-style-float-select {
    width: 140px;
  }

  .map-zoom-float {
    top: 10px;
    right: 10px;
  }

  .map-toolbar {
    position: static;
    right: auto;
    top: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    backdrop-filter: none;
    background: rgba(255, 245, 238, 0.6);
  }

  .list-panel {
    position: static;
    width: auto;
    top: auto;
    right: auto;
    bottom: auto;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
    backdrop-filter: none;
    background: rgba(255, 245, 238, 0.7);
    min-height: 380px;
  }

  #map {
    min-height: 480px;
    height: 480px;
    max-height: none;
  }
}

/* List toggle FAB and drag handle — hidden on desktop */
.list-toggle-fab,
.sheet-handle {
  display: none;
}

@media (max-width: 640px) {
  /* Full-height layout: hero + map fills the screen */
  .app-shell {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .hero {
    flex: 0 0 auto;
    margin: 10px 10px 0;
    padding: 12px 14px 14px;
    border-radius: 14px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .subtitle {
    display: none;
  }

  .layout {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
  }

  .map-and-list {
    height: 100%;
    position: relative;
  }

  .map-panel {
    height: 100%;
    min-height: 0;
  }

  #map {
    height: 100% !important;
    min-height: 0 !important;
  }

  /* Toolbar / search */
  .map-toolbar {
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
  }

  .toolbar-right {
    width: 100%;
  }

  .search-wrap {
    flex: 1 1 100%;
  }

  .search-wrap input {
    width: 100%;
  }

  .hero-search-btn {
    display: inline-flex;
  }

  /* FAB */
  .list-toggle-fab {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 910;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  }

  .list-toggle-icon {
    font-size: 17px;
    line-height: 1;
  }

  /* List panel: hidden by default */
  .list-panel {
    display: none;
  }

  /* Bottom sheet when open — height controlled by JS */
  .list-panel.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: 55dvh; /* JS overrides this immediately */
    max-height: 92dvh;
    z-index: 900;
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--line);
    border-bottom: none;
    box-shadow: 0 -6px 32px rgba(0,0,0,0.18);
    background: rgba(255, 248, 244, 0.97);
    backdrop-filter: blur(16px);
    overflow: hidden;
  }

  /* Scrollable content area inside sheet */
  .list-panel.is-open .event-list {
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
  }

  /* Drag handle strip */
  .sheet-handle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .sheet-handle::after {
    content: "";
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.18);
  }

  .sheet-handle:active {
    cursor: grabbing;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }

  .event-card {
    transition: none;
  }
}

.cluster-hover-popup .maplibregl-popup-content {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(8, 20, 28, 0.22);
  padding: 8px 10px;
}

.cluster-hover-popup .maplibregl-popup-tip {
  display: none;
}

.cluster-hover-card {
  min-width: 180px;
  max-width: 240px;
}

.cluster-hover-head {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: #122029;
}

.cluster-hover-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-top: 3px;
  color: #2b3a45;
}

.cluster-hover-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.16);
}

.cluster-hover-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cluster-hover-time {
  color: #516675;
  font-size: 10px;
}

.cluster-hover-more {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #00554B;
}

.maplibregl-map.map-style-dark .cluster-hover-popup .maplibregl-popup-content {
  background: rgba(17, 22, 28, 0.94);
}

.maplibregl-map.map-style-dark .cluster-hover-head {
  color: #eff5fa;
}

.maplibregl-map.map-style-dark .cluster-hover-row {
  color: #d0e0ea;
}

.maplibregl-map.map-style-dark .cluster-hover-time {
  color: #9fb8c7;
}

.live-page {
  --live-green: #007A58;
  --live-green-dark: #00554B;
  --live-green-soft: #DFF6EA;
  --live-mint: #BDEFD7;
  --live-lime: #D8F5A2;
  background: #E4F4EA;
}

.live-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(410px, 38vw);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.live-map-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(135deg, rgba(0, 122, 88, 0.16), rgba(216, 245, 162, 0.14));
}

.live-hero {
  width: min(420px, calc(100% - 28px));
  background:
    linear-gradient(135deg, rgba(246, 255, 249, 0.96), rgba(229, 246, 235, 0.9));
  border-color: rgba(0, 122, 88, 0.18);
  box-shadow: 0 18px 40px rgba(0, 85, 75, 0.14);
}

.live-hero .live-back-link {
  float: right;
}

.live-map {
  width: 100%;
  height: 100vh;
}

.live-map .maplibregl-canvas {
  filter: saturate(1.18) brightness(0.99);
}

.live-unmapped-box {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 620;
  width: min(320px, calc(100% - 28px));
  max-height: min(230px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(18, 24, 32, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(242, 255, 247, 0.97), rgba(228, 247, 235, 0.95));
  box-shadow: 0 12px 28px rgba(0, 85, 75, 0.20);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.live-unmapped-box[hidden] {
  display: none;
}

.live-unmapped-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(223, 246, 234, 0.82);
}

.live-unmapped-head h2 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

.live-unmapped-head span {
  min-width: 22px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--live-green-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.live-unmapped-list {
  min-height: 0;
  overflow: auto;
  padding: 7px 8px;
  display: grid;
  gap: 5px;
}

.live-unmapped-marker {
  position: relative;
  min-height: 30px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(18, 24, 32, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.live-unmapped-empty {
  padding: 8px;
  border: 1px dashed rgba(18, 24, 32, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.live-unmapped-marker:hover,
.live-unmapped-marker:focus-visible {
  outline: none;
  border-color: rgba(0, 122, 88, 0.42);
  background: rgba(235, 255, 242, 0.98);
}

.live-unmapped-marker .live-map-pulse,
.live-unmapped-marker .live-map-dot {
  position: absolute;
  left: 14px;
}

.live-unmapped-marker-body {
  min-width: 0;
  display: grid;
  gap: 1px;
  grid-column: 2;
}

.live-unmapped-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-unmapped-meta {
  margin-top: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(246, 255, 249, 0.97), rgba(229, 246, 235, 0.97));
  box-shadow: -16px 0 34px rgba(0, 85, 75, 0.12);
}

.live-panel-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(216, 245, 162, 0.38), rgba(223, 246, 234, 0.72));
}

.live-panel-head h1 {
  margin-top: 2px;
  font-size: 1.55rem;
}

.live-panel-head h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
  line-height: 1.15;
}

.live-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.live-back-link {
  float: right;
  margin-left: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.live-controls {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(235, 255, 242, 0.68);
}

.live-range-switch {
  width: 100%;
}

.live-toggle-row {
  margin: 0;
  border-radius: 10px;
}

.live-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: #315D50;
  font-size: 12px;
  background: rgba(223, 246, 234, 0.55);
}

.live-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.live-list {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.live-card {
  border: 1px solid rgba(0, 122, 88, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}

.live-card.is-active {
  border-color: rgba(0, 85, 75, 0.62);
  box-shadow: inset 0 0 0 1px rgba(0, 85, 75, 0.16);
}

.live-card-skeleton {
  pointer-events: none;
}

.live-skeleton-line {
  display: block;
  width: 68%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 122, 88, 0.08), rgba(0, 122, 88, 0.18), rgba(0, 122, 88, 0.08));
  background-size: 220% 100%;
  animation: liveSkeleton 1.2s ease-in-out infinite;
}

.live-skeleton-line.is-wide {
  width: 92%;
}

.live-skeleton-line.is-short {
  width: 48%;
}

.live-card-main {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 7px 8px 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.live-card-main:hover,
.live-card-main:focus-visible {
  outline: none;
  background: rgba(216, 245, 162, 0.26);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  max-width: 96px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--live-green-dark);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-card-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.live-card-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-card-countdown,
.live-unmapped-countdown {
  color: var(--live-green-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-card-meta,
.live-card-place,
.live-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-card-desc {
  color: #404b54;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-card-actions,
.live-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.live-card-actions {
  padding: 0 8px 7px 112px;
}

.live-card-actions a,
.live-popup-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid rgba(0, 122, 88, 0.34);
  border-radius: 999px;
  background: rgba(223, 246, 234, 0.98);
  color: var(--live-green-dark);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.live-popup strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.live-popup p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 12px;
}

.live-popup-actions {
  margin-top: 8px;
}

.live-map-marker {
  position: relative;
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.live-map-pulse,
.live-map-dot {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.live-map-pulse {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 122, 88, 0.62);
  animation: livePulseRing 1.45s ease-out infinite;
}

.live-map-dot {
  width: 12px;
  height: 12px;
  background: var(--live-green);
  border: 2px solid #ffffff;
  box-shadow: 0 3px 12px rgba(0, 85, 75, 0.42);
  animation: liveDotBeat 1.45s ease-in-out infinite;
  z-index: 2;
}

.live-map-marker.is-hybrid .live-map-pulse {
  border-color: rgba(125, 0, 55, 0.58);
}

.live-map-marker.is-hybrid .live-map-dot {
  background: #7D0037;
}

.live-map-label {
  position: absolute;
  left: 12px;
  top: 0;
  width: max-content;
  min-width: 86px;
  max-width: 205px;
  transform: translateY(-50%);
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(245, 255, 248, 0.96);
  border: 1px solid rgba(0, 122, 88, 0.18);
  box-shadow: 0 3px 12px rgba(0, 85, 75, 0.18);
  color: #0E352B;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  display: grid;
  gap: 1px;
}

.live-map-label-title,
.live-map-label-countdown {
  display: block;
  min-width: 0;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-map-label-countdown {
  color: var(--live-green-dark);
  font-size: 10px;
  font-weight: 800;
}

.live-map-marker.is-active .live-map-label,
.live-map-marker:hover .live-map-label,
.live-map-marker:focus-visible .live-map-label {
  border-color: rgba(0, 122, 88, 0.52);
  box-shadow: 0 6px 18px rgba(0, 85, 75, 0.28);
}

.live-map-marker:focus-visible {
  outline: none;
}

@keyframes livePulseRing {
  0% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(0.65);
  }
  78% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.55);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.55);
  }
}

@keyframes liveDotBeat {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes liveSkeleton {
  0% {
    background-position: 160% 0;
  }
  100% {
    background-position: -60% 0;
  }
}

@media (max-width: 760px) {
  .live-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 45vh minmax(0, 55vh);
  }

  .live-map,
  .live-map-wrap {
    height: 45vh;
  }

  .live-unmapped-box {
    right: 10px;
    bottom: 10px;
    max-height: 160px;
    width: min(300px, calc(100% - 20px));
  }

  .live-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .live-panel-head {
    padding: 12px 14px 10px;
  }

  .live-panel-head h1 {
    font-size: 1.35rem;
  }

  .live-hero {
    position: absolute;
    top: 10px;
    left: 10px;
    width: min(360px, calc(100% - 20px));
    margin: 0;
    padding: 11px 12px 12px;
  }

  .live-card-main {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 7px;
  }

  .live-pill {
    max-width: 82px;
  }

  .live-card-actions {
    padding-left: 97px;
  }

  .live-map-marker {
    width: 0;
  }

  .live-map-label {
    max-width: 148px;
    font-size: 10.5px;
  }
}

/* Map wipe animation on live toggle */
.map-panel.map-panel-wipe .maplibregl-canvas {
  animation: mapWipe 0.35s ease-in-out;
}

@keyframes mapWipe {
  0%   { filter: brightness(1) blur(0); }
  40%  { filter: brightness(2.5) blur(8px); }
  100% { filter: brightness(1) blur(0); }
}
