/* ==========================================================================
   GigQ Design System — Neon Stage
   A live music request platform with dark venue aesthetics
   ========================================================================== */

/* ---------- Fonts ---------- */
/* Both families self-hosted (GENER-82) — no external hosts anywhere in the
   asset path, so js:true specs and the executor sandbox need no font egress.
   Outfit: weights 400-800 (nothing uses 900 — grep-verified).
   JetBrains Mono: weights 500 + 700, latin subset, fontsource builds. */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/jetbrains-mono-latin-500-normal-9590a15c.woff2") format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/jetbrains-mono-latin-700-normal-e3f3f7e0.woff2") format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/outfit-latin-400-normal-03a2e56b.woff2") format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/outfit-latin-500-normal-0d2c6a88.woff2") format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/outfit-latin-600-normal-4c8f4285.woff2") format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/outfit-latin-700-normal-c4172db8.woff2") format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/outfit-latin-800-normal-28eb5e8d.woff2") format('woff2'); }

/* ---------- Design Tokens ---------- */
:root {
  /* Light theme (musician dashboard) */
  --bg: #f8fafc;
  --bg-raised: #ffffff;
  --bg-sunken: #f1f5f9;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Shared accent colors */
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --cyan-glow: rgba(34, 211, 238, 0.15);
  --purple: #a855f7;
  --purple-dim: #7c3aed;
  --purple-glow: rgba(168, 85, 247, 0.15);
  --gold: #f59e0b;
  --gold-dim: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --green: #22c55e;

  /* Typography */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  /* Touch targets */
  --touch-min: 44px;
  --touch-md: 48px;
  --touch-lg: 56px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

/* Dark theme tokens */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-raised: #1e293b;
  --bg-sunken: #0b1120;
  --border: #334155;
  --border-hover: #475569;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

a {
  color: var(--cyan-dim);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--cyan);
}

[data-theme="dark"] a {
  color: var(--cyan);
}

[data-theme="dark"] a:hover {
  color: #67e8f9;
}

/* Buttons styled as links must use button colors, not link colors */
a.btn {
  color: inherit;
}

a.btn:hover {
  color: inherit;
}

a.btn--primary,
a.btn--primary:hover {
  color: #0a0e1a;
}

a.btn--purple,
a.btn--purple:hover {
  color: white;
}

a.btn--secondary {
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ---------- Layout: Container ---------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: 540px;
}

.container--wide {
  max-width: 1100px;
}

/* ---------- Layout: Dashboard Shell ---------- */
.dash-nav {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-nav__brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--cyan-dim);
  letter-spacing: -0.03em;
}

[data-theme="dark"] .dash-nav__brand {
  color: var(--cyan);
}

.dash-nav__links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  list-style: none;
}

.dash-nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

.dash-nav__links a:hover,
.dash-nav__links a.active {
  color: var(--text);
}

.dash-nav__user {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dash-main {
  padding: var(--space-2xl) 0;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  min-height: var(--touch-min);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--cyan);
  color: #0a0e1a;
  font-weight: 700;
}

.btn--primary:hover {
  background: #06b6d4;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.3);
}

.btn--secondary {
  background: var(--bg-sunken);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-raised);
}

.btn--purple {
  background: var(--purple);
  color: white;
}

