/* Full-screen Stage paging intentionally lives apart from the shared chart styles. */
/* Stage is always dark: it pins EVERY token the dark blocks change, so a light appearance or a
   light share page (.share-interface also sets these, so the combined selector wins) cannot leak in. */
.setlist-stage-page,
.setlist-stage-page.share-interface {
  --bg: var(--stage-fixed-bg);
  --surface: var(--stage-fixed-surface);
  --paper: var(--stage-fixed-paper);
  --hairline: var(--stage-fixed-hairline);
  --rule: var(--stage-fixed-rule);
  --ink: var(--stage-fixed-ink);
  --muted: var(--stage-fixed-muted);
  --primary: var(--stage-fixed-primary);
  --on-primary: var(--stage-fixed-on-primary);
  --accent: var(--stage-fixed-accent);
  --danger: var(--stage-fixed-danger);
  --on-danger: var(--stage-fixed-on-danger);
  --success: var(--stage-fixed-success);
  --warning: var(--stage-fixed-warning);
  --highlight: var(--stage-fixed-highlight);
  --tint: var(--stage-fixed-tint);
  --danger-tint: var(--stage-fixed-danger-tint);
  --success-tint: var(--stage-fixed-success-tint);
  --disabled-ink: var(--stage-fixed-disabled-ink);
  --disabled-surface: var(--stage-fixed-disabled-surface);
  --focus-ring: var(--stage-fixed-focus-ring);
  --heading-rule: var(--brand-coral);
  --selected-line: var(--stage-fixed-selected-line);
  --selected-ink: var(--stage-fixed-selected-ink);
  --selected-fill: var(--stage-fixed-selected-fill);
  --selected-fill-quiet: var(--stage-fixed-selected-fill-quiet);
  --key-line: var(--stage-fixed-key-line);
  --key-ink: var(--stage-fixed-key-ink);
  --key-fill: var(--stage-fixed-key-fill);
  --tag-line: var(--stage-fixed-tag-line);
  --tag-ink: var(--stage-fixed-tag-ink);
  --tag-fill: var(--stage-fixed-tag-fill);
  --tag-neutral-line: var(--stage-fixed-tag-neutral-line);
  --row-hover: var(--stage-fixed-row-hover);
  --sidebar-bg: var(--stage-fixed-sidebar-bg);
  --sidebar-rule: var(--stage-fixed-sidebar-rule);
  --sidebar-label: var(--stage-fixed-sidebar-label);
  --sidebar-field: var(--stage-fixed-sidebar-field);
  --focus-outline: var(--stage-fixed-focus-outline);
  --shadow-floating: var(--stage-fixed-shadow-floating);
  color-scheme: dark;
  --stage-bg: var(--stage-fixed-bg);
  --stage-surface: var(--stage-fixed-surface);
  --stage-ink: var(--stage-fixed-ink);
  --stage-muted: var(--stage-fixed-muted);
  --stage-primary: var(--stage-fixed-primary);
  --stage-accent: var(--stage-fixed-accent);
  --stage-hairline: var(--stage-fixed-hairline);
  overflow: hidden;
  color: var(--stage-ink);
  background: var(--stage-bg);
}

.setlist-stage-page .setlist-stage { min-height: 100dvh; background: var(--stage-bg); }
.setlist-stage-page .chart-stage__chrome,
.setlist-stage-page .chart-stage__header { display: contents; }
.setlist-stage-page .chart-stage__header-rail,
.setlist-stage-page .stage-mode__live,
.setlist-stage-page .setlist-stage__sequence,
.setlist-stage-page .setlist-stage__details,
.setlist-stage-page .chart-navigation { display: none; }

.setlist-stage-page .chart-stage__scroller { min-height: 100dvh; padding: 0; overflow: hidden; }
/* The page is the whole screen: the shared 76rem centred column must not apply to Stage, or the paging
   container is narrower than the viewport and the next page's column shows beside it. */
