/* ============================================================================
 * Midnight FM 108.4 v2.0 — Luxury Vintage Hi-Fi & Living 2AM Studio Aesthetic
 * Brushed Gunmetal Aluminum, Walnut Wood Side Cheeks, Glowing Vacuum Tubes
 * ============================================================================ */

:root {
  --bg-room: #090807;
  --chassis-dark: rgba(21, 20, 19, 0.93);
  --chassis-panel: rgba(28, 26, 24, 0.92);
  --walnut-light: #4a301f;
  --walnut-dark: #25170e;

  --amber-bright: #ffbe6b;
  --amber-core: #f29438;
  --amber-deep: #b85d19;
  --ruby-onair: #e83b3b;
  --cyan-secret: #67d8d0;

  --text-main: #f3e8d8;
  --text-soft: #bfa990;
  --text-muted: #7c6b5a;

  --font-sans: 'PingFang TC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Microsoft JhengHei', sans-serif;
  --font-serif: 'Songti TC', 'Noto Serif TC', 'PMingLiU', Georgia, serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --font-display: 'Helvetica Neue', -apple-system, sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--bg-room);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  user-select: none;
}

/* Fullscreen Animated 2AM City Skyline & Rain Window Canvas */
#studioBackdropCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================================
 * Power-On Splash Screen
 * ============================================================================ */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 50% 42%, rgba(28, 20, 14, 0.86) 0%, rgba(7, 6, 6, 0.94) 76%);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-card {
  max-width: 580px;
  width: 100%;
  background: linear-gradient(165deg, rgba(34, 29, 25, 0.96) 0%, rgba(19, 17, 15, 0.98) 100%);
  border: 1px solid #44372b;
  border-radius: 16px;
  padding: 40px 38px 34px;
  text-align: center;
  box-shadow:
    0 34px 96px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 205, 145, 0.14);
}

.splash-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber-bright);
  padding: 5px 14px;
  border: 1px solid rgba(255, 180, 90, 0.3);
  border-radius: 999px;
  background: rgba(255, 150, 50, 0.09);
  margin-bottom: 18px;
}

.splash-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-core);
  box-shadow: 0 0 10px var(--amber-core);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.15); }
}

.splash-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff2de;
  text-shadow: 0 0 28px rgba(255, 165, 70, 0.28);
  margin-bottom: 6px;
}

.splash-en {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.26em;
  color: var(--text-soft);
  margin-bottom: 22px;
}

.splash-desc {
  font-size: 14px;
  line-height: 1.9;
  color: #d6c5b0;
  margin-bottom: 26px;
  text-align: left;
  background: rgba(0, 0, 0, 0.32);
  border-left: 2px solid var(--amber-deep);
  padding: 15px 18px;
  border-radius: 0 8px 8px 0;
}

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

.power-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  padding: 15px 28px;
  border: 1px solid rgba(255, 194, 118, 0.6);
  border-radius: 10px;
  background: linear-gradient(180deg, #df7f28 0%, #9c4a12 100%);
  color: #fff8ee;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(217, 122, 38, 0.38), inset 0 1px 0 rgba(255, 240, 210, 0.45);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.power-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 34px rgba(242, 148, 56, 0.55);
}

.secondary-splash-btn {
  background: transparent;
  border: 1px solid #44382d;
  color: var(--text-soft);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.secondary-splash-btn:hover {
  border-color: var(--amber-core);
  color: var(--amber-bright);
}

.headphone-hint {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================================================
 * Main Console Chassis (Brushed Metal + Walnut Cheeks + Corner Screws)
 * ============================================================================ */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  transition: align-items 0.35s ease;
}

.app-shell.zen-window {
  align-items: flex-end;
  padding-bottom: 24px;
}

.radio-chassis {
  width: 100%;
  max-width: 1300px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(180deg, rgba(31, 28, 26, 0.92) 0%, rgba(19, 18, 17, 0.95) 100%);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border-left: 16px solid var(--walnut-light);
  border-right: 16px solid var(--walnut-light);
  border-top: 2px solid #443b33;
  border-bottom: 4px solid #0e0c0b;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.82),
    inset 2px 0 0 rgba(0, 0, 0, 0.55),
    inset -2px 0 0 rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 224, 180, 0.1);
  padding: 16px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

/* Authentic Industrial Corner Screws */
.screw {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #665d55, #25211e 75%);
  border: 1px solid #12100f;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  pointer-events: none;
}
.screw::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 1px;
  right: 1px;
  height: 1px;
  background: #141211;
  transform: rotate(-32deg);
}
.screw.tl { top: 8px; left: 8px; }
.screw.tr { top: 8px; right: 8px; }
.screw.bl { bottom: 8px; left: 8px; }
.screw.br { bottom: 8px; right: 8px; }

