:root, [data-band="grateful-dead"] {
  --paper: #F4E7C8;
  --page: #c9b48e;
  --ink: #1C140E;
  --mute: #6A5340;
  --line: #1C140E;
  --card: #FBF1D8;
  --rose: #B01A24;
  --bolt: #1D4E89;
  --moss: #3F5A38;
  --gold: #C4A14A;
  --cream: #F8F0DC;
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}
[data-band="phish"] {
  --paper: #12241c;
  --page: #0b1511;
  --ink: #e7f6ea;
  --mute: #8fb89a;
  --line: #e7f6ea;
  --card: #173226;
  --rose: #e94f8a;
  --bolt: #7cff6b;
  --moss: #3ddc97;
  --gold: #f5d76e;
  --cream: #1b3a2c;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--ink) var(--cream); }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: var(--cream); }
*::-webkit-scrollbar-thumb {
  background: var(--ink);
  border-radius: 0;
  border: 1px solid var(--ink);
}
*::-webkit-scrollbar-thumb:hover { background: var(--rose); }
*::-webkit-scrollbar-corner { background: var(--cream); }
html, body { height: 100%; margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); }
button, input { font: inherit; color: inherit; border-radius: 0; }
a { color: inherit; }

.app {
  width: 100vw;
  height: 100vh;
  background: var(--paper);
  border: 10px double var(--ink);
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.chrome {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  padding: 6px 36px;
  border-bottom: 3px double var(--ink);
  z-index: 20;
}
.chrome .brand { grid-column: 2; justify-self: center; }
.search {
  display: block;
  grid-column: 3;
  justify-self: end;
  width: min(260px, 100%);
  margin-right: 28px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  padding: 4px 8px;
  font-size: 13px;
  box-shadow: none;
  outline: none;
}
.find-hits {
  display: none;
  position: absolute;
  top: 100%;
  right: 36px;
  width: min(300px, calc(100vw - 48px));
  z-index: 40;
  background: var(--paper);
  border: 3px double var(--ink);
  max-height: 60vh;
  overflow: auto;
}
.find-hits:not([hidden]) { display: block; }
.find-hits .srow {
  padding: 10px 12px;
  margin: 0;
}
.find-hits .srow:last-child { border-bottom: 0; }
.find-hits .srow.on,
.find-hits .srow[data-kind]:hover {
  background: var(--cream);
}
.find-hits .srow.on { color: var(--rose); }
.find-hits .srow.hint {
  cursor: default;
  color: var(--mute);
}
.corner {
  position: absolute;
  width: 14px;
  height: 26px;
  color: var(--ink);
  pointer-events: none;
}
.corner svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.corner.tl { top: 50%; left: 10px; transform: translateY(-50%); }
.corner.tr { top: 50%; right: 10px; transform: translateY(-50%); }
.brand {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0;
  font-family: var(--serif); font-size: 16px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer; padding: 4px 6px;
}
.brand img { width: 22px; height: 22px; }
.caret {
  font-size: 11px;
  color: var(--mute);
  line-height: 1;
  display: inline-block;
  transform-origin: center;
}
.brand.open .caret,
.brand[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}
.menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  z-index: 30;
  background: var(--paper);
  border: 3px double var(--ink);
  padding: 4px;
}
.menu.open { display: block; }
.menu button { display: block; width: 100%; text-align: left; background: 0; border: 0; padding: 10px 12px; cursor: pointer; border-radius: 0; }
.menu button.on { color: var(--rose); font-weight: 600; }
.menu small { display: block; color: var(--mute); font-size: 11px; }

