:root {
  --bg-dark: #000000;
  --bg-panel: #0a0a0a;
  --brand-bg: #000000;
  --brand-lime: #39FF14;
  --brand-lime-dim: #2dcc10;
  --brand-purple: #9B30FF;
  --brand-purple-glow: rgba(155, 48, 255, 0.45);
  --brand-yellow: #E8FF3A;
  --purple: #9b6bff;
  --purple-light: #c9a6ff;
  --pink: #ff6b9d;
  --gold: #ffd166;
  --green: #39FF14;
  --cyan: #4ecdc4;
  --text: #fff8f0;
  --muted: #8a9a7a;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

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

body {
  font-family: 'Fredoka', system-ui, sans-serif;
  background: var(--brand-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* HUD */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 2px solid var(--brand-purple);
  box-shadow: 0 0 20px var(--brand-purple-glow);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--brand-purple-glow));
}

.brand-logo-hero {
  width: min(88vw, 480px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 24px var(--brand-purple-glow));
}

.hud-stats {
  display: flex;
  gap: 12px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.cash-pill {
  background: rgba(107, 203, 119, 0.2);
  border: 1px solid rgba(107, 203, 119, 0.5);
}

.star-pill {
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.45);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  display: none;
}

@media (min-width: 600px) {
  .stat-label { display: inline; }
}

/* Screens */
#screen-root {
  flex: 1;
}

.screen {
  min-height: calc(100vh - 60px);
  padding: 24px;
  animation: fadeIn 0.35s ease;
}

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

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--brand-lime), var(--brand-lime-dim));
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(57, 255, 20, 0.35);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--brand-purple), #6a18cc);
  color: white;
  box-shadow: 0 4px 20px var(--brand-purple-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
}

.btn-buy {
  background: var(--brand-lime);
  color: #0a0a0a;
  font-weight: 700;
  min-width: 72px;
  border: none;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.35);
}

/* Title */
.title-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.title-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(57, 255, 20, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(155, 48, 255, 0.2) 0%, transparent 50%),
    linear-gradient(160deg, #000000 0%, #0a0014 50%, #000000 100%);
  z-index: 0;
}

.title-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.game-title {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--brand-lime);
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.4);
}

.game-title span {
  color: var(--brand-purple);
}

.subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.title-notes {
  position: absolute;
  bottom: 24px;
  font-size: 1.5rem;
  opacity: 0.5;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Character Select */
.select-screen {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.select-screen h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.screen-desc {
  color: var(--muted);
  margin-bottom: 32px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.character-card {
  background: var(--bg-panel);
  border: 2px solid rgba(155, 107, 255, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  color: inherit;
  font-family: inherit;
}

.character-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--pink);
  box-shadow: var(--shadow), 0 0 40px rgba(255, 107, 157, 0.2);
}

.character-preview {
  margin-bottom: 12px;
}

.character-card h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.character-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.character-svg,
.character-layered {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Layered character depth */
.character-layered {
  position: relative;
  display: inline-block;
}

.char-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.char-part-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.char-layer.layer-shadow {
  transform: translateY(5px);
  filter: blur(0.6px);
  opacity: 0.85;
}

.char-layer.layer-legs {
  transform: translateY(1px);
}

.char-layer.layer-jacket {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
  transform: translateY(-1px);
}

.char-layer.layer-hair,
.char-layer.layer-hair-back,
.char-layer.layer-hair-front,
.char-layer.layer-horns {
  transform: translateY(-3px);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.char-layer.layer-face {
  transform: translateY(-2px);
}

.character-layered.play-unified .char-unified-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.character-layered.play-unified .play-instrument {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
}

.char-layer.layer-arms-front {
  transform: translateY(-1px);
  z-index: 15 !important;
}

.char-layer.layer-instrument {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
  transform: translateY(-2px);
  z-index: 13 !important;
}

/* Layered instrument depth */
.instrument-layered .inst-layer.inst-shadow {
  opacity: 0.75;
}

.instrument-layered .inst-layer.inst-body-front,
.instrument-layered .inst-layer.inst-face,
.instrument-layered .inst-layer.inst-rim {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25));
}

.instrument-layered .inst-layer.inst-strings {
  transform: translateY(-0.5px);
}

.lineup-slot.lead .character-layered {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

/* Story / Tutorial */
.story-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.story-screen.venue-street {
  background: linear-gradient(180deg, #5ba3d9 0%, #8b7355 100%);
}

.story-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  max-width: 520px;
  width: 100%;
  background: rgba(42, 31, 78, 0.95);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(155, 107, 255, 0.4);
  text-align: center;
}

.story-panel.row-layout {
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 800px;
  text-align: left;
}

.story-text h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.story-text p {
  margin-bottom: 12px;
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.lid-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  width: 100%;
  min-height: 220px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 2px dashed rgba(255, 209, 102, 0.5);
}

.trash-can {
  font-size: 4rem;
  animation: wobble 3s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.lid-btn {
  background: linear-gradient(145deg, #e8e8e8, #9a9a9a);
  border: 4px solid #fff;
  border-radius: 50%;
  width: 110px;
  height: 110px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.6), 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s;
  font-family: inherit;
  color: #222;
  animation: lidPulse 1.2s ease-in-out infinite;
  z-index: 2;
}

@keyframes lidPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.6), 0 8px 24px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(255, 209, 102, 0.3), 0 8px 24px rgba(0, 0, 0, 0.5); }
}

.lid-btn:hover {
  transform: scale(1.1);
}

.lid-btn:active {
  transform: scale(0.95);
  animation: crash-shake 0.3s ease;
}

@keyframes crash-shake {
  0%, 100% { transform: translateX(0) scale(0.95); }
  25% { transform: translateX(-4px) scale(0.95); }
  75% { transform: translateX(4px) scale(0.95); }
}

.lid-icon { font-size: 2rem; }
.lid-label { font-size: 0.65rem; font-weight: 700; }

.story-character.small {
  margin-top: 4px;
}

/* Venue backgrounds */
.venue-street {
  background: linear-gradient(180deg, #87ceeb 0%, #e8d5a3 60%, #8b7355 100%);
}

.venue-tavern {
  background: linear-gradient(180deg, #2d1810 0%, #5c3d2e 50%, #3d2817 100%);
}

.venue-square {
  background: linear-gradient(180deg, #6eb5ff 0%, #a8d8a8 50%, #7cb87c 100%);
}

.venue-talent {
  background: linear-gradient(180deg, #1a0a2e 0%, #4a1942 40%, #2d1b4e 100%);
}

.venue-concert {
  background: linear-gradient(180deg, #0d0d1a 0%, #1a1033 30%, #2d1050 100%);
}

/* Hub */
.hub-screen {
  max-width: 1100px;
  margin: 0 auto;
}

.hub-venue-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 140px;
  margin-bottom: 16px;
  border: 1px solid rgba(155, 107, 255, 0.25);
}

.hub-venue-preview .venue-backdrop {
  position: absolute;
  inset: 0;
}

.hub-venue-label {
  position: absolute;
  bottom: 10px;
  left: 14px;
  z-index: 2;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 12px;
  border-radius: 8px;
}

.band-roster {
  flex-wrap: wrap;
  gap: 8px;
}

.bandmate-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  font-weight: 600;
}

.bandmate-chip span {
  color: var(--muted);
}

.band-open-slots {
  font-size: 0.75rem;
  color: var(--green);
  margin: 0 0 8px;
}

.bandmate-chip.empty-slot {
  opacity: 0.85;
}

.empty-slot-icon {
  width: 52px;
  height: 52px;
  border: 2px dashed rgba(155, 107, 255, 0.45);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--cyan);
  background: rgba(155, 107, 255, 0.08);
}

.shop-notice {
  background: rgba(149, 224, 108, 0.15);
  border: 1px solid rgba(149, 224, 108, 0.4);
  color: var(--green);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.bandmate-svg {
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.hub-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

@media (max-width: 700px) {
  .hub-layout {
    grid-template-columns: 1fr;
  }
}

.hub-sidebar {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(155, 107, 255, 0.2);
}

.hub-character {
  text-align: center;
  margin-bottom: 8px;
}

.hub-name {
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.hub-appeal {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.inv-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.hub-panel-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  margin: 0 0 6px;
  background: none;
  border: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.hub-panel-toggle:hover {
  color: var(--text);
}

.hub-panel-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 0.7rem;
}

.hub-panel.open .hub-panel-chevron {
  transform: rotate(90deg);
}

.hub-panel-count {
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0.75;
}

.hub-panel-body {
  display: none;
}

.hub-panel.open .hub-panel-body {
  display: block;
}

.inv-chip.none-chip {
  font-weight: 700;
  color: var(--muted);
  min-width: 44px;
}

.band-roster-gig {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.band-member-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.band-member-row.gig-active {
  background: rgba(107, 203, 119, 0.12);
  border: 1px solid rgba(107, 203, 119, 0.25);
}

.band-member-row .bandmate-chip {
  flex: 1;
  min-width: 0;
}

.gig-toggle-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(155, 107, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gig-toggle-btn.active {
  border-color: var(--green);
  background: rgba(107, 203, 119, 0.2);
  color: var(--green);
}

.btn-drop-member {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
}

.btn-drop-member:hover {
  background: rgba(255, 107, 107, 0.25);
}

.inv-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-chip {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(155, 48, 255, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.inv-chip .inv-art-thumb {
  width: 36px;
  height: auto;
  max-height: 46px;
}

.inv-chip.equipped {
  border-color: var(--brand-lime);
  background: rgba(57, 255, 20, 0.12);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.25);
}

.inv-chip:hover {
  border-color: var(--brand-purple);
}

.inv-empty {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.layer-wearable {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.char-wear-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hub-main h2 {
  margin-bottom: 16px;
}

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.venue-grid::-webkit-scrollbar {
  width: 6px;
}

.venue-grid::-webkit-scrollbar-thumb {
  background: rgba(155, 107, 255, 0.4);
  border-radius: 4px;
}

.venue-card {
  background: var(--bg-panel);
  border: 2px solid rgba(155, 107, 255, 0.25);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: inherit;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.venue-card:hover:not(.locked) {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.venue-card.active {
  border-color: var(--gold);
  background: rgba(255, 209, 102, 0.1);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.2);
}

.venue-card.venue-just-selected {
  animation: venueSelectPulse 0.35s ease;
}

@keyframes venueSelectPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.6); }
  100% { box-shadow: 0 0 0 8px rgba(255, 209, 102, 0); }
}

.venue-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.venue-emoji { font-size: 1.8rem; }
.venue-name { font-weight: 600; font-size: 0.85rem; }
.venue-meta { font-size: 0.7rem; color: var(--green); }
.venue-lock { font-size: 0.7rem; color: var(--muted); }

.hub-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Shop */
.shop-screen {
  max-width: 600px;
  margin: 0 auto;
  max-height: 100dvh;
  overflow-y: auto;
  padding-bottom: 24px;
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.shop-header .brand-logo {
  height: 32px;
}

.shop-header .brand-label {
  margin: 0;
  flex: 1;
}

.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.shop-tab {
  font-family: inherit;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.shop-tab.active {
  background: var(--brand-lime);
  color: #0a0a0a;
  border-color: var(--brand-lime);
  font-weight: 700;
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-band-summary {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 4px;
}

.shop-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.shop-band-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  background: var(--brand-bg);
  border-radius: 12px;
  border: 2px solid var(--brand-purple);
  box-shadow: 0 0 12px var(--brand-purple-glow);
}

.shop-band-slot.filled,
.shop-band-slot.open {
  justify-content: flex-start;
}

.shop-band-slot.locked,
.shop-band-slot.locked-next {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: left;
}

.shop-band-slot.locked .shop-info,
.shop-band-slot.locked-next .shop-info {
  flex: 1;
  min-width: 0;
}

.shop-slot-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

.shop-band-slot.locked {
  opacity: 0.55;
}

.shop-band-slot .bandmate-chip {
  width: 100%;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--brand-bg);
  padding: 14px;
  border-radius: 12px;
  border: 2px solid var(--brand-purple);
  box-shadow: 0 0 12px var(--brand-purple-glow);
}

.shop-item.owned {
  opacity: 0.55;
  border-color: rgba(155, 48, 255, 0.35);
}

.shop-info strong,
.brand-label {
  color: var(--brand-lime);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}

.brand-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 1.8rem;
  background: var(--brand-bg);
  border: 2px solid var(--brand-purple);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--brand-purple-glow);
  flex-shrink: 0;
}

.brand-card-icon-lg {
  width: 72px;
  height: 72px;
  font-size: 2.2rem;
}

.inst-art-card {
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.inv-art-thumb {
  display: block;
  border-radius: 6px;
  object-fit: contain;
  background: transparent;
}

.held-instrument-img {
  pointer-events: none;
}

.shop-emoji { font-size: 1.8rem; }

.tune-screen {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.tune-hint-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.tune-select {
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid var(--brand-purple);
  background: var(--brand-bg);
  color: var(--text);
  font-family: inherit;
  width: 100%;
  max-width: 280px;
}

.tune-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  border: 2px solid var(--brand-purple);
}

.shop-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-info span {
  font-size: 0.8rem;
  color: var(--muted);
}

.owned-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-lime);
  letter-spacing: 0.08em;
  border: 1px solid var(--brand-lime);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Performance */
.perform-screen {
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-height: calc(100vh - 60px);
  position: relative;
  overflow: hidden;
}

.perform-screen > .venue-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.perform-screen,
.hub-venue-preview {
  --parallax-x: 0;
  --parallax-y: 0;
}

.venue-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: 900px;
  transform-style: preserve-3d;
}

.hub-venue-preview .venue-backdrop {
  position: absolute;
  inset: 0;
}

/* Layered 2D depth — far to front */
.backdrop-layer {
  position: absolute;
  inset: -4% -2%;
  width: 104%;
  height: 108%;
  transform: translate(var(--px, 0), var(--py, 0));
  will-change: transform;
  transition: transform 0.05s linear;
}

.backdrop-layer.layer-far {
  z-index: 1;
  transform: translate(var(--px, 0), var(--py, 0)) scale(1.06);
  transform-origin: center bottom;
  filter: saturate(0.88) brightness(0.92);
}

.backdrop-layer.layer-mid {
  z-index: 2;
  transform: translate(calc(var(--px, 0) * 1.2), calc(var(--py, 0) * 1.1)) scale(1.02);
  transform-origin: center bottom;
}

.backdrop-layer.layer-near {
  z-index: 3;
  transform: translate(calc(var(--px, 0) * 1.5), calc(var(--py, 0) * 1.25));
  transform-origin: center bottom;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.backdrop-layer.layer-front {
  z-index: 4;
  transform: translate(calc(var(--px, 0) * 1.85), calc(var(--py, 0) * 1.4));
  transform-origin: center bottom;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
}

.venue-layer-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.backdrop-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 80% at 50% 60%, transparent 40%, rgba(0, 0, 0, 0.35) 100%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.2) 100%);
}

/* Subtle ambient drift when idle */
@keyframes layerDriftFar {
  0%, 100% { margin-left: 0; }
  50% { margin-left: 3px; }
}

@keyframes layerDriftNear {
  0%, 100% { margin-left: 0; }
  50% { margin-left: -4px; }
}

.venue-backdrop .layer-far .venue-layer-svg {
  animation: layerDriftFar 14s ease-in-out infinite;
}

.venue-backdrop .layer-front .venue-layer-svg {
  animation: layerDriftNear 9s ease-in-out infinite;
}

/* Legacy single-svg fallback */
.venue-backdrop-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.perform-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.title-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.recruit-modal {
  text-align: center;
}

.recruit-preview {
  margin-bottom: 8px;
}

.recruit-preview .bandmate-svg {
  margin: 0 auto;
}

.perform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.perform-timer {
  font-weight: 700;
  font-size: 1.2rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
}

.perform-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
}

.crowd-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  min-height: 60px;
  width: 100%;
}

.crowd-person {
  animation: crowdBounce 0.6s ease infinite;
  animation-delay: var(--delay);
}

@keyframes crowdBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.crowd-row.crowd-steady .crowd-person {
  animation: none;
  transform: translateY(-2px);
}

.stage-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.15) 0%, transparent 100%);
  pointer-events: none;
}

