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

html {
  height: 100%;
}

body {
  height: 100%;
  min-height: 0;

  background:
    radial-gradient(circle at top left, rgba(0,255,255,.08), transparent 30%),
    radial-gradient(circle at top right, rgba(255,0,255,.08), transparent 30%),
    var(--jlv-bg-deep, #0a0f16);

  color: var(--jlv-text, #e8f7ff);

  font-family: var(--jlv-font, "Segoe UI", sans-serif);

  overflow: hidden;
}

.jlv-dashboard,
.dashboard-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.jlv-header,
.top-bar {
  flex-shrink: 0;
  height: var(--jlv-header-height, 52px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 0 14px;

  border-bottom:
    1px solid rgba(0,255,255,.15);

  background:
    rgba(0,0,0,.35);

  backdrop-filter: blur(10px);
}

.header-brand-group {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand {
  flex-shrink: 0;
  font-size: 28px;

  font-weight: 800;

  letter-spacing: .08em;

  color: var(--jlv-neon-cyan, #00f0ff);
  white-space: nowrap;
}

.brand span {
  color: var(--jlv-neon-pink, #ff00cc);
}

.brand-signature-wrap {
  display: flex;
  align-items: flex-end;
  flex-shrink: 1;
  min-width: 0;
  margin-left: 0;
  padding-bottom: 4px;
  line-height: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.brand-signature-wrap::before,
.brand-signature-wrap::after {
  content: none;
  display: none;
}

.brand-signature-wrap.is-hidden {
  display: none;
}

/* Creator signature PNG (by + Jane Suk + mark) — quiet signed accent */
.brand-signature {
  display: block;
  flex-shrink: 1;
  min-width: 0;
  height: clamp(22px, 2.35vw, 26px);
  width: auto;
  max-width: min(128px, 18vw);
  max-height: 26px;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0.66;
  pointer-events: none;
  user-select: none;
  image-rendering: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  mix-blend-mode: normal;
  filter: drop-shadow(0 0 2px rgba(255, 0, 200, 0.07));
}

.header-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
}

.overlay-visible-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 4px 10px 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.overlay-visible-control.is-visible-on {
  border-color: rgba(0, 255, 153, 0.45);
  box-shadow: 0 0 12px rgba(0, 255, 153, 0.12);
}

.overlay-visible-control.is-visible-off {
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.88;
}

.overlay-visible-control__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 240, 255, 0.88);
  white-space: nowrap;
}

.overlay-visible-control__state {
  min-width: 2.2em;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
}

.overlay-visible-control__state.is-on {
  color: #9dffc8;
}

.overlay-visible-control__state.is-off {
  color: rgba(255, 255, 255, 0.45);
}

.overlay-visible-control__toggle {
  flex-shrink: 0;
}

.overlay-visible-control__toggle .floating-master-toggle__track {
  width: 38px;
  height: 20px;
}

.overlay-visible-control__toggle .floating-master-toggle__track::after {
  width: 16px;
  height: 16px;
}

/* Desktop overlay runtime (Phase 1) */
.jlv-runtime-control {
  gap: 8px;
  border-color: rgba(0, 255, 255, 0.22);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.04);
  cursor: pointer;
  user-select: none;
}

.jlv-runtime-control.is-busy {
  cursor: wait;
}

.jlv-runtime-control[data-runtime-toggle="off"] .jlv-runtime-control__toggle .floating-master-toggle__track {
  background: rgba(80, 80, 100, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.jlv-runtime-control[data-runtime-toggle="off"] .jlv-runtime-control__toggle .floating-master-toggle__track::after {
  transform: translateX(0);
  background: rgba(220, 220, 230, 0.95);
}

.jlv-runtime-control[data-runtime-toggle="on"] .jlv-runtime-control__toggle .floating-master-toggle__track {
  background: rgba(0, 220, 120, 0.35);
  border-color: rgba(0, 255, 160, 0.45);
  box-shadow:
    0 0 12px rgba(0, 255, 140, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.jlv-runtime-control[data-runtime-toggle="on"] .jlv-runtime-control__toggle .floating-master-toggle__track::after {
  transform: translateX(18px);
  background: #9dffc8;
}

.jlv-runtime-control.is-visible-on {
  border-color: rgba(0, 255, 153, 0.5);
  box-shadow:
    0 0 14px rgba(0, 255, 153, 0.18),
    0 0 24px rgba(0, 255, 255, 0.08);
}

.jlv-runtime-control.is-visible-off {
  border-color: rgba(0, 255, 255, 0.18);
  opacity: 0.92;
}

.jlv-runtime-control.is-busy:not([data-runtime-toggle="on"]) {
  border-color: rgba(255, 209, 102, 0.35);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.12);
}

.jlv-runtime-control.is-error {
  border-color: rgba(255, 120, 120, 0.4);
  box-shadow: 0 0 10px rgba(255, 100, 100, 0.12);
}

.jlv-runtime-control__toggle {
  flex-shrink: 0;
}

.jlv-runtime-control__input:disabled + .floating-master-toggle__track {
  opacity: 0.55;
  cursor: wait;
}

.jlv-runtime-status {
  min-width: 5.5rem;
  max-width: 11rem;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jlv-runtime-status.is-off {
  color: rgba(255, 255, 255, 0.42);
}

.jlv-runtime-status.is-on {
  color: #9dffc8;
  text-shadow: 0 0 10px rgba(76, 255, 154, 0.35);
}

.jlv-runtime-status.is-busy {
  color: #ffd166;
}

.jlv-runtime-status.is-error,
.jlv-runtime-status[data-state="error"] {
  color: #ff9b9b;
}

.jlv-runtime-status[data-state="live"] {
  color: #9dffc8;
}

.jlv-runtime-status[data-state="detecting"],
.jlv-runtime-status[data-state="launching"],
.jlv-runtime-status[data-state="verifying"],
.jlv-runtime-status[data-state="installing"] {
  color: rgba(180, 240, 255, 0.88);
}

.jlv-runtime-install-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.jlv-runtime-install-modal[hidden] {
  display: none !important;
}

.jlv-runtime-install-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.jlv-runtime-install-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 22px 24px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 255, 0.28);
  background: linear-gradient(160deg, rgba(8, 18, 34, 0.98), rgba(4, 10, 22, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: #e8f4ff;
}

.jlv-runtime-install__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.jlv-runtime-install__header h2 {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.jlv-runtime-install__badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 0, 204, 0.2);
  border: 1px solid rgba(255, 0, 204, 0.45);
  color: #ffb8ef;
}

.jlv-runtime-install__close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(220, 255, 255, 0.85);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jlv-runtime-install__close:hover {
  border-color: rgba(0, 255, 255, 0.38);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.jlv-runtime-install__lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(232, 244, 255, 0.88);
}

.jlv-runtime-install__features {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.6;
  color: #c8e8ff;
}

.jlv-runtime-install__obs {
  margin-bottom: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.jlv-runtime-install__obs-btn {
  width: 100%;
  margin-top: 8px;
}

.jlv-runtime-install__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.jlv-runtime-install__primary,
.jlv-runtime-install__cancel {
  flex: 1;
  min-width: 0;
}

.jlv-runtime-install__progress {
  margin: 14px 0 0;
  font-size: 12px;
  color: #ffd166;
}


.overlay-visible-control__toggle input:checked + .floating-master-toggle__track::after {
  transform: translateX(18px);
}

.ui-lang-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ui-lang-flag {
  position: absolute;
  left: 10px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 12px;
  border-radius: 1px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.ui-lang-flag-svg {
  display: block;
  width: 16px;
  height: 12px;
}

.ui-lang-select.ui-lang-select--flagged {
  padding-left: 32px;
}

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

.ui-lang-select {
  height: 30px;
  min-width: 52px;
  padding: 0 28px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: rgba(0, 12, 24, 0.65)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2300ffff' d='M1 1l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: #e8ffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ui-lang-select:hover,
.ui-lang-select:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.22);
}

.ui-lang-select option {
  color: #0b1220;
  background: #f4feff;
}

.jlv-header-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  position: static;
  inset: auto;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(180, 240, 255, 0.88);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.jlv-header-settings-btn__icon {
  display: block;
  font-size: 14px;
  line-height: 1;
  opacity: 0.9;
}

.jlv-header-settings-btn:hover,
.jlv-header-settings-btn:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 0.38);
  color: rgba(220, 255, 255, 0.95);
}

.jlv-header-settings-btn:hover .jlv-header-settings-btn__icon,
.jlv-header-settings-btn:focus .jlv-header-settings-btn__icon {
  opacity: 1;
}

/* Settings dialog — fixed overlay; must not affect dashboard layout */
body.jlv-settings-modal-open {
  overflow: hidden;
}

.jlv-settings-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 12000 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.jlv-settings-modal[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.jlv-settings-modal.is-open {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.jlv-settings-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.jlv-settings-modal.is-open .jlv-settings-modal__backdrop {
  animation: jlv-settings-backdrop-in 0.2s ease forwards;
}

.jlv-settings-modal__panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 600px;
  max-width: calc(100vw - 32px);
  max-height: min(85vh, 720px);
  height: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(10, 20, 34, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 1px rgba(0, 255, 255, 0.05),
    0 0 20px rgba(0, 255, 255, 0.08),
    0 20px 60px rgba(0, 255, 255, 0.15);
  pointer-events: auto;
  overflow: hidden;
}

.jlv-settings-modal.is-open .jlv-settings-modal__panel {
  animation: jlv-settings-panel-in 0.24s ease forwards;
}

@keyframes jlv-settings-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes jlv-settings-panel-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.jlv-settings-modal__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 16px 52px 12px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.14);
}

.jlv-settings-modal__title {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--jlv-neon-cyan, #00f0ff);
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.28);
}

.jlv-settings-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.jlv-settings-modal__close span {
  display: block;
  margin-top: -1px;
}

.jlv-settings-modal__body {
  flex: 0 1 auto;
  padding: 18px 24px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.jlv-settings-modal__intro {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(188, 218, 232, 0.82);
}

.jlv-settings-section {
  margin: 0;
}

.jlv-settings-section__title {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: rgba(0, 255, 255, 0.72);
  border: none;
}

.jlv-settings-field {
  margin-bottom: 16px;
}

.jlv-settings-field:last-of-type {
  margin-bottom: 12px;
}

.jlv-settings-field__label {
  display: block;
  margin-bottom: 5px;
}

.jlv-settings-modal .jlv-settings-modal__input,
.jlv-settings-modal .stream-input {
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  color: #e8f7ff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 7px;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.jlv-settings-modal select.jlv-settings-modal__input {
  padding-right: 30px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2300ffff' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.jlv-settings-modal .jlv-settings-modal__input:hover,
.jlv-settings-modal .stream-input:hover {
  border-color: rgba(0, 255, 255, 0.35);
}

.jlv-settings-modal .jlv-settings-modal__input:focus,
.jlv-settings-modal .stream-input:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 0.55);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.22);
}

.jlv-settings-modal .jlv-settings-modal__input::placeholder {
  color: rgba(160, 190, 210, 0.45);
}

.jlv-cloud-last-synced {
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 255, 255, 0.08);
  font-size: 11px;
  line-height: 1.4;
  color: rgba(150, 185, 205, 0.72);
}

.jlv-cloud-last-synced__label {
  margin-right: 6px;
}

.jlv-cloud-last-synced__value {
  color: rgba(210, 240, 255, 0.88);
}

.jlv-settings-modal__footer {
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(0, 255, 255, 0.12);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.jlv-settings-modal__btn {
  height: 32px;
  min-width: 5.5rem;
}

body.safe-mode .jlv-settings-modal__backdrop,
html.safe-mode-root body .jlv-settings-modal__backdrop {
  background: rgba(0, 0, 0, 0.75) !important;
}

body.safe-mode .jlv-settings-modal__panel,
html.safe-mode-root body .jlv-settings-modal__panel {
  background: rgba(10, 20, 34, 0.94) !important;
  box-shadow:
    0 0 1px rgba(0, 255, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.55) !important;
}

.viewer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: rgba(0, 12, 24, 0.55);
  box-shadow:
    0 0 12px rgba(0, 255, 255, 0.18),
    inset 0 0 12px rgba(0, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.viewer-badge.is-updating {
  transform: scale(1.02);
  box-shadow:
    0 0 14px rgba(0, 255, 255, 0.28),
    inset 0 0 12px rgba(0, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .viewer-badge,
  .viewer-badge.is-updating,
  .health-dot {
    transition: none;
    transform: none;
  }
}

.viewer-badge.is-stale {
  opacity: 0.72;
}

.viewer-badge-label {
  color: var(--jlv-neon-cyan, #00f0ff);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.viewer-badge-icon {
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.45));
}

.viewer-badge-count {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #e8ffff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.35);
  min-width: 2.5ch;
  text-align: right;
}

.conn-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;

  font-size: 12px;

  letter-spacing: .15em;

  color: rgba(255,255,255,.75);
}

@media (max-width: 900px) {
  .brand {
    font-size: 22px;
  }

  .brand-signature {
    height: clamp(20px, 3.8vw, 24px);
    max-height: 24px;
    max-width: min(112px, 18vw);
    opacity: 0.64;
  }

  .brand-signature-wrap {
    padding-bottom: 3px;
  }

  .header-brand-group {
    gap: 6px;
  }

  .top-bar {
    gap: 10px;
    padding: 0 12px;
  }
}

@media (max-width: 720px) {
  .header-status-group {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 6px;
  }

  .control-rail-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }

  .control-cockpit-tail .control-rail-right {
    justify-content: flex-start;
  }

  .control-rail-right .mode-toggle {
    border-left: none;
    padding-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .control-cockpit-tail .mode-toggle {
    width: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-brand-group {
    gap: 6px;
  }

  .brand {
    font-size: 18px;
    letter-spacing: 0.05em;
  }

  .brand-signature {
    height: 20px;
    max-height: 20px;
    max-width: min(88px, 40vw);
    opacity: 0.62;
  }

  .brand-signature-wrap {
    padding-bottom: 2px;
  }

  .conn-pill {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .ui-lang-select {
    min-width: 46px;
    height: 28px;
    font-size: 10px;
  }

  .viewer-badge {
    padding: 5px 9px;
    gap: 5px;
    font-size: 10px;
  }

  .viewer-badge-count {
    font-size: 11px;
  }
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.2);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.health-dot.ok {
  background: #00ff99;
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.55);
}

.health-dot.warn {
  background: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.45);
}

.health-dot.stale {
  background: #ff3366;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.conn-dot {
  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: #555;
}

.conn-dot.online {
  background: #00ff99;

  box-shadow:
    0 0 10px #00ff99;
}

/* Thin HUD session row — lightweight layer above cockpit */
.stream-connect-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.stream-connect-field {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 280px;
  position: relative;
}

.stream-connect-field:first-child {
  flex: 1 1 180px;
  max-width: 340px;
}

.stream-connect-field--session {
  flex: 0 1 200px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stream-session-label {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.62);
  line-height: 1.1;
}

.stream-session-hint {
  font-size: 9px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.38);
}

.dashboard-shell .stream-input {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 7px;
  border-color: rgba(0, 255, 255, 0.18);
}

.dashboard-shell .connect-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: 7px;
}

.dashboard-shell .connect-btn:hover {
  transform: none;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.22);
}