.side {
  grid-column: 1; grid-row: 2;
  border-right: 3px double var(--ink);
  padding: 16px 14px;
  display: flex; flex-direction: column;
  overflow: auto;
}
.side nav a {
  display: block; color: var(--ink); text-decoration: none;
  padding: 7px 0; font-size: 14px;
}
.side nav a.on { font-weight: 600; }
.side-kicker {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: 11px; font-weight: 600; margin: 18px 0 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--ink); background: transparent;
  padding: 5px 8px; font-size: 12px; cursor: pointer; border-radius: 0;
}
.chip.solid { background: var(--moss); color: var(--paper); border-color: var(--moss); }
[data-band="phish"] .chip.solid { color: var(--ink); }
.side-bears {
  display: flex; gap: 6px; align-items: flex-end;
  margin-top: auto; padding: 16px 0 8px;
}
.side-bears img { height: 48px; width: auto; }
.foot { font-size: 11px; color: var(--mute); margin: 8px 0 0; line-height: 1.4; }
.foot-mobile { display: none; margin-top: 22px; }

.pane {
  grid-column: 2; grid-row: 2;
  overflow: auto; padding: 16px 20px 24px;
  min-width: 0;
}
.queue-rail {
  grid-column: 3; grid-row: 2;
  border-left: 3px double var(--ink);
  display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
  background: var(--paper);
}
.queue-head {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 3px double var(--ink);
}
.queue-label {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: 11px; font-weight: 600;
  margin-right: auto;
}
.queue-close { display: none; }
.queue-body {
  flex: 1; overflow: auto;
  padding: 8px 14px 16px;
}
.q-now {
  border: 1px solid var(--ink);
  padding: 10px 12px;
  margin: 8px 0 4px;
}
.q-now b {
  display: block;
  color: var(--rose);
  font-family: var(--serif);
  font-weight: 600;
}
.q-now .meta { display: block; margin-top: 2px; }
.q-x {
  background: 0; border: 0; cursor: pointer;
  font-size: 18px; line-height: 1;
  padding: 4px 8px; color: var(--mute);
  min-width: 32px; min-height: 32px;
}
.qrow[data-playnow] { cursor: pointer; }
.qrow-live { cursor: default; }
.played-block { margin-top: 8px; }
.played-block > summary {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: 11px; font-weight: 600;
  cursor: pointer; list-style: none;
  padding: 10px 0;
  border-bottom: 3px double var(--ink);
}
.played-block > summary::-webkit-details-marker { display: none; }
.played-block > summary::after { content: " +"; color: var(--mute); font-weight: 400; }
.played-block[open] > summary::after { content: " –"; }
.now-queue {
  display: none;
  width: min(100%, 420px);
  margin-top: 18px;
  text-align: left;
}
.btn.icon, .chip.icon, button.back {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  flex-shrink: 0;
}
.btn.icon svg, .chip.icon svg, button.back svg { display: block; }
.btn.icon {
  background: var(--rose);
  color: var(--paper);
  border-color: var(--ink);
}
[data-band="phish"] .btn.icon {
  background: var(--moss);
  color: var(--ink);
}
button.back { margin-bottom: 8px; }
.live-jump { color: var(--rose); }
.q-x svg { display: block; width: 12px; height: 12px; }
.chip.icon.queue-close { display: none; }

.kicker {
  display: flex; align-items: center; gap: 12px;
  text-transform: uppercase; letter-spacing: .18em;
  font-size: 11px; font-weight: 600; margin: 18px 0 10px;
}
.kicker::before, .kicker::after {
  content: ""; flex: 1; height: 5px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: none;
}
h1 { font-family: var(--serif); font-size: 28px; margin: 0 0 4px; letter-spacing: -.03em; }
.sub { color: var(--mute); font-size: 13px; margin: 0 0 14px; }

