:root {
  --bg: #081018;
  --bg-soft: #111925;
  --panel: rgba(18, 24, 34, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef4fa;
  --muted: #9cafc2;
  --accent: #ff7a18;
  --accent-soft: rgba(255, 122, 24, 0.16);
  --cyan: #5ad5ff;
  --green: #90ea91;
  --yellow: #ffd76c;
  --red: #ff8e78;
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-3: rgba(255, 255, 255, 0.05);
  --outline-soft: rgba(255, 255, 255, 0.05);
  --outline-mid: rgba(255, 255, 255, 0.08);
  --outline-strong: rgba(255, 255, 255, 0.14);
  --accent-cyan-soft: rgba(90, 213, 255, 0.08);
  --accent-cyan-mid: rgba(90, 213, 255, 0.16);
  --accent-orange-soft: rgba(255, 122, 24, 0.12);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sheet-bg: #0c1117;
  --sheet-border: rgba(255, 255, 255, 0.08);
  --sheet-text: #eef4fa;
  --sheet-chords: #ffd7b6;
}

body[data-theme="day"] {
  --bg: #eef3f8;
  --bg-soft: #dde6ef;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(16, 24, 34, 0.05);
  --border: rgba(16, 24, 34, 0.1);
  --text: #102030;
  --muted: #617588;
  --accent-soft: rgba(255, 122, 24, 0.14);
  --surface-1: rgba(16, 24, 34, 0.03);
  --surface-2: rgba(16, 24, 34, 0.05);
  --surface-3: rgba(16, 24, 34, 0.07);
  --outline-soft: rgba(16, 24, 34, 0.08);
  --outline-mid: rgba(16, 24, 34, 0.1);
  --outline-strong: rgba(16, 24, 34, 0.14);
  --accent-cyan-soft: rgba(90, 213, 255, 0.1);
  --accent-cyan-mid: rgba(90, 213, 255, 0.18);
  --accent-orange-soft: rgba(255, 122, 24, 0.12);
  --shadow: 0 18px 44px rgba(16, 24, 34, 0.12);
}

body[data-sheet-theme="light"] {
  --sheet-bg: #fffaf2;
  --sheet-border: rgba(16, 24, 34, 0.08);
  --sheet-text: #1c2430;
  --sheet-chords: #9a4700;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(90, 213, 255, 0.12), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 122, 24, 0.12), transparent 22%),
    linear-gradient(180deg, #071019 0%, #0a121c 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
}

body[data-theme="day"] {
  background:
    radial-gradient(circle at top left, rgba(90, 213, 255, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 122, 24, 0.08), transparent 22%),
    linear-gradient(180deg, #f4f7fb 0%, #e9f0f7 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

#app {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  padding: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

body[data-theme="day"] .library-toolbar,
body[data-theme="day"] .library-list-panel,
body[data-theme="day"] .details-panel,
body[data-theme="day"] .edit-data-panel,
body[data-theme="day"] .edit-song-panel,
body[data-theme="day"] .edit-command-bar,
body[data-theme="day"] .edit-card,
body[data-theme="day"] .backtrack-panel,
body[data-theme="day"] .public-card,
body[data-theme="day"] .performer-briefing,
body[data-theme="day"] .performer-vote-card,
body[data-theme="day"] .performer-queue-card,
body[data-theme="day"] .performer-meta-strip,
body[data-theme="day"] .performer-display-strip,
body[data-theme="day"] .preview-surface {
  background: var(--panel-soft);
  border-color: var(--border);
}

body[data-theme="day"] .library-toolbar {
  background: var(--surface-0);
}

body[data-theme="day"] .preview-surface.performer,
body[data-theme="day"] .preview-surface.public {
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
}

.public-performer-nav {
  display: flex;
  justify-content: center;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.public-performer-nav .topbar-nav {
  justify-content: center;
}

.public-performer-nav .nav-icon-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 16px;
  font-size: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #ffc08f);
  color: #111;
}

.brand-copy,
.screen-meta,
.song-copy,
.empty-state {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-copy strong,
.screen-title,
.song-title,
.metric strong,
.card-title,
.performer-song strong,
.public-head strong {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
}

.card-title {
  font-size: 1.15rem;
  line-height: 1.2;
}

.song-title {
  font-size: 1.08rem;
  line-height: 1.25;
}

.muted,
.brand-copy span,
.section-kicker,
.screen-meta span,
.song-artist,
.meta-line,
.metric span,
.card-copy,
.public-kicker,
.footer-note {
  color: var(--muted);
}

.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.song-artist,
.card-copy {
  font-size: 0.98rem;
  line-height: 1.45;
}

.btn-row,
.screen-actions,
.hero-metrics,
.song-meta,
.control-row,
.toolbar-group,
.vote-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-nav {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.topbar-nav-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.topbar-nav-group.app-zone {
  position: relative;
  margin-left: 18px;
  padding-left: 18px;
}

.topbar-nav-group.app-zone::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  border-radius: 999px;
  background: var(--outline-strong);
  opacity: 0.7;
}

.btn {
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
  font-size: 0.98rem;
  line-height: 1.2;
  font-weight: 500;
}

.btn.primary {
  color: #111;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #ffbf88);
}

.btn.active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.38);
}

.btn:hover {
  border-color: rgba(255, 122, 24, 0.34);
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 600;
}

.action-icon-btn {
  min-width: 46px;
  min-height: 46px;
  font-size: 1.12rem;
}

.nav-icon-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-icon-btn.active {
  background: linear-gradient(180deg, rgba(255, 122, 24, 0.22), rgba(255, 122, 24, 0.12));
  border-color: rgba(255, 122, 24, 0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.18);
}

body[data-theme="day"] .nav-icon-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(233, 240, 247, 0.95));
  border-color: rgba(67, 95, 128, 0.22);
}

body[data-theme="day"] .nav-icon-btn.active {
  background: linear-gradient(180deg, rgba(255, 233, 217, 1), rgba(255, 242, 232, 1));
  border-color: rgba(255, 122, 24, 0.32);
}

.landing {
  display: grid;
  gap: 16px;
}

.live-home {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: clamp(14px, 2vh, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.58fr);
  gap: clamp(14px, 1.8vw, 24px);
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 146, 66, 0.16), transparent 28%),
    radial-gradient(circle at 74% 18%, rgba(70, 207, 255, 0.14), transparent 24%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg) 58%, rgba(255, 146, 66, 0.08) 100%);
}

.live-countdown-home {
  grid-template-columns: 1fr;
  place-items: stretch;
}

.live-countdown-panel {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(12px, 2vh, 22px);
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 122, 24, 0.34), transparent 22%),
    radial-gradient(circle at 50% 42%, rgba(90, 213, 255, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(8, 16, 24, 0.96), rgba(25, 12, 4, 0.94));
}

.live-countdown-panel::before,
.live-countdown-panel::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: countdownPulse 1s ease-in-out infinite;
  z-index: -1;
}

.live-countdown-panel::after {
  inset: 22%;
  border-color: rgba(255, 122, 24, 0.22);
  animation-delay: 0.18s;
}

.live-countdown-copy {
  display: grid;
  gap: 4px;
}

.live-countdown-copy strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 4vw, 4rem);
  line-height: 1;
}

.live-countdown-copy span,
.live-countdown-panel p {
  color: var(--muted);
  font-weight: 800;
}

.live-countdown-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(9rem, 26vw, 24rem);
  line-height: 0.78;
  letter-spacing: -0.12em;
  color: #fff7ef;
  text-shadow:
    0 0 24px rgba(255, 122, 24, 0.58),
    0 0 90px rgba(90, 213, 255, 0.28);
  animation: countdownHit 1s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.live-countdown-riff {
  display: grid;
  grid-template-columns: repeat(6, minmax(24px, 60px));
  align-items: end;
  justify-content: center;
  gap: 10px;
  height: 72px;
}

.live-countdown-riff span {
  display: block;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd7b6, #ff7a18);
  box-shadow: 0 0 22px rgba(255, 122, 24, 0.36);
  animation: riffMeter 0.72s ease-in-out infinite alternate;
}

.live-countdown-riff span:nth-child(2) { animation-delay: 0.08s; }
.live-countdown-riff span:nth-child(3) { animation-delay: 0.16s; }
.live-countdown-riff span:nth-child(4) { animation-delay: 0.24s; }
.live-countdown-riff span:nth-child(5) { animation-delay: 0.32s; }
.live-countdown-riff span:nth-child(6) { animation-delay: 0.4s; }

