:root {
  --bg-primary: #070b14;
  --bg-surface: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-border: rgba(56, 189, 248, 0.15);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-sky: #0ea5e9;
  --accent-indigo: #818cf8;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(129, 140, 248, 0.05) 0%, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------------------
   Global Navigation Header
--------------------------------------------------------------------------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-nav-brand {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-cyan);
  text-decoration: none;
  margin-right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.site-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.site-nav-link.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ---------------------------------------------------------------------------
   Main Layout & Container
--------------------------------------------------------------------------- */
.app-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

/* Hero Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.title-area h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f8fafc 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.title-area p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.title-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge.cyan {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.25);
}

/* ---------------------------------------------------------------------------
   Transport & Shared Space Console
--------------------------------------------------------------------------- */
.master-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
  .master-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.transport-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-transport {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-transport:hover:not(:disabled) {
  background: var(--accent-cyan);
  color: #040812;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

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

.btn-transport.stop {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.35);
}

.btn-transport.stop:hover:not(:disabled) {
  background: var(--accent-rose);
  color: #fff;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
}

.status-badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.active::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Master Space Controls */
.space-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.space-param {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 130px;
}

.space-param label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
}

.space-param label span {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Presets Bar */
.presets-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--text-main);
  border-color: rgba(56, 189, 248, 0.35);
}

.preset-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Soundstage Radar / 2D Visualizer
--------------------------------------------------------------------------- */
.soundstage-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.soundstage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.soundstage-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.soundstage-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background: #040812;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  overflow: hidden;
}

#soundstage-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------------------------------------------------------
   Sound Objects Grid
--------------------------------------------------------------------------- */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1300px) {
  .objects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.object-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s ease;
}

.object-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.object-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.object-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.object-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-cyan);
}

.object-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-indigo);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* Control Rows */
.control-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.control-val {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-size: 0.8rem;
}

/* Custom Range Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  transition: background 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Action Buttons & Selects */
.btn-action {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-action:hover:not(:disabled) {
  background: var(--accent-cyan);
  color: #040812;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

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

select.control-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  width: 100%;
}

select.control-select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-main);
  padding: 0.35rem 0;
}

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

/* Spatial Channel Strip inside Object Card */
.spatial-strip {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ---------------------------------------------------------------------------
   Scene Document & Mode Toolbar
--------------------------------------------------------------------------- */
.scene-tools-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-tool:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
}

.btn-tool.toggle-mode {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.3);
  color: var(--accent-indigo);
  font-weight: 600;
}

.btn-tool.toggle-mode:hover {
  background: rgba(129, 140, 248, 0.22);
}

/* ---------------------------------------------------------------------------
   Minimal Player Mode View (End-User Presentation)
--------------------------------------------------------------------------- */
.player-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(56, 189, 248, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.player-status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.player-scene-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.player-scene-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.player-volume-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
  text-align: left;
}

.player-volume-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.player-volume-group input[type="range"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Scene Document JSON Modal
--------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.15s ease;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.25rem;
  flex: 1;
  overflow-y: auto;
}

.scene-json-textarea {
  width: 100%;
  height: 380px;
  background: #070b14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.scene-json-textarea:focus {
  border-color: var(--accent-cyan);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.btn-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.btn-action.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Live Data Feed Simulator Bar
--------------------------------------------------------------------------- */
.feed-simulator-bar {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-sim-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.feed-sim-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.feed-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.feed-sim-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.feed-sim-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feed-sim-event {
  justify-content: space-between;
}

.feed-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
}

.feed-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
}

.feed-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.feed-val {
  font-family: var(--font-mono);
  color: #f8fafc;
  font-weight: 500;
}

.feed-event-actions {
  display: flex;
  align-items: center;
  margin-top: 0.4rem;
}

.btn-strike {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s ease;
}

