:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --ink: #111111;
  --muted: #6b6b70;
  --line: #e2e2e5;
  --strong-line: #111111;
  --radius: 8px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111112;
    --surface: #18181a;
    --surface-2: #232326;
    --ink: #f2f2f3;
    --muted: #9a9aa1;
    --line: #2e2e32;
    --strong-line: #f2f2f3;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  font-feature-settings: "tnum" 1, "cv11" 1;
}
a { color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, calc((100vw - 880px) / 2));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; flex: none; }
.brand-mark { font-weight: 700; font-size: 17px; }
.brand-term { font-size: 14px; color: var(--muted); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; padding: 6px 12px; border-radius: 6px;
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted);
}
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }

main { max-width: 880px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

/* ---------- shared ---------- */
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.section-title { font-size: 18px; margin: 32px 0 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 500;
  background: var(--surface-2); color: var(--ink); white-space: nowrap;
}
.person { text-decoration: none; }
.person:hover { text-decoration: underline; }
.tbd { color: var(--muted); }

/* ---------- running order (home) ---------- */
.order-head h1 { font-size: 26px; }
.order-head .sub { color: var(--muted); margin-top: 2px; }
.order-set { margin-top: 28px; }
.order-set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--strong-line); }
.order-set-head h2 { font-size: 20px; }
.order-set-head h2 span { font-weight: 500; color: var(--muted); }
.order-set-head a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.order-set-head a:hover { text-decoration: underline; }
.order { list-style: none; margin: 0; padding: 0; }
.order li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order .n { font-size: 15px; font-weight: 600; color: var(--muted); text-align: right; }
.order .t { font-size: 17px; font-weight: 600; }
.order .m { font-size: 14px; color: var(--muted); }
.order .k { font-size: 18px; font-weight: 700; min-width: 56px; text-align: center; padding: 4px 8px; border: 1.5px solid var(--strong-line); border-radius: 6px; }
.order li.gap { display: block; padding: 8px 0 8px 40px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- set view ---------- */
.set-head h1 { font-size: 26px; margin-top: 2px; }
.set-head .sub { color: var(--muted); margin-top: 4px; }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.roster > div { background: var(--surface); padding: 10px 12px; }
.roster .who { margin-top: 2px; font-weight: 500; }
.note-small { font-size: 13px; color: var(--muted); margin-top: 8px; }

.songs { display: grid; gap: 12px; }
.song { padding: 16px; }
.song-top { display: flex; gap: 12px; align-items: flex-start; }
.song-num { font-size: 20px; font-weight: 700; color: var(--muted); min-width: 20px; }
.song-main { flex: 1; min-width: 0; }
.song h3 { font-size: 19px; }
.song .artist { color: var(--muted); font-size: 14px; margin-top: 2px; }
.song-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.key { font-weight: 700; font-size: 20px; flex: none; text-align: center; min-width: 60px; padding: 4px 10px; border: 1.5px solid var(--strong-line); border-radius: 6px; }
.key small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.song-note { margin: 12px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 6px; font-size: 14px; }

.flow { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: s; display: grid; gap: 4px; }
.flow li { counter-increment: s; display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: baseline; font-size: 15px; }
.flow li::before { content: counter(s); font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; }
.flow .sec { font-weight: 600; }
.flow .sec .chip { margin-left: 6px; font-weight: 500; }
.flow .sec-note { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.flow-empty { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.song-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn[aria-disabled="true"] { color: var(--muted); background: var(--surface-2); }

.interlude { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 0; }
.interlude::before, .interlude::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- people ---------- */
.search { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); margin: 16px 0 12px; }
.search:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.people { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pcard { padding: 12px 14px; }
.pcard.hl { border-color: var(--strong-line); }
.pcard h3 { font-size: 16px; }
.pcard ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.pcard li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.pcard li a { flex: none; text-decoration: none; }
.open-slots { margin-top: 24px; padding: 12px 14px; }
.open-slots h3 { font-size: 15px; }
.open-slots ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }

@media (max-width: 560px) {
  .top { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  main { padding-top: 16px; }
  .song { padding: 14px 12px; }
  .song-top { gap: 10px; }
  .tabs a { flex: 1; text-align: center; padding: 6px 4px; }
}