.cols, .item, .vrow, .track, .qrow, .srow {
  display: grid; gap: 10px; align-items: center;
}
.cols {
  grid-template-columns: 1fr 72px 120px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mute); padding: 6px 0;
  border-bottom: 3px double var(--ink);
}
.item, .vrow {
  grid-template-columns: 1fr auto 120px;
  padding: 11px 0;
  border-bottom: 1px dotted var(--ink);
  cursor: pointer;
}
.track {
  grid-template-columns: 28px 1fr auto auto;
  padding: 11px 0;
  border-bottom: 1px dotted var(--ink);
  cursor: pointer;
}
.qrow, .srow {
  grid-template-columns: 1fr auto;
  padding: 11px 0;
  border-bottom: 1px dotted var(--ink);
}
.qrow { cursor: default; }
.srow { cursor: pointer; }
.n { color: var(--rose); font-family: var(--serif); font-weight: 700; }
.meta { color: var(--mute); font-size: 12px; }
.hv-badge {
  display: inline-block; border: 1px solid var(--bolt); color: var(--bolt);
  font-size: 11px; padding: 2px 6px; border-radius: 0; font-weight: 500;
}
.our { color: var(--rose); text-align: right; font-size: 13px; font-weight: 600; }
.cols span:nth-child(2), .item > :nth-child(2), .vrow > :nth-child(2) { text-align: right; }
.cols span:nth-child(3), .item > :nth-child(3), .vrow > :nth-child(3) { text-align: right; }
.item-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.keep {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px dotted var(--ink); cursor: pointer;
}
.keep .mark, .player .mark {
  width: 36px; height: 36px; background: var(--ink);
  display: grid; place-items: center; flex-shrink: 0; border-radius: 0;
}
.keep .mark img, .player .mark img { width: 28px; height: 28px; }
.keep b { display: block; }
.keep-actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }

.btn, .play, .ctl.play {
  border: 1px solid var(--ink); background: var(--rose); color: #fff;
  padding: 8px 14px; cursor: pointer; border-radius: 0;
}
[data-band="phish"] .btn, [data-band="phish"] .play, [data-band="phish"] .ctl.play {
  background: var(--moss); color: var(--ink);
}

.hot-mobile { display: none; }

