
                /* font loaded via link in index.html */

:root {
  --bg-color: #121212;
  --grid-color: rgba(255, 255, 255, 0.05);
  --text-primary: #f3f3f3;
  --text-secondary: #c2c2c2;
  --text-highlight: #888888;
  --accent-primary: #ffffff;
  --accent-secondary: #656565;
  --accent-tertiary: #909090;
  --panel-bg: rgba(30, 30, 30, 0.7);
  --panel-border: rgba(200, 200, 200, 0.75);
  --panel-highlight: rgba(196, 196, 196, 0.5);
  --scanner-line: rgba(255, 255, 255, 0.7);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: "TheGoodMonolith", monospace;
  overflow: hidden;
  height: 100vh;
  text-transform: uppercase;
  font-size: 1rem;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.8;
  overflow: hidden;
  background-color: #121212;
}

.space-background__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.space-background__layer.is-active {
  opacity: 1;
}

#three-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
}

#three-container:active {
  cursor: grabbing;
}

/* Contenedor del escenario 3D / burbuja (desktop = viewport completo) */
.viz-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Solo el canvas 3D recibe drag; anillos/espectro no deben tapar el orbe */
.viz-stage #three-container {
  pointer-events: auto;
}

.interface-container {
  position: relative;
  width: 100%;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      to right,
      var(--grid-color) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.header {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem;
}

.header-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-shadow: 1px 1px 2px #000000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.8));
}

.header-brand-text {
  line-height: 1.2;
}

.header-item-largo {
  font-size: 1.5rem;
  top: 40px;
  color: var(--text-secondary);
  text-shadow: 1px 1px 4px #000000;
}
.scanner-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border: 1px solid var(--accent-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.scanner-frame::before,
.scanner-frame::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent-primary);
  border-style: solid;
}

.scanner-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.scanner-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.scanner-frame .corner-tl {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--accent-primary);
  border-left: 2px solid var(--accent-primary);
}

.scanner-frame .corner-tr {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--accent-primary);
  border-right: 2px solid var(--accent-primary);
}

.scanner-frame .corner-bl {
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--accent-primary);
  border-left: 2px solid var(--accent-primary);
}

.scanner-frame .corner-br {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--accent-primary);
  border-right: 2px solid var(--accent-primary);
}

.scanner-id {
  position: absolute;
  bottom: -30px;
  left: 0;
  font-size: 0.75rem;
  color: var(--accent-primary);
}

.scanner-id-right {
  position: absolute;
  bottom: -30px;
  right: 0;
  font-size: 0.75rem;
  color: var(--accent-primary);
}

.scanner-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--scanner-line);
  top: 0;
  box-shadow: 0 0 10px var(--accent-primary);
  animation: scan 4s linear infinite;
}

@keyframes scan {
  0% {
    top: 0;
  }

  100% {
    top: 100%;
  }
}

.data-panels {
  display: flex;
  justify-content: space-between;
  padding: 0 1.25rem;
  margin-bottom: 1.25rem;
}

.data-panel {
  width: 300px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  padding: 0.9375rem;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.data-panel-title {
  font-size: 0.875rem;
  color: var(--accent-primary);
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.data-readouts {
  margin-top: 0.625rem;
}

.data-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3125rem;
  font-size: 0.75rem;
}

.data-label {
  color: var(--text-secondary);
}

.data-value {
  color: var(--text-primary);
}

.data-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.625rem 0;
  position: relative;
  border-radius: 3px;
}

.data-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
  transition: width 0.5s;
}

.waveform {
  width: 100%;
  height: 50px;
  margin: 0.625rem 0;
  display: flex;
  align-items: center;
  position: relative;
}

.waveform-canvas {
  width: 100%;
  height: 100%;
}

.control-panel {
  width: 300px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  padding: 0.9375rem;
  position: absolute;
  top: 20px;
  left: 20px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  z-index: 10;
}