.engraved-serial {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(210, 186, 155, 0.36);
  padding: 0 4px;
  margin-bottom: -6px;
}

/* ============================================================================
 * Top Hardware Rack: Station Info | Analog FM Dial + S-Meter | Tubes & Tools
 * ============================================================================ */
.top-rack {
  display: grid;
  grid-template-columns: 245px 1fr 296px;
  gap: 14px;
  align-items: stretch;
  background: rgba(16, 15, 14, 0.9);
  border: 1px solid #302923;
  border-radius: 10px;
  padding: 11px 14px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.72);
}

.station-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  border-right: 1px solid #28221d;
  padding-right: 12px;
}

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

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.08em;
  color: var(--amber-bright);
}

.on-air-lamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: rgba(232, 59, 59, 0.16);
  border: 1px solid rgba(232, 59, 59, 0.5);
  color: #ff7f7f;
  box-shadow: 0 0 12px rgba(232, 59, 59, 0.28);
}

.on-air-lamp .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ruby-onair);
  box-shadow: 0 0 8px var(--ruby-onair);
  animation: pulseDot 1.6s infinite;
}

.nixie-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #0a0807;
  border: 1px solid #2d241d;
  border-radius: 6px;
  padding: 5px 10px;
  font-family: var(--font-mono);
}

.nixie-night {
  font-size: 12px;
  color: var(--amber-bright);
  text-shadow: 0 0 10px rgba(255, 165, 70, 0.6);
}

.nixie-clock {
  font-size: 11px;
  color: var(--text-soft);
}

.weather-line {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Illuminated Analog FM Dial + 5-Bar S-Meter */
.dial-housing {
  background: linear-gradient(180deg, #16110c 0%, #241910 50%, #140e09 100%);
  border: 1px solid #413224;
  border-radius: 8px;
  padding: 9px 15px 7px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    inset 0 0 28px rgba(255, 155, 58, 0.16),
    inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.dial-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 205, 145, 0.72);
  margin-bottom: 4px;
}

.s-meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.s-bar {
  width: 4px;
  border-radius: 1px;
  background: #332921;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.s-bar:nth-child(1) { height: 4px; }
.s-bar:nth-child(2) { height: 6px; }
.s-bar:nth-child(3) { height: 8px; }
.s-bar:nth-child(4) { height: 10px; }
.s-bar:nth-child(5) { height: 12px; }

.s-bar.lit {
  background: var(--amber-bright);
  box-shadow: 0 0 6px var(--amber-core);
}

.freq-readout {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--amber-bright);
  text-shadow: 0 0 14px rgba(255, 175, 75, 0.65);
}

.resonance-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  border: 1px solid #3d3228;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.resonance-badge.locked {
  color: #fff4d6;
  border-color: rgba(255, 195, 100, 0.88);
  background: rgba(242, 148, 56, 0.3);
  box-shadow: 0 0 14px rgba(255, 170, 70, 0.48);
}

.resonance-badge.secret-hit {
  color: #dcfffb;
  border-color: var(--cyan-secret);
  background: rgba(103, 216, 208, 0.22);
  box-shadow: 0 0 14px rgba(103, 216, 208, 0.5);
  cursor: pointer;
}

.dial-track {
  position: relative;
  height: 36px;
  cursor: ew-resize;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dial-scale-numbers {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 212, 158, 0.7);
  margin-bottom: 4px;
  pointer-events: none;
}

.dial-ticks {
  height: 12px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 200, 130, 0.44) 0px,
    rgba(255, 200, 130, 0.44) 1px,
    transparent 1px,
    transparent 10px
  );
  border-top: 1px solid rgba(255, 195, 120, 0.24);
  position: relative;
}

.dial-target-glow {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 26px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 190, 95, 0.48) 0%, transparent 72%);
  pointer-events: none;
  transition: left 0.4s ease, opacity 0.4s ease;
}

