/* Consola derecha (ESTACIÓN ESPACIAL · SALIDA): una sola pantalla FRECUENCIA + SEÑAL,
   artista y canción más grandes, calificación compacta. Va después de style.css y readout.css. */
.crt-row.crt-row-one { grid-template-columns: minmax(0, 1fr); }
.crt-combo .crt-screen { aspect-ratio: auto; min-height: 132px; }
.crt-combo-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(64px, 1fr); height: 100%; min-height: 132px; }
.crt-combo-grid > .crt-content { height: auto; min-width: 0; }
.crt-combo .combo-signal { border-left: 1px dashed rgba(51, 255, 102, 0.28); padding-left: 8px; }
.crt-combo .signal-bars { min-height: 46px; gap: 2px; padding: 4px 2px; }
.crt-combo .freq-num { font-size: 15px; }
.crt-combo .freq-title { font-size: 16px; padding-right: 40px; }
#freq-content .aob-now { padding-right: 40px; gap: 2px; }
#freq-content .aob-now-artist { font-size: 24px; line-height: 1.1; letter-spacing: 0.02em; }
#freq-content .aob-now-title { font-size: 15px; line-height: 1.2; }
.crt-combo .wave-canvas { height: 22px; }
@media (max-width: 900px) {
  #freq-content .aob-now-artist { font-size: 20px; }
  #freq-content .aob-now-title { font-size: 13px; }
  .crt-combo-grid { grid-template-columns: minmax(0, 2fr) minmax(58px, 1fr); }
}

/* Join the Signal keeps its own box; it only changes place, under the output controls. */
.right-module > #footer-join { order: 0; align-self: center; margin: 12px auto 4px; max-width: calc(100% - 16px); }

/* Tesla Layer 3 only: a larger, centered invite under ATEN/VOLUMEN,
   with a strong neon that follows the current visual frequency (--phosphor).
   Deep Orbit purple uses the solid --phosphor in the glow so it stays vivid. */
html.aob-car body[data-view="console"] .right-module {
  flex: 1 1 auto;
  min-height: 0;
}
html.aob-car .right-module > #footer-join {
  flex: 1 1 auto;
  align-self: center;
  width: calc(100% - 20px);
  max-width: none;
  margin: 16px auto 12px;
  min-height: 160px;
  padding: 24px 24px 26px;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
  border: 3px solid var(--phosphor);
  border-radius: 10px;
  background: color-mix(in srgb, var(--phosphor) 16%, rgba(0, 0, 0, 0.42));
  box-shadow:
    0 0 12px var(--phosphor),
    0 0 32px var(--phosphor),
    0 0 64px color-mix(in srgb, var(--phosphor) 75%, transparent),
    inset 0 0 28px color-mix(in srgb, var(--phosphor) 32%, transparent);
  transition: border-color 2.5s ease, box-shadow 2.5s ease, color 2.5s ease, background 2.5s ease;
}
html.aob-car .right-module > #footer-join .footer-invite-q {
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
  width: 100%;
}
html.aob-car .right-module > #footer-join .footer-invite-q::before {
  content: "📡";
  display: block;
  font-style: normal;
  font-size: 1.5em;
  line-height: 1;
  margin: 0 0 10px;
  filter: drop-shadow(0 0 12px var(--phosphor));
}
html.aob-car .right-module > #footer-join .footer-invite-cta {
  color: var(--phosphor);
  text-shadow:
    0 0 8px var(--phosphor),
    0 0 20px color-mix(in srgb, var(--phosphor) 85%, transparent);
  font-size: 17px;
  letter-spacing: 0.2em;
  width: 100%;
  text-align: center;
}
html.aob-car .right-module > #footer-join:hover .footer-invite-q,
html.aob-car .right-module > #footer-join:focus-visible .footer-invite-q {
  color: var(--phosphor);
}
html.aob-car .right-module > #footer-join:hover,
html.aob-car .right-module > #footer-join:focus-visible {
  box-shadow:
    0 0 16px var(--phosphor),
    0 0 44px var(--phosphor),
    0 0 80px color-mix(in srgb, var(--phosphor) 80%, transparent),
    inset 0 0 32px color-mix(in srgb, var(--phosphor) 38%, transparent);
}
html.aob-car .right-module > #footer-join:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
}
@media (max-height: 800px) {
  html.aob-car .right-module > #footer-join {
    min-height: 120px;
    padding: 16px 16px 18px;
    margin: 10px auto 8px;
    gap: 10px;
  }
  html.aob-car .right-module > #footer-join .footer-invite-q { font-size: 18px; }
  html.aob-car .right-module > #footer-join .footer-invite-cta { font-size: 15px; }
}


