:root {
  --bg-base:      #0a0a0a;
  --bg-panel:     #111111;
  --bg-card:      #1a1a1a;
  --border:       #2a2a2a;
  --accent:       #7c5cbf;
  --accent-warm:  #c8963e;
  --text-primary: #e8e8e8;
  --text-muted:   #666666;
  --sidebar-width: 300px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-base);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

.app__main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar__header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.sidebar__tabs {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}

.sidebar__tab {
  flex: 1;
  padding: 12px 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.sidebar__tab:hover {
  color: var(--text-primary);
}

.sidebar__tab--active {
  color: var(--text-primary);
}

.sidebar__tab--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.sidebar__panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}

.sidebar__panel::-webkit-scrollbar {
  width: 4px;
}
.sidebar__panel::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar__panel::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 2px;
}
.sidebar__panel::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

.sidebar__panel--active {
  display: block;
}

.playfield {
  flex: 1;
  background: var(--bg-base);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.playfield__world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}

.playfield__placeholder {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.4;
  letter-spacing: 0.03em;
  user-select: none;
}

.playfield__hint {
  position: absolute;
  bottom: 10px;
  right: 14px;
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.02em;
}

/* ========================================
   Shop Button (sidebar header)
   ======================================== */

.btn-icon {
  display: inline-block;
  width: 1.5em;
  text-align: center;
  flex-shrink: 0;
  margin-right: 6px;
}

.shop-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent-warm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}


.shop-btn:hover {
  border-color: var(--accent-warm);
  background: rgba(200, 150, 62, 0.08);
}

/* ========================================
   Shop View
   ======================================== */

.shop-view {
  flex: 1;
  flex-direction: column;
  background: var(--bg-base);
  overflow-y: auto;
  min-height: 0;
}

.shop-view__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.shop-view__back {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.shop-view__back:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.shop-view__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-warm);
}

.shop-view__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.shop-section__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.shop-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.shop-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.shop-item__portrait {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.shop-item__icon {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.shop-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.shop-item__desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  min-height: 28px;
}

.shop-item__price {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-warm);
  margin-top: 2px;
}

.shop-item__buy {
  margin-top: 4px;
  padding: 6px 18px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.shop-item__buy:hover {
  background: #9370d8;
}

.shop-item__owned {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

@keyframes shop-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.shop-item__buy--shake {
  animation: shop-shake 0.45s ease;
  background: #c84040 !important;
}

.shop-item__preview {
  margin-top: 4px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.shop-item__preview:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========================================
   Quest Card (sidebar bottom)
   ======================================== */

.quest-card {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
}

.quest-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
}

.quest-card__header:hover {
  background: var(--bg-card);
}

.quest-card__header-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.quest-card__inline-title {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-card__toggle {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.quest-card--collapsed .quest-card__toggle {
  transform: rotate(-90deg);
}

.quest-card__body {
  padding: 0 16px 14px;
}

.quest-card--collapsed .quest-card__body {
  display: none;
}

.quest-card__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.quest-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.quest-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.quest-card__progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quest-card__bar {
  flex: 1;
  height: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.quest-card__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.quest-card__progress-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.quest-card__reward {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-warm);
}

/* ========================================
   Quest Toast
   ======================================== */

.quest-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 5000;
  white-space: nowrap;
  pointer-events: none;
}

.quest-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================
   Quest Popup
   ======================================== */

.quest-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  opacity: 0;
  transition: opacity 0.22s;
  backdrop-filter: blur(3px);
}

.quest-popup--visible {
  opacity: 1;
}

.quest-popup__card {
  background: var(--bg-panel);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 36px 44px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 48px rgba(124, 92, 191, 0.25), 0 16px 48px rgba(0, 0, 0, 0.7);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.quest-popup--visible .quest-popup__card {
  transform: translateY(0);
}

.quest-popup__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.quest-popup__title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.quest-popup__flavor {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 28px;
  line-height: 1.6;
}

.quest-popup__rewards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.quest-popup__reward-filth {
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-warm);
  letter-spacing: 0.02em;
}

.quest-popup__reward-unlock {
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(124, 92, 191, 0.12);
  border: 1px solid rgba(124, 92, 191, 0.35);
  border-radius: 6px;
  padding: 9px 18px;
  line-height: 1.4;
}

.quest-popup__btn {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 11px 40px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.quest-popup__btn:hover {
  background: #9370d8;
}

.quest-popup__btn:active {
  transform: scale(0.97);
}

/* ========================================
   Menu Screen
   ======================================== */

.menu-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url(assets/menu-bg.png) center/cover no-repeat #0a0a0a;
  transition: opacity 0.42s ease;
}

/* Warm spotlight glow from below + dark centre vignette */
.menu-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 45% at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 75%),
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(200,70,0,0.28) 0%, transparent 60%);
  animation: menu-ambient 5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* Scanline overlay */
.menu-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.13) 3px,
    rgba(0, 0, 0, 0.13) 4px
  );
  pointer-events: none;
  z-index: 0;
}

@keyframes menu-ambient {
  from { opacity: 0.7; }
  to   { opacity: 1;   }
}

.menu-screen--hiding {
  opacity: 0;
}

.menu-screen__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  padding: 40px 24px;
}

.menu-screen__title {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(24px, 4.5vw, 54px);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-shadow:
    0 0 14px rgba(255, 100, 0, 1),
    0 0 36px rgba(255, 55, 0, 0.75),
    0 0 72px rgba(255, 30, 0, 0.4),
    5px 5px 0px #600000,
    7px 7px 0px rgba(0, 0, 0, 0.65);
}

.menu-screen__subtitle {
  margin: 14px 0 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.12em;
}

