/* Chad Just Drums: stage-black page, Clone Hero drum lane colours as the accent system */
:root {
  --bg: #121014;
  --panel: #1b181e;
  --panel-2: #231f27;
  --line: #2f2a33;
  --ink: #f2ece4;
  --muted: #a39a92;
  --lane-r: #e8463c;
  --lane-y: #f2c230;
  --lane-b: #3b8fe6;
  --lane-g: #3fbd5c;
  --lane-o: #f08a24;
  --accent: var(--lane-y);
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lane-y); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lane-y); outline-offset: 2px; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.top { padding-block: 28px 18px; display: grid; gap: 10px; }
.brand { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.brand h1 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: .9; letter-spacing: .01em; margin: 0;
}
.brand h1 span { color: var(--lane-y); }
.brand p { margin: 0 0 4px; color: var(--muted); max-width: 46ch; }
.lanes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; height: 6px; }
.lanes i { border-radius: 3px; }
.lanes i:nth-child(1) { background: var(--lane-r); }
.lanes i:nth-child(2) { background: var(--lane-y); }
.lanes i:nth-child(3) { background: var(--lane-b); }
.lanes i:nth-child(4) { background: var(--lane-g); }
.lanes i:nth-child(5) { background: var(--lane-o); }

.who {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.who label { font-weight: 600; }
.who input { flex: 1 1 200px; min-width: 0; }
.status-pill {
  margin-left: auto; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor;
}
.status-pill.open { color: var(--lane-g); }
.status-pill.closed { color: var(--lane-r); }

input[type="text"], input[type="search"], input[type="password"] {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
input::placeholder { color: #776f68; }

/* ---------- tabs (phones) ---------- */
.tabs { display: none; gap: 6px; padding-block: 6px 12px; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 5; }
.tabs button {
  flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 6px;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em;
}
.tabs button[aria-selected="true"] { border-color: var(--lane-y); color: var(--lane-y); }
.tabs .count { font-family: var(--body); font-size: .75rem; color: var(--muted); margin-left: 4px; }

/* ---------- layout ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; padding-block: 8px 48px; align-items: start; }
.col { display: grid; gap: 20px; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.card h2 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  font-size: 1.7rem; line-height: 1; margin: 0 0 4px; display: flex; align-items: baseline; gap: 10px;
}
.card h2 small { font-family: var(--body); font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; }
.card .sub { color: var(--muted); margin: 0 0 12px; font-size: .92rem; }

/* ---------- library ---------- */
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.btn {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: #4a4350; }
.btn.go { background: var(--lane-y); color: #1a1400; border-color: var(--lane-y); }
.btn.go:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .82rem; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--lane-b); color: var(--ink); background: rgba(59,143,230,.14); }
.results-meta { color: var(--muted); font-size: .85rem; margin: 8px 0; font-variant-numeric: tabular-nums; }
.songs { list-style: none; margin: 0; padding: 0; display: grid; }
.song {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--line);
}
.song:first-child { border-top: 0; }
.song .t { font-weight: 700; overflow-wrap: anywhere; }
.song .a { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.song .meta { font-size: .78rem; color: #7d756e; overflow-wrap: anywhere; }
.song.queued .btn { border-color: var(--lane-g); color: var(--lane-g); }
.more { margin-top: 10px; width: 100%; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }

/* ---------- queue ---------- */
.now {
  border: 1px solid var(--lane-o); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(240,138,36,.16), transparent 70%);
}
.now .label { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--lane-o); }
.now .t { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.now .a { color: var(--muted); }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: q; }
.q {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px; background: var(--panel-2); border-left: 4px solid var(--lane);
}
.q .n { font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-align: center; color: var(--lane); font-variant-numeric: tabular-nums; }
.q .t { font-weight: 700; overflow-wrap: anywhere; }
.q .a { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.q .by { font-size: .78rem; color: #7d756e; }
.vote {
  display: inline-flex; align-items: center; gap: 4px; background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.vote:hover { border-color: var(--lane-y); }
.vote.done { border-color: var(--lane-y); color: var(--lane-y); }
.played { list-style: none; margin: 12px 0 0; padding: 0; font-size: .88rem; color: var(--muted); display: grid; gap: 2px; }
.played li { overflow-wrap: anywhere; }
.played li::before { content: "✓ "; color: var(--lane-g); }
details summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin-top: 12px; }

/* ---------- wishlist ---------- */
.wish-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.wish { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.w { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.w .t { font-weight: 700; overflow-wrap: anywhere; }
.w .a { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.w .tag { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lane-g); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  background: var(--ink); color: var(--bg); font-weight: 600; padding: 10px 16px; border-radius: 10px;
  max-width: min(92vw, 460px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.bad { background: var(--lane-r); color: #fff; }

footer { color: #6f6862; font-size: .82rem; padding-block: 0 32px; }

/* ---------- admin ---------- */
.admin-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.q .acts, .w .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.q.admin { grid-template-columns: 34px minmax(0, 1fr); }
.q.admin .acts { grid-column: 2; justify-content: flex-start; }
.btn.sm { padding: 5px 10px; font-size: .85rem; }
.btn.play { border-color: var(--lane-o); color: var(--lane-o); }
.btn.done { border-color: var(--lane-g); color: var(--lane-g); }
.btn.del { border-color: var(--lane-r); color: var(--lane-r); }

@media (max-width: 820px) {
  .tabs { display: flex; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid [data-pane] { display: none; }
  .grid [data-pane].active { display: block; }
  .col { display: contents; }
  .wish-form { grid-template-columns: 1fr; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .chip { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.brand h1 a.home { color: inherit; text-decoration: none; }
.brand h1 a.home:hover span { color: var(--lane-o); }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-grid label { display: grid; gap: 4px; font-weight: 600; }
select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; color: var(--ink); }
@media (max-width: 560px) { .live-grid { grid-template-columns: 1fr; } }