.setlist-stage-page .performance-surface { position: relative; width: 100%; max-width: none; min-height: 100dvh; margin: 0; padding: 0; }
.setlist-stage-page .performance-chart {
  width: 100%;
  height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  color: var(--stage-ink);
  background: var(--stage-bg);
}
.setlist-stage-page .performance-chart::-webkit-scrollbar { display: none; }
/* Makes the scrollable width exactly pages x viewport (set by stage_paging_controller.js), so the last page aligns. */
.setlist-stage-page .performance-chart { position: relative; }
.setlist-stage-page .performance-chart::after { content: ""; position: absolute; top: 0; left: 0; width: var(--stage-scroll-width, 0); height: 1px; pointer-events: none; }
/* One page = one column. The sheet is exactly as wide as the viewport; "columns: 1" gives each page a column the
   width of the sheet's content box, and a gap of twice the side padding makes the distance from one column to the
   next exactly one viewport width. The sheet must not clip (the units sheet sets overflow-x: hidden), or the
   later columns are invisible to the pager and the page count stays 1. */
.setlist-stage-page .performance-chart .chart-sheet {
  --stage-pad: clamp(1rem, 4vw, 4rem);
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  height: 100dvh;
  padding: 5rem var(--stage-pad) 5.5rem;
  border: 0;
  overflow: visible;
  color: inherit;
  background: transparent;
  columns: 1;
  column-gap: calc(var(--stage-pad) * 2);
  column-fill: auto;
  /* Stage starts at 26px on a tablet while the Aa control still adjusts its source scale. */
  font-size: calc(var(--chart-font-size, 18px) + 8px);
}
.setlist-stage-page .performance-chart .chart-line,
.setlist-stage-page .performance-chart .chart-row { break-inside: avoid-column; }
.setlist-stage-page .performance-chart .chart-line--section {
  border-left: 0.28rem solid var(--stage-muted);
  color: var(--stage-muted);
  background: transparent;
}
.setlist-stage-page .performance-chart .chart-line--section.chart-line--now {
  border-color: var(--stage-ink);
  color: var(--stage-ink);
  background: transparent;
  box-shadow: none;
}
.setlist-stage-page .performance-chart .chart-cell--chord { color: var(--stage-accent); }

.stage-paging__status {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: 2rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.8rem;
  color: var(--stage-muted);
  background: color-mix(in srgb, var(--stage-bg) 88%, transparent);
  font-size: 0.875rem;
  transition: opacity 180ms ease;
}
.setlist-stage:not(.stage-paging--status-visible):not(.stage-paging--controls-visible) .stage-paging__status { opacity: 0; }
.setlist-stage:hover .stage-paging__status,
.setlist-stage:focus-within .stage-paging__status { opacity: 1; }
.stage-paging__note { position: fixed; z-index: 15; top: 2.25rem; right: 1rem; left: 1rem; margin: 0; color: var(--stage-ink); font-size: 1.125rem; font-weight: 600; pointer-events: none; }
.stage-paging__indicator { position: fixed; z-index: 20; right: 1rem; bottom: 0.7rem; color: var(--stage-muted); font-size: 0.8rem; }
.stage-paging__next-song { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; min-height: 3rem; padding: 0.75rem 1rem; color: var(--stage-ink); background: var(--stage-surface); text-align: center; }

.setlist-stage-page .performance-controls,
.stage-paging__controls {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  border: 1px solid var(--stage-hairline);
  color: var(--stage-ink);
  background: color-mix(in srgb, var(--stage-surface) 96%, transparent);
}
.setlist-stage-page .performance-controls { display: none; }
.stage-paging--controls-visible .performance-controls { display: block; }
.stage-paging__controls { bottom: 0; }
.stage-paging__control-rail,
.setlist-stage-page .performance-controls__rail { display: flex; min-height: 4rem; align-items: stretch; justify-content: center; gap: 0.5rem; padding: 0.5rem; }
.stage-paging__control-rail > *,
.setlist-stage-page .performance-control__trigger,
.stage-paging__setlist > summary { display: inline-flex; min-width: 4rem; min-height: 4rem; align-items: center; justify-content: center; padding: 0.5rem 1rem; border: 1px solid var(--stage-hairline); border-radius: var(--radius-control); color: inherit; background: var(--stage-surface); font: inherit; text-decoration: none; cursor: pointer; }
.stage-paging__setlist > summary { list-style: none; }
.stage-paging__setlist > summary::-webkit-details-marker { display: none; }
.stage-paging__setlist nav { position: absolute; right: 0.5rem; bottom: 4.75rem; display: grid; min-width: min(22rem, calc(100vw - 1rem)); max-height: 60dvh; overflow: auto; border: 1px solid var(--stage-hairline); border-radius: var(--radius-card); background: var(--stage-surface); }
.stage-paging__setlist nav a { padding: 1rem; color: inherit; text-decoration: none; }
.stage-paging__setlist nav a[aria-current="page"] { color: var(--stage-bg); background: var(--stage-ink); }
.setlist-stage-page .performance-control__overlay { bottom: 100%; min-width: 11rem; }