.performer-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 16px;
  z-index: 3;
}

.performer.hit-flash,
#performer.hit-flash {
  animation: none;
}

#performer {
  position: relative;
}

#performer.hit-flash::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  pointer-events: none;
  z-index: 20;
  animation: hitFlashOverlay 0.15s ease;
}

@keyframes hitFlashOverlay {
  0%, 100% { opacity: 0; box-shadow: none; }
  50% { opacity: 1; box-shadow: 0 0 22px rgba(255, 215, 0, 0.75); background: rgba(255, 215, 0, 0.08); }
}

@keyframes hitFlash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4) drop-shadow(0 0 20px gold); }
}

.bandmate-slot {
  position: absolute;
  bottom: 68px;
  left: calc(50% + var(--side, 1) * (55px + var(--i) * 38px));
  transform: translateX(-50%);
  z-index: 2;
  animation: crowdBounce 0.8s ease infinite;
  animation-delay: calc(var(--i) * 0.1s);
  opacity: 0.92;
}

/* Stage lineup — band flanking the lead */
.stage-lineup {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  margin-bottom: 8px;
  z-index: 2;
}

.lineup-side {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.lineup-side.left { flex-direction: row-reverse; }

.lineup-slot {
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.lineup-slot.lead {
  z-index: 3;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
}

.lineup-slot.side {
  opacity: 0.95;
  transform: translateY(calc(var(--slot, 0) * 4px));
}

.lineup-slot.side .bandmate-svg {
  width: 88px;
  height: auto;
}

/* Character play animations */
.lineup-slot.anim-drums,
#performer.anim-drums {
  animation: drumHitBody 0.22s ease;
}

.lineup-slot.anim-strum,
#performer.anim-strum {
  animation: strumBody 0.28s ease;
}

.lineup-slot.anim-cymbal,
#performer.anim-cymbal {
  animation: cymbalBody 0.22s ease;
}

.lineup-slot.anim-shake,
#performer.anim-shake {
  animation: shakeBody 0.2s ease;
}

.lineup-slot.anim-keys,
.lineup-slot.anim-sing,
.lineup-slot.anim-horn,
.lineup-slot.anim-hit,
#performer.anim-keys,
#performer.anim-sing,
#performer.anim-horn,
#performer.anim-hit {
  animation: bobPlay 0.24s ease;
}

#performer.hit-flash::after {
  animation: hitFlashOverlay 0.15s ease;
}

@keyframes drumHitBody {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(6px) scale(0.98); }
  60% { transform: translateY(-3px); }
}

@keyframes strumBody {
  0%, 100% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(-5px) rotate(-5deg); }
  70% { transform: translateY(-2px) rotate(4deg); }
}

@keyframes cymbalBody {
  0%, 100% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(-10px) rotate(-8deg); }
}

@keyframes shakeBody {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

@keyframes bobPlay {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bandmate-slot .bandmate-svg {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.play-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.rewind-btn {
  background: linear-gradient(135deg, #4a2d7a, #2d1b4e);
  border: 2px solid rgba(155, 107, 255, 0.5);
  border-radius: 16px;
  padding: 16px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(74, 45, 122, 0.45);
  transition: transform 0.1s, opacity 0.15s;
  color: #e8d5ff;
  flex-shrink: 0;
}

.rewind-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.rewind-btn:active:not(:disabled) {
  transform: scale(0.96);
}

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

.rewind-btn.rewinding {
  opacity: 0.85;
  pointer-events: none;
}

.rewind-btn.rewinding span:first-child {
  display: inline-block;
  animation: rewindSpin 0.6s linear infinite;
}

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

.perform-screen.rewinding .play-btn.rewind-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.perform-screen.rewinding .note-lane {
  filter: sepia(0.15) brightness(0.92);
}

.play-controls .play-btn {
  margin-top: 0;
}

.play-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), #ffb347);
  border: none;
  border-radius: 16px;
  padding: 16px 32px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(255, 209, 102, 0.4);
  transition: transform 0.1s;
  color: #3d2817;
  touch-action: manipulation;
}

.play-btn:hover {
  transform: scale(1.05);
}

.play-btn:active {
  filter: brightness(0.92);
}

.instrument-emoji {
  font-size: 1.5rem;
}

.perform-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.meter label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.meter-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.2s ease;
}

.crowd-fill {
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.cheer-fill {
  background: linear-gradient(90deg, var(--pink), var(--gold));
}

.perform-footer {
  text-align: center;
  font-weight: 600;
  color: var(--green);
}

.perform-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floater {
  position: absolute;
  bottom: 40%;
  font-weight: 700;
  font-size: 1.2rem;
  animation: floatUp 1s ease forwards;
}

.floater.cash { color: var(--green); }
.floater.miss { color: #ff6b6b; }
.floater.perfect { color: var(--gold); }
.floater.good { color: var(--green); }

.floater.hot-streak {
  font-size: 1.45rem;
  text-shadow: 0 0 12px #ff9933, 0 0 4px rgba(255, 180, 60, 0.8);
  animation: floatUpHot 1s ease forwards;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}

@keyframes floatUpHot {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.08); }
  100% { opacity: 0; transform: translateY(-70px) scale(1); }
}

/* Results */
.results-screen {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  padding-top: 40px;
}

.results-screen h2 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--bg-panel);
  border-radius: 12px;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-card span { font-size: 1.8rem; }