.btn--purple:hover {
  background: var(--purple-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.btn--danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn--danger:hover {
  background: var(--red);
  color: white;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

.btn--sm {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  min-height: 32px;
}

.btn--lg {
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  min-height: var(--touch-md);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dark theme button overrides */
[data-theme="dark"] .btn--secondary {
  background: var(--bg-raised);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .btn--secondary:hover {
  border-color: var(--border-hover);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  min-height: var(--touch-min);
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 8 10 12 14 8'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: var(--bg-sunken);
  border-color: var(--border);
  color: var(--text);
}

.form-group small {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.form-group small code {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  color: var(--text);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
}

.form-errors {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  color: var(--red);
  font-size: 0.9rem;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge--draft {
  background: var(--bg-sunken);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge--live {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
}

.badge--ended {
  background: var(--bg-sunken);
  color: var(--text-muted);
}

.badge--boosted {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
  50% { box-shadow: 0 0 8px 2px rgba(34, 211, 238, 0.2); }
}

/* ---------- Flash Messages ---------- */
.flash {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
  animation: flash-in 0.3s var(--ease-out);
}

.flash--notice {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--green);
}

.flash--alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.page-header h1 {
  margin: 0;
}

/* ---------- Table / List Items ---------- */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  gap: var(--space-md);
  transition: background var(--duration-fast);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--bg-sunken);
}

.list-item__content {
  flex: 1;
  min-width: 0;
}

.list-item__title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.list-item__title a {
  color: inherit;
}

.list-item__title a:hover {
  color: var(--cyan-dim);
}

.list-item__subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.list-item__key {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.list-item__notes {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Beta request submissions are free text an admin needs to actually read —
   unlike the song list's compact single-line notes, don't clip them. */
.admin-beta-requests-section .list-item__notes {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
}

.list-item__music-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--cyan-dim);
  margin-top: 0.25rem;
}

.list-item__music-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ---------- Sort Toggle ---------- */
.sort-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.sort-toggle a {
  color: var(--text-secondary);
}

.sort-toggle a.is-active {
  color: var(--cyan-dim);
  font-weight: 600;
}

.list-item__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ---------- Removed (archived) songs ---------- */
/* .removed__panel is toggled by the disclosure controller's [hidden]; keep the
   paired rule next to any display here (DESIGN.md §8). */
.removed__panel[hidden] {
  display: none;
}

.removed {
  margin-top: var(--space-lg);
}

.removed__bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ---------- Bulk Select ---------- */
.bulk-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--touch-min);
  cursor: pointer;
}

.bulk-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.list-item--header {
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}

.list-item--header:hover {
  background: var(--bg-sunken);
}

.list-item--header .list-item__title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.bulk-action-bar {
  position: sticky;
  bottom: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-lg);
  margin-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  z-index: 30;
  animation: flash-in 0.2s var(--ease-out);
}

.bulk-action-bar[hidden] {
  display: none;
}

.bulk-action-bar__text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Room Code ---------- */
.room-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  background: var(--cyan-glow);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 211, 238, 0.2);
  display: inline-block;
}

[data-theme="dark"] .room-code {
  font-size: 2rem;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state__message {
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   AUDIENCE VIEW — search-first catalog (live-views-redesign)
   Spec: docs/design/live-views/README.md View B.
   ========================================================================== */

.audience-header {
  padding: 6px 16px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.audience-header__brand {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--cyan);
}

.audience-header__code {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.audience-header__code span {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.audience-artist {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.audience-artist__text {
  min-width: 0;
}

.audience-artist__text .social-links {
  margin-left: -5px;
  margin-top: var(--space-sm);
}

/* 44px hit areas holding 34px circles with 17px glyphs (View B). */
.audience-artist__text .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
}

.audience-artist__text .social-icon {
  width: 34px;
  height: 34px;
}

.audience-artist__text .social-icon svg {
  width: 17px;
  height: 17px;
}

.audience-artist__hero .avatar {
  width: 96px !important;
  height: 96px !important;
}

.audience-artist__name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.audience-artist__venue {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.audience-artist__welcome {
  font-size: 13.5px;
  color: var(--cyan);
  margin-top: 2px;
}

.audience-artist__hero {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.audience-artist__hero .avatar {
  border: 2px solid var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
}

.tip-cta {
  display: flex;
  align-items: center;
  gap: 7px;
  height: var(--touch-min);
  padding: 0 14px;
  background: #3D95CE; /* Venmo brand blue — the one sanctioned non-token color */
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(61, 149, 206, 0.4);
}

.tip-cta__icon {
  width: 15px;
  height: 15px;
}

/* ---------- Tabs (Catalog | Special Requests) ---------- */
.audience-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
}

.audience-panel {
  display: none;
}

.audience-panel.active {
  display: block;
}

/* ---------- Search ---------- */
.aud-search {
  position: relative;
  padding: 12px 16px 10px;
}

.aud-search__icon {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-44%);
  color: var(--text-secondary);
  pointer-events: none;
}

.aud-search__input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--text);
  background: var(--bg-sunken);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full); /* inputs are pill; buttons are not */
}

.aud-search__input:focus {
  outline: none;
  border-color: var(--cyan);
}

.aud-list-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px 6px;
}