.menu-screen__btn {
  margin-top: 40px;
  padding: 18px 40px;
  background: #ff6600;
  border-top: 2px solid #ff9944;
  border-left: 2px solid #ff9944;
  border-bottom: 2px solid #7a2e00;
  border-right: 2px solid #7a2e00;
  border-radius: 3px;
  color: #0a0a0a;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  font-weight: 400;
  cursor: pointer;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.8;
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.85);
  transition: box-shadow 0.07s ease, transform 0.07s ease, background 0.07s ease;
}

.menu-screen__btn::before {
  content: '▶  ';
}

.menu-screen__btn:hover {
  background: #ff8800;
  border-top-color: #ffbb66;
  border-left-color: #ffbb66;
  border-bottom-color: #993d00;
  border-right-color: #993d00;
  box-shadow:
    5px 5px 0px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(255, 130, 0, 0.8),
    0 0 55px rgba(255, 80, 0, 0.45);
  transform: translate(-1px, -1px);
}

.menu-screen__btn:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.85);
  border-top-color: #7a2e00;
  border-left-color: #7a2e00;
  border-bottom-color: #ff9944;
  border-right-color: #ff9944;
}

/* ========================================
   Robot Bar / Gig System
   ======================================== */

.gig-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.25s;
}

.gig-overlay--visible { opacity: 1; }

.gig-panel {
  background: rgba(6, 2, 10, 0.92);
  border: 1px solid var(--accent-warm);
  border-radius: 12px;
  padding: 32px 40px;
  max-width: 360px;
  width: 88%;
  text-align: center;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 48px rgba(200, 150, 62, 0.12), 0 12px 40px rgba(0, 0, 0, 0.85);
}

.gig-panel--prep { gap: 8px; }

.gig-panel__venue {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-warm);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.gig-panel__headline {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.gig-panel__subline {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.gig-panel__crowd-preview {
  font-size: 14px;
  color: var(--accent-warm);
  font-weight: 500;
  margin-bottom: 4px;
}

.gig-panel__note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 12px;
}

.gig-prep__timer-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.gig-prep__timer {
  font-size: 52px;
  font-weight: 600;
  color: var(--accent-warm);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 4px 0 8px;
  transition: color 0.2s;
}

.gig-timer--urgent {
  color: #e04848;
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.gig-btn {
  background: var(--accent-warm);
  border: none;
  border-radius: 6px;
  color: #0a0604;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 11px 30px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.gig-btn:hover { background: #e0a840; }
.gig-btn:active { transform: scale(0.97); }

.gig-btn--secondary {
  background: transparent;
  border: 1px solid rgba(200, 150, 62, 0.5);
  color: var(--accent-warm);
  font-weight: 600;
}

.gig-btn--secondary:hover {
  background: rgba(200, 150, 62, 0.08);
  border-color: var(--accent-warm);
}

/* Crowd bar – bottom of playfield during performance */
.gig-crowd-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: rgba(4, 2, 8, 0.88);
  border-top: 1px solid rgba(200, 150, 62, 0.25);
  backdrop-filter: blur(6px);
}

.gig-crowd-overlay__label {
  font-size: 11px;
  color: var(--accent-warm);
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
  min-width: 100px;
}

.gig-crowd {
  flex: 1;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2px;
}

.gig-crowd__person {
  font-size: 22px;
  display: inline-block;
  animation: crowdBob ease-in-out infinite alternate;
}

@keyframes crowdBob {
  from { transform: translateY(0) rotate(-2deg); }
  to   { transform: translateY(-5px) rotate(2deg); }
}

.gig-crowd__more {
  font-size: 11px;
  color: var(--text-muted);
  align-self: center;
  padding-left: 6px;
}

.gig-crowd-overlay__timer {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}

.gig-review__crowd {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}

/* ========================================
   Confirm Dialog
   ======================================== */

/* ── Auth indicator (sidebar) ───────────────────────────────────────────── */

.auth-indicator {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  margin-top: 4px;
}

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

.auth-indicator__logout {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

.auth-indicator__logout:hover { color: var(--text-primary); }

/* ── Auth modal ─────────────────────────────────────────────────────────── */

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 700;
}

.auth-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 340px;
  overflow: hidden;
}

.auth-panel__tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 12px 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}

.auth-tab:hover { color: var(--text-primary); }

.auth-tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.auth-panel__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-panel__tagline {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-label__opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.auth-input {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.12s;
}

.auth-input:focus { border-color: var(--accent); }

.auth-error {
  font-size: 12px;
  color: #e05555;
  min-height: 16px;
  margin: 0;
}

.auth-submit-btn {
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  transition: opacity 0.12s;
  width: 100%;
}

.auth-submit-btn:hover:not(:disabled) { opacity: 0.85; }
.auth-submit-btn:disabled { opacity: 0.5; cursor: default; }

.tortify-login-btn {
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity 0.12s;
}

.tortify-login-btn:hover { opacity: 0.85; }

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.confirm-dialog {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.confirm-dialog__message {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  text-align: center;
}

.confirm-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-dialog__btn {
  padding: 7px 24px;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s, background 0.1s;
}

.confirm-dialog__btn--yes {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

.confirm-dialog__btn--yes:hover {
  background: #9370d8;
  border-color: #9370d8;
}

.confirm-dialog__btn--no {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.confirm-dialog__btn--no:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ========================================
   Character Card Component
   ======================================== */

.character-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}

.character-card:hover {
  border-color: var(--accent);
}

.character-card--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.character-card--locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
  pointer-events: none;
}

.character-card__portrait {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
}

.character-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.character-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.character-card__vibe {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(124, 92, 191, 0.12);
  border: 1px solid rgba(124, 92, 191, 0.25);
  border-radius: 3px;
  padding: 1px 5px;
  align-self: flex-start;
}

.character-card__tagline {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ========================================
   Machine Card Component
   ======================================== */

.machine-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}

.machine-card:hover {
  border-color: var(--accent-warm);
}

.machine-card--locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
  pointer-events: none;
}

.machine-card__icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-radius: 4px;
}

