:root {
  color-scheme: light dark;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --primary-color: #f59e0b;
  --accent-color: #fbbf24;

  --bg-light: #f4efe6;
  --surface-light: #fffdf8;
  --surface-2-light: #ebe3d5;
  --text-light: #181614;
  --muted-light: #5c554c;
  --border-light: rgba(24, 22, 20, 0.14);

  --bg-dark: #0b0c0f;
  --surface-dark: #14161c;
  --surface-2-dark: #1d2028;
  --text-dark: #f4f1ea;
  --muted-dark: #9ca3af;
  --border-dark: rgba(255, 255, 255, 0.1);

  --bg-color: var(--bg-light);
  --surface-color: var(--surface-light);
  --surface-2: var(--surface-2-light);
  --text-color: var(--text-light);
  --muted-color: var(--muted-light);
  --border-color: var(--border-light);

  @media (prefers-color-scheme: dark) {
    --bg-color: var(--bg-dark);
    --surface-color: var(--surface-dark);
    --surface-2: var(--surface-2-dark);
    --text-color: var(--text-dark);
    --muted-color: var(--muted-dark);
    --border-color: var(--border-dark);
  }

  @supports (color: light-dark(white, black)) {
    --bg-color: light-dark(var(--bg-light), var(--bg-dark));
    --surface-color: light-dark(var(--surface-light), var(--surface-dark));
    --surface-2: light-dark(var(--surface-2-light), var(--surface-2-dark));
    --text-color: light-dark(var(--text-light), var(--text-dark));
    --muted-color: light-dark(var(--muted-light), var(--muted-dark));
    --border-color: light-dark(var(--border-light), var(--border-dark));
  }

  accent-color: var(--accent-color);
  --target-size: 24px;
  --scrollbar-track: #181a20;
  --scrollbar-thumb: #4b5563;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-color: var(--bg-dark);
  --surface-color: var(--surface-dark);
  --surface-2: var(--surface-2-dark);
  --text-color: var(--text-dark);
  --muted-color: var(--muted-dark);
  --border-color: var(--border-dark);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-color: var(--bg-light);
  --surface-color: var(--surface-light);
  --surface-2: var(--surface-2-light);
  --text-color: var(--text-light);
  --muted-color: var(--muted-light);
  --border-color: var(--border-light);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font-body);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  text-wrap: balance;
}

img, video {
  max-inline-size: 100%;
  block-size: auto;
}

/* Subtle analog studio grain & radial glow */
.studio-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 10%, color-mix(in srgb, var(--primary-color) 16%, transparent), transparent 70%),
    radial-gradient(45% 45% at 85% 85%, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 70%);
}

a {
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
}

.display-title {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.shell {
  width: min(1240px, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: 1.25rem 3rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  padding: 3px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.on-air-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
  background: color-mix(in srgb, var(--primary-color) 12%, var(--surface-color));
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.on-air-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
  animation: pulse-dot 1.7s ease-in-out infinite;
}

.on-air-pill.is-live .on-air-dot {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.56rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  border-color: var(--accent-color);
}

.btn:active {
  transform: translateY(1px);
}

[hidden]:not([hidden="until-found"]) {
  display: none !important;
}

.btn-primary {
  background: var(--primary-color);
  color: #111111;
  border-color: transparent;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border-color: transparent;
}

.btn-sm {
  padding: 0.36rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.25rem;
}

/* Studio Console Layout */
.console-grid {
  display: grid;
  grid-template-columns: minmax(290px, 1.05fr) minmax(300px, 1.25fr);
  gap: 1.35rem;
  align-items: stretch;
}

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

.stage-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
}

.artwork-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: 14px;
  background: #090a0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.artwork-stage canvas.eq-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.artwork-center {
  position: relative;
  z-index: 2;
  width: 154px;
  height: 154px;
  border-radius: 22px;
  object-fit: contain;
  padding: 8px;
  background: #ffffff;
  border: 2px solid color-mix(in srgb, var(--accent-color) 55%, rgba(255,255,255,0.18));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  transition: border-radius 0.25s ease, transform 0.25s ease;
}

.artwork-stage[data-mode="radial"] .artwork-center {
  border-radius: 50%;
  width: 142px;
  height: 142px;
}