.live-stage-home {
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.55fr) minmax(260px, 0.52fr);
}

.live-stage-card,
.live-stage-main {
  min-height: 0;
  overflow: hidden;
}

.live-stage-card {
  padding: clamp(18px, 2vw, 30px);
  display: grid;
  gap: clamp(14px, 2vh, 22px);
  align-content: space-between;
}

.live-stage-participation {
  align-content: start;
}

.live-stage-card > strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.25rem, 2vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.live-stage-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 750;
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
}

.live-stage-next,
.live-stage-empty {
  display: grid;
  gap: 6px;
  border: 1px solid var(--outline);
  background: var(--surface-2);
  border-radius: 22px;
  padding: 16px;
}

.live-stage-next span,
.live-stage-next small {
  color: var(--muted);
  font-weight: 800;
}

.live-stage-next strong,
.live-stage-empty strong {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  line-height: 1.05;
}

.live-stage-main {
  padding: clamp(16px, 1.8vw, 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 1.3vh, 16px);
}

.live-stage-title {
  display: grid;
  gap: 4px;
  text-align: center;
}

.live-stage-title h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.live-stage-title span {
  color: var(--muted);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-stage-lyrics {
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 26px;
  border: 1px solid var(--outline);
  background: var(--surface-2);
  color: var(--text);
  padding: clamp(20px, 2.5vw, 40px);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(1.15rem, 1.65vw, 1.95rem);
  line-height: 1.62;
}

.live-stage-lyrics .section-line {
  color: var(--cyan);
}

.live-stage-vote-list {
  display: grid;
  gap: 10px;
}

.live-stage-podium-feature {
  align-self: start;
}

.live-stage-vote-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--outline);
  background: var(--surface-2);
}

.live-stage-vote-row span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-weight: 950;
}

.live-stage-vote-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-stage-vote-row small {
  color: var(--muted);
  font-weight: 750;
}

.live-stage-vote-row.top {
  border-color: rgba(255, 122, 24, 0.48);
  box-shadow: 0 0 30px rgba(255, 122, 24, 0.12);
}

.live-stage-instructions,
.live-stage-phone-card,
.live-stage-singers-card,
.live-stage-pulse-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--outline);
  background: linear-gradient(145deg, var(--surface-2), rgba(255, 122, 24, 0.07));
  border-radius: 24px;
  padding: 16px;
}

.live-stage-instructions strong,
.live-stage-phone-card strong,
.live-stage-singers-card strong {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  font-size: clamp(1.1rem, 1.45vw, 1.45rem);
  line-height: 1.05;
}

.live-stage-phone-card span,
.live-stage-singers-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-stage-singers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-stage-singers-card.searching {
  animation: volunteerPulse 1.2s ease-in-out infinite;
  border-color: rgba(255, 122, 24, 0.72);
}

.live-stage-singers-list small {
  display: inline-flex;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  padding: 7px 10px;
  font-weight: 900;
}

.live-stage-pulse-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin-top: auto;
}

.live-stage-pulse-card span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #25dc42;
  box-shadow: 0 0 22px rgba(37, 220, 66, 0.7);
}

.live-stage-pulse-card.paused span {
  background: #ff9b4a;
  box-shadow: 0 0 18px rgba(255, 155, 74, 0.52);
}

.live-end-home {
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
}

.live-end-hero,
.live-end-contact {
  min-height: 0;
  overflow: hidden;
}

.live-end-hero {
  display: grid;
  align-content: space-between;
  gap: clamp(18px, 3vh, 34px);
  padding: clamp(34px, 5vw, 86px);
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 122, 24, 0.22), transparent 26%),
    radial-gradient(circle at 82% 72%, rgba(90, 213, 255, 0.16), transparent 28%),
    var(--surface);
}

.live-end-copy {
  display: grid;
  gap: clamp(12px, 2vh, 22px);
  max-width: 880px;
}

.live-end-copy h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 6vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.live-end-copy p {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.55rem);
  line-height: 1.35;
  font-weight: 750;
}

.live-end-share-card,
.live-end-mini-card {
  border: 1px solid var(--outline);
  background:
    linear-gradient(135deg, rgba(255, 146, 66, 0.16), transparent 58%),
    var(--surface-2);
  border-radius: 28px;
  padding: clamp(18px, 2.2vw, 30px);
}

.live-end-share-card {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.live-end-share-card span,
.live-end-mini-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-end-share-card strong,
.live-end-contact > strong {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
}

.live-end-share-card strong {
  font-size: clamp(1.45rem, 2.2vw, 2.4rem);
  line-height: 1;
}

.live-end-share-card p,
.live-end-mini-card p,
.live-end-contact p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

.live-end-contact {
  display: grid;
  align-content: center;
  gap: clamp(14px, 2vh, 24px);
  padding: clamp(28px, 3vw, 54px);
}

.live-end-contact > strong {
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.live-end-contact-list {
  display: grid;
  gap: 10px;
}

.live-end-contact-list span {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--outline);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--text);
  font-weight: 850;
}

@keyframes countdownHit {
  0% { transform: scale(0.86) rotate(-1deg); opacity: 0.2; }
  18% { transform: scale(1.04) rotate(0deg); opacity: 1; }
  100% { transform: scale(0.96); opacity: 0.9; }
}

@keyframes countdownPulse {
  0% { transform: scale(0.82); opacity: 0.72; }
  100% { transform: scale(1.2); opacity: 0; }
}

@keyframes volunteerPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 122, 24, 0);
    border-color: rgba(255, 122, 24, 0.26);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 122, 24, 0.22);
    border-color: rgba(255, 122, 24, 0.72);
  }
}

@keyframes riffMeter {
  from { transform: scaleY(0.45); opacity: 0.62; }
  to { transform: scaleY(2.35); opacity: 1; }
}

body:not([data-theme="day"]) .live-home {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 122, 24, 0.2), transparent 28%),
    radial-gradient(circle at 74% 18%, rgba(90, 213, 255, 0.16), transparent 24%),
    linear-gradient(135deg, #071019 0%, #0b1018 58%, #171008 100%);
}

body:not([data-theme="day"]) .live-home-hero,
body:not([data-theme="day"]) .live-home-side {
  background: rgba(13, 19, 28, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
}

body:not([data-theme="day"]) .live-home-steps span,
body:not([data-theme="day"]) .live-home-vote-note,
body:not([data-theme="day"]) .live-home-playlists > div,
body:not([data-theme="day"]) .live-end-share-card,
body:not([data-theme="day"]) .live-end-mini-card {
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
}

.live-home-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.7fr);
  grid-template-areas:
    "hero side"
    "bottom bottom";
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 24px);
}

.live-home-bottom {
  display: grid;
  gap: 18px;
  min-width: 0;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.45fr);
  grid-area: bottom;
}

.live-home-hero {
  min-height: 0;
  grid-area: hero;
}

.live-home > .live-home-hero {
  grid-area: auto;
  padding: clamp(24px, 2.8vw, 54px);
  position: relative;
  overflow: hidden;
}

.live-home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(250px, 31vw);
  gap: clamp(18px, 2vw, 34px);
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.live-home-hero-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.live-home .hero-copy {
  display: grid;
  gap: clamp(8px, 1.3vh, 16px);
  align-content: space-between;
  min-width: 0;
}

.live-home-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.live-home-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-home-side-head .section-kicker {
  margin: 0;
}

.live-home-side-head .btn-row {
  gap: 8px;
  flex-wrap: nowrap;
}

.live-rating-actions {
  margin-top: 8px;
  gap: 10px;
}

.live-rating-actions .btn {
  min-width: 0;
}

.live-home-hero-panel {
  grid-area: hero;
}