.conn-pill.status-auth-required #conn-dot {
  background: #ffb020;
  box-shadow: 0 0 8px rgba(255, 176, 32, 0.65);
}

.conn-pill.status-failed #conn-dot,
.conn-pill.status-auth-required #conn-label {
  color: #ffb86c;
}

.conn-pill.status-reconnecting #conn-label {
  color: #7fdfff;
}

.conn-pill.status-connected-no-events #conn-dot {
  background: #ff9f43;
  box-shadow: 0 0 8px rgba(255, 159, 67, 0.55);
}

.conn-pill.status-connected-no-events #conn-label {
  color: #ffbf66;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conn-pill.status-rate-limited #conn-dot {
  background: #ff5c7a;
  box-shadow: 0 0 8px rgba(255, 92, 122, 0.55);
}

.conn-pill.status-rate-limited #conn-label {
  color: #ff8fa3;
}

body.safe-mode,
html.safe-mode-root body {
  --safe-mode: 1;
}

body.safe-mode *,
html.safe-mode-root body * {
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation-iteration-count: 1 !important;
}

body.safe-mode *:not(.overlay-card):not(.feed-card):not(.removing),
html.safe-mode-root body *:not(.overlay-card):not(.feed-card):not(.removing) {
  animation-duration: 0.001s !important;
  transition-duration: 0.08s !important;
}