.artwork-stage[data-mode="bars"] .artwork-center {
  transform: translateY(-28px);
  width: 132px;
  height: 132px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.track-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  margin: 0.2rem 0 0.3rem;
}

.track-artist {
  font-size: 1rem;
  color: var(--muted-color);
  margin: 0;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.play-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: #111111;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary-color) 40%, transparent);
  transition: transform 0.15s ease;
}

.play-btn:hover {
  transform: scale(1.05);
}

.play-btn.is-attract {
  animation: play-btn-attract 1.35s ease-in-out infinite;
}

.play-btn.is-attract::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  pointer-events: none;
  animation: play-ring-attract 1.35s ease-out infinite;
}

@keyframes play-btn-attract {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 18px color-mix(in srgb, var(--accent-color) 65%, transparent);
  }
  20% {
    transform: scale(1.16) rotate(-5deg);
    box-shadow: 0 0 34px color-mix(in srgb, var(--accent-color) 95%, transparent);
  }
  36% {
    transform: scale(0.95) rotate(4deg);
  }
  52% {
    transform: scale(1.12) rotate(-3deg);
    box-shadow: 0 0 28px color-mix(in srgb, var(--accent-color) 85%, transparent);
  }
  68% {
    transform: scale(0.98) rotate(2deg);
  }
}

@keyframes play-ring-attract {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-btn.is-attract,
  .play-btn.is-attract::after {
    animation: none;
  }
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-color) 14%, transparent);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.5s linear;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.status-banner {
  min-height: 1.3rem;
  font-size: 0.85rem;
  color: var(--accent-color);
}

.status-banner.is-warn {
  color: #f87171;
}

.next-up-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.next-up-box img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

/* Accessible Tabs (modern-web-guidance compliant) */
.tabs-bar {
  display: flex;
  overflow-x: auto;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-top: 1.5rem;
  scrollbar-width: thin;
}

.tabs-bar [role="tab"] {
  position: relative;
  flex: none;
  background: transparent;
  border: none;
  color: var(--muted-color);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.tabs-bar [role="tab"][aria-selected="true"] {
  color: var(--text-color);
}

.tabs-bar [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--accent-color);
}

/* Important: padding/border/background belong on inner .tabpanel-body, not on [role="tabpanel"] itself */
[role="tabpanel"] {
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
}

.tabpanel-body {
  padding-top: 1.15rem;
}

/* Native Modal Dialogs (modern-web-guidance compliant) */
dialog:modal {
  position: fixed;
  inset: 0;
  margin: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--surface-color);
  color: var(--text-color);
  padding: 0;
  width: min(540px, calc(100% - 1.5rem));
  max-width: calc(100% - 1.5rem);
  max-height: min(86dvh, 740px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(4px);
}

#cabinaDialog:modal {
  border: 2px solid #39ff14;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.48), 0 0 38px rgba(57, 255, 20, 0.22), 0 24px 64px rgba(0, 0, 0, 0.74);
}

#pulseDialog:modal {
  border: 2px solid #ffd700;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.52), 0 0 38px rgba(245, 158, 11, 0.28), 0 24px 64px rgba(0, 0, 0, 0.74);
}

.dialog-inner {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.dialog-head h1, .dialog-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

/* Form controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-color);
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.56rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.92rem;
}

input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  cursor: pointer;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }

@media (max-width: 780px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.list-table th,
.list-table td {
  padding: 0.62rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.list-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted-color);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.52rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.badge-ok { border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.badge-warn { border-color: rgba(245, 158, 11, 0.5); color: #fbbf24; }
.badge-err { border-color: rgba(239, 68, 68, 0.5); color: #f87171; }

.code-box {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.68rem 0.85rem;
  border-radius: 10px;
  background: #090a0d;
  color: #fde68a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow-x: auto;
  word-break: break-all;
}

/* Fallback for browsers without scrollbar-color */
@supports not (scrollbar-color: auto) {
  .scroller { scrollbar-width: auto; }
  .scroller::-webkit-scrollbar { width: 10px; height: 10px; }
  .scroller::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 6px; }
  .scroller::-webkit-scrollbar-track { background: var(--scrollbar-track); }
}