.live-home-vote-panel {
  padding: 18px 20px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.live-home-vote-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.live-home-vote-status {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-self: flex-start;
}

.live-home-public-panel {
  padding: 18px 20px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 6px;
}

.live-home-public-head {
  display: grid;
  gap: 2px;
}

.live-home-side-panel {
  grid-area: side;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  padding: 16px 18px;
}

.live-home-side {
  display: grid;
  gap: clamp(10px, 1.6vh, 18px);
  align-content: space-between;
  min-height: 0;
  padding: clamp(22px, 2.2vw, 38px);
  overflow: hidden;
}

.live-home-side > strong {
  overflow-wrap: anywhere;
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.hero-copy,
.hero-side,
.screen-list,
.library-shell,
.generic-shell {
  padding: 20px;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.25vw, 4.1rem);
  line-height: 1.02;
  max-width: 18ch;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 54ch;
  line-height: 1.35;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
}

.hero-metrics {
  margin-top: clamp(2px, 1vh, 10px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.live-home-hero-media {
  min-height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5, 8, 14, 0.12) 0%, rgba(5, 8, 14, 0.72) 100%),
    radial-gradient(circle at 30% 20%, rgba(255, 191, 136, 0.32), transparent 28%),
    radial-gradient(circle at 72% 24%, rgba(90, 213, 255, 0.18), transparent 24%),
    linear-gradient(135deg, #2a1a10 0%, #141922 45%, #0d1017 100%);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.home-concert-card {
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: grid;
  align-content: end;
  isolation: isolate;
  border: 1px solid var(--outline-strong);
  background: var(--surface-2);
}

.home-concert-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.home-concert-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 8, 14, 0.06) 0%, rgba(5, 8, 14, 0.82) 100%);
}

.home-concert-card > div {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.home-concert-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 1.6vw, 1.6rem);
}

.home-concert-card span {
  color: rgba(233, 241, 248, 0.86);
  line-height: 1.35;
  max-width: 42ch;
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 0;
}

.qr-box img {
  display: block;
  width: min(100%, 230px, 28vh);
  height: auto;
  border: 1px solid var(--outline-strong);
  background: #fff;
}

.live-home-theme {
  position: static;
  width: 52px;
  height: 52px;
  min-width: 52px;
}

.live-home-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.live-home-steps span,
.live-home-vote-note,
.live-home-playlists > div {
  border: 1px solid var(--outline);
  background:
    linear-gradient(135deg, rgba(255, 146, 66, 0.16), transparent 58%),
    var(--surface-2);
  border-radius: 20px;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 800;
}

.live-home-steps span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 8px 6px;
  text-align: center;
  font-size: clamp(0.82rem, 1.05vw, 1rem);
  line-height: 1.05;
}

.live-home-playlists {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.live-home-playlists > div,
.live-home-vote-note,
.live-home-side-top {
  display: grid;
  gap: 4px;
}

.live-home-side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-home-side-heading .section-kicker {
  margin: 0;
}

.live-home-playlists span,
.live-home-playlists small,
.live-home-vote-note span,
.live-home-vote-note small,
.live-home-side-top span {
  color: var(--muted);
  font-weight: 700;
}

.live-home-vote-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
  font-weight: 700;
  white-space: normal;
}

.live-home-playlists strong,
.live-home-vote-note strong {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
}

.live-home-playlists strong {
  overflow: visible;
  white-space: normal;
  line-height: 1.1;
}

.live-home-vote-note small {
  line-height: 1.35;
}

.live-home-side-top > strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  line-height: 1.05;
}

.live-home-metrics .metric {
  min-width: 0;
}

.live-home-metrics .metric strong {
  overflow-wrap: anywhere;
}

.live-home-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-home-hero-media-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 6px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(5, 8, 14, 0) 0%, rgba(5, 8, 14, 0.78) 100%);
}

.live-home-hero-media-overlay strong {
  font-family: "Space Grotesk", sans-serif;
}

.live-home-hero-media-overlay span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.home-public-lyrics {
  margin: 0;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
  line-height: 1.55;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
}

.live-connection-card,
.live-rating-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

.live-connection-card {
  justify-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}

.live-qr-wrap {
  display: grid;
  place-items: center;
  padding: 0;
  width: 100%;
  background: transparent;
  border: 0;
  margin: 0;
}

.live-qr-code {
  width: 164px;
  height: 164px;
  object-fit: contain;
  background: white;
}

.guide-shell {
  min-height: 100vh;
}

.guide-slide {
  min-height: calc(100vh - 40px);
  padding: 20px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
}

.guide-corner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.guide-slide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.guide-hero-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.guide-hero-copy h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 2.5vw, 3rem);
  line-height: 0.96;
  max-width: 13ch;
}

.guide-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-hero-media {
  position: relative;
  min-height: 240px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--outline-mid);
}

.guide-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 6px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(5, 8, 14, 0) 0%, rgba(5, 8, 14, 0.8) 100%);
}

.guide-hero-overlay strong {
  font-family: "Space Grotesk", sans-serif;
  color: #f6fbff;
}

.guide-slide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide-cycle-card,
.guide-podium-card,
.guide-public-preview {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.guide-step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px 14px;
  border-radius: 20px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
}

.guide-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent-orange-soft);
  border: 1px solid rgba(255, 122, 24, 0.24);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}

.guide-slide-bottom {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1fr;
  gap: 14px;
}

.guide-cycle-card {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.guide-cycle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-cycle-step {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
}

.guide-cycle-step p,
.guide-step-card .card-copy {
  margin: 0;
}

.guide-cycle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-cyan-soft);
  border: 1px solid var(--accent-cyan-mid);
  color: var(--cyan);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-public-preview {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.guide-public-lyrics {
  min-height: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
  overflow: auto;
}

.live-connection-code {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(90, 213, 255, 0.08);
  border: 1px solid rgba(90, 213, 255, 0.16);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.vote-hero.compact,
.vote-podium.compact {
  padding: 14px;
}

.metric,
.info-card,
.screen-card {
  flex: 1 1 160px;
  min-width: 160px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.hero-side {
  display: grid;
  gap: 16px;
}

.screen-list {
  display: grid;
  gap: 16px;
}

.screen-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  width: 100%;
  color: var(--text);
}

.screen-card.active {
  background: rgba(255, 122, 24, 0.12);
  border-color: rgba(255, 122, 24, 0.35);
}

.library-layout {
  display: grid;
  gap: 20px;
}

.library-toolbar,
.library-summary,
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.library-toolbar {
  margin-bottom: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-radius: 24px;
  background: var(--surface-1);
  border: 1px solid var(--outline-soft);
}

.library-search {
  display: grid;
  gap: 12px;
  flex: 1 1 480px;
}

.library-search-inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.library-summary {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.library-results-summary {
  min-width: max-content;
}

.library-playlist-summary {
  justify-content: space-between;
  align-items: stretch;
  min-width: 0;
}

.library-primary-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 620px;
  min-width: min(100%, 420px);
  flex-wrap: nowrap;
}

.library-toolbar-search {
  flex: 1 1 420px;
  min-width: 0;
  border-radius: 18px;
  background: var(--surface-2);
  border-color: var(--outline-soft);
}

.library-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--outline-soft);
  white-space: nowrap;
}

.library-mode-switch .btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.05rem;
}

.library-playlist-summary .performer-playlist-picker {
  min-width: 0;
  flex: 0 1 260px;
}

.library-playlist-summary .library-instrument-picker {
  flex: 0 0 220px;
}

.library-playlist-pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 520px);
  flex: 0 1 520px;
}

.library-playlist-pair .performer-playlist-picker {
  flex: 1 1 0;
}

@media (max-width: 980px), (orientation: portrait) {
  .library-playlist-summary {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .library-primary-filters,
  .library-playlist-pair {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .library-playlist-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .library-playlist-pair .performer-playlist-picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
  }

  .library-playlist-pair .performer-playlist-picker .search-input {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .library-primary-filters {
    flex-wrap: nowrap;
  }

  .library-toolbar-search {
    flex: 1 1 auto;
    min-width: 0;
  }

  .library-playlist-summary .library-instrument-picker {
    flex: 0 0 220px;
  }
}

.library-playlist-summary .performer-playlist-picker .search-input {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.library-playlist-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
}

.library-playlist-picker span {
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}

.library-playlist-picker .search-input {
  min-width: 180px;
  width: auto;
}

.search-mode {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.library-list-panel,
.details-panel {
  padding: 22px;
}

.library-list-panel {
  display: grid;
  gap: 10px;
}

.library-subbar {
  display: block;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--surface-1);
  border: 1px solid var(--outline-soft);
}

.pagination-bar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 10px;
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  border-radius: 16px;
  background: transparent;
}

.pagination-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  min-width: 0;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.pagination-controls .btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.78rem;
  border-radius: 13px;
  font-size: 0.92rem;
}

.pagination-status {
  margin-right: 0;
}

.vote-control-panel,
.vote-top-grid,
.vote-inline-panel {
  display: grid;
  gap: 16px;
}

.vote-top-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.vote-hero,
.vote-podium,
.vote-cycle-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--outline-strong);
}

.vote-hero {
  display: grid;
  gap: 14px;
}

.vote-cycle-card {
  display: grid;
  gap: 14px;
}