.control-panel h3 {
  font-size: 0.875rem;
  color: var(--accent-primary);
  margin-bottom: 0.9375rem;
}

.control-group {
  margin-bottom: 0.9375rem;
}

.control-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.control-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.control-value {
  font-size: 0.75rem;
  color: var(--text-primary);
}

.slider-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  border-radius: 3px;
}

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

.buttons {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.9375rem;
}

.btn {
  flex: 1;
  padding: 0.5rem 0;
  background: var(--panel-highlight);
  border: 1px solid var(--panel-border);
  color: var(--accent-primary);
  font-size: 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--panel-border);
}

.terminal-panel {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: 500px;
  height: 150px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  overflow: hidden;
  pointer-events: auto;
  z-index: 10;
}

.terminal-header {
  padding: 0.5rem 0.625rem;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.875rem;
  color: var(--accent-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  margin-bottom: 1rem;
}

.terminal-content {
  padding: 0.625rem;
  height: calc(100% - 31px);
  overflow-y: auto;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.terminal-line {
  margin-bottom: 0.3125rem;
}

.command-line {
  color: white;
}

.regular-line {
  color: var(--text-highlight);
}

.typing {
  position: relative;
}

.typing::after {
  content: "|";
  position: absolute;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  padding: 1.25rem;
}

.preloader-canvas-container {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.preloader-logo {
  position: relative;
  z-index: 1;
  width: 96px;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 10px rgba(196, 196, 196, 0.25));
}

.loading-text {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--accent-primary);
  letter-spacing: 2px;
  font-size: 0.875rem;
}

/* =========================================================================
   LOGO + CRÉDITO IDLI — pie de preload y página completa
   logo: width actual · tipografía: TheGoodMonolith (misma que la UI)
   ========================================================================= */
.idli-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  user-select: none;
  text-align: center;
}

.idli-branding--preload {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.idli-branding--preload .idli-logo {
  display: none;
}

.idli-branding--page {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.idli-logo {
  width: 64px;
  height: auto;
  display: block;
  -webkit-filter: drop-shadow(3px 3px 3px #222);
  filter: drop-shadow(3px 3px 3px #222);
}

.idli-credit {
  margin: 0;
  font-family: "TheGoodMonolith", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
}

.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 0.75rem 1.25rem;
  border-radius: 5px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--accent-primary);
  text-transform: none;
  max-width: min(36rem, calc(100% - 2rem));
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 100;
  pointer-events: none;
}

.drag-handle {
  cursor: move;
  width: auto;
  height: 100%;
  color: var(--accent-primary);
}

.particle-trail {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.5s;
}

.circular-visualizer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  height: 450px;
  pointer-events: none;
  z-index: 5;
}

.circular-visualizer canvas {
  width: 100%;
  height: 100%;
}

.audio-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(196, 196, 196, 0.1);
  pointer-events: none;
  z-index: 3;
}

.audio-wave::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(196, 196, 196, 0.05);
  animation: pulse 4s infinite;
}

@keyframes pulse {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.5;
  }

  50% {
    width: 120%;
    height: 120%;
    opacity: 0;
  }

  100% {
    width: 100%;
    height: 100%;
    opacity: 0.5;
  }
}

.spectrum-analyzer {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  pointer-events: auto;
  z-index: 10;
}