.btn-strike:hover {
  background: rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.btn-strike:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
   Export Tabs & Load Dropzone Styling
--------------------------------------------------------------------------- */
.spec-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 0 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-tab {
  background: none;
  border: none;
  padding: 0.5rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.spec-tab:hover {
  color: var(--text-main);
}

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

.drop-zone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(56, 189, 248, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.09);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.drop-zone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.drop-zone-text {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.drop-zone-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.load-file-status {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.file-status-icon {
  font-size: 1.2rem;
  color: #10b981;
  font-weight: 700;
}

.file-status-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
}

.file-status-info strong {
  color: #f8fafc;
  font-family: var(--font-mono);
}

.file-status-info span {
  color: #a7f3d0;
}

.paste-json-accordion {
  margin-top: 1.2rem;
}

.paste-json-accordion summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  user-select: none;
  margin-bottom: 0.6rem;
  transition: color 0.15s ease;
}

.paste-json-accordion summary:hover {
  color: var(--text-main);
}

/* ---------------------------------------------------------------------------
   Layer-Aware Landscape Swimlanes & Arrangement
--------------------------------------------------------------------------- */
.btn-add-highlight {
  background: rgba(14, 165, 233, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
}

.btn-add-highlight:hover {
  background: rgba(14, 165, 233, 0.35) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.layers-container {
  display: flex !important;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.swimlane {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.swimlane-bed {
  border-top: 3px solid #0ea5e9;
}

.swimlane-texture {
  border-top: 3px solid #10b981;
}

.swimlane-figure {
  border-top: 3px solid #f59e0b;
}

.swimlane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.swimlane-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.swimlane-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.swimlane-badge.bed {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.swimlane-badge.texture {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.swimlane-badge.figure {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.swimlane-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  margin: 0;
}

.swimlane-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0 0;
}

.swimlane-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Card Layer Toolbar */
.card-layer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  margin: 0.6rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}

.layer-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.layer-selector-wrap label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.select-change-layer {
  background: #0b1329;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e2e8f0;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.card-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-param-map {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-param-map:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

.btn-remove-object {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  line-height: 1.2;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-remove-object:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  color: #fff;
}

.btn-remove-header {
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 0.85rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.btn-remove-header:hover {
  opacity: 1;
}

/* Catalog Modal */
.modal-dialog.modal-wide {
  max-width: 840px;
}

.catalog-add-bar {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.catalog-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.catalog-card:hover, .catalog-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
}

.catalog-card-icon {
  font-size: 1.6rem;
}

.catalog-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
}

.catalog-card-layer-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.catalog-card-layer-tag.bed {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
}

.catalog-card-layer-tag.texture {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.catalog-card-layer-tag.figure {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.catalog-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  flex-grow: 1;
}

/* Mapping Inspector */
.mapping-meta-banner {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.inspector-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.decorator-fieldset {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
}

.decorator-fieldset.scatter-fieldset {
  border-color: rgba(16, 185, 129, 0.2);
}

.decorator-fieldset legend {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.4rem;
  color: var(--accent-cyan);
}

.decorator-fieldset.scatter-fieldset legend {
  color: var(--accent-emerald);
}

/* Player Mode Layer Pills */
.player-layer-pills {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.player-layer-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-layer-pill.bed {
  border-color: rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}

.player-layer-pill.texture {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.player-layer-pill.figure {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

/* Parameter & Mapping Inspector Modal */
.modal-params-inspector {
  max-width: 860px;
  width: 92vw;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.mapping-params-container {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.param-group {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.param-group-header {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-indigo);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.param-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  transition: all 0.15s ease;
}

.param-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.param-card.sonified {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.05);
}

.param-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.param-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.param-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-bright);
}

.param-toggle-label input[type="checkbox"] {
  accent-color: var(--accent-emerald);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.param-unit-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.param-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.param-readout-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.badge-static {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

.badge-mapped {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.param-unmapped-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.param-unmapped-row input[type="range"] {
  flex: 1;
}

.param-unmapped-row input[type="number"] {
  width: 78px;
  padding: 0.25rem 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #fff;
  font-size: 0.82rem;
}

.param-mapped-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.mapping-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 680px) {
  .mapping-config-grid {
    grid-template-columns: 1fr;
  }
}

.btn-invert {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.btn-invert:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-invert.inverted {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-color: #38bdf8;
}

.param-decorator-accordion {
  margin-top: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.2);
}

/* Dual range slider */
.dual-range-wrapper {
  position: relative;
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
}

.dual-range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: #1b1e2c;
  border-radius: 4px;
  pointer-events: none;
}

.dual-range-progress {
  position: absolute;
  height: 100%;
  background: #4caf82;
  border-radius: 4px;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  z-index: 2;
}

.dual-range-progress::before {
  content: '';
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 0;
  right: 0;
}

.dual-range-progress:active {
  cursor: grabbing;
  background: #5cd09c;
}

.dual-range-progress.feed-progress {
  background: #0ea5e9;
}

.dual-range-progress.feed-progress:active {
  background: #38bdf8;
}

.dual-range-input {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
}

.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4caf82;
  cursor: ew-resize;
  pointer-events: auto;
  border: 2px solid #0f1117;
  box-shadow: 0 0 5px rgba(0,0,0,0.6);
  transition: transform 0.1s ease;
}

.dual-range-input.feed-input::-webkit-slider-thumb {
  background: #0ea5e9;
}

.dual-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.dual-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4caf82;
  cursor: ew-resize;
  pointer-events: auto;
  border: 2px solid #0f1117;
  box-shadow: 0 0 5px rgba(0,0,0,0.6);
}

.dual-range-input.feed-input::-moz-range-thumb {
  background: #0ea5e9;
}

.dual-range-input::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Range Section Controls */
.range-section-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.35rem;
}

.range-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.range-section-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-range {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-feed {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.range-mode-segmented {
  display: inline-flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.range-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.range-mode-btn:hover {
  color: #fff;
}

.range-mode-btn.active {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}