body.safe-mode .overlay-card.removing,
body.safe-mode .feed-card.removing {
  animation-duration: 80ms !important;
  transition-duration: 80ms !important;
}

body.safe-mode .feed-card,
body.safe-mode .overlay-card,
body.safe-mode .control-pod,
body.safe-mode .stream-input,
body.safe-mode .conn-pill {
  background-image: none !important;
}

body.safe-mode #jlv-overlay-diag-hud,
body.safe-mode #jlv-runtime-hud {
  animation: none !important;
}

.stream-input {
  width: 100%;
  height: 42px;

  background:
    rgba(0,0,0,.45);

  border:
    1px solid rgba(0,255,255,.25);

  border-radius: 10px;

  color: #ffffff;

  padding: 0 14px;

  font-size: 14px;

  outline: none;

  transition: .2s ease;
}

.stream-input:focus {
  border-color: #00ffff;

  box-shadow:
    0 0 12px rgba(0,255,255,.25);
}

.connect-btn {
  height: 42px;

  padding: 0 18px;

  border: none;

  border-radius: 10px;

  cursor: pointer;

  color: #041018;

  font-weight: 700;

  letter-spacing: .05em;

  background:
    linear-gradient(
      90deg,
      #00ffff,
      #00ff99
    );

  transition: .2s ease;
}

.connect-btn:hover {
  transform: translateY(-1px);

  box-shadow:
    0 0 18px rgba(0,255,255,.35);
}

/* Main content: two independent columns (chat ~65%, activity ~35%) */
.jlv-main,
.dashboard-content,
.main-grid {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 7fr) 10px minmax(0, 3fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "chat split activity";
  gap: 14px;
  padding: 14px;
  align-items: stretch;
  align-content: stretch;
}

.main-grid.is-resizing,
.main-grid.is-resizing .jlv-panel,
body.jlv-splitter-drag .main-grid .jlv-panel {
  transition: none !important;
}

.main-grid-splitter {
  position: relative;
  grid-area: split;
  align-self: stretch;
  justify-self: center;
  width: 10px;
  margin: 0 -2px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    rgba(0, 255, 255, 0.08) 0%,
    rgba(0, 255, 255, 0.3) 50%,
    rgba(180, 80, 255, 0.16) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.22),
    0 0 12px rgba(0, 255, 255, 0.1);
  cursor: col-resize;
  touch-action: none;
  padding: 0;
  z-index: 2;
}

.main-grid-splitter::before {
  content: "";
  position: absolute;
  inset: 10% 3px;
  border-radius: 2px;
  background: rgba(0, 255, 255, 0.52);
  opacity: 0.78;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.16);
}

.main-grid-splitter:hover,
.main-grid-splitter:focus-visible {
  background: linear-gradient(
    180deg,
    rgba(0, 255, 255, 0.12) 0%,
    rgba(0, 255, 255, 0.38) 50%,
    rgba(200, 100, 255, 0.22) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.34),
    0 0 16px rgba(0, 255, 255, 0.18);
  outline: none;
}

.main-grid-splitter:focus-visible {
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.4),
    0 0 0 3px rgba(0, 255, 255, 0.12);
}

body.jlv-splitter-drag,
body.jlv-splitter-drag .main-grid-splitter {
  cursor: col-resize;
  user-select: none;
}

.jlv-panel,
.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--jlv-border, rgba(0, 255, 255, 0.18));
  border-radius: var(--jlv-radius, 14px);
  overflow: hidden;
  background: var(--jlv-panel-bg, rgba(0, 0, 0, 0.25));
  backdrop-filter: var(--jlv-blur, blur(10px));
  contain: layout;
}

.panel-chat {
  grid-area: chat;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  contain: layout;
}

.panel-activity {
  grid-area: activity;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  contain: layout;
}

@media (max-width: 960px) {
  .dashboard-content,
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
    grid-template-areas:
      "chat"
      "activity";
  }

  .main-grid-splitter {
    display: none;
  }
}

