:root {
  --ft-bg: #0c1222;
  --ft-bar: linear-gradient(180deg, #152238 0%, #0c1222 100%);
  --ft-surface: rgba(8, 15, 28, 0.84);
  --ft-surface-2: rgba(15, 23, 42, 0.82);
  --ft-border: rgba(125, 211, 252, 0.2);
  --ft-accent: #38bdf8;
  --ft-muted: #94a3b8;
  --ft-scrollbar-track: rgba(8, 15, 28, 0.88);
  --ft-scrollbar-thumb: rgba(56, 189, 248, 0.55);
  --ft-scrollbar-thumb-hover: rgba(125, 211, 252, 0.72);
  --ft-scrollbar-thumb-edge: rgba(15, 23, 42, 0.65);
  --ft-scrollbar-glow: rgba(56, 189, 248, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--ft-bg);
  color: #e2e8f0;
}

body.embed {
  --ft-bg: #0a0f18;
}

/* Scrollbars — Firefox + WebKit (side panel, alert feed, themed utility) */
.ft-sidepanel,
.ft-feed,
.ft-scroll-themed {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--ft-scrollbar-thumb) var(--ft-scrollbar-track);
}

.ft-sidepanel::-webkit-scrollbar,
.ft-feed::-webkit-scrollbar,
.ft-scroll-themed::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.ft-sidepanel::-webkit-scrollbar-track,
.ft-feed::-webkit-scrollbar-track,
.ft-scroll-themed::-webkit-scrollbar-track {
  margin: 4px 0;
  background: linear-gradient(90deg, var(--ft-scrollbar-track), rgba(15, 23, 42, 0.75));
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.ft-sidepanel::-webkit-scrollbar-thumb,
.ft-feed::-webkit-scrollbar-thumb,
.ft-scroll-themed::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(125, 211, 252, 0.55) 0%,
    rgba(56, 189, 248, 0.5) 40%,
    rgba(14, 165, 233, 0.42) 100%
  );
  border-radius: 999px;
  border: 2px solid var(--ft-scrollbar-thumb-edge);
  box-shadow:
    0 0 12px var(--ft-scrollbar-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  background-clip: padding-box;
}

.ft-sidepanel::-webkit-scrollbar-thumb:hover,
.ft-feed::-webkit-scrollbar-thumb:hover,
.ft-scroll-themed::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(186, 230, 253, 0.75) 0%,
    rgba(125, 211, 252, 0.65) 45%,
    rgba(56, 189, 248, 0.55) 100%
  );
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow:
    0 0 16px rgba(56, 189, 248, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ft-sidepanel::-webkit-scrollbar-thumb:active,
.ft-feed::-webkit-scrollbar-thumb:active,
.ft-scroll-themed::-webkit-scrollbar-thumb:active {
  background: rgba(56, 189, 248, 0.65);
}

.ft-sidepanel::-webkit-scrollbar-corner,
.ft-feed::-webkit-scrollbar-corner,
.ft-scroll-themed::-webkit-scrollbar-corner {
  background: var(--ft-scrollbar-track);
}

.ft-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.ft-bar,
.ft-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  padding: 0.42rem 0.85rem;
  background: var(--ft-bar);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  font-size: 0.78rem;
  color: var(--ft-muted);
  position: relative;
  z-index: 40;
  overflow: visible;
}

.ft-toolbar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 24, 0.96));
}

.ft-toolbar-toggles {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.ft-hemisphere-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #dbeafe;
  font-size: 0.8rem;
}

.ft-hemisphere-label-text {
  white-space: nowrap;
  font-weight: 600;
  color: #94a3b8;
}

.ft-hemisphere-select {
  min-width: 11.5rem;
}

.ft-bar strong {
  color: #e0f2fe;
  font-weight: 600;
}

.ft-bar a {
  color: var(--ft-accent);
  font-weight: 600;
  text-decoration: none;
  margin-left: auto;
}

.ft-bar .ft-copy-share-link {
  flex-shrink: 0;
}

.ft-bar a:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

.ft-status {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.72rem;
  color: #64748b;
  min-width: 12rem;
  max-width: 44rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ft-input,
.ft-select {
  appearance: none;
  min-width: 0;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  padding: 0.42rem 0.7rem;
  font: inherit;
}

.ft-form-grid .ft-select {
  height: 2.2rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  line-height: 1.2;
}

.ft-input {
  width: min(20rem, 100%);
}

.ft-select {
  min-width: 9rem;
  cursor: pointer;
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
}

.ft-inline-toggle,
.ft-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #dbeafe;
  font-size: 0.8rem;
  cursor: pointer;
}

