:root {
  color-scheme: dark;
  --bg: #02040b;
  --navy: #07101f;
  --glass: rgba(9, 18, 34, 0.68);
  --glass-strong: rgba(10, 20, 40, 0.88);
  --line: rgba(91, 213, 255, 0.22);
  --line-hot: rgba(255, 46, 88, 0.28);
  --text: #f4f8ff;
  --muted: #9fb0c5;
  --cyan: #44d9ff;
  --blue: #337bff;
  --red: #ff315f;
  --red-dark: #941336;
  --amber: #ffd36e;
  --green: #7cf7a1;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(68, 217, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(255, 49, 95, 0.22), transparent 30%),
    linear-gradient(115deg, rgba(15, 34, 62, 0.82), rgba(2, 4, 11, 0.98) 45%, rgba(10, 5, 17, 0.98)),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.065) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 49, 95, 0.052) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 80%);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 0, rgba(2, 4, 11, 0.74) 72%, var(--bg) 100%),
    repeating-linear-gradient(90deg, transparent 0 120px, rgba(68, 217, 255, 0.06) 121px, transparent 123px);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.ambient-logo {
  position: fixed;
  top: 86px;
  left: 50%;
  width: 720px;
  max-width: 85vw;
  opacity: 0.11;
  transform: translateX(-50%);
  filter: blur(34px) saturate(1.35);
  pointer-events: none;
  z-index: -1;
}

.ambient-logo img {
  width: 100%;
  display: block;
}

.app-shell {
  width: min(calc(100% - 32px), 1440px);
  margin: 0 auto;
  padding: clamp(14px, 2vw, 22px) 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 6px 0 24px;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #030711;
  border: 1px solid rgba(68, 217, 255, 0.38);
  box-shadow: 0 0 22px rgba(68, 217, 255, 0.34), 0 0 28px rgba(255, 49, 95, 0.2);
}

.brand strong {
  display: block;
  font-size: 1.12rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

.eyebrow,
.status-strip small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.header-actions,
.session-area,
.button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.session-label,
.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.74);
  box-shadow: inset 0 0 20px rgba(68, 217, 255, 0.04);
}

.header-actions .button,
.session-area .button,
.session-label,
.events-button {
  min-height: 36px;
  border-radius: 999px;
  border-color: rgba(68, 217, 255, 0.26);
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.1), rgba(255, 49, 95, 0.08)),
    rgba(4, 10, 22, 0.72);
  box-shadow: inset 0 0 18px rgba(68, 217, 255, 0.04), 0 0 16px rgba(68, 217, 255, 0.08);
}

.events-button {
  min-width: 74px;
  padding: 0 12px;
  color: var(--cyan);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(14px, 1.8vw, 24px);
  align-items: stretch;
}

.station-panel,
.chat-panel,
.control-panel,
.auth-dialog {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(16, 31, 58, 0.72), rgba(3, 7, 17, 0.88)),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.station-panel::before,
.chat-panel::before,
.control-panel::before,
.tool-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.08), transparent 32%, transparent 68%, rgba(255, 49, 95, 0.09)),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 35px, transparent 36px);
}

.station-panel {
  min-height: clamp(540px, 62vh, 680px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(120px, 13vw, 180px);
  grid-template-areas:
    "copy avatar"
    "console console";
  align-content: start;
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(20px, 2.4vw, 34px);
}

.station-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--red));
  box-shadow: 0 0 24px rgba(68, 217, 255, 0.45), 0 0 24px rgba(255, 49, 95, 0.38);
}

.station-copy,
.hero-badge,
.radio-console,
.panel-heading,
.message-list,
.chat-form,
.notice,
.deck-grid,
.admin-grid,
.tool-block > * {
  position: relative;
  z-index: 1;
}

.station-copy {
  grid-area: copy;
  align-self: center;
  max-width: min(760px, 100%);
  min-width: 0;
}