.spectrum-header {
  padding: 0.5rem 0.625rem;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.875rem;
  color: var(--accent-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spectrum-content {
  padding: 0.625rem;
  position: relative;
}

.spectrum-canvas {
  width: 100%;
  height: 120px;
  display: block;
}

.audio-controls {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.9375rem;
  padding: 0 0.625rem 0.625rem;
}

.audio-file-input {
  display: none;
}

.audio-file-btn {
  display: block;
  padding: 0.5rem 0;
  background: var(--panel-highlight);
  border: 1px solid var(--panel-border);
  color: var(--accent-primary);
  font-size: 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  margin-bottom: 0.625rem;
}

.audio-file-btn:hover {
  background: var(--panel-border);
}

.audio-file-label {
  display: block;
  padding: 0.5rem 0.625rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--accent-primary);
  font-size: 0.75rem;
  border-radius: 3px;
  margin-bottom: 0.625rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-player {
  display: none;
}

.controls-row {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.audio-sensitivity-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3125rem;
  font-size: 0.75rem;
}

.audio-sensitivity-value {
  color: var(--accent-primary);
}

/* =========================================================================
   TRANSPORTE DE AUDIO — prev / −10 / play·pause / +10 / next / stop / share
   Sprite: assets/imagenes/IDLI-radio-botones.png (8×92px, fila · 736×92)
   ========================================================================= */
.playback-transport {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.playback-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
}

.playback-btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.2rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  color: var(--accent-primary);
  font-family: inherit;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.playback-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary);
}

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

.playback-btn--primary {
  background: rgba(255, 255, 255, 0.14);
}

/*
  Sprite 736×92 → 8 celdas 92×92.
  UI a 20×20: mask-size = 8×20 = 160px × 20px; posición = -índice × 20px.
  Celdas: 0 prev · 1 rewind · 2 play · 3 forward · 4 next · 5 stop · 6 pause · 7 share
*/
.playback-icon {
  --icon-size: 20px;
  --sprite-cols: 8;
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("../assets/imagenes/IDLI-radio-botones.png");
  mask-image: url("../assets/imagenes/IDLI-radio-botones.png");
  -webkit-mask-size: calc(var(--icon-size) * var(--sprite-cols)) var(--icon-size);
  mask-size: calc(var(--icon-size) * var(--sprite-cols)) var(--icon-size);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.playback-icon--prev {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.playback-icon--rewind {
  -webkit-mask-position: calc(var(--icon-size) * -1) 0;
  mask-position: calc(var(--icon-size) * -1) 0;
}

.playback-icon--play {
  -webkit-mask-position: calc(var(--icon-size) * -2) 0;
  mask-position: calc(var(--icon-size) * -2) 0;
}

.playback-icon--forward {
  -webkit-mask-position: calc(var(--icon-size) * -3) 0;
  mask-position: calc(var(--icon-size) * -3) 0;
}

.playback-icon--next {
  -webkit-mask-position: calc(var(--icon-size) * -4) 0;
  mask-position: calc(var(--icon-size) * -4) 0;
}

.playback-icon--stop {
  -webkit-mask-position: calc(var(--icon-size) * -5) 0;
  mask-position: calc(var(--icon-size) * -5) 0;
}

.playback-icon--pause {
  -webkit-mask-position: calc(var(--icon-size) * -6) 0;
  mask-position: calc(var(--icon-size) * -6) 0;
}

.playback-icon--share {
  -webkit-mask-position: calc(var(--icon-size) * -7) 0;
  mask-position: calc(var(--icon-size) * -7) 0;
}

/*
  Sprite redes: assets/imagenes/IDLI-redes-botones.png
  Grilla 3×4 · celda 268×269 · sheet 1072×807
  F1: fb · tt · ig · wa | F2: li · x · pin · yt | F3: spotify · messenger · tg · wa-biz
*/
.share-socials {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}

.share-socials__btn {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--accent-primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  line-height: 0;
}

.share-socials__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.share-socials__btn:focus-visible {
  outline: 1px solid var(--accent-primary);
  outline-offset: 2px;
}

.share-socials__icon {
  --icon-size: 32px;
  --sprite-cols: 4;
  --sprite-rows: 3;
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
  background-image: url("../assets/imagenes/IDLI-redes-botones.png");
  background-repeat: no-repeat;
  background-size: calc(var(--icon-size) * var(--sprite-cols))
    calc(var(--icon-size) * var(--sprite-rows));
  background-position: 0 0;
}

/* Fila 1: facebook(0,0) tiktok(1,0) instagram(2,0) whatsapp(3,0) */
.share-socials__icon--fb {
  background-position: 0 0;
}

.share-socials__icon--tt {
  background-position: calc(var(--icon-size) * -1) 0;
}

.share-socials__icon--ig {
  background-position: calc(var(--icon-size) * -2) 0;
}

.share-socials__icon--wa {
  background-position: calc(var(--icon-size) * -3) 0;
}

/* Fila 2: X(1,1) */
.share-socials__icon--x {
  background-position: calc(var(--icon-size) * -1) calc(var(--icon-size) * -1);
}

/* Fila 3: telegram(2,2) */
.share-socials__icon--tg {
  background-position: calc(var(--icon-size) * -2) calc(var(--icon-size) * -2);
}

.playback-time {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.playback-time-sep {
  opacity: 0.5;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 1.1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0.625rem;
  outline: none;
}

.progress-bar:focus-visible .progress-bar__track {
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.progress-bar__track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: visible;
  transition: height 0.15s;
}

.progress-bar:hover .progress-bar__track {
  height: 6px;
}

.progress-bar__buffer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  pointer-events: none;
}

.progress-bar__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent-primary);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}