.ft-inline-toggle input,
.ft-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: #38bdf8;
  cursor: pointer;
}

.ft-layer-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.9rem;
  margin-top: 0.75rem;
}

.ft-layer-toggle-wrap {
  display: contents;
}

.ft-layer-toggle-item {
  min-height: 2.25rem;
  align-items: flex-start;
  line-height: 1.25;
}

.ft-layer-toggle-item span {
  display: inline-block;
}

.ft-chip,
.ft-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #dbeafe;
  font-size: 0.72rem;
  white-space: nowrap;
}

.ft-map {
  flex: 1;
  min-height: 0;
  position: relative;
}

#cesiumContainer {
  position: absolute;
  inset: 0;
}

.cesium-viewer-infoBoxContainer {
  z-index: 24;
  pointer-events: auto;
}

.cesium-infoBox {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.45);
}

.cesium-infoBox .cesium-infoBox-close {
  top: 0.55rem;
  right: 0.55rem;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
}

.cesium-infoBox .cesium-infoBox-close:hover,
.cesium-infoBox .cesium-infoBox-close:focus-visible {
  background: #ffffff;
  border-color: rgba(56, 189, 248, 0.45);
  color: #0369a1;
}

.cesium-infoBox .cesium-infoBox-close:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 2px;
}

.ft-sidepanel,
.ft-playback {
  position: absolute;
  z-index: 5;
  border: 1px solid var(--ft-border);
  background: var(--ft-surface);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.45);
}

.ft-sidepanel-wrap {
  top: 0.9rem;
  bottom: 0.9rem;
  left: 0.9rem;
  position: absolute;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 0;
  max-height: 100%;
}

.ft-sidepanel {
  position: relative;
  width: min(24rem, calc(100vw - 2rem));
  max-height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 16px;
  padding: 0.8rem;
  transition: transform 180ms ease, opacity 180ms ease;
}

.ft-sidepanel-toggle {
  position: absolute;
  top: 1.15rem;
  left: calc(100% - 0.2rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 7rem;
  padding: 0.7rem 0.45rem;
  border: 1px solid var(--ft-border);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: rgba(8, 15, 28, 0.92);
  color: #dbeafe;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.32);
}

.ft-sidepanel-toggle-text {
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 700;
}

.ft-sidepanel-wrap:not(.ft-sidepanel-open) .ft-sidepanel {
  transform: translateX(calc(-100% - 1rem));
  opacity: 0;
  pointer-events: none;
}

.ft-sidepanel-wrap:not(.ft-sidepanel-open) .ft-sidepanel-toggle {
  left: 0;
}

.ft-panel + .ft-panel {
  margin-top: 0.8rem;
}

.ft-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ft-panel-header h2 {
  margin: 0;
  font-size: 0.92rem;
  color: #f8fafc;
}

.ft-panel-grid,
.ft-form-grid,
.ft-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.ft-watch-list-grid {
  align-items: center;
}

.ft-watch-list-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ft-map-alert-only-wrap {
  margin-top: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.ft-mini,
.ft-metric {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--ft-surface-2);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.ft-mini-label,
.ft-metric-label,
.ft-list-title {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ft-mini-value,
.ft-metric-value {
  display: block;
  margin-top: 0.24rem;
  font-size: 0.94rem;
  color: #e2e8f0;
  font-weight: 600;
}

.ft-list-block {
  margin-top: 0.8rem;
}

.ft-list,
.ft-feed {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ft-feed {
  max-height: min(12rem, 40vh);
  overflow: auto;
}

.ft-alert-feed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
}

.ft-alert-feed-header .ft-list-title {
  margin: 0;
}

.ft-alert-feed-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.ft-alert-feed-actions .ft-inline-toggle {
  margin: 0;
  font-size: 0.72rem;
}

.ft-help-mini {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #94a3b8;
}

.ft-alert-queue-note {
  color: #7dd3fc;
}

.ft-card {
  position: absolute;
  z-index: 30; /* above Cesium default buttons + planning strip (7); aircraft info is interactive */
  top: 0.9rem;
  right: 0.9rem;
  width: min(24rem, calc(100vw - 2rem));
  padding: 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--ft-border);
  background: var(--ft-surface);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.45);
}

.ft-card[hidden] {
  display: none;
}

.ft-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ft-card-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7dd3fc;
}