.jlv-panel-header,
.panel-header {
  flex: 0 0 var(--jlv-panel-header-height, 48px);
  height: var(--jlv-panel-header-height, 48px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 14px;

  border-bottom:
    1px solid rgba(0,255,255,.12);
}

.panel-title {
  color: var(--jlv-neon-cyan, #00f0ff);

  font-weight: 700;

  letter-spacing: .12em;

  font-size: 13px;
}

.panel-count {
  color: rgba(255,255,255,.5);

  font-size: 12px;
}

.jlv-feed,
.feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;

  padding: 12px;

  display: flex;
  flex-direction: column;

  gap: 12px;
}

.jlv-card,
.feed-card {
  flex-shrink: 0;
  padding: 14px;

  border-radius: var(--jlv-radius-card, 12px);

  border: 1px solid var(--jlv-border-subtle, rgba(0, 255, 255, 0.12));

  background: var(--jlv-card-bg, rgba(5, 15, 35, 0.75));
}

.feed-card {
  position: relative;
}

.feed-card.speaking,
.feed-card.tts-active {
  border-color: rgba(0, 255, 255, 0.42);
  box-shadow:
    0 0 18px rgba(0, 255, 255, 0.12),
    0 0 28px rgba(0, 255, 153, 0.08);
}

.feed-card.feed-card--timed {
  padding-bottom: 26px;
}

.feed-kind {
  color: #00ffff;

  font-size: 11px;

  font-weight: 700;

  letter-spacing: .12em;

  margin-bottom: 8px;
}

.feed-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.feed-user {
  color: #ffffff;

  font-weight: 700;

  margin-bottom: 0;

  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-time {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  color: rgba(0, 255, 255, 0.42);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.15);
}

.feed-card.feed-card--timed .feed-time {
  position: absolute;
  right: 14px;
  bottom: 10px;
  margin: 0;
  z-index: 1;
  pointer-events: none;
}

.feed-card.feed-card--timed .feed-text,
.feed-card.feed-card--timed .feed-translation {
  padding-right: 3.25rem;
  max-width: 100%;
  box-sizing: border-box;
}

.feed-text {
  color: rgba(255,255,255,.92);

  line-height: 1.5;
}

.feed-translation {
  margin-top: 8px;

  color: #00ffcc;

  font-style: italic;

  font-size: 14px;
}

.feed-card.translation-pending {
  border-color: rgba(0, 255, 255, 0.2);
}

.feed-translation-pending {
  margin-top: 8px;
  color: rgba(0, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-tts-state {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(0, 255, 255, 0.14);
  color: #9dffc8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jlv-footer,
.stats-bar {
  flex-shrink: 0;
  height: var(--jlv-footer-height, 72px);

  display: grid;

  grid-template-columns: repeat(5, 1fr);

  border-top:
    1px solid rgba(0,255,255,.12);

  background:
    rgba(0,0,0,.35);
}

.stat-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-label {
  color: rgba(255,255,255,.45);

  font-size: 11px;

  text-transform: uppercase;

  margin-bottom: 4px;
}

.stat-value {
  color: #00ffff;

  font-size: 22px;

  font-weight: 700;
}

.stat-value.hot {
  color: #ffcc00;
}

.settings-bar,
.control-panel {
  flex-shrink: 0;
  min-height: 0;
  max-height: var(--jlv-settings-max-height, min(44vh, 320px));
  overflow-x: hidden;
  overflow-y: auto;

  padding: 8px 12px;

  border-bottom: 1px solid rgba(0, 255, 255, 0.12);

  background: var(--jlv-bg-primary, #0c121e);
}

.control-deck {
  display: flex;
  flex-direction: column;
  gap: var(--jlv-control-gap, 10px);
  width: 100%;
  min-width: 0;
}

.control-deck--split {
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
}

.control-deck--compact {
  gap: 0;
  max-width: min(100%, 1200px);
  width: 100%;
  margin-inline: auto;
  align-items: flex-start;
}

/* Premium broadcast cockpit — one unified control line */
.control-deck.control-deck--compact.control-deck--cockpit {
  width: fit-content;
  max-width: 100%;
  align-items: flex-start;
}

.settings-bar.control-panel:has(.control-deck--cockpit),
.control-panel:has(.control-deck--cockpit) {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6px 12px 8px;
  background: var(--jlv-bg-primary, #0c121e);
  border-bottom-color: rgba(0, 255, 255, 0.08);
}

.control-row-cockpit {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(0, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--jlv-bg-primary, #0c121e);
  box-shadow:
    inset 0 1px 0 rgba(0, 255, 255, 0.04),
    0 0 0 1px rgba(255, 46, 230, 0.04);
  overflow: hidden;
}

.control-row-cockpit > .control-pod,
.control-row-cockpit > .floating-events-panel,
.control-row-cockpit > .control-tiktok-stack,
.control-row-cockpit > .control-command-strip {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.control-row-cockpit > .control-pod,
.control-row-cockpit > .floating-events-panel,
.control-row-cockpit > .control-tiktok-stack,
.control-row-cockpit > .control-pod-activity {
  border-right: 1px solid rgba(0, 255, 255, 0.08);
}

.control-row-cockpit > .control-pod-activity {
  border-right: none;
}

.control-row-cockpit > .control-pod,
.control-row-cockpit > .control-command-strip {
  align-self: center;
}

.control-row-cockpit > .control-pod {
  min-height: 48px;
  padding: 7px 12px;
  flex-shrink: 0;
}

.control-row-cockpit > .control-pod-translation,
.control-row-cockpit > .control-pod-audio,
.control-row-cockpit > .control-pod-activity {
  flex-shrink: 1;
  align-self: stretch;
}

.control-pod-body-translation {
  justify-content: flex-start;
  gap: 8px;
}

.control-row-cockpit .control-pod-translation {
  flex: 1 1 0;
  width: auto;
  min-width: 200px;
  max-width: none;
  padding: 10px 14px;
}

.control-row-cockpit .control-pod-audio {
  flex: 1 1 0;
  width: auto;
  min-width: 200px;
  max-width: none;
  padding: 10px 14px;
}

.control-row-cockpit .control-pod-activity {
  flex: 1 1 0;
  width: auto;
  min-width: 180px;
  max-width: none;
  padding: 8px 12px;
  display: flex;
  align-items: stretch;
}

.control-row-cockpit .floating-events-panel {
  display: inline-flex;
  flex: 0 0 auto;
  width: fit-content;
  min-width: 0;
  max-width: min(300px, 100%);
  padding: 6px 10px 7px;
  gap: 5px;
  border: none;
  background: transparent;
  align-items: flex-start;
  align-self: stretch;
}

.control-row-cockpit .floating-events-panel__head {
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}

.control-row-cockpit .floating-events-panel__head .floating-master-toggle {
  margin-left: auto;
}

.control-row-cockpit .floating-events-panel__title {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(0, 255, 255, 0.62);
  max-width: 12em;
}

.control-row-cockpit .floating-master-toggle__track {
  width: 34px;
  height: 18px;
}

.control-row-cockpit .floating-master-toggle__track::after {
  width: 12px;
  height: 12px;
  top: 2px;
  left: 2px;
}

.control-row-cockpit .floating-master-toggle input:checked + .floating-master-toggle__track::after {
  transform: translateX(16px);
}

.control-row-cockpit .floating-master-toggle input:checked + .floating-master-toggle__track {
  box-shadow: none;
}

.control-row-cockpit .floating-events-panel__body {
  gap: 3px;
  width: max-content;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, max-content));
}

/* Legacy compact strip (superseded by activity-widget pod) */
.control-row-cockpit .floating-events-panel.filters-compact:not(.activity-widget) .floating-events-panel__body {
  grid-template-columns: repeat(4, minmax(0, max-content));
}

.control-pod-activity .activity-widget.filters-compact .floating-events-panel__body,
.control-pod-activity .activity-widget__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.control-row-modes .floating-events-panel.filters-compact {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.control-row-modes .floating-events-panel.filters-compact .floating-events-panel__head {
  margin: 0 1px 0 0;
  align-items: center;
  width: auto;
}

.control-row-modes .floating-events-panel.filters-compact .floating-events-panel__title {
  max-width: none;
  line-height: 1;
  font-size: 8px;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.control-row-modes .floating-events-panel.filters-compact .floating-events-panel__body {
  gap: 2px;
}

.control-row-modes .floating-events-panel.filters-compact .floating-event-chip {
  padding: 2px 4px;
  border-radius: 5px;
}

.control-row-modes .floating-events-panel.filters-compact .floating-event-chip__icon {
  font-size: 11px;
}

.control-row-modes .floating-events-panel.filters-compact .floating-event-chip__label {
  font-size: 7px;
  letter-spacing: 0.04em;
}

.control-right-cluster-panel .floating-events-panel.filters-compact {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.control-right-cluster-panel .floating-events-panel.filters-compact .floating-events-panel__head {
  margin: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.control-right-cluster-panel .floating-events-panel.filters-compact .floating-events-panel__title {
  max-width: none;
  line-height: 1;
  font-size: 8px;
  letter-spacing: 0.06em;
  opacity: 0.75;
  text-align: center;
}

.control-right-cluster-panel .floating-events-panel.filters-compact .floating-events-panel__body {
  gap: 3px;
  grid-template-columns: repeat(4, minmax(0, max-content));
}

.control-right-cluster-panel .floating-events-panel.filters-compact .floating-event-chip {
  padding: 2px 4px;
  border-radius: 5px;
}

.control-right-cluster-panel .floating-events-panel.filters-compact .floating-event-chip__icon {
  font-size: 11px;
}

.control-right-cluster-panel .floating-events-panel.filters-compact .floating-event-chip__label {
  font-size: 7px;
  letter-spacing: 0.04em;
}

.control-row-cockpit .floating-event-chip {
  padding: 3px 4px;
  gap: 2px;
  border-radius: 6px;
  border-color: rgba(0, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.control-row-cockpit .floating-event-chip__icon {
  font-size: 13px;
  filter: none;
}

.control-row-cockpit .floating-event-chip__label {
  font-size: 8px;
  letter-spacing: 0.06em;
}

.control-row-cockpit .floating-event-chip:has(input:checked) {
  border-color: rgba(0, 255, 160, 0.28);
  box-shadow: none;
}

/* TikTok session + username + connect — compact vertical block after speaking/floating events */
.control-row-cockpit .control-tiktok-stack {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  align-self: stretch;
  position: relative;
  width: 172px;
  min-width: 152px;
  max-width: 200px;
  padding: 6px 10px 7px;
  gap: 0;
  background: transparent;
}

.control-tiktok-stack__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}

.control-tiktok-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.control-tiktok-label {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.62);
  line-height: 1.1;
}

.control-row-cockpit .control-tiktok-stack .stream-input {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
  border-color: rgba(0, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.38);
}

.control-row-cockpit .control-tiktok-stack .stream-input:focus {
  border-color: rgba(0, 255, 255, 0.42);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.18);
}

.control-row-cockpit .connect-btn--cockpit {
  width: 100%;
  height: 28px;
  margin-top: 1px;
  padding: 0 10px;
  font-size: 10px;
  letter-spacing: 0.07em;
  border-radius: 6px;
  align-self: center;
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.12),
    0 0 12px rgba(0, 255, 255, 0.14);
}

.control-row-cockpit .connect-btn--cockpit:hover {
  transform: none;
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.22),
    0 0 16px rgba(0, 255, 255, 0.28);
}

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

.control-command-strip {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px;
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
}

.control-row-modes {
  width: 100%;
  margin-top: 0;
}

.control-row-modes .control-command-strip--modes {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.control-row-modes .control-command-strip__filters {
  display: inline-flex;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.control-right-cluster-panel {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  gap: 0;
  min-width: 0;
  min-height: 48px;
  margin-left: auto;
  padding: 8px 12px;
  border-left: 1px solid rgba(0, 255, 255, 0.08);
}

.control-right-cluster-panel .control-command-strip__filters {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.control-right-cluster-panel .control-command-strip__filters,
.control-right-cluster-panel .control-cluster-view-save,
.control-right-cluster-panel .control-command-strip__actions {
  box-sizing: border-box;
}

.control-right-cluster-panel .control-cluster-mode-toggle {
  display: inline-flex;
  align-self: center;
  margin: 0;
  gap: 0;
}

.control-right-cluster-panel .control-command-strip__actions {
  align-self: center;
  margin-left: 0;
}

.control-right-cluster-panel .control-command-strip__actions .apply-settings-btn,
.control-right-cluster-panel .control-command-strip__actions .reset-settings-btn,
.control-right-cluster-panel .control-cluster-mode-toggle .mode-btn {
  height: 24px;
  padding: 0 8px;
  font-size: 9px;
}

.control-right-cluster-panel .control-cluster-view-save {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.control-command-strip__divider {
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0 2px;
  background: rgba(0, 255, 255, 0.12);
}

.control-command-strip .mode-toggle {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin: 0;
}

.control-command-strip__actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  position: relative;
}

.control-row-cockpit .control-command-strip .mode-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 10px;
  border-color: rgba(0, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.32);
  border-radius: 0;
}

.control-row-cockpit .control-command-strip .mode-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.control-row-cockpit .control-command-strip .mode-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.control-row-cockpit .control-command-strip .mode-btn + .mode-btn {
  border-left-width: 0;
  margin-left: -1px;
}

.control-row-cockpit .control-command-strip .apply-settings-btn,
.control-row-cockpit .control-command-strip .reset-settings-btn {
  border-radius: 0;
}

.control-row-cockpit .control-command-strip .apply-settings-btn {
  border-radius: 6px 0 0 6px;
}

.control-row-cockpit .control-command-strip .reset-settings-btn {
  border-radius: 0 6px 6px 0;
  margin-left: -1px;
}

.control-row-cockpit .mode-btn {
  height: 28px;
  padding: 0 9px;
  font-size: 10px;
  border-color: rgba(0, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
}

.control-row-cockpit .mode-btn.active {
  position: relative;
  z-index: 1;
  border-color: rgba(0, 255, 255, 0.35);
  background: rgba(0, 255, 255, 0.78);
  color: #041018;
  box-shadow: none;
}

.control-row-cockpit .apply-settings-btn,
.control-row-cockpit .reset-settings-btn {
  height: 28px;
  min-width: 4.25rem;
  padding: 0 10px;
  font-size: 10px;
  box-shadow: none;
}

.control-row-cockpit .apply-settings-btn:hover,
.control-row-cockpit .reset-settings-btn:hover {
  box-shadow: none;
}

.control-column--stream {
  display: flex;
  flex-direction: column;
  gap: var(--jlv-control-gap, 10px);
  flex: 1 1 52%;
  min-width: 0;
}

.control-column--overlay {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 1 48%;
  min-width: min(100%, 320px);
  max-width: 420px;
}

.control-row-stream-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.control-row-stream-footer .control-pod-actions {
  margin-left: auto;
}

.floating-events-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 9px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 0, 200, 0.28);
  background: linear-gradient(145deg, rgba(12, 0, 28, 0.72), rgba(0, 10, 24, 0.55));
  box-shadow:
    0 0 18px rgba(255, 0, 200, 0.08),
    inset 0 1px 0 rgba(0, 255, 255, 0.06);
}

.floating-events-panel.is-master-off {
  border-color: rgba(120, 120, 140, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  opacity: 0.72;
}

.floating-events-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.floating-events-panel__title {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.88);
  line-height: 1.35;
  max-width: 14em;
}

.floating-master-toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.floating-master-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.floating-master-toggle__track {
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(80, 80, 100, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.floating-master-toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(220, 220, 230, 0.95);
  transition: transform 0.18s ease, background 0.18s ease;
}

.floating-master-toggle input:checked + .floating-master-toggle__track {
  background: rgba(0, 220, 120, 0.35);
  border-color: rgba(0, 255, 160, 0.45);
  box-shadow:
    0 0 12px rgba(0, 255, 140, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.floating-master-toggle input:checked + .floating-master-toggle__track::after {
  transform: translateX(20px);
  background: #9dffc8;
}

.floating-events-panel__hint {
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(180, 220, 255, 0.72);
  letter-spacing: 0.02em;
}

.floating-events-panel.is-master-off .floating-events-panel__hint {
  color: rgba(160, 160, 180, 0.65);
}

.floating-events-panel__setup {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 2px;
}

.floating-events-panel__setup-hint {
  margin: 0;
  font-size: 9px;
  line-height: 1.35;
  color: rgba(160, 190, 220, 0.62);
  letter-spacing: 0.02em;
}

.overlay-setup-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(220, 245, 255, 0.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.overlay-setup-btn:hover {
  border-color: rgba(0, 255, 255, 0.42);
  background: rgba(0, 255, 255, 0.08);
  color: #fff;
}

.floating-events-panel__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.floating-event-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 5px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.floating-event-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.floating-event-chip__icon {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.25));
}

.floating-event-chip__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.floating-event-chip:has(input:checked) {
  border-color: rgba(0, 255, 160, 0.42);
  box-shadow: 0 0 10px rgba(0, 255, 140, 0.12);
}

.floating-event-chip:has(input:checked) .floating-event-chip__label {
  color: rgba(180, 255, 220, 0.95);
}

.floating-events-panel.is-master-off .floating-event-chip {
  opacity: 0.45;
  pointer-events: none;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--jlv-control-gap, 10px);
  min-width: 0;
}

/* Unified cockpit strip: one row, flex-start, no space-between */
.control-row-primary,
.control-row-secondary,
.control-command-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.control-row-primary:not(.control-row-cockpit) > .control-pod,
.control-row-primary > .control-cockpit-group,
.control-row-primary:not(.control-row-cockpit) > .floating-events-panel,
.control-row-primary > .control-cockpit-tail {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  align-self: flex-start;
}

.control-cockpit-group > .floating-events-panel {
  flex: 0 1 240px;
}

.control-cockpit-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.control-cockpit-tail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}

.control-cockpit-tail .control-rail-right--modes {
  margin-left: 0;
  margin-right: 0;
}

.control-cockpit-tail .control-pod-actions {
  flex: 0 1 auto;
  min-height: 0;
  padding: 7px 10px;
}

.control-cockpit-tail .control-pod-body-actions {
  justify-content: flex-start;
  align-items: center;
}

/* Legacy second-row command bar (if reused) */
.control-command-bar > .control-rail-right,
.control-command-bar > .control-pod {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.control-command-bar {
  gap: 12px;
}

.control-command-bar .control-rail-right--modes {
  margin-left: 0;
  margin-right: 0;
}

.control-command-bar .control-pod-actions {
  flex: 0 1 auto;
  min-height: 0;
  padding: 7px 10px;
}

.control-command-bar .control-pod-body-actions {
  justify-content: flex-start;
  align-items: center;
}

/* Legacy rail row (if reused elsewhere) */
.control-row-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
}

.control-row-rail > .control-pod,
.control-row-rail > .control-rail-right {
  flex: 0 0 auto;
  align-self: center;
}

.control-row-rail .control-pod-display .control-pod-body {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  column-gap: 10px;
  row-gap: 0;
}

.control-row-rail .control-pod-body-actions {
  justify-content: center;
  align-items: center;
}

.control-rail-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  flex: 0 0 auto;
  padding: 5px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.14);
  background: var(--jlv-bg-elevated, #122030);
  box-shadow: inset 0 1px 0 rgba(0, 255, 255, 0.05);
}

.control-rail-right--modes {
  padding: 5px 8px;
}

.control-rail-right--modes .mode-toggle {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

.control-pod {
  display: flex;
  flex-direction: column;
  min-height: var(--jlv-pod-min-height, 72px);
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--jlv-pod-pad-y, 10px) var(--jlv-pod-pad-x, 12px);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.1);
  background: var(--jlv-bg-panel, #0f1a28);
  box-shadow: inset 0 1px 0 rgba(0, 255, 255, 0.04);
}

.control-pod-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.control-pod-body-translation {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
}

.translation-target-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.translation-target-label {
  display: block;
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.2;
}

.translation-target-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: nowrap;
  min-width: 0;
}

.translation-target-row .smart-translation-toggle {
  flex: 0 0 auto;
  margin: 0;
}

.translation-target-select,
.translation-target-row #target-lang {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 156px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}

.control-pod-body-translation .setting-group-known-lang {
  gap: 5px;
  max-width: none;
  min-width: 0;
}

.control-pod-translation {
  padding: 10px 11px;
}

.control-row-primary:not(.control-row-cockpit) .control-pod-translation {
  flex: 0 1 180px;
  min-width: 150px;
  max-width: min(100%, 240px);
}

.control-row-primary:not(.control-row-cockpit) .control-pod-audio {
  flex: 0 1 195px;
  min-width: 160px;
  max-width: min(100%, 260px);
}

.control-row-primary .control-pod-display {
  flex: 0 1 185px;
  min-width: 150px;
  max-width: min(100%, 220px);
}

.control-row-primary:not(.control-row-cockpit) .floating-events-panel {
  flex: 0 1 240px;
  min-width: 200px;
  max-width: min(100%, 380px);
}

.control-row-primary:not(.control-row-cockpit) .control-pod,
.control-row-primary:not(.control-row-cockpit) .floating-events-panel {
  min-height: 0;
}

/* Cockpit wins over generic primary-row flex (same specificity, must follow) */
.control-row-primary.control-row-cockpit > .control-pod,
.control-row-primary.control-row-cockpit > .floating-events-panel,
.control-row-primary.control-row-cockpit > .control-tiktok-stack,
.control-row-primary.control-row-cockpit > .control-command-strip {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.control-row-primary.control-row-cockpit .floating-events-panel {
  display: inline-flex;
  flex: 0 0 auto;
  width: fit-content;
  min-width: 0;
  max-width: min(300px, 100%);
}

.control-pod-actions {
  flex: 0 0 auto;
  min-height: 0;
  padding: 8px 10px;
  border-color: rgba(0, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.control-pod-actions--audio {
  width: 100%;
  margin-top: 2px;
  padding: 7px 8px;
}

.control-pod-body-actions {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.setting-group-compact {
  gap: 6px;
  width: 100%;
}

.known-lang-field-label {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.setting-group {
  display: flex;
  flex-direction: column;

  gap: 6px;
}

.setting-group-wide {
  min-width: 0;
}

.setting-group label {
  font-size: 11px;

  text-transform: uppercase;

  color: rgba(255,255,255,.5);

  letter-spacing: .08em;
}

.setting-group select,
.setting-group input[type="range"] {
  background:
    rgba(0,0,0,.45);

  color: white;

  border:
    1px solid rgba(0,255,255,.2);

  border-radius: 8px;

  padding: 8px 10px;
}

.setting-group-audio {
  display: flex;
  flex-direction: column;
  min-width: 148px;
  gap: 3px;
}

.setting-group-audio input[type="range"] {
  padding: 4px 8px;
}

.setting-group-audio .speech-speed-setting {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.setting-group-audio .speech-speed-setting__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.setting-group-audio .speech-speed-end {
  flex: 0 0 auto;
  min-width: 2.25rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.setting-group-audio .speech-speed-end:first-child {
  text-align: right;
}

.setting-group-audio .speech-speed-end:last-child {
  text-align: left;
}

.setting-group-audio .speech-speed-end.is-active {
  color: rgba(255, 255, 255, 0.72);
}

.setting-group-known-lang {
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
  width: 100%;
}

.known-lang-picker {
  position: relative;
  width: 100%;
}

.known-lang-trigger-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.known-lang-icon {
  flex-shrink: 0;
  color: rgba(0, 255, 255, 0.72);
  opacity: 0.9;
}

.known-lang-trigger {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(0, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.known-lang-trigger:hover:not(:disabled) {
  border-color: rgba(0, 255, 255, 0.38);
  background: rgba(0, 255, 255, 0.05);
}

.known-lang-trigger.is-open:not(:disabled) {
  border-color: rgba(0, 255, 255, 0.42);
  background: rgba(0, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.1);
}

.known-lang-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.18);
}

.known-lang-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.known-lang-summary {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating HUD layer — mounted on body by overlay-lang-picker.js */
.known-lang-panel.known-lang-panel--float {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  width: 280px;
  max-width: calc(100vw - 16px);
  max-height: min(280px, calc(100vh - 16px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.26);
  background: rgba(3, 10, 22, 0.97);
  backdrop-filter: blur(12px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 255, 255, 0.1),
    inset 0 1px 0 rgba(0, 255, 255, 0.06);
  z-index: 10050;
  pointer-events: auto;
  isolation: isolate;
  contain: layout style paint;
}

.known-lang-panel[hidden] {
  display: none !important;
}

.known-lang-search {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 6, 14, 0.88);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(0, 255, 255, 0.06);
}

.known-lang-search::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.known-lang-search:focus-visible {
  outline: none;
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(0, 255, 255, 0.12);
}

/* Unified JAVELIN scrollbars — soft (dropdown) / structural (feeds) */
.known-lang-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 4px 2px 0;
}

.jlv-feed.feed,
.feed {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 140, 175, 0.32) rgba(0, 0, 0, 0.42);
}

.jlv-feed.feed::-webkit-scrollbar,
.feed::-webkit-scrollbar {
  width: 6px;
}

.jlv-feed.feed::-webkit-scrollbar-track,
.feed::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.42);
  border-radius: 999px;
}

.jlv-feed.feed::-webkit-scrollbar-thumb,
.feed::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(0, 160, 200, 0.2) 0%,
    rgba(0, 120, 170, 0.34) 100%
  );
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.08);
}

.settings-bar.control-panel,
.control-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 160, 200, 0.4) rgba(0, 0, 0, 0.3);
}

.known-lang-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 190, 220, 0.38) rgba(0, 0, 0, 0.28);
}

.known-lang-list::-webkit-scrollbar {
  width: 5px;
}

.known-lang-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}

.known-lang-list::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(0, 210, 240, 0.22) 0%,
    rgba(0, 140, 200, 0.38) 100%
  );
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 4px rgba(0, 255, 255, 0.08);
}