.station-copy h1 {
  margin: 0;
  max-width: 100%;
  color: #f7fbff;
  font-size: clamp(3rem, 6vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    0 0 18px rgba(68, 217, 255, 0.38),
    0 0 34px rgba(255, 49, 95, 0.26),
    0 0 54px rgba(51, 123, 255, 0.18);
}

.hero-badge {
  grid-area: avatar;
  align-self: start;
  justify-self: end;
  width: clamp(118px, 13vw, 164px);
  height: clamp(118px, 13vw, 164px);
  border-radius: 50%;
  padding: 7px;
  background:
    linear-gradient(140deg, rgba(68, 217, 255, 0.4), rgba(255, 49, 95, 0.36)),
    rgba(2, 5, 12, 0.72);
  box-shadow: 0 0 30px rgba(68, 217, 255, 0.2), 0 0 36px rgba(255, 49, 95, 0.18);
}

.hero-badge img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.radio-console {
  grid-area: console;
  display: grid;
  gap: clamp(14px, 1.5vw, 18px);
  padding: clamp(16px, 1.6vw, 22px);
  border: 1px solid rgba(68, 217, 255, 0.25);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.08), transparent 34%, rgba(255, 49, 95, 0.1)),
    linear-gradient(180deg, rgba(10, 21, 41, 0.96), rgba(3, 7, 17, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 38px rgba(68, 217, 255, 0.06),
    0 0 34px rgba(68, 217, 255, 0.08);
}

.console-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-name {
  margin: 12px 0 0;
  color: var(--cyan);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-shadow: 0 0 24px rgba(68, 217, 255, 0.32);
}

.radio-console audio {
  display: none;
}

.equalizer-panel {
  position: relative;
  height: 156px;
  overflow: hidden;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 24% 38%, rgba(68, 217, 255, 0.18), transparent 24%),
    radial-gradient(circle at 78% 55%, rgba(255, 49, 95, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(2, 8, 18, 0.94), rgba(2, 4, 11, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 44px rgba(68, 217, 255, 0.07),
    0 0 24px rgba(255, 49, 95, 0.08);
}

.equalizer-panel::before,
.equalizer-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.equalizer-panel::before {
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 49, 95, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.34;
}

.equalizer-panel::after {
  background:
    linear-gradient(90deg, transparent, rgba(68, 217, 255, 0.18), transparent),
    linear-gradient(180deg, transparent 50%, rgba(255, 49, 95, 0.1) 51%, transparent 53%);
  opacity: 0.6;
  mix-blend-mode: screen;
}

.equalizer-panel[data-state="playing"] {
  border-color: rgba(68, 217, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 52px rgba(68, 217, 255, 0.1),
    0 0 30px rgba(68, 217, 255, 0.14),
    0 0 34px rgba(255, 49, 95, 0.1);
}

.equalizer-panel canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.live-controls {
  display: grid;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.12), rgba(255, 49, 95, 0.12)),
    rgba(2, 5, 13, 0.78);
  box-shadow: inset 0 0 22px rgba(68, 217, 255, 0.05);
}

.voice-unlock {
  min-height: 36px;
  color: var(--cyan);
  border-color: rgba(68, 217, 255, 0.34);
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.12), rgba(255, 49, 95, 0.08)),
    rgba(2, 5, 13, 0.86);
}

.live-toggle {
  position: relative;
  min-height: 66px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(68, 217, 255, 0.46);
  border-radius: 10px;
  color: #eaffff;
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.24), rgba(255, 49, 95, 0.14)),
    rgba(5, 12, 25, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 26px rgba(68, 217, 255, 0.18);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 2vw, 1.36rem);
}

.live-toggle::before,
.live-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.live-toggle::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0.36;
  transform: translateX(-100%);
  animation: controlSweep 3.6s linear infinite;
}

.live-toggle::after {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  box-shadow: inset 0 0 24px rgba(68, 217, 255, 0.08);
}

.live-toggle span {
  position: relative;
  z-index: 1;
}

.live-toggle[data-state="connecting"] {
  color: #fff4d0;
  border-color: rgba(255, 211, 110, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 211, 110, 0.24), rgba(68, 217, 255, 0.16)),
    rgba(10, 14, 23, 0.96);
  box-shadow: 0 0 28px rgba(255, 211, 110, 0.14), inset 0 0 24px rgba(255, 211, 110, 0.06);
}

.live-toggle[data-state="playing"] {
  color: #fff5f7;
  border-color: rgba(255, 49, 95, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 49, 95, 0.34), rgba(68, 217, 255, 0.14)),
    rgba(16, 6, 17, 0.96);
  box-shadow: 0 0 34px rgba(255, 49, 95, 0.2), inset 0 0 26px rgba(255, 49, 95, 0.07);
}

.live-toggle[data-state="error"] {
  color: #ffe8ed;
  border-color: rgba(255, 49, 95, 0.75);
  background:
    linear-gradient(135deg, rgba(255, 49, 95, 0.38), rgba(255, 211, 110, 0.12)),
    rgba(18, 4, 13, 0.98);
}

