/* ============================================================
   LA Chronicle — style.css
   ============================================================ */

:root {
  --bg:             #0d0d0d;
  --card-bg:        #1a1a1a;
  --accent:         #E8392A;  /* brand identity — wordmark, focus ring, active states */
  --accent-strong:  #C42E1E;  /* button fills with white text (WCAG AA: 5.6:1) */
  --accent-text:    #FF5C45;  /* accent text on dark surfaces (WCAG AA: 5.7:1) */
  --accent-strong-hover: #A8281A;  /* darker hover for accent-strong fills (white-on stays AA) */
  --text-primary:   #ffffff;
  --text-secondary: #9a9a9a;
  --text-tertiary:  #cccccc;  /* brighter body/address copy */
  --text-muted:     #8a8a8a;  /* inactive controls + sheet section labels */
  --border:         #2a2a2a;
  --border-light:   #333333;

  --header-height:    56px;
  --genre-bar-height: 44px;
  --week-strip-height:68px;
  --footer-height:    40px;
  --safe-top:         env(safe-area-inset-top, 0px);
  --safe-bottom:      env(safe-area-inset-bottom, 0px);

  --sticky-top:  calc(var(--header-height) + var(--safe-top));
  --content-top: calc(var(--sticky-top) + var(--genre-bar-height) + var(--week-strip-height));

  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.5);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ── Header ─────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #0d0d0d;
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
  display: flex;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: 480px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.app-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.app-title span { color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--text-primary); background: var(--border); }
.icon-btn:active { background: var(--border-light); }

#calendarPicker {
  position: fixed;
  top: 56px; left: 50%;
  opacity: 0; width: 1px; height: 1px;
}

/* ── Genre Bar ───────────────────────────────────────────── */
.genre-bar-wrap {
  position: sticky;
  top: var(--sticky-top);
  z-index: 90;
  background: rgba(13,13,13,0.97);
  border-bottom: 1px solid var(--border);
}
.genre-bar {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px max(12px, calc(50% - 228px));
  gap: 6px;
  height: var(--genre-bar-height);
  align-items: center;
}
.genre-bar::-webkit-scrollbar { display: none; }
.genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid #444;
  font-size: 12px;
  font-weight: 600;
  color: #bbb;
  background: #1c1c1c;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.genre-chip:hover { color: var(--text-primary); border-color: #666; }
.genre-chip.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(232,57,42,0.1);
}
.genre-chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Week Strip ──────────────────────────────────────────── */
.week-strip-wrap {
  position: sticky;
  top: calc(var(--sticky-top) + var(--genre-bar-height));
  z-index: 89;
  background: rgba(13,13,13,0.97);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  overflow: hidden;
  padding: 0 max(8px, calc(50% - 228px));
}

/* Hide prev/next arrow buttons — scrolling replaces them */
#prevWeekBtn, #nextWeekBtn { display: none !important; }

.month-label-btn {
  flex: 0 0 100%;           /* takes the full top line */
  order: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 6px 2px 2px;
  border-radius: 6px;
  text-align: left;
  transition: color 0.15s;
}
.month-label-btn:hover { color: var(--text-primary); }