.ft-card-title {
  margin: 0.18rem 0 0;
  font-size: 1.16rem;
  line-height: 1.1;
  color: #f8fafc;
}

.ft-card-close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ft-coords,
.ft-ref-grid {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
}

.ft-coords {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78rem;
}

.ft-ref-grid {
  font-size: 0.78rem;
}

.ft-ref-row {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
}

.ft-ref-row + .ft-ref-row {
  margin-top: 0.45rem;
}

.ft-ref-row span {
  color: #94a3b8;
}

.ft-card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.ft-btn {
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.24), rgba(8, 47, 73, 0.3));
  color: #e0f2fe;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.ft-btn-small {
  padding: 0.4rem 0.7rem;
  font-size: 0.76rem;
}

.ft-btn-secondary {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.82);
  color: #cbd5e1;
}

.ft-btn.is-active {
  border-color: rgba(74, 222, 128, 0.45);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.25), rgba(20, 83, 45, 0.34));
  color: #dcfce7;
}

.ft-legend {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.8rem;
  color: #94a3b8;
  font-size: 0.72rem;
}

.ft-dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  margin-right: 0.22rem;
  border-radius: 999px;
}

.ft-dot-low {
  background: #38bdf8;
}

.ft-dot-mid {
  background: #f59e0b;
}

.ft-dot-high {
  background: #ef4444;
}

.ft-playback {
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
}

.ft-range {
  flex: 1;
  min-width: 7rem;
}

.ft-playback-status {
  font-size: 0.76rem;
  color: #dbeafe;
  min-width: 10rem;
  text-align: right;
}

body.embed .ft-bar {
  padding: 0.35rem 0.65rem;
}

body.embed .ft-bar a {
  display: none;
}

/* Title + status + stale + copy link row — too cramped on phones / small laptops */
@media (max-width: 1024px) {
  .ft-bar {
    display: none !important;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) and (max-height: 800px) {
  .ft-bar {
    display: none !important;
  }
}

@media (max-width: 1080px) {
  .ft-sidepanel {
    width: min(21rem, calc(100vw - 2rem));
  }

  .ft-card {
    width: min(22rem, calc(100vw - 2rem));
  }
}

@media (max-width: 720px) {
  .ft-sidepanel {
    width: min(20rem, calc(100vw - 3.8rem));
    max-height: 100%;
  }

  .ft-sidepanel-wrap {
    top: 0.6rem;
    bottom: 0.6rem;
    left: 0.6rem;
  }

  .ft-sidepanel-wrap.ft-sidepanel-open .ft-sidepanel-toggle {
    left: calc(100% - 0.1rem);
  }

  .ft-sidepanel-wrap:not(.ft-sidepanel-open) .ft-sidepanel-toggle {
    left: 0;
  }

  .ft-sidepanel-toggle {
    top: 0.9rem;
    height: 6rem;
  }

  .ft-sidepanel-wrap:not(.ft-sidepanel-open) .ft-sidepanel {
    transform: translateX(calc(-100% - 0.8rem));
  }

  .ft-card {
    top: auto;
    right: 0.6rem;
    left: 0.6rem;
    bottom: 4.75rem;
    width: auto;
  }

  .ft-playback {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    flex-wrap: wrap;
  }

  .ft-playback-status {
    min-width: 0;
    text-align: left;
  }
}

/* Replay bar (Load last 5m / timeline) — hidden unless ?replay=1 */
.ft-playback {
  display: none !important;
}

body.ft-replay-bar-on .ft-playback {
  display: flex !important;
}

.ft-stale-chip {
  font-size: 0.72rem;
  color: var(--ft-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.ft-toast {
  position: absolute;
  bottom: 5.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  max-width: min(28rem, 92vw);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--ft-border);
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.ft-panel-layers .ft-help-mini {
  margin-top: 0.35rem;
}

.ft-diagnostics {
  font-size: 0.78rem;
}

.ft-diagnostics-body {
  line-height: 1.5;
}

.ft-terms {
  margin: 0.85rem 0 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--ft-muted);
}

/* Mission / route planning (Cesium draw overlay) — large viewports only (see min-width below) */
.ft-mission-wrap {
  display: none;
  position: absolute;
  z-index: 7;
  top: 0.7rem;
  right: 0.7rem;
  width: min(20rem, calc(100% - 2rem - min(24rem, 42vw)));
  max-height: min(60vh, 28rem);
  flex-direction: column;
  gap: 0.45rem;
  pointer-events: auto;
  font-size: 0.76rem;
}

@media (min-width: 1200px) {
  .ft-mission-wrap {
    display: flex;
  }
}

.ft-mission-kicker {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c4b5fd;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.6);
}

.ft-mission-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.35rem;
  align-items: center;
  padding: 0.4rem 0.45rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(12, 18, 32, 0.88);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(10px);
}