.result-card strong { font-size: 1.4rem; }
.result-card small { color: var(--muted); font-size: 0.75rem; }

.unlock-msg {
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
  color: var(--gold);
}

.achievements-section {
  margin-bottom: 24px;
  text-align: left;
}

.achievements-heading {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.achievements-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 8px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.achievement-badge {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  animation: badgePop 0.45s ease backwards;
}

.achievement-badge:nth-child(2) { animation-delay: 0.06s; }
.achievement-badge:nth-child(3) { animation-delay: 0.12s; }
.achievement-badge:nth-child(4) { animation-delay: 0.18s; }

.achievement-icon { font-size: 1.6rem; }
.achievement-title { font-size: 0.85rem; }
.achievement-desc {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.achievement-badge[data-achievement="venue_unlock"],
.achievement-badge[data-achievement="new_recruit"] {
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.08);
}

.booed-achievements {
  margin: 16px 0;
}

@keyframes badgePop {
  from { opacity: 0; transform: scale(0.85) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Gig results overlay — sits above curtain and perform screen */
.gig-results-layer {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  pointer-events: auto;
}

.gig-results-layer.hidden {
  display: none !important;
  pointer-events: none;
}

.gig-results-layer .results-screen {
  padding-top: 0;
  width: 100%;
}

.gig-results-layer .booed-screen {
  min-height: auto;
  width: 100%;
  background: transparent;
}

/* Settings gear button */
.settings-gear-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 150;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.settings-gear-btn:hover {
  transform: rotate(25deg) scale(1.06);
}

.settings-gear-btn:active {
  transform: rotate(45deg) scale(0.96);
}

.settings-modal .settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.settings-modal .settings-row label {
  flex: 0 0 auto;
  font-size: 1rem;
}

.settings-modal input[type="range"] {
  flex: 1 1 auto;
  accent-color: var(--brand-lime);
  height: 6px;
}

.settings-modal #settings-volume-value {
  flex: 0 0 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.settings-mute-btn {
  width: 100%;
}

.settings-mute-btn.active {
  border-color: var(--pink);
  color: var(--pink);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 100%;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
  text-align: center;
}

.modal h3 {
  margin-bottom: 12px;
}

.modal p {
  margin-bottom: 10px;
  line-height: 1.4;
}

.warn {
  color: #ff8a80;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Performance venue BG — subtle tint behind SVG backdrops */
.perform-screen.venue-street { background: #4a8ec4; }
.perform-screen.venue-tavern { background: #2a1810; }
.perform-screen.venue-square { background: #6a9ab8; }
.perform-screen.venue-talent { background: #1a0a2e; }
.perform-screen.venue-concert { background: #0a0814; }

/* Rhythm highway — Guitar Hero × Geometry Dash */
.performer-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
  z-index: 2;
}

.rhythm-highway {
  width: 100%;
  margin: 12px 0 10px;
  position: relative;
}

.highway-track {
  position: relative;
  height: 72px;
  background: linear-gradient(180deg, rgba(10, 5, 30, 0.85) 0%, rgba(20, 10, 50, 0.9) 100%);
  border-radius: 12px;
  border: 2px solid rgba(155, 107, 255, 0.45);
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(107, 203, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.4);
}

.highway-grid {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 38px,
    rgba(255, 255, 255, 0.04) 38px,
    rgba(255, 255, 255, 0.04) 40px
  );
  pointer-events: none;
}

.highway-glow {
  position: absolute;
  top: -20px;
  left: 10%;
  right: 10%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(155, 107, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hit-zone {
  position: absolute;
  left: 14%;
  top: 8px;
  bottom: 8px;
  width: 52px;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.hit-zone-sparkler {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.hit-zone-sparkler:not(.active) {
  display: none;
}

.hit-zone-sparkler .hold-spark {
  position: absolute;
  top: 55%;
  left: calc(15% + var(--i) * 7%);
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 10px currentColor;
  animation: hold-spark-pop 0.55s ease-out infinite;
  animation-delay: calc(var(--i) * -0.07s);
}

.hit-zone-sparkler.melodic .hold-spark {
  color: #ffb347;
  background: #ffe08a;
}

.hit-zone-sparkler.percussion .hold-spark {
  color: #7ee8ff;
  background: #d4f7ff;
}

.hit-zone-sparkler .hold-spark:nth-child(odd) {
  animation-name: hold-spark-pop-alt;
}

.hit-zone-sparkler .hold-spark-particle {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--spark-color, #fff);
  box-shadow:
    0 0 4px #fff,
    0 0 8px var(--spark-color, #fff),
    0 0 14px var(--spark-color, #fff);
  animation: holdSparkFly var(--dur, 0.45s) ease-out forwards;
  pointer-events: none;
}

.hit-zone-sparkler .hold-spark-particle.melodic {
  box-shadow: 0 0 6px #fff, 0 0 12px #ffb347, 0 0 18px #ff6b9d;
}

.hit-zone-sparkler .hold-spark-particle.percussion {
  box-shadow: 0 0 6px #fff, 0 0 12px #7ee8ff, 0 0 18px #6bcbff;
}

.hit-zone-sparkler .hold-spark-particle.spark-hot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  box-shadow: 0 0 8px #fff, 0 0 16px #ff9933, 0 0 24px #ff6600;
}

.hit-zone-core {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(107, 203, 119, 0.5);
  border-radius: 8px;
  background: rgba(107, 203, 119, 0.08);
  box-shadow: 0 0 12px rgba(107, 203, 119, 0.2);
}

.hit-zone.ready .hit-zone-core {
  border-color: var(--green);
  background: rgba(107, 203, 119, 0.2);
  box-shadow: 0 0 20px rgba(107, 203, 119, 0.5);
}

.hit-zone-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  border: 2px solid transparent;
  opacity: 0;
  transition: opacity 0.08s;
}

.hit-zone-pulse.active {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold);
  animation: zonePulse 0.3s ease infinite;
}

@keyframes zonePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.7; }
}

.hit-zone.flash-perfect .hit-zone-core {
  background: rgba(255, 209, 102, 0.45);
  border-color: var(--gold);
  box-shadow: 0 0 24px var(--gold);
}

.hit-zone.flash-good .hit-zone-core {
  background: rgba(107, 203, 119, 0.35);
  border-color: var(--green);
}

.hit-zone.flash-miss .hit-zone-core {
  background: rgba(255, 107, 107, 0.25);
  border-color: #ff6b6b;
}

.note-lane {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.note-gem {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: left 0.05s linear;
  pointer-events: none;
}

.note-gem.hold {
  transform: translate(0, -50%);
  align-items: flex-start;
  padding-left: 2px;
}

.note-gem.hold .gem-shape {
  font-size: 1rem;
  letter-spacing: -0.15em;
  width: 100%;
  text-align: left;
  overflow: hidden;
}

.note-gem.hold.melodic .gem-shape {
  color: #ffb347;
  text-shadow: 0 0 10px #ffb347;
}

.note-gem.hold.percussion .gem-shape {
  color: #7ee8ff;
  text-shadow: 0 0 10px #7ee8ff;
}

.note-gem.hold.active .gem-shape {
  filter: drop-shadow(0 0 10px currentColor) brightness(1.2);
}

.note-gem.hold.holding {
  z-index: 2;
}

.note-gem.hold.holding .gem-shape {
  filter: brightness(1.15);
}

.note-gem.hold.holding::after {
  opacity: 0.45;
  animation: none;
}

@keyframes hold-spark-pop {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-6px + var(--i) * 1.5px), -22px) scale(0.2);
    opacity: 0;
  }
}

@keyframes hold-spark-pop-alt {
  0% {
    transform: translate(0, 0) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(calc(4px + var(--i) * 1px), -28px) scale(0.15);
    opacity: 0;
  }
}

@keyframes hold-gem-glow {
  from {
    filter: drop-shadow(0 0 10px currentColor) brightness(1.35);
  }
  to {
    filter: drop-shadow(0 0 22px #fff) brightness(1.7);
  }
}

.note-gem.hold::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: linear-gradient(90deg, currentColor 0%, transparent 100%);
  opacity: 0.35;
  pointer-events: none;
}

.note-gem.hold.melodic::after {
  color: #ffb347;
}

.note-gem.hold.percussion::after {
  color: #7ee8ff;
}

.hit-zone.holding.melodic .hit-zone-core {
  border-color: #ffb347;
  background: rgba(255, 179, 71, 0.28);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.55),
    0 0 26px rgba(255, 179, 71, 0.7),
    0 0 38px rgba(255, 107, 157, 0.35);
  animation: hold-pulse 0.35s ease-in-out infinite alternate;
}

.hit-zone.holding.percussion .hit-zone-core {
  border-color: #7ee8ff;
  background: rgba(126, 232, 255, 0.22);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.55),
    0 0 26px rgba(107, 203, 255, 0.65),
    0 0 38px rgba(126, 232, 255, 0.4);
  animation: hold-pulse 0.35s ease-in-out infinite alternate;
}

.hit-zone.holding:not(.melodic):not(.percussion) .hit-zone-core {
  border-color: #ffe08a;
  background: rgba(255, 224, 138, 0.3);
  box-shadow:
    0 0 16px rgba(255, 255, 255, 0.65),
    0 0 28px rgba(255, 179, 71, 0.75),
    0 0 44px rgba(255, 107, 157, 0.35);
  animation: hold-pulse 0.35s ease-in-out infinite alternate;
}

.hit-zone.holding.melodic .hit-zone-pulse {
  animation: hold-zone-sparkle-melodic 0.25s steps(2, end) infinite;
}

.hit-zone.holding.percussion .hit-zone-pulse {
  animation: hold-zone-sparkle-percussion 0.25s steps(2, end) infinite;
}

.hit-zone.holding .hit-zone-pulse {
  opacity: 1;
}

@keyframes hold-zone-sparkle-melodic {
  0%, 100% { box-shadow: 0 0 12px #fff, 0 0 24px #ffb347; transform: scale(1); }
  50% { box-shadow: 0 0 20px #fff, 0 0 36px #ffd166; transform: scale(1.06); }
}

@keyframes hold-zone-sparkle-percussion {
  0%, 100% { box-shadow: 0 0 12px #fff, 0 0 24px #7ee8ff; transform: scale(1); }
  50% { box-shadow: 0 0 20px #fff, 0 0 36px #6bcbff; transform: scale(1.06); }
}

@keyframes hold-zone-sparkle {
  0%, 100% { box-shadow: 0 0 12px #fff, 0 0 24px #ffb347; transform: scale(1); }
  50% { box-shadow: 0 0 20px #fff, 0 0 36px #ffd166; transform: scale(1.06); }
}

@keyframes hold-pulse {
  from { box-shadow: 0 0 14px rgba(255, 179, 71, 0.4); }
  to { box-shadow: 0 0 26px rgba(255, 179, 71, 0.7); }
}

.gem-shape {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px currentColor);
}

.note-gem.percussion .gem-shape {
  color: #6bcbff;
  text-shadow: 0 0 10px #6bcbff;
}

.note-gem.melodic .gem-shape {
  color: #ff6b9d;
  text-shadow: 0 0 10px #ff6b9d;
}

.gem-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 5px;
  border-radius: 4px;
}

.highway-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 0 4px;
}

.song-playing {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.rhythm-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 4px 0 8px;
}

.rhythm-hint .rating-perfect { color: var(--gold); font-weight: 700; }
.rhythm-hint .rating-good { color: var(--green); font-weight: 700; }
.rhythm-hint .rating-miss { color: #ff6b6b; font-weight: 700; }

.combo-display {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
  min-height: 1.2em;
}

/* Held instrument animations — inner .held-play so mount transform stays stable */
.held-play.inst-play-drums {
  animation: drumStickHit 0.22s ease;
}

.held-play.inst-play-cymbal {
  animation: cymbalHit 0.22s ease;
}

.held-play.inst-play-shake {
  animation: tambourineShake 0.2s ease;
}

.held-play.inst-play-melodic {
  animation: strumHitPlay 0.28s ease;
}

.held-play.inst-play-percussion {
  animation: cymbalHit 0.2s ease;
}

@keyframes strumHitPlay {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(4px, -2px) rotate(3deg); }
}

@keyframes drumStickHit {
  0%, 100% { transform: translate(0, 0); }
  40% { transform: translate(0, 8px); }
}

@keyframes tambourineShake {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-12deg); }
  70% { transform: rotate(12deg); }
}

@keyframes cymbalHit {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(-5deg) translateY(-8px); }
}

@keyframes strumHit {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(-8deg) translateX(6px); }
}

/* Legacy — kept for compatibility */
.performer.play-percussion { animation: playPercussion 0.2s ease; }
.performer.play-melodic { animation: playMelodic 0.28s ease; }

@keyframes playPercussion {
  0%, 100% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(-6px) rotate(-3deg); }
  70% { transform: translateY(2px) rotate(2deg); }
}

@keyframes playMelodic {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-4px) rotate(-6deg); }
  65% { transform: translateY(-2px) rotate(4deg); }
}