.machine-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.machine-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.machine-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.machine-instance {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  min-width: 80px;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.machine-instance__icon {
  font-size: 32px;
  line-height: 1;
}

.machine-instance__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.machine-instance__slot {
  width: 48px;
  height: 48px;
  border: 2px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.machine-instance__slot--occupied {
  border-style: solid;
  border-color: var(--accent);
  justify-content: flex-start;
  gap: 4px;
  padding: 4px 6px;
  width: 160px;
}

.machine-instance__slot-portrait {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.machine-instance__slot-name {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.machine-instance__slot-eject {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.1s ease, background 0.1s ease;
}
.machine-instance__slot-eject:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}

.machine-instance--dragging {
  opacity: 0.85;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  cursor: grabbing;
  z-index: 100;
}

/* Drag ghost — sprite character hanging from cursor */
.char-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transform: translateX(-50%);
}

.char-drag-ghost__img {
  display: block;
  max-height: 160px;
  width: auto;
  transform-origin: top center;
  /* rotation driven by JS pendulum — no CSS animation */
}

.char-drag-ghost[data-character-id="pelle"] .char-drag-ghost__img {
  max-height: 70px;
}

/* Drag ghost — machine image (static, no sway) */
.machine-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
}

.machine-drag-ghost__img {
  display: block;
  width: 130px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.7));
}

.character-actor {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  transform: translate(-50%, -50%);
}

.character-actor__portrait {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
}

.character-actor--sprite {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transform: translate(-50%, 0); /* anchor is top-center, not center */
}

.character-actor--sprite .character-actor__portrait {
  width: auto;
  height: auto;
  overflow: visible;
  background: none;
  border-radius: 0;
}

.character-actor--sprite .character-actor__name {
  display: none;
}

.character-actor__sprite-img {
  display: block;
  max-height: 190px;
  width: auto;
  image-rendering: pixelated;
}

.character-actor[data-character-id="pelle"] .character-actor__sprite-img {
  max-height: 65px;
}

/* Hide the original element while the drag ghost is shown */
.character-actor--sprite.is-dragging {
  opacity: 0;
  animation: none;
}

/* Selection: glow follows the PNG silhouette, not the bounding box */
.character-actor--sprite.character-actor--selected {
  outline: none;
  box-shadow: none;
  filter: drop-shadow(0 0 6px rgba(124, 92, 191, 0.9)) drop-shadow(0 0 14px rgba(124, 92, 191, 0.4));
}

.character-actor__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.is-dragging {
  opacity: 0.85;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  cursor: grabbing;
  z-index: 100;
}

@keyframes dingle {
  0%   { transform: translate(-50%, -50%) rotate(-4deg); }
  50%  { transform: translate(-50%, -50%) rotate(4deg); }
  100% { transform: translate(-50%, -50%) rotate(-4deg); }
}

.character-actor.is-dragging {
  animation: dingle 0.4s ease-in-out infinite;
}

@keyframes machine-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);    border-color: var(--border); }
  40%  { transform: translate(-50%, -50%) scale(1.06); border-color: var(--accent-warm); }
  100% { transform: translate(-50%, -50%) scale(1);    border-color: var(--border); }
}

.machine-instance--triggered {
  animation: machine-pulse 0.15s ease-out forwards;
}

/* Visual State System — layered machine/character/reaction images */
.machine-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: 6px;
  overflow: hidden;
}

.machine-visual__machine,
.machine-visual__machine--triggered,
.machine-visual__char,
.machine-visual__reaction {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.machine-instance > *:not(.machine-visual):not(.port) {
  position: relative;
  z-index: 1;
}

/* ── Sprite-visual mode (machine has a real image) ── */

.machine-instance--has-visual {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  width: 200px;
  height: 236px;
  gap: 0;
}

/* Image fills the full instance area */
.machine-instance--has-visual .machine-visual {
  border-radius: 0;
  overflow: visible;
}

/* Images fill the restricted visual area */
.machine-instance--has-visual .machine-visual__machine,
.machine-instance--has-visual .machine-visual__machine--triggered,
.machine-instance--has-visual .machine-visual__char,
.machine-instance--has-visual .machine-visual__reaction {
  object-fit: contain;
  object-position: bottom center;
}

/* Hide text chrome */
.machine-instance--has-visual .machine-instance__icon,
.machine-instance--has-visual .machine-instance__name {
  display: none;
}

/* Slot → invisible drop zone over the full image area */
.machine-instance--has-visual .machine-instance__slots {
  position: absolute !important;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
}

.machine-instance--has-visual .machine-instance__slot {
  flex: 1;
  width: auto !important;
  height: auto !important;
  border: none;
  background: transparent;
  border-radius: 0;
}

.machine-instance--has-visual .machine-instance__slot--occupied {
  width: auto !important;
  height: auto !important;
  padding: 0;
  border: none;
  background: transparent;
}

/* Hide slot portrait/name — shown by visual layer */
.machine-instance--has-visual .machine-instance__slot-portrait,
.machine-instance--has-visual .machine-instance__slot-name {
  display: none;
}

/* Eject button — small pill, top-right of image, appears on hover */
.machine-instance--has-visual .machine-instance__slot-eject {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 10px;
  padding: 3px 6px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s;
}

.machine-instance--has-visual:hover .machine-instance__slot-eject {
  opacity: 1;
}

/* Gain-wrap is now empty — hide it */
.machine-instance--has-visual .machine-instance__gain-wrap {
  display: none;
}

/* Dragging — use drop-shadow on the image pixels instead of border glow */
.machine-instance--has-visual.machine-instance--dragging {
  border-color: transparent;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
}

/* Trigger animation — scale only, no border flash */
@keyframes machine-pulse-visual {
  0%   { transform: translate(-50%, -50%) scale(1);    }
  40%  { transform: translate(-50%, -50%) scale(1.05); }
  100% { transform: translate(-50%, -50%) scale(1);    }
}

.machine-instance--has-visual.machine-instance--triggered {
  animation: machine-pulse-visual 0.15s ease-out forwards;
}

.machine-instance--selected,
.effect-instance--selected,
.character-actor--selected,
.machine-instance__slot--selected {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 191, 0.2);
}