@keyframes controlSweep {
  to {
    transform: translateX(100%);
  }
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.08), rgba(255, 49, 95, 0.06)),
    rgba(3, 7, 17, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-strip strong {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.status-value {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 8px rgba(159, 176, 197, 0.28);
}

.status-dot[data-state="live"] {
  background: var(--green);
  box-shadow: 0 0 9px rgba(124, 247, 161, 0.62), 0 0 16px rgba(124, 247, 161, 0.2);
  animation: livePulse 2.1s ease-in-out infinite;
}

.status-dot[data-state="connecting"] {
  background: var(--amber);
  box-shadow: 0 0 9px rgba(255, 211, 110, 0.56), 0 0 16px rgba(255, 211, 110, 0.18);
  animation: livePulse 2.4s ease-in-out infinite;
}

.status-dot[data-state="offline"] {
  background: var(--muted);
  box-shadow: 0 0 8px rgba(159, 176, 197, 0.22);
}

.status-dot[data-state="error"] {
  background: var(--red);
  box-shadow: 0 0 9px rgba(255, 49, 95, 0.62), 0 0 16px rgba(255, 49, 95, 0.18);
}

@keyframes livePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.76;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.chat-panel {
  min-height: clamp(540px, 68vh, 700px);
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto auto;
  padding: clamp(14px, 1.5vw, 20px);
  border-color: rgba(255, 49, 95, 0.22);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h2,
.tool-block h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 4px;
}

.message-list,
.compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.message {
  padding: 12px;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 10, 22, 0.76);
  box-shadow: inset 3px 0 0 rgba(68, 217, 255, 0.25);
}

.message.announcement {
  border-color: rgba(255, 49, 95, 0.55);
  background: rgba(255, 49, 95, 0.1);
  box-shadow: inset 3px 0 0 rgba(255, 49, 95, 0.65), 0 0 24px rgba(255, 49, 95, 0.12);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.message-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.reply-action,
.icon-button,
.emoji-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 217, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 16, 31, 0.74);
  color: var(--muted);
}

.reply-action {
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.reply-action:hover,
.icon-button:hover,
.emoji-bar button:hover {
  color: var(--text);
  border-color: rgba(68, 217, 255, 0.44);
  box-shadow: 0 0 14px rgba(68, 217, 255, 0.12);
}

.moderation-action {
  border-color: rgba(68, 217, 255, 0.28);
  color: var(--cyan);
}

.moderation-action.danger {
  border-color: rgba(255, 49, 95, 0.42);
  color: #ff9cad;
}

.message-author {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.message-author strong,
.compact-list strong {
  overflow-wrap: anywhere;
}

.badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(68, 217, 255, 0.32);
  color: var(--cyan);
  font-size: 0.7rem;
}

.rank-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid rgba(255, 49, 95, 0.24);
  border-radius: 999px;
  color: #ffd9e1;
  background: linear-gradient(90deg, rgba(68, 217, 255, 0.08), rgba(255, 49, 95, 0.1));
  font-size: 0.72rem;
  box-shadow: 0 0 12px rgba(255, 49, 95, 0.08);
}

button.rank-badge {
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
}

button.rank-badge:hover,
button.rank-badge:focus-visible {
  color: var(--text);
  border-color: rgba(68, 217, 255, 0.48);
  box-shadow:
    0 0 14px rgba(68, 217, 255, 0.16),
    0 0 18px rgba(255, 49, 95, 0.08);
}

.rank-badge[data-rank="user"] {
  border-color: rgba(159, 176, 197, 0.28);
  color: #d8e2ef;
}

.rank-badge[data-rank="pro"] {
  border-color: rgba(68, 217, 255, 0.36);
  color: var(--cyan);
}

.rank-badge[data-rank="genius"] {
  border-color: rgba(51, 123, 255, 0.42);
  color: #9fbfff;
}

.rank-badge[data-rank="master"] {
  border-color: rgba(255, 49, 95, 0.46);
  color: #ff9cad;
}

.rank-badge[data-rank="maestro"] {
  border-color: rgba(255, 211, 110, 0.48);
  color: #ffe0a0;
  box-shadow: 0 0 14px rgba(255, 211, 110, 0.12);
}

.badge.dj,
.badge.admin {
  color: var(--amber);
  border-color: rgba(255, 211, 110, 0.55);
}

.message-body {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-reply-preview,
.reply-preview {
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-left-color: rgba(255, 49, 95, 0.62);
  border-radius: 8px;
  background: rgba(68, 217, 255, 0.06);
}

.message-reply-preview {
  margin: 0 0 9px;
  padding: 8px 10px;
}

.message-reply-preview strong,
.reply-preview strong {
  display: block;
  color: var(--cyan);
  font-size: 0.78rem;
}

.message-reply-preview p,
.reply-preview p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.chat-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
}

.emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.emoji-bar button,
.icon-button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 8px;
}

.composer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.composer-tools {
  display: grid;
  grid-template-rows: repeat(2, minmax(23px, 1fr));
  gap: 6px;
  min-height: 48px;
  align-self: stretch;
}

.composer-tools .icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 0;
  padding: 0;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.12), rgba(255, 49, 95, 0.05)),
    rgba(3, 8, 18, 0.78);
  font-size: 0.76rem;
  line-height: 1;
  box-shadow: inset 0 0 12px rgba(68, 217, 255, 0.04);
}

.composer-tools .emoji-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.composer-tools .image-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(68, 217, 255, 0.24);
  border-radius: 8px;
  background: rgba(2, 5, 13, 0.9);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 48px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(68, 217, 255, 0.16);
  outline: none;
}

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 84px;
  padding: 0 14px;
  border: 1px solid rgba(68, 217, 255, 0.25);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(8, 16, 31, 0.82);
}