.aud-list-header__rule {
  flex: 1;
  height: 1px;
  background: var(--bg-raised);
  align-self: center;
}

.aud-list-header__hint {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ---------- Catalog rows ---------- */
.aud-row .lv-row__main {
  padding: 9px 16px 9px 13px;
}

.aud-row {
  border-left: 3px solid transparent;
}

/* The whole row toggles the vote, but only where vote_row_controller is
   attached — the private request list reuses .aud-row without it. */
.aud-row[data-controller~="vote-row"] {
  cursor: pointer;
}

.aud-row.lv-row--boosted {
  border-left-color: var(--gold);
}

.aud-row .boost-names {
  padding: 0 16px 9px 13px;
}

/* Attribution inside the text column (always visible on boosted rows). */
.aud-row .boost-names--inline {
  padding: 2px 0 0;
  font-size: 13px;
}

.vote-toggle {
  flex-shrink: 0;
}

/* ---------- Inline boost confirm ---------- */
.boost-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 10px 13px;
  animation: row-in 180ms var(--ease-out);
}

/* Paired with the display above — both strips are toggled by `hidden`. */
.boost-strip[hidden] {
  display: none;
}

/* The confirm step is a sentence, not a one-word label: let it wrap. */
.boost-strip--ask {
  flex-wrap: wrap;
}

.boost-strip--ask .boost-strip__text {
  white-space: normal;
  text-align: right;
}

.aud-row.is-boost-pending {
  border-left-color: var(--gold-dim);
}

.boost-strip__text {
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.boost-strip__yes {
  height: var(--touch-min);
  padding: 0 12px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.boost-strip__no {
  height: var(--touch-min);
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- Zero-result state / the quiet ask ---------- */
/* Paired with the [hidden] rule below, and it MUST stay paired. This control is
   toggled via the `hidden` attribute, which is enforced only by the user-agent
   rule `[hidden] { display: none }` -- any author-origin `display` declaration
   (an inline style especially) silently overrides it and the element can never
   be hidden again. Same trap as .qr-sheet. */
.aud-show-all {
  display: block;
  margin: var(--space-sm) auto;
}

.aud-show-all[hidden] {
  display: none;
}

.aud-zero {
  padding: 14px 16px 18px;
}

.aud-zero__title {
  font-size: 15px;
  font-weight: 700;
}

.aud-zero__card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  margin-top: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.aud-zero__card .avatar {
  flex-shrink: 0;
  width: 34px !important;
  height: 34px !important;
  font-size: 14px;
}

.aud-zero__quote {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  text-wrap: pretty;
  margin: 0;
}

.aud-zero__card--panel {
  margin: 12px 16px;
}

.audience-request-btn .aud-ask {
  margin-top: 0;
}

.aud-zero__sent {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--purple);
}

.aud-ask {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.aud-ask__input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-sunken);
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  border-radius: var(--radius-full);
}

.aud-ask__input:focus {
  outline: none;
  border-color: var(--purple);
}

.aud-ask__btn {
  height: 46px;
  padding: 0 16px;
  background: var(--purple);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.audience-request-btn {
  padding: 14px 16px 20px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Join Page ---------- */
.join-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--space-xl);
  text-align: center;
}

.join-page__brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2rem;
  color: var(--cyan);
  margin-bottom: var(--space-xs);
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

.join-page__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-2xl);
}

.join-page .form-group {
  text-align: left;
  width: 100%;
  max-width: 360px;
}

.join-page .form-group input {
  text-align: center;
  font-size: 1.1rem;
  padding: 0.9rem;
}

.join-page .room-code {
  font-size: 2.5rem;
  margin-bottom: var(--space-2xl);
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
}

