/* Screen 2: Vibe Map */

/* ---------- Map area (fills the screen above the bottom nav, pans by dragging) ---------- */
.map-viewport {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: var(--nav-h);
  overflow: auto;
  overscroll-behavior: contain;
  background: #0a0810;
  scrollbar-width: none;
  cursor: grab;
}
.map-viewport::-webkit-scrollbar { display: none; }
.map-viewport.dragging { cursor: grabbing; }
.map-canvas {
  position: relative;
  width: 520px;
  height: 900px;
  margin-inline: auto;
}
.map-svg { display: block; user-select: none; }
.road-label {
  fill: #4a4262;
  font-family: var(--font-body);
  font-size: 7.5px; font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-anchor: middle;
}
.area-label {
  fill: #5c537a;
  font-family: var(--font-display);
  font-size: 9px; font-weight: 600;
  letter-spacing: 3px;
  text-anchor: middle;
}
.area-label.small { font-size: 7px; letter-spacing: 2.4px; fill: #4a4262; }
.area-label.sea-label { fill: #2c2452; font-size: 11px; letter-spacing: 7px; }

/* aggregated activity glows: never individual people */
.vibe-zone, .vibe-glow {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
}
.vibe-zone {
  background: radial-gradient(closest-side, rgba(157, 92, 255, 0.22), rgba(157, 92, 255, 0.08) 55%, transparent);
}
.vibe-glow {
  background: radial-gradient(closest-side, rgba(157, 92, 255, 0.5), rgba(157, 92, 255, 0.14) 50%, transparent);
  animation: breathe 5s ease-in-out infinite;
}
.vibe-glow.lvl-medium { opacity: 0.55; }
.vibe-glow.lvl-high { opacity: 0.8; }
.vibe-glow.lvl-trending {
  background: radial-gradient(closest-side, rgba(185, 120, 255, 0.7), rgba(157, 92, 255, 0.22) 45%, transparent);
}
@keyframes breathe {
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

/* ---------- Venue markers ---------- */
.venue-pin {
  position: absolute;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  z-index: 1;
}
.venue-pin.lvl-trending { z-index: 3; }
.venue-pin.lvl-high { z-index: 2; }
.pin-core {
  border-radius: 50%;
  transition: transform 0.2s;
}
.lvl-low .pin-core {
  width: 10px; height: 10px;
  background: rgba(185, 139, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(157, 92, 255, 0.14);
}
.lvl-medium .pin-core {
  width: 14px; height: 14px;
  background: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(157, 92, 255, 0.22), 0 0 14px var(--glow);
}
.lvl-high .pin-core {
  width: 20px; height: 20px;
  background: radial-gradient(circle at 40% 35%, #e6d6ff, var(--accent) 70%);
  box-shadow: 0 0 0 5px rgba(157, 92, 255, 0.28), 0 0 22px var(--accent);
}
.lvl-trending .pin-core {
  width: 26px; height: 26px;
  background: radial-gradient(circle at 40% 35%, #fff, #c9a4ff 35%, var(--accent) 75%);
  box-shadow: 0 0 0 6px rgba(157, 92, 255, 0.35), 0 0 30px var(--accent), 0 0 60px var(--glow);
}
.pin-pulse {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid var(--accent-light);
  animation: pulse 2.4s ease-out infinite;
  pointer-events: none;
}
.pin-pulse.late { animation-delay: 1.2s; }
@keyframes pulse {
  from { transform: scale(1); opacity: 0.8; }
  to   { transform: scale(3.2); opacity: 0; }
}
.venue-pin.selected .pin-core { transform: scale(1.35); }
.venue-pin.selected .pin-label { border-color: var(--accent); color: var(--fg); }

.pin-going {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px;
  margin: -20px 0 0 4px;
  border-radius: 50%;
  display: none; place-items: center;
  background: var(--fg); color: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}
.pin-going svg { width: 10px; height: 10px; }
.venue-pin.is-going .pin-going { display: grid; }

.pin-label {
  position: absolute; top: calc(100% - 6px); left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(8, 6, 14, 0.82);
  border: 1px solid var(--line);
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
  color: #d9d5e3;
  pointer-events: none;
}
.pin-label em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--accent-light);
}
/* markers near the west edge put their label to the right so it isn't cut off */
.venue-pin.label-right .pin-label { top: 50%; left: calc(100% - 8px); transform: translateY(-50%); }
.lvl-low .pin-label { font-size: 10px; color: var(--muted); background: rgba(8, 6, 14, 0.6); }
.lvl-trending .pin-label {
  top: calc(100% + 2px);
  border-color: rgba(185, 139, 255, 0.55);
  box-shadow: 0 0 14px rgba(157, 92, 255, 0.4);
  color: var(--fg);
}

/* ---------- Header ---------- */
.map-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 4;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--status-h) + 8px);
  padding-bottom: 34px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(5, 4, 7, 0.92) 55%, transparent);
  pointer-events: none;
}
.map-header > * { pointer-events: auto; }
.map-heading { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.map-eyebrow {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-light);
}
.map-eyebrow svg { width: 13px; height: 13px; }
.map-eyebrow .live {
  margin-left: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }
.map-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}
.map-sub { margin: 0; font-size: 14px; color: var(--muted); font-weight: 500; }

.filter-btn {
  position: relative;
  flex: none;
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  margin-top: 14px;
  background: rgba(18, 16, 25, 0.9);
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-btn svg { width: 22px; height: 22px; }
.filter-btn.has-filters { border-color: var(--accent); box-shadow: 0 0 16px rgba(157, 92, 255, 0.35); }
.filter-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent);
  font-size: 11px; font-weight: 800;
  box-shadow: 0 0 10px var(--glow);
}

/* ---------- Trending Tonight (floats over the bottom of the map) ---------- */
.trending {
  position: absolute;
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: 4;
  padding-top: 40px;
  padding-bottom: 14px;
  background: linear-gradient(to top, var(--bg) 0%, rgba(5, 4, 7, 0.9) 60%, transparent);
  pointer-events: none;
}
.trending > * { pointer-events: auto; }
.trending-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  margin-bottom: 10px;
}
.trending-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.04em;
}
.legend-dot { border-radius: 50%; display: block; }
.legend-dot.lvl-low { width: 6px; height: 6px; background: rgba(185, 139, 255, 0.5); }
.legend-dot.lvl-medium { width: 8px; height: 8px; background: var(--accent-light); }
.legend-dot.lvl-high { width: 10px; height: 10px; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.legend-dot.lvl-trending { width: 12px; height: 12px; background: radial-gradient(circle, #fff, var(--accent) 70%); box-shadow: 0 0 10px var(--accent); }

.trending-row {
  display: flex; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
  scrollbar-width: none;
}
.trending-row::-webkit-scrollbar { display: none; }
.trend-card {
  position: relative;
  flex: none;
  width: 150px;
  scroll-snap-align: start;
  border-radius: 18px;
  background: rgba(18, 16, 25, 0.92);
  border: 1px solid var(--line);
}
.trend-main {
  width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 14px;
  border-radius: 18px;
  text-align: left;
}
.trend-open {
  position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(185, 139, 255, 0.35);
  color: var(--accent-light);
}
.trend-open svg { width: 13px; height: 13px; }
.trend-card.top {
  border-color: rgba(185, 139, 255, 0.5);
  box-shadow: 0 0 22px rgba(157, 92, 255, 0.25);
  background: linear-gradient(160deg, rgba(157, 92, 255, 0.2), rgba(18, 16, 25, 0.94) 60%);
}
.trend-rank {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--accent-light);
}
.trend-name { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.trend-active { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trend-energy { font-size: 12px; color: var(--muted); font-weight: 600; }
.trend-going {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 800;
  color: var(--accent-light);
}
.trend-going svg { width: 11px; height: 11px; }

/* ---------- Activity around you (row under Trending Tonight) ---------- */
.activity-strip {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 2 * max(20px, env(safe-area-inset-left, 0px)));
  margin: 10px auto 0;
  padding: 9px 10px 9px 9px;
  border-radius: 16px;
  background: rgba(18, 16, 25, 0.92);
  border: 1px solid var(--line);
  text-align: left;
}
.strip-icon {
  flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-light);
  box-shadow: 0 0 12px rgba(157, 92, 255, 0.3);
}
.strip-icon svg { width: 18px; height: 18px; }
.strip-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
  transition: opacity 0.25s;
}
.strip-text.fade { opacity: 0; }
.strip-text b { font-size: 13px; font-weight: 800; }
.strip-line { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-faces, .act-faces { flex: none; display: flex; }
.strip-faces span, .act-faces span {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  border: 2px solid #15101f;
  margin-left: -8px;
}
.strip-faces span:first-child, .act-faces span:first-child { margin-left: 0; }
.strip-chevron { flex: none; color: var(--muted); display: grid; }
.strip-chevron svg { width: 16px; height: 16px; }

/* ---------- Activity sheets (list + who's here) ---------- */
.activity-sheet { display: flex; flex-direction: column; padding-top: 8px; }
.activity-sheet.detail { gap: 0; padding-top: 30px; }
.act-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.act-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.act-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.act-faces span { width: 36px; height: 36px; font-size: 13px; margin-left: -12px; }
.act-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.35; color: #d9d5e3; }
.act-text b { color: var(--fg); font-weight: 800; }
.act-meta { font-size: 12px; color: var(--accent-light); font-weight: 600; }
.join-slot { flex: none; display: grid; }
.join-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-size: 12px; font-weight: 800;
  white-space: nowrap;
}
.join-btn svg { width: 13px; height: 13px; }
.join-btn.on { background: var(--accent-soft); box-shadow: 0 0 12px rgba(157, 92, 255, 0.3); }

.sheet-back {
  position: absolute; top: 16px; left: max(16px, env(safe-area-inset-left, 0px));
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
}
.sheet-back svg { width: 16px; height: 16px; }
.activity-sheet.detail .vs-head { margin-top: 12px; }
.people-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; }
.person {
  display: flex; align-items: center; gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: 0; }