/* Fallback for older browsers without accent-color */
@supports not (accent-color: auto) {
  input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }
  input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--accent-color) var(--progress, 75%), #555 var(--progress, 75%));
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    margin-top: -4px;
  }
}

/* =========================================================
   Station 3D Earth Globe Hero + Player Dock (Cross-Device)
   Android / iOS Safari / Huawei HarmonyOS ArkWeb ready
   ========================================================= */
.station-shell {
  width: min(1320px, calc(100% - 1.5rem));
  padding-top: max(0.85rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(2.25rem, env(safe-area-inset-bottom, 0px));
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.station-shell :where(button, select, a.btn, [role="tab"]) {
  min-block-size: var(--target-size);
  min-inline-size: var(--target-size);
}

.station-topbar {
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.globe-hero-stage {
  position: relative;
  min-height: clamp(320px, 56dvh, 560px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 44%, rgba(30, 58, 138, 0.24) 0%, rgba(11, 13, 18, 0.94) 55%, #05070c 100%);
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.65),
    0 24px 60px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  margin-bottom: 1rem;
}

.globe-hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 14% 22%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 29% 74%, rgba(255, 255, 255, 0.38), transparent),
    radial-gradient(1.5px 1.5px at 42% 14%, rgba(251, 191, 36, 0.45), transparent),
    radial-gradient(1px 1px at 66% 18%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 84% 34%, rgba(125, 211, 252, 0.5), transparent),
    radial-gradient(1px 1px at 78% 72%, rgba(255, 255, 255, 0.42), transparent),
    radial-gradient(1px 1px at 91% 58%, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.75;
}

.globe-canvas-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.globe-canvas-host[data-globe-time="night"] canvas,
.globe-canvas-host[data-globe-time="day"] canvas {
  filter: none;
}

.globe-flash-burst {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  animation: globe-flash-anim 0.72s ease-out forwards;
}

.globe-flash-burst.is-self {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.88) 0%, rgba(216, 180, 254, 0.68) 32%, rgba(168, 85, 247, 0.34) 64%, transparent 86%);
}

.globe-flash-burst.is-self.flash-lvl-2 {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.96) 0%, rgba(232, 121, 249, 0.85) 36%, rgba(168, 85, 247, 0.55) 68%, rgba(126, 34, 206, 0.2) 92%);
  animation-duration: 1s;
}

.globe-flash-burst.is-self.flash-lvl-3 {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 1) 0%, rgba(245, 208, 254, 0.98) 34%, rgba(192, 132, 252, 0.82) 64%, rgba(168, 85, 247, 0.48) 95%);
  animation: globe-flash-mega 1.45s ease-out forwards;
}

@keyframes globe-flash-mega {
  0% { opacity: 0; transform: scale(0.85); }
  22% { opacity: 1; transform: scale(1.08); }
  48% { opacity: 0.95; transform: scale(1.14); }
  100% { opacity: 0; transform: scale(1.28); }
}

.globe-flash-burst.is-live {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.85) 0%, rgba(57, 255, 20, 0.65) 30%, rgba(0, 255, 136, 0.28) 62%, transparent 85%);
}

.globe-flash-burst.is-real {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.84) 0%, rgba(0, 200, 255, 0.64) 30%, rgba(0, 136, 255, 0.28) 62%, transparent 85%);
}

.globe-flash-burst.is-multi {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.82) 0%, rgba(var(--flash-rgb, 255, 43, 214), 0.62) 30%, rgba(var(--flash-rgb, 255, 43, 214), 0.26) 62%, transparent 85%);
}

.globe-flash-burst.is-hist {
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.78) 0%, rgba(254, 240, 138, 0.58) 30%, rgba(245, 158, 11, 0.24) 62%, transparent 85%);
}

@keyframes globe-flash-anim {
  0% { opacity: 0; transform: scale(0.82); }
  24% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.22); }
}

.globe-beacon-wrap {
  pointer-events: none;
  width: 0;
  height: 0;
}

.globe-beacon-glow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: globe-light-radiate 1.45s ease-in-out infinite;
}