.known-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.known-lang-option:hover {
  background: rgba(0, 255, 255, 0.07);
}

.known-lang-option input:checked + span {
  color: rgba(0, 255, 220, 0.95);
  font-weight: 500;
}

.known-lang-option input {
  flex-shrink: 0;
  accent-color: #00ffff;
}

.known-lang-option input:focus-visible {
  outline: 1px solid rgba(0, 255, 255, 0.35);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .setting-group-known-lang {
    min-width: 0;
    max-width: none;
  }

  .control-pod-audio {
    max-width: none;
  }
}

@media (max-width: 960px) {
  .control-deck--split {
    flex-direction: column;
  }

  .control-column--overlay {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .translation-target-row {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .translation-target-select,
  .translation-target-row #target-lang {
    max-width: none;
    flex: 1 1 100%;
  }

  .control-row-primary,
  .control-row-cockpit,
  .control-command-bar,
  .control-command-strip {
    row-gap: 8px;
  }

  .control-row-cockpit {
    gap: 0;
  }

  .control-row-cockpit > .control-pod,
  .control-row-cockpit > .floating-events-panel,
  .control-row-cockpit > .control-tiktok-stack {
    border-right: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.07);
  }

  .control-row-cockpit > .control-command-strip {
    border-bottom: none;
  }

  .control-row-cockpit .control-tiktok-stack {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .control-row-rail {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

@media (min-width: 1100px) {
  .settings-bar.control-panel,
  .control-panel {
    max-height: none;
    overflow-y: visible;
  }

  .control-row-primary,
  .control-row-cockpit {
    flex-wrap: nowrap;
  }

  .control-command-strip {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}

@media (min-width: 1600px) {
  .control-row-primary:not(.control-row-cockpit) .floating-events-panel {
    max-width: min(100%, 400px);
  }
}

@media (max-width: 640px) {
  .control-panel {
    padding: 8px 10px;
  }

  .control-row-rail .control-pod-display .control-pod-body {
    flex-wrap: wrap;
  }

  .control-row-primary:not(.control-row-cockpit) .control-pod-translation,
  .control-row-primary:not(.control-row-cockpit) .control-pod-audio,
  .control-row-primary:not(.control-row-cockpit) .control-pod-display,
  .control-row-primary:not(.control-row-cockpit) .floating-events-panel {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .control-row-cockpit {
    width: 100%;
    display: flex;
  }

  .control-row-cockpit .floating-events-panel {
    width: auto;
    max-width: 100%;
  }

  .control-command-bar .control-rail-right--modes,
  .control-command-bar .control-pod-actions {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .control-row-cockpit .control-command-strip {
    flex: 1 1 100%;
    width: 100%;
    flex-wrap: wrap;
  }

  .control-pod-body-actions {
    justify-content: stretch;
  }

  .control-pod-body-actions .apply-settings-btn,
  .control-pod-body-actions .reset-settings-btn {
    flex: 1 1 0;
  }

  .toggle-chip {
    padding: 5px 8px;
    font-size: 11px;
  }

  .control-right-cluster-panel {
    width: 100%;
    margin-left: 0;
    border-left: none;
    border-top: 1px solid rgba(0, 255, 255, 0.08);
    padding-top: 6px;
  }

  .control-pod-activity .activity-widget.filters-compact .floating-events-panel__body,
  .control-pod-activity .activity-widget__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.audio-mute-btn {
  margin-top: 3px;
  align-self: center;
  min-width: 3.75rem;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(0, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 7px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.audio-mute-btn:hover {
  border-color: rgba(0, 255, 255, 0.34);
  background: rgba(0, 255, 255, 0.05);
  color: rgba(0, 255, 255, 0.88);
}

.audio-mute-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

.audio-mute-btn.is-muted,
.audio-mute-btn[aria-pressed="true"] {
  color: rgba(220, 170, 255, 0.95);
  border-color: rgba(160, 90, 220, 0.45);
  background: rgba(100, 40, 140, 0.18);
  box-shadow: 0 0 12px rgba(140, 60, 200, 0.12);
}

@media (max-width: 1100px) {
  .setting-group-audio {
    min-width: 132px;
  }

  .audio-mute-btn {
    width: 100%;
    text-align: center;
  }
}

.tts-caption {
  position: fixed;

  left: 50%;
  bottom: 120px;

  transform: translateX(-50%);

  padding: 16px 24px;

  border-radius: 14px;

  background:
    rgba(0,0,0,.75);

  border:
    1px solid rgba(0,255,255,.25);

  color: white;

  font-size: 26px;

  font-weight: 700;

  opacity: 0;

  transition: .3s ease;

  pointer-events: none;
}

.tts-caption.visible {
  opacity: 1;
}

.mode-label-active {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #00ffff;
  text-transform: uppercase;
}

.known-lang-grid {
  max-width: 720px;
}

.smart-translation-toggle {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  cursor: pointer;
}

.reset-settings-btn,
.apply-settings-btn {
  height: 32px;
  min-width: 5.5rem;
  padding: 0 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.apply-settings-btn {
  border: 1px solid rgba(0, 255, 255, 0.28);
  background: rgba(0, 255, 255, 0.08);
  color: rgba(220, 255, 255, 0.92);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.06);
}

.apply-settings-btn:hover {
  border-color: rgba(0, 255, 255, 0.38);
  background: rgba(0, 255, 255, 0.14);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.apply-settings-btn.is-runtime-dirty {
  border-color: rgba(255, 200, 64, 0.65);
  background: rgba(255, 180, 40, 0.14);
  color: rgba(255, 245, 210, 0.98);
  animation: apply-runtime-dirty-glow 1.35s ease-in-out infinite;
}

@keyframes apply-runtime-dirty-glow {
  0%,
  100% {
    box-shadow:
      0 0 8px rgba(255, 200, 64, 0.2),
      0 0 0 0 rgba(255, 200, 64, 0);
  }
  50% {
    box-shadow:
      0 0 16px rgba(255, 200, 64, 0.45),
      0 0 22px rgba(255, 160, 32, 0.18);
  }
}

.control-command-strip__actions.is-runtime-dirty .apply-settings-btn {
  border-color: rgba(255, 200, 64, 0.65);
}

.translation-runtime-dirty-hint {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  margin: 0;
  max-width: 18rem;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: right;
  white-space: normal;
  color: rgba(255, 210, 90, 0.95);
  text-shadow: 0 0 10px rgba(255, 180, 40, 0.25);
  pointer-events: none;
}

.reset-settings-btn {
  border: 1px solid rgba(200, 80, 160, 0.28);
  background: rgba(160, 40, 120, 0.1);
  color: rgba(255, 220, 245, 0.88);
  box-shadow: 0 0 8px rgba(160, 60, 140, 0.05);
}

.reset-settings-btn:hover {
  border-color: rgba(200, 80, 160, 0.38);
  background: rgba(160, 40, 120, 0.16);
  box-shadow: 0 0 10px rgba(160, 60, 140, 0.08);
}

.apply-settings-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(4, 16, 28, 0.92);
  border: 1px solid rgba(0, 255, 255, 0.45);
  color: #00ffff;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.25);
  pointer-events: none;
}

.apply-settings-toast.visible {
  animation: toast-fade 2.2s ease forwards;
}

@keyframes toast-fade {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  12%,
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
  }
}

.mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 0;
  align-items: center;
  flex: 0 1 auto;
}

.channel-history-panel.channel-history-panel--float {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.24);
  background: rgba(3, 10, 22, 0.97);
  backdrop-filter: blur(12px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 255, 0.08);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.channel-history-panel[hidden] {
  display: none !important;
}

.channel-history-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(220, 255, 255, 0.92);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
}

.channel-history-item:hover,
.channel-history-item.is-active {
  background: rgba(0, 255, 255, 0.08);
  color: #e8ffff;
}

.channel-history-empty {
  margin: 0;
  padding: 8px 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.channel-history-clear {
  margin-top: 4px;
  width: 100%;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  border: none;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  padding: 8px 10px 4px;
  cursor: pointer;
}

.channel-history-clear:hover {
  color: rgba(0, 255, 255, 0.75);
}

.mode-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.mode-btn.active {
  border-color: rgba(0, 255, 255, 0.42);
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.85), rgba(0, 255, 153, 0.75));
  color: #041018;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.12);
}

#jlv-stability-strip {
  display: none !important;
}

body.jlv-debug-ui #jlv-stability-strip:not([hidden]) {
  display: block !important;
}

body.transparent-mode #jlv-stability-strip,
body.desktop-mode #jlv-stability-strip,
body.transparent-mode #jlv-overlay-diag-hud,
body.transparent-mode #jlv-runtime-hud,
body.desktop-mode #jlv-overlay-diag-hud,
body.desktop-mode #jlv-runtime-hud {
  display: none !important;
  visibility: hidden !important;
}

body.transparent-mode {
  background: transparent !important;
}

html.transparent-mode-root {
  background: transparent !important;
}

.transparent-notice {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(0, 255, 255, 0.25);
  pointer-events: auto;
}

body.transparent-mode .transparent-notice {
  display: flex;
}

body.desktop-mode .desktop-notice {
  display: flex;
}

.overlay-mode-notice {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(0, 255, 255, 0.25);
  pointer-events: auto;
}

.return-dashboard-btn.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.transparent-notice-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #00ffff;
  text-transform: uppercase;
}

.transparent-notice-hint {
  max-width: 520px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.overlay-client-setup {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(100%, 420px);
  margin: 4px 0 6px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}

.overlay-client-setup__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(180, 240, 255, 0.92);
}

.overlay-client-setup__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.overlay-client-setup__btn {
  width: 100%;
  margin-top: 2px;
}

.overlay-mode-notice .return-dashboard-btn.secondary {
  margin-top: 4px;
}

.overlay-mode-notice__subhint {
  max-width: 520px;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
}

.return-dashboard-btn {
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: linear-gradient(90deg, #ff00cc, #00ffff);
  color: #041018;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.return-dashboard-btn:hover {
  filter: brightness(1.08);
}

/* --- Multiuser Ready UI — Phase A --- */

.jlv-mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 8px;
  margin-right: 4px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  flex-shrink: 0;
}

.jlv-mobile-menu-btn__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--jlv-neon-cyan, #00f0ff);
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.35);
}