/* Legible controls on the Stage surfaces: every button, option and overlay takes the stage ink/surface pair
   (both themes), never the light-page greys or a transparent background. */
.setlist-stage-page .button,
.setlist-stage-page .button.button--secondary,
.setlist-stage-page .performance-option,
.setlist-stage-page .stage-paging__control-rail > * {
  border: 1px solid var(--stage-hairline);
  color: var(--stage-ink);
  background: var(--stage-surface);
}
.setlist-stage-page .button.button--primary {
  border-color: var(--selected-line);
  color: var(--selected-ink);
  background: var(--selected-fill);
}
/* Active options are ink chips, never amber. */
.setlist-stage-page .performance-option[aria-pressed="true"],
.setlist-stage-page .performance-option[aria-current="true"] {
  border-color: var(--stage-ink);
  color: var(--stage-bg);
  background: var(--stage-ink);
}
.setlist-stage-page .performance-control__overlay {
  border-color: var(--stage-hairline);
  color: var(--stage-ink);
  background: var(--stage-surface);
  box-shadow: none;
}
.setlist-stage-page .key-option { color: var(--stage-ink); background: var(--stage-surface); border-bottom-color: var(--stage-hairline); }
.setlist-stage-page .key-option:hover { background: color-mix(in srgb, var(--stage-surface) 85%, var(--stage-ink)); }
.setlist-stage-page .key-option--selected { color: var(--stage-bg); background: var(--stage-ink); }
.setlist-stage-page .key-option__shift { color: var(--stage-muted); }
.setlist-stage-page .set-follow__button[aria-pressed="true"] { color: var(--stage-bg); border-color: var(--stage-ink); background: var(--stage-ink); }
.setlist-stage-page .set-follow__status { padding: 0 0.75rem 0.5rem; color: var(--stage-muted); }
.setlist-stage-page .stage-item-card { color: var(--stage-ink); }
.setlist-stage-page .stage-item-card p { color: var(--stage-muted); }
.setlist-stage-page .empty-state { padding: 2rem; color: var(--stage-ink); }

.stage-paging__control-rail > .share-sheet-launch { display: inline-flex; padding: 0; border: 0; background: transparent; }
.setlist-stage-page .stage-share-trigger { min-width: 4rem; min-height: 4rem; padding: 0.5rem 1rem; border: 1px solid var(--stage-hairline); border-radius: var(--radius-control); color: var(--stage-ink); background: var(--stage-surface); font: inherit; cursor: pointer; }

@media (max-width: 42rem) {
  .setlist-stage-page .performance-chart .chart-sheet {
    --stage-pad: 1rem;
    font-size: calc(var(--chart-font-size, 18px) + 2px);
  }
  .stage-paging__control-rail { gap: 0.25rem; }
  .stage-paging__control-rail > *, .setlist-stage-page .performance-control__trigger { min-width: 0; padding-inline: 0.6rem; font-size: 0.82rem; }
}

@media print {
  .stage-paging__status, .stage-paging__indicator, .stage-paging__next-song, .stage-paging__controls { display: none !important; }
  .setlist-stage-page .performance-chart { height: auto; overflow: visible; columns: auto; }
}