.button-primary {
  color: #021018;
  border-color: var(--cyan);
  background: linear-gradient(180deg, #75e8ff, var(--cyan));
  box-shadow: 0 0 18px rgba(68, 217, 255, 0.22);
}

.button-ghost {
  background: transparent;
}

.telegram-button {
  color: var(--text);
  border-color: rgba(255, 49, 95, 0.48);
  background: linear-gradient(90deg, rgba(68, 217, 255, 0.16), rgba(255, 49, 95, 0.22)), rgba(8, 16, 31, 0.88);
  box-shadow: 0 0 18px rgba(68, 217, 255, 0.14), 0 0 18px rgba(255, 49, 95, 0.14);
}

.login-button {
  gap: 8px;
  border-color: rgba(68, 217, 255, 0.34);
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.12), rgba(255, 49, 95, 0.1)),
    rgba(5, 12, 25, 0.82);
}

.login-button img {
  width: 17px;
  height: 17px;
  filter: drop-shadow(0 0 8px rgba(68, 217, 255, 0.42));
}

.session-inline-notice {
  width: 100%;
  margin: 2px 0 0;
  color: #ffb7c5;
  font-size: 0.78rem;
  line-height: 1.35;
}

.button-warn {
  color: #150f02;
  border-color: var(--amber);
  background: var(--amber);
}

.button-danger {
  color: #1b0609;
  border-color: var(--red);
  background: var(--red);
}

.button:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.notice,
.microcopy {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--amber);
  overflow-wrap: anywhere;
}

.microcopy {
  color: var(--muted);
  font-size: 0.9rem;
}

.control-panel {
  margin-top: 20px;
  padding: 18px;
}

.admin-tabs,
.admin-search-row,
.admin-history-filters,
.admin-history-pager {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-tabs {
  margin: 0 0 14px;
}

.admin-tabs button[aria-selected="true"] {
  color: var(--text);
  border-color: rgba(68, 217, 255, 0.48);
  background: rgba(68, 217, 255, 0.1);
  box-shadow: 0 0 18px rgba(68, 217, 255, 0.14);
}

.admin-search-row,
.admin-history-filters {
  margin: 10px 0 12px;
}

.admin-search-row input,
.admin-history-filters input,
.admin-history-filters select {
  flex: 1 1 190px;
  min-width: 0;
  min-height: 38px;
}

.admin-chat-history {
  grid-column: 1 / -1;
}

.chat-history-list {
  max-height: min(62vh, 620px);
}

.events-list {
  max-height: min(54vh, 420px);
}

.admin-history-pager {
  justify-content: flex-end;
  margin-top: 10px;
}

.deck-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-tab-panel {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
}

.admin-tab-panel > .tool-block {
  grid-column: span 3;
  min-width: 0;
}

.admin-tab-panel > .span-2,
.admin-tab-panel > .admin-chat-history {
  grid-column: 1 / -1;
}

.on-air-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.on-air-card {
  display: grid;
  gap: 14px;
}

.on-air-state {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  text-shadow: 0 0 20px rgba(68, 217, 255, 0.22);
}

.on-air-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.on-air-metrics span {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 7, 17, 0.56);
}

.on-air-metrics small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.on-air-metrics strong {
  color: var(--cyan);
  font-size: 1rem;
}

.on-air-actions {
  justify-content: flex-start;
}

.voice-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.voice-disabled-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 211, 110, 0.24);
  border-radius: 9px;
  color: var(--amber);
  background: rgba(20, 14, 4, 0.5);
}

.voice-panel-head,
.voice-control-grid,
.voice-slider-row,
.rank-option-list {
  display: flex;
  gap: 10px;
}

.voice-panel-head {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.voice-control-grid {
  align-items: end;
  flex-wrap: wrap;
}

.voice-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-status-pill {
  display: grid;
  gap: 2px;
  min-width: 126px;
  padding: 8px 10px;
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 9px;
  background: rgba(2, 7, 18, 0.68);
}

.voice-status-pill small {
  color: var(--muted);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.voice-status-pill strong {
  color: var(--cyan);
  font-size: 0.82rem;
}

.voice-status-pill strong[data-state="ok"] {
  color: #b9ffd1;
}

.voice-status-pill strong[data-state="warning"] {
  color: var(--amber);
}

.voice-status-pill strong[data-state="failed"] {
  color: #ff9cad;
}

.voice-signal-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  font-size: 0.7rem;
  color: var(--muted);
}

.voice-signal-strip span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(68, 217, 255, 0.14);
  border-radius: 8px;
  background: rgba(2, 7, 18, 0.46);
}

.voice-signal-strip strong {
  color: #dff9ff;
  font-size: 0.78rem;
}

.voice-warning {
  min-height: 1em;
}

.voice-warning[data-state="warning"] {
  color: var(--amber);
}

.voice-warning[data-state="failed"] {
  color: #ff9cad;
}