.globe-beacon-glow.is-self {
  width: 30px;
  height: 30px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(232, 121, 249, 0.85) 26%,
    rgba(168, 85, 247, 0.42) 56%,
    rgba(168, 85, 247, 0) 78%
  );
  animation-duration: 1.25s;
}

.globe-beacon-glow.is-live {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(57, 255, 20, 0.85) 28%,
    rgba(0, 255, 136, 0.4) 56%,
    rgba(0, 255, 136, 0) 78%
  );
}

.globe-beacon-glow.is-real {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(0, 200, 255, 0.84) 28%,
    rgba(0, 136, 255, 0.38) 56%,
    rgba(0, 136, 255, 0) 78%
  );
}

.globe-beacon-glow.is-multi {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(var(--beacon-rgb, 255, 43, 214), 0.82) 28%,
    rgba(var(--beacon-rgb, 255, 43, 214), 0.36) 56%,
    rgba(var(--beacon-rgb, 255, 43, 214), 0) 78%
  );
}

.globe-beacon-glow.is-hist {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(254, 240, 138, 0.78) 28%,
    rgba(245, 158, 11, 0.34) 56%,
    rgba(245, 158, 11, 0) 78%
  );
}

@keyframes globe-light-radiate {
  0%, 100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.78);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.16);
  }
  45% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.92);
  }
  62% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.globe-city-callout {
  position: absolute;
  top: 41%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 5;
  pointer-events: none;
  padding: 0.34rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.86);
  border: 1.5px solid rgba(251, 191, 36, 0.75);
  color: #fef08a;
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 2.8vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.65);
  animation: globe-callout-pop 2.6s ease-in-out forwards;
}

.globe-city-callout.is-self {
  border-color: rgba(216, 180, 254, 0.85);
  color: #f5d0fe;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.55), 0 6px 22px rgba(0, 0, 0, 0.65);
}

.globe-city-callout.is-live {
  border-color: rgba(57, 255, 20, 0.92);
  color: #86efac;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.55), 0 6px 22px rgba(0, 0, 0, 0.65);
}

.globe-city-callout.is-real {
  border-color: rgba(0, 200, 255, 0.92);
  color: #7dd3fc;
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.55), 0 6px 22px rgba(0, 0, 0, 0.65);
}

.globe-city-callout.is-multi {
  border-color: var(--callout-hex, #ff2bd6);
  color: var(--callout-hex, #ff80e8);
  box-shadow: 0 0 18px rgba(var(--callout-rgb, 255, 43, 214), 0.55), 0 6px 22px rgba(0, 0, 0, 0.65);
}

@keyframes globe-callout-pop {
  0% { opacity: 0; transform: translate(-50%, -85%) scale(0.92); }
  14% { opacity: 1; transform: translate(-50%, -115%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -135%) scale(0.96); }
}

.globe-welcome-toast {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 6;
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: min(94%, 740px);
  min-block-size: 108px;
  box-sizing: border-box;
  padding: 1.15rem 1.5rem;
  border-radius: 18px;
  background: rgba(6, 22, 15, 0.9);
  border: 1.5px solid rgba(52, 211, 153, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #6ee7b7;
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  overflow-wrap: break-word;
  text-wrap: balance;
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.45), 0 10px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.globe-welcome-toast > span {
  min-width: 0;
  flex: 1 1 auto;
}

.globe-welcome-toast[hidden] {
  display: none;
}

.globe-welcome-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: welcome-heartbeat 1.35s ease-in-out infinite;
}

@keyframes welcome-heartbeat {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.42), 0 10px 28px rgba(0, 0, 0, 0.55);
  }
  18% {
    transform: translateX(-50%) scale(1.045);
    box-shadow: 0 0 36px rgba(52, 211, 153, 0.78), 0 10px 28px rgba(0, 0, 0, 0.55);
  }
  34% {
    transform: translateX(-50%) scale(0.995);
  }
  50% {
    transform: translateX(-50%) scale(1.035);
    box-shadow: 0 0 32px rgba(52, 211, 153, 0.68), 0 10px 28px rgba(0, 0, 0, 0.55);
  }
}

.globe-welcome-toast::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  flex: none;
}

.welcome-play-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #111111;
  font-size: 1.25rem;
  padding-left: 2px;
  flex: none;
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary-color) 65%, transparent);
}