/* Stage lighting rig — behind performers, colored EDM effects */
.stage-lighting-rig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.stage-light-haze {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 110%, rgba(107, 203, 255, 0.04), transparent 65%);
  animation: hazePulse 4s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes hazePulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.75; }
}

.stage-spotlight {
  position: absolute;
  top: -20px;
  width: 120px;
  height: 200px;
  margin-left: -60px;
  background: conic-gradient(from 180deg at 50% 0%, transparent 44%, var(--spot-color, #ffd166) 50%, transparent 56%);
  opacity: 0.28;
  transform-origin: top center;
  animation: spotSweep 3.5s ease-in-out infinite;
  animation-delay: var(--spot-delay, 0s);
  filter: blur(2px);
}

@keyframes spotSweep {
  0%, 100% { transform: rotate(-18deg); opacity: 0.18; }
  50% { transform: rotate(18deg); opacity: 0.38; }
}

.stage-laser {
  position: absolute;
  top: 0;
  width: 3px;
  height: 100%;
  margin-left: -1.5px;
  background: linear-gradient(180deg, var(--laser-color, #ff0044), transparent 85%);
  opacity: 0.5;
  box-shadow: 0 0 10px var(--laser-color), 0 0 20px var(--laser-color);
  animation: laserSwing 2.2s ease-in-out infinite;
  animation-delay: var(--laser-delay, 0s);
}

.stage-laser-beam {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 140%;
  height: 3px;
  margin-left: -70%;
  background: linear-gradient(90deg, transparent, var(--beam-color, #00ffcc), transparent);
  opacity: 0.35;
  box-shadow: 0 0 14px var(--beam-color, #00ffcc);
  animation: laserBeamSweep 3s ease-in-out infinite;
  animation-delay: var(--beam-delay, 0s);
  transform-origin: center center;
}

@keyframes laserBeamSweep {
  0%, 100% { transform: rotate(-12deg) scaleX(0.85); opacity: 0.2; }
  50% { transform: rotate(12deg) scaleX(1); opacity: 0.45; }
}

.stage-laser-grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 38px, var(--grid-color, rgba(0, 255, 204, 0.12)) 38px, var(--grid-color, rgba(0, 255, 204, 0.12)) 39px),
    repeating-linear-gradient(0deg, transparent, transparent 28px, var(--grid-color, rgba(255, 0, 68, 0.1)) 28px, var(--grid-color, rgba(255, 0, 68, 0.1)) 29px);
  opacity: 0.25;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.35; }
}

@keyframes laserSwing {
  0%, 100% { transform: rotate(-25deg) scaleY(0.9); }
  50% { transform: rotate(25deg) scaleY(1); }
}

.stage-strobe {
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  margin-left: -40px;
  background: radial-gradient(ellipse at top, var(--strobe-color, rgba(107, 203, 255, 0.35)), transparent 70%);
  animation: strobeFlash 1.1s steps(2) infinite;
  animation-delay: var(--strobe-delay, 0s);
  opacity: 0;
}

@keyframes strobeFlash {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 0.28; }
}

.stage-wash {
  position: absolute;
  inset: 0;
  animation: washShift 6s ease-in-out infinite;
  animation-delay: var(--wash-delay, 0s);
}

@keyframes washShift {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.32; }
}

.stage-beam-fan {
  position: absolute;
  top: -10px;
  width: 45%;
  height: 70%;
  opacity: 0.18;
  background: linear-gradient(135deg, var(--fan-color, rgba(107, 203, 255, 0.35)), transparent 60%);
  animation: beamFan 5s ease-in-out infinite;
}

.stage-beam-fan.left { left: 0; transform-origin: top left; }
.stage-beam-fan.right { right: 0; transform-origin: top right; transform: scaleX(-1); }

@keyframes beamFan {
  0%, 100% { transform: rotate(-8deg); opacity: 0.15; }
  50% { transform: rotate(8deg); opacity: 0.35; }
}

/* Gem hit explosions */
.gem-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

.note-gem.gem-exploding {
  animation: gemVanish 0.28s ease-out forwards;
  z-index: 6;
}

@keyframes gemVanish {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; filter: brightness(2); }
}

.gem-particle {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: -4px 0 0 -4px;
  animation: particleBurst 0.5s ease-out forwards;
  box-shadow: 0 0 8px currentColor;
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

@keyframes holdSparkFly {
  0% {
    transform: translate(0, 0) scale(1.2);
    opacity: 1;
  }
  70% {
    opacity: 0.85;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.1);
    opacity: 0;
  }
}

.gem-burst-ring {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  animation: burstRing 0.45s ease-out forwards;
}

.gem-burst-ring.burst-perfect { border-color: var(--gold); box-shadow: 0 0 16px var(--gold); }
.gem-burst-ring.burst-good { border-color: var(--green); box-shadow: 0 0 12px var(--green); }

.gem-burst-ring.burst-hot {
  animation: burstRingHot 0.55s ease-out forwards;
  box-shadow: 0 0 24px #ff9933;
}

.gem-particle.burst-hot {
  width: 7px;
  height: 7px;
}

@keyframes burstRing {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes burstRingHot {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(4.8); opacity: 0; }
}

.hit-zone.flash-hot .hit-zone-core {
  box-shadow: 0 0 32px var(--gold), 0 0 16px #ff9933;
}

.hit-zone.flash-hot.hit-pop .hit-zone-core {
  animation: zonePopHot 0.32s ease;
}

@keyframes zonePopHot {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.band-on-fire #performer.hit-flash::after {
  box-shadow: 0 0 32px rgba(255, 140, 0, 0.9), 0 0 18px rgba(255, 215, 0, 0.75);
  background: rgba(255, 160, 40, 0.12);
}

.hit-zone.hit-pop .hit-zone-core {
  animation: zonePop 0.28s ease;
}

@keyframes zonePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Band on fire at 10+ combo */
.lineup-slot.on-fire,
.bandmate-slot.on-fire {
  position: relative;
}

.lineup-slot.on-fire::before,
.bandmate-slot.on-fire::before {
  content: '🔥';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  z-index: 25;
  animation: flameBob 0.35s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px #ff6600);
}

.lineup-slot.on-fire::after,
.bandmate-slot.on-fire::after {
  content: '';
  position: absolute;
  inset: -6px -10px 0;
  background: radial-gradient(ellipse at bottom, rgba(255, 120, 0, 0.55) 0%, rgba(255, 50, 0, 0.25) 40%, transparent 72%);
  border-radius: 50% 50% 20% 20%;
  z-index: -1;
  animation: flameFlicker 0.25s ease-in-out infinite alternate;
  pointer-events: none;
}

.performer-wrap.band-on-fire {
  filter: drop-shadow(0 0 12px rgba(255, 100, 0, 0.4));
}

.rhythm-highway.on-fire .highway-track {
  border-color: rgba(255, 140, 0, 0.75);
  box-shadow: inset 0 0 24px rgba(255, 100, 0, 0.2), 0 0 20px rgba(255, 120, 0, 0.45);
}

.rhythm-highway.on-fire .highway-glow {
  background: radial-gradient(ellipse, rgba(255, 120, 0, 0.35) 0%, transparent 70%);
}

.play-controls.on-fire .play-btn,
#btn-play-note.on-fire {
  box-shadow: 0 0 20px rgba(255, 120, 0, 0.55), 0 4px 16px rgba(255, 80, 0, 0.35);
}