/* ========================================
   Sequencer Component
   ======================================== */

.sequencer {
  flex-shrink: 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 20px;
}

.sequencer__header {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.sequencer__transport {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 0;
  border-right: 1px solid var(--border);
  margin-right: 16px;
  flex-shrink: 0;
}

.sequencer__header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding: 8px 0;
}

.sequencer__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 8px 16px;
  border-left: 1px solid var(--border);
  margin-left: 16px;
  flex-shrink: 0;
}

.sequencer__patterns-label {
  font-size: 12px;
  color: var(--text-muted);
}

.sequencer__pattern-bank {
  display: flex;
  gap: 4px;
}

.sequencer__pattern-btn {
  width: 32px;
  height: 28px;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s;
}

.sequencer__pattern-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.sequencer__pattern-btn--active {
  border-color: var(--accent);
  color: var(--accent);
}

.sequencer__mode-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
}

.sequencer__mode-btn {
  padding: 4px 14px;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sequencer__mode-btn--active {
  background: var(--accent);
  color: #fff;
}

.sequencer__mode-group {
  display: flex;
  gap: 2px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
}

.sequencer__mode-btn--large {
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sequencer__tab-hint {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
  cursor: default;
  user-select: none;
  align-self: center;
}

.sequencer__body {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 8px 0;
}


/* ── Mixer channel strips ───────────────────────────────────────────────── */

.mixer-strips {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 4px 6px 14px;
  margin-left: 16px;
  border-left: 1px solid var(--border);
  min-height: 220px;
  overflow-x: auto;
  flex-shrink: 0;
}

.mixer-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
  padding: 4px 4px 0;
  border-right: 1px solid rgba(255,255,255,0.04);
}

.mixer-strip:last-child {
  border-right: none;
}

.mixer-strip__label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

.mixer-strip__eq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.mixer-strip .knob__body {
  width: 32px;
  height: 32px;
}

.mixer-strip .knob__value {
  display: none;
}

.mixer-strip__fader-wrap {
  position: relative;
  width: 24px;
  height: 80px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mixer-strip__fader {
  position: absolute;
  width: 80px;
  height: 24px;
  transform: rotate(-90deg);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.mixer-strip__fader::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.mixer-strip__fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-warm);
  cursor: pointer;
  margin-top: -5.5px;
}

.mixer-strip__fader::-moz-range-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.mixer-strip__fader::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-warm);
  cursor: pointer;
  border: none;
}

.sequencer__song {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 2px;
}

.sequencer__song-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
}

.sequencer__song-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
}

.sequencer__song-row-label {
  width: 110px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-panel);
  padding-right: 8px;
}

.sequencer__song-slots {
  display: flex;
  gap: 3px;
}

.sequencer__song-slot {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.1s, background 0.1s;
}

.sequencer__song-slots .sequencer__song-slot:nth-child(4n+1) {
  margin-left: 6px;
}

.sequencer__song-slots .sequencer__song-slot:first-child {
  margin-left: 0;
}

.sequencer__song-slot:hover {
  border-color: var(--accent);
}

.sequencer__song-slot--filled {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(124, 92, 191, 0.12);
}

.sequencer__song-slot--playing {
  border-color: var(--accent-warm);
  box-shadow: 0 0 6px var(--accent-warm);
  color: var(--accent-warm);
}

.sequencer__song-slot--dragover {
  border-color: var(--accent-warm);
  background: rgba(200, 150, 62, 0.12);
}

.sequencer__machine-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

.sequencer__machine-select:focus {
  outline: none;
  border-color: var(--accent);
}

.sequencer__group {
  display: flex;
  gap: 4px;
}

.sequencer__steps {
  display: flex;
  gap: 6px;
}

.sequencer__step {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.sequencer__step:hover {
  border-color: var(--accent);
}

.sequencer__step--active {
  background: var(--accent);
  border-color: var(--accent);
}

.sequencer__step--playing {
  box-shadow: 0 0 8px var(--accent);
}

.sequencer__controls--unused {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sequencer__btn {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.1s ease;
}

.sequencer__btn:hover {
  border-color: var(--accent);
}

.sequencer__btn--play:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sequencer__btn--stop:hover {
  border-color: #c84040;
  color: #c84040;
}

.sequencer__bpm-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sequencer__bpm-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 2px;
}

.sequencer__bpm-input {
  width: 44px;
  padding: 5px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  text-align: center;
  -moz-appearance: textfield;
}

.sequencer__bpm-input::-webkit-inner-spin-button,
.sequencer__bpm-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sequencer__bpm-input:focus {
  outline: none;
  border-color: var(--accent);
}

.sequencer__bpm-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.sequencer__bpm-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ========================================
   Scene Card Component
   ======================================== */

.scene-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}

.scene-card:hover:not(.scene-card--locked) {
  border-color: var(--accent);
}

