:root {
  --bg-deep: #07050f;
  --bg-card: rgba(18, 12, 32, 0.82);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --neon-pink: #ff2d95;
  --neon-purple: #b44dff;
  --neon-cyan: #00e5ff;
  --text: #f0ecff;
  --text-muted: #a89ec4;
  --border: rgba(180, 77, 255, 0.25);
  --radius: 14px;
  --font-display: "Orbitron", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", system-ui, sans-serif;
  --marquee-h: 36px;
  --music-h: 56px;
  --ad-h: 72px;
}

@property --music-h {
  syntax: "<length>";
  inherits: true;
  initial-value: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  padding-top: calc(var(--marquee-h) + var(--music-h));
  padding-bottom: calc(var(--ad-h) + 48px);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(255, 45, 149, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(0, 229, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(180, 77, 255, 0.15), transparent 60%),
    var(--bg-deep);
}

/* Marquee */
.marquee-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--marquee-h);
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #120a1e, #1a0f2e);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.marquee-label {
  flex-shrink: 0;
  padding: 0 12px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-pink);
  background: rgba(255, 45, 149, 0.12);
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}

.marquee-track {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.marquee-content {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: marquee-scroll var(--marquee-duration, 33.33s) linear infinite;
  padding-left: 100%;
}

.marquee-content:hover {
  animation-play-state: paused;
}

.marquee-item {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.marquee-sep {
  color: var(--neon-purple);
  opacity: 0.5;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (max-width: 900px) {
  :root {
    --music-h: 88px;
    transition: --music-h 0.28s ease;
  }

  html.music-progress-collapsed {
    --music-h: 56px;
  }

  .marquee-content {
    animation-duration: var(--marquee-duration-mobile, var(--marquee-duration, 33.33s));
  }
}

/* Music bar */
.sc-hidden {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 300px;
  height: 166px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border: 0;
}

.music-bar {
  position: fixed;
  top: var(--marquee-h);
  left: 0;
  right: 0;
  z-index: 190;
  height: var(--music-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: 1fr;
  align-items: center;
  column-gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(10, 6, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.music-bar.is-playing {
  border-bottom-color: rgba(255, 45, 149, 0.35);
}

.music-bar.is-playing .music-icon {
  color: var(--neon-pink);
}

.music-bar.music-needs-gesture,
.music-bar.music-needs-sound {
  border-bottom-color: rgba(0, 229, 255, 0.45);
  box-shadow: inset 0 -2px 0 rgba(0, 229, 255, 0.35);
}

.music-bar.music-needs-gesture .ctrl-main,
.music-bar.music-needs-sound .ctrl-main {
  animation: music-pulse 1.4s ease-in-out infinite;
}

@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 45, 149, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(255, 45, 149, 0); }
}

.music-info {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.music-icon {
  font-size: 1.25rem;
  color: var(--neon-cyan);
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.music-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.music-label {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-link {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

.music-link:not(.is-disabled) {
  cursor: pointer;
}

.music-link:not(.is-disabled):hover {
  color: var(--neon-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.music-link.is-disabled {
  pointer-events: none;
}

.music-playlist {
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.music-track {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(36vw, 260px);
}

.music-progress {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 480px;
  padding: 0 0.25rem;
}

.music-time {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 2.4rem;
  text-align: center;
}

.music-seek {
  flex: 1;
  min-width: 0;
  height: 4px;
  margin: 0;
  padding: 0;
  touch-action: none;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  accent-color: var(--neon-pink);
}

.music-seek:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.music-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.music-seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  border: 2px solid rgba(10, 6, 20, 0.9);
  box-shadow: 0 0 8px rgba(255, 45, 149, 0.45);
  cursor: grab;
}

.music-seek:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.music-seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.music-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  border: 2px solid rgba(10, 6, 20, 0.9);
  cursor: grab;
}

.music-controls {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-glass);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-btn:hover {
  background: rgba(180, 77, 255, 0.2);
  border-color: var(--neon-purple);
}

.ctrl-btn:active {
  transform: scale(0.94);
}

.ctrl-main {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  border-color: transparent;
  font-size: 1rem;
}

.ctrl-main:hover {
  background: linear-gradient(135deg, #ff4da6, #c86dff);
}

.ctrl-btn.muted {
  opacity: 0.55;
}

/* CSS-drawn glyphs — avoids colorful emoji on mobile (⏮⏭⏸🔊). */
.ctrl-icon {
  position: relative;
  font-size: 0;
  line-height: 0;
}

.ctrl-icon-prev::before,
.ctrl-icon-next::before,
.ctrl-icon-play::before,
.ctrl-icon-mute::before {
  content: "";
  display: block;
}

.ctrl-icon-prev::before {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 6px 5px 0;
  border-color: transparent currentColor transparent transparent;
  box-shadow: -6px 0 0 0 currentColor;
}

.ctrl-icon-next::before {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent currentColor;
  box-shadow: 6px 0 0 0 currentColor;
}

.ctrl-icon-play::before {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}

.ctrl-icon-play.is-playing::before {
  width: 3px;
  height: 12px;
  margin-left: 0;
  border: none;
  background: currentColor;
  box-shadow: 5px 0 0 0 currentColor;
}

.ctrl-icon-mute::before {
  width: 7px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 30%, 40% 30%, 100% 0, 100% 100%, 40% 70%, 0 70%);
}

.ctrl-icon-mute::after {
  content: "";
  position: absolute;
  left: calc(50% + 1px);
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translateY(-50%);
  border: 2px solid currentColor;
  border-left: none;
  border-radius: 0 50% 50% 0;
}

.ctrl-icon-mute.muted::after {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 0;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    currentColor calc(50% - 1px),
    currentColor calc(50% + 1px),
    transparent calc(50% + 1px)
  );
  transform: translate(-10%, -50%);
}

@media (max-width: 900px) {
  /* Row 1: artist + title (left) · controls (right); row 2: full-width seek.
     Must follow base .music-bar — earlier @media block was overridden by cascade. */
  .music-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(42px, auto) minmax(20px, auto);
    align-content: start;
    align-items: center;
    row-gap: 0.2rem;
    column-gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    height: var(--music-h);
    overflow: hidden;
    transition: height 0.28s ease, row-gap 0.28s ease;
  }

  html.music-progress-collapsed .music-bar {
    grid-template-rows: minmax(42px, auto) 0fr;
    row-gap: 0;
  }

  .music-info {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .music-controls {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    flex-shrink: 0;
  }

  .music-progress {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: center;
    max-width: none;
    width: 100%;
    min-height: 20px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: opacity 0.28s ease, max-height 0.28s ease, min-height 0.28s ease;
  }

  html.music-progress-collapsed .music-progress {
    opacity: 0;
    max-height: 0;
    min-height: 0;
    pointer-events: none;
  }

  .music-track {
    max-width: none;
  }
}

/* Layout */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.page-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.filter-sheet-host {
  min-width: 0;
}

.filter-sheet-backdrop,
.filter-sheet-header {
  display: none;
}

.filter-sheet-panel,
.filter-sheet-body {
  display: block;
}

.filter-fab {
  display: none;
}

.recommend-sheet-host {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  visibility: hidden;
}

@media (max-width: 900px) {
  .recommend-sheet-host {
    display: block;
  }
}

body.recommend-demo-mode .recommend-sheet-host {
  display: block;
}

.recommend-sheet-host.is-open {
  pointer-events: auto;
  visibility: visible;
  overscroll-behavior: contain;
}

.recommend-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 10, 0.82);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.recommend-sheet-host.is-open .recommend-sheet-backdrop {
  opacity: 1;
}

.recommend-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  align-items: stretch;
  padding:
    calc(0.35rem + env(safe-area-inset-top, 0px))
    0
    env(safe-area-inset-bottom, 0px);
  transform: translateY(8%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.28s ease;
}

.recommend-sheet-host.is-open .recommend-sheet-panel {
  transform: translateY(0);
  opacity: 1;
}

.recommend-sheet-panel.is-dragging {
  transition: none;
}

.recommend-sheet-drag-zone {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 1rem 0.4rem;
  touch-action: none;
  cursor: grab;
}

.recommend-sheet-drag-zone.is-dragging {
  cursor: grabbing;
}

.recommend-sheet-drag-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.recommend-sheet-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.recommend-carousel-viewport {
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  container-type: inline-size;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pinch-zoom;
  cursor: grab;
}

.recommend-carousel-viewport.is-drag-scrolling {
  cursor: grabbing;
  user-select: none;
}

.recommend-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.recommend-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  height: 100%;
  box-sizing: border-box;
}

.recommend-carousel-pad {
  flex: 0 0 var(--recommend-carousel-inset, 0px);
  width: var(--recommend-carousel-inset, 0px);
  min-width: 0;
  height: 1px;
  pointer-events: none;
}

.recommend-carousel-card {
  position: relative;
  flex: 0 0 min(88vw, 360px);
  flex: 0 0 min(88cqw, 360px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0.55;
  transform: scale(0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition:
    opacity 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  contain: layout paint;
}

.recommend-carousel-card.event-card--ongoing {
  animation: none;
}

.recommend-carousel-card.is-active {
  opacity: 1;
  transform: scale(1);
  border: 2px solid rgba(0, 229, 255, 0.85);
  box-shadow:
    0 0 0 3px rgba(0, 229, 255, 0.22),
    0 0 36px rgba(0, 229, 255, 0.28),
    0 20px 56px rgba(255, 45, 149, 0.22);
}

.recommend-carousel-card.is-active.event-card--ongoing {
  border-color: rgba(255, 45, 149, 0.9);
  box-shadow:
    0 0 0 3px rgba(255, 45, 149, 0.25),
    0 0 40px rgba(255, 45, 149, 0.35),
    0 20px 56px rgba(255, 45, 149, 0.22);
}

.recommend-carousel-card.is-active::after {
  content: "目前瀏覽";
  position: absolute;
  bottom: 12px;
  left: 50%;
  right: auto;
  z-index: 4;
  transform: translateX(-50%);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #031318;
  background: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
  pointer-events: none;
}

.recommend-carousel-card .event-date-badge {
  top: 8px;
  left: 8px;
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
}

.recommend-carousel-card .event-date-label {
  font-size: 0.92rem;
}

.recommend-carousel-card .event-cover {
  flex: 1 1 0;
  min-height: 0;
  aspect-ratio: unset;
  width: 100%;
}

.recommend-carousel-card .event-cover img,
.recommend-carousel-card .event-cover-video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.recommend-carousel-card .event-body {
  flex: 0 0 auto;
  flex-shrink: 0;
  overflow: visible;
  padding: 0.55rem 0.75rem 0.7rem;
}

.recommend-carousel-card .event-body-main {
  gap: 0.3rem;
}

.recommend-carousel-card .event-venue {
  font-size: 0.68rem;
}

.recommend-why {
  margin: 0 0 0.45rem;
  padding: 0.32rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #f7c8ff;
  background: linear-gradient(90deg, rgba(255, 45, 149, 0.18), rgba(0, 229, 255, 0.12));
  border: 1px solid rgba(240, 168, 255, 0.45);
  border-radius: 999px;
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommend-carousel-card .event-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.3;
}

.recommend-carousel-card .event-meta {
  display: none;
}

.recommend-carousel-card .event-djs,
.recommend-carousel-card .event-genres {
  display: none;
}

.recommend-carousel-card .event-actions {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  padding-top: 0.35rem;
  gap: 0.35rem;
  margin-top: 0;
}

.recommend-carousel-card .event-link {
  min-height: 2rem;
  font-size: 0.72rem;
  padding: 0.35rem 0.2rem;
  line-height: 1.2;
}

.recommend-dots {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem 0.15rem;
}

.recommend-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
}

.recommend-dot.is-active {
  background: var(--neon-pink);
  transform: scale(1.25);
}

.recommend-close-btn {
  flex-shrink: 0;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 0 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.recommend-close-btn:hover,
.recommend-close-btn:active {
  background: rgba(255, 45, 149, 0.25);
  border-color: var(--neon-pink);
  transform: scale(1.05);
}

body.recommend-sheet-open {
  /* ponytail: overflow:hidden blocks nested horizontal scroll on iOS/Chrome */
  overscroll-behavior-y: none;
}

.venue-sidebar {
  position: sticky;
  top: calc(var(--marquee-h) + var(--music-h) + 1rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.region-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  padding: 0 0.75rem 0.75rem;
}

.region-tab {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-glass);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.4rem 0.25rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.region-tab:hover {
  color: var(--text);
  border-color: rgba(180, 77, 255, 0.45);
}

.region-tab.active {
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.2), rgba(180, 77, 255, 0.2));
  color: var(--text);
  border-color: rgba(255, 45, 149, 0.45);
}

.sidebar-filters {
  padding: 0;
}

.filter-section + .filter-section,
.venue-filters-block {
  border-top: 1px solid var(--border);
}

.venue-filters-block .region-tabs {
  padding-top: 0.75rem;
}

.venue-filters-block .filter-section {
  border-top: 1px solid var(--border);
}

.filter-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: left;
}

.filter-section-toggle:hover {
  background: rgba(180, 77, 255, 0.08);
}

.filter-section-label {
  font-weight: 600;
}

.filter-section-chevron::before {
  content: "▾";
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.filter-section:not(.is-expanded) .filter-section-chevron::before {
  transform: rotate(-90deg);
}

.filter-section-panel {
  padding: 0 0.75rem 0.75rem;
}

.filter-section:not(.is-expanded) .filter-section-panel {
  display: none;
}

.sidebar-filters .city-filter select {
  width: 100%;
}

.venue-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem;
  max-height: calc(100vh - var(--marquee-h) - var(--music-h) - 220px);
  overflow-y: auto;
}

.venue-list li {
  margin: 0;
}

.venue-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.venue-item:hover {
  background: rgba(180, 77, 255, 0.1);
  border-color: rgba(180, 77, 255, 0.2);
}

.venue-item.active {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.35);
}

.venue-item-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.venue-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.venue-item-ig {
  font-size: 0.7rem;
  color: var(--neon-pink);
}

.loading-venues,
.venue-empty {
  padding: 1rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.main-content {
  min-width: 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.member-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  margin-left: auto;
}

.member-guest,
.member-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.member-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.member-login-btn:hover {
  border-color: rgba(255, 45, 149, 0.45);
  background: rgba(180, 77, 255, 0.12);
}

.member-login-line {
  border-color: rgba(6, 199, 85, 0.35);
}

.member-login-google {
  border-color: rgba(66, 133, 244, 0.35);
}

.member-login-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.member-name {
  font-size: 0.82rem;
  color: var(--text);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-logout-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.member-logout-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.member-link-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
}

.member-link-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.city-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.city-filter select {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  min-width: 120px;
}

.events-section {
  min-width: 0;
}

/* Mobile: flatten wrappers and reorder — header → section-head → sidebar → grid */
@media (max-width: 900px) {
  .layout {
    padding: 1rem 0.85rem 1.5rem;
  }

  .page-body {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .main-content,
  .events-section {
    display: contents;
  }

  .site-header {
    order: 1;
    width: 100%;
    min-width: 0;
    margin-bottom: 1rem;
  }

  .section-head {
    order: 2;
    width: 100%;
    min-width: 0;
    margin-bottom: 1rem;
  }

  .venue-sidebar {
    position: static;
    top: auto;
    z-index: auto;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    box-shadow: none;
    border-bottom-color: var(--border);
  }

  .filter-sheet-host {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
  }

  .filter-sheet-host.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  .filter-sheet-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(4, 2, 10, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .filter-sheet-host.is-open .filter-sheet-backdrop {
    opacity: 1;
  }

  .filter-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    max-height: min(88dvh, calc(100dvh - var(--marquee-h) - var(--music-h) - 0.5rem));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .filter-sheet-host.is-open .filter-sheet-panel {
    transform: translateY(0);
  }

  .filter-sheet-header {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 0.55rem 1rem 0.65rem;
    border-bottom: 1px solid var(--border);
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  .filter-sheet-header.is-dragging {
    cursor: grabbing;
  }

  .filter-sheet-drag-handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    flex-shrink: 0;
  }

  .filter-sheet-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .filter-sheet-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
  }

  .filter-sheet-panel.is-dragging {
    transition: none;
  }

  .filter-sheet-close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-glass);
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .filter-sheet-close:hover {
    color: var(--text);
    border-color: rgba(180, 77, 255, 0.45);
  }

  .filter-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .filter-sheet-body .venue-sidebar {
    border: none;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .filter-sheet-body .venue-list {
    max-height: none;
  }

  .filter-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: fixed;
    right: 1rem;
    bottom: calc(var(--ad-h) + 1rem);
    z-index: 190;
    min-height: 48px;
    padding: 0.65rem 1.1rem;
    border: 1px solid rgba(255, 45, 149, 0.45);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 45, 149, 0.5), rgba(180, 77, 255, 0.5));
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .filter-fab:hover {
    border-color: var(--neon-pink);
    background: linear-gradient(135deg, rgba(255, 45, 149, 0.6), rgba(180, 77, 255, 0.6));
  }

  .filter-fab-dot {
    display: none;
    position: absolute;
    top: 6px;
    right: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.65);
  }

  .filter-fab.is-active .filter-fab-dot {
    display: block;
  }

  body.filter-sheet-open {
    overflow: hidden;
  }

  .events-grid {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .venue-list {
    max-height: 146px;
  }

  .filter-section-toggle,
  .region-tab {
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .sidebar-filters .city-filter select {
    min-height: 44px;
  }
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-head-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.when-filters {
  display: flex;
  gap: 0.385rem;
  flex-wrap: wrap;
}

.when-filter {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-glass);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.825rem;
  padding: 0.385rem 0.715rem;
  min-height: 1.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.when-filter:hover {
  color: var(--text);
  border-color: rgba(180, 77, 255, 0.45);
}

.when-filter.active {
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.2), rgba(180, 77, 255, 0.2));
  color: var(--text);
  border-color: rgba(255, 45, 149, 0.45);
}

.list-scope-filters {
  display: flex;
  gap: 0.385rem;
  flex-wrap: wrap;
}

.list-scope-filter {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-glass);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.825rem;
  padding: 0.385rem 0.715rem;
  min-height: 1.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.list-scope-filter:hover {
  color: var(--text);
  border-color: rgba(180, 77, 255, 0.45);
}

.list-scope-filter.active {
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.2), rgba(180, 77, 255, 0.2));
  color: var(--text);
  border-color: rgba(255, 45, 149, 0.45);
}

@media (max-width: 900px) {
  .section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
  }

  .section-head-title {
    display: contents;
  }

  .section-head h2 {
    grid-column: 1;
    grid-row: 1;
  }

  .section-head .badge {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    white-space: nowrap;
  }

  .list-scope-filters {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .when-filters {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
  }

  .list-scope-filter,
  .when-filter {
    flex: 1;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

.event-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.event-favorite:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.event-favorite svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.75;
}

.event-favorite.is-active svg {
  fill: var(--neon-pink);
  stroke: var(--neon-pink);
}

.event-ended-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(80, 80, 90, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

/* Events grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.events-grid .event-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

@media (min-width: 901px) {
  .events-grid .event-card {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }
}

.loading-card,
.empty-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, opacity 0.25s;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  position: relative;
}

.event-card:not(.event-card--flipped):not(.event-card--expanded):hover {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 149, 0.4);
  box-shadow: 0 8px 32px rgba(180, 77, 255, 0.15);
}

.event-card--flipped,
.event-card--expanded {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.25),
    0 12px 36px rgba(0, 229, 255, 0.18);
  z-index: 2;
}

.event-card-flip {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.event-card-face {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  background: var(--bg-card);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.event-card-face--front {
  position: relative;
  flex: 1 1 auto;
  transform: rotateY(0deg);
}

.event-card-face--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  overflow: hidden;
  padding: 0.75rem 0.85rem 1rem;
  gap: 0.65rem;
}

.event-caption-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.event-caption-back {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.event-caption-back-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  font-weight: 700;
}

.event-caption-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  flex: 1 1 auto;
}

.event-caption-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  overflow-y: auto;
  max-height: min(52vh, 420px);
  padding-right: 0.15rem;
}

.event-caption-text.is-empty {
  color: var(--text-muted);
  font-style: italic;
}

.event-caption-ig {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 149, 0.45);
  color: var(--neon-pink);
  font-size: 0.78rem;
  text-decoration: none;
  flex-shrink: 0;
}

.event-caption-ig:hover {
  background: rgba(255, 45, 149, 0.12);
}

.event-caption-panel--mobile {
  display: none;
}

@media (min-width: 901px) {
  .event-card {
    overflow: visible;
    perspective: 1200px;
  }

  .event-card-flip {
    border-radius: var(--radius);
    background: var(--bg-card);
  }

  .event-card-face--front,
  .event-card-face--back {
    border-radius: var(--radius);
  }

  .recommend-carousel-card.event-card {
    contain: none;
  }

  .event-card--flipped .event-card-flip {
    transform: rotateY(180deg);
  }

  .event-card--flipped .event-card-face--front {
    visibility: hidden;
  }

  .event-card--flipped:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .event-card-face--back {
    display: none;
  }

  .event-card-flip {
    transform: none !important;
  }

  .event-caption-panel--mobile {
    display: flex;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid transparent;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      margin-top 0.25s ease,
      padding-top 0.25s ease,
      border-color 0.25s ease;
  }

  .event-card--expanded .event-caption-panel--mobile {
    max-height: 420px;
    opacity: 1;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top-color: var(--border);
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-card-flip {
    transition: none;
  }

  .event-card--flipped .event-card-flip {
    transform: none;
  }

  .event-card--flipped .event-card-face--front {
    display: none;
  }

  .event-card--flipped .event-card-face--back {
    position: relative;
    inset: auto;
    transform: none;
    display: flex;
  }

  .event-caption-panel--mobile {
    transition: none;
  }
}

.event-cover {
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1a2e 100%);
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
  aspect-ratio: 4 / 5;
  width: 100%;
}

.event-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(10, 6, 20, 0.35) 100%
  );
  z-index: 1;
}

.event-cover.has-video {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1a2e;
}

.event-cover-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #0d1a2e;
}

.event-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1a2e 100%);
}

.event-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  line-height: normal;
  font-family: var(--font-display);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.1em;
}

.event-date-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.78);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  line-height: 1.25;
}

.event-date-badge--relative {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
}

.event-date-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.event-date-sub {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
}

.event-date-badge--countdown .event-date-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.event-date-countdown-prefix {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(160, 240, 255, 0.92);
}

.event-date-countdown-time {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow:
    0 0 12px rgba(0, 229, 255, 0.75),
    0 0 24px rgba(0, 229, 255, 0.35);
}

.event-date-badge--countdown {
  border-width: 1.5px;
  border-color: rgba(0, 229, 255, 0.65);
  background: linear-gradient(135deg, rgba(0, 58, 72, 0.94) 0%, rgba(0, 24, 36, 0.92) 100%);
  padding: 0.5rem 0.9rem;
  animation: event-countdown-badge-pulse 1.25s ease-in-out infinite;
}

.event-date-badge--countdown .event-date-sub {
  color: rgba(190, 245, 255, 0.95);
  opacity: 1;
}

.event-date-badge--countdown-urgent {
  animation-duration: 0.9s;
}

.event-date-badge--countdown-critical {
  animation-duration: 0.55s;
  background: linear-gradient(135deg, rgba(0, 72, 88, 0.96) 0%, rgba(0, 32, 48, 0.94) 100%);
}

.event-date-badge--countdown-critical .event-date-countdown-time {
  text-shadow:
    0 0 16px rgba(0, 229, 255, 1),
    0 0 32px rgba(0, 229, 255, 0.55);
}

.event-date-badge--ongoing {
  border-width: 1.5px;
  border-color: rgba(255, 45, 149, 0.75);
  background: linear-gradient(135deg, rgba(130, 16, 65, 0.94) 0%, rgba(55, 8, 32, 0.9) 100%);
  padding: 0.55rem 0.95rem;
  animation: event-badge-pulse 1.15s ease-in-out infinite;
}

.event-date-badge--ongoing .event-date-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 45, 149, 0.95),
    0 0 24px rgba(255, 45, 149, 0.55);
}

.event-date-badge--ongoing .event-date-label::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow:
    0 0 8px var(--neon-pink),
    0 0 18px rgba(255, 45, 149, 0.85);
  animation: event-live-dot-blink 0.9s ease-in-out infinite;
  flex-shrink: 0;
}

.event-date-badge--ongoing .event-date-sub {
  color: rgba(255, 220, 235, 0.95);
  opacity: 1;
  font-weight: 600;
}

.event-card--ongoing .event-cover::after {
  background: linear-gradient(
    180deg,
    rgba(255, 45, 149, 0.18) 0%,
    transparent 42%,
    rgba(10, 6, 20, 0.38) 100%
  );
}

.event-card--ongoing {
  border-width: 1.5px;
  border-color: rgba(255, 45, 149, 0.7);
  animation: event-card-ongoing-pulse 1.6s ease-in-out infinite;
  box-shadow:
    0 0 28px rgba(255, 45, 149, 0.28),
    0 0 56px rgba(255, 45, 149, 0.1),
    inset 0 0 28px rgba(255, 45, 149, 0.05);
}

.event-card--ongoing:hover {
  border-color: rgba(255, 45, 149, 0.95);
}

.event-card--countdown {
  border-width: 1.5px;
  border-color: rgba(0, 229, 255, 0.4);
  animation: event-card-countdown-pulse 2s ease-in-out infinite;
  box-shadow:
    0 0 22px rgba(0, 229, 255, 0.12),
    inset 0 0 20px rgba(0, 229, 255, 0.04);
}

.event-card--countdown .event-cover::after {
  background: linear-gradient(
    180deg,
    rgba(0, 229, 255, 0.14) 0%,
    transparent 42%,
    rgba(10, 6, 20, 0.38) 100%
  );
}

.event-card--countdown-urgent {
  animation-duration: 1.4s;
}

.event-card--countdown-critical {
  animation-duration: 0.9s;
  border-color: rgba(0, 229, 255, 0.75);
}

.event-meta-countdown {
  color: var(--neon-cyan) !important;
  font-variant-numeric: tabular-nums;
}

.timing-demo-note {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.08);
  border: 1px dashed rgba(0, 229, 255, 0.35);
  border-radius: var(--radius);
}

.timing-demo-note--blocked {
  color: #ffb4d0;
  background: rgba(255, 45, 149, 0.1);
  border-color: rgba(255, 45, 149, 0.35);
}

@keyframes event-countdown-badge-pulse {
  0%,
  100% {
    border-color: rgba(0, 229, 255, 0.5);
  }
  50% {
    border-color: rgba(0, 229, 255, 1);
  }
}

@keyframes event-card-countdown-pulse {
  0%,
  100% {
    border-color: rgba(0, 229, 255, 0.35);
  }
  50% {
    border-color: rgba(0, 229, 255, 0.72);
  }
}

@keyframes event-badge-pulse {
  0%,
  100% {
    border-color: rgba(255, 45, 149, 0.65);
  }
  50% {
    border-color: rgba(255, 45, 149, 1);
  }
}

@keyframes event-card-ongoing-pulse {
  0%,
  100% {
    border-color: rgba(255, 45, 149, 0.55);
  }
  50% {
    border-color: rgba(255, 45, 149, 0.95);
  }
}

@keyframes event-live-dot-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

@keyframes event-meta-live-pulse {
  0%,
  100% {
    border-color: rgba(255, 45, 149, 0.45);
  }
  50% {
    border-color: rgba(255, 45, 149, 0.85);
  }
}

body.animations-paused .marquee-content,
body.animations-paused .music-play-btn.is-playing,
body.animations-paused .event-card--ongoing,
body.animations-paused .event-card--countdown,
body.animations-paused .event-date-badge--ongoing,
body.animations-paused .event-date-badge--countdown,
body.animations-paused .event-date-badge--ongoing .event-date-label::before {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-content,
  .event-card--ongoing,
  .event-card--countdown,
  .event-date-badge--ongoing,
  .event-date-badge--countdown,
  .event-date-badge--ongoing .event-date-label::before {
    animation: none !important;
  }
}

.event-body {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.event-body-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

.event-venue {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.event-meta span::before {
  content: "· ";
  opacity: 0.4;
}

.event-meta span:first-child::before {
  content: "";
}

.event-meta span.event-meta-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 45, 149, 0.22);
  border: 1px solid rgba(255, 45, 149, 0.55);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 12px rgba(255, 45, 149, 0.7);
  animation: event-meta-live-pulse 1.3s ease-in-out infinite;
}

.event-meta span.event-meta-live::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink), 0 0 14px rgba(255, 45, 149, 0.75);
  animation: event-live-dot-blink 0.9s ease-in-out infinite;
  opacity: 1;
}

.event-djs {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.event-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.genre-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(180, 77, 255, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(180, 77, 255, 0.25);
}

.event-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.75rem;
  flex-shrink: 0;
}

.event-link {
  width: auto;
  min-width: 0;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  box-sizing: border-box;
}

button.event-link {
  appearance: none;
  -webkit-appearance: none;
}

.event-link:hover {
  background: rgba(255, 45, 149, 0.15);
  border-color: var(--neon-pink);
}

.event-link.ig {
  border-color: rgba(255, 45, 149, 0.35);
  color: var(--neon-pink);
}

.event-link.navigate {
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--neon-cyan);
  font-weight: 600;
}

.event-link.navigate:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--neon-cyan);
}

.event-link.share {
  border-color: rgba(180, 77, 255, 0.45);
  color: var(--neon-purple);
  font-weight: 600;
}

.event-link.share:hover {
  background: rgba(180, 77, 255, 0.12);
  border-color: var(--neon-purple);
}

.event-link.calendar {
  border-color: rgba(168, 255, 96, 0.45);
  color: #a8ff60;
  font-weight: 600;
}

.event-link.calendar:hover {
  background: rgba(168, 255, 96, 0.12);
  border-color: #a8ff60;
}

.event-link.ticket {
  border-color: rgba(255, 213, 79, 0.45);
  color: #ffd54f;
  font-weight: 600;
}

.event-link.ticket:hover {
  background: rgba(255, 213, 79, 0.12);
  border-color: #ffd54f;
}

.event-link--disabled,
.event-link--disabled:hover {
  opacity: 0.32;
  pointer-events: none;
  cursor: default;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.share-toast {
  position: fixed;
  bottom: calc(var(--ad-h, 56px) + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  z-index: 300;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(20, 12, 32, 0.95);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bottom ad banner */
.ad-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 180;
  height: var(--ad-h);
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #0f0818, #150d22, #0f0818);
  border-top: 1px solid var(--border);
}

.ad-nav {
  flex-shrink: 0;
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.ad-nav:hover {
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.06);
}

.ad-slide {
  flex: 1;
  text-decoration: none;
  color: inherit;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
}

.ad-tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--neon-pink);
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(255, 45, 149, 0.35);
  border-radius: 4px;
}

.ad-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ad-text strong {
  font-size: 0.95rem;
}

.ad-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ad-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.ad-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
}

.ad-dot.active {
  background: var(--neon-cyan);
}

@media (max-width: 900px) {
  :root {
    --ad-h: 43px; /* 54px × 0.8 */
  }

  .ad-inner {
    gap: 0.6rem;
    padding: 0 0.6rem;
  }

  .ad-dots {
    bottom: 3px;
  }
}

.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 600px) {
  .music-progress {
    gap: 0.35rem;
  }

  .music-time {
    font-size: 0.62rem;
    min-width: 2rem;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-date-badge {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
  }

  .event-date-label {
    font-size: 1.05rem;
  }

  .event-date-sub {
    font-size: 0.78rem;
  }

  .ad-text strong {
    font-size: 0.85rem;
  }
}