/* 320px: the Stage control rail holds up to eight 4rem buttons; let it wrap instead of pushing the page wide. */
.stage-paging__control-rail,
.setlist-stage-page .performance-controls__rail { flex-wrap: wrap; }
.stage-paging__setlist nav a,
.stage-paging__note,
.stage-mode__live strong { overflow-wrap: anywhere; }
@media (max-width: 30rem) {
  .stage-paging__control-rail > *,
  .setlist-stage-page .performance-control__trigger,
  .stage-paging__setlist > summary { min-width: 3rem; min-height: 3rem; padding: 0.4rem 0.6rem; }
}

/* Always-reachable Stage controls: Exit (top left), Previous / page count / Next / More (bottom). They fade after a
   few idle seconds (.stage-paging--idle) and return on any pointer move, tap or key; the page counter stays. */
.stage-paging__exit,
.stage-paging__nav,
.stage-paging__hint { transition: opacity 220ms ease, visibility 220ms ease; }
.stage-paging__exit {
  position: fixed;
  z-index: 40;
  top: calc(0.5rem + env(safe-area-inset-top));
  left: calc(0.5rem + env(safe-area-inset-left));
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1px solid var(--stage-hairline);
  border-radius: var(--radius-control);
  color: var(--stage-ink);
  background: var(--stage-surface);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}
.stage-paging__exit .icon { width: 1.4rem; height: 1.4rem; flex: none; }
.stage-paging__nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--stage-bg) 92%, transparent);
  border-top: 1px solid var(--stage-hairline);
}
.stage-paging__nav-button {
  min-width: 6.5rem;
  min-height: 3.25rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--stage-hairline);
  border-radius: var(--radius-control);
  color: var(--stage-ink);
  background: var(--stage-surface);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.stage-paging__nav-button:disabled { color: var(--stage-muted); border-color: var(--stage-rule); background: transparent; cursor: default; }