.welcome-yellow {
  color: #fde047;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.welcome-neon-green {
  color: #39ff88;
  text-shadow: 0 0 10px rgba(57, 255, 136, 0.6);
}

.mobile-install-row {
  display: none;
}

.globe-install-btn {
  display: none;
}

@keyframes install-btn-pulse-wiggle {
  0%, 68%, 100% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.35), 0 8px 24px rgba(0, 0, 0, 0.55);
  }
  74% {
    transform: scale(1.07) rotate(-3deg);
    box-shadow: 0 0 26px rgba(251, 191, 36, 0.8), 0 8px 24px rgba(0, 0, 0, 0.55);
  }
  80% {
    transform: scale(1.05) rotate(3deg);
  }
  86% {
    transform: scale(1.07) rotate(-2.5deg);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.72), 0 8px 24px rgba(0, 0, 0, 0.55);
  }
  92% {
    transform: scale(1.03) rotate(2deg);
  }
}

@media (max-width: 768px) {
  .mobile-install-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.35rem;
  }
  .station-shell .globe-install-btn:not([hidden]) {
    display: inline-flex;
    align-items: center;
    min-block-size: 28px;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    background: #151822;
    border: 1.5px solid var(--accent-color);
    color: #fde68a;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    animation: install-btn-pulse-wiggle 3s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .globe-install-btn:not([hidden]) {
    animation: none;
  }
}

