:root {
  --bg: #08080b;
  --surface: rgba(14, 13, 22, 0.72);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #94a3b8;

  --neon-rgb: 168, 85, 247;
  --neon-core: #f3e8ff;
  --neon-hex: #a855f7;
  --bass: 0;
}

body[data-emotion="Neutral"] {
  --neon-rgb: 34, 211, 238;
  --neon-core: #ecfeff;
  --neon-hex: #22d3ee;
}
body[data-emotion="Felicidad"] {
  --neon-rgb: 52, 211, 153;
  --neon-core: #fef9c3;
  --neon-hex: #34d399;
}
body[data-emotion="Tristeza"] {
  --neon-rgb: 59, 130, 246;
  --neon-core: #dbeafe;
  --neon-hex: #3b82f6;
}
body[data-emotion="Enojo"] {
  --neon-rgb: 255, 30, 56;
  --neon-core: #ffe4e6;
  --neon-hex: #ff1e38;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  user-select: none;
}

body {
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: 52px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 22px;
  z-index: 30;
}

.quick-actions { justify-self: end; display: flex; gap: 8px; }

.selector-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 6px;
  border-radius: 999px;
  backdrop-filter: blur(14px);
}
.divider {
  width: 1px;
  height: 15px;
  background: rgba(255, 255, 255, 0.14);
}
.seg-group { display: flex; gap: 2px; }
.seg {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.seg:hover { color: #fff; }
.seg.active {
  background: rgba(var(--neon-rgb), 0.24);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(var(--neon-rgb), 0.6);
}

.quick-actions { display: flex; gap: 8px; }
.ghost-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #e2e8f0;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.22s ease;
}
.ghost-btn:hover {
  border-color: rgba(var(--neon-rgb), 0.7);
  box-shadow: 0 0 18px rgba(var(--neon-rgb), 0.28);
}
.rev-top-btn.playing {
  border-color: #ff1e38;
  background: rgba(255, 30, 56, 0.22);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 30, 56, 0.45);
}
.tune-btn {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.14);
}

.showroom {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px 12px;
  position: relative;
}

.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.84);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
}
.showroom.drag-over .drop-overlay { display: flex; }
.drop-card {
  padding: 32px 52px;
  border-radius: 20px;
  border: 2px dashed var(--neon-hex);
  font-size: 1.15rem;
  background: rgba(20, 16, 32, 0.7);
  box-shadow: 0 0 40px rgba(var(--neon-rgb), 0.4);
}

.bmw-scene {
  position: relative;
  width: min(96vw, calc((100vh - 64px) * 1376 / 768));
  max-height: calc(100vh - 64px);
  aspect-ratio: 1376 / 768;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.88);
}

.bmw-scene.revving {
  animation: revShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes revShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-3px, -1.5px, 0); }
  40% { transform: translate3d(3px, 1.5px, 0); }
  60% { transform: translate3d(-2.5px, 1px, 0); }
  80% { transform: translate3d(2px, -1px, 0); }
}

.bmw-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.back-aura {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 72%, rgba(var(--neon-rgb), 0.14), transparent 58%);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background 0.7s ease;
}

.hud-glass {
  position: absolute;
  top: 2.8%;
  background: rgba(10, 10, 16, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(var(--neon-rgb), 0.48);
  border-radius: 16px;
  padding: 12px 15px;
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(var(--neon-rgb), 0.08);
  z-index: 16;
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.hud-emotion {
  left: 2.2%;
  width: clamp(220px, 24.5%, 310px);
}

.hud-probs {
  right: 2.2%;
  width: clamp(235px, 25.5%, 320px);
}

.hud-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  color: #94a3b8;
  margin-bottom: 10px;
}
.hud-kicker em {
  font-style: normal;
  color: var(--neon-hex);
  background: rgba(var(--neon-rgb), 0.14);
  padding: 2px 7px;
  border-radius: 999px;
  transition: color 0.5s ease, background 0.5s ease;
}
.hint-click {
  font-size: 0.58rem;
  color: #64748b;
  letter-spacing: 0.6px;
}

.hud-main-emo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.emo-copy {
  flex: 1;
  min-width: 0;
}
.emo-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emo-sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.emo-big-pct {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--neon-hex);
  font-variant-numeric: tabular-nums;
  transition: color 0.5s ease;
}