.vote-podium {
  display: grid;
  gap: 12px;
}

.podium-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
}

.podium-row.top-1 {
  background: rgba(255, 122, 24, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.36);
}

.podium-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-family: "Space Grotesk", sans-serif;
}

.search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.4;
}

.settings-instruments-textarea {
  min-height: 158px;
  resize: vertical;
}

.song-story-editor {
  min-height: 130px;
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.search-input:focus,
.search-input:focus-visible {
  outline: none;
  border-color: rgba(90, 213, 255, 0.38);
  box-shadow: 0 0 0 3px rgba(90, 213, 255, 0.12);
}

.lyric-editor,
.partition-sheet pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
  font-variant-ligatures: none;
}

.lyric-editor {
  min-height: min(44vh, 460px);
  resize: vertical;
  line-height: 1.55;
  font-size: 1rem;
}

.alpha-nav {
  display: grid;
  grid-template-columns: repeat(26, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
}

.alpha-nav button {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--outline-strong);
}

.alpha-nav button.active {
  background: rgba(90, 213, 255, 0.16);
  color: var(--text);
  border-color: rgba(90, 213, 255, 0.3);
}

.song-list {
  display: grid;
  gap: 10px;
  max-height: 64vh;
  overflow: auto;
}

.song-row {
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--outline-strong);
  display: grid;
  gap: 14px;
  color: var(--text);
}

body[data-theme="day"] .alpha-nav button,
body[data-theme="day"] .song-row {
  border-color: rgba(16, 24, 34, 0.14);
}

body[data-theme="day"] .library-toolbar-search,
body[data-theme="day"] .library-mode-switch,
body[data-theme="day"] .library-instrument-picker .search-input {
  background: var(--panel-soft);
  border-color: rgba(16, 24, 34, 0.14);
}

body[data-theme="day"] .artist-divider {
  background: var(--panel);
  box-shadow: 0 10px 18px rgba(148, 163, 184, 0.18);
}

.artist-divider {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 8px 2px;
  margin: 0;
  background: var(--panel);
  box-shadow: 0 10px 16px rgba(3, 7, 12, 0.2);
}

.artist-divider span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(90, 213, 255, 0.14);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
}

.song-row.active {
  background: rgba(255, 122, 24, 0.12);
  border-color: rgba(255, 122, 24, 0.34);
}

.song-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.song-row.active .song-row-main {
  grid-template-columns: minmax(0, 1fr);
}

.song-row-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  color: var(--text);
  text-align: left;
  background: transparent;
  padding: 0;
  flex: 1;
}

.song-row .song-meta {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.song-meta-stacked {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.song-meta-line {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.song-row .chip {
  padding: 6px 9px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.song-title-duration {
  color: var(--muted);
  font-weight: 600;
}

.playlist-toggle {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.playlist-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 44px));
  gap: 8px;
  align-items: center;
}

.song-row-button-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.song-row.active .song-row-button-line {
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--outline-soft);
}

.song-row-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.song-row-inline-actions .action-icon-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
}

.playlist-toggle.vote-list.active,
.list-chip-vote {
  border-color: rgba(255, 160, 54, 0.95);
  background: linear-gradient(135deg, rgba(255, 160, 54, 0.42), rgba(255, 160, 54, 0.2));
  box-shadow: 0 0 0 2px rgba(255, 160, 54, 0.25), 0 10px 22px rgba(255, 160, 54, 0.16);
}

.playlist-toggle.show-list.active,
.list-chip-show {
  border-color: rgba(90, 213, 255, 0.95);
  background: linear-gradient(135deg, rgba(90, 213, 255, 0.34), rgba(90, 213, 255, 0.16));
  box-shadow: 0 0 0 2px rgba(90, 213, 255, 0.22), 0 10px 22px rgba(90, 213, 255, 0.14);
}

.song-row-detail {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.song-row-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.song-row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.briefing-anchor {
  display: grid;
  gap: 10px;
}

.briefing-trigger {
  background: rgba(90, 213, 255, 0.12);
  color: var(--text);
}

.briefing-popover {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(8, 14, 20, 0.92);
  border: 1px solid rgba(90, 213, 255, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

body[data-theme="day"] .briefing-popover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(90, 213, 255, 0.24);
  box-shadow: 0 12px 28px rgba(16, 24, 34, 0.14);
}

.briefing-popover p,
.briefing-popover ul {
  margin: 0;
}

.briefing-popover ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 10px;
}

.chip {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.2;
}

.chip.alert {
  color: var(--yellow);
  background: rgba(255, 215, 108, 0.12);
}

.chip.guitar {
  color: var(--red);
  background: rgba(255, 142, 120, 0.12);
}

.card-block {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.edit-form-grid,
.edit-form-grid-small {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.edit-layout {
  padding: 22px;
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.edit-command-bar,
.edit-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.02);
  border-radius: 28px;
}

.edit-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}

.edit-command-bar strong,
.edit-card-heading strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.edit-command-bar span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.edit-command-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.edit-command-actions.compact {
  gap: 8px;
}

.edit-action-separator {
  width: 1px;
  height: 42px;
  margin-inline: 4px;
  background: var(--line);
}

.edit-partition-focus {
  gap: 12px;
}

.edit-partition-focus .edit-lyrics-card .lyric-editor {
  min-height: min(78vh, 980px);
}

.edit-review-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 520px) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  box-sizing: border-box;
  border-radius: 24px;
  border: 1px solid rgba(90, 213, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(90, 213, 255, 0.12), rgba(255, 122, 24, 0.05)),
    var(--panel-soft);
}

.edit-review-bar strong,
.edit-review-bar span {
  display: block;
  min-width: 0;
}

.edit-review-bar > div,
.edit-review-bar select {
  min-width: 0;
}

.edit-review-bar span {
  margin-top: 3px;
  color: var(--muted);
}

.edit-review-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  justify-self: center;
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  min-width: 0;
}

.edit-review-select .search-input {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.edit-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.edit-sections-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.edit-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  min-width: 0;
}