.globe-hud {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 4;
  max-width: min(320px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(15, 18, 25, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f4f1ea;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.globe-hud-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.globe-hud-status .meta-label {
  color: #cbd5e1;
}

.globe-hud-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
  flex: none;
}

.globe-hud-dot.is-live {
  background: #39ff14;
  box-shadow: 0 0 12px #39ff14;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.globe-hud-dot.is-real {
  background: #00c8ff;
  box-shadow: 0 0 12px #00c8ff;
}

.globe-hud-dot.is-multi {
  background: var(--hud-dot-color, #ff2bd6);
  box-shadow: 0 0 12px var(--hud-dot-color, #ff2bd6);
}

.globe-hud-dot.is-self {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  animation: pulse-dot 1.3s ease-in-out infinite;
}

.globe-hud-city {
  margin: 0.25rem 0 0.15rem;
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.globe-hud-sub {
  margin: 0;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.globe-hud-controls {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.globe-hud-controls .btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

#globeSelfBtn {
  border-color: rgba(192, 132, 252, 0.65);
  background: rgba(168, 85, 247, 0.22);
  color: #f5d0fe;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
  animation: self-btn-wiggle 3.4s ease-in-out infinite;
}

#globeSelfBtn:hover {
  animation-play-state: paused;
}

@keyframes self-btn-wiggle {
  0%, 76%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
  80% { transform: translateX(-2px) rotate(-3deg) scale(1.04); }
  84% { transform: translateX(2px) rotate(3deg) scale(1.04); }
  88% { transform: translateX(-2px) rotate(-2deg) scale(1.03); }
  92% { transform: translateX(2px) rotate(2deg) scale(1.02); }
  96% { transform: translateX(0) rotate(0deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #globeSelfBtn {
    animation: none;
  }
}

.youtube-stage {
  position: relative;
  z-index: 5;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 540px;
  background: #000000;
}

.globe-eq-overlay {
  position: absolute;
  inset: auto 0 0 0;
  height: 136px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 12, 0.65) 68%, rgba(5, 7, 12, 0.92) 100%);
}

.globe-eq-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viz-controls-bar {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.viz-status-label {
  color: rgba(244, 241, 234, 0.78);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.viz-controls-pill {
  pointer-events: auto;
  display: inline-flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(15, 18, 25, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.viz-controls-pill .viz-switch {
  border-radius: 999px;
  background: transparent;
  border-color: transparent;
  color: #e2e8f0;
}

.viz-controls-pill .viz-switch.btn-primary {
  background: var(--primary-color);
  color: #111111;
}

/* Frosted-glass Player Dock */
.player-dock {
  container: player-dock / inline-size;
  background: color-mix(in srgb, var(--surface-color) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 1.15rem;
}

.dock-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.15rem;
  align-items: center;
}

.dock-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-inline-size: 0;
}

.dock-art {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  object-fit: contain;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 45%, var(--border-color));
  background: #ffffff;
  flex: none;
}

.dock-play-meta {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dock-live-img {
  display: block;
  margin-inline: auto;
  height: 66px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}

.dock-live-img[hidden] {
  display: none;
}

.dock-play-label {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #39ff88;
  text-shadow: 0 0 12px rgba(57, 255, 136, 0.55);
}

.dock-play-meta .status-banner:empty {
  display: none;
}

.dock-center {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dock-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dock-track-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.15;
}

.dock-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dock-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.85;
}

.dock-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-inline-size: 0;
}

.dock-volume {
  margin-left: 0;
}

.dock-volume input[type="range"] {
  width: 96px;
}

.dock-next-up {
  max-width: 260px;
  padding: 0.55rem 0.75rem;
}

.dock-next-up img {
  width: 40px;
  height: 40px;
}

.dock-social {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

@container player-dock (max-width: 880px) {
  .dock-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .dock-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .dock-next-up {
    max-width: none;
    flex: 1 1 220px;
  }
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .station-shell {
    width: calc(100% - 0.75rem);
    padding-top: max(0.45rem, env(safe-area-inset-top, 0px));
  }

  /* Compact centered brand header on phones so globe + player stay front and center */
  .station-topbar {
    justify-content: center;
    gap: 0.45rem;
    padding-bottom: 0.55rem;
    margin-bottom: 0.55rem;
  }
  .station-topbar .brand-lockup {
    justify-content: center;
    gap: 0.7rem;
  }
  .station-topbar .brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }
  .station-topbar #stationName {
    font-size: 1.55rem !important;
    line-height: 1.08;
  }
  .station-topbar .meta-label {
    font-size: 0.78rem;
  }
  /* Hide extra topbar pills/buttons on phones so globe + player sit immediately at the top */
  .topbar-actions {
    display: none;
  }

  /* Unobstructed 3D Earth Globe: trimmed top/bottom space, zero cards overlapping the planet */
  .globe-hero-stage {
    display: flex;
    flex-direction: column;
    min-height: auto;
    border-radius: 16px;
    margin-bottom: 0.55rem;
  }
  .globe-canvas-host {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(235px, 35dvh, 285px);
    order: 1;
  }
  .globe-eq-overlay {
    position: relative;
    inset: auto;
    height: 60px;
    margin-top: -60px;
    z-index: 3;
    order: 2;
    pointer-events: none;
    padding: 0 0.35rem;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 12, 0.16) 72%, rgba(5, 7, 12, 0.56) 100%);
    border-top: 0;
  }
  .globe-eq-canvas {
    height: 60px;
  }
  .globe-welcome-toast {
    bottom: 0.3rem;
    width: calc(100% - 1.2rem);
    max-width: calc(100% - 1.2rem);
    min-block-size: 68px;
    padding: 0.62rem 0.85rem;
    gap: 0.45rem;
    font-size: clamp(0.96rem, 3.8vw, 1.08rem);
    line-height: 1.28;
    border-radius: 14px;
    overflow-wrap: break-word;
    word-break: normal;
    text-wrap: balance;
  }
  .globe-welcome-toast::before {
    width: 8px;
    height: 8px;
  }
  .welcome-play-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  /* Compact HUD strip below the globe — never covers the Earth */
  .globe-hud {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    max-width: none;
    order: 3;
    border-radius: 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 15, 22, 0.94);
    box-shadow: none;
    padding: 0.36rem 0.65rem;
  }
  .globe-hud-city {
    font-size: 1rem;
    margin: 0.08rem 0 0;
  }
  .globe-hud-sub {
    display: none;
  }
  .globe-hud-controls {
    margin-top: 0.28rem;
    gap: 0.3rem;
  }
  .globe-hud-controls .btn {
    flex: 1 1 auto;
    min-block-size: 0;
    min-inline-size: 0;
    height: auto;
    padding: 0.14rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1.1;
    border-radius: 7px;
  }

  /* Compact Player Dock right under the globe */
  .player-dock {
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
  }
  .dock-grid {
    gap: 0.65rem;
  }
  .dock-art {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }
  .play-btn {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
  }
  .dock-play-label {
    font-size: 1.12rem;
  }
  .dock-live-img {
    height: 58px;
  }
  .dock-track-title {
    font-size: 1.15rem;
  }
  .dock-times {
    font-size: 1.05rem;
  }
}

/* Accessible Form Validation (modern-web-guidance: validate-input-after-interaction) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.field .hint {
  font-size: 0.76rem;
  color: var(--muted-color);
  line-height: 1.35;
}

.error-msg {
  display: none;
  font-size: 0.8rem;
  color: #f87171;
  font-weight: 500;
}

.field:has(:user-invalid, .user-invalid-fallback) .error-msg,
.field[data-invalid="true"] .error-msg {
  display: block;
}

:is(input, textarea, select):is(:user-invalid, .user-invalid-fallback) {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22);
}

.cabina-on-air-banner[hidden],
.pulse-toast[hidden] {
  display: none !important;
}

.globe-cabina-dock {
  display: none;
}

/* Cabina Planetaria Viva + Light Pulses */
.cabina-on-air-banner {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(92%, 560px);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(18, 16, 10, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52), 0 0 22px rgba(251, 191, 36, 0.28);
  backdrop-filter: blur(10px);
  color: #fef3c7;
  pointer-events: none;
}

.cabina-on-air-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
  white-space: nowrap;
}