.header-center-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
}

.header-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.header-live-dot.is-live {
  background: #00ff99;
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.65);
}

.header-live-dot.is-connecting {
  background: #ffd24d;
  box-shadow: 0 0 10px rgba(255, 210, 77, 0.55);
  animation: jlv-pulse 1.2s ease-in-out infinite;
}

.header-live-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(232, 247, 255, 0.88);
  white-space: nowrap;
}

@keyframes jlv-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.jlv-account-area {
  position: relative;
  flex-shrink: 0;
}

.jlv-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.jlv-account-trigger:hover,
.jlv-account-area.is-open .jlv-account-trigger {
  border-color: rgba(0, 255, 255, 0.42);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.12);
}

.jlv-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.28), rgba(255, 0, 204, 0.22));
  border: 1px solid rgba(0, 255, 255, 0.35);
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.08);
}

.jlv-account-avatar__initials {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #e8ffff;
}

.jlv-account-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.jlv-account-username {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f2fcff;
}

.jlv-account-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72);
}

.jlv-account-status .health-dot {
  width: 6px;
  height: 6px;
}

.jlv-account-status .conn-dot {
  width: 7px;
  height: 7px;
}

.jlv-account-status__label {
  font-weight: 800;
}

.jlv-account-chevron {
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid rgba(0, 255, 255, 0.65);
  border-bottom: 2px solid rgba(0, 255, 255, 0.65);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.jlv-account-area.is-open .jlv-account-chevron {
  transform: rotate(225deg) translateY(2px);
}

.jlv-account-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  pointer-events: none;
}

