:root {
  --bg: #0f1115; --panel: #181b22; --panel2: #1f232c; --line: #2a2f3a;
  --text: #e8eaed; --dim: #9aa3af; --accent: #6ea8fe; --green: #3fb950;
  --red: #f85149; --gold: #e3b341; --pink: #db61a2;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: 40px;
}
.hidden { display: none !important; }

/* ── Sticky header + tabs so all vertical space scrolls songs ── */
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: #0c0e12; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 20px; }
.ghost {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 16px; font-size: 22px; cursor: pointer;
}
.ghost:active { background: var(--line); }

#app { max-width: 1200px; margin: 0 auto; padding: 14px 16px; }
.status { color: var(--dim); padding: 30px 8px; text-align: center; font-size: 18px; }

.event-card {
  background: linear-gradient(135deg, #20242e, #181b22);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 14px;
}
.event-card h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.15; }
.event-card .meta { color: var(--dim); font-size: 16px; }
.event-card .pills { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.pill { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }

.tabs {
  display: flex; gap: 10px; margin: 0 0 16px;
  position: sticky; top: 61px; z-index: 25; background: var(--bg); padding: 6px 0;
}
.tab {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  border-radius: 12px; padding: 14px; font-size: 17px; font-weight: 600; cursor: pointer;
}
.tab.active { color: var(--text); border-color: var(--accent); background: var(--panel2); }
.badge { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px;
  background: var(--green); color: #04210c; font-size: 13px; font-weight: 700; }

.cat-head {
  margin: 22px 0 10px; font-size: 14px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 7px;
  display: flex; align-items: center; gap: 8px;
}
.cat-head .cat-count { color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.cat-head.special { color: var(--gold); }
.cat-head.avoid { color: var(--red); }

/* ── Responsive song grid: 1 col on phones, 2–3 across on a tablet ── */
.song-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
/* Dance / special moments = one prominent full-width card each */
.song-grid.special { grid-template-columns: 1fr; }

.song {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column;
}
.song.played { opacity: .55; }
.song .row1 { display: flex; align-items: flex-start; gap: 12px; }
.song .info { flex: 1; min-width: 0; }
.song .title { font-weight: 700; font-size: 19px; line-height: 1.2; }
.song .artist { color: var(--dim); font-size: 15px; margin-top: 2px; }
.song .clientc { margin-top: 8px; font-size: 14px; color: var(--accent); font-style: italic; }
.song .clientc::before { content: "💬 "; }
.song .loc { font-size: 13px; color: var(--dim); margin-top: 3px; }

/* Special/dance cards: bigger title, gold accent stripe */
.song-grid.special .song { border-left: 4px solid var(--gold); padding: 18px 20px; }
.song-grid.special .title { font-size: 23px; }
.song-grid.avoid .song { border-left: 4px solid var(--red); }

.play-btn {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel2); color: var(--green);
  font-size: 26px; font-weight: 700;
}
.play-btn:active { transform: scale(.94); }
.play-btn.done { background: var(--green); color: #04210c; border-color: var(--green); }

.note-wrap { margin-top: 12px; }
.note-wrap textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; min-height: 42px;
}
.note-wrap textarea:focus { outline: none; border-color: var(--accent); }
.note-label { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.played-at { font-size: 13px; color: var(--green); margin-top: 8px; }
.empty { color: var(--dim); text-align: center; padding: 40px; font-size: 18px; }

/* ── Info tab ── */
.info-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 14px; }
.info-card h2 { margin: 0 0 12px; font-size: 18px; color: var(--gold); }
.info-list { margin: 0; }
.info-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { flex: 0 0 150px; color: var(--dim); font-size: 14px; }
.info-row dd { flex: 1; margin: 0; font-size: 17px; font-weight: 600; }
.contacts { display: flex; flex-direction: column; gap: 10px; }
.contact { display: block; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; color: var(--accent); text-decoration: none; font-size: 16px; }
.contact:active { background: var(--line); }
.info-note { color: var(--dim); font-size: 14px; background: var(--panel2); border: 1px dashed var(--line);
  border-radius: 12px; padding: 14px 16px; line-height: 1.5; }

/* ── Tablet portrait & up: scale type, more breathing room ── */
@media (min-width: 680px) {
  body { font-size: 18px; }
  #app { padding: 18px 24px; }
  .event-card h1 { font-size: 32px; }
  .tab { padding: 16px; font-size: 18px; }
  .song .title { font-size: 20px; }
  .song-grid.special .title { font-size: 26px; }
}