.today-btn {
  order: 1;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(232,57,42,0.4);
  background: rgba(232,57,42,0.1);
  margin-right: 4px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.today-btn:active { background: rgba(232,57,42,0.2); }

/* Scrollable chip track — only this element scrolls */
.week-strip {
  order: 1;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 4px 0 6px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}
.week-strip::-webkit-scrollbar { display: none; }

/* Day chips — same visual system as genre chips */
.week-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid #444;
  background: #1c1c1c;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 44px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.week-chip:hover { border-color: #666; }
.week-chip.active {
  border-color: var(--accent);
  background: rgba(232,57,42,0.18);
}

.strip-day-name {
  font-size: 9px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.week-chip.active .strip-day-name { color: var(--text-primary); }

.strip-day-num {
  font-size: 15px;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1;
}
.week-chip.is-today .strip-day-num { color: var(--accent-text); }
.week-chip.active .strip-day-num { color: var(--text-primary); }

.strip-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
  margin-top: 2px;
}
.strip-dot.unseen { opacity: 1; }
.week-chip.active .strip-dot { background: rgba(255,255,255,0.8); }

/* ── Main Content ───────────────────────────────────────── */
.main-content {
  padding-top: calc(var(--sticky-top) + 14px);
  padding-bottom: calc(var(--footer-height) + var(--safe-bottom) + 16px);
  padding-left: max(16px, calc(50% - 224px));
  padding-right: max(16px, calc(50% - 224px));
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

.venue-grid { display: flex; flex-direction: column; }

/* ── Category Sections ──────────────────────────────────── */
.cat-section { margin-bottom: 6px; }

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 2px;
  -webkit-tap-highlight-color: transparent;
}

.cat-header-left { display: flex; align-items: center; gap: 8px; }

.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.cat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cat-count { font-size: 12px; color: var(--text-secondary); }

.cat-chevron {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.cat-chevron.rotated { transform: rotate(-90deg); }

.cat-body { overflow: hidden; }
.cat-body.collapsed { display: none; }

/* ── Venue Card ─────────────────────────────────────────── */
.venue-card {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-card);
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.venue-card:last-child { margin-bottom: 4px; }
.venue-card:active { transform: scale(0.985); border-color: rgba(255,255,255,0.18); }

/* image placeholder / photo header */
.card-img {
  width: 100%;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-img.has-photo { height: 150px; }

/* actual photo inside the card header */
.card-img-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* gradient overlay so text stays readable over any photo */
.card-img.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* keep badge + label above the photo and overlay */
.card-img .card-cat-badge { z-index: 2; }

.card-img.has-photo .card-img-label {
  position: relative;
  z-index: 2;
  opacity: 0.9;
  color: #fff;
}

.card-img-icon {
  font-size: 30px;
  opacity: 0.5;
}

.card-img-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1px;
  opacity: 0.7;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 0 8px;
}

.card-img.has-photo .card-img-label {
  font-size: 14px;
  opacity: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.card-cat-badge {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* position:relative is required: .card-img is a positioned sibling, so without
   its own paint context the card-body fails to rasterize once .card-img holds a
   composited photo layer (Chrome paints the positioned .card-img over it). */
.card-body { padding: 11px 14px 13px; position: relative; }

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 8px;
}

.venue-name-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-hood {
  font-size: 9px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.event-item { padding-top: 2px; }

.event-divider { height: 1px; background: var(--border); margin: 10px 0; }

.event-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* rendered as a <button> so it's the keyboard control that opens the sheet */
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.event-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.event-time {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-price { font-size: 13px; font-weight: 700; color: var(--accent-text); }
.event-price.free { color: #4caf7d; }
.event-price.sold-out { color: var(--accent-text); }
.event-price.muted { color: var(--text-secondary); }

.event-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge-low  { background: rgba(232,144,58,0.18); color: #e8903a; }
.badge-muted { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

.btn-muted {
  background: var(--border) !important;
  color: var(--text-secondary) !important;
  cursor: default;
  pointer-events: none;
}

.event-actions { display: flex; gap: 8px; }

.btn-directions,
.btn-tickets {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  flex: 1;
}

.btn-directions {
  background: var(--border);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-directions:hover { background: var(--border-light); }
.btn-directions:active { transform: scale(0.93); opacity: 0.85; }

.btn-tickets {
  background: var(--accent-strong);
  color: #fff;
  flex: 1.4;
}
.btn-tickets:hover { background: var(--accent-strong-hover); }
.btn-tickets:active { transform: scale(0.93); opacity: 0.9; }

.more-events-tag {
  font-size: 11px;
  color: var(--text-secondary);
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Skeleton Loading ───────────────────────────────────── */
.loading-state { display: none; flex-direction: column; }

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 14px 16px;
  margin-bottom: 10px;
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.4s infinite ease-in-out;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-venue  { width: 45%; height: 10px; margin-bottom: 8px; }
.skeleton-title  { width: 90%; height: 18px; margin-bottom: 6px; }
.skeleton-title.short { width: 65%; }

.skeleton-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

.skeleton-meta  { width: 80px;  height: 12px; }
.skeleton-price { width: 50px;  height: 13px; }
.skeleton-btn   { flex: 1; height: 44px; border-radius: var(--radius-pill); }

/* ── Empty State (placeholder card) ─────────────────────── */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 28px;
  gap: 10px;
  margin-top: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.empty-icon { color: var(--text-muted); opacity: 0.7; margin-bottom: 4px; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.empty-sub { font-size: 14px; color: var(--text-secondary); max-width: 240px; line-height: 1.5; }

/* ── Error State ────────────────────────────────────────── */
.error-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  gap: 12px;
}
.retry-btn {
  margin-top: 4px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent-strong);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, transform 0.12s;
}
.retry-btn:hover { background: var(--accent-strong-hover); }
.retry-btn:active { transform: scale(0.96); }

/* ── Footer ─────────────────────────────────────────────── */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--footer-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  border-top: 1px solid var(--border);
  z-index: 80;
}

.powered-by { font-size: 11px; color: var(--text-secondary); }

/* ── Search Overlay ─────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  padding-top: calc(var(--safe-top));
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.search-overlay.open {
  transform: translateY(0);
  pointer-events: all;
}

.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
}
.search-icon-inline {
  flex-shrink: 0;
  color: var(--text-muted);
}
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 17px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-close-btn {
  font-size: 15px;
  color: var(--accent-text);
  white-space: nowrap;
  padding: 4px 0 4px 8px;
}

.search-suggest {
  list-style: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-suggest:empty { border-bottom: none; }
.search-suggest li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.search-suggest li:last-child { border-bottom: none; }
.search-suggest li:active { background: var(--card-bg); }
.search-suggest li svg { flex-shrink: 0; color: var(--text-muted); }

.search-results {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 0 calc(var(--footer-height) + var(--safe-bottom) + 16px);
}
.search-results-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}
.search-date-group { padding: 0 16px; }
.search-date-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 0 8px;
}

/* ── Bottom Sheet ───────────────────────────────────────── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.detail-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #111;
  border-radius: 20px 20px 0 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.detail-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: #333;
  border-radius: 2px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.sheet-img {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  position: relative;
  flex-shrink: 0;
}

.sheet-close,
.sheet-close-btn {
  position: absolute;
  top: 10px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.sheet-close:hover,
.sheet-close-btn:hover { background: rgba(0,0,0,0.75); }

/* sheet header photo */
.sheet-img.has-photo { height: 200px; }
.sheet-img-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.sheet-img.has-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}
.sheet-img .sheet-cat-badge { z-index: 2; }
.sheet-img-venue {
  font-size: 15px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-align: center;
  position: relative; z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  padding: 0 16px;
}

.sheet-cat-badge {
  position: absolute;
  top: 10px; left: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sheet-body {
  overflow-y: auto;
  flex: 1;
  padding: 4px 16px calc(var(--safe-bottom) + 24px);
  -webkit-overflow-scrolling: touch;
}
.sheet-body::-webkit-scrollbar { width: 3px; }
.sheet-body::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

.s-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 12px 0 3px;
}

.s-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.s-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 16px 0 7px;
}

.s-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }
.s-event-desc { margin-bottom: 4px; }

/* Genre / age / duration tags */
.s-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.s-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: var(--text-secondary);
}
.s-tag-age { background: rgba(232,57,42,.15); color: #e8392a; }

/* Performers list */
.s-performers { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.s-perf {
  font-size: 13px; color: var(--text-primary);
  display: flex; align-items: baseline; gap: 4px;
  text-decoration: none;
}
a.s-perf { color: #4a9eff; }
a.s-perf:hover { text-decoration: underline; }
.s-perf-role { font-size: 11px; color: var(--text-secondary); text-transform: capitalize; }

.addr-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.addr-text { font-size: 12px; color: var(--text-tertiary); flex: 1; line-height: 1.4; }

.copy-btn {
  background: none;
  border: 1px solid var(--border-light);
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--text-secondary); border-color: #555; }
.copy-btn.copied { color: #4caf7d; border-color: #4caf7d; }

.maps-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  margin-bottom: 14px;
  transition: border-color 0.15s;
}
.maps-link-btn:hover { border-color: #444; }
.maps-link-btn:active { transform: scale(0.98); }

.show-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #1e1e1e;
}
.show-row:last-child { border-bottom: none; }
.show-row-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.show-row-time { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.show-row-price { font-size: 13px; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.show-row-price.free { color: #4caf7d; }

.seat-row {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  gap: 10px;
}
.seat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.seat-info { flex: 1; }
.seat-type { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.seat-avail { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }
.seat-price { font-size: 13px; font-weight: 700; color: var(--accent-text); white-space: nowrap; }

.map-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}
.map-box-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent-strong);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  transition: background 0.15s, transform 0.12s;
}
.buy-btn:hover { background: var(--accent-strong-hover); }
.buy-btn:active { transform: scale(0.97); }

/* ── Desktop centering ──────────────────────────────────── */
@media (min-width: 520px) {
  body { background: #050505; }

  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 100dvh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    z-index: 0;
    pointer-events: none;
  }
}

/* ── Accessibility ──────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html, body { overflow-x: hidden; }

/* ── View Toggle ─────────────────────────────────────────── */
.view-toggle {
  display: flex;
  background: #1a1a1a;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.view-btn {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.view-btn.active { background: var(--accent); color: #fff; }
.view-btn:not(.active):hover { color: var(--text-secondary); }

/* ── View Panels ────────────────────────────────────────── */
.view-panel { display: flex; flex-direction: column; }

/* ── Timeline View ───────────────────────────────────────── */
.tl-band { margin-bottom: 4px; }
.tl-band-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 0 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tl-band-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.tl-event-group { margin-bottom: 8px; }
.tl-event-group.side-by-side {
  display: flex;
  gap: 8px;
}
.tl-event-group.side-by-side .tl-event { flex: 1; min-width: 0; }
.tl-event {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-card);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 0;
  min-height: 90px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.tl-event:active { transform: scale(0.97); border-color: rgba(255,255,255,0.18); }
.tl-event-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}
.tl-cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tl-event-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl-event-venue {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-event-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.tl-event-price.free { color: #4caf7d; }
.tl-sold-out {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(232,57,42,0.15);
  color: var(--accent-text);
}
.tl-overflow {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tl-overflow:hover { border-color: #555; background: #1e1e1e; }
.tl-overflow:active { transform: scale(0.98); }
.tl-overflow-chevron {
  font-size: 14px;
  opacity: 0.6;
  line-height: 1;
}

/* ── Day View empty venues ───────────────────────────────── */
.day-empty-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 0 8px;
}
.day-empty-venue {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 11px 14px;
  margin-bottom: 6px;
  opacity: 0.45;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.day-empty-venue-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.day-empty-venue-note {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Week View ───────────────────────────────────────────── */
.week-genre-prompt {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.week-genre-prompt strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.week-genre-prompt .prompt-arrow {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
  opacity: 0.6;
}
.week-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.week-grid { min-width: 100%; }
.wg-header {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: var(--content-top);
  z-index: 5;
}
.wg-header-cell {
  text-align: center;
  padding: 6px 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}
.wg-header-cell.is-today { color: var(--accent); }
.wg-header-cell.is-selected { color: var(--text-primary); font-weight: 700; }
.wg-row {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  min-height: 38px;
  align-items: center;
}
.wg-venue-cell {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 6px;
  line-height: 1.3;
  border-right: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wg-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  cursor: pointer;
  min-height: 38px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.wg-cell:active { background: #1a1a1a; }
.wg-cell.is-selected-day { background: rgba(232,57,42,0.08); }
.wg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