/* ==========================================================================
   LIVE DASHBOARD — the artist's mid-set screen (live-views-redesign)
   Glanceable while playing: one header row, collapsible engagement strip,
   two tabs, boosted groups first, played rows dim in place.
   Spec: docs/design/live-views/README.md View A.
   ========================================================================== */

.dash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.dash__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(4px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left));
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.dash__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

.dash__venue {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  height: var(--touch-min);
  padding: 0 11px;
  background: var(--cyan-glow);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-md);
  color: var(--cyan);
  cursor: pointer;
}

.code-chip__code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.dash__end {
  flex-shrink: 0;
  height: var(--touch-min);
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--red);
  border-radius: var(--radius-md);
  color: var(--red);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dash__end:active {
  background: var(--red);
  color: var(--text);
}

/* ---------- Engagement strip ---------- */
/* These classes set display, which would defeat the [hidden] attribute the
   disclosure/names-toggle controllers rely on. */
.eng__grid[hidden],
.boost-names[hidden] {
  display: none;
}

.eng__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 42px;
  padding: 0 calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
  background: var(--bg-sunken);
  border: none;
  border-top: 1px solid var(--bg-raised);
  border-bottom: 1px solid var(--bg-raised);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  overflow-x: hidden;
}

.eng__bar b {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.eng__boosts {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gold);
}

.eng__boosts b {
  color: var(--gold);
}

.eng__boosts .eng__word {
  color: var(--text-secondary);
}

.eng__sep {
  color: var(--border);
}

.eng__chevron {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--cyan);
}

.eng__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 0 calc(12px + env(safe-area-inset-right)) 12px calc(12px + env(safe-area-inset-left));
}

/* Below ~400px, multi-digit counts can outgrow the bar even with the
   chevron pinned via margin-left: auto — visually collapse the word labels
   first so the numbers, separators, and chevron always fit on one 42px row.
   Uses the .visually-hidden technique (not display: none) so the labels stay
   in the accessibility tree; see openspec/changes/live-dashboard-narrow-strip. */
@media (max-width: 400px) {
  .eng__word {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.eng__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.eng__value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}

.eng__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

/* ---------- Tabs + panels ---------- */
.dash__list {
  flex: 1;
  overflow-y: auto;
  /* viewport-fit=cover makes this region run edge-to-edge, so inset the whole
     scroller (rows, group labels, empty states) off the notch and the home
     indicator here rather than repeating env() on every row rule — that also
     keeps .boost-names' absolute 63px indent aligned with the title column. */
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.dash__panel {
  display: none;
}

.dash__panel.active {
  display: block;
}

.dash-empty {
  padding: var(--space-lg) 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Rows ---------- */
/* Padding lives on the INNER flex row so .boost-names' indents are absolute
   (63px = 12px padding + 42px vote block + 9px gap = the title column). */
.dash .lv-row__main {
  padding: 9px 12px;
}

.dash .lv-row--boosted .lv-row__main {
  padding: 10px 12px;
}

.dash .boost-names {
  padding: 0 12px 11px 12px;
}

.dash .boost-names--indent-song {
  padding-left: 63px;
}

.vote-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 42px;
  padding: 3px 0;
  background: var(--cyan-glow);
  border-radius: var(--radius-sm);
}

.vote-block__count {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan);
}

.vote-block__label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.lv-row--played {
  opacity: 0.35;
}

/* The row body — vote block, title, key chip, chevron — is one tap target that
   expands the details panel. The ⚡ and mark-played buttons sit outside it, so
   they keep their own actions and their own 44px targets. */
.lv-row__body {
  flex: 1;
  min-width: 0;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lv-row__chevron {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* The song's key, lifted out of the "artist · key" subtitle so it is findable at
   a glance on a dark stage. Neutral slate on purpose — cyan is reserved for
   action and liveness, and a key is neither. */
.key-chip {
  flex-shrink: 0;
  padding: 3px 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

/* Expanded row details — artist-only notes + reference link, indented to the
   title column the same way .boost-names--indent-song is. names-in is a 180ms
   fade + 4px slide: inside DESIGN.md §6's 150-250ms band, and the global
   prefers-reduced-motion block already neutralises it. */
.lv-row__details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0 12px 9px 63px;
  animation: names-in 180ms var(--ease-out);
}

/* .lv-row__details declares `display` above, which is author-origin and so
   overrides the user-agent `[hidden] { display: none }` the disclosure
   controller relies on to keep the panel closed. See DESIGN.md §8. */
.lv-row__details[hidden] {
  display: none;
}

.lv-row__notes {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
  white-space: pre-line;
}

.lv-row__notes--empty {
  font-style: italic;
}

.lv-row__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--touch-min);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
}

/* ---------- Join code / QR sheet ---------- */
.qr-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: calc(56px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(44px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  animation: sheet-in 220ms var(--ease-out);
}

/* .qr-sheet declares `display: flex` above, which is author-origin and therefore
   overrides the user-agent `[hidden] { display: none }` rule the sheet relies on
   to stay closed. Without this the sheet renders permanently over the dashboard.
   Any element that is toggled via the `hidden` attribute AND sets `display` in
   CSS needs this pairing. */
.qr-sheet[hidden] {
  display: none;
}

.qr-sheet__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--cyan) 60%, var(--purple) 100%);
}