.progress-bar__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--accent-primary);
  transform: translateY(-50%) scale(0);
  transition: transform 0.15s;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.progress-bar:hover .progress-bar__thumb,
.progress-bar.is-seeking .progress-bar__thumb {
  transform: translateY(-50%) scale(1);
}

.volume-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.volume-label {
  color: var(--text-secondary);
}

.volume-value {
  color: var(--accent-primary);
  min-width: 2.5rem;
  text-align: right;
}

/* =========================================================================
   KARAOKE / SUBTÍTULOS — lectura sincronizada (escala de grises)
   ========================================================================= */
.karaoke-panel {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(200, 200, 200, 0.35);
  border-radius: 3px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.karaoke-header {
  padding: 0.4rem 0.55rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(200, 200, 200, 0.25);
}

.karaoke-reader {
  max-height: 140px;
  overflow-y: auto;
  padding: 0.55rem 0.65rem;
  scroll-behavior: smooth;
}

.karaoke-cue {
  display: block;
  margin: 0 0 0.45rem;
  padding: 0.2rem 0.35rem;
  border-left: 2px solid transparent;
  color: rgba(243, 243, 243, 0.4);
  font-size: 0.75rem;
  line-height: 1.35;
  transition: color 120ms linear, background-color 120ms linear, border-color 120ms linear;
}

.karaoke-cue.is-past {
  color: rgba(243, 243, 243, 0.62);
}

.karaoke-cue.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent-primary);
}

.karaoke-status {
  padding: 0.35rem 0.55rem 0.5rem;
  font-size: 0.625rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(200, 200, 200, 0.15);
}

.demo-tracks {
  margin-top: 0.625rem;
  margin-bottom: 0.9375rem;
}

.demo-tracks-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.3125rem;
  display: block;
}

.demo-track-btn {
  display: block;
  width: 100%;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
  padding: 0.3125rem 0.625rem;
  margin-right: 0;
  margin-bottom: 0.35rem;
  background: var(--panel-highlight);
  border: 1px solid var(--panel-border);
  color: var(--accent-primary);
  font-family: inherit;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.demo-track-btn:hover:not(:disabled) {
  background: var(--panel-border);
}

.demo-track-btn.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-primary);
}

.autoplay-tap-hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.autoplay-tap-hint.is-visible {
  opacity: 0.9;
}

.playback-btn--primary.is-autoplay-hint {
  animation: idli-autoplay-pulse 1.4s ease-in-out infinite;
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

@keyframes idli-autoplay-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.demo-track-btn--soon,
.demo-track-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#podcast-catalog {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
}