.cabina-on-air-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.25;
}

.cabina-on-air-body span {
  color: #fde68a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-toast {
  position: absolute;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 6;
  max-width: min(86%, 340px);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(12, 22, 28, 0.88);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #d1fae5;
  font-size: 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.cabina-record-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.cabina-rec-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cabina-rec-timer {
  margin-inline-start: auto;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.03em;
}

.cabina-rec-meter {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.cabina-rec-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fecaca;
}

.cabina-rec-countdown {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.22);
  color: #ffffff;
  border: 1px solid rgba(248, 113, 113, 0.55);
  white-space: nowrap;
}

.cabina-rec-countdown.is-ending {
  background: rgba(245, 158, 11, 0.34);
  border-color: #fbbf24;
  color: #fef3c7;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.cabina-rec-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  margin-inline-end: 0.4rem;
  animation: pulse-dot 1s ease-in-out infinite;
}

.cabina-rec-progress {
  width: 100%;
  height: 7px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.cabina-rec-progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.cabina-rec-progress::-webkit-progress-value {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.cabina-rec-progress::-moz-progress-bar {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  border-radius: 999px;
}

.cabina-rec-level-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.cabina-rec-level-fill {
  width: 4%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  transition: width 0.06s linear;
}

.cabina-rec-preview-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cabina-master-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.cabina-master-badge.is-warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.cabina-voice-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cabina-voice-profiles .btn[aria-pressed="true"] {
  box-shadow: 0 0 0 1px var(--primary-color);
}

@media (pointer: coarse) {
  .cabina-record-box .btn {
    min-block-size: 44px;
    min-inline-size: 44px;
  }
}

.qr-preview-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.qr-preview-box img {
  border-radius: 10px;
  background: #ffffff;
  padding: 6px;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
}

.globe-beacon-glow.is-cabina {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.98) 0%, rgba(245, 158, 11, 0.55) 45%, rgba(251, 191, 36, 0) 75%);
  box-shadow: 0 0 26px rgba(251, 191, 36, 0.95);
  transform: scale(1.35);
}

.globe-beacon-glow.is-golden-pulse {
  background: radial-gradient(circle, rgba(255, 252, 210, 1) 0%, rgba(255, 215, 0, 0.92) 38%, rgba(245, 158, 11, 0.45) 68%, rgba(255, 215, 0, 0) 85%);
  box-shadow: 0 0 38px rgba(255, 230, 60, 1), 0 0 70px rgba(245, 158, 11, 0.9);
  animation: golden-pulse-beacon 1.15s ease-in-out infinite;
}

@keyframes golden-pulse-beacon {
  0%, 100% {
    transform: scale(1.65);
    opacity: 0.95;
  }
  50% {
    transform: scale(2.45);
    opacity: 1;
  }
}