@keyframes flameBob {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to { transform: translateX(-50%) translateY(-6px) scale(1.15); }
}

@keyframes flameFlicker {
  from { opacity: 0.75; transform: scaleY(1); }
  to { opacity: 1; transform: scaleY(1.08); }
}

.combo-display {
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.5);
}

/* Booed off stage */
.booed-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(180deg, #1a0a14 0%, #2a1020 50%, #1a0810 100%);
}

.booed-overlay {
  text-align: center;
  padding: 2rem;
  animation: booedShake 0.5s ease;
}

.booed-title {
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  color: #ff6b6b;
  text-shadow: 0 0 24px rgba(255, 107, 107, 0.6);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  animation: booedPop 0.6s ease 0.2s both;
}

.booed-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.booed-tip {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
}

@keyframes booedPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.floater.miss {
  font-size: 1.1rem;
  font-weight: 800;
}

/* Stage curtain intro */
.stage-curtain {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  overflow: hidden;
}

.stage-curtain.curtain-idle,
.stage-curtain.curtain-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage-curtain.curtain-closing,
.stage-curtain.curtain-loading,
.stage-curtain.curtain-opening {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.curtain-panel {
  position: absolute;
  top: 0;
  width: 52%;
  height: 100%;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a0028 35%, #000000 100%);
  box-shadow: inset 0 0 40px rgba(155, 48, 255, 0.25);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.curtain-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 18px,
    rgba(0, 0, 0, 0.12) 18px,
    rgba(0, 0, 0, 0.12) 22px
  );
}