.stage-paging__nav-button:not(:disabled):hover { border-color: var(--stage-ink); }
.stage-paging__nav-more { min-width: 5rem; }
.stage-paging__nav-count { display: inline-flex; min-width: 5.5rem; align-items: center; justify-content: center; color: var(--stage-ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stage-paging__hint {
  position: fixed;
  z-index: 40;
  right: 1rem;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  left: 1rem;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--stage-hairline);
  border-radius: var(--radius-control);
  color: var(--stage-ink);
  background: var(--stage-surface);
  font-size: 0.95rem;
  text-align: center;
}
.setlist-stage.stage-paging--idle .stage-paging__exit,
.setlist-stage.stage-paging--idle .stage-paging__nav,
.setlist-stage.stage-paging--idle .stage-paging__hint { opacity: 0; visibility: hidden; }
/* The nav bar shows the page count while visible; the quiet corner counter takes over once it fades. */
.setlist-stage:not(.stage-paging--idle) .stage-paging__indicator { opacity: 0; }
/* Status strip: leave room at the left for Exit. */
.setlist-stage-page .stage-paging__status { min-height: 3.5rem; padding-left: 8rem; }
.stage-paging__note { top: 3.75rem; }
/* The tools panel and the key / text-size row stack in one dock above the nav bar (never on top of each other).
   Both are fixed elsewhere in the shared CSS; inside the dock they flow. */
.stage-paging__dock {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  flex-direction: column-reverse;
}
.stage-paging__dock > .stage-paging__controls,
.setlist-stage-page .stage-paging__dock > .performance-controls { position: static; }
.stage-paging__dock > .stage-paging__controls,
.setlist-stage-page .stage-paging__dock > .performance-controls { background: var(--stage-surface); }
.setlist-stage-page .stage-paging__controls { padding-bottom: 0; }
.stage-paging__setlist nav { bottom: calc(100% + 0.25rem); }
.stage-paging__next-song { bottom: calc(4.75rem + env(safe-area-inset-bottom)); }

@media (max-width: 30rem) {
  .stage-paging__nav { gap: 0.3rem; padding-inline: 0.4rem; }
  .stage-paging__nav-button { min-width: 0; flex: 1 1 0; padding-inline: 0.4rem; font-size: 1rem; }
  .stage-paging__nav-count { min-width: 3.6rem; font-size: 0.95rem; }
  .setlist-stage-page .stage-paging__status { padding-left: 6.5rem; }
}
/* Landscape phone: little height, so smaller margins around the page. */
@media (max-height: 30rem) {
  .setlist-stage-page .performance-chart .chart-sheet {
    padding-top: calc(3.25rem + env(safe-area-inset-top));
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
    font-size: calc(var(--chart-font-size, 18px) + 2px);
  }
  .stage-paging__hint { display: none; }
  .setlist-stage-page .stage-paging__status { min-height: 3.25rem; }
  .stage-paging__nav-button { min-height: 2.75rem; }
  .stage-paging__exit { min-height: 2.75rem; }
  .stage-paging__dock { bottom: calc(4rem + env(safe-area-inset-bottom)); }
}
@media print {
  .stage-paging__exit, .stage-paging__nav, .stage-paging__hint { display: none !important; }
}

/* A signed-in member's Stage (setlists/stage). Under the status strip: the player's own view of the song, the band bar
   (Following ... / Step ahead), the leader's Everyone follows switch and the entry note, in one flowing block. */
.stage-top {
  position: fixed;
  z-index: 21;
  top: 3.25rem;
  right: 0;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0 0.8rem;
  pointer-events: none;
}
.stage-top > * { pointer-events: auto; }
.stage-top .stage-paging__note { position: static; flex: 1 1 100%; margin: 0; font-size: 1.05rem; pointer-events: none; }
.stage-view-line { margin: 0; color: var(--stage-muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.stage-view-line strong { color: var(--stage-ink); }
.stage-band {
  display: flex;
  flex: 1 1 100%;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.4rem 0.25rem 0.75rem;
  border: 1px solid var(--selected-line);
  border-radius: var(--radius-control);
  color: var(--selected-ink);
  background: var(--selected-fill-quiet);
  font-size: 0.95rem;
  font-weight: 650;
}
.stage-band[data-state="ahead"] { border-color: var(--stage-hairline); color: var(--stage-ink); background: var(--stage-surface); }
.stage-band__dot { width: 0.55rem; height: 0.55rem; flex: none; border-radius: 50%; background: currentColor; }
.stage-band[data-state="ahead"] .stage-band__dot { background: transparent; border: 2px solid currentColor; }
.stage-band__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.stage-band__button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--stage-hairline);
  border-radius: var(--radius-control);
  color: var(--stage-ink);
  background: var(--stage-surface);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.stage-lead { display: inline-flex; align-items: center; gap: 0.5rem; margin-left: auto; color: var(--stage-muted); font-size: 0.9rem; }
.stage-lead form { margin: 0; }
.stage-lead__switch {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 3rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid var(--stage-hairline);
  border-radius: 999px;
  background: var(--stage-surface);
  cursor: pointer;
}
/* The drawn switch is small; the tap target around it is not. */
.stage-lead__switch::after { content: ""; position: absolute; inset: -0.7rem -0.4rem; }
.stage-lead__switch span { position: absolute; top: 0.2rem; left: 0.2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--stage-muted); transition: transform 120ms ease; }
.stage-lead__switch[aria-checked="true"] { border-color: var(--selected-line); background: var(--selected-fill-quiet); }
.stage-lead__switch[aria-checked="true"] span { background: var(--stage-accent); transform: translateX(1.3rem); }
.stage-lead__take { min-height: 2.25rem; padding: 0.25rem 0.75rem; border: 1px solid var(--stage-hairline); border-radius: var(--radius-control); color: var(--stage-ink); background: var(--stage-surface); font: inherit; font-size: 0.9rem; cursor: pointer; }

/* Room for that block above the first line of the chart. */
.setlist-stage--member .performance-chart .chart-sheet { padding-top: 6.25rem; }
.setlist-stage--member.setlist-stage--band .performance-chart .chart-sheet { padding-top: 9rem; }
@media (max-height: 30rem) {
  .setlist-stage--member .performance-chart .chart-sheet { padding-top: 5.25rem; }
  .setlist-stage--member.setlist-stage--band .performance-chart .chart-sheet { padding-top: 7.5rem; }
}
.stage-paging__dock > .fg-tools { display: none; }

/* The key panel on Stage: the band's key read-only, the player's own capo and Letters | Numbers. */
.stage-key-panel { display: grid; gap: 0.75rem; padding: 0.5rem; }
.stage-key-panel form { margin: 0; display: contents; }
.stage-key-panel__band { display: flex; justify-content: space-between; gap: 1rem; margin: 0; color: var(--stage-muted); }
.stage-key-panel__band strong { color: var(--stage-ink); }
.stage-key-panel__sounds { margin: 0; color: var(--stage-muted); font-size: 0.9rem; }

/* The leader's tablet / desktop view: the running order and the players beside the chart. */
.stage-leader { display: none; }
@media (min-width: 62.5rem) {
  .stage-leader {
    position: fixed;
    z-index: 22;
    top: 4.25rem;
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
    left: 0;
    display: block;
    width: 19rem;
    padding: 0 0.9rem 1rem;
    overflow-y: auto;
    border-right: 1px solid var(--stage-hairline);
    background: var(--stage-bg);
  }
  .setlist-stage--leader .chart-stage__scroller { margin-left: 19rem; min-height: 100dvh; }
  .setlist-stage--leader .stage-top { left: 19rem; }
  .setlist-stage--leader .stage-paging__status { left: 19rem; }
}
.stage-leader__heading { margin: 1rem 0 0.4rem; color: var(--stage-muted); font-family: inherit; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.stage-leader__order, .stage-leader__players { margin: 0; padding: 0; list-style: none; }
.stage-leader__order a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--stage-ink);
  text-decoration: none;
}
.stage-leader__order a[aria-current="page"] { border-color: var(--selected-line); color: var(--selected-ink); background: var(--selected-fill-quiet); }
.stage-leader__number { width: 1.1rem; color: var(--stage-muted); font-variant-numeric: tabular-nums; text-align: right; }
.stage-leader__title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.stage-leader__key { padding: 0.05rem 0.4rem; border: 1px solid var(--key-line); border-radius: 0.4rem; color: var(--key-ink); background: var(--key-fill); font-size: 0.8rem; font-weight: 700; }
.stage-leader__players li { display: grid; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--stage-hairline); }
.stage-leader__player-name { color: var(--stage-ink); font-weight: 650; }
.stage-leader__player-view { color: var(--stage-muted); font-size: 0.88rem; }
.stage-leader__note { margin: 0.6rem 0 0; color: var(--stage-muted); font-size: 0.8rem; }