.dial-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  background: linear-gradient(180deg, #ffdfaa 0%, #ff7324 55%, #ff3b14 100%);
  box-shadow: 0 0 12px #ff7b29, 0 0 4px #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  pointer-events: none;
  transition: left 0.06s linear;
}

/* Right Top Block: Vacuum Tubes + 4 Utility Buttons */
.tubes-and-tools {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  border-left: 1px solid #28221d;
  padding-left: 12px;
}

.tube-window {
  background: linear-gradient(180deg, #0b0908 0%, #17110d 100%);
  border: 1px solid #352a21;
  border-radius: 7px;
  height: 46px;
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  padding: 5px 12px 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.85);
}

.vacuum-tube {
  width: 22px;
  height: 35px;
  border-radius: 10px 10px 3px 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 55%, rgba(255, 255, 255, 0.12) 100%);
  border: 1px solid rgba(255, 220, 185, 0.18);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tube-filament {
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: radial-gradient(circle, #fff0c2 0%, #ff8c2e 55%, #b83b0a 100%);
  box-shadow: 0 0 14px rgba(255, 138, 40, 0.85), 0 0 26px rgba(255, 108, 25, 0.45);
  opacity: 0.82;
}

.top-tools-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.tool-chip {
  background: #1b1816;
  border: 1px solid #372f28;
  color: var(--text-soft);
  border-radius: 6px;
  padding: 5px 4px;
  font-size: 10.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.18s ease;
  white-space: nowrap;
  position: relative;
}

.tool-chip:hover {
  border-color: var(--amber-core);
  color: var(--amber-bright);
  background: #251f1a;
}

.tool-chip.active-glow {
  border-color: var(--amber-bright);
  color: #fff2db;
  background: rgba(242, 148, 56, 0.22);
  box-shadow: 0 0 10px rgba(242, 148, 56, 0.28);
}

.tool-chip.msg-alert {
  border-color: rgba(232, 72, 72, 0.72);
  color: #ff9c9c;
  background: rgba(232, 59, 59, 0.14);
  animation: pulseBorder 1.8s infinite;
}

@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 4px rgba(232, 59, 59, 0.2); }
  50% { box-shadow: 0 0 14px rgba(232, 59, 59, 0.55); }
}

/* ============================================================================
 * Main Two-Column Console Body: Studio Narrative Desk | Analog Mixing Console
 * ============================================================================ */
.console-body {
  display: grid;
  grid-template-columns: 1.12fr 0.98fr;
  gap: 16px;
  align-items: stretch;
}

/* Left Column: Broadcast Studio & Call Transcript */
.studio-panel {
  background: linear-gradient(180deg, rgba(24, 22, 20, 0.94) 0%, rgba(17, 15, 14, 0.96) 100%);
  border: 1px solid #302a24;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 530px;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.58);
}

.caller-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #2a241f;
}

.caller-left-pack {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caller-scene-frame {
  width: 82px;
  height: 58px;
  border-radius: 7px;
  border: 1px solid #41362c;
  background: #0b0a0a;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.caller-scene-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.caller-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.caller-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.caller-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: #fff2de;
}

.caller-tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 175, 85, 0.13);
  border: 1px solid rgba(255, 175, 85, 0.32);
  color: var(--amber-bright);
}

.caller-meta {
  font-size: 12px;
  color: var(--text-soft);
}

.caller-progress-pills {
  display: flex;
  gap: 5px;
  align-items: center;
}

.call-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2b2520;
  border: 1px solid #443a31;
}
.call-dot.done {
  background: var(--amber-core);
  border-color: var(--amber-bright);
}
.call-dot.current {
  background: #fff1d2;
  box-shadow: 0 0 8px var(--amber-core);
}

/* Secret Frequency Intercept Banner */
.secret-banner {
  background: linear-gradient(90deg, rgba(103, 216, 208, 0.16) 0%, rgba(103, 216, 208, 0.04) 100%);
  border: 1px solid rgba(103, 216, 208, 0.45);
  border-left: 3px solid var(--cyan-secret);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  color: #d6faf6;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.secret-banner.visible {
  display: flex;
  animation: fadeSlideIn 0.35s ease;
}

.secret-tune-btn {
  background: rgba(103, 216, 208, 0.22);
  border: 1px solid var(--cyan-secret);
  color: #e6fffd;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.secret-tune-btn:hover {
  background: rgba(103, 216, 208, 0.38);
}