.scene-card--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.scene-card--locked {
  cursor: default;
  opacity: 0.45;
}

.scene-card__preview {
  position: relative;
  height: 56px;
  background: #1a1a2a;
}

.scene-card__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.scene-card__info {
  padding: 8px 10px;
}

.scene-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ========================================
   Machine instance — slots + gain
   ======================================== */

.machine-instance__slots {
  display: flex;
  gap: 6px;
}

.machine-instance__gain-wrap {
  width: 100%;
  padding: 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.machine-instance__mute {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.machine-instance__mute:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.machine-instance__mute--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.machine-instance__gain {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  cursor: pointer;
  outline: none;
  display: block;
}

.machine-instance__gain::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.machine-instance__gain::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ========================================
   Scene selector (sidebar header)
   ======================================== */

.filth-display {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.filth-display__icon {
  font-size: 14px;
  line-height: 1;
}

#filth-amount {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.filth-display__label {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar__scene-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.sidebar__scene-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.sidebar__scene-select {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  padding: 4px 6px;
  cursor: pointer;
  outline: none;
}

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

/* ========================================
   Effect Card (sidebar)
   ======================================== */

.effect-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}

.effect-card:hover {
  border-color: var(--accent);
}

.effect-card--locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
  pointer-events: none;
}

.effect-card__icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.effect-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.effect-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.effect-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ========================================
   Effect Instance (playfield)
   ======================================== */

.effect-instance {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--effect-color, var(--accent));
  border-radius: 6px;
  cursor: grab;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  user-select: none;
  z-index: 10;
}

.effect-instance:hover {
  border-color: var(--effect-color, var(--accent));
  border-left-color: var(--effect-color, var(--accent));
}

.effect-instance__icon {
  font-size: 20px;
  line-height: 1;
}

.effect-instance__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ========================================
   Ports (effect output / machine input)
   ======================================== */

.port {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-panel);
  cursor: crosshair;
  pointer-events: all;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  z-index: 20;
}

.port:hover {
  transform: scale(1.4);
}

.port--in {
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
}

.port--in:hover {
  transform: translateY(-50%) scale(1.4);
  border-color: var(--accent);
  background: var(--accent);
}

.port--out {
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
}

.port--out:hover {
  transform: translateY(-50%) scale(1.4);
}

/* ========================================
   Cables SVG overlay
   ======================================== */

.cables-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
}

/* ========================================
   Effect Instance — expanded state
   ======================================== */

.effect-instance {
  flex-direction: column;
  align-items: stretch;
  white-space: normal;
}

.effect-instance__header {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.effect-instance__toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.effect-instance__toggle:hover {
  color: var(--text-primary);
}

/* Controls panel */
.fx-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  min-width: 160px;
}

/* EQ overrides when fx-controls has eq layout */
.fx-controls.fx-eq {
  flex-direction: column;
  gap: 8px;
  min-width: 230px;
}

.fx-eq__canvas {
  display: block;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.fx-eq__presets {
  display: flex;
  gap: 4px;
}

.fx-eq__preset-btn {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-family: inherit;
  padding: 3px 0;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.fx-eq__preset-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.fx-eq__knobs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Knob component */
.knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: default;
  user-select: none;
}

.knob__label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.knob__body {
  width: 48px;
  height: 48px;
  cursor: ns-resize;
}

.knob__body svg {
  width: 100%;
  height: 100%;
  display: block;
}

.knob__track {
  stroke: #2a2a2a;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
}

.knob__fill {
  stroke: var(--accent);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.05s;
}

.knob__value {
  font-size: 9px;
  color: var(--text-primary);
  min-width: 32px;
  text-align: center;
}

/* Slider component */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 130px;
}

.slider-wrap__label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 20px;
}

.slider-wrap__input {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
  height: 4px;
}

.slider-wrap__value {
  font-size: 9px;
  color: var(--text-primary);
  min-width: 36px;
  text-align: right;
}

/* Filter type toggle */
.filter-type-row {
  display: flex;
  gap: 4px;
  width: 100%;
}

.filter-type-btn {
  flex: 1;
  padding: 4px 0;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 9px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.filter-type-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}


/* ========================================
   Escape Menu
   ======================================== */

.escape-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(4px);
}

.escape-menu__panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 280px;
  padding: 28px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.escape-menu__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 6px;
}

.escape-menu__btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.escape-menu__btn:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 191, 0.08);
}

.escape-menu__btn--primary {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.escape-menu__btn--primary:hover {
  background: rgba(124, 92, 191, 0.15);
}

.escape-menu__btn--danger {
  color: #c84040;
  border-color: transparent;
}

.escape-menu__btn--danger:hover {
  border-color: #c84040;
  background: rgba(200, 64, 64, 0.08);
}

.escape-menu__btn--dev {
  color: var(--text-muted);
  border-color: transparent;
  font-size: 11px;
}
.escape-menu__btn--dev:hover {
  color: var(--text-primary);
  border-color: var(--border);
}
.escape-menu__btn--dev-active {
  color: var(--accent-warm);
  border-color: var(--accent-warm);
  background: rgba(200, 150, 62, 0.08);
}

.dev-mode-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--accent-warm);
  color: #000;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.escape-menu__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.escape-menu__footer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
  opacity: 0.5;
}

/* ========================================
   Melody Machine (Piano Roll)
   ======================================== */

.melody-machine-instance {
  /* Override beat machine sizing — piano roll needs more width */
  width: 420px;
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
  gap: 8px;
  cursor: default;  /* piano roll cells handle their own interaction */
  user-select: none;
}

