/* Wavefind: black, white and one violet accent. Big uppercase display type,
   Inter for reading, white pill tags with a violet dot. */
:root {
  --bg: #000;
  --surface: #0c0c0e;
  --surface-2: #17171b;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #fff;
  --muted: #a3a3ad;
  --accent: #8a2be2;
  --accent-soft: rgba(138, 43, 226, 0.5);
  --warn: #ffb547;
  --display: "Boldonse", "Arial Black", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --tabs-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--body);
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
a { color: var(--text); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); margin: 0 0 20px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); flex: none; }

.display {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1.35; margin: 8px 0 10px;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .92), rgba(0, 0, 0, .7));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  background: none; border: 0; padding: 0;
  font-family: var(--display); text-transform: uppercase; font-size: 1.15rem; letter-spacing: -0.02em;
}
.topnav {
  display: none; gap: 2px; padding: 4px;
  background: rgba(60, 60, 70, .55); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.topnav button {
  background: none; border: 0; border-radius: 4px; padding: 7px 14px;
  text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; color: rgba(255, 255, 255, .78);
}
.topnav button:hover { color: #fff; }
.topnav button.on { background: rgba(255, 255, 255, .14); color: #fff; }

.btn-light, .primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #000; border: 0; border-radius: var(--radius);
  padding: 9px 16px; text-transform: uppercase; font-size: .85rem; font-weight: 500; letter-spacing: .03em;
  text-decoration: none;
}
.btn-light:hover, .primary:hover { background: #e9e9ee; }

/* ---------- layout ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 16px 32px; }
.view { display: none; padding-top: 28px; }
.view.active { display: block; }
#view-events { padding-top: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  /* full-bleed band, content lined up with the page column */
  margin: 0 calc(50% - 50vw) 24px; padding: 56px max(16px, calc((100vw - 1120px) / 2 + 16px)) 44px;
  background:
    radial-gradient(60% 70% at 18% 20%, rgba(214, 90, 255, .55), transparent 70%),
    radial-gradient(50% 60% at 85% 10%, rgba(255, 92, 170, .38), transparent 70%),
    radial-gradient(70% 80% at 60% 100%, rgba(138, 43, 226, .45), transparent 70%),
    #07000d;
}
.hero::after { /* soft fade into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; color: rgba(255, 255, 255, .85); }
.hero h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 11vw, 6rem); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 18px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
.lede { max-width: 34rem; font-size: 1.05rem; color: rgba(255, 255, 255, .88); margin: 0; }

.notice {
  border: 1px solid rgba(255, 181, 71, .4); color: #ffd9a0; background: rgba(255, 181, 71, .08);
  border-radius: var(--radius); padding: 10px 14px; font-size: .9rem; margin-bottom: 14px;
}

/* ---------- search + filters ---------- */
input[type=search] {
  width: 100%; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 16px; font-family: var(--body);
}
input[type=search]::placeholder { color: #77777f; }
input[type=search]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.chips { display: flex; gap: 8px; margin: 12px 0 0; }
.chips.scroll { overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  text-transform: uppercase; font-size: .76rem; letter-spacing: .05em; color: rgba(255, 255, 255, .8);
}
.chip:hover { border-color: #fff; color: #fff; }
.chip.on { background: #fff; border-color: #fff; color: #000; font-weight: 600; }
.chip.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- event list ---------- */
.list { display: grid; gap: 0; margin-top: 22px; }
.count { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.day-label {
  font-family: var(--display); text-transform: uppercase; font-size: clamp(1.15rem, 4.5vw, 1.7rem);
  line-height: 1.3; padding: 34px 0 14px; border-bottom: 1px solid var(--line-strong);
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ev {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: start;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 22px 0;
}
.ev-main { cursor: pointer; min-width: 0; }
.ev-side { grid-column: 1; cursor: pointer; min-width: 0; }
.ev .save { grid-column: 2; grid-row: 1; }
.ev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #000;
  border-radius: 999px; padding: 4px 12px 4px 10px; font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.pill-warn { background: transparent; color: var(--warn); border: 1px solid rgba(255, 181, 71, .5); padding: 3px 10px; }
.when { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.ev-title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1rem, 4.2vw, 1.45rem); line-height: 1.45; letter-spacing: -0.01em; margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-main:hover .ev-title { color: #e7d4ff; }
.ev-venue { margin: 0 0 4px; font-size: 1rem; }
.ev-venue span { color: var(--muted); }
.ev-venue span::before { content: " · "; }
.meta { color: var(--muted); font-size: .9rem; margin: 0; }
.meta.genres { text-transform: lowercase; }
.stars-inline { display: inline-block; margin-top: 6px; color: var(--warn); font-size: .85rem; letter-spacing: 2px; }
.save { background: none; border: 1px solid var(--line-strong); border-radius: 50%; width: 44px; height: 44px; font-size: 1.15rem; line-height: 1; color: #fff; }
.save:hover { border-color: #fff; }
.save.on { background: #fff; color: var(--accent); border-color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 56px 12px; text-transform: uppercase; font-size: .85rem; letter-spacing: .06em; }
.credit { color: var(--muted); font-size: .82rem; text-align: center; margin: 28px 4px 0; }

/* ---------- sources ---------- */
.group-title { margin: 26px 0 8px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
#sourceList { gap: 10px; margin-top: 0; }
.source { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
a.source:hover { border-color: #fff; }
.source h3 { font-size: 1rem; font-weight: 600; }
.source p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.source .go { font-size: 1.2rem; }

/* ---------- safety (white section) ---------- */
.view.invert {
  background: #fff; color: #000; margin: 0 -16px; padding: 36px 16px 40px; min-height: calc(100vh - 140px);
  --muted: #5c5c66; --line: rgba(0, 0, 0, .1);
  color-scheme: light;
  box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); /* full-bleed white band */
}
.invert a { color: #000; }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 0; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.checklist input { width: 22px; height: 22px; accent-color: var(--accent); margin-top: 1px; flex: none; }
.checklist small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.invert .card { background: #f3f3f5; border-color: transparent; }
.invert h3 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 1rem; margin: 0 0 10px; }
.links { margin: 0; padding-left: 18px; }
.links li { margin: 8px 0; }

/* ---------- bottom tabs (phones) ---------- */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(0, 0, 0, .94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabs button {
  background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #8a8a94;
}
.tabs button span { font-size: 1.05rem; }
.tabs button.on { color: #fff; }
.tabs button.on span { color: var(--accent); }

/* ---------- event sheet ---------- */
dialog {
  width: 100%; max-width: 720px; margin: auto auto 0; padding: 0;
  background: #0b0b0d; color: var(--text); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 14px 14px 0 0; max-height: 90vh;
}
dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.sheet-inner { padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); }
.sheet-title { font-size: clamp(1.25rem, 5vw, 1.8rem); margin: 4px 48px 14px 0; overflow-wrap: anywhere; }
.sheet-inner .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-inner .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: rgba(255, 255, 255, .85); }
.sheet-inner .tag.genre:first-child { background: #fff; color: #000; border-color: #fff; }
.sheet-inner .tag.ug { color: var(--warn); border-color: rgba(255, 181, 71, .5); }
.sheet-inner h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: .8rem; margin: 22px 0 6px !important; }
.sheet-row { display: flex; gap: 12px; margin: 12px 0; }
.sheet-row > span:first-child { width: 20px; text-align: center; color: var(--muted); flex: none; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sheet-links a {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); text-decoration: none;
}
.sheet-links a:first-child { background: #fff; color: #000; border-color: #fff; }
.rate { display: flex; gap: 2px; margin: 4px 0; }
.rate button { background: none; border: 0; font-size: 1.9rem; color: #2e2e36; padding: 0 2px; min-width: 40px; min-height: 44px; }
.rate button.on { color: var(--warn); }
textarea {
  width: 100%; min-height: 76px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); padding: 12px; font: inherit; font-size: 16px;
}
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sheet-actions .ghost {
  background: transparent; border: 1px solid var(--line-strong); color: #fff; border-radius: var(--radius);
  padding: 12px; text-transform: uppercase; font-size: .85rem; letter-spacing: .03em;
}
.sheet-actions .primary { padding: 12px; }
.close-x { position: absolute; top: 18px; right: 18px; background: #fff; color: #000; border: 0; border-radius: 50%; width: 36px; height: 36px; }
.sheet-inner { position: relative; }
.sheet-inner .notice { margin-top: 14px; }

/* ---------- desktop ---------- */
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .tabs { display: none; }
  .topnav { display: flex; }
  .top { padding: 14px 28px; display: grid; grid-template-columns: 1fr auto 1fr; }
  .wordmark { justify-self: start; }
  #installBtn { justify-self: end; }
  main { padding: 0 28px 48px; }
  .hero { margin-bottom: 28px; padding: 96px max(28px, calc((100vw - 1120px) / 2 + 28px)) 72px; }
  .view.invert { margin: 0 -28px; padding: 56px 28px; }
  .ev { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto; gap: 0 40px; padding: 28px 0; }
  .ev-side { grid-column: 2; grid-row: 1; padding-top: 38px; }
  .ev .save { grid-column: 3; }
  dialog { margin: auto; border-radius: 14px; border-bottom: 1px solid var(--line); }
}

/* ---------- v0.4: account, details, videos, what's new ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 14px;
  text-transform: uppercase; font-size: .8rem; letter-spacing: .03em;
}
.btn-outline:hover { border-color: #fff; }
.btn-outline.wide { width: 100%; padding: 12px; margin-top: 24px; }
#accountBtn { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topnav .new-dot { margin-left: 8px; vertical-align: middle; }
.tabs button { position: relative; }
.tab-dot { position: absolute; top: 10px; right: calc(50% - 18px); }
.small { font-size: .8rem; }
.loading-line { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .loading-line { animation: none; } }

/* cards */
.ev-lineup { margin: 6px 0 0; font-size: .9rem; color: #e6e6ea; }
.ev-lineup span { color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; margin-right: 4px; }
.ev-explain { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.ev-explain b { color: #d9c2ff; font-weight: 600; text-transform: capitalize; }
.chip.fav:not(.on) { border-color: rgba(138, 43, 226, .8); }

/* sheet details */
.about { font-size: 1.02rem; line-height: 1.55; margin: 16px 0 6px; }
.flyer { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin: 14px 0 4px; background: var(--surface-2); }
.detail-desc { margin-top: 10px; }
.detail-desc .desc { white-space: pre-line; margin: 0; color: #dcdce2; font-size: .95rem; }
.detail-desc .desc.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.text-btn { background: none; border: 0; padding: 6px 0; color: #d9c2ff; text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.artist-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.videos { display: grid; gap: 10px; margin-top: 12px; }
.video { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; text-align: left; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.video .vt { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: .82rem; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
@media (min-width: 560px) { .videos { grid-template-columns: repeat(2, 1fr); } }

/* what's new */
.changelog { display: grid; gap: 0; }
.release { padding: 26px 0; border-bottom: 1px solid var(--line); }
.release-head { display: flex; gap: 12px; align-items: center; }
.release-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.05rem, 4vw, 1.4rem); line-height: 1.4; margin: 12px 0 8px; }
.release ul { margin: 0; padding-left: 20px; color: #dcdce2; }
.release li { margin: 6px 0; }

/* account */
.seg { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius); margin-bottom: 18px; }
.seg button { background: none; border: 0; padding: 8px 16px; border-radius: 4px; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; color: var(--muted); }
.seg button.on { background: #fff; color: #000; }
.form { display: grid; gap: 14px; max-width: 420px; }
.form label, .pref label, .pref-label { display: grid; gap: 6px; text-transform: uppercase; font-size: .74rem; letter-spacing: .08em; color: var(--muted); }
.form input, .pref select {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 12px 14px; text-transform: none; letter-spacing: 0;
}
.form input:focus, .pref select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .primary { padding: 13px; margin-top: 4px; }
.form-error { margin: 0; color: #ff8fa3; font-size: .9rem; }
.pref { margin: 22px 0 0; max-width: 560px; }
.chips.wrap { flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); max-width: 560px; }
.stats div { padding: 14px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
.stats span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.more-links { margin-top: 36px; border-top: 1px solid var(--line); max-width: 560px; }
.more-link { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 16px 0; text-transform: uppercase; font-size: .85rem; letter-spacing: .05em; text-align: left; }
.more-link span { flex: 1; }
@media (min-width: 860px) { .more-links { display: none; } }

/* ---------- v0.5: photo-led cards, flyer header, fold-out panels ---------- */
.ev-photo { display: none; cursor: pointer; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.ev-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ev:hover .ev-photo img { transform: scale(1.03); }
.ev.has-img .ev-photo { display: block; grid-column: 1 / -1; grid-row: 1; aspect-ratio: 16 / 9; margin-bottom: 10px; }
.ev.has-img .ev-main { grid-row: 2; }
.ev.has-img .save { grid-row: 2; }
.ev.has-img .ev-side { grid-row: 3; }
.ev-photo.ph {
  position: relative; place-items: end start; padding: 12px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(138, 43, 226, .55), transparent 60%), linear-gradient(160deg, #1a1a22, #070709);
}
.ev-photo.ph span { font-family: var(--display); text-transform: uppercase; font-size: .7rem; color: rgba(255, 255, 255, .75); line-height: 1.4; overflow-wrap: anywhere; }

.sheet-inner { padding: 0 0 calc(24px + env(safe-area-inset-bottom)); }
.sheet-pad { padding: 0 18px; }
.close-x { z-index: 2; box-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.sheet-hero {
  position: relative; min-height: 150px; display: flex; align-items: flex-end; overflow: hidden;
  background: radial-gradient(120% 100% at 100% 0%, rgba(138, 43, 226, .5), transparent 60%), linear-gradient(170deg, #17171d, #0b0b0d);
}
.sheet-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-hero.has-img { min-height: min(62vh, 440px); }
.sheet-hero.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(11, 11, 13, .7) 65%, #0b0b0d); }
.sheet-hero-text { position: relative; z-index: 1; padding: 64px 18px 6px; width: 100%; }
.sheet-hero .sheet-title { margin: 12px 0 8px; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 14px 0 4px; }
.facts > div { background: #0b0b0d; padding: 12px 14px; display: grid; gap: 4px; font-size: .95rem; }
@media (max-width: 520px) { .facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.facts .k { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.panel { border-top: 1px solid var(--line); }
.panel:last-of-type { border-bottom: 1px solid var(--line); }
.sheet-links + .panel { margin-top: 22px; }
.panel summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0; font-family: var(--display); text-transform: uppercase; font-size: .82rem; letter-spacing: .01em;
}
.panel summary::-webkit-details-marker { display: none; }
.panel summary i { position: relative; width: 14px; height: 14px; flex: none; }
.panel summary i::before, .panel summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: #fff; transition: transform .2s ease; }
.panel summary i::after { transform: rotate(90deg); }
.panel[open] summary i::after { transform: rotate(0deg); }
.panel summary:hover span { color: #e7d4ff; }
.panel summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.panel-body { padding: 0 0 20px; }
.panel-body .detail-desc { margin-top: 0; }
.tips { margin: 12px 0 4px; padding-left: 18px; color: #dcdce2; font-size: .92rem; }
.tips li { margin: 4px 0; }

@media (min-width: 860px) {
  .ev { grid-template-columns: 168px minmax(0, 1.35fr) minmax(0, 1fr) auto; gap: 0 32px; }
  .ev .ev-photo, .ev.has-img .ev-photo { display: grid; grid-column: 1; grid-row: 1; aspect-ratio: 1; margin: 0; align-self: start; }
  .ev.has-img .ev-photo { display: block; }
  .ev .ev-main, .ev.has-img .ev-main { grid-column: 2; grid-row: 1; }
  .ev .ev-side, .ev.has-img .ev-side { grid-column: 3; grid-row: 1; }
  .ev .save, .ev.has-img .save { grid-column: 4; grid-row: 1; }
  .sheet-pad { padding: 0 28px; }
  .sheet-hero-text { padding: 72px 28px 8px; }
}

/* ---------- v0.5.1: icon set + generative cover art ---------- */
.ic { display: inline-block; vertical-align: middle; flex: none; }
.save { display: grid; place-items: center; }
.save.on { color: #ff4fd8; }
.close-x { display: grid; place-items: center; }
.sheet-links a, .sheet-actions button, .more-link b, .source .go { display: inline-flex; align-items: center; gap: 7px; }
.sheet-actions button { justify-content: center; }
.sheet-links a .ic { opacity: .8; }
.facts .k { display: inline-flex; align-items: center; gap: 6px; }
.rate button { color: #2a2a33; display: inline-grid; place-items: center; }
.rate button.on { color: var(--warn); filter: drop-shadow(0 0 6px rgba(255, 181, 71, .45)); }
.video .play .ic { filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .7)); }
.tabs button span { display: grid; place-items: center; height: 24px; }
.tabs button.on span { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-soft)); }

/* A light film grain over the art keeps flat vectors from looking cheap. */
.ev-photo.ph, .hero-art { position: relative; overflow: hidden; }
.ev-photo.ph::after, .hero-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
.art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: transform .6s ease; }
.ev:hover .art { transform: scale(1.04); }
.ev-photo.ph { display: block; grid-column: 1 / -1; grid-row: 1; aspect-ratio: 3 / 1; margin-bottom: 10px; padding: 0; background: #000; }
.ev-photo.ph ~ .ev-main { grid-row: 2; }
.ev-photo.ph ~ .save { grid-row: 2; }
.ev-photo.ph ~ .ev-side { grid-row: 3; }
.ev-photo.ph span {
  position: absolute; left: 10px; bottom: 9px; z-index: 1; padding: 3px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); font-size: .62rem; letter-spacing: .04em; color: #fff;
}
.sheet-hero { background: #0b0b0d; }
.hero-art { position: absolute; inset: 0; }
.sheet-hero:not(.has-img) { min-height: min(42vh, 300px); }
.sheet-hero:not(.has-img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(11, 11, 13, .75) 70%, #0b0b0d); }
.sheet-hero.has-img .hero-art { display: none; }

@media (min-width: 860px) {
  .ev-photo.ph { aspect-ratio: 1; margin: 0; grid-column: 1; grid-row: 1; }
  .ev-photo.ph ~ .ev-main { grid-column: 2; grid-row: 1; }
  .ev-photo.ph ~ .ev-side { grid-column: 3; grid-row: 1; }
  .ev-photo.ph ~ .save { grid-column: 4; grid-row: 1; }
}

/* ---------- v0.6: past events + picks ---------- */
.rate-prompt { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); }
.for-you { margin: 18px 0 6px; }
.strip-head h2 { font-size: clamp(1.1rem, 4vw, 1.5rem); margin: 0; }
.strip-head .meta { margin: 4px 0 12px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.pick { all: unset; cursor: pointer; display: grid; gap: 6px; scroll-snap-align: start; min-width: 0; }
.pick-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #000; }
.pick-img img, .pick-img .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick:hover .pick-title { color: #e7d4ff; }
.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }
.pick-when { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pick-title { font-family: var(--display); text-transform: uppercase; font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-why { font-size: .8rem; color: #d9c2ff; }
/* Flyer cards carry the cover art underneath, shown only if the flyer fails to load. */
.ev-photo:not(.ph) > .art, .ev-photo:not(.ph) > span { display: none; }
.ev-photo > img { position: relative; z-index: 1; }
.load-more { display: block; width: 100%; margin: 18px 0 8px; padding: 14px; background: transparent; color: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }

/* ---------- v0.8: LGBTQ+ and recurring nights ---------- */
.rainbow { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: conic-gradient(#e40303, #ff8c00, #ffed00, #008026, #24408e, #732982, #5bcefa, #f5a9b8, #e40303); }
.chip-queer { border-color: rgba(255, 255, 255, .45); }
.chip-queer.on { background: #fff; color: #000; }
.chip-queer.on::before { display: none; }
.pill-queer { background: transparent; color: #fff; border: 1px solid transparent; padding: 3px 10px;
  background-image: linear-gradient(#000, #000), linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982);
  background-origin: border-box; background-clip: padding-box, border-box; }
.pill-ghost { background: transparent; color: #d9c2ff; border: 1px solid rgba(138, 43, 226, .6); padding: 3px 10px; }
.sheet-inner .tag.queer { border-color: transparent; background-image: linear-gradient(#0b0b0d, #0b0b0d), linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #24408e, #732982); background-origin: border-box; background-clip: padding-box, border-box; }

/* ---------- v0.9: add to home screen ---------- */
.install-btn { padding: 8px 12px; white-space: nowrap; }
@media (max-width: 380px) { .install-btn { padding: 8px 10px; font-size: .74rem; } .top-actions { gap: 6px; } }
.install-guide { padding: 26px 18px calc(24px + env(safe-area-inset-bottom)); }
.install-guide .eyebrow { margin: 0 56px 6px 0; }
.install-guide .meta { margin: 0 0 18px; }
.install-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: step; }
.install-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .03); line-height: 1.4; }
.install-steps .step-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; }
.install-hint { margin: 16px 0 0; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 6px; }

/* ---------- v0.10: feedback, privacy note, admin dashboard ---------- */
.account-extras { margin-top: 32px; max-width: 560px; display: grid; gap: 12px; justify-items: start; }
.account-extras .btn-light { padding: 10px 16px; }
.privacy-note { margin: 8px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.privacy-note b { color: var(--text); font-weight: 600; }
.feedback-cta { margin-top: 28px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form textarea {
  font: inherit; color: var(--text); background: #121216; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px; resize: vertical; min-height: 120px; text-transform: none; letter-spacing: normal; font-size: 1rem;
}
.form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#feedbackForm { max-width: none; }
#feedbackForm .seg { margin-bottom: 0; flex-wrap: wrap; }
#feedbackForm .seg button { padding: 8px 12px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 8px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: rgba(255, 255, 255, .03); display: grid; gap: 4px; }
.tile b { font-family: var(--display); font-size: 1.9rem; font-weight: 400; line-height: 1; }
.tile span { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile em { font-style: normal; font-size: .78rem; color: var(--muted); }
.admin-h { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: .9rem; letter-spacing: .04em; margin: 30px 0 10px; display: flex; align-items: center; gap: 10px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar i { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; min-height: 2px; background: #6b6b78; border-radius: 3px 3px 0 0; overflow: hidden; }
.bar s { display: block; width: 100%; background: var(--accent); text-decoration: none; }
.legend { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); margin: 8px 0 0; }
.legend .k { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .k-ret { background: #6b6b78; } .legend .k-new { background: var(--accent); margin-left: 8px; }
.legend .right { margin-left: auto; }
.admin-cols { display: grid; grid-template-columns: 1fr; gap: 0 32px; }
@media (min-width: 760px) { .admin-cols { grid-template-columns: 1fr 1fr; } }
.hbar { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 10px; padding: 6px 0; font-size: .88rem; }
.hbar i { height: 8px; background: rgba(255, 255, 255, .08); border-radius: 4px; overflow: hidden; }
.hbar s { display: block; height: 100%; background: var(--accent); text-decoration: none; }
.hbar b { text-align: right; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
.admin-table th { text-align: left; font-weight: 500; color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table code { font-size: .8rem; color: #d9c2ff; }
.fb-list { display: grid; gap: 10px; }
.fb { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: rgba(255, 255, 255, .03); }
.fb.done { opacity: .55; }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fb-msg { margin: 10px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.pill-bug { background: rgba(255, 92, 92, .16); color: #ff9c9c; border-color: rgba(255, 92, 92, .4); }

/* ---------- v0.11: native-style navigation ---------- */
.back-btn {
  display: inline-flex; align-items: center; gap: 2px; margin: -10px 0 10px -8px; padding: 8px 10px 8px 4px;
  background: none; border: 0; color: #d9c2ff; font-size: .95rem; border-radius: var(--radius);
}
.back-btn:active { background: rgba(255, 255, 255, .06); }
@media (min-width: 860px) { #view-updates .back-btn, #view-sources .back-btn { display: none; } }

/* Screen changes: inner screens slide in from the right, back slides from the left, tabs fade. */
.view.enter-fwd { animation: nav-fwd .32s cubic-bezier(.2, .8, .2, 1); }
.view.enter-back { animation: nav-back .32s cubic-bezier(.2, .8, .2, 1); }
.view.enter-tab { animation: nav-tab .2s ease-out; }
@keyframes nav-fwd { from { transform: translateX(30%); opacity: 0; } }
@keyframes nav-back { from { transform: translateX(-18%); opacity: 0; } }
@keyframes nav-tab { from { transform: translateY(6px); opacity: 0; } }
main { transition: transform .2s ease-out, opacity .2s ease-out; }
main.dragging { transition: none; box-shadow: -12px 0 24px rgba(0, 0, 0, .6); }
body { overflow-x: hidden; }

/* Sheets slide up, can be pulled down, and keep the page behind them still. */
#sheet { overscroll-behavior: contain; transition: transform .2s ease-out; }
#sheet.dragging { transition: none; }
#sheet[open] { animation: sheet-up .3s cubic-bezier(.2, .8, .2, 1); }
#sheet[open]::backdrop { animation: fade-in .25s ease-out; }
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
html:has(#sheet[open]) { overflow: hidden; }
@media (max-width: 859px) {
  #sheet::before {
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 5;
    width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35);
  }
}

/* Taps feel physical. */
.chip, .primary, .btn-light, .btn-outline, .ghost, .more-link, .seg button, .ev { transition: transform .12s ease-out; }
.chip:active, .primary:active, .btn-light:active, .btn-outline:active, .ghost:active, .seg button:active { transform: scale(.96); }
.ev:active { transform: scale(.985); }
.more-link:active { background: rgba(255, 255, 255, .04); }
.tabs button:active span { transform: scale(.88); }
.tabs button span { transition: transform .12s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .view.enter-fwd, .view.enter-back, .view.enter-tab, #sheet[open], #sheet[open]::backdrop { animation: none; }
}

/* ---------- v0.12: feedback status, replies, email reports ---------- */
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-actions .btn-outline { position: relative; }
.fb-dot { margin-left: 4px; }
.fb-status { display: flex; flex-wrap: wrap; margin: 12px 0 10px; }
.fb-status button { padding: 7px 10px; font-size: .72rem; }
.fb.st-working .fb-status [data-fbset=working].on { background: #d9c2ff; }
.fb.st-done .fb-status [data-fbset=done].on { background: #7ee2a8; }
.fb.st-wontdo .fb-status [data-fbset=wontdo].on { background: #c7c7cf; }
.fb-reply { display: grid; gap: 6px; text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; color: var(--muted); }
.fb-reply textarea {
  font: inherit; font-size: .95rem; text-transform: none; letter-spacing: normal; color: var(--text);
  background: #121216; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px; resize: vertical;
}
.fb-save { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.fb-save .btn-light { padding: 8px 14px; font-size: .78rem; }
.fb.st-done:not(.mine), .fb.st-wontdo:not(.mine) { opacity: .7; }
.status-pill { background: rgba(255, 255, 255, .1); color: #fff; }
.fb.st-working .status-pill { background: rgba(217, 194, 255, .18); color: #d9c2ff; }
.fb.st-done .status-pill { background: rgba(126, 226, 168, .16); color: #7ee2a8; }
.fb.st-wontdo .status-pill { background: rgba(255, 255, 255, .08); color: var(--muted); }
.updated-pill { background: transparent; color: #fff; border: 1px solid var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.fb-answer { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--accent); background: rgba(139, 61, 255, .08); border-radius: 0 var(--radius) var(--radius) 0; }
.fb-answer p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: rgba(255, 255, 255, .03); }
.report-box p { margin: 0; line-height: 1.5; }
.report-box code { color: #d9c2ff; }
