:root {
  --fm-live-bg: rgba(7, 17, 17, 0.96);
  --fm-live-panel: rgba(17, 34, 32, 0.94);
  --fm-panel-background-opacity: 0.45;
  --fm-live-border: rgba(131, 179, 161, 0.24);
  --fm-live-text: #e9f5ef;
  --fm-live-muted: #91a9a0;
  --fm-live-green: #5ce092;
  --fm-live-yellow: #f4c95d;
  --fm-live-amber: #ffc95a;
  --fm-live-red: #ff756d;
}

:where(
  .topbar,
  .floating-panel,
  .metrics-bar,
  .map-legend,
  .settings-popover,
  .mesh-status,
  .mesh-control-panel,
  .mesh-metrics,
  .mesh-legend,
  .mesh-hover-tooltip,
  .mesh-module-loading,
  .mesh-loading-state,
  .fm-live-panel,
  .fm-live-window,
  .fm-live-card,
  .fm-live-stat,
  .fm-live-window-launcher,
  .fm-live-node-chip,
  .fm-live-chat-dialog,
  .fm-live-chat-dialog-surface
) {
  background: rgba(11, 18, 17, var(--fm-panel-background-opacity)) !important;
  -webkit-backdrop-filter: blur(15px) saturate(115%);
  backdrop-filter: blur(15px) saturate(115%);
}

:where(
  .mesh-panel-heading,
  .settings-heading,
  .fm-live-header,
  .fm-live-window-header,
  .fm-live-chat-dialog-header,
  .fm-live-chat-dialog-footer,
  .fm-live-dialog-feed
) {
  background: rgba(17, 29, 27, var(--fm-panel-background-opacity)) !important;
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  backdrop-filter: blur(12px) saturate(110%);
}

.fm-panel-transparency-setting {
  display: grid;
  gap: 8px;
}