.voice-warning[data-state="ok"] {
  color: #b9ffd1;
}

.voice-meter {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.08), rgba(255, 49, 95, 0.08)),
    rgba(2, 7, 18, 0.78);
}

.voice-meter span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0.02);
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, #7cffbd, var(--cyan), #ff7aaa);
  box-shadow: 0 0 16px rgba(68, 217, 255, 0.22);
  transition: transform 90ms linear;
}

.voice-debug {
  border: 1px solid rgba(68, 217, 255, 0.14);
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(2, 7, 18, 0.48);
  color: var(--muted);
  font-size: 0.78rem;
}

.voice-debug summary {
  cursor: pointer;
  color: var(--cyan);
}

.voice-debug dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 12px;
  margin: 9px 0 0;
}

.voice-debug div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.voice-debug dt,
.voice-debug dd {
  margin: 0;
}

.voice-listener-chip {
  color: var(--cyan);
  border-color: rgba(68, 217, 255, 0.28);
}

.voice-listener-chip[data-state="connected"] {
  color: #b9ffd1;
  border-color: rgba(35, 255, 126, 0.34);
}

.voice-listener-chip[data-state="blocked"],
.voice-listener-chip[data-state="connecting"] {
  color: var(--amber);
  border-color: rgba(255, 211, 110, 0.34);
}

.voice-listener-chip[data-state="failed"] {
  color: #ff9cad;
  border-color: rgba(255, 49, 95, 0.42);
}

.voice-control-grid label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
  color: var(--muted);
  font-size: 0.82rem;
}

.voice-control-grid select,
.voice-control-grid input[type="range"] {
  width: 100%;
}

.voice-slider-row {
  align-items: center;
}

.voice-slider-row output {
  min-width: 42px;
  color: var(--cyan);
  font-weight: 700;
  text-align: right;
}

.voice-talk-button[data-state="talking"] {
  border-color: rgba(35, 255, 126, 0.42);
  color: #b9ffd1;
  box-shadow:
    0 0 22px rgba(35, 255, 126, 0.16),
    inset 0 0 18px rgba(35, 255, 126, 0.08);
}

.rank-option-list {
  flex-wrap: wrap;
  margin: 14px 0 4px;
}

.rank-option-list button {
  min-height: 34px;
}

.span-2 {
  grid-column: span 2;
}

.tool-block {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 10px;
  background: rgba(4, 8, 18, 0.72);
  padding: 14px;
}

.compact-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow: auto;
}

.compact-list li {
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: rgba(2, 5, 13, 0.56);
  overflow-wrap: anywhere;
}

.compact-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mini-button {
  min-height: 30px;
  min-width: 58px;
  padding: 0 9px;
  font-size: 0.82rem;
}

.rank-select {
  min-height: 30px;
  max-width: 150px;
  border: 1px solid rgba(68, 217, 255, 0.24);
  border-radius: 8px;
  background: rgba(5, 12, 25, 0.92);
  color: var(--text);
  font-size: 0.82rem;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
}

.toggle-line input {
  width: auto;
}

.users-list strong {
  color: var(--text);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-telegram-button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  border-color: rgba(68, 217, 255, 0.28);
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.1), rgba(255, 49, 95, 0.12)),
    rgba(4, 10, 22, 0.58);
  box-shadow: inset 0 0 14px rgba(68, 217, 255, 0.04), 0 0 12px rgba(255, 49, 95, 0.1);
}

.auth-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  color: var(--text);
  padding: 0;
}

.auth-dialog[open] {
  display: grid;
}