.audio-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.audio-player-bar[hidden] {
  display: none;
}
.ap-btn {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--neon-rgb), 0.65);
  background: rgba(var(--neon-rgb), 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.ap-btn:hover {
  transform: scale(1.08);
  background: rgba(var(--neon-rgb), 0.38);
  box-shadow: 0 0 14px rgba(var(--neon-rgb), 0.55);
}
.ap-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
}
.ap-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--neon-rgb), 0.7), var(--neon-core));
  box-shadow: 0 0 10px var(--neon-hex);
  transition: width 0.08s linear;
}
.ap-time {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
}

.prob-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.prob-row {
  display: grid;
  grid-template-columns: 8px 62px 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.prob-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.prob-row.winner {
  background: rgba(var(--neon-rgb), 0.15);
  border-color: rgba(var(--neon-rgb), 0.55);
  box-shadow: 0 0 14px rgba(var(--neon-rgb), 0.18);
}

.pdot { width: 7px; height: 7px; border-radius: 50%; }
.pdot.neutral { background: #22d3ee; box-shadow: 0 0 8px #22d3ee; }
.pdot.happy { background: #34d399; box-shadow: 0 0 8px #34d399; }
.pdot.sad { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.pdot.angry { background: #ff1e38; box-shadow: 0 0 8px #ff1e38; }

.prob-row .pname {
  font-size: 0.73rem;
  font-weight: 600;
  color: #e2e8f0;
}
.ptrack {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.pfill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.neutral-fill { background: linear-gradient(90deg, #0891b2, #22d3ee); box-shadow: 0 0 8px #22d3ee; }
.happy-fill { background: linear-gradient(90deg, #059669, #34d399); box-shadow: 0 0 8px #34d399; }
.sad-fill { background: linear-gradient(90deg, #1d4ed8, #60a5fa); box-shadow: 0 0 8px #3b82f6; }
.angry-fill { background: linear-gradient(90deg, #be123c, #ff1e38); box-shadow: 0 0 8px #ff1e38; }

.prob-row .ppct {
  font-size: 0.73rem;
  text-align: right;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.underglow-system {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.neon-asphalt-wide {
  position: absolute;
  left: 19%;
  width: 62%;
  top: 83.5%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 28%,
    rgba(var(--neon-rgb), 0.72) 0%,
    rgba(var(--neon-rgb), 0.34) 45%,
    rgba(var(--neon-rgb), 0.08) 72%,
    transparent 90%
  );
  filter: blur(22px);
  mix-blend-mode: screen;
  transform: scaleX(calc(1 + var(--bass) * 0.08)) scaleY(calc(1 + var(--bass) * 0.18));
  transition: background 0.65s ease;
  animation: neonBreathe 3.2s ease-in-out infinite;
}

.neon-asphalt-core {
  position: absolute;
  left: 31.5%;
  width: 37%;
  top: 84.8%;
  height: 10.5%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(var(--neon-rgb), 0.96) 0%,
    rgba(var(--neon-rgb), 0.62) 48%,
    transparent 82%
  );
  filter: blur(11px);
  mix-blend-mode: color-dodge;
  opacity: calc(0.82 + var(--bass) * 0.18);
  transition: background 0.65s ease;
}

.neon-diffuser-halo {
  position: absolute;
  left: 34.5%;
  width: 31%;
  top: 84.9%;
  height: 3.4%;
  border-radius: 50%;
  background: rgba(var(--neon-rgb), 0.95);
  filter: blur(7px);
  mix-blend-mode: screen;
  transition: background 0.65s ease;
}

.neon-led-tube {
  position: absolute;
  left: 36.5%;
  width: 27%;
  top: 85.7%;
  height: 3px;
  border-radius: 999px;
  background: var(--neon-core);
  box-shadow:
    0 0 6px #fff,
    0 0 14px var(--neon-hex),
    0 0 28px var(--neon-hex),
    0 4px 22px rgba(var(--neon-rgb), 0.95);
  opacity: calc(0.88 + var(--bass) * 0.12);
  transition: background 0.65s ease, box-shadow 0.65s ease;
}

.neon-side {
  position: absolute;
  top: 71.5%;
  width: 14%;
  height: 5%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(var(--neon-rgb), 0.48), transparent 72%);
  filter: blur(14px);
  mix-blend-mode: screen;
  transition: background 0.65s ease;
}
.neon-side.left { left: 14%; }
.neon-side.right { right: 14%; }

@keyframes neonBreathe {
  0%, 100% { opacity: 0.86; }
  50% { opacity: 1; }
}

body[data-emotion="Enojo"] .neon-asphalt-wide {
  animation: angryPulse 0.9s ease-in-out infinite;
}
@keyframes angryPulse {
  0%, 100% { opacity: 0.82; filter: blur(20px); }
  50% { opacity: 1; filter: blur(26px); }
}

.trunk-led-bar {
  position: absolute;
  top: 52.8%;
  width: 1.2%;
  height: 10.4%;
  border-radius: 4px;
  background: rgba(var(--neon-rgb), 0.72);
  box-shadow: 0 0 14px var(--neon-hex);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: calc(0.55 + var(--bass) * 0.45);
  transition: background 0.65s ease, box-shadow 0.65s ease;
}
.trunk-led-bar.left { left: 44.6%; }
.trunk-led-bar.right { left: 54.6%; }

.taillight-glow {
  position: absolute;
  top: 52.5%;
  width: 6.2%;
  height: 6.5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 66, 0.55), transparent 72%);
  filter: blur(8px);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: calc(0.45 + var(--bass) * 0.55);
}
.taillight-glow.left { left: 29.8%; }
.taillight-glow.right { right: 29.5%; }

.easter-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
}

.easter-prop {
  position: absolute;
  bottom: 5.5%;
  height: 55%;
  max-width: 25%;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  opacity: 0;
  filter:
    drop-shadow(0 18px 22px rgba(0, 0, 0, 0.88))
    drop-shadow(0 0 18px rgba(var(--neon-rgb), 0.28));
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.easter-prop.left {
  left: 3.5%;
  transform: translate3d(-44px, 8px, 0) scale(0.94);
}

.easter-prop.right {
  right: 3.5%;
  transform: translate3d(44px, 8px, 0) scale(0.94);
}

.easter-stage.active .easter-prop {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.flame-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 8;
}

.trunk-monitor {
  position: absolute;
  left: 46.15%;
  top: 24.4%;
  width: 8.2%;
  height: 8.5%;
  border-radius: 4px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, rgba(var(--neon-rgb), 0.26), rgba(6, 5, 12, 0.92));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3px 5px;
  pointer-events: none;
  z-index: 6;
  box-shadow: inset 0 0 10px rgba(var(--neon-rgb), 0.45);
}

#waveCanvas {
  width: 100%;
  height: 68%;
  display: block;
}

.monitor-overlay {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: clamp(0.4rem, 0.58vw, 0.58rem);
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}
.mon-conf {
  color: var(--neon-hex);
  font-size: clamp(0.36rem, 0.5vw, 0.5rem);
}

.car-hotspot {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.car-hotspot[hidden],
.mtab[hidden] {
  display: none;
}

.pulse-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(var(--neon-rgb), 0.55);
  box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.35), inset 0 0 12px rgba(var(--neon-rgb), 0.2);
  transform: scale(calc(1 + var(--bass) * 0.14));
  opacity: 0.45;
  transition: opacity 0.25s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.car-hotspot:hover .pulse-ring {
  opacity: 1;
  box-shadow: 0 0 24px var(--neon-hex), inset 0 0 16px rgba(var(--neon-rgb), 0.45);
}

.hotspot-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  white-space: nowrap;
  background: rgba(10, 10, 18, 0.92);
  border: 1px solid rgba(var(--neon-rgb), 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.car-hotspot:hover .hotspot-tip {
  opacity: 1;
  transform: translateY(0);
}

.sub-left { left: 38.0%; top: 51.8%; width: 6.2%; height: 12.2%; border-radius: 50%; }
.sub-center { left: 46.7%; top: 51.8%; width: 7.1%; height: 12.4%; border-radius: 50%; }
.sub-right { left: 56.3%; top: 51.8%; width: 6.2%; height: 12.2%; border-radius: 50%; }

.mic-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
  opacity: 0.88;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}
.sub-center:hover .mic-badge { transform: scale(1.18); opacity: 1; }
.sub-center.recording .pulse-ring {
  opacity: 1;
  border-color: #ff1e38;
  box-shadow: 0 0 28px #ff1e38, inset 0 0 18px rgba(255, 30, 56, 0.6);
  animation: recSpin 1s ease-in-out infinite;
}
@keyframes recSpin {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.1); }
}

.door-left { left: 13.5%; top: 49%; width: 15%; height: 20%; border-radius: 16px; }
.door-right { left: 71.5%; top: 49%; width: 15%; height: 20%; border-radius: 16px; }
.door-left:hover, .door-right:hover {
  box-shadow: inset 0 0 0 1.5px rgba(var(--neon-rgb), 0.55), 0 0 22px rgba(var(--neon-rgb), 0.22);
}

.exhaust-zone { left: 38.2%; top: 77.2%; width: 24%; height: 7.2%; border-radius: 12px; cursor: default; }

.floating-card {
  position: absolute;
  bottom: 3%;
  width: clamp(210px, 22%, 260px);
  background: rgba(11, 10, 18, 0.86);
  border: 1px solid rgba(var(--neon-rgb), 0.45);
  border-radius: 15px;
  padding: 11px 13px;
  backdrop-filter: blur(16px);
  z-index: 20;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  animation: popCard 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.floating-card[hidden] { display: none; }
.left-card { left: 2.2%; }
.right-card { right: 2.2%; }

@keyframes popCard {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
}
.fcard-head em { font-style: normal; color: var(--neon-hex); }
.fcard-close {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
}
.fcard-close:hover { color: #fff; }

.muted-msg { font-size: 0.72rem; color: var(--muted); line-height: 1.35; }
.ens-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.73rem;
}
.ens-row:last-child { border-bottom: none; }
.ens-row b { color: var(--neon-hex); width: 40px; }

.mini-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.mini-metrics div {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  padding: 5px 7px;
}
.mini-metrics small { display: block; font-size: 0.6rem; color: var(--muted); }
.mini-metrics strong { font-size: 0.74rem; font-variant-numeric: tabular-nums; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 70;
}
.modal[hidden] { display: none; }

.modal-box {
  width: min(960px, 100%);
  max-height: 86vh;
  background: #111019;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-top h2 { font-size: 0.98rem; }
.close-x {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.modal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  overflow-y: auto;
}
.clean-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.clean-table th, .clean-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.clean-table th { color: var(--muted); font-size: 0.7rem; }
.clean-table tbody tr { cursor: pointer; }
.clean-table tbody tr:hover, .clean-table tbody tr.selected {
  background: rgba(var(--neon-rgb), 0.18);
}
.cm-panel { text-align: center; }
.cm-title { font-size: 0.82rem; margin-bottom: 8px; color: #cbd5e1; }
.cm-panel img { width: 100%; border-radius: 10px; background: #fff; }

.modal-tabs { display: flex; gap: 8px; }
.mtab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.mtab.active {
  background: rgba(var(--neon-rgb), 0.22);
  border-color: var(--neon-hex);
  color: #fff;
}
.tab-view { display: none; overflow-y: auto; }
.tab-view.active { display: block; }

.filter-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 10px;
}
.scard {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scard small { color: var(--muted); font-size: 0.68rem; }
.scard button {
  border: none;
  border-radius: 8px;
  padding: 6px;
  background: rgba(var(--neon-rgb), 0.28);
  border: 1px solid rgba(var(--neon-rgb), 0.55);
  color: #fff;
  font-weight: 600;
  font-size: 0.74rem;
  cursor: pointer;
}
.scard button:hover { background: rgba(var(--neon-rgb), 0.45); }

.plots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.pcard img { width: 100%; border-radius: 10px; background: #fff; }
.pcard p { font-size: 0.74rem; color: var(--muted); margin-bottom: 6px; }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(14, 14, 22, 0.94);
  border: 1px solid rgba(var(--neon-rgb), 0.65);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