#podcast-catalog .demo-tracks-label {
  margin-top: 0.65rem;
}

#podcast-catalog .demo-tracks-label:first-child {
  margin-top: 0;
}

/* =========================================================================
   WIDGET ESTADO DEL MUNDO (RADIO — fechas diegéticas + temp BA+24)
   ========================================================================= */
.world-widget {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem 0.65rem;
  border: 1px solid rgba(200, 200, 200, 0.4);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.28);
}

.world-widget__title {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}

.world-widget__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.world-widget__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
}

.world-widget__row dt {
  margin: 0;
  font-size: 0.625rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
}

.world-widget__row dd {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.world-widget__hint {
  display: inline-block;
  margin-left: 0.25rem;
  opacity: 0.55;
  font-size: 0.5625rem;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .world-widget__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .world-widget__row dd {
    text-align: left;
  }
}

.youtube-input {
  display: flex;
  margin-top: 0.625rem;
  margin-bottom: 0.625rem;
}

.youtube-url {
  flex: 1;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  font-size: 0.75rem;
  border-radius: 3px 0 0 3px;
}

.youtube-load-btn {
  padding: 0.5rem 0.625rem;
  background: var(--panel-highlight);
  border: 1px solid var(--panel-border);
  border-left: none;
  color: var(--accent-primary);
  font-size: 0.75rem;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  transition: all 0.2s;
}

.youtube-load-btn:hover {
  background: var(--panel-border);
}

.youtube-error {
  color: var(--accent-tertiary);
  font-size: 0.6875rem;
  margin-top: 0.3125rem;
  display: none;
}

/* Floating particles — pantalla completa, sobre el 3D y bajo los paneles */
.floating-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.floating-particles .particle {
  pointer-events: none;
}

/* =========================================================================
   RESPONSIVE ≤768px
   -----------------------------------------------------------------------
   Stack vertical: burbuja (centro) → analizador → logo/pie
   Columna izquierda (métricas / control / terminal) oculta
   ========================================================================= */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100dvh;
  }

  .desktop-only {
    display: none !important;
  }

  .viz-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: min(62vh, 520px);
    min-height: 280px;
    z-index: 2;
  }

  #three-container {
    touch-action: none;
  }

  .interface-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0.75rem;
  }

  .header {
    gap: 0.35rem;
    align-items: flex-start;
  }

  .header-item {
    font-size: 0.625rem;
    line-height: 1.25;
  }

  .header-item:first-child {
    display: none;
  }

  .header-item-largo {
    font-size: 0.7rem;
  }

  .scanner-frame {
    display: none;
  }

  /* Sin anillos/barras de espectro alrededor del orbe ni canvas del panel */
  .circular-visualizer,
  .audio-wave,
  .spectrum-content {
    display: none !important;
  }

  .spectrum-analyzer {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: calc(100% - 1.5rem);
    max-width: none;
    max-height: none;
    margin: 0.75rem auto 0;
    transform: none !important;
    z-index: 6;
  }

  .spectrum-header .drag-handle {
    display: none;
  }

  .karaoke-panel {
    display: none !important;
  }

  .karaoke-reader {
    max-height: 180px;
  }

  .playback-buttons {
    gap: 0.2rem;
  }

  .playback-btn {
    padding: 0.35rem 0.12rem;
  }

  .playback-icon {
    --icon-size: 16px;
  }

  .share-socials {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .share-socials__icon {
    --icon-size: 28px;
  }

  .share-socials__btn {
    padding: 0.15rem;
  }

  .idli-branding--page {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin: 1.5rem auto 2rem;
    z-index: 6;
  }

  .idli-logo {
    width: 96px;
  }

  .idli-credit {
    white-space: normal;
    max-width: 18rem;
    font-size: 0.625rem;
  }

  .notification {
    top: 0.75rem;
    width: calc(100% - 2rem);
    max-width: 22rem;
    text-align: center;
  }
}


              