.auth-dialog::backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.auth-form {
  padding: 18px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.auth-body {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.delete-preview-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 10px;
  background: rgba(7, 14, 30, 0.66);
}

.delete-preview-box small,
.delete-warning {
  color: var(--muted);
}

.delete-preview-box p {
  margin: 6px 0 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.delete-warning {
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.danger-ghost {
  border-color: rgba(255, 49, 95, 0.45);
  color: #ff9cad;
}

.broadcast-timeline {
  margin-top: 18px;
}

.timeline-stage-top {
  margin-top: 16px;
}

.timeline-heading,
.timeline-toolbar,
.timeline-workbench,
.search-row,
.source-browser-head,
.source-search-row,
.source-card-actions,
.source-tabs,
.timeline-block-actions {
  display: flex;
  gap: 10px;
}

.timeline-heading,
.timeline-toolbar {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.timeline-save-status {
  padding: 6px 10px;
  border: 1px solid rgba(68, 217, 255, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(4, 10, 22, 0.68);
  font-size: 0.82rem;
}

.timeline-helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.timeline-live-chip,
.timeline-continuity-chip {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(68, 217, 255, 0.22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.68);
  font-size: 0.78rem;
}

.timeline-live-chip[data-state="on"],
.timeline-continuity-chip[data-state="ok"] {
  color: var(--green);
  border-color: rgba(124, 247, 161, 0.3);
  box-shadow: 0 0 18px rgba(124, 247, 161, 0.08);
}

.timeline-live-chip[data-state="paused"],
.timeline-continuity-chip[data-state="gap"] {
  color: var(--amber);
  border-color: rgba(255, 207, 100, 0.32);
}

.timeline-continuity-chip[data-state="overlap"] {
  color: var(--red);
  border-color: rgba(255, 49, 95, 0.36);
}

.segmented-controls,
.source-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-workbench {
  align-items: stretch;
  margin-top: 14px;
}

.timeline-source-panel {
  flex: 0 0 min(340px, 100%);
  padding: 14px;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 11, 24, 0.58);
}

.source-tab {
  border: 1px solid rgba(68, 217, 255, 0.24);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(2, 4, 11, 0.62);
}

.source-tab.active {
  color: var(--text);
  border-color: rgba(255, 49, 95, 0.52);
  box-shadow: 0 0 20px rgba(255, 49, 95, 0.16);
}

.search-row {
  align-items: center;
}

.search-row input {
  min-width: 0;
  flex: 1;
}

.timeline-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.timeline-result-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(68, 217, 255, 0.16);
  border-radius: 10px;
  background: rgba(3, 7, 17, 0.72);
}

.timeline-result-card img {
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.timeline-result-card strong,
.timeline-result-card small,
.timeline-block strong,
.timeline-block small {
  display: block;
}

.source-link,
.drag-handle {
  color: var(--cyan);
  font-size: 0.82rem;
}

.timeline-stage {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(68, 217, 255, 0.5) rgba(2, 6, 16, 0.82);
  overscroll-behavior-x: contain;
  cursor: grab;
}

.timeline-stage::-webkit-scrollbar {
  height: 9px;
}

.timeline-stage::-webkit-scrollbar-track {
  background: rgba(2, 6, 16, 0.82);
  border-radius: 999px;
}

.timeline-stage::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(68, 217, 255, 0.78), rgba(255, 49, 95, 0.72));
  box-shadow: 0 0 18px rgba(68, 217, 255, 0.22);
}

.timeline-stage.is-panning {
  cursor: grabbing;
}

.timeline-ruler {
  display: grid;
  grid-template-columns: repeat(9, minmax(96px, 1fr));
  min-width: 820px;
  color: var(--muted);
  font-size: 0.78rem;
}

.timeline-canvas {
  position: relative;
  min-width: 820px;
  min-height: 260px;
  margin-top: 8px;
  border: 1px solid rgba(68, 217, 255, 0.22);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(68, 217, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 49, 95, 0.06) 1px, transparent 1px),
    rgba(2, 6, 16, 0.72);
  background-size: 72px 100%, 100% 44px, auto;
  touch-action: pan-y;
}

.timeline-canvas.drop-active {
  border-color: rgba(68, 217, 255, 0.58);
  box-shadow: inset 0 0 40px rgba(68, 217, 255, 0.12), 0 0 32px rgba(68, 217, 255, 0.12);
}

.timeline-empty-state {
  position: absolute;
  inset: 52px 28px 28px;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px dashed rgba(68, 217, 255, 0.26);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(68, 217, 255, 0.1), transparent 42%),
    rgba(3, 8, 18, 0.42);
  pointer-events: none;
}

.timeline-empty-state strong {
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-shadow: 0 0 18px rgba(68, 217, 255, 0.18);
}

.timeline-empty-state span {
  max-width: 420px;
  font-size: 0.9rem;
}

.timeline-drop-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  opacity: 0;
  background: linear-gradient(180deg, var(--cyan), var(--red));
  box-shadow: 0 0 22px rgba(68, 217, 255, 0.58);
  pointer-events: none;
  z-index: 3;
}

.timeline-drop-indicator.active {
  opacity: 1;
}

.timeline-current-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
  box-shadow: 0 0 20px rgba(124, 247, 161, 0.5);
  z-index: 2;
}

.timeline-current-line::after {
  content: attr(data-label);
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(124, 247, 161, 0.35);
  border-radius: 999px;
  color: var(--green);
  background: rgba(2, 8, 14, 0.82);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(124, 247, 161, 0.15);
}

.timeline-block {
  position: absolute;
  top: 34px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 138px;
  padding: 12px;
  border: 1px solid rgba(68, 217, 255, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.16), rgba(255, 49, 95, 0.12)),
    rgba(6, 13, 28, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), inset 0 0 24px rgba(68, 217, 255, 0.08);
}

.timeline-block strong,
.timeline-block small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-block[data-state="active"] {
  border-color: rgba(124, 247, 161, 0.54);
  box-shadow: inset 0 0 18px rgba(124, 247, 161, 0.08), 0 0 30px rgba(124, 247, 161, 0.16);
}

.timeline-block[data-state="past"] {
  opacity: 0.52;
  filter: saturate(0.7);
}

.timeline-block[data-state="future"] {
  opacity: 0.96;
}