.player {
  grid-column: 1 / -1; grid-row: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; border-top: 3px double var(--ink);
  background: var(--paper);
  z-index: 5;
}
.player .mark {
  border: 0; padding: 0; cursor: pointer;
}
.player .now {
  min-width: 0; max-width: 280px;
  background: none; border: 0; padding: 0;
  text-align: left; cursor: pointer;
}
.player .now b, .player .now small {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player b { font-size: 13px; }
#playerBear { height: 28px; width: auto; flex-shrink: 0; }
.queue-toggle {
  display: grid; align-content: center; justify-items: center;
  gap: 4px; padding: 8px; flex-shrink: 0;
}
.queue-toggle span {
  display: block; width: 16px; height: 2px; background: var(--ink);
}
.queue-toggle.on span { background: var(--rose); }

.transport { display: flex; gap: 6px; flex-shrink: 0; }
.ctl {
  width: 36px; height: 36px; border: 1px solid var(--ink);
  background: var(--paper); position: relative; cursor: pointer;
  border-radius: 0; padding: 0; flex-shrink: 0;
}
.ctl.play {
  font-size: 0; color: transparent; width: 36px; height: 36px; padding: 0;
}
.ctl.play:not(.pause-icon)::after {
  content: ""; position: absolute; left: 13px; top: 8px;
  border-style: solid; border-width: 10px 0 10px 14px;
  border-color: transparent transparent transparent #fff;
}
.ctl.play.pause-icon::before, .ctl.play.pause-icon::after {
  content: ""; position: absolute; top: 8px; width: 5px; height: 20px; background: #fff;
}
.ctl.play.pause-icon::before { left: 11px; }
.ctl.play.pause-icon::after { right: 11px; }
[data-band="phish"] .ctl.play:not(.pause-icon)::after {
  border-color: transparent transparent transparent var(--ink);
}
[data-band="phish"] .ctl.play.pause-icon::before,
[data-band="phish"] .ctl.play.pause-icon::after { background: var(--ink); }

.ctl.prev::after {
  content: ""; position: absolute; left: 8px; top: 8px;
  border-style: solid; border-width: 10px 14px 10px 0;
  border-color: transparent var(--ink) transparent transparent;
}
.ctl.next::after {
  content: ""; position: absolute; left: 14px; top: 8px;
  border-style: solid; border-width: 10px 0 10px 14px;
  border-color: transparent transparent transparent var(--ink);
}

.seek-wrap {
  --p: 0%;
  --seek-fill: var(--rose);
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 140px;
}
[data-band="phish"] .seek-wrap { --seek-fill: var(--moss); }
#tElapsed, #tLeft {
  font-family: var(--sans); color: var(--mute);
  font-size: 12px; font-variant-numeric: tabular-nums;
  min-width: 36px;
}
#tLeft { min-width: 42px; }
#seek {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 28px; margin: 0; padding: 0;
  background: transparent; border: 0; border-radius: 0;
  cursor: pointer;
  accent-color: var(--seek-fill);
}
#seek:disabled { cursor: default; }
#seek::-webkit-slider-runnable-track {
  height: 10px; border-radius: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: linear-gradient(var(--seek-fill), var(--seek-fill)) 0 / var(--p) 100% no-repeat, var(--paper);
}
#seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 8px; height: 16px; margin-top: -4px;
  border: 1px solid var(--ink); border-radius: 0; cursor: pointer;
  background: var(--ink);
}
#seek::-moz-range-track {
  height: 10px; border-radius: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: linear-gradient(var(--seek-fill), var(--seek-fill)) 0 / var(--p) 100% no-repeat, var(--paper);
}
#seek::-moz-range-progress {
  height: 10px; background: var(--seek-fill); border-radius: 0;
}
#seek::-moz-range-thumb {
  width: 8px; height: 16px;
  border: 1px solid var(--ink); border-radius: 0; cursor: pointer;
  background: var(--ink);
  -moz-appearance: none;
  appearance: none;
}
#seek:disabled::-webkit-slider-runnable-track,
#seek:disabled::-moz-range-track {
  background: var(--mute);
  border-top-color: var(--mute);
  border-bottom-color: var(--mute);
}
#seek:disabled::-moz-range-progress { background: var(--mute); }
#seek:disabled::-webkit-slider-thumb,
#seek:disabled::-moz-range-thumb {
  opacity: .4;
  background-color: var(--mute);
}

.live-badge {
  display: inline-block; border: 1px solid var(--rose);
  background: var(--rose); color: #fff;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; padding: 4px 6px; border-radius: 0; flex-shrink: 0;
}
[data-band="phish"] .live-badge { color: var(--ink); }
.live-badge[hidden], .live-jump[hidden] { display: none !important; }

.tabs { display: none; }

.msg { color: var(--mute); font-size: 13px; padding: 12px 0; }
.back { background: transparent; border: 1px solid var(--ink); color: var(--ink); cursor: pointer; }

.now-stage {
  min-height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 16px 20px 28px;
}
.now-stage .back { align-self: flex-start; }
.now-stage .art img { width: min(70vw, 280px); height: auto; display: block; margin: 12px auto 18px; }
.now-stage h1 { font-size: clamp(28px, 7vw, 56px); margin: 0 0 8px; }
.now-stage .next-up { width: min(100%, 420px); margin-top: 18px; text-align: left; }
.now-empty { padding: 40px 12px; text-align: center; }

.now-mode {
  grid-template-columns: 1fr 280px;
}
.now-mode .side { display: none; }
.now-mode .search, .now-mode .find-hits { display: none; }
.now-mode .pane {
  grid-column: 1; grid-row: 2;
  padding: 0;
  display: flex; flex-direction: column;
}
.now-mode .queue-rail { grid-column: 2; grid-row: 2; }
.now-mode #main { flex: 1; display: flex; }

