/* People page (members) and the band home (groups/show). Colours come only from tokens: teal = selection and links,
   coral = key badges and the page rule, mustard = group/people tags, neutral surfaces for cards. */
.group-members-page { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.group-members-page__intro { color: var(--muted); margin: 0; max-width: 42rem; }
.group-members-page__header { display: grid; gap: 0.5rem; }
.group-members-page__header h1 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; }
.group-members-page__panel { padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--surface); }

/* ---- Band home ---------------------------------------------------------------------------------------------------- */
.band-home { display: grid; gap: clamp(1.25rem, 3vw, 1.75rem); }
.band-home .icon { width: 1.1rem; height: 1.1rem; margin-right: 0.45rem; flex: 0 0 auto; }

.band-header { align-items: start; }
.band-header__identity { min-width: 0; }
.band-header__name { margin: 0; }
.band-header__line { margin: 0.5rem 0 0; color: var(--muted); }
.band-header__line a { color: var(--accent); }
.band-header__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.6rem; }
.band-header__actions .icon { margin-right: 0.45rem; }
.band-home__more { position: relative; }
.band-home__more summary { display: grid; width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--ink); border-radius: var(--radius-control); color: var(--ink); cursor: pointer; list-style: none; place-items: center; }
.band-home__more summary::-webkit-details-marker { display: none; }
.band-home__more summary .icon { margin: 0; }
.band-home__more-menu { position: absolute; z-index: 5; top: calc(100% + 0.5rem); right: 0; display: grid; width: max-content; min-width: 13rem; gap: 0.15rem; padding: 0.5rem; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-floating); }
.band-home__more-menu a { min-height: 2.5rem; padding: 0.55rem 0.75rem; border-radius: var(--radius-control); color: var(--ink); text-decoration: none; }
.band-home__more-menu a:hover { background: var(--row-hover); }
.band-home__more-menu form { margin: 0; }
.band-home__more-menu .band-home__leave {
  display: flex;
  width: 100%;
  min-height: 2.5rem;
  justify-content: flex-start;
}

.band-eyebrow { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }

/* Hero: what is next, and one tap to play it. */
.band-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr); overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--surface); }
.band-hero--empty { grid-template-columns: minmax(0, 1fr); }
.band-hero__main { min-width: 0; padding: clamp(1.1rem, 3vw, 1.6rem); }
.band-hero__title { display: flex; align-items: center; gap: 1.1rem; }
.band-date { display: grid; flex: 0 0 auto; min-width: 5.2rem; padding: 0.55rem 0.75rem; border: 1px solid var(--hairline); border-radius: var(--radius-control); text-align: center; line-height: 1.1; }
.band-date__dow, .band-date__month { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.band-date__day { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.05; }
.band-hero__identity { min-width: 0; }
.band-hero h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.2rem); overflow-wrap: anywhere; }
.band-hero--empty h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); }
.band-hero__when, .band-hero__count { margin: 0.3rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.band-hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.band-stage { border-color: var(--selected-line); color: var(--selected-ink); background: var(--selected-fill); }
.band-stage:hover { background: var(--selected-fill); filter: brightness(1.08); }
.band-hero__list { min-width: 0; padding: clamp(1.1rem, 3vw, 1.4rem); border-left: 1px solid var(--rule); background: var(--sidebar-bg); }
.band-order { display: grid; margin: 0; padding: 0; list-style: none; }
.band-order__row { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; min-height: 2.6rem; border-top: 1px solid var(--rule); }
.band-order__row:first-child { border-top: 0; }
.band-order__number { color: var(--muted); font-size: 0.85rem; }
.band-order__title { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 700; text-decoration: none; }
a.band-order__title:hover { color: var(--accent); }
.band-order__row--segment .band-order__title { color: var(--muted); font-weight: 400; }
.band-order__toggle { display: none; margin-top: 0.4rem; padding: 0.5rem 0; border: 0; color: var(--accent); background: none; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Key badge: coral outline with a pastel fill. */
.band-key { display: inline-grid; min-width: 2.6rem; min-height: 2.1rem; padding: 0 0.5rem; border: 1px solid var(--key-line); border-radius: var(--radius-control); color: var(--key-ink); background: var(--key-fill); font-size: 0.9rem; font-weight: 700; place-items: center; }

.band-home__columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: clamp(1rem, 2.5vw, 1.5rem); }
.band-home__side { display: grid; min-width: 0; gap: clamp(1rem, 2.5vw, 1.5rem); }
.band-card { min-width: 0; padding: clamp(1rem, 3vw, 1.4rem); border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--surface); }
.band-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.band-card__head h2 { margin: 0; font-family: var(--font-ui); font-size: 1.2rem; font-weight: 700; }
.band-card__sub { color: var(--muted); font-size: 0.9rem; }
.band-card__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin: 0.9rem 0 0; color: var(--muted); font-size: 0.9rem; }
.band-card__foot a, .band-textlink { color: var(--accent); font-weight: 700; }
.band-empty { margin: 0; padding: 0.5rem 0; color: var(--muted); }