.timeline-block.compact {
  min-height: 62px;
  padding: 8px;
}

.timeline-block.compact small,
.timeline-block.compact .timeline-source-state,
.timeline-block.compact .timeline-block-actions {
  display: none;
}

.source-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(68, 217, 255, 0.25);
  color: var(--cyan);
  font-size: 0.72rem;
}

.source-badge.youtube {
  border-color: rgba(255, 49, 95, 0.34);
  color: #ff9cad;
}

.source-badge.uploaded {
  border-color: rgba(68, 217, 255, 0.34);
  color: #a8ecff;
}

.timeline-warning {
  display: block;
  margin-top: 6px;
  color: var(--amber);
  font-size: 0.78rem;
}

.timeline-source-state,
.source-capability-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-source-state {
  margin-top: 8px;
}

.timeline-source-state span,
.source-capability-line span {
  width: fit-content;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(2, 6, 16, 0.66);
  font-size: 0.68rem;
}

.timeline-source-state span {
  padding: 3px 7px;
}

.source-capability-line {
  margin-top: 2px;
}

.source-capability-line span {
  padding: 5px 8px;
}

.timeline-block-actions {
  flex-wrap: wrap;
  margin-top: 10px;
}

.timeline-block-actions button {
  border: 1px solid rgba(68, 217, 255, 0.2);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--muted);
  background: rgba(2, 4, 11, 0.56);
  font-size: 0.72rem;
}

.broadcast-timeline[data-readonly="true"] .timeline-canvas {
  opacity: 0.78;
}

.source-browser-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.3fr) minmax(320px, 0.7fr);
  gap: clamp(14px, 2vw, 20px);
  margin-top: 20px;
}

.source-browser {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(68, 217, 255, 0.14), transparent 34%),
    linear-gradient(90deg, rgba(68, 217, 255, 0.04) 1px, transparent 1px),
    linear-gradient(145deg, rgba(6, 14, 30, 0.88), rgba(3, 7, 17, 0.92));
  background-size: auto, 34px 34px, auto;
  box-shadow: inset 0 0 28px rgba(68, 217, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.28);
}

.source-browser-head,
.source-search-row,
.source-card-actions {
  align-items: center;
}

.source-browser-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: space-between;
}

.source-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid rgba(68, 217, 255, 0.26);
  color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.2), rgba(255, 49, 95, 0.08)),
    rgba(2, 6, 16, 0.82);
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(68, 217, 255, 0.13);
}

.source-logo-youtube {
  border-color: rgba(255, 49, 95, 0.38);
  color: #ffd9df;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 49, 95, 0.28), rgba(68, 217, 255, 0.1)),
    rgba(5, 8, 18, 0.9);
  box-shadow:
    0 0 24px rgba(255, 49, 95, 0.2),
    inset 0 0 18px rgba(68, 217, 255, 0.08);
}

.source-logo-upload {
  border-color: rgba(68, 217, 255, 0.36);
  color: var(--text);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.15), transparent 30%),
    linear-gradient(135deg, rgba(68, 217, 255, 0.24), rgba(255, 49, 95, 0.16)),
    rgba(5, 8, 18, 0.9);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.youtube-icon {
  width: 28px;
  height: 20px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255, 49, 95, 0.42));
}

.youtube-icon-shell {
  fill: rgba(255, 49, 95, 0.92);
}

.youtube-icon-play {
  fill: rgba(255, 255, 255, 0.94);
}

.source-browser h4 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.42rem);
}

.source-search-row {
  margin-top: 6px;
}

.source-search-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.source-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.source-filter-chips button {
  min-height: 30px;
  border: 1px solid rgba(68, 217, 255, 0.22);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.72);
  font-size: 0.78rem;
  cursor: pointer;
}

.source-filter-chips button:hover {
  color: var(--text);
  border-color: rgba(68, 217, 255, 0.44);
  box-shadow: 0 0 18px rgba(68, 217, 255, 0.12);
}

.source-results {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  margin-top: 2px;
  max-height: min(52vh, 500px);
  overflow: auto;
  padding-right: 4px;
}

.upload-browser .source-results {
  max-height: min(40vh, 380px);
}

.audio-upload-zone {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 132px;
  padding: 16px;
  border: 1px dashed rgba(68, 217, 255, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.1), rgba(255, 49, 95, 0.06)),
    rgba(3, 8, 18, 0.62);
  color: var(--muted);
}

.audio-upload-zone strong {
  color: var(--text);
}

.audio-upload-zone.drag-over,
.audio-upload-zone:focus-visible {
  outline: none;
  border-color: rgba(124, 247, 161, 0.54);
  box-shadow: 0 0 24px rgba(124, 247, 161, 0.13);
}

.audio-upload-zone .button {
  width: fit-content;
}