.globe-golden-pulse-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: none;
  width: min(92%, 520px);
  padding: 0.85rem 1.25rem;
  border-radius: 18px;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(56, 40, 6, 0.92), rgba(16, 12, 4, 0.88));
  border: 2px solid #ffd700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.78), 0 0 64px rgba(245, 158, 11, 0.46), 0 14px 36px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: golden-banner-glow 1.5s ease-in-out infinite;
}

.globe-golden-pulse-overlay.is-fading {
  opacity: 0;
  transition: opacity 0.6s ease;
}

@keyframes golden-banner-glow {
  0%, 100% {
    box-shadow: 0 0 26px rgba(255, 215, 0, 0.72), 0 0 58px rgba(245, 158, 11, 0.4), 0 14px 36px rgba(0, 0, 0, 0.65);
  }
  50% {
    box-shadow: 0 0 42px rgba(255, 232, 90, 0.96), 0 0 84px rgba(245, 158, 11, 0.62), 0 14px 36px rgba(0, 0, 0, 0.65);
  }
}

.globe-golden-pulse-kicker {
  font-family: var(--font-body);
  font-size: clamp(0.66rem, 2.5vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fde68a;
  margin-bottom: 0.25rem;
}

.globe-golden-pulse-title {
  font-family: var(--font-body);
  font-size: clamp(1.06rem, 4.8vw, 1.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fffbeb;
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.8);
}

.cabina-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.cabina-status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cabina-status-pill.is-queued { color: #93c5fd; border-color: rgba(147, 197, 253, 0.45); }
.cabina-status-pill.is-pending { color: #fcd34d; border-color: rgba(252, 211, 77, 0.5); }
.cabina-status-pill.is-playing { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.55); }
.cabina-status-pill.is-rejected { color: #fca5a5; border-color: rgba(252, 165, 165, 0.45); }
.cabina-status-pill.is-played { color: var(--muted-color); }

@media (max-width: 640px) {
  /* Fit Pedir/Saludar & Luz cleanly into the empty top-right strip of .globe-hud */
  .globe-hud-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
  }
  .globe-hud-info {
    min-width: 0;
    flex: 1 1 auto;
  }
  .globe-hud-city {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .globe-cabina-dock {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    position: static;
    left: auto;
    bottom: auto;
  }
  .globe-mini-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.16rem 0.46rem;
    min-block-size: 0;
    min-inline-size: 0;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.71rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    background: rgba(11, 13, 18, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: pointer;
  }
  .globe-mini-pill.is-cabina {
    border: 1px solid rgba(245, 158, 11, 0.8);
    color: #fde68a;
  }
  .globe-mini-pill.is-pulse {
    border: 1px solid rgba(52, 211, 153, 0.72);
    color: #a7f3d0;
  }

  /* Compact 1-line on-air strip on mobile (only shown when a greeting is actually playing) */
  .cabina-on-air-banner {
    top: 0.45rem;
    left: 0.5rem;
    right: auto;
    transform: none;
    max-width: calc(100% - 1rem);
    padding: 0.28rem 0.62rem;
    gap: 0.4rem;
  }
  .cabina-on-air-pill {
    font-size: 0.62rem;
    padding: 0.14rem 0.42rem;
  }
  .cabina-on-air-body {
    font-size: 0.74rem;
  }
  #cabinaOnAirPreview {
    display: none;
  }
  .pulse-toast {
    top: 0.45rem;
    right: 0.5rem;
    bottom: auto;
    max-width: calc(100% - 1rem);
    padding: 0.28rem 0.6rem;
    font-size: 0.72rem;
  }

  .station-shell,
  .globe-hero-stage {
    max-width: 100%;
    overflow-x: clip;
  }
  dialog:modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: calc(100% - 1.25rem);
    max-width: calc(100% - 1.25rem);
    max-height: 86dvh;
  }
  .dialog-inner {
    padding: 1rem;
    gap: 0.75rem;
    min-width: 0;
  }
  .dialog-head {
    gap: 0.5rem;
  }
  .dialog-head h2 {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  #cabinaDialog .tabs-bar {
    max-width: 100%;
  }
  #cabinaDialog .tabs-bar [role="tab"] {
    padding: 0.48rem 0.65rem;
    font-size: 0.78rem;
  }
}

