/* Landing page. Three stacked sections rather than a hero image: the useful
   thing is the song list, and a visitor who arrived from a rehearsal wants the
   code box, not marketing copy. */

.section-h {
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 10px;
}
.section-h-row { margin-bottom: 10px; }
.section-h-row .section-h { margin: 26px 0 0; }

.card-h { margin: 0 0 6px; font-size: 17px; }

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.two-up.single { grid-template-columns: 1fr; }
@media (max-width: 720px) {
  .two-up { grid-template-columns: 1fr; }
}

.code-input {
  font-size: 26px;
  letter-spacing: .3em;
  text-align: center;
  padding: 8px 10px;
}

.btn.block { display: block; text-align: center; }

/* Band cards. Stacked on mobile, wrapping grid on wider screens; the grid caps
   at 4 columns so a large picker doesn't shrink each card into a chip. Used
   for both the anonymous "Jump back in" row and the signed-in band picker. */
.band-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .band-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .band-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) {
  .band-card-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Centered variant — flex-wrap so 1-4 cards sit centered rather than stretched
   full-width. Used for "Jump back in" on the anonymous landing. */
.band-card-grid.centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.band-card-grid.centered .band-card {
  flex: 1 1 220px;
  max-width: 260px;
}

.band-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 96px;
  padding: 16px 18px;
  background: var(--panel, #191d1f);
  border: 1px solid var(--line, rgba(255, 255, 255, .14));
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.band-card:hover { border-color: var(--accent, #f4d800); transform: translateY(-1px); }
.band-card:focus-visible { outline: 2px solid var(--accent, #f4d800); outline-offset: 2px; }
.band-card-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  word-break: break-word;
  padding-right: 22px;
}
.band-card .pill { align-self: flex-start; }
.band-card-sub { color: var(--muted); font-size: 12px; }
.band-card-forget {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
}
.band-card-forget:hover { color: var(--danger); background: rgba(255, 255, 255, .06); }

/* Themed tints — deterministic per band (chosen by hashing the slug in JS).
   Each theme sets a --theme-color that drives the border, title, and pill so
   the same band always wears the same color and neighboring cards contrast. */
.band-card.themed {
  border-width: 1px;
  border-left-width: 4px;
  border-left-color: var(--theme-color);
  background: linear-gradient(135deg, var(--theme-tint), var(--panel, #191d1f) 60%);
}
.band-card.themed .band-card-title { color: var(--theme-color); }
.band-card.themed .pill {
  color: var(--theme-color);
  border-color: var(--theme-color);
  background: var(--theme-tint);
  text-transform: capitalize;
}
.band-card.themed.t0 { --theme-color: #f4d800; --theme-tint: rgba(244, 216, 0, .18); }
.band-card.themed.t1 { --theme-color: #7dd3fc; --theme-tint: rgba(125, 211, 252, .18); }
.band-card.themed.t2 { --theme-color: #86efac; --theme-tint: rgba(134, 239, 172, .18); }
.band-card.themed.t3 { --theme-color: #f47a7a; --theme-tint: rgba(244, 122, 122, .18); }
.band-card.themed.t4 { --theme-color: #c084fc; --theme-tint: rgba(192, 132, 252, .18); }
.band-card.themed.t5 { --theme-color: #ff8a5c; --theme-tint: rgba(255, 138, 92, .18); }

/* Action tile — the "+ Create a new band" / "Join with a room code" cards. */
.band-card.action {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-family: inherit;
  font-size: 15px;
}
.band-card.action:hover { color: var(--accent, #f4d800); border-color: var(--accent, #f4d800); }
.band-card.action .glyph { font-size: 22px; line-height: 1; }

/* Popup modal, reusing the .overlay pattern from app.css. */
.modal .card { width: min(440px, 92vw); text-align: left; max-height: 84vh; overflow-y: auto; }
.modal .card h2 { margin-top: 0; }

/* Join-by-code sits between "Jump back in" and the library. Narrower than a
   full-width card so it reads as a focused action, and offset with a gap so it
   doesn't crowd the band cards above it. */
#joinSection { margin-top: 26px; }
#joinSection .card { max-width: 50%; margin-left: auto; margin-right: auto; }
@media (max-width: 720px) {
  #joinSection .card { max-width: 100%; }
}

.trending { margin: 6px 0 0; padding-left: 22px; }
.trending li { padding: 3px 0; }
.trending li span { margin-left: 8px; }

/* Capped so a thousand-song library doesn't push the page into infinity; the
   search box is the real navigation. */
.table-scroll { max-height: 52vh; overflow: auto; margin-top: 10px; }
.table-scroll thead th {
  position: sticky;
  top: 0;
  background: #14181a;
  z-index: 1;
}