.source-result-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px 14px;
  padding: 12px;
  border: 1px solid rgba(68, 217, 255, 0.16);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.1), rgba(255, 49, 95, 0.06)),
    rgba(2, 6, 16, 0.78);
  cursor: grab;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.source-result-card:hover {
  border-color: rgba(68, 217, 255, 0.4);
  box-shadow: 0 0 28px rgba(68, 217, 255, 0.12);
  transform: translateY(-1px);
}

.source-result-card.dragging {
  opacity: 0.7;
  border-color: rgba(124, 247, 161, 0.62);
  box-shadow: 0 0 34px rgba(124, 247, 161, 0.18);
  transform: scale(0.985);
}

.source-result-card.selected {
  border-color: rgba(255, 49, 95, 0.46);
  box-shadow: 0 0 24px rgba(255, 49, 95, 0.12), 0 0 24px rgba(68, 217, 255, 0.1);
}

.source-artwork {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(68, 217, 255, 0.24), rgba(255, 49, 95, 0.2)),
    rgba(4, 10, 22, 0.86);
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.05);
}

.source-artwork[data-gradient="deep-blue"] {
  background: linear-gradient(135deg, #031026, #0b38a1 54%, #44d9ff);
}

.source-artwork[data-gradient="blue-pink"] {
  background: linear-gradient(135deg, #07152d, #2449ff 42%, #ff3c8f);
}

.source-artwork[data-gradient="red-pink"] {
  background: linear-gradient(135deg, #17030a, #ff315f 48%, #ff7ac8);
}

.source-artwork[data-gradient="cyan-blue"] {
  background: linear-gradient(135deg, #021018, #00a6ff 42%, #44d9ff);
}

.source-artwork[data-gradient="purple-red"] {
  background: linear-gradient(135deg, #12051f, #7a3cff 42%, #ff315f);
}

.source-artwork[data-gradient="rain-cyan"] {
  background: linear-gradient(135deg, #061224, #1a5574 42%, #44d9ff);
}

.source-artwork[data-gradient="red-cyan"] {
  background: linear-gradient(135deg, #ff315f, #15162c 48%, #44d9ff);
}

.source-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-card-body {
  min-width: 0;
}

.source-card-body strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.source-card-body small,
.drag-hint {
  display: block;
  color: var(--muted);
}

.drag-hint {
  margin-top: 7px;
  color: var(--cyan);
  font-size: 0.78rem;
}

.source-card-actions {
  grid-column: 2 / 4;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.source-card-actions .mini-button {
  margin-left: 0;
}

.source-result-card .drag-handle {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.65);
  font-size: 0.75rem;
}

.source-browser-empty {
  grid-column: 1 / -1;
  min-height: 104px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed rgba(68, 217, 255, 0.22);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.5);
  text-align: center;
  padding: 18px;
}

.source-browser-empty strong {
  color: var(--text);
}

.source-browser-empty span {
  max-width: 360px;
  font-size: 0.9rem;
}

.dev-login {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(68, 217, 255, 0.18);
  border-radius: 10px;
  background: rgba(3, 7, 17, 0.62);
}

.dev-login .button-row {
  justify-content: flex-start;
}

.telegram-widget-launch {
  position: fixed;
  top: -280px;
  left: 12px;
  width: 280px;
  min-height: 64px;
  opacity: 0;
  z-index: -1;
  overflow: hidden;
}

.dev-login-launch {
  max-width: min(520px, calc(100vw - 32px));
  margin: 18px auto 0;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.mode-button {
  min-height: 38px;
  border: 1px solid rgba(68, 217, 255, 0.24);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.mode-button.active {
  color: #021018;
  border-color: var(--cyan);
  background: var(--cyan);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .station-panel,
  .chat-panel {
    min-height: auto;
  }

  .deck-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-workbench {
    flex-direction: column;
  }

  .timeline-source-panel {
    flex-basis: auto;
  }

  .source-browser-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(calc(100% - 24px), 1440px);
    padding: 14px 0;
  }

  .topbar,
  .panel-heading,
  .console-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .session-area {
    justify-content: flex-start;
    width: 100%;
  }

  .station-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "avatar"
      "copy"
      "console";
    padding: clamp(16px, 5vw, 20px);
  }

  .hero-badge {
    justify-self: start;
    width: 118px;
    height: 118px;
  }

  .station-copy h1 {
    font-size: clamp(2.3rem, 12vw, 3.2rem);
  }

  .chat-form,
  .on-air-grid,
  .on-air-metrics,
  .deck-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .timeline-toolbar,
  .search-row,
  .source-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .source-results {
    grid-template-columns: 1fr;
  }

  .source-result-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .source-artwork {
    width: 86px;
    height: 86px;
  }

  .source-browser-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .source-browser-head .source-badge {
    grid-column: 1 / -1;
  }

  .composer-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .composer-row .button-primary {
    grid-column: 1 / -1;
  }

  .equalizer-panel {
    height: 126px;
  }

  .live-toggle {
    min-height: 58px;
  }

  .span-2 {
    grid-column: auto;
  }
}