.melody-machine__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.melody-machine__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.melody-machine__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Piano roll grid */
.melody-machine__piano-roll {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.piano-roll__row {
  display: flex;
  height: 18px;
}

.piano-roll__row[data-is-black="true"] {
  background: rgba(0,0,0,0.3);
}

.piano-roll__label {
  width: 32px;
  flex-shrink: 0;
  font-size: 9px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding-left: 4px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
}

.piano-roll__row[data-is-black="true"] .piano-roll__label {
  color: #888;
}

.piano-roll__cell {
  flex: 1;
  height: 100%;
  background: var(--bg-card);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.08s;
  min-width: 0;
}

.piano-roll__cell:last-child {
  border-right: none;
}

.piano-roll__cell:hover {
  filter: brightness(1.5);
  outline: 1px solid rgba(255, 255, 255, 0.2);
  outline-offset: -1px;
}

/* Every 4 steps: slightly brighter separator */
.piano-roll__cell[data-step="3"],
.piano-roll__cell[data-step="7"],
.piano-roll__cell[data-step="11"] {
  border-right: 1px solid #3a3a3a;
}

/* Active states */
.piano-roll__cell--active {
  background: #1fa8a8;
}

/* Nipple Twister intensity levels */
.piano-roll__cell--soft   { background: rgba(124, 92, 191, 0.35); }
.piano-roll__cell--medium { background: var(--accent); }
.piano-roll__cell--hard   { background: #a87cff; box-shadow: 0 0 4px rgba(168,124,255,0.6); }

/* Yodel-Matic flip */
.piano-roll__cell--flip {
  background: var(--accent-warm);
  box-shadow: 0 0 4px rgba(200,150,62,0.5);
}

/* Playback cursor */
.piano-roll__cell--playing {
  filter: brightness(1.6);
  outline: 1px solid rgba(255,255,255,0.25);
  outline-offset: -1px;
}

/* Footer */
.melody-machine__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.melody-machine__footer .machine-instance__gain-wrap {
  width: auto;
  padding-top: 0;
}

.melody-machine__patterns {
  display: flex;
  gap: 3px;
}

.melody-machine__pat-btn {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
}

.melody-machine__pat-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Yodel-Matic 3000 — vintage styling */
.melody-machine-instance[data-machine-id="yodel-matic-3000"] {
  border-color: #5a4020;
  background: linear-gradient(135deg, #1a1208 0%, #1e1a0e 100%);
}

.melody-machine-instance[data-machine-id="yodel-matic-3000"] .melody-machine__title {
  color: var(--accent-warm);
  letter-spacing: 0.04em;
}

/* ========================================
   Gig Ending — Pack-up & Booker Quote
   ======================================== */

.gig-review__packup {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.gig-review__booker {
  font-size: 12px;
  color: var(--accent-warm);
  font-style: italic;
  line-height: 1.6;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(200, 150, 62, 0.06);
  border-left: 2px solid rgba(200, 150, 62, 0.4);
  border-radius: 2px;
  text-align: left;
  margin-bottom: 16px;
}

/* ========================================
   Upgrade Card (sidebar)
   ======================================== */

.upgrade-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}

.upgrade-card:hover {
  border-color: var(--accent-warm);
}

.upgrade-card--locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
  pointer-events: none;
}

.upgrade-card__icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.upgrade-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.upgrade-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.upgrade-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ========================================
   Upgrade Slot (on machine instance)
   ======================================== */

.machine-instance__upgrade-slot {
  width: 100%;
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px dashed var(--border);
  padding-top: 4px;
  margin-top: 2px;
}

.machine-instance__upgrade-slot:empty::before {
  content: 'no upgrade';
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.4;
  letter-spacing: 0.04em;
}

.machine-instance__upgrade-chip {
  font-size: 10px;
  color: var(--accent-warm);
  background: rgba(200, 150, 62, 0.1);
  border: 1px solid rgba(200, 150, 62, 0.3);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.machine-instance__upgrade-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.1s ease, background 0.1s ease;
}

.machine-instance__upgrade-remove:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Vinyl button (sidebar) ────────────────────────────────────────────── */

.vinyl-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  margin-top: 6px;
  transition: border-color 0.15s, color 0.15s;
}

.vinyl-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ── Vinyl player view ──────────────────────────────────────────────────── */

.vinyl-player-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
}

.vp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.vp-back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  transition: color 0.15s, border-color 0.15s;
}

.vp-back-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.vp-header-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.vp-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Track list ─────────────────────────────────────────────────────────── */

.vp-track-list {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 8px 0;
}

.vp-empty {
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.vp-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.vp-track-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.vp-track-item--active {
  background: rgba(124, 92, 191, 0.08);
  border-left-color: var(--accent);
}

.vp-track-item__art {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  flex-shrink: 0;
}

.vp-track-item__info {
  flex: 1;
  min-width: 0;
}

.vp-track-item__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-track-item__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-track-item__delete {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}

.vp-track-item:hover .vp-track-item__delete {
  opacity: 1;
}

.vp-track-item__delete:hover {
  color: #ff5555;
  background: rgba(255, 50, 50, 0.1);
}

.vp-track-item__badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-warm);
  border: 1px solid var(--accent-warm);
  border-radius: 2px;
  padding: 1px 5px;
  opacity: 0.7;
}

/* ── Now playing panel ──────────────────────────────────────────────────── */

.vp-now-playing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  gap: 20px;
  background: radial-gradient(ellipse 70% 60% at 50% 42%, #221c30 0%, #100e18 60%, #0a0a0a 100%);
}

/* ── Vinyl disc ─────────────────────────────────────────────────────────── */

.vp-disc-wrap {
  position: relative;
}

.vp-disc {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  position: relative;
  background: #1a1a1a;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 8px 40px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.3s;
}