.jlv-account-menu-layer.is-open {
  display: block;
  pointer-events: auto;
}

.jlv-account-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(2, 8, 16, 0.42);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.jlv-account-dropdown {
  position: fixed;
  z-index: 20010;
  width: min(360px, calc(100vw - 24px));
  max-height: min(78vh, 640px);
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  background:
    radial-gradient(circle at top right, rgba(255, 0, 204, 0.08), transparent 42%),
    rgba(8, 14, 24, 0.98);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 46, 230, 0.06);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.jlv-account-dropdown[hidden]:not(.is-open) {
  display: none !important;
}

.jlv-account-dropdown.is-open {
  display: block;
}

body.jlv-account-menu-open {
  overflow: hidden;
}

.view-mode-toggle {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.32);
}

.mode-btn--header {
  min-width: 0;
  padding: 5px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(200, 240, 255, 0.72);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.mode-btn--header.active {
  color: #041018;
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.92), rgba(0, 255, 180, 0.88));
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.22);
}

.translation-apply-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.translation-apply-actions__buttons {
  display: flex;
  gap: 8px;
  width: 100%;
}

.translation-apply-actions__buttons .apply-settings-btn,
.translation-apply-actions__buttons .reset-settings-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 10px;
  font-size: 11px;
}

.control-pod-activity .activity-widget {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 8px 10px 10px;
}