.qr-sheet__close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
}

.qr-sheet__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.qr-sheet__scan {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  background: var(--gold-glow);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.qr-sheet__label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.qr-sheet__card {
  padding: 12px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.qr-sheet__card img {
  display: block;
  width: 216px;
  height: 216px;
}

.qr-sheet__code {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan);
  background: var(--cyan-glow);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 20px;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}

.qr-sheet__body .copy-field {
  width: 100%;
}

/* ==========================================================================
   ARTIST PUBLIC PAGE
   ========================================================================== */

.artist-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.artist-page__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.artist-page__bio {
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-xl);
  font-size: 1.05rem;
  line-height: 1.7;
}

.artist-page__live-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--cyan);
  color: #0f172a;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.artist-page__live-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 30px rgba(34, 211, 238, 0.4);
  color: #0f172a;
}

.artist-page__live-dot {
  width: 8px;
  height: 8px;
  background: #0f172a;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ---------- Social Links ---------- */
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.social-icon:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  transform: translateY(-2px);
}

.social-icon svg {
  display: block;
}

.social-links--md .social-icon {
  width: 40px;
  height: 40px;
}
.social-links--md .social-icon svg {
  width: 20px;
  height: 20px;
}

.social-links--sm .social-icon {
  width: 32px;
  height: 32px;
}
.social-links--sm .social-icon svg {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .social-icon {
  background: var(--bg-sunken);
}

/* ---------- Profile Form Section Headings ---------- */
.form-section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
}

.form-section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

.landing-hero {
  min-height: 80dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.landing-hero__brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 3.5rem;
  color: var(--cyan);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  text-shadow: 0 0 40px rgba(34, 211, 238, 0.3);
  position: relative;
}

.landing-hero__tagline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  max-width: 540px;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.landing-hero__sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: var(--space-2xl);
}

.landing-hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Landing: Sign-In Link ---------- */
.landing-signin {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 10;
}

/* ---------- Welcome Onboarding ---------- */
.welcome {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.welcome__header {
  margin-bottom: var(--space-2xl);
}

.welcome__greeting {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.welcome__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.welcome__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.welcome__card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}

.welcome__card:hover {
  color: var(--text);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08), var(--shadow-md);
  transform: translateY(-2px);
}

.welcome__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--cyan-glow);
  color: var(--cyan);
  margin-bottom: var(--space-lg);
}

.welcome__card-icon--purple {
  background: var(--purple-glow);
  color: var(--purple);
}

.welcome__card-icon--gold {
  background: var(--gold-glow);
  color: var(--gold);
}

.welcome__card-step {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.welcome__card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.welcome__card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.welcome__card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
  margin-top: var(--space-lg);
  transition: gap var(--duration-fast) var(--ease-out);
}

.welcome__card:hover .welcome__card-link {
  gap: var(--space-sm);
}

@media (max-width: 768px) {
  .welcome__cards {
    grid-template-columns: 1fr;
  }

  .welcome__greeting {
    font-size: 1.4rem;
  }
}