.fm-panel-transparency-setting input[type="range"] {
  width: 100%;
  accent-color: var(--cyan, #32bfd0);
  cursor: pointer;
}

.fm-panel-transparency-setting output {
  color: var(--cyan, #77dce7);
  font-variant-numeric: tabular-nums;
}

.mesh-status,
.mesh-control-panel {
  display: none !important;
}

[data-movable-panel-handle="true"] {
  cursor: move;
  touch-action: none;
  user-select: none;
}

[data-movable-panel="true"][data-dragging="true"] {
  will-change: left, top;
}

[data-movable-panel-handle="true"] :is(
  button,
  input,
  select,
  textarea,
  a,
  [role="button"],
  [contenteditable="true"]
) {
  cursor: auto;
  touch-action: auto;
  user-select: auto;
}

.fm-live-panel {
  z-index: 30;
  color: var(--fm-live-text);
  background: var(--fm-live-bg);
  border: 1px solid var(--fm-live-border);
  border-radius: 9px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  width: min(382px, calc(100vw - 24px));
  max-height: calc(100% - 96px);
  font: 12px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  position: absolute;
  top: 82px;
  right: 12px;
  overflow: hidden;
  pointer-events: auto;
}

.fm-live-panel *,
.fm-live-window *,
.fm-live-window *::before,
.fm-live-window *::after {
  box-sizing: border-box;
}

.fm-live-panel button,
.fm-live-panel input,
.fm-live-panel select,
.fm-live-panel textarea,
.fm-live-window button,
.fm-live-window input,
.fm-live-window select,
.fm-live-window textarea {
  font: inherit;
}

.fm-live-window {
  z-index: 40;
  box-sizing: border-box;
  color: var(--fm-live-text);
  background: var(--fm-live-bg);
  border: 1px solid rgba(131, 179, 161, 0.38);
  border-radius: 10px;
  width: min(420px, calc(100vw - 24px));
  min-width: 280px;
  min-height: 150px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  position: fixed;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  resize: both;
  pointer-events: auto;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.54);
  font: 12px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
}

.fm-live-window[hidden] {
  display: none;
}

.fm-live-window[data-window="server-connected-nodes"] {
  top: 82px;
  left: 12px;
  width: min(560px, calc(100vw - 24px));
}

.fm-live-window[data-window="node-server-chat"] {
  bottom: 12px;
  left: 12px;
}

.fm-live-window[data-window="rescue-mission"] {
  top: 82px;
  right: 406px;
  width: min(360px, calc(100vw - 24px));
}

.fm-live-window[data-window="send-server-chat"] {
  right: 12px;
  bottom: 12px;
  width: min(382px, calc(100vw - 24px));
}

.fm-live-window[data-minimized="true"] {
  height: auto !important;
  min-height: 0;
  max-height: none;
  grid-template-rows: auto;
  resize: none;
}

.fm-live-window[data-minimized="true"] .fm-live-window-content {
  display: none;
}

.fm-live-window[data-maximized="true"] {
  inset: 8px !important;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none !important;
  resize: none;
}

.fm-live-window[data-maximized="true"] .fm-live-window-content {
  max-height: none;
}

.fm-live-window[data-maximized="true"] .fm-live-window-header {
  cursor: default;
  touch-action: auto;
}

.fm-live-window-header {
  min-height: 46px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--fm-live-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(17, 34, 32, 0.9);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.fm-live-window-identity {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.fm-live-window-identity h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  font-size: 12px;
}

.fm-live-window-identity span {
  color: var(--fm-live-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.fm-live-window-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.fm-live-window-control,
.fm-live-window-close {
  flex: 0 0 auto;
  color: var(--fm-live-text);
  background: rgba(85, 128, 112, 0.18);
  border: 1px solid var(--fm-live-border);
  border-radius: 6px;
  width: 30px;
  min-height: 30px;
  padding: 0;
  cursor: pointer;
  font-size: 18px !important;
  line-height: 1;
}

.fm-live-window-control:hover,
.fm-live-window-close:hover {
  color: #fff;
  border-color: rgba(92, 224, 146, 0.72);
  background: rgba(92, 224, 146, 0.16);
}

.fm-live-window-control:focus-visible,
.fm-live-window-close:focus-visible {
  outline: 2px solid #b4f7cf;
  outline-offset: 2px;
}

.fm-live-window-content {
  min-height: 0;
  max-height: none;
  padding: 10px;
  overflow: auto;
  scrollbar-color: rgba(115, 161, 143, 0.6) transparent;
}

.fm-live-header {
  min-height: 46px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--fm-live-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fm-live-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.fm-live-title strong {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.fm-live-title span {
  color: var(--fm-live-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 10px;
}

.fm-live-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fm-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fm-live-amber);
  box-shadow: 0 0 9px currentColor;
}

.fm-live-dot[data-state="online"] {
  color: var(--fm-live-green);
  background: var(--fm-live-green);
}

.fm-live-dot[data-state="error"] {
  color: var(--fm-live-red);
  background: var(--fm-live-red);
}

.fm-live-collapse,
.fm-live-submit {
  color: var(--fm-live-text);
  background: rgba(85, 128, 112, 0.18);
  border: 1px solid var(--fm-live-border);
  border-radius: 6px;
  min-height: 28px;
  cursor: pointer;
}

.fm-live-collapse {
  width: 30px;
}

.fm-live-submit {
  padding: 5px 11px;
}

.fm-live-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.fm-live-body {
  max-height: calc(100vh - 142px);
  overflow: auto;
  scrollbar-color: rgba(115, 161, 143, 0.6) transparent;
}

.fm-live-panel[data-collapsed="true"] .fm-live-body {
  display: none;
}

.fm-live-summary {
  padding: 9px;
  border-bottom: 1px solid var(--fm-live-border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fm-live-window-launchers {
  padding: 9px;
  border-top: 1px solid var(--fm-live-border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.fm-live-window-launcher {
  color: var(--fm-live-text);
  background: rgba(17, 34, 32, 0.88);
  border: 1px solid var(--fm-live-border);
  border-radius: 7px;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  display: grid;
  align-content: center;
  gap: 2px;
  text-align: left;
  cursor: pointer;
}

.fm-live-window-launcher:hover,
.fm-live-window-launcher[aria-expanded="true"] {
  border-color: rgba(92, 224, 146, 0.7);
  background: rgba(35, 67, 57, 0.94);
}

.fm-live-window-launcher:focus-visible {
  outline: 2px solid #b4f7cf;
  outline-offset: 2px;
}

.fm-live-window-launcher strong,
.fm-live-window-launcher span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-live-window-launcher strong {
  font-size: 10px;
}

.fm-live-window-launcher span {
  color: var(--fm-live-muted);
  font-size: 8px;
}

.fm-live-stat {
  background: var(--fm-live-panel);
  border-radius: 6px;
  min-width: 0;
  padding: 6px 7px;
  display: grid;
}

.fm-live-stat strong {
  font-size: 16px;
}

.fm-live-stat span {
  color: var(--fm-live-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 9px;
}

.fm-live-empty,
.fm-live-auth {
  padding: 9px 10px;
  border-bottom: 1px solid var(--fm-live-border);
}

.fm-live-card {
  margin: 9px 10px;
  padding: 10px;
  background: rgba(17, 34, 32, 0.76);
  border: 1px solid var(--fm-live-border);
  border-radius: 8px;
}

.fm-live-window.fm-live-card {
  margin: 0;
  padding: 0;
}

.fm-live-connections {
  background: linear-gradient(180deg, rgba(92, 224, 146, 0.045), transparent);
}

.fm-live-connection-groups {
  display: grid;
  gap: 8px;
}

.fm-live-connection-group {
  min-width: 0;
}

.fm-live-connection-heading {
  color: var(--fm-live-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fm-live-connection-group[data-mode="direct"] .fm-live-connection-heading b {
  color: var(--fm-live-green);
}

.fm-live-connection-group[data-mode="passive"] .fm-live-connection-heading b {
  color: var(--fm-live-amber);
}

.fm-live-connection-strip {
  list-style: none;
  margin: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(115, 161, 143, 0.55) transparent;
}

.fm-live-node-item {
  flex: 0 0 auto;
  min-width: 0;
}

.fm-live-node-chip {
  color: var(--fm-live-text);
  background: rgba(17, 34, 32, 0.92);
  border: 1px solid var(--fm-live-border);
  border-left: 3px solid var(--fm-live-green);
  border-radius: 7px;
  min-width: 176px;
  max-width: 232px;
  padding: 7px 8px;
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.fm-live-node-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fm-live-connection-group[data-mode="passive"] .fm-live-node-chip {
  border-left-color: var(--fm-live-amber);
}

.fm-live-node-chip:hover {
  border-color: rgba(92, 224, 146, 0.66);
  background: rgba(29, 54, 48, 0.96);
}

.fm-live-node-chip:focus-visible {
  outline: 2px solid #b4f7cf;
  outline-offset: 2px;
}

.fm-live-node-chip[data-map-available="false"] {
  color: #bed0c8;
  border-left-color: #687d75;
  cursor: help;
  opacity: 0.76;
}

.fm-live-node-chip[data-freshness="stale"] {
  opacity: 0.68;
}

.fm-live-node-chip strong,
.fm-live-node-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-live-node-chip strong {
  font-size: 10px;
}

.fm-live-node-route,
.fm-live-node-age,
.fm-live-node-gps {
  color: var(--fm-live-muted);
  font-size: 9px;
}

.fm-live-node-status {
  flex: 0 0 auto;
  color: var(--fm-live-red);
  font-size: 9px;
}

.fm-live-node-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 4px;
  display: inline-block;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 7px currentColor;
}

.fm-live-node-chip[data-connection-status="online"] .fm-live-node-status {
  color: var(--fm-live-green);
}

.fm-live-node-gps {
  color: #bad8cc;
}

.fm-live-connection-empty,
.fm-live-connection-feedback {
  color: var(--fm-live-muted);
  font-size: 9px;
}

.fm-live-connection-empty[hidden] {
  display: none;
}

.fm-live-connection-feedback {
  min-height: 13px;
  margin-top: 5px;
}

.fm-live-connection-feedback[data-kind="focus"] {
  color: var(--fm-live-green);
}

.fm-live-connection-feedback[data-kind="unavailable"] {
  color: var(--fm-live-amber);
}

.fm-live-empty {
  color: var(--fm-live-muted);
  background: rgba(255, 201, 90, 0.06);
  line-height: 1.55;
}

.fm-live-empty[hidden],
.fm-live-auth[hidden] {
  display: none;
}

.fm-live-section-title {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fm-live-section-title h2 {
  margin: 0;
  font-size: 11px;
}

.fm-live-section-title span {
  color: var(--fm-live-muted);
  font-size: 9px;
}

.fm-live-development-badge {
  color: #2a1d00 !important;
  background: var(--fm-live-amber);
  border-radius: 999px;
  padding: 3px 7px;
  font-weight: 700;
}

.fm-live-development-copy {
  color: var(--fm-live-muted);
  margin: 0;
  line-height: 1.55;
  font-size: 10px;
}

.fm-live-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.fm-live-thread-item {
  min-width: 0;
}

.fm-live-thread-button {
  color: var(--fm-live-text);
  background: rgba(4, 12, 12, 0.58);
  border: 1px solid var(--fm-live-border);
  border-radius: 7px;
  width: 100%;
  padding: 8px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
}

.fm-live-thread-button:hover {
  border-color: rgba(86, 163, 255, 0.72);
  background: rgba(16, 36, 42, 0.94);
}

.fm-live-thread-button:focus-visible,
.fm-live-dialog-close:focus-visible {
  outline: 2px solid #b4f7cf;
  outline-offset: 2px;
}

.fm-live-thread-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fm-live-thread-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.fm-live-thread-heading b {
  flex: 0 0 auto;
  color: #071111;
  background: #56a3ff;
  border-radius: 999px;
  min-width: 19px;
  padding: 1px 5px;
  text-align: center;
  font-size: 9px;
}

.fm-live-thread-identity,
.fm-live-thread-preview {
  color: var(--fm-live-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.fm-live-thread-empty {
  color: var(--fm-live-muted);
  border: 1px dashed var(--fm-live-border);
  border-radius: 6px;
  padding: 11px;
  text-align: center;
  font-size: 10px;
}

.fm-live-thread-empty[hidden] {
  display: none;
}

.fm-live-form-row {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.fm-live-compose-grid {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 6px;
}

.fm-live-mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.fm-live-field {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.fm-live-field:first-child,
.fm-live-field:nth-child(2),
.fm-live-field:nth-child(3) {
  grid-column: 1 / -1;
}

.fm-live-field > span {
  color: var(--fm-live-muted);
  font-size: 9px;
}

.fm-live-subheading {
  margin: 12px 0 6px;
  color: var(--fm-live-text);
  font-size: 11px;
}

.fm-live-mission-status-list {
  list-style: none;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.fm-live-mission-status-item {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--fm-live-border);
  border-left: 3px solid var(--fm-live-yellow);
  border-radius: 6px;
  background: rgba(4, 12, 12, 0.5);
}

.fm-live-mission-status-item[data-state="delivered"] {
  border-left-color: var(--fm-live-green);
}

.fm-live-mission-status-item[data-state="completed"] {
  border-left-color: #22c55e;
}

.fm-live-mission-status-item[data-state="cancelled"] {
  border-left-color: #ef4444;
}

.fm-live-mission-status-item strong {
  overflow-wrap: anywhere;
  font-size: 10px;
}

.fm-live-mission-status-item span,
.fm-live-mission-status-item small {
  color: var(--fm-live-muted);
  overflow-wrap: anywhere;
  font-size: 9px;
}

.fm-live-panel input,
.fm-live-panel select,
.fm-live-panel textarea,
.fm-live-window input,
.fm-live-window select,
.fm-live-window textarea {
  color: var(--fm-live-text);
  background: rgba(4, 12, 12, 0.82);
  border: 1px solid var(--fm-live-border);
  border-radius: 6px;
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  outline: none;
}

.fm-live-panel textarea,
.fm-live-window textarea {
  min-height: 58px;
  margin-top: 6px;
  resize: vertical;
}

.fm-live-panel input:focus,
.fm-live-panel select:focus,
.fm-live-panel textarea:focus,
.fm-live-window input:focus,
.fm-live-window select:focus,
.fm-live-window textarea:focus {
  border-color: rgba(92, 224, 146, 0.7);
}

.fm-live-feedback {
  color: var(--fm-live-muted);
  min-height: 16px;
  margin-top: 5px;
  font-size: 10px;
}

.fm-live-feedback[data-kind="error"] {
  color: var(--fm-live-red);
}

.fm-live-feedback[data-kind="success"] {
  color: var(--fm-live-green);
}

.fm-live-feed {
  list-style: none;
  max-height: 245px;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  overflow: auto;
}

.fm-live-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.fm-live-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}

.fm-live-message-delivery {
  color: #9db1ba;
}

.fm-live-message[data-delivery-state="queued"] .fm-live-message-delivery {
  color: #b9ddff;
}

.fm-live-feed-empty {
  color: var(--fm-live-muted);
  border: 1px dashed var(--fm-live-border);
  border-radius: 5px;
  padding: 12px;
  text-align: center;
  font-size: 10px;
}

.fm-live-chat-dialog {
  color: var(--fm-live-text);
  background: #10191e;
  border: 1px solid rgba(117, 157, 176, 0.38);
  border-radius: 16px;
  width: min(720px, calc(100vw - 24px));
  height: min(82vh, 760px);
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
  font: 13px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
}

.fm-live-chat-dialog::backdrop {
  background: rgba(0, 7, 12, 0.66);
  backdrop-filter: blur(3px);
}

.fm-live-chat-dialog *,
.fm-live-chat-dialog *::before,
.fm-live-chat-dialog *::after {
  box-sizing: border-box;
}

.fm-live-chat-dialog-surface {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.fm-live-chat-dialog-header {
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(117, 157, 176, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 29, 36, 0.98);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 2;
}

.fm-live-chat-dialog-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fm-live-chat-avatar,
.fm-live-chat-message-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #30a2ff, #0866ff);
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px rgba(89, 176, 255, 0.18);
}

.fm-live-chat-avatar {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.fm-live-chat-message-avatar {
  width: 26px;
  height: 26px;
  margin-bottom: 17px;
  font-size: 9px;
}

.fm-live-chat-dialog-identity {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fm-live-chat-dialog-identity h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  font-size: 14px;
}

.fm-live-chat-dialog-identity span {
  color: #99adb6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.fm-live-chat-dialog-identity span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 5px;
  display: inline-block;
  background: #71828a;
  border-radius: 50%;
}

.fm-live-chat-dialog-identity span[data-connection-status="online"]::before {
  background: #39d98a;
  box-shadow: 0 0 7px rgba(57, 217, 138, 0.85);
}

.fm-live-chat-dialog-identity span[data-connection-status="offline"]::before {
  background: #ff756d;
}

.fm-live-dialog-close {
  color: var(--fm-live-text);
  background: rgba(119, 144, 156, 0.15);
  border: 0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.fm-live-dialog-close:hover {
  background: rgba(119, 144, 156, 0.28);
}

.fm-live-dialog-feed {
  max-height: none;
  min-height: 0;
  padding: 18px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(97, 136, 154, 0.6) transparent;
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 102, 255, 0.07), transparent 34%),
    #0d151a;
}

.fm-live-chat-row {
  width: 100%;
  padding: 1px 0;
}

.fm-live-chat-row[data-direction="server"] {
  justify-content: flex-end;
}

.fm-live-chat-bubble-group {
  max-width: min(78%, 500px);
  display: grid;
  gap: 3px;
}

.fm-live-chat-row[data-direction="server"] .fm-live-chat-bubble-group {
  justify-items: end;
}

.fm-live-chat-bubble {
  color: #eff6fa;
  background: #26343c;
  border-radius: 18px 18px 18px 5px;
  padding: 9px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.fm-live-chat-row[data-direction="server"] .fm-live-chat-bubble {
  color: #fff;
  background: linear-gradient(145deg, #1687ff, #0866ff);
  border-radius: 18px 18px 5px 18px;
}

.fm-live-chat-bubble p {
  color: inherit;
  font-size: 12px;
  line-height: 1.48;
}

.fm-live-chat-message-meta {
  color: #82969f;
  min-height: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  font-size: 8px;
}

.fm-live-chat-row[data-direction="server"] .fm-live-chat-message-meta {
  justify-content: flex-end;
  text-align: right;
}

.fm-live-chat-message-meta time {
  white-space: nowrap;
}

.fm-live-chat-dialog-footer {
  border-top: 1px solid rgba(117, 157, 176, 0.18);
  padding: 7px 10px 10px;
  display: grid;
  gap: 4px;
  background: rgba(18, 29, 36, 0.99);
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.fm-live-dialog-note {
  color: #8398a2;
  margin: 0 48px 0 8px;
  font-size: 8px;
}

.fm-live-chat-feedback {
  color: #9fb1b9;
  min-height: 13px;
  margin: 0 48px 0 8px;
  font-size: 9px;
}

.fm-live-chat-feedback[data-kind="success"] {
  color: #5ce092;
}

.fm-live-chat-feedback[data-kind="error"] {
  color: #ff8a83;
}

.fm-live-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: end;
  gap: 8px;
}

.fm-live-chat-dialog .fm-live-chat-input {
  color: #edf7fb;
  background: #26343c;
  border: 1px solid transparent;
  border-radius: 22px;
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  margin: 0;
  padding: 10px 14px;
  resize: none;
  outline: none;
  overflow-y: auto;
  font: inherit;
  line-height: 1.45;
}

.fm-live-chat-dialog .fm-live-chat-input:focus {
  border-color: rgba(56, 148, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.14);
}

.fm-live-chat-dialog .fm-live-chat-input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.fm-live-chat-send {
  color: #fff;
  background: #0866ff;
  border: 0;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  padding: 0 2px 1px 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  font: 18px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 5px 16px rgba(8, 102, 255, 0.33);
}

.fm-live-chat-send:hover:not(:disabled) {
  background: #2b7cff;
  transform: translateY(-1px);
}

.fm-live-chat-send:focus-visible {
  outline: 2px solid #9dccff;
  outline-offset: 2px;
}

.fm-live-chat-send:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.48;
}

@media (max-width: 680px) {
  .fm-live-panel {
    width: auto;
    max-height: calc(100% - 132px);
    top: 72px;
    left: 8px;
    right: 8px;
  }

  .fm-live-body {
    max-height: calc(100vh - 132px);
  }

  .fm-live-card {
    margin-right: 8px;
    margin-left: 8px;
  }

  .fm-live-window,
  .fm-live-window[data-window] {
    top: auto !important;
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
    max-height: calc(100vh - 88px);
    margin: 0;
    resize: none;
  }

  .fm-live-window[data-maximized="true"] {
    inset: 8px !important;
    width: auto !important;
    height: auto !important;
    max-width: none;
    max-height: none !important;
  }

  .fm-live-window-header {
    cursor: default;
    touch-action: auto;
  }

  [data-movable-panel-handle="true"] {
    cursor: default;
    touch-action: auto;
    user-select: auto;
  }

  .fm-live-window-content {
    max-height: calc(100vh - 134px);
  }

  .fm-live-chat-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 12px;
  }

  .fm-live-chat-dialog-surface {
    min-height: 0;
    max-height: none;
  }

  .fm-live-chat-dialog-header {
    min-height: 62px;
    padding: 8px 10px;
  }

  .fm-live-chat-avatar {
    width: 38px;
    height: 38px;
  }

  .fm-live-dialog-feed {
    padding-right: 10px;
    padding-left: 10px;
  }

  .fm-live-chat-bubble-group {
    max-width: 84%;
  }

  .fm-live-dialog-note,
  .fm-live-chat-feedback {
    margin-right: 44px;
  }

  .mesh-metrics {
    display: none !important;
  }
}