.person-avatar {
  flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
}
.person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person-text b { font-size: 15px; font-weight: 800; }
.person-rel { font-size: 12px; color: var(--accent-light); font-weight: 700; }
.person-when { flex: none; text-align: right; font-size: 11px; line-height: 1.4; color: var(--muted); font-weight: 600; }
.activity-sheet .vs-actions { margin-bottom: 14px; }

/* ---------- Venue preview sheet ---------- */
.venue-sheet { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.vs-head { display: flex; align-items: center; gap: 14px; padding-right: 44px; }
.vs-mark {
  flex: none;
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(185, 139, 255, 0.3);
}
.vs-mark span { border-radius: 50%; width: 14px; height: 14px; background: var(--accent-light); box-shadow: 0 0 14px var(--accent); }
.vs-mark.lvl-low span { width: 10px; height: 10px; background: rgba(185, 139, 255, 0.6); box-shadow: none; }
.vs-mark.lvl-high span { width: 18px; height: 18px; background: var(--accent); }
.vs-mark.lvl-trending span { width: 22px; height: 22px; background: radial-gradient(circle, #fff, var(--accent) 70%); box-shadow: 0 0 20px var(--accent); }
.vs-title { min-width: 0; }
.vs-area { margin: 0 0 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.vs-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.vs-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.vs-energy, .vs-trend {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px; font-weight: 800;
}
.vs-energy { background: var(--accent-soft); color: var(--fg); border: 1px solid rgba(185, 139, 255, 0.35); }
.vs-energy.lvl-trending, .vs-energy.lvl-high { box-shadow: 0 0 16px rgba(157, 92, 255, 0.35); }
.vs-trend { background: var(--surface); color: var(--accent-light); border: 1px solid var(--line); }

.vs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vs-stat {
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 14px 6px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.vs-stat > b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vs-stat > span { font-size: 11px; color: var(--muted); font-weight: 700; }
.match-ring {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--surface) 78%, transparent 80%),
    conic-gradient(var(--accent-light) calc(var(--p) * 1%), #2a2440 0);
  box-shadow: 0 0 14px rgba(157, 92, 255, 0.35);
}
.match-ring b { font-size: 12px; font-weight: 800; }
.vs-music {
  margin: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #d9d5e3;
}
.vs-music svg { width: 18px; height: 18px; color: var(--accent-light); }
/* latest video from the venue */
.latest-card {
  display: flex; align-items: stretch; gap: 14px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(157, 92, 255, 0.16), var(--surface) 55%);
  border: 1px solid rgba(185, 139, 255, 0.3);
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.latest-card:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(157, 92, 255, 0.3); }
.latest-thumb {
  position: relative;
  flex: none;
  width: 78px; height: 118px;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0a14;
  box-shadow: 0 0 16px rgba(157, 92, 255, 0.3);
}
.latest-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.latest-play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.latest-play svg { width: 14px; height: 14px; }
.latest-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.latest-eyebrow {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-light);
}
.latest-eyebrow i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 8px var(--accent);
}
.latest-by { font-size: 12px; color: var(--muted); font-weight: 600; }
.latest-by b { color: var(--fg); font-weight: 800; }
.latest-caption {
  font-size: 13px; line-height: 1.4; color: #d9d5e3; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.latest-watch { font-size: 12px; font-weight: 800; color: var(--accent-light); }

.vs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.going-slot { display: grid; }
.vs-privacy { margin: 0; font-size: 11px; color: var(--muted); text-align: center; }

/* ---------- Filters sheet ---------- */
.filters-sheet { display: flex; flex-direction: column; padding-top: 8px; }
.fs-title { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 800; }
.fs-sub { margin: 4px 0 6px; font-size: 13px; color: var(--muted); }
.fs-group {
  margin: 18px 0 10px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-light);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  .vibe-glow, .pin-pulse, .map-eyebrow .live { animation: none; }
}