.edit-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.edit-card-heading .chip {
  white-space: nowrap;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.edit-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-grid.performer-settings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edit-grid .wide {
  grid-column: span 2;
}

.edit-ai-note,
.edit-empty-state {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(90, 213, 255, 0.08);
  color: var(--muted);
}

.edit-ai-note {
  display: grid;
  gap: 4px;
}

.edit-story-tools {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.edit-story-tools span {
  display: block;
  margin-top: 3px;
}

.edit-story-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.edit-ai-note strong {
  color: var(--text);
}

.edit-backtrack-add {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 10px;
  align-items: center;
}

.edit-backtracks-list {
  display: grid;
  gap: 10px;
}

.edit-backtrack-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(200px, 0.55fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.edit-backtrack-row > span {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.edit-layout input[type="file"] {
  max-width: 100%;
  color: var(--muted);
}

.edit-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.edit-batch-import {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 24px;
  border: 1px solid rgba(90, 213, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(90, 213, 255, 0.1), rgba(255, 122, 24, 0.04)),
    rgba(255, 255, 255, 0.02);
}

.edit-import-panel {
  position: static;
  align-content: start;
  grid-auto-rows: max-content;
  z-index: auto;
  max-width: none;
  width: 100%;
  max-height: none;
  margin: 0;
  overflow: visible;
  isolation: auto;
  background:
    linear-gradient(135deg, rgba(90, 213, 255, 0.08), rgba(255, 122, 24, 0.05)),
    #111925;
  box-shadow: none;
}

body[data-theme="day"] .edit-import-panel {
  background:
    linear-gradient(135deg, rgba(90, 213, 255, 0.08), rgba(255, 122, 24, 0.05)),
    #f8fbff;
  border-color: rgba(16, 24, 34, 0.14);
  box-shadow: none;
}

.edit-import-mode .edit-sections-grid,
.edit-import-mode .edit-review-bar,
.edit-import-mode .edit-backtracks-card,
.edit-import-mode .edit-lyrics-card {
  display: none;
}

.edit-batch-import > div:first-child span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.edit-batch-import code {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
}

.edit-batch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
}

.edit-batch-grid .batch-patterns {
  grid-column: 1 / -1;
}

.edit-batch-grid .batch-patterns small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.batch-playlist-hint {
  align-self: end;
  margin: 0 0 10px;
}

.import-directory-picker,
.import-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.import-path-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.import-path-row.locked {
  grid-template-columns: minmax(0, 1fr);
}

.import-path-row code {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-toggle.compact {
  align-self: center;
  margin-bottom: 0;
}

.import-step-actions {
  align-items: center;
  gap: 8px;
}

.import-step-actions .compact-action {
  min-height: 42px;
  padding: 10px 16px;
  white-space: nowrap;
}

.batch-result-section {
  display: grid;
  gap: 6px;
}

.batch-result-list {
  display: grid;
  gap: 6px;
  max-height: min(620px, 58vh);
  overflow: auto;
}

.batch-result-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--line);
}

.batch-result-row {
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.batch-result-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.batch-result-select strong,
.batch-result-select small,
.batch-result-row.error strong,
.batch-result-row.error span {
  display: block;
  min-width: 0;
}

.batch-result-select small,
.batch-result-row.error span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.batch-result-row.error {
  border-color: rgba(255, 105, 105, 0.35);
  background: rgba(255, 105, 105, 0.08);
}

.edit-import-source,
.edit-import-preview {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.import-preview-box {
  min-height: 360px;
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--sheet-bg);
  color: var(--sheet-text);
  font-family: "IBM Plex Mono", "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
  line-height: 1.5;
  white-space: pre-wrap;
}

.edit-lyrics-card {
  gap: 14px;
}

.edit-lyrics-card .lyric-editor {
  min-height: min(72vh, 900px);
}

.edit-preview-surface {
  margin-top: 0;
}

.edit-preview-panel {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.edit-preview-toggle {
  position: relative;
}

.edit-preview-toggle.active {
  border-color: rgba(90, 213, 255, 0.9);
  background: linear-gradient(135deg, rgba(90, 213, 255, 0.34), rgba(255, 122, 24, 0.18));
  box-shadow:
    0 0 0 3px rgba(90, 213, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.edit-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.edit-preview-header strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.edit-preview-panel .preview-surface {
  min-height: min(62vh, 720px);
  max-height: 78vh;
  border-color: rgba(90, 213, 255, 0.58);
  box-shadow:
    0 0 0 3px rgba(90, 213, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.edit-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-form-grid-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.edit-form-grid-small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edit-field {
  display: grid;
  gap: 8px;
}

.edit-field span {
  font-size: 0.92rem;
  color: var(--muted);
}

.compact-field {
  min-width: 160px;
}

.edit-single-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(360px, 2fr) repeat(3, minmax(72px, 84px));
  gap: 12px;
  align-items: end;
}

.title-field {
  min-width: 0;
}

.artist-field {
  min-width: 0;
}

.compact-number {
  min-width: 78px;
  max-width: 104px;
}

.edit-header-panel {
  background: rgba(255, 255, 255, 0.03);
}

.edit-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.edit-topbar-group {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.edit-topbar-group .btn-row {
  margin-left: auto;
  justify-content: flex-end;
}

.edit-nav-row {
  margin-left: auto;
  justify-content: flex-end;
}

.edit-topbar-group.align-left {
  justify-content: flex-start;
}

.edit-action-label {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.edit-title {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.edit-artist {
  font-size: 1.05rem;
}

.edit-content-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.015) 100%);
  gap: 22px;
}

.edit-meta-strip {
  background: rgba(90, 213, 255, 0.06);
  border-color: rgba(90, 213, 255, 0.12);
}

.edit-data-panel,
.edit-song-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--outline-soft);
}

.edit-data-panel .edit-field span,
.edit-song-panel .edit-field span,
.backtrack-panel .section-kicker,
.edit-song-panel .section-kicker,
.edit-data-panel .section-kicker {
  font-size: 0.95rem;
}

.edit-data-panel {
  background: rgba(255, 122, 24, 0.03);
  border-color: rgba(255, 122, 24, 0.12);
}

.edit-song-panel {
  background: rgba(255, 122, 24, 0.03);
  border-color: rgba(255, 122, 24, 0.12);
}

.settings-hero-preview {
  min-height: 280px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--outline-strong);
  background: var(--surface-3);
}

.settings-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--outline-strong);
  background: var(--surface-2);
}

.settings-toggle-row input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

.settings-toggle-row span {
  display: grid;
  gap: 4px;
}

.settings-toggle-row strong {
  font-size: 1rem;
  color: var(--text);
}

.settings-toggle-row small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.backtrack-panel,
.performer-backtrack-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--outline-soft);
}

.backtrack-list,
.backtrack-chip-row {
  display: grid;
  gap: 10px;
}

.backtrack-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.backtrack-row-fixed {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
}

.backtrack-label-block {
  display: grid;
  gap: 4px;
}

.backtrack-label-block strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
}

.backtrack-label-block span {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
  word-break: break-word;
}

.backtrack-file-button {
  position: relative;
  overflow: hidden;
}

.performer-backtrack-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backtrack-type {
  min-width: 0;
}

.performer-backtrack-select {
  width: auto;
  min-width: 180px;
}

.import-dialog {
  width: min(1180px, 100%);
}

.import-dialog-grid {
  display: grid;
  gap: 16px;
  min-height: 0;
}

.import-text-block {
  min-width: 0;
}

.compact-number .search-input,
.compact-field .search-input {
  padding: 10px 12px;
}

.title-field .search-input {
  min-height: 60px;
  font-size: 1.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.edit-textarea {
  min-height: 140px;
  resize: vertical;
  font-size: 1rem;
  line-height: 1.5;
}

.edit-textarea-large {
  min-height: 240px;
  resize: vertical;
  font-size: 1rem;
  line-height: 1.5;
}

.edit-textarea-xlarge {
  min-height: 420px;
  resize: vertical;
  font-size: 1.02rem;
  line-height: 1.6;
}

.readonly-field {
  opacity: 0.88;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: default;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.import-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.import-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.syntax-help-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(90, 213, 255, 0.08);
  border: 1px solid rgba(90, 213, 255, 0.18);
  margin-bottom: 16px;
}

.compact-number span {
  font-size: 0.78rem;
}

.compact-number .search-input {
  text-align: center;
}

.syntax-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.syntax-help-card code,
.syntax-help-card pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
}

.syntax-help-card pre {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(5, 9, 13, 0.55);
  overflow: auto;
}

.edit-mode-switch {
  margin-bottom: 16px;
}

.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 10, 0.74);
  backdrop-filter: blur(10px);
}

.preview-dialog {
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  padding: 18px;
  display: grid;
  gap: 16px;
  overflow: auto;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.preview-surface {
  min-height: 56vh;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  --sheet-chords: #c96a14;
}

.preview-surface.performer {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 122, 24, 0.05), transparent 14%),
    linear-gradient(180deg, #080d12 0%, #05090d 100%);
  color: var(--sheet-text);
  --sheet-chords: #ffd7b6;
}