.vp-disc--spinning {
  animation: vinyl-spin 2s linear infinite;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(124, 92, 191, 0.12);
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.vp-disc-art {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.85;
}

/* Groove rings overlay */
.vp-disc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent,
    transparent 7px,
    rgba(0, 0, 0, 0.18) 7px,
    rgba(0, 0, 0, 0.18) 8px
  );
  z-index: 2;
  pointer-events: none;
}

.vp-disc-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--bg-panel);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.vp-disc-hole {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-base);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* ── Track info ─────────────────────────────────────────────────────────── */

.vp-now-info {
  text-align: center;
}

.vp-now-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.vp-now-artist {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.vp-now-genre {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── Progress bar ───────────────────────────────────────────────────────── */

.vp-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}

.vp-time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  flex-shrink: 0;
}

.vp-time:last-child { text-align: right; }

.vp-progress-bar {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  transition: height 0.12s;
}

.vp-progress-bar:hover { height: 5px; }

.vp-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}

.vp-progress-bar:hover::-webkit-slider-thumb { opacity: 1; }

.vp-progress-bar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  cursor: pointer;
}

/* ── Controls ───────────────────────────────────────────────────────────── */

.vp-controls {
  display: flex;
  gap: 10px;
}

.vp-play-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 32px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s, opacity 0.15s;
}

.vp-play-btn:hover:not(:disabled) {
  background: #8e6fd4;
}

.vp-play-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.vp-no-audio {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 260px;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 14px;
}

/* ── Studio recording controls ─────────────────────────────────────────── */

.studio-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
}

.studio-record-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.studio-record-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.studio-record-btn--active {
  background: rgba(180, 30, 30, 0.15);
  border-color: #cc3333;
  color: #ff5555;
  animation: record-pulse 1.4s ease-in-out infinite;
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(204, 51, 51, 0); }
  50%       { box-shadow: 0 0 0 5px rgba(204, 51, 51, 0.25); }
}

.studio-record-timer {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 34px;
  text-align: right;
}

/* ── Track release modal ────────────────────────────────────────────────── */

.release-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.release-modal__panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 28px;
  width: 500px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
}

.release-modal__header {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.release-modal__section {
  margin-bottom: 16px;
}

.release-modal__label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.release-input,
.release-select,
.release-textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.release-input:focus,
.release-select:focus,
.release-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.release-input--error {
  border-color: #cc3333 !important;
}

.release-select {
  appearance: none;
  cursor: pointer;
}

.release-textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 120px;
}

.release-mood-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.release-mood-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}

.release-mood-tag:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.release-mood-tag--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.release-artworks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.release-artwork-opt {
  width: 68px;
  height: 68px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  transition: border-color 0.12s, transform 0.1s;
  flex-shrink: 0;
}

.release-artwork-opt:hover {
  transform: scale(1.04);
}

.release-artwork-opt--active {
  border-color: var(--accent);
}

.release-artwork-opt span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.release-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.release-modal__actions-right {
  display: flex;
  gap: 10px;
}

.release-btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.12s;
}

.release-btn--preview {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.release-btn--preview:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.release-preview-btn--playing {
  border-color: var(--accent-warm) !important;
  color: var(--accent-warm) !important;
}

.release-btn--discard {
  background: transparent;
  color: var(--text-muted);
}

.release-btn--discard:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.release-btn--submit {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.release-btn--submit:hover {
  background: #8e6fd4;
  border-color: #8e6fd4;
}

.release-btn--submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.release-toast {
  border-left-color: var(--accent) !important;
  border-left-width: 3px !important;
}

/* ── Custom artwork draw tile ───────────────────────────────────────────── */

.release-artwork-draw {
  border: 2px dashed var(--border) !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  gap: 3px;
  background-color: var(--bg-base) !important;
  background-size: cover !important;
  background-position: center !important;
  position: relative;
  overflow: hidden;
}

.release-artwork-draw:hover {
  border-color: var(--accent) !important;
}

.release-artwork-draw__icon {
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-muted);
  pointer-events: none;
}

.release-artwork-draw--filled .release-artwork-draw__icon {
  display: none;
}

.release-artwork-draw--filled::after {
  content: '✏';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  border-radius: 2px;
}

.release-artwork-draw--filled:hover::after {
  opacity: 1;
  background: rgba(0, 0, 0, 0.55);
}

/* ── Artwork drawer modal ───────────────────────────────────────────────── */

.artwork-drawer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
}

.artwork-drawer__panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 440px;
  max-width: 95vw;
}

.artwork-drawer__header {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.artwork-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: crosshair;
  touch-action: none;
  border: 1px solid var(--border);
}

.artwork-drawer__toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Color swatches — 2 rows of 8 */

.drawer-colors {
  display: grid;
  grid-template-columns: repeat(8, 24px);
  gap: 5px;
}

.drawer-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, border-color 0.1s;
}

.drawer-swatch:hover {
  transform: scale(1.15);
}

.drawer-swatch--active {
  border-color: #fff;
  transform: scale(1.1);
}

/* Tools + sizes row */

.drawer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-tools {
  display: flex;
  gap: 6px;
}

.drawer-tool-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.drawer-tool-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.drawer-tool-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Size buttons */

.drawer-sizes {
  display: flex;
  gap: 4px;
}

.drawer-size-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.drawer-size-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.drawer-size-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Actions row */

.artwork-drawer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.artwork-drawer__actions-left,
.artwork-drawer__actions-right {
  display: flex;
  gap: 8px;
}

.drawer-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.drawer-action-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ── Mixer strip drag-to-reorder ─────────────────────────────────────── */