@media (max-width: 959px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto;
  }
  .chrome {
    grid-column: 1; grid-row: 1;
    grid-template-columns: 1fr auto 1fr;
    padding: 6px 36px;
  }
  .chrome .brand { grid-column: 2; justify-self: center; }
  .search {
    width: min(180px, 100%);
    margin-right: 12px;
  }
  .find-hits {
    right: 24px;
    width: min(260px, calc(100vw - 32px));
  }
  .side { display: none; }
  .pane {
    grid-column: 1; grid-row: 2;
    padding: 12px 14px 16px;
  }
  .queue-rail {
    display: none;
    grid-column: 1; grid-row: 2;
    z-index: 4;
    border-left: 0;
    border-top: 3px double var(--ink);
    background: var(--paper);
  }
  .app.queue-open .queue-rail {
    display: flex;
  }
  .queue-close { display: inline-block; }
  .chip.icon.queue-close { display: inline-grid; }
  .now-queue { display: block; }
  .now-mode {
    grid-template-columns: 1fr;
  }
  .now-mode .pane { grid-column: 1; }
  .now-mode .queue-rail { grid-column: 1; }
  .player {
    grid-column: 1; grid-row: 3;
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    grid-template-rows: auto auto auto;
    gap: 8px 10px;
    align-items: center;
  }
  .player .mark { grid-column: 1; grid-row: 1; }
  .player .now { grid-column: 2; grid-row: 1; max-width: none; }
  .live-badge { grid-column: 3; grid-row: 1; }
  .queue-toggle { grid-column: 4; grid-row: 1; }
  .transport { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .seek-wrap { grid-column: 1 / -1; grid-row: 3; min-width: 0; }
  #playerBear { display: none; }
  .tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-column: 1; grid-row: 4;
    border-top: 3px double var(--ink);
    background: var(--paper);
  }
  .tabs button {
    border: 0; border-right: 1px solid var(--ink);
    background: var(--paper); padding: 10px 2px;
    min-height: 44px; font-size: 10px; letter-spacing: .05em;
    text-transform: uppercase; border-radius: 0; cursor: pointer;
    white-space: nowrap;
  }
  .tabs button:last-child { border-right: 0; }
  .tabs button.on { font-weight: 600; }
  .chip, .btn { min-height: 32px; }
  .btn.icon, .chip.icon, button.back {
    width: 28px; height: 28px; min-width: 28px; min-height: 28px; padding: 0;
  }
  .hot-mobile {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    gap: 6px; margin: 12px 0 4px;
  }
  .hot-mobile .chip { flex-shrink: 0; min-height: 32px; }
  .foot-mobile { display: block; }
  .cols, .item, .vrow { grid-template-columns: 1fr auto; }
  .cols span:nth-child(3), .item > :nth-child(3), .vrow > :nth-child(3) { display: none; }
  .track { grid-template-columns: 28px 1fr auto; }
  .track .item-actions { grid-column: 2 / -1; }
  .now-mode.app { grid-template-rows: auto 1fr auto; }
  .now-mode .tabs { display: none; }
  .now-stage { justify-content: flex-start; padding-top: 8px; min-height: auto; }
}

@media (max-width: 420px) {
  .brand { font-size: 15px; letter-spacing: .12em; }
}

.az {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 8px 0 14px;
}
.az .chip {
  min-width: 28px; padding: 5px 6px; text-align: center;
}
.az .chip.on { background: var(--ink); color: var(--paper); }

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}
.year-grid .chip {
  width: 100%;
  text-align: center;
  padding: 10px 4px;
}

.tour-list { margin: 0 0 10px; }
.tour-list .srow b { display: block; font-weight: 600; }

.rank-song { margin: 8px 0 18px; }
.rank-song h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  cursor: pointer;
  letter-spacing: -.02em;
}
.rank-song .kicker { margin-top: 12px; }
.note {
  border: 1px solid var(--ink);
  padding: 10px 12px;
  margin: 8px 0 16px;
  font-size: 13px;
  background: var(--card);
  border-radius: 0;
}
.sub a { color: var(--bolt); }
