:root {
  --bg-deep: #0b0d13;
  --bg-card: rgba(20, 24, 36, 0.88);
  --bg-card-elevated: rgba(29, 35, 52, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(139, 92, 246, 0.4);
  --text-primary: #f3f4f8;
  --text-secondary: #9ba3b8;
  --text-muted: #646d85;
  --accent-violet: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --status-streaming: #10b981;
  --status-paused: #f59e0b;
  --dj-gold: #fbbf24;
  --orch-magenta: #ec4899;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(139, 92, 246, 0.14), transparent 42%),
    radial-gradient(circle at 82% 15%, rgba(6, 182, 212, 0.11), transparent 38%),
    radial-gradient(circle at 50% 85%, rgba(236, 72, 153, 0.09), transparent 45%);
}

/* Header / Top Bar */
.top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(13, 16, 25, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 45deg, var(--accent-violet), var(--accent-cyan), var(--orch-magenta), var(--accent-violet));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
  transition: transform 0.4s ease;
}

.logo-orb.spinning {
  animation: spinOrb 4s linear infinite;
}

@keyframes spinOrb {
  to { transform: rotate(360deg); }
}

.brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Persistent Status Banner ("paused" vs "streaming: content name") */
.live-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  max-width: 520px;
}

.live-status-pill.status-paused {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.live-status-pill.status-streaming {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-paused .status-dot {
  background: var(--status-paused);
  box-shadow: 0 0 8px var(--status-paused);
}

.status-streaming .status-dot {
  background: var(--status-streaming);
  box-shadow: 0 0 12px var(--status-streaming);
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.status-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-meta {
  font-size: 0.74rem;
  font-weight: 500;
  opacity: 0.75;
  white-space: nowrap;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lan-share-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.lan-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.lan-share-box code {
  color: var(--accent-cyan);
  font-family: 'Consolas', 'Courier New', monospace;
}

.orch-auth-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.orch-auth-form input {
  width: 155px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-size: 0.8rem;
}

.orch-active-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(236, 72, 153, 0.5);
  color: #f9a8d4;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Main Grid */
.lounge-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  padding: 18px 22px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.stage-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Library Bar & Dropdown */
.library-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.section-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.mounted-path-text {
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.library-actions {
  display: flex;
  gap: 8px;
}

.dropdown-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.track-select {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 13, 22, 0.9);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.track-select:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.track-select:focus {
  border-color: var(--accent-violet);
}

.mount-drawer {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.mount-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .mount-drawer-grid {
    grid-template-columns: 1fr;
  }
}

.tiny-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.04em;
}

.input-row {
  display: flex;
  gap: 6px;
}

.input-row input[type="text"],
.input-row input[type="file"] {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-size: 0.8rem;
}

/* Visual Stage Card */
.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-height: 410px;
  overflow: hidden;
}

.video-container {
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 360px;
  border: 1px solid var(--border-subtle);
}

.video-container video {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.visualizer-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 10px 6px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.14), rgba(10, 12, 20, 0.85));
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 245px;
  overflow: hidden;
}

.vinyl-centerpiece {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e1b4b 24%, #090a0f 26%, #181a24 45%, #090a0f 65%, #1f2437 100%);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  z-index: 2;
  margin-bottom: -18px;
}

.vinyl-centerpiece.playing {
  animation: spinOrb 5.5s linear infinite;
}

.vinyl-label {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-violet), var(--orch-magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

#visualizerCanvas {
  width: 100%;
  height: 120px;
  display: block;
}

.stage-track-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stage-track-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(139, 92, 246, 0.25);
  color: #ddd6fe;
  text-transform: uppercase;
}

.stage-track-title {
  flex: 1;
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-sync-indicator {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-family: 'Consolas', monospace;
}

/* Transport Controls */
.transport-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-label {
  font-family: 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 40px;
}

.seek-slider {
  flex: 1;
  accent-color: var(--accent-violet);
  cursor: pointer;
}

.seek-slider:disabled {
  cursor: default;
  opacity: 0.6;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.orch-transport-group,
.listener-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  width: 90px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.loop-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Autoplay Overlay */
.autoplay-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 18, 0.86);
  backdrop-filter: blur(8px);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.autoplay-modal {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-highlight);
  padding: 26px;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.autoplay-icon {
  font-size: 2.2rem;
}

/* Right Column: Callsigns & Chat */
.chat-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 95px);
}

.callsign-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.callsign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.callsign-edit-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 280px;
}

.callsign-edit-group input {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
  color: #a5f3fc;
  font-weight: 700;
  font-size: 0.85rem;
}

.roster-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.peer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 76px;
  overflow-y: auto;
}

.peer-pill {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.peer-pill.orch {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.45);
  color: #fbcfe8;
  font-weight: 700;
}

.peer-pill.me {
  border-color: var(--accent-cyan);
}

/* Chat Card */
.chat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dj-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--dj-gold);
}

.dj-quick-buttons {
  display: flex;
  gap: 6px;
}

.btn-dj-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dj-chip:hover {
  background: rgba(251, 191, 36, 0.24);
}

.dj-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.tiny-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.dj-model-select {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.chat-msg {
  padding: 8px 11px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  line-height: 1.4;
}

.chat-msg.role-orchestrator {
  border-left: 3px solid var(--orch-magenta);
  background: rgba(236, 72, 153, 0.07);
}

.chat-msg.role-dj {
  border-left: 3px solid var(--dj-gold);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(139, 92, 246, 0.1));
}

.chat-msg.role-system {
  background: transparent;
  border: none;
  padding: 3px 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-style: italic;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 0.73rem;
}

.chat-sender {
  font-weight: 700;
  color: #a5f3fc;
}

.role-orchestrator .chat-sender {
  color: #f472b6;
}