.mixer-strip__handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
  cursor: grab;
  user-select: none;
  opacity: 0.4;
  transition: opacity 0.12s;
}

.mixer-strip:hover .mixer-strip__handle {
  opacity: 1;
}

.mixer-strip__handle:active {
  cursor: grabbing;
}

/* ── Mixer mute + solo buttons ───────────────────────────────────────────── */

.mixer-strip__buttons {
  display: flex;
  gap: 2px;
}

.mixer-strip__mute {
  width: 24px;
  height: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.mixer-strip__mute:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.mixer-strip__mute--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mixer-strip__solo {
  width: 24px;
  height: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.mixer-strip__solo:hover {
  color: var(--text-primary);
  border-color: var(--accent-warm);
}

.mixer-strip__solo--active {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  color: #000;
}

/* ── Mixer upgrade slot ──────────────────────────────────────────────────── */

.mixer-strip__upgrade-slot {
  width: 100%;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  gap: 2px;
}

.mixer-strip__upgrade-slot:empty::before {
  content: '—';
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.3;
}

.mixer-strip__upgrade-chip {
  font-size: 9px;
  color: var(--accent-warm);
  background: rgba(200, 150, 62, 0.1);
  border: 1px solid rgba(200, 150, 62, 0.3);
  border-radius: 3px;
  padding: 1px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34px;
  flex: 1;
}

.mixer-strip__upgrade-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 9px;
  cursor: pointer;
  padding: 1px 2px;
  border-radius: 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.1s, background 0.1s;
}

.mixer-strip__upgrade-remove:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.mixer-strip--dragging {
  opacity: 0.4;
}

.mixer-strip--drop-before {
  box-shadow: -3px 0 0 0 var(--accent);
}

.mixer-strip--drop-after {
  box-shadow: 3px 0 0 0 var(--accent);
}

/* ── Tortify button ──────────────────────────────────────────────────────── */

.tortify-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  margin-top: 6px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.tortify-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.tortify-btn__sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── Tortify view ────────────────────────────────────────────────────────── */

.tortify-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
}

.tortify-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tortify-back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}

.tortify-back-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.tortify-header__brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tortify-header__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tortify-header__sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── Body layout ─────────────────────────────────────────────────────────── */

.tortify-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.tortify-left {
  width: 340px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.tortify-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px 40px;
  background: radial-gradient(ellipse 70% 60% at 50% 42%, #221c30 0%, #100e18 60%, #0a0a0a 100%);
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */

.tortify-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tortify-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 10px 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.12s;
  margin-bottom: -1px;
}

.tortify-tab:hover { color: var(--text-primary); }

.tortify-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Genre filter ────────────────────────────────────────────────────────── */

.tortify-filters {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tortify-search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 9px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  box-sizing: border-box;
}

.tortify-search::placeholder { color: var(--text-muted); }
.tortify-search:focus { outline: none; border-color: var(--accent); }

.tortify-filter-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tortify-sort-btns {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.tortify-sort-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.12s;
}

.tortify-sort-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }

.tortify-sort-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tortify-genre-filter {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.tortify-genre-filter:focus { outline: none; border-color: var(--accent); }

/* ── Track list ──────────────────────────────────────────────────────────── */

.tortify-track-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.tortify-track-list::-webkit-scrollbar       { width: 4px; }
.tortify-track-list::-webkit-scrollbar-track  { background: transparent; }
.tortify-track-list::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 2px; }

.tortify-loading {
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.tortify-empty {
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
}

.tortify-track-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.tortify-track-item:hover { background: var(--bg-card); }

.tortify-track-item--active { background: rgba(124, 92, 191, 0.12); }

.tortify-track-item__art {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--bg-card);
}

.tortify-track-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tortify-track-item__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tortify-track-item__meta {
  font-size: 10px;
  color: var(--text-muted);
}

.tortify-track-item__delete {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
.tortify-track-item:hover .tortify-track-item__delete { opacity: 1; }
.tortify-track-item__delete:hover { color: #ff5555; background: rgba(255, 50, 50, 0.1); }

.tortify-track-item__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.tortify-plays-badge {
  font-size: 10px;
  color: var(--text-muted);
}

.tortify-claim-btn {
  background: rgba(200, 150, 62, 0.15);
  border: 1px solid var(--accent-warm);
  color: var(--accent-warm);
  padding: 2px 7px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.tortify-claim-btn:hover {
  background: var(--accent-warm);
  color: #000;
}

/* ── Now playing panel ───────────────────────────────────────────────────── */

.tortify-disc-wrap {
  position: relative;
  flex-shrink: 0;
}

.tortify-disc {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative;
  background: #1a1a1a;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 8px 40px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.3s;
}

.tortify-disc--spinning {
  animation: vinyl-spin 2s linear infinite;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(124, 92, 191, 0.15);
}

.tortify-disc-art {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.85;
}

.tortify-disc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent,
    transparent 7px,
    rgba(0, 0, 0, 0.18) 7px,
    rgba(0, 0, 0, 0.18) 8px
  );
  z-index: 2;
  pointer-events: none;
}

.tortify-disc-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-panel);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.tortify-disc-hole {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-base);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9);
}

.tortify-now-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tortify-now-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.tortify-now-artist {
  font-size: 12px;
  color: var(--text-muted);
}

.tortify-now-genre {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.tortify-controls {
  display: flex;
  justify-content: center;
}

.tortify-play-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 9px 28px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}

.tortify-play-btn:hover:not(:disabled) { background: #9370d8; }
.tortify-play-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Progress bar ────────────────────────────────────────────────────────── */

.tortify-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.tortify-time {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 30px;
}

.tortify-progress-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  cursor: pointer;
  outline: none;
}

.tortify-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.tortify-play-count {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