/* Member Stage: the Key and Aa panels open across the width above the control row (they were anchored to their own
   small button and ran off a phone), and the row starts at the left so the first button is under its panel. */
.setlist-stage--member .performance-controls__rail { position: relative; justify-content: flex-start; }
.setlist-stage--member .performance-control { position: static; }
.setlist-stage--member .performance-control__overlay--keys,
.setlist-stage--member .performance-control__overlay--format {
  right: 0.5rem;
  bottom: 100%;
  left: 0.5rem;
  width: auto;
  max-width: 26rem;
  min-width: 0;
}

/* Key picker for someone who may edit the set: twelve keys in a grid, and the way back to the set's key. */
.stage-key-panel__keys { align-items: start; }
.stage-key-panel__options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.3rem; flex: 1 1 auto; }
.stage-key-panel__options .key-option { display: flex; min-height: 2.75rem; align-items: center; justify-content: center; padding: 0.2rem; border: 1px solid var(--stage-hairline); border-radius: var(--radius-control); font-weight: 700; text-decoration: none; }
.stage-key-panel__reset { margin-left: 0.4rem; color: var(--stage-accent); }
.stage-band[data-state="none"], .stage-band[data-state="reconnecting"] { border-color: var(--stage-hairline); color: var(--stage-muted); background: var(--stage-surface); }
.stage-band[data-state="none"] .stage-band__dot, .stage-band[data-state="reconnecting"] .stage-band__dot { background: transparent; border: 2px solid currentColor; }