.preview-surface.performer.dark {
  background: var(--sheet-night-bg, #0c1117);
  color: var(--sheet-night-text, #eef4fa);
  --sheet-text: var(--sheet-night-text, #eef4fa);
  --sheet-chords: var(--sheet-night-chords, #ffd7b6);
}

.preview-surface.performer.light {
  background: var(--sheet-light-bg, #fffaf2);
  color: var(--sheet-light-text, #1c2430);
  --sheet-text: var(--sheet-light-text, #1c2430);
  --sheet-chords: var(--sheet-light-chords, #9a4700);
}

body[data-sheet-theme="light"] .preview-surface.performer,
body[data-sheet-theme="light"] .preview-surface.public {
  background: var(--sheet-light-bg, var(--sheet-bg));
  color: var(--sheet-light-text, #1c2430);
  --sheet-text: var(--sheet-light-text, #1c2430);
  --sheet-chords: var(--sheet-light-chords, #9a4700);
  border-color: var(--sheet-border);
}

body[data-sheet-theme="dark"] .preview-surface.performer {
  background: var(--sheet-night-bg, #0c1117);
  color: var(--sheet-night-text, #eef4fa);
  --sheet-text: var(--sheet-night-text, #eef4fa);
  --sheet-chords: var(--sheet-night-chords, #ffd7b6);
}

.preview-surface.public {
  max-width: 560px;
  justify-self: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

body[data-theme="day"] .preview-surface.performer {
  --sheet-chords: var(--sheet-light-chords, #9a4700);
}

.preview-surface pre {
  margin: 0;
  white-space: pre-wrap;
  line-height: var(--performer-line-height, 1.62);
  font-family: "IBM Plex Mono", "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
  color: inherit;
}

.performer-layout {
  height: calc(100vh - 40px);
  min-height: calc(100vh - 40px);
  padding: 6px;
}

.performer-stage {
  height: calc(100vh - 12px);
  min-height: calc(100vh - 12px);
  position: relative;
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 122, 24, 0.06), transparent 14%),
    linear-gradient(180deg, #080d12 0%, #05090d 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 14px;
  padding-right: 76px;
  overflow: hidden;
}

body[data-theme="day"] .performer-stage {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 122, 24, 0.08), transparent 16%),
    linear-gradient(180deg, #fbfdff 0%, #edf3f9 100%);
  border-color: rgba(16, 24, 34, 0.08);
}

.performer-topbar,
.performer-subbar,
.performer-footer,
.public-topbar,
.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.performer-brand-copy strong {
  font-size: 2rem;
}

.section-badge {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(90, 213, 255, 0.12);
  color: var(--cyan);
}

.tempo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(90, 213, 255, 0.1);
  color: var(--text);
  font-weight: 850;
  line-height: 1;
  flex: 0 0 auto;
}

.performer-briefing {
  flex: 0 0 auto;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.performer-vote-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.performer-vote-card,
.performer-queue-card {
  min-height: 0;
  max-height: 310px;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.performer-vote-card.winner {
  background: rgba(255, 122, 24, 0.12);
  border-color: rgba(255, 122, 24, 0.28);
}

.performer-vote-card strong,
.queue-row strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.04rem;
  line-height: 1.2;
}

.queue-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  max-height: 218px;
  overflow-y: auto;
  padding-right: 4px;
}

.queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.performer-singer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-row.active {
  background: rgba(90, 213, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(90, 213, 255, 0.22);
}

.queue-row.played {
  opacity: 0.62;
}

.queue-row.winner {
  background: rgba(255, 215, 108, 0.12);
}

.performer-briefing ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.partition-sheet {
  min-height: 0;
  height: auto;
  flex: 0 0 calc(100vh - 150px);
  max-height: calc(100vh - 150px);
  padding: 26px 30px;
  border-radius: 26px;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
  overflow-y: auto;
  overflow-x: hidden;
}

.partition-sheet.light {
  background: var(--sheet-light-bg, #fffaf2);
  color: var(--sheet-light-text, #1c2430);
  --sheet-text: var(--sheet-light-text, #1c2430);
  --sheet-chords: var(--sheet-light-chords, #9a4700);
}

.partition-sheet.dark {
  background: var(--sheet-night-bg, #0c1117);
  color: var(--sheet-night-text, #eef4fa);
  --sheet-text: var(--sheet-night-text, #eef4fa);
  --sheet-chords: var(--sheet-night-chords, #ffd7b6);
}

.partition-sheet pre {
  margin: 0;
  white-space: pre-wrap;
  line-height: var(--performer-line-height, 1.62);
  font-size: var(--performer-font, 1.62rem);
  color: var(--sheet-text);
}

.scroll-speed-field {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--outline-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.scroll-speed-field input {
  width: 58px;
  min-height: 34px;
  border-radius: 14px;
  border: 1px solid var(--outline-strong);
  background: var(--surface-1);
  color: var(--text);
  text-align: center;
  font: inherit;
  font-size: 1rem;
}

.public-scroll-speed-field {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  height: 48px;
  gap: 0;
  padding: 0;
  border-radius: 14px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  white-space: nowrap;
}

.public-scroll-speed-field input {
  width: 42px;
  min-height: 42px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.performer-main {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.performer-main > .topbar {
  order: 0;
}

.performer-vote-strip {
  order: 1;
}

.performer-live-lists-strip {
  order: 2;
}

.performer-backtrack-strip {
  order: 6;
}

.performer-current-song {
  order: 7;
}

.performer-next-singalong-strip {
  order: 5;
}

.performer-meta-strip {
  order: 4;
}

.performer-briefing {
  order: 5;
}

.performer-actions-strip {
  order: 3;
}

.partition-sheet {
  order: 8;
}

.performer-side-rail {
  display: grid;
  grid-template-rows: repeat(10, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
  justify-items: stretch;
  align-self: start;
  position: absolute;
  right: 8px;
  top: 14px;
  bottom: 14px;
  transform: none;
  width: 62px;
  height: calc(100dvh - 28px);
  z-index: 6;
}

.rail-button {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 7px 5px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
}

body[data-theme="day"] .rail-button {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(16, 24, 34, 0.18);
}

.rail-button.is-disabled,
.rail-button:disabled {
  opacity: 0.45;
}

.rail-button.backtrack-risk {
  border-color: rgba(255, 45, 45, 0.95);
  box-shadow:
    inset 0 0 0 2px rgba(255, 45, 45, 0.72),
    0 0 0 2px rgba(255, 45, 45, 0.18);
}

.rail-button strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.rail-button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rail-position {
  height: 100%;
  min-height: 0;
  padding: 7px 5px;
  border-radius: 18px;
  background: rgba(90, 213, 255, 0.08);
  border: 1px solid rgba(90, 213, 255, 0.16);
  color: var(--text);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
}

.rail-position strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.rail-position span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.performer-meta-strip,
.performer-display-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface-1);
  border: 1px solid var(--outline-soft);
}

.performer-meta-strip .chip,
.performer-display-strip .chip {
  background: rgba(255, 255, 255, 0.04);
}

.performer-backtrack-strip {
  margin-top: 10px;
  flex-wrap: nowrap;
}

.performer-backtrack-control-group {
  flex: 1 1 auto;
  min-width: 0;
}

.performer-scroll-control-group {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.backtrack-file-chip {
  max-width: min(40vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performer-scroll-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.backtrack-status {
  color: var(--text);
  font-weight: 800;
}

.performer-backtrack-select {
  min-width: 150px;
  max-width: 220px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.scroll-speed-inline-input {
  width: 48px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--outline-strong);
  background: var(--surface-1);
  color: var(--text);
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.lyrics-focus .topbar,
.lyrics-focus .performer-vote-strip,
.lyrics-focus .performer-live-lists-strip,
.lyrics-focus .performer-actions-strip,
.lyrics-focus .performer-meta-strip,
.lyrics-focus .performer-current-song,
.lyrics-focus .performer-briefing {
  display: none;
}

.lyrics-focus .partition-sheet {
  min-height: 0;
  flex-basis: calc(100vh - 150px);
  max-height: calc(100vh - 150px);
}

.live-toggle-alert {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 62, 62, 0.95), rgba(178, 20, 20, 0.92));
  border-color: rgba(255, 120, 120, 0.85);
  box-shadow: 0 0 0 0 rgba(255, 62, 62, 0.55);
  animation: livePulse 1.05s ease-in-out infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 62, 62, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 62, 62, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 62, 62, 0);
  }
}

.performer-meta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.performer-song-info-strip {
  align-items: center;
}

.performer-song-info-content {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  container-type: inline-size;
}

.performer-song-info-strip .performer-meta-group {
  flex: 0 1 auto;
  align-self: center;
}

.performer-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.performer-info-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 max-content;
  margin-left: auto;
}

.performer-info-pills .tempo-pill {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

@container (max-width: 680px) {
  .performer-info-pills {
    justify-content: flex-start;
  }

  .performer-info-pills .tempo-pill {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
  }
}

.performer-capo-button {
  margin-left: auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.performer-briefing-inline {
  display: grid;
  gap: 6px;
  color: var(--muted);
  min-width: 0;
}

.performer-briefing-inline strong {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

.performer-briefing-inline ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  line-height: 1.45;
}

.active-chip {
  color: var(--text);
  font-weight: 900;
}

.reference-chip {
  text-decoration: underline;
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.22em;
}

.transposition-mode-button strong {
  font-size: 0.88rem;
}

.performer-info-title {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  align-self: center;
}

.performer-info-line {
  align-items: stretch;
  min-width: 0;
  flex-wrap: nowrap;
}

.performer-info-line .chip {
  padding: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}

.performer-song-story-strip {
  display: grid;
  gap: 8px;
}

.performer-song-story-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.performer-actions-strip {
  justify-content: flex-start;
}

.performer-action-blocks {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.performer-action-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--outline-soft);
}

.performer-action-block-secondary {
  opacity: 0.92;
}

.performer-action-block-primary {
  margin-left: auto;
}

.performer-live-lists-strip {
  align-items: center;
}

.performer-live-lists-group {
  flex: 1 1 auto;
  min-width: 0;
}

.performer-live-controls-group {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.performer-list-count {
  font-size: 0.84rem;
  color: var(--muted);
  background: transparent !important;
  border-color: var(--outline-soft);
}

.performer-scroll-chip {
  font-size: 0.84rem;
  color: var(--muted);
}

.performer-playlist-label {
  font-size: 0.96rem;
  color: var(--muted);
  white-space: nowrap;
}

.performer-playlist-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.performer-playlist-picker .search-input {
  min-width: 190px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.performer-current-song {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(90, 213, 255, 0.12), rgba(255, 122, 24, 0.06)),
    var(--surface-1);
  border: 1px solid rgba(90, 213, 255, 0.18);
}

.performer-current-song > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.performer-current-song .section-kicker {
  margin: 0;
}

.performer-current-song strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.performer-current-song span {
  color: var(--muted);
  font-size: 0.95rem;
}

.performer-current-singer {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text) !important;
  padding: 6px 10px;
  font-weight: 900;
  white-space: nowrap;
}

.performer-next-singalong-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 122, 24, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.16), rgba(90, 213, 255, 0.08)),
    var(--surface-2);
}

.performer-next-singalong-strip.searching {
  animation: volunteerPulse 1.2s ease-in-out infinite;
}

.performer-next-singalong-strip span,
.performer-next-singalong-strip small {
  color: var(--muted);
  font-weight: 900;
}

.performer-next-song-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.performer-next-song-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.12rem;
}

.performer-next-song-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performer-next-singalong-strip .performer-current-singer {
  justify-self: end;
}

.performer-queue-toggle {
  min-width: 140px;
  justify-content: center;
  text-align: center;
}

.risk-line {
  display: block;
  margin: 0.2em 0 0.6em;
  color: var(--yellow);
  font-weight: 700;
}

.riff-line {
  color: inherit;
}

.riff-block,
.tab-block {
  display: block;
  margin: 0.35em 0 0.9em;
  padding: 0.45em 0.65em;
  border-radius: 14px;
  background: rgba(90, 213, 255, 0.08);
  border: 1px solid rgba(90, 213, 255, 0.18);
}

.riff-sequence-line,
.tab-line {
  display: block;
  font-family: "IBM Plex Mono", "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
  white-space: pre-wrap;
}

.riff-sequence-line {
  color: var(--sheet-text);
}

.tab-line {
  color: var(--sheet-text);
}

.inline-chords {
  color: var(--sheet-chords);
}

.chord-token {
  color: var(--sheet-chords);
  font-weight: 800;
}

.alert-line {
  color: var(--yellow);
  font-weight: 800;
}

.above-chords {
  color: var(--sheet-chords);
}

.above-pair,
.above-line,
.above-gap {
  display: block;
}

.above-pair {
  margin-bottom: calc(var(--performer-line-height, 1.62) * 0.55em);
}

.above-line-chords {
  display: inline;
  margin: 0;
  line-height: inherit;
  color: var(--sheet-chords);
  font-size: 1em;
  font-weight: 800;
}

.above-chord-cell {
  display: inline-block;
  width: 1ch;
}

.above-chord-glyph {
  display: inline-block;
  font-size: calc(var(--above-chord-scale, 0.75) * 1em);
  line-height: 1;
  transform: translateY(0.16em);
  transform-origin: left bottom;
}

.color-input {
  width: 100%;
  min-height: 54px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--outline-strong);
  background: var(--surface-2);
  cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 12px;
}

.color-input::-moz-color-swatch {
  border: 0;
  border-radius: 12px;
}

.above-line-lyrics {
  line-height: 1.15;
}

.above-line-solo {
  margin-bottom: calc(var(--performer-line-height, 1.62) * 0.4em);
}

.above-gap {
  height: calc(var(--performer-line-height, 1.62) * 0.45em);
}

.section-line {
  display: inline;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

.public-layout,
.generic-layout {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px;
}

@media (min-width: 760px) {
  .public-layout {
    max-width: min(760px, calc(100vw - 48px));
  }
}

.public-stage,
.generic-stage {
  min-height: calc(100vh - 28px);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.public-card,
.vote-list,
.settings-list,
.sacem-list {
  padding: 18px;
  border-radius: 24px;
  background: var(--surface-2);
  border: 1px solid var(--outline-soft);
}

.public-card {
  display: grid;
  gap: 14px;
}

.settings-color-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--outline-soft);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(90, 213, 255, 0.08), rgba(255, 122, 24, 0.05)),
    var(--surface-2);
}

.settings-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 12px;
  align-items: end;
}

.compact-color {
  min-height: 46px;
}

.settings-sheet-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-sheet-preview {
  min-height: 240px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.02rem;
  line-height: 1.35;
  overflow: hidden;
}

.settings-sheet-preview p {
  margin: 0 0 10px;
}

.settings-sheet-preview.night {
  color: var(--preview-sheet-night-text, #eef4fa);
  background:
    radial-gradient(circle at top left, rgba(90, 213, 255, 0.12), transparent 34%),
    var(--preview-sheet-night-bg, #080d12);
}

.settings-sheet-preview.day {
  color: var(--preview-sheet-light-text, #1c2430);
  background:
    radial-gradient(circle at top left, rgba(90, 213, 255, 0.1), transparent 36%),
    var(--preview-sheet-light-bg, #fffaf2);
  border-color: rgba(16, 24, 34, 0.14);
}

.preview-mode {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.preview-section {
  color: var(--accent);
  font-size: 1.18rem;
  font-weight: 800;
}

.preview-chord {
  display: block;
  color: var(--preview-sheet-light-chords, #9a4700);
  font-weight: 900;
}

.settings-sheet-preview.night .preview-chord {
  color: var(--preview-sheet-night-chords, #ffd7b6);
}

.preview-riff {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(90, 213, 255, 0.12);
}

.public-lyrics-card {
  min-height: 0;
}

.public-hero {
  display: grid;
  gap: 14px;
}

.public-hero.open {
  background: rgba(90, 213, 255, 0.08);
  border-color: rgba(90, 213, 255, 0.16);
}

.public-hero.closed {
  background: rgba(255, 215, 108, 0.08);
  border-color: rgba(255, 215, 108, 0.16);
}

.public-hero.played {
  background: rgba(144, 234, 145, 0.08);
  border-color: rgba(144, 234, 145, 0.16);
}

.public-waiting-card {
  min-height: min(52vh, 520px);
  place-content: center;
  text-align: center;
}

.public-waiting-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 8vw, 3.8rem);
  line-height: 1;
}

.public-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-singalong-card {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.14), transparent 58%),
    var(--surface-2);
  border-color: rgba(255, 122, 24, 0.26);
}

.public-singalong-card.searching {
  animation: volunteerPulse 1.2s ease-in-out infinite;
}

.public-singalong-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.public-highlight strong,
.public-vote-row strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.04rem;
  line-height: 1.2;
}

.public-vote-board {
  display: grid;
  gap: 12px;
}

.public-vote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
}

.public-vote-row .control-row {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0;
}

.public-vote-row.top {
  background: rgba(255, 122, 24, 0.14);
  border-color: rgba(255, 122, 24, 0.3);
}

.public-head {
  display: grid;
  gap: 4px;
}

.public-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.public-lyrics {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: var(--public-font, 1.35rem);
  color: var(--text);
  padding-bottom: 2.2rem;
}

.public-lyrics-scroll {
  max-height: min(56vh, 620px);
  overflow-y: auto;
  overflow-x: hidden;
}

.public-font-controls {
  display: grid;
  grid-template-columns: repeat(6, 48px);
  justify-content: end;
  gap: 8px;
  align-items: center;
}

.public-font-button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}

.public-font-controls .public-scroll-speed-field {
  width: 48px;
  min-width: 48px;
  height: 48px;
}

.public-lyrics .section-line {
  display: block;
  margin: 0.45em 0 0.15em;
}

.vote-buttons,
.settings-list,
.sacem-list {
  display: grid;
}

.vote-list {
  gap: 12px;
}

.vote-button,
.list-row {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
  color: var(--text);
  text-align: left;
}

.vote-button.voted,
.list-row.active {
  background: rgba(255, 122, 24, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.35);
}

.vote-button {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.vote-button small {
  color: var(--muted);
  font-size: 0.72em;
  line-height: 1;
}

.playlist-panel,
.playlist-grid {
  display: grid;
  gap: 12px;
}

.playlist-live-selectors,
.playlist-open-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.playlist-open-row {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  padding: 12px;
  border-radius: 22px;
  background: var(--surface-1);
  border: 1px solid var(--outline-soft);
}

.playlist-open-select {
  min-width: 0;
}

.playlist-action-group {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.playlist-pagination {
  margin-bottom: 0;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.playlist-row-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.settings-list,
.sacem-list {
  gap: 12px;
}

.sacem-panel {
  display: grid;
  align-items: stretch;
  gap: 16px;
}

.sacem-live-panel {
  padding-block: 14px;
}

.sacem-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.sacem-report-line {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) auto auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--outline-strong);
}

.sacem-report-line.active {
  border-color: rgba(255, 122, 24, 0.6);
  background: rgba(255, 122, 24, 0.12);
}

.sacem-playlist-name {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sacem-report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 980px) {
  .sacem-report-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sacem-report-line .chip,
  .sacem-playlist-name {
    justify-self: start;
  }

  .sacem-report-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.range {
  width: 180px;
}

.is-hidden {
  display: none;
}

.auth-shell {
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(520px, 100%);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

@media (max-width: 1100px) {
  .topbar {
    gap: 12px;
  }

  .topbar > .btn-row {
    flex: 0 1 auto;
    justify-content: flex-end;
    min-width: 0;
  }

  .topbar-nav,
  .topbar-nav-group {
    gap: 6px;
  }

  .topbar-nav-group.app-zone {
    margin-left: 14px;
    padding-left: 14px;
  }

  .nav-icon-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 16px;
    font-size: 1.28rem;
  }

  .settings-color-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .live-home {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .live-home-grid,
  .hero,
  .library-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "side"
      "bottom";
  }

  .guide-grid,
  .guide-cycle-grid {
    grid-template-columns: 1fr;
  }

  .live-home-bottom,
  .guide-slide-hero,
  .guide-slide-grid,
  .guide-slide-bottom,
  .guide-cycle-grid {
    grid-template-columns: 1fr;
  }

  .live-home-hero-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .live-home-vote-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .live-home-vote-status {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .performer-vote-strip {
    grid-template-columns: 1fr;
  }

  .performer-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 10px;
    padding-right: 66px;
  }

  .performer-side-rail {
    width: 50px;
    right: 8px;
    top: 10px;
    bottom: 10px;
    height: calc(100dvh - 20px);
    gap: 6px;
  }

  .rail-button,
  .rail-position {
    border-radius: 15px;
    padding: 6px 3px;
  }

  .rail-button strong,
  .rail-position strong {
    font-size: 0.98rem;
  }

  .rail-button span,
  .rail-position span {
    display: none;
  }

  .performer-live-lists-strip {
    gap: 10px;
    padding: 8px 10px;
  }

  .performer-live-lists-group {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .performer-playlist-picker {
    gap: 6px;
  }

  .performer-playlist-picker .search-input {
    min-width: 150px;
    max-width: 185px;
    padding-left: 12px;
    padding-right: 28px;
  }

  .performer-live-controls-group {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .performer-live-controls-group .action-icon-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .performer-action-blocks {
    gap: 8px;
  }

  .performer-action-block {
    gap: 5px;
  }

  .performer-song-info-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .vote-top-grid {
    grid-template-columns: 1fr;
  }

  .edit-sections-grid,
  .edit-import-grid {
    grid-template-columns: 1fr;
  }

  .edit-grid,
  .edit-grid.performer-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edit-grid .wide {
    grid-column: span 1;
  }

  .edit-backtrack-row {
    grid-template-columns: 96px minmax(0, 1fr) minmax(180px, 0.7fr) auto;
  }

  .playlist-live-selectors,
  .playlist-open-row {
    grid-template-columns: 1fr;
  }

  .playlist-open-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
  }

  .playlist-action-group {
    justify-content: flex-end;
    align-self: end;
    display: grid;
    grid-template-columns: repeat(4, 42px);
    gap: 8px;
  }

  .playlist-action-group .action-icon-btn {
    min-width: 42px;
    min-height: 42px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .alpha-nav {
    grid-template-columns: repeat(13, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell,
  .performer-layout,
  .public-layout,
  .generic-layout {
    padding: 10px;
  }

  .settings-sheet-preview-grid {
    grid-template-columns: 1fr;
  }

  .settings-color-grid,
  .edit-story-tools {
    grid-template-columns: 1fr;
  }

  .edit-story-actions {
    justify-content: flex-start;
  }

  .topbar,
  .screen-card,
  .song-row-head,
  .song-row-detail-top,
  .library-toolbar,
  .pagination-bar,
  .performer-topbar,
  .performer-meta-strip,
  .performer-display-strip,
  .performer-subbar,
  .performer-footer,
  .public-topbar,
  .public-footer,
  .list-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .edit-layout {
    padding: 12px;
  }

  .edit-command-bar,
  .edit-card-heading,
  .edit-backtrack-row {
    grid-template-columns: 1fr;
  }

  .edit-command-bar {
    align-items: start;
  }

  .edit-command-actions {
    justify-content: flex-start;
  }

  .edit-review-bar {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .edit-review-select {
    max-width: none;
  }

  .edit-review-select .search-input {
    min-width: 0;
    max-width: none;
  }

  .edit-review-actions {
    justify-content: flex-start;
  }

  .edit-grid,
  .edit-grid.two,
  .edit-grid.performer-settings {
    grid-template-columns: 1fr;
  }

  .edit-batch-grid,
  .batch-result-row {
    grid-template-columns: 1fr;
  }

  .edit-card {
    padding: 14px;
    border-radius: 22px;
  }

  .edit-import-panel {
    width: 100%;
    max-height: none;
  }

  .edit-backtrack-add {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .edit-backtrack-row {
    gap: 8px;
  }

  .import-preview-box {
    min-height: 260px;
  }

  .performer-backtrack-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .library-playlist-summary {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .library-primary-filters {
    flex: 1 1 100%;
    min-width: 100%;
    flex-wrap: nowrap;
  }

  .library-playlist-summary .library-toolbar-search {
    flex: 1 1 auto;
    min-width: 0;
  }

  .library-playlist-summary .library-instrument-picker {
    flex: 0 0 190px;
  }

  .library-playlist-pair {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .song-row-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .song-row-inline-actions {
    justify-content: flex-start;
  }

  .song-row.active .song-row-button-line {
    align-items: center;
    flex-wrap: wrap;
  }

  .song-row .song-meta {
    justify-content: flex-start;
  }

  .song-meta-stacked,
  .song-meta-line {
    justify-content: flex-start;
  }

  .list-row {
    align-items: flex-start;
  }

  .playlist-row-actions {
    justify-items: end;
  }

  .performer-info-row .tempo-pill {
    align-self: flex-start;
  }

  .performer-backtrack-strip .performer-meta-group:last-child {
    align-self: center;
  }

  .topbar-nav {
    justify-content: flex-start;
  }

  .public-performer-nav .topbar-nav {
    justify-content: center;
  }

  .public-stage {
    padding: 10px;
    gap: 10px;
  }

  .public-card {
    padding: 14px;
    border-radius: 22px;
    gap: 10px;
  }

  .public-hero {
    gap: 10px;
  }

  .public-highlight {
    gap: 8px;
    flex-wrap: wrap;
  }

  .public-singalong-card,
  .public-singalong-form {
    grid-template-columns: 1fr;
  }

  .public-lyrics {
    padding-bottom: 0.8rem;
  }

  .public-font-controls {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .public-font-button,
  .public-font-controls .public-scroll-speed-field {
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    border-radius: 14px;
  }

  .public-font-button {
    font-size: 1.24rem;
  }

  .public-vote-board {
    gap: 8px;
  }

  .public-vote-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .public-vote-row strong {
    font-size: 0.98rem;
  }

  .public-vote-row .song-artist {
    font-size: 0.86rem;
    line-height: 1.15;
  }

  .public-vote-row .control-row {
    display: grid;
    grid-template-columns: 82px;
    gap: 0;
  }

  .public-vote-row .vote-button {
    width: 82px;
    padding: 9px 0;
    text-align: center;
    border-radius: 16px;
    font-size: 0.95rem;
  }

  .nav-icon-btn {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 1.3rem;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .guide-hero-copy h1 {
    max-width: 100%;
  }

  .guide-slide {
    min-height: auto;
    grid-template-rows: auto;
  }

  .performer-stage {
    grid-template-columns: 1fr;
    overflow: auto;
    padding-right: 10px;
  }

  .performer-main {
    max-height: none;
    overflow: visible;
  }

  .performer-side-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    align-content: stretch;
    position: static;
    transform: none;
    top: auto;
    bottom: auto;
    max-height: none;
    width: 100%;
  }

  .alpha-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}