.control-pod-activity .activity-widget__head {
  margin-bottom: 2px;
}

.control-pod-activity .activity-widget__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.control-pod-activity .activity-tile {
  position: relative;
  min-height: 52px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.16);
  background:
    linear-gradient(160deg, rgba(0, 255, 255, 0.06), rgba(255, 0, 204, 0.04)),
    rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.control-pod-activity .activity-tile .floating-event-chip__icon {
  font-size: 18px;
}

.control-pod-activity .activity-tile .floating-event-chip__label {
  font-size: 8px;
  letter-spacing: 0.1em;
}

.control-pod-activity .activity-tile:has(input:checked) {
  border-color: rgba(0, 255, 160, 0.5);
  background:
    linear-gradient(160deg, rgba(0, 255, 160, 0.12), rgba(0, 255, 255, 0.06)),
    rgba(0, 0, 0, 0.28);
  box-shadow:
    0 0 14px rgba(0, 255, 140, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.jlv-account-dropdown__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.82);
}

.jlv-account-dropdown__tiktok {
  margin-bottom: 4px;
}

.control-tiktok-stack--dropdown {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.control-tiktok-stack--dropdown .control-tiktok-stack__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-tiktok-stack--dropdown .control-tiktok-field {
  width: 100%;
}

.control-tiktok-stack--dropdown .stream-input {
  width: 100%;
}

.connect-btn--dropdown {
  width: 100%;
  margin-top: 2px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.jlv-account-dropdown__divider {
  height: 1px;
  margin: 10px 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 255, 0.22),
    transparent
  );
}

.jlv-account-dropdown__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jlv-account-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(232, 247, 255, 0.92);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.jlv-account-dropdown__item:hover:not(:disabled) {
  border-color: rgba(0, 255, 255, 0.18);
  background: rgba(0, 255, 255, 0.06);
}

.jlv-account-dropdown__item:disabled,
.jlv-account-dropdown__item--placeholder {
  opacity: 0.55;
  cursor: not-allowed;
}

.jlv-account-dropdown__item--danger {
  color: #ff8f9d;
}

.jlv-account-dropdown__icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.jlv-account-dropdown__badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.18);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 255, 255, 0.72);
}

.control-pod-activity .activity-widget__head,
.control-row-cockpit .control-pod-activity .activity-widget .floating-events-panel__head {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  align-items: center;
}

.control-pod-activity .activity-widget .floating-events-panel__title {
  width: 100%;
  max-width: none;
  text-align: center;
}

.control-pod-audio .setting-group-audio {
  align-items: center;
}

.control-pod-audio .setting-group-audio > label,
.control-pod-audio .setting-group-audio > input[type="range"] {
  width: 100%;
}

.control-pod-audio .speech-speed-setting {
  width: 100%;
  align-items: center;
}

.control-pod-audio .speech-speed-setting__row {
  justify-content: center;
}

.control-row-cockpit {
  width: auto;
  max-width: 100%;
}

@media (max-width: 900px) {
  .view-mode-toggle {
    display: none;
  }

  .jlv-mobile-menu-btn {
    display: inline-flex;
  }

  .header-center-status {
    display: inline-flex;
  }

  .header-brand-group {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-status-group__tool {
    display: none;
  }

  .header-status-group {
    gap: 8px;
  }

  .jlv-account-meta {
    display: none;
  }

  .jlv-account-trigger {
    padding: 4px;
    border-radius: 50%;
  }

  .jlv-account-chevron {
    display: none;
  }
}

@media (max-width: 560px) {
  .jlv-header,
  .top-bar {
    padding: 0 10px;
    gap: 8px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-signature-wrap {
    display: none;
  }
}