/* Short Tesla screens: keep the invite and the neon bar visible without shrinking
   the whole console (the zoom:0.7/0.66 made Layer 3 look too small, Gh 21 nov). */
@media (max-height: 900px) {
  html.aob-car .app {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}
/* Calificación compacta, más abajo y centrada (v2), con aire respecto a ATTEN/B/W/AGC + VOLUMEN. */
.right-module .flight-rate {
  flex: 0 0 auto; min-height: 0; align-self: center; width: min(100%, 300px);
  margin: clamp(28px, 5vh, 64px) auto clamp(4px, 1vh, 12px);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 12px; text-align: center;
}
.right-module .flight-rate-title { font-size: 11px; letter-spacing: 0.1em; }
.right-module .flight-rate-sub { font-size: 10px; min-height: 0; letter-spacing: 0.04em; }
.right-module .flight-rate-head { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; text-align: center; }
.right-module .flight-stars { gap: 2px; justify-content: center; }
.right-module .flight-stars .aob-star, .right-module .flight-stars .flight-star { width: 26px; height: 26px; font-size: 18px; line-height: 26px; }
.right-module .flight-rate-thanks { min-height: 0; font-size: 10px; text-align: center; }
.right-module .flight-rate-thanks:empty { display: none; }
.crt-combo #crt-signal .signal-head { flex-wrap: wrap; gap: 2px 6px; }
.crt-combo .cc-badge-signal { font-size: 8px; padding: 0 3px; }

/* v2: el artista usa todo el ancho de la pantalla (mismo tamaño de letra), nunca con "…";
   solo un nombre muy largo baja a una segunda línea. Sin línea punteada; SEÑAL más angosta. */
.crt-combo-grid { grid-template-columns: minmax(0, 3.2fr) minmax(52px, .8fr); padding-bottom: 24px; }
.crt-combo .combo-signal { border-left: 0; padding-left: 4px; }
.crt-combo-grid > #freq-content { position: static; }
#freq-content .aob-now { padding-right: 0; }
#freq-content .aob-now-artist { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; max-width: none; text-align: left; }
#freq-content .aob-disc { top: 4px; right: 4px; width: 26px; height: 26px; }
/* El título sigue corriendo (marquesina) en vez de cortarse. */
#freq-content .aob-now-title { overflow: hidden; text-overflow: clip; white-space: nowrap; }
#freq-content .aob-now-title.aob-mq > span { display: inline-block; padding-right: 2.5em; animation: aobTitleMq var(--mqd, 12s) linear infinite alternate; }
@keyframes aobTitleMq { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--mqx, -50%)); } }
@media (prefers-reduced-motion: reduce) { #freq-content .aob-now-title.aob-mq > span { animation: none; } }
/* Onda + barras = una sola visualización: la onda corre a lo ancho de toda la pantalla
   y las barras de SEÑAL nacen de su línea (mismo nivel en app.js). */
.crt-combo .wave-canvas { position: absolute; left: 6px; right: 6px; bottom: 2px; width: calc(100% - 12px); height: 22px; z-index: 0; pointer-events: none; }
.crt-combo .signal-bars { align-items: flex-end; margin-bottom: -13px; position: relative; z-index: 1; }
/* 1420.405 MHz = línea del hidrógeno (H I): una etiqueta mínima le da sentido. */
.crt-combo .freq-hi { font-size: 9px; line-height: 1.1; letter-spacing: 0.14em; opacity: 0.55; text-transform: none; margin-top: -1px; }
/* Donde decía REC: frecuencia real + posición en el catálogo. */
#freq-content .aob-pos, .aob-mini-now .aob-pos { letter-spacing: 0.08em; white-space: nowrap; }

/* Short landscape: keep the console volume knob and its label above the neon bar. */
@media (max-height: 900px) and (min-width: 901px) {
  .crt-combo .crt-screen,
  .crt-combo-grid { min-height: 96px; }
  .gauge-svg { max-height: 42px; }
  .right-controls { margin-top: 0; }
  .volume-wrap { margin-top: 0; }
  .play-dial { margin-bottom: 10px; }
}


/* Tesla Layer 3 radio, top-right: shop ⚡ + EN/ES, same look as Layer 2. */
#aob-tesla-tr {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 100000;
  display: flex;
  gap: 12px;
  align-items: stretch;
  pointer-events: none;
  font-family: "Chakra Petch", "Segoe UI", Arial, sans-serif;
}
body.orbit-on #aob-tesla-tr,
body:has(#aob-shop:not([hidden])) #aob-tesla-tr { display: none; }
#aob-tesla-tr > * { pointer-events: auto; }
#aob-tesla-shop {
  width: 58px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #8a6a1a;
  border-radius: 12px;
  background: rgba(30, 22, 8, .9);
  color: #ffc860;
  box-shadow: 0 0 14px rgba(255, 184, 64, .18);
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
#aob-tesla-shop svg { width: 28px; height: 28px; fill: currentColor; display: block; }
#aob-tesla-shop:hover,
#aob-tesla-shop:focus-visible {
  box-shadow: 0 0 18px rgba(255, 184, 64, .4);
  color: #ffd27a;
}
#aob-tesla-shop:focus-visible,
#aob-tesla-lang button:focus-visible {
  outline: 2px solid #ffe066;
  outline-offset: 2px;
}
#aob-tesla-lang {
  display: flex;
  gap: 0;
  border: 2px solid #2a8a46;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(51, 255, 102, .18);
}
#aob-tesla-lang button {
  font-weight: 700;
  font-size: 22px;
  font-family: inherit;
  letter-spacing: .12em;
  padding: .55em .9em;
  border: 0;
  background: rgba(10, 30, 16, .9);
  color: #5f8f6c;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#aob-tesla-lang button.on {
  background: #1b5a2c;
  color: #33ff66;
}
/* Desktop radio: keep the view switches clear of the cluster. */
@media (min-width: 1024px) {
  body:has(#aob-tesla-tr):not(.orbit-on) .console-nav { right: 236px; }
}
@media (max-width: 1400px) {
  #aob-tesla-shop { width: 48px; height: 46px; }
  #aob-tesla-shop svg { width: 24px; height: 24px; }
  #aob-tesla-lang button { font-size: 16px; padding: .45em .7em; }
}
@media (min-width: 1024px) and (max-width: 1400px) {
  body:has(#aob-tesla-tr):not(.orbit-on) .console-nav { right: 190px; }
}
@media (max-width: 1100px) {
  #aob-tesla-shop { width: 44px; height: 44px; }
  #aob-tesla-shop svg { width: 22px; height: 22px; }
  #aob-tesla-lang button { font-size: 14px; padding: .4em .55em; letter-spacing: .08em; }
  #aob-tesla-tr { gap: 8px; right: 10px; }
  /* One shop control is enough when the top row is tight. */
  body:has(#aob-tesla-tr):not(.orbit-on) #btn-shop { display: none !important; }
}
@media (min-width: 1024px) and (max-width: 1100px) {
  body:has(#aob-tesla-tr):not(.orbit-on) .console-nav { right: 168px; }
}