/* ---------- Join Code Card (profile page) ---------- */
.join-code-card {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.join-code-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--cyan) 60%, var(--purple) 100%);
}

.join-code-card__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.join-code-card .kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
  background: var(--gold-glow);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.join-code-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 var(--space-sm);
  color: var(--text);
}

.join-code-card__help {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 44ch;
  margin: 0 auto;
  line-height: 1.5;
}

.join-code-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.join-code-card__qr {
  margin: 0;
  text-align: center;
  width: 100%;
  max-width: 260px;
}

.join-code-card__qr-frame {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.join-code-card__qr-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

[data-theme="dark"] .join-code-card__qr-frame {
  background: #ffffff;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.join-code-card__qr figcaption {
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.join-code-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  text-align: center;
  align-items: center;
}

.join-code-card__code-block,
.join-code-card__url-block {
  width: 100%;
}

.join-code-card__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.join-code-card__code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 2.75rem);
  letter-spacing: 0.22em;
  color: var(--cyan);
  background: var(--cyan-glow);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  display: inline-block;
  line-height: 1;
}

.join-code-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.join-code-card__actions form {
  margin: 0;
}

/* Copy field — attached URL + copy button */
.copy-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.copy-field:hover {
  border-color: var(--border-hover);
}

.copy-field__text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  padding: 0.65rem 0.85rem;
  background: transparent;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.copy-field__button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--cyan-dim);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 1rem;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.copy-field__button:hover {
  background: var(--cyan-glow);
  color: var(--cyan-dim);
}

.copy-field__button svg {
  flex-shrink: 0;
}

.copy-field__button.is-copied {
  background: var(--cyan);
  color: #fff;
}

.copy-field__button.is-copied:hover {
  background: var(--cyan);
  color: #fff;
}

/* Compact join-code chip — admin users list */
.user-join-code {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  padding: 0.2rem 0.2rem 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-sunken);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.user-join-code:hover {
  border-color: var(--border-hover);
}

.user-join-code__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.user-join-code__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--cyan-dim);
  background: transparent;
}

.user-join-code__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--cyan-dim);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  min-height: 32px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.user-join-code__copy:hover {
  background: var(--cyan-glow);
}

.user-join-code__copy svg {
  flex-shrink: 0;
}

.user-join-code__copy.is-copied {
  background: var(--cyan);
  color: #fff;
}

.user-join-code__copy.is-copied:hover {
  background: var(--cyan);
  color: #fff;
}

.join-code-card__actions {
  justify-content: center;
}

@media (max-width: 640px) {
  .join-code-card {
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }

  .join-code-card__body {
    gap: var(--space-lg);
  }
}

/* ---------- Utility ---------- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-cyan { color: var(--cyan); }
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   AVATAR
   ========================================================================== */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  user-select: none;
  overflow: hidden;
}

.avatar--fallback {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  text-transform: uppercase;
}

.avatar--hero {
  width: 160px;
  height: 160px;
  border: 3px solid var(--cyan);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.35),
              0 0 0 6px rgba(139, 92, 246, 0.15);
  margin-bottom: var(--space-lg);
  font-size: 2.75rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.avatar--hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.5),
              0 0 0 6px rgba(139, 92, 246, 0.2);
}

.avatar--live {
  width: 120px;
  height: 120px;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
  font-size: 2rem;
}

@media (max-width: 360px) {
  .avatar--live {
    width: 96px;
    height: 96px;
    font-size: 1.6rem;
  }
}

.avatar--edit {
  width: 96px;
  height: 96px;
  border: 2px solid var(--border);
  font-size: 1.75rem;
}

/* ==========================================================================
   PROFILE EDIT — Identity section
   ========================================================================== */

.identity-section {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.identity-section__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  min-width: 0;
}

.identity-section__hint {
  color: var(--text-muted);
  font-size: 0.8rem;
}


/* ==========================================================================
   ADMIN — Invites
   ========================================================================== */

.admin-invites-section {
  margin-bottom: var(--space-2xl);
}

.admin-invites-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.admin-invites-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-sunken);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
}

.invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta actions"
    "url  url";
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-fast);
}

.invite-row:last-child {
  border-bottom: none;
}

.invite-row:hover {
  background: var(--bg-sunken);
}

.invite-row__meta {
  grid-area: meta;
  min-width: 0;
}

.invite-row__label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.invite-row__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.invite-row__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.invite-row__actions form {
  margin: 0;
}

.invite-row__url-wrap {
  grid-area: url;
  min-width: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

@media (max-width: 600px) {
  .invite-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "url"
      "actions";
  }

  .invite-row__actions {
    justify-content: flex-start;
  }
}

/* ---------- Page header actions ---------- */
.page-header__actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.form-actions {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  align-items: center;
}


/* ==========================================================================
   Live-view shared patterns (live-views-redesign)
   Shared by the artist dashboard and the audience live screen.
   Source of truth: docs/design/live-views/README.md (+ project-conventions.md).
   Buttons use --radius-md (--radius-full is for badges/chips/inputs only);
   type floor is 10px; numerals in --font-mono; hit targets >= 44px.
   ========================================================================== */

/* ---------- Compact list row ---------- */
.lv-row {
  border-bottom: 1px solid var(--bg-raised);
}

/* The row's horizontal line; a sibling .boost-names sits under it. */
.lv-row__main {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Title column — min-width: 0 is what makes the ellipsis below work. */
.lv-row__text {
  flex: 1;
  min-width: 0;
}

.lv-row__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-row__sub {
  font-size: 15px;
  line-height: 1.25;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Audience screens run the subtitle a step smaller. */
.lv-row__sub--sm {
  font-size: 14px;
}

.lv-row--boosted {
  border-left: 3px solid var(--gold);
  background: rgba(245, 158, 11, 0.04);
}

/* ---------- 44x44 square icon button ---------- */
.icon-btn {
  flex-shrink: 0;
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}

/* The boost action button is toggled by `hidden`, which this display defeats. */
.icon-btn[hidden] {
  display: none;
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn__count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* Active state comes from aria-pressed on toggles, .is-active elsewhere. */
.icon-btn--cyan {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.icon-btn--cyan[aria-pressed="true"],
.icon-btn--cyan.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg);
}

.icon-btn--gold {
  background: var(--gold-glow);
  border-color: rgba(245, 158, 11, 0.38);
  color: var(--gold);
}

.icon-btn--gold[aria-pressed="true"],
.icon-btn--gold.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

/* Audience tip action. Venmo brand blue — the same sanctioned non-token color
   as .tip-cta — so it never reads as the gold "you boosted this" indicator. */
.icon-btn--venmo {
  background: rgba(61, 149, 206, 0.15);
  border-color: rgba(61, 149, 206, 0.45);
  color: #3D95CE;
}

/* ---------- Booster attribution line ---------- */
.boost-names {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gold);
  animation: names-in 180ms var(--ease-out);
}

.boost-names svg {
  flex-shrink: 0;
}

/* Indented to the title column: past the vote block, or past the row padding. */
.boost-names--indent-song {
  padding-left: 63px;
}

.boost-names--indent-req {
  padding-left: 12px;
}

/* ---------- Micro-label + group divider ---------- */
/* Micro-labels always use --text-secondary; --text-muted fails contrast at 10px. */
.micro-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

/* The rule fills whatever width the label leaves. */
.group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bg-raised);
}

.group-label--gold {
  color: var(--gold);
}

.group-label--gold::after {
  background: rgba(245, 158, 11, 0.25);
}

/* ---------- Two-tab bar ---------- */
.lv-tabs {
  display: flex;
  flex-shrink: 0;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background: var(--bg);
  border-bottom: 1px solid var(--bg-raised);
}

.lv-tab {
  flex: 1;
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}

.lv-tab.is-active,
.lv-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.lv-tab__count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  opacity: 0.75;
}

/* ---------- Motion ---------- */
/* pulse-dot lives in the LIVE DASHBOARD section (0.45 midpoint per the design
   doc — the legacy .live-header__dot consumer was removed with the redesign). */
@keyframes names-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