.ft-mission-tool,
.ft-mission-finish {
  min-height: 1.85rem;
  padding: 0.2rem 0.55rem;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 27, 75, 0.5);
  color: #e9d5ff;
  cursor: pointer;
  line-height: 1.2;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}

.ft-mission-tool:hover,
.ft-mission-finish:hover {
  background: rgba(55, 48, 116, 0.78);
  border-color: rgba(196, 181, 253, 0.45);
}

.ft-mission-tool-active {
  background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 100%);
  border-color: #a78bfa;
  color: #faf5ff;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2);
}

.ft-mission-finish:not([hidden]) {
  border-color: #c4b5fd;
  color: #faf5ff;
  background: linear-gradient(180deg, #5b21b6 0%, #4c1d95 100%);
}

.ft-mission-finish[hidden] {
  display: none;
}

.ft-mission-hint {
  margin: 0;
  padding: 0.2rem 0.25rem 0.1rem 0.15rem;
  line-height: 1.3;
  color: #c4b5fd;
  font-size: 0.68rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

.ft-mission-drawing {
  max-height: 9.5rem;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(88, 28, 135, 0.35);
  background: rgba(3, 7, 18, 0.72);
  padding: 0.4rem 0.45rem 0.45rem 0.55rem;
  color: #e9d5ff;
  font-size: 0.68rem;
  line-height: 1.35;
}

.ft-mission-drawing .ft-mission-total {
  margin: 0 0 0.2rem 0;
  color: #f0abfc;
  font-weight: 600;
  font-size: 0.72rem;
}

.ft-mission-drawing .ft-mission-total-sub {
  margin: 0 0 0.2rem 0;
  color: #94a3b8;
  font-size: 0.64rem;
}

.ft-mission-drawing .ft-mission-ol {
  margin: 0;
  padding-left: 1.1rem;
}

.ft-mission-drawing .ft-mission-delta {
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
}

.ft-mission-side {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 0;
}

#ft-mission-info {
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(6, 10, 20, 0.85);
  padding: 0.4rem 0.45rem 0.45rem 0.55rem;
  overflow: auto;
  max-height: 11rem;
}

#ft-mission-info[hidden] {
  display: none !important;
}

.ft-mission-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

#ft-mission-info-title,
.ft-mission-info-title {
  margin: 0;
  font-size: 0.8rem;
  color: #faf5ff;
  font-weight: 700;
  line-height: 1.2;
}

#ft-mission-vertices p,
#ft-mission-vertices {
  line-height: 1.4;
  font-size: 0.7rem;
  color: #ede9fe;
  margin: 0.15rem 0 0 0;
}

#ft-mission-vertices .ft-mission-ol,
.ft-mission-ol {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
}

#ft-mission-vertices .ft-mission-total,
.ft-mission-vertices .ft-mission-total {
  color: #f0abfc;
  font-weight: 600;
}

.ft-mission-info-actions .ft-btn {
  min-height: 1.5rem;
  font-size: 0.64rem;
}

.ft-mission-terms {
  margin: 0;
  font-size: 0.6rem;
  line-height: 1.3;
  color: #64748b;
  max-width: 100%;
}

.ft-mission-bottom {
  display: flex;
  justify-content: flex-end;
}

@media (min-width: 1200px) {
  body.embed .ft-mission-wrap {
    right: 0.45rem;
    top: 0.5rem;
    max-height: 45vh;
  }
}

@media (max-width: 720px) {
  .ft-layer-toggles {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .ft-sidepanel .ft-inline-toggle {
    min-height: 2.75rem;
    align-items: center;
  }

  .ft-sidepanel .ft-inline-toggle input[type='checkbox'] {
    width: 1.15rem;
    height: 1.15rem;
  }
}