/* Cross-Night Connection Banner */
.connection-banner {
  background: linear-gradient(90deg, rgba(242, 148, 56, 0.16) 0%, rgba(242, 148, 56, 0.03) 100%);
  border: 1px solid rgba(255, 182, 96, 0.35);
  border-left: 3px solid var(--amber-bright);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  color: #f8ddb6;
  line-height: 1.5;
  display: none;
}

.connection-banner.visible {
  display: block;
  animation: fadeSlideIn 0.45s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Transcript Scroll Feed */
.transcript-box {
  flex: 1;
  background: #0c0b0a;
  border: 1px solid #28221d;
  border-radius: 9px;
  padding: 14px 16px;
  overflow-y: auto;
  max-height: 295px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.transcript-box::-webkit-scrollbar {
  width: 6px;
}
.transcript-box::-webkit-scrollbar-thumb {
  background: #332b24;
  border-radius: 4px;
}

.msg-line {
  font-size: 14px;
  line-height: 1.8;
  color: #ece0cf;
  animation: msgFade 0.35s ease;
  transition: filter 0.25s ease;
}

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

.msg-line.dj-voice {
  color: var(--amber-bright);
  font-family: var(--font-serif);
  border-left: 2px solid rgba(255, 180, 90, 0.5);
  padding-left: 11px;
}

.msg-line.knob-reaction {
  color: #ffd9a8;
  font-style: italic;
  background: rgba(255, 175, 85, 0.08);
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 13px;
}

.msg-line.secret-voice {
  color: #b7f5ef;
  border-left: 2px solid var(--cyan-secret);
  padding-left: 11px;
}

.msg-line.system-cue {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  padding: 3px 0;
}

.msg-line.static-fuzzy {
  color: #b4a493;
}

/* DJ Sticky Note Hint */
.dj-sticky-note {
  background: rgba(255, 192, 112, 0.06);
  border: 1px dashed rgba(255, 180, 95, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.58;
  color: #d9be9c;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sticky-icon {
  color: var(--amber-bright);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10.5px;
  padding: 2px 6px;
  background: rgba(255, 175, 85, 0.14);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Interaction / Choice Deck */
.interaction-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resonance-progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
}

.res-bar-track {
  flex: 1;
  height: 7px;
  background: #1d1916;
  border: 1px solid #302822;
  border-radius: 999px;
  overflow: hidden;
}

.res-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b85d19 0%, #f29438 65%, #ffd28a 100%);
  box-shadow: 0 0 10px rgba(255, 175, 78, 0.6);
  transition: width 0.22s ease;
}

.primary-action-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 188, 108, 0.45);
  background: linear-gradient(180deg, rgba(242, 148, 56, 0.26) 0%, rgba(168, 84, 22, 0.26) 100%);
  color: #fff3df;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-action-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(242, 148, 56, 0.42) 0%, rgba(184, 93, 25, 0.38) 100%);
  border-color: var(--amber-bright);
  box-shadow: 0 0 18px rgba(242, 148, 56, 0.28);
}

.choice-btn {
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border-radius: 8px;
  border: 1px solid #383028;
  background: linear-gradient(180deg, #211d1a 0%, #191614 100%);
  color: #efe2d0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.52;
  cursor: pointer;
  transition: all 0.18s ease;
}

.choice-btn:hover {
  border-color: var(--amber-core);
  background: linear-gradient(180deg, #2b231c 0%, #201a15 100%);
  color: #fff7ea;
  transform: translateX(3px);
}

/* ============================================================================
 * Right Column: VU Meters, Oscilloscope, Cassette Deck, Knobs & Stems
 * ============================================================================ */
.mixer-panel {
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.94) 0%, rgba(19, 18, 17, 0.96) 100%);
  border: 1px solid #302a24;
  border-radius: 12px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.55);
}

/* Metering Deck: Dual VU + Oscilloscope + Mechanical Cassette Deck */
.meters-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.15fr;
  gap: 8px;
}

.meter-bezel {
  background: #0c0a09;
  border: 2px solid #322a23;
  border-radius: 8px;
  padding: 3px;
  height: 86px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.92);
  position: relative;
  overflow: hidden;
}

.meter-bezel canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
}

/* Precision Knobs + Vintage Studio Toggle Switches */
.knobs-section {
  background: #141210;
  border: 1px solid #2d2721;
  border-radius: 10px;
  padding: 12px 10px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 0.92fr;
  gap: 8px;
  align-items: center;
}