.curtain-left {
  left: 0;
  transform: translateX(-102%);
  border-right: 4px solid #3d0810;
}

.curtain-right {
  right: 0;
  transform: translateX(102%);
  border-left: 4px solid #3d0810;
}

.curtain-closing .curtain-left,
.curtain-loading .curtain-left {
  transform: translateX(0);
}

.curtain-closing .curtain-right,
.curtain-loading .curtain-right {
  transform: translateX(0);
}

.curtain-opening .curtain-left {
  transform: translateX(-102%);
  transition-duration: 0.8s;
}

.curtain-opening .curtain-right {
  transform: translateX(102%);
  transition-duration: 0.8s;
}

.curtain-status {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
}

.curtain-loading .curtain-status {
  opacity: 1;
}

.perform-screen.stage-mounting .perform-content {
  opacity: 0;
}

.perform-content.stage-reveal {
  animation: stageReveal 0.7s ease forwards;
}

@keyframes stageReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Character limb rig — rotate inner pose groups only; SVG handles limb offsets */
.rig-arm .rig-forearm-pose,
.rig-arm .rig-hand-pose {
  transition: transform 0.08s ease-out;
}

.rig-pose-strum .rig-arm-R.rig-hit .rig-forearm-pose {
  animation: rigStrumR 0.28s ease;
}

.rig-pose-strum .rig-arm-L.rig-hit-alt .rig-forearm-pose {
  animation: rigStrumL 0.28s ease;
}

.rig-pose-drums .rig-arm-L.rig-hit .rig-forearm-pose,
.rig-pose-drums .rig-arm-L.rig-hit .rig-stick {
  animation: rigDrumHitL 0.22s ease;
}

.rig-pose-drums .rig-arm-R.rig-hit-alt .rig-forearm-pose,
.rig-pose-drums .rig-arm-R.rig-hit-alt .rig-stick {
  animation: rigDrumHitR 0.22s ease;
}

.rig-pose-keys .rig-arm-L.rig-hit .rig-hand-pose,
.rig-pose-keys .rig-arm-R.rig-hit-alt .rig-hand-pose {
  animation: rigKeyPress 0.2s ease;
}

.rig-pose-brass .rig-arm-R.rig-hit-alt .rig-hand-pose {
  animation: rigBrassToot 0.24s ease;
}

/* Resting arm poses — grip-aligned via --rig-rest-* set by CharacterRig */
.rig-pose-strum .rig-arm-L .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 38deg));
}

.rig-pose-strum .rig-arm-R .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 44deg));
}

.rig-pose-strum .rig-arm-L .rig-hand-pose {
  transform: rotate(var(--rig-rest-hand, 8deg));
}

.rig-pose-strum .rig-arm-R .rig-hand-pose {
  transform: rotate(var(--rig-rest-hand, 6deg));
}

.rig-pose-keys .rig-arm-L .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 26deg));
}

.rig-pose-keys .rig-arm-R .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 26deg));
}

.rig-pose-keys .rig-arm-L .rig-hand-pose,
.rig-pose-keys .rig-arm-R .rig-hand-pose {
  transform: rotate(var(--rig-rest-hand, 0deg));
}

.rig-pose-drums .rig-arm-L .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 20deg));
}

.rig-pose-drums .rig-arm-R .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 20deg));
}

.rig-pose-brass .rig-arm-L .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 8deg));
}

.rig-pose-brass .rig-arm-R .rig-forearm-pose {
  transform: rotate(var(--rig-rest-forearm, 52deg));
}

.rig-pose-brass .rig-arm-R .rig-hand-pose {
  transform: rotate(var(--rig-rest-hand, 18deg));
}

/* Button press — lighter strike when play is held down */
.rig-pose-strum .rig-arm-L.rig-press .rig-forearm-pose,
.rig-pose-strum .rig-arm-R.rig-press-alt .rig-forearm-pose {
  animation: rigStrumPressL 0.2s ease;
}

.rig-pose-strum .rig-arm-R.rig-press .rig-forearm-pose,
.rig-pose-strum .rig-arm-L.rig-press-alt .rig-forearm-pose {
  animation: rigStrumPressR 0.2s ease;
}

.rig-pose-drums .rig-arm-L.rig-press .rig-forearm-pose,
.rig-pose-drums .rig-arm-L.rig-press .rig-stick {
  animation: rigDrumPressL 0.18s ease;
}

.rig-pose-drums .rig-arm-R.rig-press-alt .rig-forearm-pose,
.rig-pose-drums .rig-arm-R.rig-press-alt .rig-stick {
  animation: rigDrumPressR 0.18s ease;
}

.rig-pose-keys .rig-arm-L.rig-press .rig-hand-pose,
.rig-pose-keys .rig-arm-R.rig-press-alt .rig-hand-pose {
  animation: rigKeyPress 0.18s ease;
}

.rig-pose-brass .rig-arm-R.rig-press-alt .rig-hand-pose {
  animation: rigBrassPress 0.2s ease;
}

/* Sustained playing while button held */
.rig-playing.rig-pose-strum .rig-arm-L.rig-press .rig-forearm-pose,
.rig-playing.rig-pose-strum .rig-arm-R.rig-press-alt .rig-forearm-pose {
  animation: rigStrumSustainL 0.5s ease-in-out infinite alternate;
}

.rig-playing.rig-pose-strum .rig-arm-R.rig-press .rig-forearm-pose,
.rig-playing.rig-pose-strum .rig-arm-L.rig-press-alt .rig-forearm-pose {
  animation: rigStrumSustainR 0.5s ease-in-out infinite alternate;
  animation-delay: 0.25s;
}