.role-dj .chat-sender {
  color: var(--dj-gold);
}

.chat-time {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.chat-text {
  color: var(--text-primary);
  word-break: break-word;
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.42);
  color: var(--text-primary);
  font-size: 0.86rem;
  outline: none;
}

.chat-form input:focus {
  border-color: var(--accent-violet);
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-indigo));
  color: #fff;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.12);
}

.btn-accent {
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.55);
  color: #ede9fe;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.btn-accent:hover {
  background: rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.btn-play-main {
  background: linear-gradient(135deg, var(--status-streaming), #059669);
  color: #fff;
  font-weight: 800;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-play-main.is-playing {
  background: linear-gradient(135deg, var(--status-paused), #d97706);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.btn-play-main:disabled {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.btn-tiny {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.76rem;
}

.btn-lg {
  padding: 11px 22px;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 10px 15px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* Active Jam Queue & Client Pre-Cache Panel */
.jam-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.jam-title-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.jam-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cache-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.cache-status-pill.ready {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.cache-status-pill.fallback {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
}

.cache-progress-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}

.cache-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--status-streaming));
  transition: width 0.2s ease;
}

.jam-queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 165px;
  overflow-y: auto;
  padding-right: 4px;
}

.jam-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 2px;
}

.jam-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  transition: all 0.15s ease;
}

.jam-item.active-jam-track {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.5);
}

.jam-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.jam-index {
  font-family: 'Consolas', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 20px;
}

.jam-ext-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  text-transform: uppercase;
}

.jam-ext-badge.ext-mp4 {
  background: rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
}

.jam-ext-badge.ext-mp3 {
  background: rgba(6, 182, 212, 0.18);
  color: #a5f3fc;
}

.jam-filename {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jam-size {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.jam-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.jam-cache-tag {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  white-space: nowrap;
}

.jam-cache-tag.cached {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.jam-cache-tag.caching {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
}

.peer-cache-badge {
  font-size: 0.66rem;
  color: #6ee7b7;
  opacity: 0.9;
}

.jam-ext-badge.ext-yt {
  background: rgba(239, 68, 68, 0.24);
  color: #fca5a5;
}

#ytContainer iframe {
  width: 100%;
  height: 330px;
  border: none;
}

/* Persona & Callsign Identity Box */
.persona-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.persona-quick-actions {
  display: flex;
  gap: 6px;
}

.persona-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.persona-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.avatar-select {
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
}

.persona-input-row input {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.45);
  color: #a5f3fc;
  font-weight: 700;
  font-size: 0.85rem;
}

.persona-vibe-row input {
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.07);
  color: #ddd6fe;
  font-size: 0.78rem;
  font-style: italic;
}

.persona-note-row input {
  width: 100%;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.05);
  color: #fde68a;
  font-size: 0.75rem;
}

.identity-memory-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.22);
}

.identity-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.identity-passcode-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #a5f3fc;
  cursor: pointer;
}

.identity-passcode-pill:hover {
  background: rgba(6, 182, 212, 0.28);
}

.identity-stat-pill {
  font-size: 0.71rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.recall-drawer {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(6, 182, 212, 0.38);
}

.recall-drawer input {
  flex: 1;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.5);
  color: #a5f3fc;
  font-size: 0.78rem;
}

.reaction-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.btn-reaction {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.73rem;
  font-weight: 600;
}

.btn-reaction:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: var(--accent-violet);
  transform: translateY(-1px);
}

/* Floating Booth Reaction Burst Layer */
.reaction-burst-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.reaction-floater {
  position: absolute;
  bottom: 45px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 19, 32, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  animation: floatUpBurst 3.1s ease-out forwards;
}

@keyframes floatUpBurst {
  0% {
    transform: translateY(15px) scale(0.85);
    opacity: 0;
  }
  15% {
    transform: translateY(0) scale(1.03);
    opacity: 1;
  }
  85% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(-190px) scale(0.95);
    opacity: 0;
  }
}

/* Chat Source Infusion Chips (@yt, @sp, @dj) */
.chat-infusion-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-infuse {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-infuse.yt {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-infuse.yt:hover {
  background: rgba(239, 68, 68, 0.28);
}

.btn-infuse.sp {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.btn-infuse.sp:hover {
  background: rgba(16, 185, 129, 0.28);
}

.btn-infuse.dj {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

/* Album & Topic Index (`porchwood/index.md` & Future Albums) */
.album-index-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: linear-gradient(145deg, rgba(20, 24, 38, 0.92), rgba(32, 24, 18, 0.72));
}

.album-index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.album-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.album-select {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(0, 0, 0, 0.5);
  color: #fde68a;
  font-weight: 700;
  font-size: 0.8rem;
}

.album-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.active-track-lore-banner {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--dj-gold);
}

.lore-banner-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: #fef3c7;
}

.lore-act-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lore-concept-text {
  margin: 0;
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.38;
}

.album-setlist-drawer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  max-height: 310px;
  overflow-y: auto;
}

.album-overview-text {
  font-size: 0.77rem;
  color: #e2e8f0;
  line-height: 1.4;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.album-setlist-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.album-setlist-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.album-setlist-row.has-media {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.045);
}

.album-setlist-left {
  flex: 1;
  min-width: 0;
}

.album-setlist-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.album-setlist-vibe {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.album-setlist-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.album-staging-box {
  font-size: 0.74rem;
  color: #fde68a;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.06);
  border: 1px dashed rgba(251, 191, 36, 0.3);
  line-height: 1.45;
}

.jam-save-cluster {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.jam-preset-input {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-primary);
  font-size: 0.73rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  width: 135px;
  outline: none;
}

.jam-preset-input:focus {
  border-color: var(--accent-cyan);
}

.jam-saved-select {
  max-width: 175px;
}