.knob-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.knob-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.knob-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.knob-dial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #443e38 0%, #24201d 55%, #12100f 100%);
  border: 2px solid #4a4138;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.72),
    inset 0 2px 3px rgba(255, 235, 210, 0.18),
    inset 0 -3px 6px rgba(0, 0, 0, 0.7);
  position: relative;
  cursor: ns-resize;
  touch-action: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.knob-dial:hover, .knob-dial.dragging {
  border-color: var(--amber-core);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.75), 0 0 14px rgba(242, 148, 56, 0.28);
}

.knob-cap {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #2a2623, #3c3630, #23201d, #3a342e, #2a2623);
  border: 1px solid rgba(255, 220, 185, 0.12);
}

.knob-pointer {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--amber-bright);
  box-shadow: 0 0 8px var(--amber-core);
  transform: translateX(-50%);
}

.knob-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber-bright);
  background: #0c0a09;
  border: 1px solid #2b241e;
  border-radius: 4px;
  padding: 2px 7px;
  min-width: 68px;
  text-align: center;
}

/* Vintage Toggle Switches Column */
.fx-switches {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid #27221d;
  padding-left: 10px;
}

.fx-toggle-btn {
  background: #1c1916;
  border: 1px solid #3a3129;
  border-radius: 6px;
  padding: 7px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.18s ease;
}

.fx-toggle-btn .fx-led {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #44392f;
}

.fx-toggle-btn.on {
  border-color: rgba(255, 185, 95, 0.55);
  background: rgba(242, 148, 56, 0.12);
}

.fx-toggle-btn.on .fx-led {
  background: var(--amber-bright);
  box-shadow: 0 0 8px var(--amber-core);
}

.fx-toggle-title {
  font-size: 10.5px;
  color: var(--text-soft);
}

.fx-toggle-sub {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
}

/* 6-Channel Atmosphere Faders */
.stems-section {
  background: #141210;
  border: 1px solid #2d2721;
  border-radius: 10px;
  padding: 12px 11px 11px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.stems-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  color: var(--text-muted);
}

.stems-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  flex: 1;
}

.stem-channel {
  background: #1a1715;
  border: 1px solid #2c2620;
  border-radius: 8px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  transition: border-color 0.2s ease;
}

.stem-channel.active {
  border-color: rgba(242, 148, 56, 0.5);
  background: linear-gradient(180deg, rgba(242, 148, 56, 0.09) 0%, #191614 100%);
}

.stem-pad-btn {
  width: 34px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #3f362d;
  background: #231f1b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stem-led {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: #463a30;
  transition: all 0.2s ease;
}

.stem-channel.active .stem-led {
  background: var(--amber-bright);
  box-shadow: 0 0 9px var(--amber-core), 0 0 4px #fff;
}

.stem-slider-wrap {
  height: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stem-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 98px;
  height: 6px;
  background: #0c0a09;
  border: 1px solid #302821;
  border-radius: 999px;
  transform: rotate(-90deg);
  cursor: pointer;
  outline: none;
}

.stem-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, #62564a 0%, #312a24 100%);
  border: 1px solid #8a7866;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.stem-channel.active .stem-slider::-webkit-slider-thumb {
  border-color: var(--amber-bright);
  background: linear-gradient(180deg, #c27834 0%, #6e3c14 100%);
}

.stem-name {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.25;
}

.stem-en {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-muted);
}

/* ============================================================================
 * Modals (Constellation, Answering Machine, Keepsake Corkboard & Log)
 * ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 5, 5, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeSlideIn 0.25s ease;
}

.modal-card {
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  background: linear-gradient(180deg, #1d1a17 0%, #12100f 100%);
  border: 1px solid #3d3329;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 1px solid #2c251f;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 19px;
  color: #fff1dc;
}

.modal-close {
  background: #241f1b;
  border: 1px solid #3e342b;
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--amber-core);
  color: var(--amber-bright);
}

.modal-tabs {
  display: flex;
  gap: 8px;
}

.modal-tab-btn {
  background: #1a1714;
  border: 1px solid #362e27;
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.modal-tab-btn.active {
  border-color: var(--amber-bright);
  color: #fff2de;
  background: rgba(242, 148, 56, 0.2);
}

.constellation-canvas-wrap {
  width: 100%;
  height: 360px;
  border: 1px solid #2e261f;
  border-radius: 10px;
  overflow: hidden;
  background: #0c0b0b;
}

.constellation-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.constellation-detail {
  background: #141210;
  border: 1px solid #2b241e;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 13px;
  line-height: 1.65;
  color: #dfd0bc;
  min-height: 74px;
}

.log-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.log-item {
  background: #141210;
  border: 1px solid #2b241e;
  border-left: 3px solid var(--amber-core);
  border-radius: 8px;
  padding: 12px 14px;
}

.log-item-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--amber-bright);
  margin-bottom: 5px;
  font-family: var(--font-mono);
}

.log-item-body {
  font-size: 13px;
  line-height: 1.65;
  color: #e4d7c5;
}

/* Collectible Keepsake Postcards Grid */
.keepsake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px 2px;
}