.rig-playing.rig-pose-keys .rig-arm-L.rig-press .rig-hand-pose,
.rig-playing.rig-pose-keys .rig-arm-R.rig-press-alt .rig-hand-pose {
  animation: rigKeySustain 0.45s ease-in-out infinite alternate;
}

.rig-playing.rig-pose-keys .rig-arm-R.rig-press .rig-hand-pose,
.rig-playing.rig-pose-keys .rig-arm-L.rig-press-alt .rig-hand-pose {
  animation: rigKeySustain 0.45s ease-in-out infinite alternate;
  animation-delay: 0.22s;
}

.rig-playing.rig-pose-drums .rig-arm-L.rig-press .rig-forearm-pose,
.rig-playing.rig-pose-drums .rig-arm-R.rig-press-alt .rig-forearm-pose {
  animation: rigDrumSustainL 0.35s ease-in-out infinite alternate;
}

.rig-playing.rig-pose-drums .rig-arm-R.rig-press .rig-forearm-pose,
.rig-playing.rig-pose-drums .rig-arm-L.rig-press-alt .rig-forearm-pose {
  animation: rigDrumSustainR 0.35s ease-in-out infinite alternate;
  animation-delay: 0.17s;
}

.rig-playing.rig-pose-drums .rig-stick.rig-stick-sustain {
  animation: rigStickSustain 0.35s ease-in-out infinite alternate;
}

.rig-playing.rig-pose-brass .rig-arm-R.rig-press-alt .rig-hand-pose {
  animation: rigBrassSustain 0.4s ease-in-out infinite alternate;
}

.rig-stick.rig-stick-hit {
  animation: rigStickHit 0.18s ease;
}

.rig-stick.rig-stick-sustain {
  animation: rigStickSustain 0.35s ease-in-out infinite alternate;
}

@keyframes rigStrumPressL {
  0%, 100% { transform: rotate(var(--rig-rest-forearm, 38deg)); }
  50% { transform: rotate(calc(var(--rig-rest-forearm, 38deg) + 12deg)); }
}

@keyframes rigStrumPressR {
  0%, 100% { transform: rotate(var(--rig-rest-forearm, 44deg)); }
  50% { transform: rotate(calc(var(--rig-rest-forearm, 44deg) + 12deg)); }
}

@keyframes rigStrumSustainL {
  from { transform: rotate(calc(var(--rig-rest-forearm, 38deg) + 4deg)); }
  to { transform: rotate(calc(var(--rig-rest-forearm, 38deg) + 14deg)); }
}

@keyframes rigStrumSustainR {
  from { transform: rotate(calc(var(--rig-rest-forearm, 44deg) + 4deg)); }
  to { transform: rotate(calc(var(--rig-rest-forearm, 44deg) + 14deg)); }
}

@keyframes rigDrumPressL {
  0%, 100% { transform: rotate(var(--rig-rest-forearm, 20deg)); }
  50% { transform: rotate(calc(var(--rig-rest-forearm, 20deg) + 18deg)); }
}

@keyframes rigDrumPressR {
  0%, 100% { transform: rotate(var(--rig-rest-forearm, 20deg)); }
  50% { transform: rotate(calc(var(--rig-rest-forearm, 20deg) + 18deg)); }
}

@keyframes rigDrumSustainL {
  from { transform: rotate(calc(var(--rig-rest-forearm, 20deg) + 6deg)); }
  to { transform: rotate(calc(var(--rig-rest-forearm, 20deg) + 22deg)); }
}

@keyframes rigDrumSustainR {
  from { transform: rotate(calc(var(--rig-rest-forearm, 20deg) + 6deg)); }
  to { transform: rotate(calc(var(--rig-rest-forearm, 20deg) + 22deg)); }
}

@keyframes rigKeySustain {
  from { transform: translateY(0) rotate(var(--rig-rest-hand, 0deg)); }
  to { transform: translateY(5px) rotate(var(--rig-rest-hand, 0deg)); }
}

@keyframes rigBrassPress {
  0%, 100% { transform: rotate(var(--rig-rest-hand, 18deg)); }
  50% { transform: rotate(calc(var(--rig-rest-hand, 18deg) + 8deg)) translateY(3px); }
}

@keyframes rigBrassSustain {
  from { transform: rotate(calc(var(--rig-rest-hand, 18deg) + 2deg)); }
  to { transform: rotate(calc(var(--rig-rest-hand, 18deg) + 10deg)) translateY(2px); }
}

@keyframes rigStickSustain {
  from { transform: rotate(4deg); }
  to { transform: rotate(16deg); }
}

@keyframes rigStrumR {
  0%, 100% { transform: rotate(44deg); }
  40% { transform: rotate(58deg); }
  70% { transform: rotate(30deg); }
}

@keyframes rigStrumL {
  0%, 100% { transform: rotate(38deg); }
  40% { transform: rotate(52deg); }
  70% { transform: rotate(28deg); }
}

@keyframes rigDrumHitL {
  0%, 100% { transform: rotate(20deg); }
  35% { transform: rotate(42deg); }
}

@keyframes rigDrumHitR {
  0%, 100% { transform: rotate(20deg); }
  35% { transform: rotate(42deg); }
}

@keyframes rigKeyPress {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes rigBrassToot {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(26deg) translateY(3px); }
}

@keyframes rigStickHit {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(18deg); }
}

/* Drum kit hit flash */
.drum-piece.drum-hit-flash {
  animation: drumPieceHit 0.2s ease;
}

@keyframes drumPieceHit {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(1.6); transform: scale(1.05); }
}

/* Hub loadout & gig button */
.hub-loadout {
  margin: 12px 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  border: 2px solid var(--brand-purple);
  box-shadow: 0 0 10px var(--brand-purple-glow);
}

.hub-loadout h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.loadout-row {
  font-size: 0.9rem;
  margin: 4px 0;
}

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

.loadout-row.loadout-instrument .inst-art-card {
  width: 32px;
  height: auto;
  border-radius: 4px;
}

.loadout-row.loadout-wear {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
}

.loadout-label {
  min-width: 72px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.loadout-row.loadout-band {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loadout-band-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loadout-band-member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  background: rgba(155, 107, 255, 0.15);
  border-radius: 6px;
  padding: 2px 6px 2px 2px;
}

.loadout-solo {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

#btn-perform {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.gig-loadout-text small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
}

.gig-loadout-preview {
  flex-shrink: 0;
}

/* Shop instrument preview */
.shop-preview-btn {
  background: #000;
  border: 2px solid var(--brand-purple);
  border-radius: 10px;
  padding: 4px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 10px var(--brand-purple-glow);
  flex-shrink: 0;
}

.shop-preview-btn:hover {
  transform: scale(1.04);
  border-color: var(--brand-lime);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.35);
}

.shop-inst-preview {
  display: block;
}

/* Title idle character */
.title-idle-character {
  margin: 1rem auto 0.5rem;
  width: 180px;
  max-width: 180px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.title-idle-character .character-layered {
  margin: 0 auto;
  width: 180px !important;
}