.band-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.4rem; }
.band-chip { min-height: 2.5rem; padding: 0.4rem 0.9rem; border: 1px solid var(--hairline); border-radius: var(--radius-pill); color: var(--ink); background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.band-chip span { margin-left: 0.3rem; }
.band-chip[aria-selected="true"] { border-color: var(--selected-line); color: var(--selected-ink); background: var(--selected-fill); }

.band-songlist, .band-setlist, .band-people__list { display: grid; margin: 0; padding: 0; list-style: none; }
.band-songlist > li, .band-setlist > li { border-bottom: 1px solid var(--rule); }
.band-songlist > li:last-child, .band-setlist > li:last-child { border-bottom: 0; }
.band-song, .band-set { display: flex; min-height: 3.6rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; color: var(--ink); text-decoration: none; }
.band-song:hover strong, .band-set:hover strong { color: var(--accent); }
.band-song__identity, .band-set__identity { display: grid; min-width: 0; gap: 0.1rem; }
.band-song__meta, .band-set__meta { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.band-set__chevron { color: var(--muted); font-size: 1.4rem; }
.band-upnext { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.4rem; color: var(--ink); font-weight: 700; }
.band-upnext__dot { width: 0.55rem; height: 0.55rem; border: 2px solid var(--selected-line); border-radius: var(--radius-pill); }
.band-recent .band-eyebrow { margin: 0.4rem 0 0; }

.band-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; min-height: 3.7rem; padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.band-person:last-child { border-bottom: 0; }
.band-avatar { display: grid; width: 2.6rem; height: 2.6rem; border: 1px solid transparent; border-radius: var(--radius-pill); color: var(--ink); background: var(--tint); font-size: 0.85rem; font-weight: 700; place-items: center; }
.band-avatar--you { border-color: var(--selected-line); background: var(--selected-fill-quiet); }
.band-avatar--dashed { border: 1px dashed var(--hairline); color: var(--muted); background: transparent; }
.band-person__identity { display: grid; min-width: 0; }
.band-person__you, .band-person__meta { color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.band-tag { padding: 0.15rem 0.6rem; border: 1px solid var(--tag-line); border-radius: var(--radius-pill); color: var(--tag-ink); background: var(--tag-fill); font-size: 0.8rem; font-weight: 700; }
.band-person__invite { margin: 0; }
.band-linkbutton { padding: 0.6rem 0; border: 0; color: var(--accent); background: none; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.band-invite { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.band-invite__label, .band-invite__note { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.9rem; }
.band-invite__note { margin: 0.6rem 0 0; }
.band-invite__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.band-invite__form { margin: 0; }
.band-invite__link { display: grid; gap: 0.5rem; margin-bottom: 0.8rem; padding: 0.8rem; border: 1px solid var(--selected-line); border-radius: var(--radius-control); background: var(--selected-fill-quiet); }
.band-invite__link p { margin: 0; }
.band-invite__link code { overflow-wrap: anywhere; }
.band-home__footnote { margin: 0; color: var(--muted); font-size: 0.9rem; }
.band-home__footnote a { color: var(--accent); }

@media (max-width: 64rem) {
  .band-hero { grid-template-columns: minmax(0, 1fr); }
  .band-hero__list { border-top: 1px solid var(--rule); border-left: 0; }
  .band-home__columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .band-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .band-header__actions { justify-content: flex-start; }
  .band-header__actions > .button { flex: 1 1 auto; justify-content: center; }
  .band-hero__title { align-items: flex-start; }
  .band-date { min-width: 4.4rem; padding: 0.4rem 0.5rem; }
  .band-date__day { font-size: 1.9rem; }
  /* The primary action sits in the thumb's reach: full width, tall target, first in the row. */
  .band-hero__actions > .band-stage { flex: 1 1 100%; min-height: 3.25rem; justify-content: center; }
  .band-hero__actions > .button:not(.band-stage) { flex: 1 1 0; justify-content: center; }
  .band-home[data-band-home-ready] .band-hero__list:not([data-expanded]) .band-order__row:nth-child(n + 5) { display: none; }
  .band-home[data-band-home-ready] .band-order__toggle { display: block; }
  /* People before songs on a phone: who is playing is the next question after what. */
  .band-home__columns { display: flex; flex-direction: column; }
  .band-home__side { display: contents; }
  .band-people { order: 1; }
  .band-songs { order: 2; }
  .band-recent { order: 3; }
  .band-home[data-band-home-ready] .band-songlist > li:nth-child(n + 6) { display: none; }
  .band-card__foot { justify-content: flex-start; }
}