.keepsake-card {
  background: linear-gradient(175deg, #272019 0%, #1b1612 100%);
  border: 1px solid #44372a;
  border-radius: 10px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.keepsake-card.locked {
  opacity: 0.45;
  border-style: dashed;
}

.keepsake-stamp {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber-bright);
  letter-spacing: 0.08em;
}

.keepsake-title {
  font-family: var(--font-serif);
  font-size: 15.5px;
  color: #fff2de;
}

.keepsake-quote {
  font-size: 12.5px;
  line-height: 1.68;
  color: #decbb3;
}

/* Answering Machine Voicemail Cards */
.vm-card {
  background: #151210;
  border: 1px solid #352c24;
  border-left: 3px solid #e85858;
  border-radius: 8px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vm-card.played {
  border-left-color: var(--amber-core);
}

/* ============================================================================
 * Dedicated Midnight Lo-Fi Player Bar & Zen Pure Window Mode
 * ============================================================================ */
.lofi-player-banner {
  display: none;
  background: linear-gradient(135deg, rgba(35, 26, 19, 0.92) 0%, rgba(21, 18, 16, 0.94) 100%);
  border: 1px solid rgba(255, 185, 100, 0.36);
  border-radius: 12px;
  padding: 16px 18px;
  flex-direction: column;
  gap: 13px;
}

.lofi-player-banner.active {
  display: flex;
}

.tape-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 9px;
}

.cassette-card {
  background: linear-gradient(180deg, #241e18 0%, #181411 100%);
  border: 1px solid #3a3026;
  border-radius: 9px;
  padding: 10px 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cassette-card:hover {
  border-color: var(--amber-core);
  transform: translateY(-2px);
}

.cassette-card.playing {
  border-color: var(--amber-bright);
  background: linear-gradient(180deg, rgba(242, 148, 56, 0.24) 0%, #1c1611 100%);
  box-shadow: 0 0 18px rgba(242, 148, 56, 0.25);
}

.cassette-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--amber-bright);
  letter-spacing: 0.08em;
}

.cassette-title {
  font-size: 12px;
  color: #f4e6d2;
  font-weight: 500;
  line-height: 1.4;
}

.player-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #2e261f;
}

.timer-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.timer-pill {
  background: #1b1714;
  border: 1px solid #3a3027;
  color: var(--text-soft);
  padding: 5px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.timer-pill:hover, .timer-pill.active {
  border-color: var(--amber-bright);
  color: #fff3dd;
  background: rgba(242, 148, 56, 0.22);
}

.timer-countdown {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-bright);
  margin-left: 6px;
}

.radio-chassis.lofi-mode .studio-panel {
  display: none;
}

.radio-chassis.lofi-mode .console-body {
  grid-template-columns: 1fr;
}

.radio-chassis.lofi-mode .meter-bezel {
  height: 110px;
}

/* Zen Minimal Window Mode: hides mixer body so you can enjoy the rainy 2AM city window */
.radio-chassis.zen-collapsed .console-body,
.radio-chassis.zen-collapsed .tape-shelf {
  display: none;
}

/* Responsive */
@media (max-width: 1080px) {
  .top-rack {
    grid-template-columns: 1fr;
  }
  .station-block, .tubes-and-tools {
    border: none;
    padding: 0;
  }
  .console-body {
    grid-template-columns: 1fr;
  }
  .radio-chassis {
    border-left-width: 8px;
    border-right-width: 8px;
    padding: 14px;
  }
}

@media (max-width: 680px) {
  .meters-row {
    grid-template-columns: 1fr 1fr;
  }
  .knobs-section {
    grid-template-columns: 1fr 1fr;
  }
  .stems-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
