:root {
  color-scheme: dark;
  --bg: #0b1118;
  --card: #111a24;
  --edge: #243244;
  --text: #e9f0f8;
  --muted: #9ab0c8;
  --accent: #3e8eff;
  --ok: #2fbf71;
  --warning: #d6a341;
  --danger: #d95e5e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top, #15253a 0%, var(--bg) 60%);
  color: var(--text);
}

.mvp-breadcrumb {
  width: min(1050px, 94vw);
  margin: 18px auto 0;
  font-size: 0.9rem;
}

.mvp-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.mvp-breadcrumb a:hover {
  text-decoration: underline;
}

.mvp-breadcrumb-sep {
  color: var(--muted);
  user-select: none;
}

.container {
  width: min(1050px, 94vw);
  margin: 28px auto;
  display: grid;
  gap: 14px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.page-header h1 {
  margin: 0;
  font-size: 1.7rem;
}

.page-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.ar-overwatch-header-status {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: min(420px, 42vw);
}

.ar-overwatch-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 18px;
}

.ar-overwatch-header-status .mvp-cloud-sync {
  width: max-content;
  max-width: min(440px, 42vw);
  margin-top: 2px;
  padding: 6px 10px;
  border: 1px solid rgba(92, 209, 138, 0.34);
  border-radius: 999px;
  background: rgba(18, 36, 28, 0.72);
  justify-content: flex-end;
  text-align: right;
  color: #d8f6e3;
}

.badge {
  border: 1px solid #537198;
  background: #182637;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}

button.badge {
  color: #e6f1ff;
}

.card {
  background: linear-gradient(180deg, #162332, var(--card));
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 14px;
}

.mission-session-idle-hint {
  margin: 0 0 12px;
  max-width: 72ch;
  line-height: 1.45;
}

.mission-session-active-summary {
  margin: 0 0 12px;
  line-height: 1.45;
}

.mission-session-active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mission-lifecycle-indicator {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.mission-lifecycle-indicator > .mission-lifecycle-step {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9fb4c7;
  font-size: 0.82rem;
  line-height: 1.2;
}

.mission-lifecycle-indicator > .mission-lifecycle-step::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(159, 180, 199, 0.42);
}

.mission-lifecycle-indicator > .mission-lifecycle-step.is-complete {
  color: #8ef7cf;
}

.mission-lifecycle-indicator > .mission-lifecycle-step.is-complete::before {
  background: #2ad39c;
}

.mission-lifecycle-indicator > .mission-lifecycle-step.is-current {
  color: #dff1ff;
  font-weight: 600;
}

.mission-lifecycle-indicator > .mission-lifecycle-step.is-current::before {
  background: #4cc2ff;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.toolbar p {
  margin: 0;
}

#appSection > .card + .card {
  margin-top: 16px;
}

.mvp-overwatch-top-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.8fr);
  gap: 12px;
  align-items: start;
  margin: 0 0 12px;
}

.mvp-overwatch-top-row > .card {
  margin: 0;
}

.mvp-overwatch-top-row:has(.mission-lifecycle-section[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.mvp-cloud-sync {
  margin: 0;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.mvp-cloud-sync::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mvp-cloud-sync.mvp-cloud-sync--pending::before {
  background: #e8a542;
  box-shadow: 0 0 0 2px rgba(232, 165, 66, 0.35);
}

.mvp-cloud-sync.mvp-cloud-sync--synced::before {
  background: #5cd18a;
}

.mvp-cloud-sync.mvp-cloud-sync--offline::before {
  background: #6b8fb3;
}

.mvp-pilot-pull-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  width: 100%;
  max-width: 420px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.mvp-pilot-pull-label {
  display: block;
}

.mvp-pilot-pull-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(120, 150, 185, 0.22);
  overflow: hidden;
}

.mvp-pilot-pull-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a8fd4, #6bc4a8);
  transition: width 0.25s ease;
}

.mvp-pilot-pull-panel.mvp-pilot-pull-panel--ready .mvp-pilot-pull-track {
  background: rgba(92, 209, 138, 0.22);
}

.mvp-pilot-pull-panel.mvp-pilot-pull-panel--ready .mvp-pilot-pull-fill {
  background: linear-gradient(90deg, #3d9a6a, #5cd18a);
}

/* DO-NOT-RELOAD banner: shown whenever un-synced mission data could be lost by refreshing. */
.do-not-reload-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #f0a13a;
  background: rgba(232, 165, 66, 0.16);
  color: #ffd9a6;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgba(232, 165, 66, 0.2) inset;
}

/*
 * Must override `display: flex` above: otherwise `[hidden]` is ineffective (same specificity,
 * later rule wins) and the "hidden" branch in JS still leaves a visible yellow strip + default title.
 */
.do-not-reload-banner[hidden] {
  display: none !important;
}

.do-not-reload-banner.do-not-reload-banner--critical {
  border-color: #ff5b5b;
  background: rgba(255, 91, 91, 0.18);
  color: #ffd1d1;
  animation: do-not-reload-pulse 1.8s ease-in-out infinite;
}

@keyframes do-not-reload-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 91, 91, 0.35) inset, 0 0 0 0 rgba(255, 91, 91, 0); }
  50% { box-shadow: 0 0 0 1px rgba(255, 91, 91, 0.55) inset, 0 0 12px 0 rgba(255, 91, 91, 0.55); }
}

.do-not-reload-banner-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.do-not-reload-banner-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.do-not-reload-banner-title {
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.do-not-reload-banner-text {
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.95;
}

.do-not-reload-banner-action {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.do-not-reload-banner-action:hover:not([disabled]) {
  background: currentColor;
  color: #111a24;
}

.do-not-reload-banner-action:active:not([disabled]) {
  transform: translateY(1px);
}

.do-not-reload-banner-action[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* Mission Overwatch: subtle notice when the browser reports no internet (LAN bridge may still work). */
.mvp-network-offline-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #3d5270;
  background: rgba(20, 32, 52, 0.85);
  color: #b8c8e6;
  line-height: 1.45;
}

.mvp-network-offline-banner[hidden] {
  display: none !important;
}

.form-grid[hidden] {
  display: none !important;
}

.mission-lifecycle-section {
  display: grid;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

.mission-lifecycle-section[hidden] {
  display: none !important;
}

.mission-lifecycle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.mission-lifecycle-head h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0;
}

.mission-lifecycle-current {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
}

.mission-lifecycle-next {
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid rgba(88, 166, 255, 0.5);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(13, 35, 62, 0.82);
  color: #d8e8ff;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
}

.mission-lifecycle-next:empty {
  display: none;
}

.mission-lifecycle-steps {
  --mission-lifecycle-line: rgba(85, 110, 140, 0.58);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.mission-lifecycle-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "marker label"
    "marker state";
  align-items: center;
  column-gap: 9px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid rgba(90, 120, 155, 0.38);
  border-radius: 8px;
  background: rgba(14, 23, 34, 0.76);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.mission-lifecycle-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 1px);
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--mission-lifecycle-line);
}

.mission-lifecycle-step.is-complete {
  border-color: rgba(63, 185, 80, 0.62);
  background: rgba(20, 54, 39, 0.58);
}

.mission-lifecycle-step.is-current {
  border-color: rgba(88, 166, 255, 0.86);
  background: rgba(18, 47, 86, 0.72);
  box-shadow:
    0 0 0 1px rgba(88, 166, 255, 0.16) inset,
    0 0 18px rgba(88, 166, 255, 0.12);
}

.mission-lifecycle-step.is-upcoming {
  opacity: 0.72;
}

.mission-lifecycle-marker {
  grid-area: marker;
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(145, 165, 190, 0.46);
  color: rgba(170, 188, 210, 0.9);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.mission-lifecycle-step.is-complete .mission-lifecycle-marker {
  border-color: #3fb950;
  color: #68e582;
}

.mission-lifecycle-step.is-current .mission-lifecycle-marker {
  border-color: #38d9c7;
  color: #38d9c7;
}

.mission-lifecycle-label {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-lifecycle-state {
  grid-area: state;
  color: rgba(175, 189, 207, 0.88);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.mission-lifecycle-indicator {
  display: none;
}

.sticky-summary {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 18px;
  align-items: center;
  background: rgba(17, 26, 36, 0.95);
  backdrop-filter: blur(4px);
}

.mission-lifecycle-section + #persistentHeader.sticky-summary {
  padding-top: 22px;
}

.sticky-summary p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sticky-summary strong {
  color: var(--text);
}

.mission-rename-button,
.mission-livestream-button,
.mission-share-button {
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.2;
  vertical-align: middle;
}

.mission-collaborator-badge {
  margin-left: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(88, 166, 255, 0.38);
  border-radius: 999px;
  color: #b8d9ff;
  background: rgba(31, 111, 235, 0.12);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.mission-rename-status {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.mission-rename-status[hidden] {
  display: none !important;
}

#appSection .mvp-ow-custody-intro {
  margin-top: 12px;
  position: relative;
  padding: 14px 16px 14px 18px;
  border-left: 3px solid color-mix(in oklab, var(--accent) 72%, transparent);
  background:
    linear-gradient(
      105deg,
      color-mix(in oklab, var(--accent) 14%, transparent) 0%,
      transparent min(52%, 420px)
    ),
    linear-gradient(180deg, #162332, var(--card));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.12);
}

body.ar-github-ui #appSection .mvp-ow-custody-intro {
  background:
    linear-gradient(
      105deg,
      color-mix(in oklab, var(--accent, #58a6ff) 12%, transparent) 0%,
      transparent min(48%, 400px)
    ),
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--card) 96%, white 4%) 0%,
      var(--card) 55%
    );
  border: 1px solid color-mix(in oklab, var(--edge) 78%, white 9%);
  border-left: 3px solid color-mix(in oklab, var(--accent, #58a6ff) 65%, transparent);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 16px 40px -14px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.mvp-ow-custody-intro-head {
  margin: 0 0 10px;
}

.mvp-ow-custody-intro-badge.mvp-custody-badge {
  margin-right: 0;
  margin-bottom: 0;
  border-color: color-mix(in oklab, var(--accent) 45%, var(--edge));
  background: color-mix(in oklab, var(--card) 88%, var(--accent) 12%);
  color: var(--text);
  letter-spacing: 0.06em;
}

body.ar-github-ui .mvp-ow-custody-intro-badge.mvp-custody-badge {
  border-color: color-mix(in oklab, var(--accent, #58a6ff) 42%, var(--edge, #30363d));
  background: color-mix(in oklab, var(--card, #161b22) 90%, var(--accent, #58a6ff) 10%);
  color: #e6edf3;
}

.mvp-ow-custody-intro-lead {
  margin: 0 0 12px;
  max-width: 78ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
}

.mvp-ow-custody-intro-aar {
  margin: 0;
  max-width: 78ch;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Evidence custody modal (Mission Overwatch): hero + empty-state callouts */
.mvp-custody-modal-hero {
  padding: 12px 14px 14px 16px;
  margin: 0 0 16px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  border-left: 3px solid color-mix(in oklab, var(--accent) 65%, transparent);
  background:
    linear-gradient(
      105deg,
      color-mix(in oklab, var(--accent) 11%, transparent) 0%,
      transparent min(46%, 340px)
    ),
    linear-gradient(180deg, #162332, var(--card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.ar-github-ui .mvp-custody-modal-hero {
  border: 1px solid color-mix(in oklab, var(--edge, #30363d) 82%, var(--accent, #58a6ff) 12%);
  border-left: 3px solid color-mix(in oklab, var(--accent, #58a6ff) 58%, transparent);
  background:
    linear-gradient(
      105deg,
      color-mix(in oklab, var(--accent, #58a6ff) 8%, transparent) 0%,
      transparent min(40%, 300px)
    ),
    var(--color-canvas-subtle, #161b22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mvp-custody-modal-hero-head {
  margin: 0 0 8px;
}

.mvp-custody-modal-hero-badge.mvp-custody-badge {
  margin-right: 0;
  margin-bottom: 0;
  border-color: color-mix(in oklab, var(--accent) 45%, var(--edge));
  background: color-mix(in oklab, var(--card) 88%, var(--accent) 12%);
  color: var(--text);
  letter-spacing: 0.06em;
}

body.ar-github-ui .mvp-custody-modal-hero-badge.mvp-custody-badge {
  border-color: color-mix(in oklab, var(--accent, #58a6ff) 42%, var(--edge, #30363d));
  background: color-mix(in oklab, var(--card, #161b22) 90%, var(--accent, #58a6ff) 10%);
  color: #e6edf3;
}

.mvp-custody-modal-lead {
  margin: 0 0 10px;
  max-width: 72ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
}

.mvp-custody-modal-foot {
  margin: 0;
  max-width: 72ch;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.mvp-custody-modal-tip {
  margin: 0 0 14px;
  max-width: 72ch;
  font-size: 0.78rem;
  line-height: 1.45;
}

.mvp-custody-modal-callout {
  margin: 0 0 12px;
  max-width: 72ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}

.mvp-custody-modal-callout p {
  margin: 0 0 0.65em;
}

.mvp-custody-modal-callout p:last-child {
  margin-bottom: 0;
}

.mvp-custody-modal-callout code {
  font-size: 0.84em;
}

.mvp-custody-modal-err {
  margin-top: 0.5rem;
}

/* Closed-mission review: operator / past mission / executive summary bar scrolls away (not sticky). */
#appSection.past-mission-review #persistentHeader.sticky-summary {
  position: static;
  top: auto;
  z-index: auto;
}

body.ar-github-ui #appSection.past-mission-review #persistentHeader.sticky-summary {
  position: static;
  top: auto;
  z-index: auto;
}

/* Past mission deep-link: read-only event log + report; hide live console blocks */
#appSection.past-mission-review .mvp-overwatch-live-only {
  display: none !important;
}

.closed-mission-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0;
  padding: 4px;
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  background: rgba(6, 12, 20, 0.52);
}

.closed-mission-tabs[hidden] {
  display: none !important;
}

.closed-mission-tab {
  display: block;
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.58rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.closed-mission-tab:hover {
  color: var(--text);
  background: rgba(232, 240, 248, 0.06);
}

.closed-mission-tab:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 78%, white 10%);
  outline-offset: 2px;
}

.closed-mission-tab.is-active,
.closed-mission-tab[aria-selected="true"] {
  border-color: color-mix(in oklab, var(--accent) 82%, white 12%);
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--accent) 46%, #17243a 54%),
    color-mix(in oklab, var(--accent) 28%, #0f1a2a 72%)
  );
  color: #fff;
  box-shadow:
    inset 0 3px 0 #9dccff,
    inset 0 -2px 0 color-mix(in oklab, var(--accent) 90%, white 8%),
    0 0 0 1px rgba(157, 204, 255, 0.2),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

#appSection.past-mission-review[data-closed-mission-tab="timeline"] .mvp-ow-footage-report-stack,
#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-ow-event-log,
#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-ow-report,
#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-ow-ai-review,
#appSection.past-mission-review[data-closed-mission-tab="report"] .mvp-ow-event-log,
#appSection.past-mission-review[data-closed-mission-tab="report"] .mvp-ow-footage,
#appSection.past-mission-review[data-closed-mission-tab="report"] .mvp-ow-ai-review,
#appSection.past-mission-review[data-closed-mission-tab="ai"] .mvp-ow-event-log,
#appSection.past-mission-review[data-closed-mission-tab="ai"] .mvp-ow-footage,
#appSection.past-mission-review[data-closed-mission-tab="ai"] .mvp-ow-report {
  display: none !important;
}

#appSection.past-mission-review .mvp-overwatch-grid {
  grid-template-columns: minmax(0, 1fr);
}

#appSection.past-mission-review .mvp-ow-center-below {
  display: block;
  min-width: 0;
}

/* Pilot-only mission deep-link: hide operator/live relay controls; keep event log, footage, and report visible. */
#appSection.pilot-only-mission-review .mvp-pilot-only-hidden {
  display: none !important;
}

#appSection.pilot-only-mission-review.cloud-live-mission-review .mvp-ow-feed.mvp-pilot-only-hidden {
  display: block !important;
}

.mission-lifecycle-section {
  margin: 12px 0;
}

.mvp-overwatch-top-row .mission-lifecycle-section {
  margin: 0;
}

.mission-lifecycle-section[hidden] {
  display: none !important;
}

.mission-lifecycle-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.mission-lifecycle-head h2 {
  margin: 0 0 4px;
}

.mission-lifecycle-current,
.mission-lifecycle-next {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.mission-lifecycle-next {
  padding: 5px 9px;
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 999px;
  background: rgba(16, 38, 68, 0.42);
  color: var(--text);
  font-weight: 700;
}

.mission-lifecycle-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-lifecycle-steps[data-lifecycle-terminal="approved"] {
  grid-template-columns: minmax(0, 1fr);
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-head {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-head h2 {
  margin: 0;
  white-space: nowrap;
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-steps {
  flex: 0 1 auto;
  display: flex;
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 0;
  padding: 7px 10px;
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-marker {
  width: 22px;
  height: 22px;
}

.mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-state {
  margin-left: 2px;
}

.mission-lifecycle-step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "marker label"
    "marker state";
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid rgba(150, 170, 190, 0.26);
  border-radius: 8px;
  background: rgba(18, 32, 46, 0.52);
}

.mission-lifecycle-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 9px;
  border-top: 1px solid rgba(150, 170, 190, 0.36);
}

.mission-lifecycle-step:last-child::after {
  content: none;
}

.mission-lifecycle-marker {
  grid-area: marker;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(150, 170, 190, 0.38);
  color: rgba(215, 228, 240, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.mission-lifecycle-label {
  grid-area: label;
  min-width: 0;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.mission-lifecycle-state {
  grid-area: state;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.mission-lifecycle-step.is-complete {
  border-color: rgba(115, 245, 154, 0.38);
  background: rgba(22, 78, 38, 0.28);
}

.mission-lifecycle-step.is-complete .mission-lifecycle-marker {
  border-color: rgba(115, 245, 154, 0.62);
  background: rgba(22, 78, 38, 0.6);
  color: #73f59a;
}

.mission-lifecycle-step.is-current {
  border-color: rgba(88, 166, 255, 0.64);
  background: rgba(18, 48, 92, 0.48);
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.16), 0 0 18px rgba(88, 166, 255, 0.14);
}

.mission-lifecycle-step.is-current .mission-lifecycle-marker {
  border-color: rgba(110, 168, 255, 0.7);
  background: rgba(31, 74, 128, 0.78);
  color: #dbeafe;
}

.mission-lifecycle-step.is-current.is-aar-generated .mission-lifecycle-marker {
  border-color: rgba(255, 209, 102, 0.68);
  background: rgba(72, 52, 14, 0.72);
  color: #ffd166;
}

.mission-lifecycle-step.is-current.is-sealed .mission-lifecycle-marker {
  border-color: rgba(197, 163, 255, 0.68);
  background: rgba(54, 34, 86, 0.72);
  color: #c5a3ff;
}

.mission-lifecycle-step.is-current.is-submitted .mission-lifecycle-marker {
  border-color: rgba(85, 214, 190, 0.68);
  background: rgba(14, 58, 54, 0.72);
  color: #55d6be;
}

.mission-lifecycle-step.is-current.is-approved .mission-lifecycle-marker {
  border-color: rgba(115, 245, 154, 0.7);
  background: rgba(22, 78, 38, 0.72);
  color: #73f59a;
}

.mission-lifecycle-step.is-current.is-returned .mission-lifecycle-marker,
.mission-lifecycle-step.is-current.is-cancelled .mission-lifecycle-marker {
  border-color: rgba(255, 159, 110, 0.68);
  background: rgba(80, 42, 24, 0.72);
  color: #ff9f6e;
}

.mission-lifecycle-step.is-upcoming {
  opacity: 0.74;
}

/* Closed missions: selected review tab owns the full content width. */
#appSection.past-mission-review .mvp-ow-event-log.span-2 {
  grid-column: 1 / -1;
  min-width: 0;
}

#appSection.past-mission-review .mvp-ow-event-log,
#appSection.past-mission-review .mvp-ow-footage-report-stack {
  align-self: start;
}

#appSection.past-mission-review .mvp-ow-footage-report-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
  min-width: 0;
}

#appSection.past-mission-review .mvp-ow-footage-report-stack > .card {
  width: 100%;
  min-width: 0;
}

#appSection.past-mission-review .mvp-ow-report {
  min-width: 0;
  overflow: hidden;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-ow-footage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-media-column {
  min-width: 0;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mission-review-step-head {
  grid-column: 1 / -1;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-media-column > h2,
#appSection.past-mission-review[data-closed-mission-tab="media"] .mission-photo-head h2 {
  margin-bottom: 0;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-media-column--footage {
  display: grid;
  gap: 10px;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-media-column--footage .footage-upload-row {
  margin: 0;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] #missionFootageUploadProgressWrap {
  margin-top: 0;
}

#appSection.past-mission-review[data-closed-mission-tab="media"] .mission-photo-head {
  margin-top: 0;
}

#appSection.mission-media-locked .mvp-media-column--footage > .footage-upload-row,
#appSection.mission-media-locked .mvp-media-column--footage > .footage-import-timing-note,
#appSection.mission-media-locked .mission-photo-head > .footage-upload-row,
#appSection.mission-media-locked .mission-photo-guest-qr-wrap {
  display: none !important;
}

.mission-ai-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.mission-ai-review-head h2 {
  margin-bottom: 0.25rem;
}

.mission-ai-review-head > .mission-ai-review-subtabs {
  display: inline-flex;
  margin-top: 0;
}

.mission-ai-review-completion {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.mission-ai-review-completion button {
  flex-shrink: 0;
}

.mission-ai-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 12px 0;
}

.mission-ai-analysis-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.mission-ai-analysis-modes legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mission-ai-analysis-mode {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  background: rgba(7, 14, 23, 0.48);
  cursor: pointer;
}

.mission-ai-analysis-mode:has(input:checked) {
  border-color: color-mix(in oklab, var(--accent) 64%, white 8%);
  background: color-mix(in oklab, rgba(7, 14, 23, 0.68) 84%, var(--accent) 16%);
}

.mission-ai-analysis-mode input {
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: var(--accent);
}

.mission-ai-analysis-mode span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mission-ai-analysis-mode strong {
  color: var(--text);
  font-size: 0.84rem;
}

.mission-ai-analysis-mode small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.mission-ai-analysis-modes:disabled .mission-ai-analysis-mode,
.mission-ai-analysis-mode:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
}

.mission-ai-analysis-progress {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in oklab, var(--accent) 34%, var(--edge));
  border-radius: 8px;
  background: color-mix(in oklab, rgba(7, 14, 23, 0.72) 88%, var(--accent) 12%);
}

.mission-ai-analysis-progress.is-active {
  border-color: color-mix(in oklab, var(--accent) 72%, var(--edge));
  border-left-width: 4px;
}

.mission-ai-analysis-progress-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1rem;
}

.mission-ai-analysis-spinner {
  display: none;
}

.is-active > .mission-ai-analysis-progress-title > .mission-ai-analysis-spinner {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid color-mix(in oklab, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: mission-ai-analysis-spin 1s linear infinite;
}

.mission-ai-analysis-progress-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

@keyframes mission-ai-analysis-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .is-active > .mission-ai-analysis-progress-title > .mission-ai-analysis-spinner {
    animation: none;
  }
}

#missionAiReviewStatus.is-prominent {
  margin: 0.85rem 0;
  padding: 0.9rem 1rem 0.95rem;
  border: 1px solid color-mix(in oklab, var(--accent) 72%, white 12%);
  border-left-width: 4px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--accent) 18%, rgba(10, 18, 30, 0.96)),
    rgba(10, 18, 30, 0.88)
  );
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 550;
  line-height: 1.5;
}

#missionAiReviewStatus.is-prominent::before {
  content: attr(data-heading);
  display: block;
  margin-bottom: 0.2rem;
  color: color-mix(in oklab, var(--accent) 58%, white 42%);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mission-ai-analysis-progress[hidden],
.mission-ai-analysis-progress progress[hidden],
.mission-ai-analysis-progress-head strong[hidden] {
  display: none;
}

.mission-ai-analysis-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.mission-ai-analysis-progress-head strong {
  flex: 0 0 auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mission-ai-analysis-progress progress {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: color-mix(in oklab, var(--edge) 78%, transparent);
  accent-color: var(--accent);
}

.mission-ai-analysis-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: color-mix(in oklab, var(--edge) 78%, transparent);
}

.mission-ai-analysis-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 68%, white));
}

.mission-ai-analysis-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 68%, white));
}

.mission-ai-review-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  background: color-mix(in oklab, rgba(7, 14, 23, 0.92) 86%, var(--panel) 14%);
}

.mission-ai-review-subtab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0;
}

.mission-ai-review-subtab:hover,
.mission-ai-review-subtab:focus-visible {
  color: var(--text);
  border-color: color-mix(in oklab, var(--accent) 42%, var(--edge));
}

.mission-ai-review-subtab.is-active {
  color: var(--text);
  border-color: color-mix(in oklab, var(--ok) 54%, var(--edge));
  background:
    linear-gradient(180deg, rgba(50, 211, 159, 0.18), rgba(21, 99, 117, 0.12)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 1px rgba(50, 211, 159, 0.08) inset;
}

.mission-ai-review-subpanel {
  margin-top: 12px;
}

.mission-ai-ask-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
  align-items: start;
}

.mission-ai-ask-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.mission-ai-demo-panel,
.mission-ai-question-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(50, 211, 159, 0.12), rgba(14, 32, 47, 0.12) 44%, rgba(245, 171, 53, 0.08)),
    rgba(7, 14, 23, 0.58);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.mission-ai-demo-panel {
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(62, 142, 255, 0.12), rgba(50, 211, 159, 0.08)),
    rgba(7, 14, 23, 0.5);
}

.mission-ai-demo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-ai-demo-head h3 {
  margin: 0;
  font-size: 0.94rem;
}

.mission-ai-demo-head p {
  margin: 0;
}

.mission-ai-demo-head .error {
  color: color-mix(in oklab, var(--danger) 84%, white 12%);
}

.mission-ai-demo-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mission-ai-demo-actions button {
  min-height: 42px;
  padding-inline: 0.55rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mission-ai-question-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.mission-ai-question-head label {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.mission-ai-question-head p {
  margin: 0.2rem 0 0;
}

.mission-ai-question-head .is-cache-hit {
  color: color-mix(in oklab, var(--ok) 78%, white 18%);
}

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

.mission-ai-question-row textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border-color: color-mix(in oklab, var(--edge) 76%, white 8%);
  background: rgba(4, 10, 18, 0.62);
}

.mission-ai-question-row button {
  min-width: 104px;
}

.mission-ai-question-answer {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  border-top: 1px solid color-mix(in oklab, var(--edge) 78%, white 8%);
  padding-top: 10px;
}

.mission-ai-question-answer.error {
  color: color-mix(in oklab, var(--danger) 82%, white 12%);
}

.mission-ai-question-answer p,
.mission-ai-question-answer ul {
  margin: 0;
}

.mission-ai-question-answer ul {
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.mission-ai-question-answer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mission-ai-question-answer-head strong {
  color: var(--text);
}

.mission-ai-question-answer-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mission-ai-question-answer-frame {
  display: grid;
  gap: 5px;
  margin: 2px 0;
}

.mission-ai-question-answer-frame a {
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--edge) 78%, white 10%);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.mission-ai-question-answer-frame img,
.mission-ai-question-answer-frame svg {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.mission-ai-question-answer-frame figcaption {
  color: var(--muted);
  font-size: 0.74rem;
}

.mission-ai-question-sources {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.mission-ai-question-sources p {
  overflow-wrap: anywhere;
}

.mission-ai-question-history-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(50, 211, 159, 0.04)),
    rgba(4, 10, 18, 0.46);
}

.mission-ai-question-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mission-ai-question-history-head h3 {
  margin: 0;
  font-size: 0.92rem;
}

.mission-ai-question-history-head p {
  margin: 0.2rem 0 0;
}

.mission-ai-question-history-head button {
  min-height: 30px;
  padding: 0.35rem 0.62rem;
  font-size: 0.78rem;
}

.mission-ai-question-history {
  display: grid;
  gap: 8px;
}

.mission-ai-question-history-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in oklab, var(--edge) 80%, white 6%);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.mission-ai-question-history-card:hover,
.mission-ai-question-history-card:focus-visible {
  border-color: color-mix(in oklab, var(--accent) 52%, var(--edge));
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.mission-ai-question-history-card.has-screenshot {
  grid-template-columns: minmax(96px, 30%) minmax(0, 1fr);
  align-items: start;
}

.mission-ai-question-history-frame {
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--edge) 78%, white 8%);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
}

.mission-ai-question-history-frame img,
.mission-ai-question-history-frame svg {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mission-ai-question-history-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mission-ai-question-history-q,
.mission-ai-question-history-a,
.mission-ai-question-history-meta,
.mission-ai-question-history-empty {
  overflow-wrap: anywhere;
}

.mission-ai-question-history-q {
  font-size: 0.84rem;
  font-weight: 780;
}

.mission-ai-question-history-a {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.mission-ai-question-history-meta,
.mission-ai-question-history-empty {
  color: color-mix(in oklab, var(--muted) 86%, white 6%);
  font-size: 0.74rem;
}

.mission-ai-question-history-empty {
  margin: 0;
  border: 1px dashed color-mix(in oklab, var(--edge) 78%, white 8%);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.mission-ai-cross-mission-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  background: rgba(4, 10, 18, 0.42);
}

.mission-ai-cross-mission-panel label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 780;
}

.mission-ai-cross-mission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.mission-ai-cross-mission-row input {
  min-width: 0;
  border-color: color-mix(in oklab, var(--edge) 76%, white 8%);
  background: rgba(4, 10, 18, 0.62);
}

.mission-ai-cross-mission-row button {
  min-width: 132px;
}

.mission-ai-cross-mission-results {
  display: grid;
  gap: 8px;
}

.mission-ai-cross-mission-count,
.mission-ai-cross-mission-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.mission-ai-cross-mission-list {
  display: grid;
  gap: 8px;
}

.mission-ai-cross-mission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid color-mix(in oklab, var(--edge) 80%, white 6%);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.mission-ai-cross-mission-card strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.mission-ai-cross-mission-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mission-ai-cross-mission-open {
  min-height: 32px;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  text-decoration: none;
}

.mission-ai-profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 0;
}

.mission-ai-policy-score {
  margin-top: 12px;
  outline: none;
}

.mission-ai-profile-card,
.mission-ai-policy-card,
.mission-ai-review-card {
  border: 1px solid color-mix(in oklab, var(--edge) 82%, white 8%);
  border-radius: 8px;
  background: rgba(7, 14, 23, 0.55);
  padding: 12px;
}

.mission-ai-profile-card h3,
.mission-ai-policy-card h3,
.mission-ai-review-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.94rem;
}

.mission-ai-policy-card {
  display: grid;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(214, 163, 65, 0.1), rgba(62, 142, 255, 0.08)),
    rgba(7, 14, 23, 0.55);
}

.mission-ai-policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-ai-policy-head p {
  margin: 0;
}

.mission-ai-policy-score-value {
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

.mission-ai-policy-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-ai-policy-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--text);
  font-size: 0.84rem;
}

.mission-ai-policy-list strong {
  display: block;
  line-height: 1.25;
}

.mission-ai-policy-rule {
  display: block;
  margin-top: 2px;
  color: color-mix(in oklab, var(--muted) 84%, white 10%);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.2;
}

.mission-ai-policy-list em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mission-ai-policy-check {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in oklab, var(--warning) 74%, white 10%);
  border-radius: 50%;
  color: color-mix(in oklab, var(--warning) 84%, white 12%);
  font-size: 0.68rem;
  font-weight: 900;
}

.mission-ai-policy-list li.is-deviation strong {
  color: color-mix(in oklab, var(--danger) 78%, white 18%);
}

.mission-ai-policy-list li.is-review strong {
  color: color-mix(in oklab, var(--warning) 74%, white 18%);
}

.mission-ai-policy-check.is-deviation {
  border-color: color-mix(in oklab, var(--danger) 76%, white 10%);
  color: color-mix(in oklab, var(--danger) 86%, white 12%);
}

.mission-ai-policy-check.is-review {
  border-color: color-mix(in oklab, var(--warning) 74%, white 10%);
  color: color-mix(in oklab, var(--warning) 84%, white 12%);
}

.mission-ai-policy-check.is-clear {
  border-color: color-mix(in oklab, var(--ok) 76%, white 8%);
  color: color-mix(in oklab, var(--ok) 82%, white 16%);
}

.mission-ai-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mission-ai-chip {
  border: 1px solid color-mix(in oklab, var(--edge) 80%, white 10%);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.035);
}

button.mission-ai-look-for-chip {
  min-height: 30px;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

button.mission-ai-look-for-chip:hover:not(:disabled) {
  border-color: color-mix(in oklab, var(--accent) 68%, white 12%);
  color: var(--text);
}

button.mission-ai-look-for-chip.is-selected {
  border-color: color-mix(in oklab, var(--accent) 78%, white 10%);
  color: color-mix(in oklab, var(--accent) 48%, white 52%);
  background: color-mix(in oklab, var(--accent) 17%, transparent);
}

button.mission-ai-look-for-chip.is-selected::before {
  content: "✓";
  margin-right: 0.3rem;
}

.mission-ai-look-for-source-card,
.mission-ai-look-for-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.mission-ai-look-for-source-card {
  background:
    linear-gradient(135deg, rgba(62, 142, 255, 0.12), rgba(50, 211, 159, 0.08)),
    rgba(7, 14, 23, 0.5);
}

.mission-ai-look-for-card {
  background:
    linear-gradient(135deg, rgba(50, 211, 159, 0.12), rgba(14, 32, 47, 0.12) 44%, rgba(245, 171, 53, 0.08)),
    rgba(7, 14, 23, 0.58);
}

.mission-ai-look-for-card.is-saving {
  opacity: 0.72;
}

.mission-ai-look-for-empty {
  width: 100%;
  min-height: 54px;
  margin: 0;
  border: 1px dashed color-mix(in oklab, var(--edge) 78%, white 8%);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.mission-ai-look-for-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.mission-ai-look-for-head h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.mission-ai-look-for-head p {
  margin: 0;
}

.mission-ai-look-for-head .muted {
  margin-top: 0.25rem;
}

.mission-ai-look-for-kicker {
  margin-bottom: 0.22rem !important;
  color: color-mix(in oklab, var(--accent) 72%, white 18%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-ai-look-for-guidance {
  margin: -2px 0 0;
  line-height: 1.4;
}

.mission-ai-look-for-chips {
  align-content: flex-start;
  min-height: 72px;
  margin-top: 0;
}

.mission-ai-look-for-add {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  border-top: 1px solid color-mix(in oklab, var(--edge) 78%, white 8%);
  padding-top: 12px;
}

.mission-ai-look-for-add label {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.mission-ai-look-for-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.mission-ai-look-for-add input,
.mission-ai-look-for-add button {
  min-height: 44px;
}

.mission-ai-look-for-add input {
  width: 100%;
  border-color: color-mix(in oklab, var(--edge) 76%, white 8%);
  background: rgba(4, 10, 18, 0.62);
}

.mission-ai-look-for-add button {
  min-width: 84px;
}

.mission-ai-review-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mission-ai-stat {
  border: 1px solid color-mix(in oklab, var(--edge) 80%, white 8%);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.mission-ai-stat strong {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.1;
}

.mission-ai-stat span {
  color: var(--muted);
  font-size: 0.75rem;
}

.mission-ai-review-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mission-ai-existing-evidence {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid color-mix(in oklab, var(--ok) 42%, var(--edge));
  border-radius: 10px;
  background: color-mix(in oklab, var(--ok) 7%, transparent);
}

.mission-ai-existing-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-ai-existing-evidence-head > :first-child {
  min-width: 0;
  flex: 1;
}

.mission-ai-existing-evidence-list {
  display: grid;
  gap: 10px;
}

.mission-ai-existing-event-card {
  border-color: color-mix(in oklab, var(--ok) 34%, var(--edge));
}

.mvp-timeline-item.is-ai-review-linked-event .mvp-timeline-content {
  outline: 2px solid color-mix(in oklab, var(--accent) 78%, white 8%);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px color-mix(in oklab, var(--accent) 14%, transparent);
}

.mission-ai-review-card {
  display: grid;
  gap: 8px;
}

.mission-ai-review-card-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.mission-ai-review-card-body.has-preview {
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  align-items: start;
}

.mission-ai-review-card-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mission-ai-review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-ai-review-card-head > :first-child {
  min-width: 0;
  flex: 1;
}

.mission-ai-review-grouping-note,
.mission-ai-analysis-history > summary {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.mission-ai-review-grouping-note {
  margin: 0;
}

.mission-ai-sighting-group {
  min-width: 0;
}

.mission-ai-related-sightings {
  margin: -4px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--edge);
  border-radius: 0 0 12px 12px;
}

.mission-ai-related-sightings > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}

.mission-ai-related-sightings > div {
  display: grid;
  gap: 12px;
}

.mission-ai-analysis-history > summary {
  cursor: pointer;
  padding: 8px 0;
}

.mission-ai-analysis-history > div {
  display: grid;
  gap: 12px;
}

.mission-ai-analysis-history > h3 {
  margin: 12px 0 8px;
  font-size: 0.85rem;
  color: var(--text);
}

.mission-ai-cumulative-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.5;
}

.mission-ai-review-card-title {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.mission-ai-review-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.mission-ai-review-thumb-wrap {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--edge) 78%, white 10%);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  cursor: zoom-in;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.mission-ai-review-thumb-wrap:hover,
.mission-ai-review-thumb-wrap:focus-visible {
  border-color: color-mix(in oklab, var(--accent) 72%, white 12%);
  transform: translateY(-1px);
  outline: none;
}

.mission-ai-review-thumb-wrap:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 42%, transparent);
}

.mission-ai-review-thumb {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mission-ai-review-thumb-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  padding: 6px 7px;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.82), rgba(8, 12, 18, 0));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
  pointer-events: none;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mission-ai-review-thumb-time {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 5px 7px;
  background: rgba(8, 12, 18, 0.78);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.mission-ai-review-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mission-ai-review-badge {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  min-height: 1.4rem;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  border: 1px solid color-mix(in oklab, var(--edge) 80%, white 8%);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mission-ai-review-badge.is-completed,
.mission-ai-review-badge.is-accepted,
.mission-ai-review-badge.is-edited {
  border-color: color-mix(in oklab, var(--ok) 76%, white 8%);
  color: color-mix(in oklab, var(--ok) 80%, white 20%);
}

.mission-ai-review-badge.is-rejected {
  border-color: color-mix(in oklab, var(--danger) 72%, white 8%);
  color: color-mix(in oklab, var(--danger) 78%, white 18%);
}

.mission-ai-review-badge.is-high {
  border-color: color-mix(in oklab, var(--ok) 72%, white 8%);
  color: color-mix(in oklab, var(--ok) 80%, white 18%);
}

.mission-ai-review-badge.is-medium {
  border-color: color-mix(in oklab, var(--warning) 72%, white 8%);
  color: color-mix(in oklab, var(--warning) 84%, white 12%);
}

.mission-ai-review-badge.is-low {
  border-color: color-mix(in oklab, var(--muted) 70%, white 8%);
  color: var(--muted);
}

.mission-ai-review-badge.is-cached {
  border-color: color-mix(in oklab, var(--accent) 70%, white 8%);
  color: color-mix(in oklab, var(--accent) 82%, white 16%);
}

@media (max-width: 900px) {
  .mission-ai-profile-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-ai-ask-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-ai-demo-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .mission-ai-chip-row.mission-ai-look-for-chips {
    display: flex;
    align-items: flex-start;
  }

  .mission-ai-look-for-add-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-ai-review-subtabs,
  .mission-ai-demo-head,
  .mission-ai-question-head,
  .mission-ai-question-answer-head,
  .mission-ai-question-history-head,
  .mission-ai-policy-head {
    display: grid;
    justify-content: stretch;
  }

  .mission-ai-review-subtab {
    width: 100%;
  }

  .mission-ai-review-card-body.has-preview {
    grid-template-columns: minmax(160px, 42vw) minmax(0, 1fr);
  }

  .mission-ai-cross-mission-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .mission-ai-demo-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-ai-review-card-body.has-preview {
    grid-template-columns: 1fr;
  }
}

.mission-ai-empty {
  margin: 12px 0 0;
  border: 1px dashed color-mix(in oklab, var(--edge) 78%, white 8%);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.sticky-past-play {
  grid-column: 1 / -1;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  width: 100%;
}

.sticky-past-play .ghost {
  flex-shrink: 0;
}

.sticky-past-meta {
  font-size: 0.8rem;
  white-space: nowrap;
}

.sticky-past-actions {
  grid-column: 1 / -1;
  margin: 0;
}

/* Closed-mission bar: operator (left) | mission + ended meta (center) | Play with events (right) */
.sticky-summary.sticky-summary--past {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
  column-gap: clamp(20px, 4vw, 48px);
  row-gap: 14px;
  align-items: start;
  padding-top: 22px;
}

.sticky-summary.sticky-summary--past > .sticky-past-play {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: auto;
  margin: 0;
}

.sticky-summary.sticky-summary--past > .sticky-summary-operator {
  grid-column: 1;
  grid-row: 1;
}

.sticky-summary.sticky-summary--past > .sticky-summary-mission {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.sticky-summary.sticky-summary--past > .sticky-past-meta {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  min-width: max-content;
}

.sticky-summary.sticky-summary--past > .sticky-past-actions {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  width: auto;
  margin: 0;
}

/* Chain of custody detail (evidence / footage) */
.mvp-custody-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--color-border-default, #30363d);
  background: var(--color-canvas-subtle, #161b22);
  color: var(--color-fg-default, #e6edf3);
  margin-right: 6px;
  margin-bottom: 4px;
}
.mvp-custody-badge--verified {
  border-color: #238636;
  color: #3fb950;
}
.mvp-custody-badge--failed {
  border-color: #da3633;
  color: #ff7b72;
}
.mvp-custody-badge--unknown {
  border-color: #6e7681;
  color: #8b949e;
}
.mvp-custody-help {
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0.5rem 0 1rem;
  color: var(--color-fg-muted, #8b949e);
}
.mvp-custody-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mvp-custody-timeline li {
  border-left: 2px solid var(--color-border-default, #30363d);
  padding: 0.5rem 0 0.5rem 0.75rem;
  margin-left: 0.35rem;
}
.mvp-custody-event-type {
  font-weight: 600;
  font-size: 0.85rem;
}
.mvp-custody-raw {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 12rem;
  overflow: auto;
  background: var(--color-canvas-subtle, #161b22);
  padding: 0.5rem;
  border-radius: 4px;
  margin-top: 0.35rem;
}

.aar-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(5, 9, 14, 0.88);
  backdrop-filter: blur(6px);
}

/* `[hidden]` alone can lose to `display: flex` above without higher specificity (see do-not-reload-banner note). */
.aar-modal-overlay[hidden] {
  display: none !important;
  pointer-events: none;
}

.aar-modal-panel {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: min(92vh, 920px);
  overflow: hidden;
  box-sizing: border-box;
}

.aar-modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(88, 166, 255, 0.22);
}

.aar-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.mission-share-panel {
  width: min(580px, 100%);
  padding: 0 18px 18px;
  overflow: auto;
}

.mission-share-panel .aar-modal-header {
  margin: 0 -18px 16px;
}

.mission-share-panel > p {
  margin: 0 0 10px;
}

.mission-public-live-share {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: 10px;
  background: rgba(56, 139, 253, 0.08);
}

.mission-public-live-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-public-live-heading h3,
.mission-public-live-heading p {
  margin: 0;
}

.mission-public-live-heading p {
  margin-top: 4px;
}

.mission-public-live-read-only {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(88, 166, 255, 0.42);
  border-radius: 999px;
  color: #b8d8ff;
  font-size: 0.72rem;
  font-weight: 700;
}

.mission-public-live-qr {
  width: min(220px, 70vw);
  margin: 14px auto;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.mission-public-live-qr:empty {
  min-height: 120px;
  background: rgba(255, 255, 255, 0.05);
}

.mission-public-live-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.mission-public-live-link-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

#missionPublicLiveLink {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.mission-public-live-actions {
  margin-top: 9px;
}

#missionPublicLiveStatus {
  margin: 8px 0 0;
}

#missionPublicLiveStatus[data-tone="error"] {
  color: var(--danger);
}

.mission-share-current {
  margin-top: 18px;
  border-top: 1px solid var(--edge);
  padding-top: 14px;
}

.mission-share-available h3,
.mission-share-current h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.mission-share-list {
  display: grid;
  gap: 8px;
}

.mission-share-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--card);
}

.mission-share-list-person {
  min-width: 0;
}

.mission-share-list-person strong,
.mission-share-list-person span {
  display: block;
  overflow-wrap: anywhere;
}

.aar-modal-header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aar-modal-approve {
  background: rgba(63, 185, 80, 0.18);
  color: #c8f2cf;
  border: 1px solid rgba(63, 185, 80, 0.55);
  font-weight: 600;
}

.aar-modal-approve:hover:not(:disabled) {
  background: rgba(63, 185, 80, 0.28);
}

.aar-modal-approve:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.aar-modal-return {
  border: 1px solid rgba(248, 81, 73, 0.55);
  color: #ffd1ce;
}

.aar-modal-return:hover:not(:disabled) {
  background: rgba(248, 81, 73, 0.18);
}

.aar-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.aar-modal-scroll .footage-qr-svg {
  max-width: min(280px, 100%);
}

.aar-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aar-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aar-edit-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text, #e9f0f8);
}

.aar-edit-textarea {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  border-radius: 8px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  background: rgba(8, 14, 22, 0.92);
  color: inherit;
  resize: vertical;
}

.aar-edit-select {
  width: min(220px, 100%);
  box-sizing: border-box;
  padding: 8px 10px;
  font: inherit;
  border-radius: 8px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  background: rgba(8, 14, 22, 0.92);
  color: inherit;
}

.aar-edit-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.aar-edit-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent, #58a6ff);
}

.aar-edit-hint {
  margin: 14px 0 0;
  font-size: 0.82rem;
}

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

/* Mission overwatch: wrappers flatten into the default 2-column grid */
.mvp-ow-right-stack,
.mvp-ow-center-below,
.mvp-ow-footage-report-stack {
  display: contents;
}

.relay-feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: rgba(22, 35, 52, 0.35);
}

.relay-feed-toolbar[hidden] {
  display: none !important;
}

.relay-feed-toolbar-status {
  font-size: 0.88rem;
}

.feed-source-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feed-source-toggle[hidden] {
  display: none !important;
}

.feed-source-toggle--standalone {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: rgba(22, 35, 52, 0.35);
}

.feed-source-toggle-label {
  font-size: 0.85rem;
}

.feed-source-toggle-btn[aria-pressed="true"] {
  background: var(--accent, #3b82f6);
  color: #fff;
  border-color: var(--accent, #3b82f6);
}

.live-ai-watch-panel {
  width: 100%;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: rgba(22, 35, 52, 0.35);
}

.live-ai-watch-panel[hidden],
.live-ai-watch-config-grid[hidden] {
  display: none !important;
}

.live-ai-watch-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-ai-watch-panel-title,
.live-ai-watch-column-head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.live-ai-watch-panel-title .small,
.live-ai-watch-column-head p,
.live-ai-mission-focus p {
  margin: 0;
}

.live-ai-watch-panel-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.live-ai-watch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.86rem;
  background: rgba(22, 35, 52, 0.35);
}

.live-ai-watch-toggle--integrated {
  flex: 0 0 auto;
  margin: 0;
  background: rgba(7, 16, 26, 0.42);
}

.live-ai-watch-collapse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.live-ai-watch-collapse-button::before {
  content: "▾";
  font-size: 0.78rem;
}

.live-ai-watch-collapse-button[aria-expanded="false"]::before {
  content: "▸";
}

.live-ai-watch-collapse-button[hidden] {
  display: none !important;
}

.live-ai-watch-toggle[hidden] {
  display: none !important;
}

.live-ai-watch-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #3b82f6);
}

.live-ai-watch-toggle:has(input:checked) {
  border-color: color-mix(in oklab, var(--accent) 58%, var(--edge));
  background: color-mix(in oklab, var(--accent) 18%, rgba(22, 35, 52, 0.42));
}

.live-ai-watch-toggle:has(input:disabled) {
  opacity: 0.6;
}

.live-ai-watch-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.live-ai-watch-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(7, 16, 26, 0.32);
}

.live-ai-standard-detection-list {
  display: grid;
  gap: 0;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.live-ai-detection-source-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 9px 0 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.live-ai-detection-source-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent, #3b82f6);
}

.live-ai-detection-source-toggle:has(input:not(:checked)) + .live-ai-scenario-focus-list {
  opacity: 0.46;
}

.live-ai-standard-detection-list li {
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--edge) 70%, transparent);
}

.live-ai-standard-detection-list label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  cursor: pointer;
}

.live-ai-standard-detection-list input {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent, #3b82f6);
}

.live-ai-standard-detection-list li:has(input:not(:checked)) span,
.live-ai-standard-detection-list li:has(input:not(:checked)) small {
  opacity: 0.46;
}

.live-ai-standard-detection-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.live-ai-standard-detection-list span {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.live-ai-standard-detection-list small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.live-ai-mission-focus {
  display: grid;
  align-content: start;
  gap: 12px;
}

.live-ai-mission-focus[hidden] {
  display: none !important;
}

.live-ai-mission-focus label {
  display: grid;
  gap: 6px;
  color: var(--text);
}

.live-ai-scenario-focus {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in oklab, var(--edge) 72%, transparent);
}

.live-ai-scenario-focus[hidden] {
  display: none !important;
}

.live-ai-scenario-focus-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-ai-scenario-focus-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--edge));
  border-radius: 7px;
  background: color-mix(in oklab, var(--accent) 9%, rgba(7, 16, 26, 0.5));
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}

.live-ai-scenario-focus-list li::before {
  content: "⌾";
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.86rem;
  line-height: 1.25;
}

.live-ai-mission-focus textarea {
  width: 100%;
  min-height: 72px;
  line-height: 1.35;
}

.live-ai-mission-focus-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.live-ai-mission-focus-status {
  font-size: 0.82rem;
}

.live-ai-mission-focus-status[data-tone="success"] {
  color: #8ef7cf;
}

.live-ai-mission-focus-status[data-tone="error"] {
  color: #ffb7b7;
}

@media (max-width: 720px) {
  .live-ai-watch-config-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .live-ai-watch-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .live-ai-watch-panel-actions {
    width: 100%;
  }

  .live-ai-watch-toggle--integrated {
    flex: 1 1 auto;
    width: auto;
  }
}

.live-ai-mission-focus > p {
  margin: 0;
  line-height: 1.4;
}

/* Relay connected: 3-column console + center column stack below feed (event log → footage → report) */
.mvp-overwatch-grid.mvp-relay-live {
  grid-template-columns: minmax(220px, 0.95fr) minmax(300px, 1.55fr) minmax(220px, 0.9fr);
  grid-template-areas:
    "ow-session ow-session ow-session"
    "ow-scenario ow-feed ow-right"
    "ow-scenario ow-below ow-right";
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-session {
  grid-area: ow-session;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-scenario {
  grid-area: ow-scenario;
  min-width: 0;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-bridge-panel {
  display: none !important;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-feed {
  grid-area: ow-feed;
  min-width: 0;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-right-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-area: ow-right;
  min-width: 0;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-right-stack > .card {
  width: 100%;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-right-stack .right-column {
  grid-column: auto;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-center-below {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-area: ow-below;
  min-width: 0;
}

.mvp-overwatch-grid.mvp-relay-live .mvp-ow-center-below > .card {
  width: 100%;
}

/* Closed mission while relay layout class is still set: keep the selected review tab full-width. */
#appSection.past-mission-review .mvp-overwatch-grid.mvp-relay-live .mvp-ow-center-below {
  display: block;
}

#appSection.past-mission-review .mvp-overwatch-grid.mvp-relay-live .mvp-ow-center-below > .mvp-ow-footage-report-stack {
  width: 100%;
  min-width: 0;
}

#appSection.past-mission-review .mvp-overwatch-grid.mvp-relay-live .mvp-ow-center-below > .card {
  width: 100%;
  min-width: 0;
}

/* Scenario guidance collapsed: narrow left rail; only the center column uses fr so it absorbs freed width */
.mvp-overwatch-grid.mvp-relay-live.mvp-scenario-collapsed {
  grid-template-columns:
    minmax(0, 72px)
    minmax(300px, 1fr)
    minmax(220px, min(380px, 34vw));
}

.mvp-overwatch-grid.mvp-relay-live.mvp-scenario-collapsed .mvp-ow-scenario {
  min-width: 0;
}

.mvp-overwatch-grid.mvp-relay-live.mvp-tools-collapsed {
  grid-template-columns:
    minmax(220px, 0.95fr)
    minmax(300px, 1fr)
    58px;
}

.mvp-overwatch-grid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
  grid-template-columns:
    minmax(0, 72px)
    minmax(300px, 1fr)
    58px;
}

/* .span-2 is defined later; re-assert placement for named grid areas */
.mvp-overwatch-grid.mvp-relay-live > .mvp-ow-session.span-2 {
  grid-area: ow-session;
}
.mvp-overwatch-grid.mvp-relay-live > .mvp-ow-scenario.span-2 {
  grid-area: ow-scenario;
}
.mvp-overwatch-grid.mvp-relay-live > .mvp-ow-feed.span-2 {
  grid-area: ow-feed;
}

#mvpOverwatchMain.mvp-overwatch-layout-live {
  width: min(1680px, calc(100% - 32px));
  max-width: 1680px;
}

#mvpOverwatchMain:has(#appSection.past-mission-review) {
  width: min(1320px, calc(100% - 32px));
  max-width: 1320px;
}

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

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

h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  background: #0f1721;
  border: 1px solid #33475f;
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

button {
  border: 1px solid #4d74a4;
  color: #edf5ff;
  background: #1e416b;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.ghost {
  background: #182535;
}

button.danger {
  border-color: #ab4e4e;
  background: #6b2d2d;
}

button.mission-next-action-highlight:not(:disabled),
body.ar-github-ui button.mission-next-action-highlight:not(:disabled),
body.ar-github-ui .ghost.mission-next-action-highlight:not(:disabled),
body.ar-github-ui .danger.mission-next-action-highlight:not(:disabled) {
  position: relative;
  outline: 2px solid rgba(88, 166, 255, 0.95);
  outline-offset: 3px;
  border-color: #58a6ff;
  background: rgba(18, 48, 92, 0.78);
  color: #e6f2ff;
  box-shadow:
    0 0 0 1px rgba(88, 166, 255, 0.3),
    0 0 24px rgba(88, 166, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.mission-lifecycle-next.mission-next-action-highlight:not(:empty) {
  border-color: #58a6ff;
  background: rgba(18, 48, 92, 0.78);
  color: #e6f2ff;
  box-shadow:
    0 0 20px rgba(88, 166, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

button.mission-next-action-highlight:not(:disabled)::before,
body.ar-github-ui button.mission-next-action-highlight:not(:disabled)::before {
  content: none;
}

.closed-mission-tab.mission-next-action-highlight:not(.is-active):not([aria-selected="true"]):not(:disabled),
body.ar-github-ui .closed-mission-tab.mission-next-action-highlight:not(.is-active):not([aria-selected="true"]):not(:disabled) {
  outline: 0;
  border-color: rgba(88, 166, 255, 0.64);
  background: rgba(13, 35, 62, 0.58);
  color: #d8e8ff;
  box-shadow:
    inset 0 0 0 1px rgba(88, 166, 255, 0.18),
    0 0 16px rgba(88, 166, 255, 0.16);
}

.closed-mission-tab.mission-next-action-highlight:not(:disabled)::before,
body.ar-github-ui .closed-mission-tab.mission-next-action-highlight:not(:disabled)::before {
  content: none;
}

.closed-mission-tab.mission-next-action-highlight[data-mission-next-action-label]::after {
  content: attr(data-mission-next-action-label);
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.2);
  color: #eaf4ff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.manual-event-actions > button {
  flex: 1 1 160px;
}

.event-dictation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.event-dictation-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.event-dictation-button.is-listening {
  border-color: #ff7b72;
  background: rgba(110, 35, 42, 0.86);
  color: #fff1f0;
  box-shadow: 0 0 0 3px rgba(255, 123, 114, 0.16);
}

.event-dictation-button.is-listening svg {
  animation: event-dictation-pulse 1.2s ease-in-out infinite;
}

.event-dictation-status {
  min-height: 1.25em;
  margin: 0;
}

.event-dictation-status.is-error {
  color: #ffb4ad;
}

.event-dictation-status.is-success {
  color: #8ddb8c;
}

@keyframes event-dictation-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.58;
    transform: scale(0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-dictation-button.is-listening svg {
    animation: none;
  }
}

.ow-card-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ow-card-collapse-header h2 {
  margin: 0;
  min-width: 0;
}

.ow-card-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 10px;
}

.ow-card-collapse-toggle-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.ow-card-collapsible-body {
  margin-top: 10px;
}

.mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapsible-body {
  display: none;
}

.mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed {
  position: relative;
  padding: 10px 8px;
}

.mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapse-header {
  justify-content: center;
}

.mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapse-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapse-toggle {
  width: 100%;
  min-height: 40px;
  padding: 8px 6px;
}

.mvp-ow-tools-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mvp-ow-tool-block {
  min-width: 0;
}

.mvp-ow-tool-block + .mvp-ow-tool-block {
  border-top: 1px solid rgba(82, 113, 148, 0.34);
  padding-top: 14px;
}

.mvp-ow-tool-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9eb6d4;
}

.mission-template-hint {
  margin: -2px 0 2px;
  font-size: 0.82rem;
}

.mission-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
  min-height: 1.5rem;
}

.mission-tag-chip {
  display: inline-block;
  border: 1px solid #3a5f86;
  background: #15263a;
  color: #cfe4fb;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.75rem;
  line-height: 1.2;
  text-transform: lowercase;
}

/* Scenario guidance (overwatch) */
.scenario-guidance-card {
  padding: 16px 16px 14px;
}

.sg-header {
  margin: 0;
}

.sg-header-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sg-header-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
}

.sg-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 10px;
}

.sg-collapse-toggle-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.sg-collapsible-body {
  margin-top: 10px;
}

.scenario-guidance-card.scenario-guidance-collapsed {
  position: relative;
  padding: 10px 8px;
}

.scenario-guidance-card.scenario-guidance-collapsed .sg-collapsible-body {
  display: none;
}

.scenario-guidance-card.scenario-guidance-collapsed .sg-header-toolbar {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
}

.scenario-guidance-card.scenario-guidance-collapsed .sg-header-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.scenario-guidance-card.scenario-guidance-collapsed .sg-collapse-toggle {
  width: 100%;
  min-height: 40px;
  padding: 8px 6px;
}

.sg-summary {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 72ch;
}

.sg-tags {
  margin-bottom: 4px;
}

.sg-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* Objectives + guided prompts stacked left; tap-to-log right */
.sg-layout--split {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: start;
}

.sg-left-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.scenario-guidance-card .sg-layout--split:has(#scenarioTapToLogPanel[hidden]) {
  grid-template-columns: 1fr;
}

.sg-panel {
  background: rgba(10, 18, 28, 0.65);
  border: 1px solid rgba(58, 88, 118, 0.45);
  border-radius: 10px;
  padding: 12px 12px 10px;
  min-width: 0;
}

.sg-panel-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9eb6d4;
}

.sg-panel-hint {
  margin: -4px 0 10px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.sg-objective-list,
.sg-prompt-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sg-objective-list li,
.sg-prompt-list li {
  margin: 0;
  padding: 8px 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
  background: rgba(22, 35, 52, 0.55);
  border-radius: 8px;
  border: 1px solid rgba(47, 69, 94, 0.5);
}

.sg-objective-list li.muted,
.sg-prompt-list li.muted {
  border-style: dashed;
  background: transparent;
}

.sg-chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  min-height: 2rem;
}

.sg-event-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 11px;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #d8e8fb;
  background: linear-gradient(180deg, #1a2d45, #152638);
  border: 1px solid #3a5f86;
  border-radius: 999px;
}

.footage-upload-row {
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 0;
}

.footage-import-source-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.footage-import-source-label select {
  min-height: 38px;
}

.footage-import-timing-note {
  margin: 4px 0 0;
  max-width: 760px;
}

/* File picker on top of a styled button — reliable on mobile browsers that block synthetic `input.click()`. */
.mvp-inline-file-upload {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.mvp-inline-file-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.mvp-inline-file-upload.mvp-is-busy .mvp-inline-file-upload-input {
  pointer-events: none;
  cursor: default;
}

.footage-upload-hint {
  font-size: 0.85rem;
  margin-top: 4px;
}

.footage-upload-status {
  display: inline-block;
  min-height: 1.25em;
  max-width: min(520px, 100%);
}

.footage-upload-progress {
  margin-top: 12px;
  max-width: min(560px, 100%);
}

.footage-upload-progress-track {
  height: 8px;
  border-radius: 12px;
  background: #0d141d;
  border: 1px solid #33485d;
  overflow: hidden;
}

.footage-upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: linear-gradient(90deg, #3e8eff, #5cb3ff);
  transition: width 0.12s ease-out;
}

.footage-upload-progress-bar--indeterminate {
  width: 18% !important;
  animation: footage-upload-pulse 0.85s ease-in-out infinite alternate;
}

@keyframes footage-upload-pulse {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

.footage-upload-progress-meta {
  margin-top: 6px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* Mission Overwatch: pilot auto-footage runs in “Mission footage”; outline so operators notice below-the-fold activity. */
.mvp-ow-footage.footage-auto-upload-attention {
  outline: 2px solid #3e8eff;
  outline-offset: 3px;
  border-radius: 10px;
}

.muted {
  color: var(--muted);
}

.muted a {
  color: var(--accent);
}

.bridge-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.bridge-panel-head h2 {
  margin: 0;
}

.bridge-panel-sub {
  margin: 0;
  font-size: 0.85rem;
}

.bridge-connect-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid #2a3a53;
  background: #0f1826;
  border-radius: 10px;
}

.bridge-connect-field {
  display: grid;
  gap: 6px;
  margin: 0;
}

.bridge-connect-field input {
  width: 100%;
}

.bridge-connect-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bridge-connect-primary {
  min-width: 140px;
  padding: 10px 18px;
  font-weight: 600;
  background: #2352a8;
  border-color: #4279d9;
}

.bridge-connect-primary:hover:not(:disabled) {
  background: #295ec0;
}

.bridge-connect-secondary {
  padding: 10px 14px;
}

.bridge-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  min-height: 1.2em;
}

.laptop-hdmi-capture-panel[hidden] {
  display: none !important;
}

.laptop-hdmi-capture-controls {
  display: grid;
  gap: 8px;
}

.laptop-hdmi-capture-controls label {
  display: grid;
  gap: 5px;
  color: #b9cadd;
  font-size: 0.72rem;
  font-weight: 650;
}

.laptop-hdmi-capture-controls select {
  width: 100%;
}

.laptop-hdmi-capture-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.laptop-hdmi-capture-actions button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.68rem;
}

.laptop-hdmi-signal-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.laptop-hdmi-signal-details[hidden] {
  display: none !important;
}

.laptop-hdmi-signal-details div {
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(82, 113, 148, 0.34);
  border-radius: 7px;
  background: rgba(13, 23, 35, 0.72);
}

.laptop-hdmi-signal-details dt {
  color: #7189a3;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.laptop-hdmi-signal-details dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: #dbe9f7;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.laptop-hdmi-preview-wrap {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  margin-top: 9px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(93, 151, 211, 0.46);
  border-radius: 8px;
  background: #03070c;
}

.laptop-hdmi-preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #03070c;
}

.laptop-hdmi-preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  color: #7f95ab;
  font-size: 0.72rem;
  text-align: center;
  pointer-events: none;
}

.laptop-hdmi-preview-wrap[data-signal="live"] .laptop-hdmi-preview-placeholder {
  display: none;
}

@media (max-width: 560px) {
  .laptop-hdmi-signal-details,
  .laptop-hdmi-capture-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bridge-cert-hint-bar {
  margin-top: 10px;
}

.bridge-cert-hint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bridge-trust-details {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #2a3a53;
  background: #0c1522;
  border-radius: 10px;
}

.bridge-trust-details > summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.92rem;
  list-style: revert;
}

.bridge-trust-summary-title {
  font-weight: 600;
}

.bridge-trust-summary-sub {
  font-size: 0.8rem;
}

.bridge-trust-steps {
  margin: 10px 0 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  font-size: 0.88rem;
}

.bridge-trust-steps > li + li {
  margin-top: 10px;
}

.bridge-trust-instructions {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.bridge-trust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.bridge-trust-open-btn {
  padding: 10px 16px;
  font-weight: 600;
  background: #2352a8;
  border-color: #4279d9;
}

.bridge-trust-open-btn:hover:not(:disabled) {
  background: #295ec0;
}

.bridge-trust-open-btn--secondary {
  font-weight: 500;
  background: #1e416b;
}

.bridge-trust-url-label {
  margin-right: 6px;
  font-size: 0.78rem;
}

.bridge-trust-link-row {
  margin-top: 2px;
  font-size: 0.82rem;
}

.bridge-trust-link {
  display: inline-block;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.bridge-trust-link[aria-disabled="true"] {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
}

.bridge-trust-video-details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}

.bridge-trust-video-details[open] > summary {
  margin-bottom: 6px;
}

.bridge-panel-foot {
  margin: 12px 0 0;
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .bridge-connect-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.list li {
  border: 1px solid #33485d;
  border-radius: 8px;
  background: #122131;
  padding: 9px 10px;
}

.mvp-event-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 2px;
}

.mvp-event-log-head h2 {
  margin: 0;
}

.mvp-timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mvp-timeline-filters button {
  min-height: 34px;
  padding: 6px 10px;
}

.mvp-timeline-filters button.is-active {
  border-color: #61a8ff;
  background: rgba(97, 168, 255, 0.16);
  color: #f4f9ff;
}

.mvp-timeline-filter-status {
  margin: 8px 0 0;
}

#eventList li {
  display: grid;
  gap: 4px;
}

#eventList li .mvp-event-log-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#eventList li .mvp-event-log-item-text {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

#eventList li .mvp-event-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  align-self: start;
  justify-content: flex-end;
}

#eventList.mvp-timeline-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 14px 0 4px;
  list-style: none;
}

#eventList.mvp-timeline-list li.mvp-timeline-item {
  --timeline-accent: #61a8ff;
  --timeline-accent-soft: rgba(97, 168, 255, 0.18);
  --timeline-card-border: color-mix(in oklab, var(--timeline-accent) 42%, #33485d 58%);
  --timeline-dot-bg: var(--timeline-accent);
  --timeline-dot-border: color-mix(in oklab, var(--timeline-accent) 82%, white 12%);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

#eventList.mvp-timeline-list li.mvp-timeline-item + li.mvp-timeline-item {
  margin-top: 18px;
}

#eventList.mvp-timeline-list li.mvp-timeline-item--secondary {
  --timeline-accent: #58d6a1;
  --timeline-accent-soft: rgba(88, 214, 161, 0.16);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--destructive {
  --timeline-accent: #ff716e;
  --timeline-accent-soft: rgba(255, 113, 110, 0.16);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--live-ai {
  --timeline-accent: #ff3b30;
  --timeline-accent-soft: rgba(255, 59, 48, 0.24);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--live-ai .mvp-timeline-content {
  border-color: rgba(255, 89, 79, 0.82);
  background:
    linear-gradient(180deg, rgba(79, 12, 16, 0.98), rgba(36, 18, 24, 0.98)),
    #2b0f14;
  box-shadow:
    0 0 0 1px rgba(255, 136, 120, 0.28),
    0 18px 42px rgba(255, 59, 48, 0.22),
    0 16px 34px rgba(0, 0, 0, 0.3);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--live-ai .mvp-timeline-icon {
  box-shadow:
    0 0 0 5px #170b10,
    0 0 0 9px rgba(255, 59, 48, 0.28),
    0 0 24px rgba(255, 82, 73, 0.68);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--live-ai-person {
  --timeline-accent: #f6c344;
  --timeline-accent-soft: rgba(246, 195, 68, 0.2);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--live-ai-person .mvp-timeline-content {
  border-color: rgba(246, 195, 68, 0.76);
  background:
    linear-gradient(180deg, rgba(62, 48, 12, 0.98), rgba(31, 27, 17, 0.98)),
    #28200e;
  box-shadow:
    0 0 0 1px rgba(255, 222, 130, 0.22),
    0 18px 42px rgba(246, 195, 68, 0.14),
    0 16px 34px rgba(0, 0, 0, 0.3);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--live-ai-person .mvp-timeline-icon {
  box-shadow:
    0 0 0 5px #17130b,
    0 0 0 9px rgba(246, 195, 68, 0.24),
    0 0 22px rgba(246, 195, 68, 0.54);
}

#eventList.mvp-timeline-list li.mvp-timeline-item--outline {
  --timeline-accent: #aebfd2;
  --timeline-accent-soft: rgba(174, 191, 210, 0.12);
  --timeline-dot-bg: #0f1a26;
}

.mvp-timeline-separator {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100%;
}

.mvp-timeline-separator::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: -20px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--timeline-accent), rgba(87, 111, 135, 0.28));
}

#eventList.mvp-timeline-list li.mvp-timeline-item:last-child .mvp-timeline-separator::before {
  bottom: calc(100% - 18px);
}

.mvp-timeline-icon {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 7px;
  border: 2px solid var(--timeline-dot-border);
  border-radius: 999px;
  background: var(--timeline-dot-bg);
  box-shadow:
    0 0 0 5px #0e1a27,
    0 0 0 7px var(--timeline-accent-soft);
}

.mvp-timeline-content {
  min-width: 0;
  border: 1px solid var(--timeline-card-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 36, 53, 0.96), rgba(15, 27, 40, 0.96)),
    #122131;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  padding: 10px 12px;
}

#eventList.mvp-timeline-list li.mvp-timeline-item--outline .mvp-timeline-icon {
  background: #0f1a26;
}

#eventList.mvp-timeline-list li.mvp-timeline-item--outline .mvp-timeline-content {
  background: rgba(15, 27, 40, 0.72);
}

#eventList li .mvp-event-delete,
#eventList li .mvp-event-edit {
  flex-shrink: 0;
  align-self: start;
}

#eventList li .mvp-event-note-input {
  width: 100%;
  min-height: 3.25rem;
  margin-top: 2px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: rgba(8, 14, 22, 0.92);
  border: 1px solid #39516b;
  border-radius: 12px;
  resize: vertical;
  box-sizing: border-box;
}

#eventList li strong {
  font-size: 0.85rem;
  color: #b9d4f5;
}

#eventList.mvp-timeline-list li strong {
  color: color-mix(in oklab, var(--timeline-accent) 64%, #d7e8fb 36%);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#eventList li span {
  color: var(--text);
}

#eventList.mvp-timeline-list li .mvp-event-log-item-text > span {
  font-size: 0.95rem;
  line-height: 1.45;
}

.event-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.event-screenshot {
  display: block;
  margin-top: 6px;
  width: min(520px, 100%);
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #39516b;
}

.event-openai-analysis {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(122, 170, 211, 0.32);
  border-radius: 8px;
  background: rgba(20, 34, 48, 0.72);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.event-openai-analysis.is-officer-reviewed {
  border-color: rgba(102, 201, 145, 0.42);
  background: rgba(18, 48, 39, 0.64);
}

.event-openai-analysis-status {
  margin-top: 6px;
}

.event-openai-analysis-status--success {
  color: #8fe0b0;
}

.event-openai-analysis-status--error {
  color: #ff9b9b;
}

.event-openai-analysis-status--pending,
.event-openai-analysis-pending {
  color: #f0c674;
}

.event-openai-analysis-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
}

.event-openai-analysis-heading > strong {
  font-size: 0.92rem;
}

.event-openai-analysis-heading > .event-meta {
  flex: 0 1 auto;
  text-align: right;
}

.event-openai-analysis p,
.event-openai-analysis ul {
  margin: 5px 0 0;
}

.event-openai-analysis ul {
  padding-left: 1.15rem;
}

.event-openai-analysis-observations {
  margin-top: 11px;
}

.event-openai-analysis-observations ul {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.event-openai-analysis-label {
  display: block;
  color: #9fb5ca;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.event-openai-analysis-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(159, 181, 202, 0.2);
}

.event-openai-analysis-detail p {
  margin-top: 5px;
  color: color-mix(in oklab, var(--text) 88%, var(--muted) 12%);
}

.event-openai-analysis-review {
  color: #f0c674;
}

.event-openai-analysis-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mvp-automatic-alert-review {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mvp-automatic-alert-review-copy {
  flex: 1 1 280px;
}

.mvp-automatic-alert-review-status {
  flex: 0 0 auto;
  border: 1px solid #58708a;
  border-radius: 999px;
  padding: 2px 8px;
  color: #e7f1fb;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.mvp-automatic-alert-review-status[data-review-status="pending"] {
  border-color: #d7a833;
  background: rgba(215, 168, 51, 0.14);
  color: #ffe4a0;
}

.mvp-automatic-alert-review-status[data-review-status="dismissed"] {
  border-color: #6d7f91;
  background: rgba(109, 127, 145, 0.16);
  color: #c7d2dc;
}

.mvp-automatic-alert-review-status[data-review-status="approved"] {
  border-color: #49a77d;
  background: rgba(73, 167, 125, 0.14);
  color: #bff4d9;
}

@media (min-width: 900px) {
  #appSection.past-mission-review[data-closed-mission-tab="timeline"] #eventList.mvp-timeline-list {
    padding-inline: 4px;
  }

  #appSection.past-mission-review[data-closed-mission-tab="timeline"] #eventList.mvp-timeline-list li.mvp-timeline-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  #appSection.past-mission-review[data-closed-mission-tab="timeline"]
    #eventList.mvp-timeline-list
    li.mvp-timeline-item
    .mvp-timeline-separator {
    grid-column: 1;
    grid-row: 1;
  }

  #appSection.past-mission-review[data-closed-mission-tab="timeline"]
    #eventList.mvp-timeline-list
    li.mvp-timeline-item
    .mvp-timeline-content {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
  }
}

.event-footage {
  margin-top: 6px;
  width: min(360px, 100%);
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid #39516b;
  background: #0a1018;
}

/* The first Android HDMI build stored a complete 16:9 image in a double-height 8:9 track.
   Correct only that exact, source-tagged legacy geometry; normal footage stays aspect-fit. */
.event-footage.footage-video--legacy-hdmi-double-height,
.footage-viewer-video.footage-video--legacy-hdmi-double-height {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: fill;
}

.event-footage.footage-video--legacy-hdmi-double-height {
  max-height: none;
}

.mission-footage-list li {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a3b4d;
}

.mission-footage-list li:last-child {
  border-bottom: none;
}

.mission-footage-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.mission-photo-head {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.mission-photo-head h3 {
  margin: 0;
  font-size: 1rem;
}

.mission-photo-guest-qr-wrap {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mission-photo-guest-qr-actions {
  flex-wrap: wrap;
}

.mission-photo-guest-qr-hint {
  margin: 8px 0 0;
}

.mission-guest-photo-qr-panel {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 22, 0.55);
}

.mission-guest-photo-qr-lead {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #c9d1d9;
}

.mission-guest-photo-qr-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.mission-guest-photo-qr-svg-host {
  flex: 0 0 auto;
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  line-height: 0;
}

.mission-guest-photo-qr-svg-host svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mission-guest-photo-qr-aside {
  flex: 1 1 220px;
  min-width: 0;
}

.mission-guest-photo-qr-url {
  margin: 6px 0 0;
  font-size: 0.78rem;
  word-break: break-all;
  color: #8b949e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.mission-photo-filters button.active {
  border-color: #4f78bd;
  background: rgba(79, 120, 189, 0.2);
}

.mission-photo-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
}

.mission-photo-list li:last-child {
  border-bottom: none;
}

.mission-photo-card {
  display: grid;
  gap: 8px;
}

.mission-photo-thumb {
  max-width: min(360px, 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Footage modal: video + custom scrubber with mission-event markers */
.footage-viewer-overlay {
  position: fixed;
  inset: 0;
  /* Above `.aar-modal-overlay` (10020) when opened from the after-action report modal. */
  z-index: 10160;
  background: rgba(5, 9, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-out;
}

/* play-with-events.html: timeline cannot be dismissed — no backdrop “close” affordance. */
.footage-viewer-overlay--locked-open {
  cursor: default;
}

/* Play with events: true full viewport (simple clip preview keeps centered card). */
.footage-viewer-overlay:has(.footage-viewer-panel--timeline) {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
}

.footage-viewer-panel {
  cursor: default;
  width: min(1120px, 100%);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #152536, #101a26);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

/* Definite height so flex children (body + sidebar scroll) receive real space; auto height + max-height only leaves no free space for flex: 1. */
.footage-viewer-panel--timeline {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px))
    calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}

.footage-viewer-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.footage-viewer-main {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.footage-viewer-main .footage-viewer-hint,
.footage-viewer-main .footage-viewer-current-event,
.footage-viewer-main .footage-viewer-controls {
  flex-shrink: 0;
}

.footage-viewer-main .footage-viewer-video-wrap {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footage-viewer-main .footage-viewer-video {
  max-height: 100%;
  width: 100%;
  object-fit: contain;
}

.footage-event-sidebar {
  flex: 0 0 380px;
  width: 380px;
  max-width: 48vw;
  padding: 4px 2px 4px 10px;
  border-left: 1px solid #33485d;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
}

.footage-event-sidebar-title {
  flex-shrink: 0;
  margin: 0 0 2px;
  padding: 0 4px 8px 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8aa4c4;
  border-bottom: 1px solid #2c3f52;
}

.footage-review-tabs {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0 4px 10px 0;
  border-bottom: 1px solid #2c3f52;
}

.footage-photo-near-strip {
  flex-shrink: 0;
  width: calc(100% - 4px);
  margin: 0 4px 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(232, 145, 45, 0.45);
  background: rgba(232, 145, 45, 0.12);
  color: #ffd9a0;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.footage-photo-near-strip:hover {
  border-color: rgba(255, 190, 112, 0.75);
  background: rgba(232, 145, 45, 0.18);
}

.footage-review-tab {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid #39516b;
  background: #0d141d;
  color: #b9cce3;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.footage-review-tab[aria-selected="true"] {
  border-color: #e8912d;
  background: rgba(232, 145, 45, 0.14);
  color: #fff;
}

.footage-event-sidebar-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 6px 4px 0;
  scrollbar-gutter: stable;
}

.footage-photo-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 6px 4px 0;
  scrollbar-gutter: stable;
}

.footage-event-sidebar-empty {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.footage-event-thumb {
  --footage-event-accent: #61a8ff;
  --footage-event-accent-soft: rgba(97, 168, 255, 0.18);
  display: block;
  width: 100%;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: 1px solid color-mix(in oklab, var(--footage-event-accent) 46%, #3d556d 54%);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--footage-event-accent-soft), #0d141d 62%);
  text-align: left;
  overflow: hidden;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.footage-event-thumb[data-event-tone="secondary"],
.footage-event-marker[data-event-tone="secondary"],
.footage-viewer-current-event[data-event-tone="secondary"] {
  --footage-event-accent: #58d6a1;
  --footage-event-accent-soft: rgba(88, 214, 161, 0.16);
}

.footage-event-thumb[data-event-tone="priority"],
.footage-event-marker[data-event-tone="priority"],
.footage-viewer-current-event[data-event-tone="priority"] {
  --footage-event-accent: #ff716e;
  --footage-event-accent-soft: rgba(255, 113, 110, 0.16);
}

.footage-event-thumb[data-event-tone="ai-alert"],
.footage-event-marker[data-event-tone="ai-alert"],
.footage-viewer-current-event[data-event-tone="ai-alert"] {
  --footage-event-accent: #ff3b30;
  --footage-event-accent-soft: rgba(255, 59, 48, 0.24);
}

.footage-event-thumb[data-event-tone="person-alert"],
.footage-event-marker[data-event-tone="person-alert"],
.footage-viewer-current-event[data-event-tone="person-alert"] {
  --footage-event-accent: #f6c344;
  --footage-event-accent-soft: rgba(246, 195, 68, 0.2);
}

.footage-event-thumb[data-event-tone="device"],
.footage-event-marker[data-event-tone="device"],
.footage-viewer-current-event[data-event-tone="device"] {
  --footage-event-accent: #aebfd2;
  --footage-event-accent-soft: rgba(174, 191, 210, 0.12);
}

.footage-event-thumb-seek {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.footage-event-thumb:hover {
  border-color: var(--footage-event-accent);
  box-shadow: 0 0 0 1px var(--footage-event-accent-soft);
}

.footage-event-thumb--active {
  border-color: var(--footage-event-accent);
  box-shadow: 0 0 0 2px var(--footage-event-accent-soft), 0 10px 28px var(--footage-event-accent-soft);
}

.footage-photo-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid #3d556d;
  border-radius: 8px;
  background: #0d141d;
}

.footage-photo-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid #26384a;
  border-radius: 6px;
  background: #05080c;
  overflow: hidden;
  cursor: zoom-in;
}

.footage-photo-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footage-photo-card-body {
  min-width: 0;
}

.footage-photo-card-title {
  margin: 0 0 4px;
  color: #f2f7ff;
  font-size: 0.82rem;
  line-height: 1.3;
  word-break: break-word;
}

.footage-photo-card-meta,
.footage-photo-card-notes {
  margin: 0;
  color: #8aa4c4;
  font-size: 0.74rem;
  line-height: 1.35;
  word-break: break-word;
}

.footage-photo-card-notes {
  margin-top: 6px;
  color: #b9cce3;
}

.footage-photo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.footage-photo-card-actions .ghost {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.footage-event-thumb-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05080c;
}

.footage-event-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #05080c;
  vertical-align: middle;
}

.footage-event-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: unset;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #8aa4c4;
  background: linear-gradient(145deg, #121b28, #0a1018);
}

.footage-event-thumb-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 8px 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.88));
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
  text-align: left;
  pointer-events: none;
}

.footage-event-thumb-overlay-note {
  font-size: 0.78rem;
  line-height: 1.28;
  font-weight: 600;
  color: #f2f7ff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(0, 0, 0, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.footage-event-thumb-tone,
.footage-viewer-current-event-tone {
  align-self: flex-start;
  padding: 2px 6px;
  border: 1px solid color-mix(in oklab, var(--footage-event-accent) 72%, white 12%);
  border-radius: 999px;
  background: color-mix(in oklab, var(--footage-event-accent) 22%, #071018 78%);
  color: color-mix(in oklab, var(--footage-event-accent) 78%, white 22%);
  font-size: 0.62rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.footage-event-thumb-overlay-time {
  font-size: 0.68rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #ffb347;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(0, 0, 0, 0.8);
}

.footage-event-thumb-open {
  display: block;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(138, 164, 196, 0.45);
  border-radius: 6px;
  background: rgba(13, 20, 29, 0.92);
  color: #dbeafe;
  cursor: zoom-in;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.footage-event-thumb-open:hover {
  border-color: #8aa4c4;
  background: rgba(18, 32, 48, 0.98);
}

.footage-viewer-current-event {
  --footage-event-accent: #61a8ff;
  --footage-event-accent-soft: rgba(97, 168, 255, 0.18);
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--footage-event-accent) 52%, #33485d 48%);
  background: linear-gradient(135deg, var(--footage-event-accent-soft), #0d141d 66%);
  box-shadow: inset 3px 0 0 var(--footage-event-accent);
}

.footage-viewer-current-event-when {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #d8e6f7;
  font-weight: 500;
  margin-bottom: 6px;
}

.footage-viewer-current-event-note {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #b9cce3;
  margin-bottom: 6px;
  word-break: break-word;
}

.footage-viewer-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.footage-viewer-angle-strip {
  flex-shrink: 0;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2c3f52;
}

.footage-viewer-angle-tab-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footage-viewer-angle-tab {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #39516b;
  background: rgba(8, 14, 22, 0.85);
  color: #c5d6eb;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.footage-viewer-angle-tab:hover {
  border-color: #4a6a8f;
  color: #fff;
}

.footage-viewer-angle-tab--active {
  border-color: #e8912d;
  background: rgba(232, 145, 45, 0.12);
  color: #fff;
  font-weight: 600;
}

.footage-viewer-angle-strip-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}

.footage-viewer-title {
  margin: 0;
  font-size: 1.1rem;
}

.footage-viewer-hint {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.footage-viewer-hint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.footage-viewer-hint-row .footage-viewer-hint {
  flex: 1 1 220px;
  margin: 0;
  min-width: 0;
}

.footage-viewer-align-btn {
  flex-shrink: 0;
}

.footage-viewer-multiview-btn {
  flex-shrink: 0;
}

.footage-viewer-main .footage-viewer-video-wrap--multi {
  align-items: stretch;
  justify-content: flex-start;
}

.footage-viewer-angle-grid {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  /* Play with events / “All angles”: at most two tiles per row (was auto-fit → 3+ on wide screens). */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  overflow: auto;
}

.footage-viewer-angle-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #33485d;
  background: #05080c;
}

.footage-viewer-angle-cell--master {
  border-color: #e8912d;
  box-shadow: 0 0 0 1px rgba(232, 145, 45, 0.22);
}

.footage-viewer-angle-cell-label {
  flex-shrink: 0;
  font-size: 0.72rem;
  line-height: 1.25;
  padding: 5px 8px;
  background: #0d141d;
  color: #8aa4c4;
  border-bottom: 1px solid #2c3f52;
  font-variant-numeric: tabular-nums;
}

.footage-viewer-video--tile {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-height: min(42vh, 360px);
  object-fit: contain;
  background: #05080c;
}

.mission-footage-play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.mission-footage-play-with-events-btn {
  margin-left: auto;
}

.footage-viewer-video-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #39516b;
  background: #05080c;
}

.footage-viewer-video {
  display: block;
  width: 100%;
  max-height: min(62vh, 520px);
  vertical-align: middle;
}

.footage-viewer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
}

.footage-viewer-play {
  min-width: 72px;
}

.footage-viewer-time {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: #b9d4f5;
}

.footage-viewer-capture-row {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.footage-viewer-event-name {
  flex: 1 1 220px;
  min-width: min(220px, 100%);
}

.footage-event-rail-wrap {
  flex: 1 1 220px;
  min-width: 160px;
}

.footage-event-rail {
  position: relative;
  height: 22px;
  border-radius: 12px;
  background: #0d141d;
  border: 1px solid #33485d;
  cursor: pointer;
  outline: none;
}

.footage-event-rail:focus-visible {
  box-shadow: 0 0 0 2px rgba(62, 142, 255, 0.5);
}

.footage-event-rail-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 5px 0 0 5px;
  background: linear-gradient(90deg, rgba(62, 142, 255, 0.35), rgba(62, 142, 255, 0.12));
  pointer-events: none;
}

.footage-event-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.footage-event-marker {
  --footage-event-accent: #61a8ff;
  --footage-event-accent-soft: rgba(97, 168, 255, 0.3);
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  margin-left: -6px;
  padding: 0;
  border: none;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--footage-event-accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 10px var(--footage-event-accent-soft);
  cursor: pointer;
  pointer-events: auto;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.footage-event-marker:hover {
  transform: rotate(45deg) scale(1.15);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 16px var(--footage-event-accent);
}

.footage-event-marker--active {
  background: color-mix(in oklab, var(--footage-event-accent) 78%, white 22%);
  box-shadow: 0 0 0 2px var(--footage-event-accent), 0 0 18px var(--footage-event-accent);
}

/* Dual-video sync: slide handle vs drone (primary) timeline */
.footage-sync-align-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(5, 9, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-out;
}

.footage-sync-align-panel {
  cursor: default;
  width: min(1100px, 100%);
  max-height: min(96vh, 900px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  background: linear-gradient(180deg, #152536, #101a26);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.footage-sync-align-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.footage-sync-align-title {
  margin: 0;
  font-size: 1.1rem;
}

.footage-sync-align-sub {
  margin: 0 0 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.footage-sync-align-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

@media (max-width: 720px) {
  .footage-sync-align-grid {
    grid-template-columns: 1fr;
  }
}

.footage-sync-align-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.footage-sync-align-col-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8aa4c4;
}

.footage-sync-align-video {
  width: 100%;
  max-height: min(38vh, 320px);
  border-radius: 8px;
  border: 1px solid #39516b;
  background: #05080c;
  object-fit: contain;
}

.footage-sync-align-readout {
  margin-top: 10px;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: #b9d4f5;
  line-height: 1.4;
}

.footage-sync-align-strip-wrap {
  margin-top: 14px;
}

.footage-sync-align-strip-label {
  font-size: 0.78rem;
  color: #8aa4c4;
  margin-bottom: 6px;
}

.footage-sync-align-strip-track {
  position: relative;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, #0d141d, #121b28);
  border: 1px solid #33485d;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.footage-sync-align-strip-track:focus-visible {
  box-shadow: 0 0 0 2px rgba(62, 142, 255, 0.45);
}

.footage-sync-align-strip-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 2px;
  margin-left: -1px;
  background: rgba(138, 164, 196, 0.45);
  pointer-events: none;
}

.footage-sync-align-strip-handle {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  margin-left: -11px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5a9fff, #3a6fd8);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  cursor: grab;
  touch-action: none;
}

.footage-sync-align-strip-handle:active {
  cursor: grabbing;
}

.footage-sync-align-fine-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.footage-sync-align-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .footage-viewer-angle-grid {
    grid-template-columns: 1fr;
  }

  .footage-viewer-body {
    flex-direction: column;
  }

  .footage-viewer-main {
    flex: 3 1 0;
  }

  .footage-event-sidebar {
    flex: 2 1 0;
    width: 100%;
    max-width: none;
    min-height: min(42vh, 280px);
    max-height: none;
    border-left: none;
    border-top: 1px solid #33485d;
    padding: 10px 0 0;
  }

  .footage-review-tabs {
    padding: 0 0 8px;
  }

  .footage-event-sidebar-scroll {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: min(200px, 38vh);
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 8px 0 6px;
    scrollbar-gutter: auto;
  }

  .footage-event-thumb {
    flex: 0 0 min(220px, 78vw);
    width: min(220px, 78vw);
  }

  .footage-photo-scroll {
    max-height: min(38vh, 300px);
    padding: 0 0 6px;
  }

  .footage-photo-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .footage-event-sidebar-title {
    padding-bottom: 6px;
  }
}

.report {
  margin-top: 10px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #33485d;
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(40, 86, 137, 0.12), transparent 30%),
    #0d1621;
  padding: clamp(14px, 2.2vw, 24px);
  overflow-wrap: anywhere;
}

.aar-print-only {
  display: none;
}

.report h3,
.report h4,
.report h5 {
  margin: 0;
}

.report p,
.report li,
.report .event-meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.report .aar-report-title {
  margin-bottom: 14px;
}

.report .aar-report-title h3 {
  margin-top: 3px;
  color: #f0f6fc;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.report .aar-report-eyebrow,
.report .aar-approval-eyebrow,
.report .footage-qr-kicker,
.report .footage-qr-link-label {
  display: block;
  color: #83b9ef;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.report .aar-report-overview {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(4, minmax(130px, 1fr));
  gap: 1px;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid rgba(138, 164, 190, 0.24);
  border-radius: 12px;
  background: rgba(138, 164, 190, 0.16);
}

.report .aar-report-overview-item {
  min-width: 0;
  padding: 11px 12px;
  background: rgba(9, 17, 26, 0.92);
}

.report .aar-report-overview dt {
  margin: 0 0 4px;
  color: #8da5bb;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.report .aar-report-overview dd {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.report .aar-report-overview-item--mission dd {
  color: #f0f6fc;
  font-size: 0.96rem;
}

.report .aar-report-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(88, 166, 255, 0.36);
  border-radius: 999px;
  background: rgba(35, 79, 126, 0.28);
  color: #b9dcff;
  font-size: 0.74rem;
  font-weight: 750;
}

.report .aar-report-status[data-status="closed"],
.report .aar-report-status[data-status="approved"] {
  border-color: rgba(63, 185, 80, 0.42);
  background: rgba(63, 185, 80, 0.12);
  color: #a7e7b2;
}

.report .aar-report-section {
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid rgba(138, 164, 190, 0.22);
  border-radius: 12px;
  background: rgba(8, 15, 23, 0.58);
}

.report .aar-report-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report .aar-report-section-heading h4 {
  margin-top: 3px;
  color: #e6edf3;
  font-size: 1.08rem;
  line-height: 1.25;
}

.report .aar-report-section-count {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid rgba(138, 164, 190, 0.26);
  border-radius: 999px;
  color: #9fb5ca;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.report .aar-report-section-intro {
  margin: -4px 0 11px;
  max-width: 72ch;
  font-size: 0.84rem;
  line-height: 1.5;
}

.report .aar-report-empty {
  margin: 0;
  padding: 13px 14px;
  border: 1px dashed rgba(138, 164, 190, 0.3);
  border-radius: 9px;
  background: rgba(138, 164, 190, 0.045);
}

.report .aar-approval-banner {
  position: relative;
  margin: 16px 0 0;
  padding: 12px 14px 12px 16px;
  overflow: hidden;
  border-radius: 11px;
  border: 1px solid var(--color-border-default, #30363d);
  background: var(--color-canvas-subtle, #161b22);
}

.report .aar-approval-banner::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: currentColor;
  content: "";
  opacity: 0.72;
}

.report .aar-approval-eyebrow {
  margin-bottom: 5px;
  color: currentColor;
  opacity: 0.82;
}

.report .aar-approval-banner strong {
  font-weight: 750;
}

.report .aar-narrative-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report .aar-narrative-card {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(138, 164, 190, 0.2);
  border-radius: 10px;
  background: rgba(18, 31, 44, 0.62);
}

.report .aar-narrative-card--wide,
.report .aar-narrative-card--attention {
  grid-column: 1 / -1;
}

.report .aar-narrative-card--attention {
  border-color: rgba(210, 153, 34, 0.35);
  background: rgba(97, 67, 13, 0.14);
}

.report .aar-narrative-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report .aar-review-complete-action,
body.ar-github-ui .report .aar-review-complete-action {
  flex-shrink: 0;
  min-height: 28px;
  padding: 3px 9px;
  border-color: rgba(63, 185, 80, 0.42);
  background: rgba(63, 185, 80, 0.08);
  color: #a7e7b2;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.report .aar-review-complete-action:hover:not(:disabled),
body.ar-github-ui .report .aar-review-complete-action:hover:not(:disabled) {
  border-color: rgba(63, 185, 80, 0.68);
  background: rgba(63, 185, 80, 0.16);
}

.report .aar-narrative-card h5 {
  color: #b9d4ee;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.report .aar-narrative-block .aar-prose-para {
  margin: 7px 0 0;
  color: color-mix(in oklab, var(--text) 91%, var(--muted) 9%);
  font-size: 0.9rem;
  line-height: 1.58;
}

.report .aar-custody-section {
  max-width: 100%;
}

.report .aar-custody-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(138, 164, 190, 0.2);
  border-radius: 9px;
}

.report .aar-custody-asof {
  font-size: 0.86rem;
  margin: 0 0 10px;
}

.report .aar-custody-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.report .aar-custody-table th,
.report .aar-custody-table td {
  border-bottom: 1px solid rgba(240, 246, 252, 0.1);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.report .aar-custody-table th {
  color: #9fb5ca;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(20, 34, 48, 0.88);
}

.report .aar-custody-hash {
  color: #b9d4ee;
  font-size: 0.68rem;
  word-break: break-all;
}

.report .aar-custody-status {
  display: inline-flex;
  padding: 2px 7px;
  border: 1px solid rgba(138, 164, 190, 0.26);
  border-radius: 999px;
  color: #b7c8d8;
  font-size: 0.69rem;
  font-weight: 750;
  white-space: nowrap;
}

.report .aar-custody-status[data-tone="positive"] {
  border-color: rgba(63, 185, 80, 0.4);
  background: rgba(63, 185, 80, 0.1);
  color: #a7e7b2;
}

.report .aar-custody-status[data-tone="warning"] {
  border-color: rgba(210, 153, 34, 0.42);
  background: rgba(210, 153, 34, 0.1);
  color: #e8c878;
}

.report .aar-custody-status[data-tone="negative"] {
  border-color: rgba(248, 81, 73, 0.42);
  background: rgba(248, 81, 73, 0.1);
  color: #ffb0aa;
}

.report ul {
  margin: 0;
  padding-left: 20px;
}

.report .aar-event-timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report .aar-event-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(138, 164, 190, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(20, 32, 45, 0.94), rgba(10, 18, 27, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.report .aar-event-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #4d8bc7;
  content: "";
}

.report .aar-event-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.report .aar-event-time {
  color: #b9d4ee;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.015em;
}

.report .aar-event-offset {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border: 1px solid rgba(88, 166, 255, 0.34);
  border-radius: 999px;
  background: rgba(35, 79, 126, 0.3);
  color: #a9d2ff;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.report .aar-event-note {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.4;
}

.report .aar-event-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 12px;
}

.report .aar-event-media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(138, 164, 190, 0.24);
  border-radius: 10px;
  background: #050a0f;
}

.report .aar-event-content > .aar-event-media:only-child {
  width: min(720px, 100%);
}

.report .aar-event-media-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 6px 8px 6px 11px;
  border-bottom: 1px solid rgba(138, 164, 190, 0.2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.report .aar-event-media-action,
body.ar-github-ui .report .aar-event-media-action {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.report .aar-event-media .event-screenshot {
  width: 100%;
  max-height: 420px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #050a0f;
  cursor: zoom-in;
}

.report .aar-event-content > .event-openai-analysis {
  min-width: 0;
  margin: 0;
  padding: 13px 14px;
  border-radius: 10px;
}

.report .aar-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report .aar-photo-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(138, 164, 190, 0.22);
  border-radius: 10px;
  background: rgba(13, 24, 35, 0.76);
}

.report .aar-photo-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 0;
}

.report .aar-photo-card-header strong {
  min-width: 0;
  color: #e6edf3;
  font-size: 0.9rem;
  line-height: 1.35;
}

.report .aar-photo-category {
  flex-shrink: 0;
  padding: 2px 7px;
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 999px;
  background: rgba(35, 79, 126, 0.22);
  color: #a9d2ff;
  font-size: 0.67rem;
  font-weight: 750;
}

.report .aar-photo-meta {
  margin: 5px 12px 0;
  line-height: 1.45;
}

.report .aar-photo-notes {
  margin: 9px 12px 0;
  padding: 8px 9px;
  border-left: 3px solid rgba(88, 166, 255, 0.42);
  border-radius: 5px;
  background: rgba(88, 166, 255, 0.055);
  color: color-mix(in oklab, var(--text) 88%, var(--muted) 12%);
  font-size: 0.82rem;
  line-height: 1.45;
}

.report .aar-photo-notes-label {
  display: block;
  margin-bottom: 3px;
  color: #8da5bb;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.report .aar-photo-media {
  margin: 11px 0 0;
  border-top: 1px solid rgba(138, 164, 190, 0.2);
  background: #050a0f;
}

.report .aar-photo-media-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 6px 8px 6px 11px;
  border-bottom: 1px solid rgba(138, 164, 190, 0.2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report .aar-photo-media .event-screenshot {
  width: 100%;
  max-height: 340px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #050a0f;
  cursor: zoom-in;
}

@media (max-width: 960px) {
  .report .aar-report-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report .aar-report-overview-item--mission {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .report {
    padding: 12px;
  }

  .report .aar-report-overview,
  .report .aar-narrative-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report .aar-report-overview-item--mission,
  .report .aar-narrative-card--wide {
    grid-column: auto;
  }

  .report .aar-report-section {
    padding: 12px;
  }

  .report .aar-report-section-heading {
    align-items: start;
  }

  .report .aar-event-card {
    padding: 12px;
  }

  .report .aar-event-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-openai-analysis-heading > .event-meta {
    flex-basis: 100%;
    text-align: left;
  }
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.history-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.pilot-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 16, 0.78);
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 20;
}

.pilot-modal[hidden] {
  display: none;
}

.pilot-panel {
  width: min(1120px, 96vw);
  max-height: 94vh;
  overflow: auto;
}

.pilot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pilot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.pilot-feed-wrap {
  position: relative;
  border: 1px solid #30465f;
  border-radius: 10px;
  overflow: hidden;
  background: #070b12;
  aspect-ratio: var(--pilot-feed-aspect-ratio, 16 / 9);
  width: 100%;
}

.pilot-inline {
  display: grid;
  gap: 10px;
}

.pilot-drone-feed-wrap {
  order: 0;
  width: 100%;
  aspect-ratio: var(--pilot-feed-aspect-ratio, 16 / 9);
  height: auto;
  min-width: 0;
  container-type: size;
}

.pilot-mjpeg-feed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #070b12;
}

.pilot-mjpeg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pilot-mjpeg-layer.is-front {
  z-index: 1;
}

.pilot-mjpeg-feed[hidden] {
  display: none;
}

.pilot-cloudflare-live-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  border: 0;
  background: #070b12;
}

.pilot-cloudflare-live-frame[hidden] {
  display: none;
}

/* Wait for decoded dimensions, then turn portrait sources into a complete landscape image. */
.pilot-drone-feed-wrap > :is(.pilot-cloudflare-live-frame, .pilot-mjpeg-feed):not([data-feed-orientation]) {
  visibility: hidden;
}

.pilot-drone-feed-wrap > [data-feed-orientation="rotated"] {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 100cqh;
  height: 100cqw;
  max-width: none;
  transform: translate(-50%, -50%) rotate(90deg);
}

.pilot-feed-controls {
  position: absolute;
  left: 8px;
  bottom: 48px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 16px);
}

.pilot-feed-controls[hidden],
.pilot-feed-controls button[hidden] {
  display: none;
}

.pilot-feed-controls button {
  padding: 5px 9px;
  font-size: 0.75rem;
  background: rgba(6, 10, 16, 0.9);
  color: #f4f8ff;
  border: 1px solid #3c5878;
}

.pilot-drone-feed-wrap:fullscreen {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  border-radius: 0;
}

.pilot-drone-feed-wrap:-webkit-full-screen {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  border-radius: 0;
}

.live-ai-watch-status {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  max-width: min(460px, calc(100% - 20px));
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.82);
  color: #dcecff;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.live-ai-watch-status[hidden] {
  display: none;
}

.live-ai-watch-status--checking {
  border-color: rgba(125, 211, 252, 0.5);
}

.live-ai-watch-status--alert {
  border-color: rgba(255, 113, 103, 0.95);
  background: rgba(92, 10, 14, 0.94);
  color: #fff1f2;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow:
    0 0 0 2px rgba(255, 82, 73, 0.24),
    0 0 34px rgba(255, 67, 54, 0.48),
    0 14px 32px rgba(0, 0, 0, 0.36);
  animation: live-ai-status-pulse 1.05s ease-in-out infinite;
}

.live-ai-watch-status--person {
  border-color: rgba(246, 195, 68, 0.88);
  background: rgba(70, 51, 8, 0.92);
  color: #fff2bd;
  font-weight: 800;
  box-shadow:
    0 0 0 2px rgba(246, 195, 68, 0.18),
    0 0 28px rgba(246, 195, 68, 0.24);
}

.live-ai-watch-status--error {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(49, 35, 9, 0.86);
  color: #fef3c7;
}

.live-ai-alert-banner {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 14;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 118, 103, 0.9);
  border-left: 6px solid #ff3b30;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(103, 13, 18, 0.98), rgba(35, 11, 19, 0.92)),
    #3c0b12;
  color: #fff7f7;
  box-shadow:
    0 0 0 2px rgba(255, 59, 48, 0.2),
    0 18px 42px rgba(255, 59, 48, 0.34),
    0 18px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  animation: live-ai-banner-pulse 1.15s ease-in-out infinite;
}

.live-ai-alert-banner[hidden] {
  display: none;
}

.live-ai-alert-banner[data-alert-level="person"] {
  border-color: rgba(246, 195, 68, 0.92);
  background: linear-gradient(135deg, rgba(91, 65, 8, 0.98), rgba(45, 35, 15, 0.98));
  color: #fff4c7;
  box-shadow:
    0 0 0 2px rgba(246, 195, 68, 0.18),
    0 18px 42px rgba(246, 195, 68, 0.24),
    0 18px 36px rgba(0, 0, 0, 0.34);
  animation: none;
}

.live-ai-alert-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.live-ai-alert-copy strong {
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-ai-alert-copy span {
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.live-ai-alert-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-ai-alert-actions select {
  min-width: 78px;
  border: 1px solid rgba(255, 230, 230, 0.46);
  border-radius: 8px;
  background: rgba(20, 9, 13, 0.78);
  color: inherit;
  padding: 7px 8px;
  font: inherit;
}

.live-ai-alert-dismiss {
  min-width: 0;
  border: 1px solid rgba(255, 230, 230, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff7f7;
  padding: 7px 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.live-ai-alert-dismiss:hover,
.live-ai-alert-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 720px) {
  .live-ai-alert-banner {
    grid-template-columns: 1fr;
  }

  .live-ai-alert-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

.pilot-feed-wrap.live-ai-feed-alert-active {
  box-shadow:
    inset 0 0 0 3px rgba(255, 59, 48, 0.72),
    0 0 0 2px rgba(255, 170, 148, 0.18),
    0 22px 54px rgba(255, 59, 48, 0.2),
    0 16px 32px rgba(0, 0, 0, 0.24);
}

.pilot-feed-wrap.live-ai-feed-person-active {
  box-shadow:
    inset 0 0 0 3px rgba(246, 195, 68, 0.66),
    0 0 0 2px rgba(255, 226, 142, 0.16),
    0 22px 54px rgba(246, 195, 68, 0.16),
    0 16px 32px rgba(0, 0, 0, 0.24);
}

body.live-ai-alert-attention .pilot-feed-wrap.live-ai-feed-alert-active {
  animation: live-ai-feed-flash 0.9s ease-in-out 8;
}

@keyframes live-ai-status-pulse {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.025);
  }
}

@keyframes live-ai-banner-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

@keyframes live-ai-feed-flash {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 3px rgba(255, 59, 48, 0.72),
      0 0 0 2px rgba(255, 170, 148, 0.18),
      0 22px 54px rgba(255, 59, 48, 0.2),
      0 16px 32px rgba(0, 0, 0, 0.24);
  }
  50% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 59, 48, 0.98),
      0 0 0 5px rgba(255, 118, 103, 0.28),
      0 26px 68px rgba(255, 59, 48, 0.42),
      0 18px 36px rgba(0, 0, 0, 0.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-ai-watch-status--alert,
  .live-ai-alert-banner,
  body.live-ai-alert-attention .pilot-feed-wrap.live-ai-feed-alert-active {
    animation: none;
  }
}

.pilot-mjpeg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pilot-mjpeg-overlay[hidden] {
  display: none;
}

.pilot-mjpeg-debug {
  position: absolute;
  left: 8px;
  top: 42px;
  z-index: 12;
  margin: 0;
  padding: 6px 8px;
  max-width: min(95%, 760px);
  max-height: 52%;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #dcecff;
  background: rgba(7, 12, 18, 0.92);
  border: 1px solid rgba(120, 160, 208, 0.4);
  border-radius: 12px;
}

.pilot-mjpeg-bar--top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: rgba(8, 12, 18, 0.74);
  color: #dcecff;
  font: 14px/1.2 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.pilot-mjpeg-bar--bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: rgba(8, 12, 18, 0.68);
  color: #d7e8fb;
  font: 13px/1.2 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.pilot-mjpeg-reticle {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border: 1.6px solid rgba(238, 247, 255, 0.86);
  border-radius: 50%;
  box-sizing: border-box;
}

.pilot-mjpeg-reticle::before,
.pilot-mjpeg-reticle::after {
  content: "";
  position: absolute;
  background: rgba(238, 247, 255, 0.86);
}

.pilot-mjpeg-reticle::before {
  left: 50%;
  top: 50%;
  width: 96px;
  height: 1.6px;
  margin: -0.8px 0 0 -48px;
}

.pilot-mjpeg-reticle::after {
  left: 50%;
  top: 50%;
  width: 1.6px;
  height: 96px;
  margin: -48px 0 0 -0.8px;
}

#pilotFeedCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: #070b12;
}

#pilotFeedCanvas[hidden] {
  display: none;
}

.pilot-feed-hud {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  border-radius: 12px;
  background: rgba(6, 10, 16, 0.72);
  border: 1px solid #3c5878;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.pilot-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(234, 244, 255, 0.86);
  pointer-events: none;
}

.pilot-controls {
  display: grid;
  gap: 10px;
}

.pilot-control-card {
  border: 1px solid #30465f;
  border-radius: 10px;
  background: #101b28;
  padding: 10px;
}

.pilot-control-card h3 {
  margin: 0 0 8px;
}

.pilot-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pilot-buttons button {
  padding: 8px;
  font-size: 0.85rem;
}

.joystick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.joystick-wrap p {
  margin: 0 0 6px;
  font-size: 0.82rem;
}

.joystick {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 1px solid #3d5673;
  background:
    radial-gradient(circle at center, rgba(42, 64, 89, 0.68) 0 28%, rgba(15, 25, 36, 0.95) 60%),
    #0d1520;
  position: relative;
  margin: 0 auto;
  touch-action: none;
}

.joystick-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #6f93bd;
  background: radial-gradient(circle at 34% 34%, #cce4ff 0%, #7ba2cf 42%, #29425f 90%);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 0 12px rgba(95, 144, 202, 0.44);
}

.joystick.is-disabled {
  opacity: 0.5;
  filter: grayscale(0.3);
}

.joystick:active .joystick-knob,
.joystick-knob:active {
  cursor: grabbing;
}

.pilot-preview {
  width: 100%;
  border: 1px solid #3a5168;
  border-radius: 8px;
  margin-bottom: 8px;
}

.pilot-waypoint-map {
  position: relative;
  width: 100%;
  min-height: 180px;
  border: 1px solid #3d5673;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(132, 166, 206, 0.12) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(rgba(132, 166, 206, 0.12) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(180deg, rgba(36, 55, 79, 0.74), rgba(16, 25, 36, 0.86));
  overflow: hidden;
  cursor: crosshair;
}

.pilot-waypoint-map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.pilot-waypoint-map.locked {
  cursor: not-allowed;
  filter: saturate(0.82);
}

.pilot-waypoint-map.locked::after {
  content: "Capture a feed screenshot to unlock waypoint selection.";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  font-size: 0.82rem;
  color: #d7e6fa;
  background: rgba(7, 14, 22, 0.58);
  pointer-events: none;
}

.pilot-waypoint-map:focus-visible {
  outline: 2px solid #8db9eb;
  outline-offset: 2px;
}

.pilot-waypoint-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.pilot-waypoint-steps li {
  border: 1px solid #2d4258;
  border-radius: 7px;
  background: #101c2b;
  padding: 6px 8px;
  font-size: 0.8rem;
  color: #b7cbe2;
}

.pilot-waypoint-steps li.is-active {
  border-color: #7aa3d4;
  color: #eaf4ff;
}

.pilot-waypoint-steps li.is-complete {
  border-color: #5cbf82;
  color: #d9f7e4;
}

.pilot-waypoint-dot,
.pilot-waypoint-drone {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pilot-waypoint-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(234, 244, 255, 0.95);
  background: rgba(109, 166, 246, 0.82);
  box-shadow: 0 0 0 3px rgba(9, 16, 24, 0.5);
}

.pilot-waypoint-dot::after {
  content: attr(data-label);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  color: #eaf4ff;
  font-size: 0.72rem;
  white-space: nowrap;
}

.pilot-waypoint-dot.is-target {
  background: rgba(248, 205, 86, 0.94);
  border-color: rgba(255, 242, 191, 0.98);
}

.pilot-waypoint-dot.is-complete {
  background: rgba(88, 193, 128, 0.86);
  border-color: rgba(208, 249, 222, 0.95);
}

.pilot-waypoint-drone {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(224, 235, 247, 0.85);
  background: linear-gradient(145deg, rgba(246, 207, 88, 0.94), rgba(192, 150, 39, 0.92));
  box-shadow:
    0 0 0 2px rgba(13, 21, 31, 0.48),
    0 5px 14px rgba(0, 0, 0, 0.33);
}

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

.pilot-waypoint-actions button {
  flex: 1 1 140px;
  padding: 8px;
  font-size: 0.82rem;
}

.pilot-waypoint-list {
  margin-top: 8px;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

.pilot-waypoint-list li {
  border: 1px solid #30465f;
  background: #0f1a27;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.82rem;
}

#reportOutput .report-checklist {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}

#reportOutput .report-checklist-done {
  color: #b8e6c8;
}

#reportOutput .report-checklist-open {
  color: var(--muted);
}

@media print {
  @page {
    size: letter portrait;
    margin: 0;
  }

  html,
  body {
    background: #fff;
    color: #111;
  }

  body {
    box-sizing: border-box;
    margin: 0;
    padding: 0.55in 0.58in 0.68in;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5pt;
    line-height: 1.42;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .aar-print-only {
    display: block !important;
  }

  /* Mission console + dashboard: only print the after-action report block (not a fixed grid index). */
  nav.mvp-breadcrumb,
  .page-header,
  #loginSection,
  .toolbar,
  #persistentHeader,
  #doNotReloadBanner,
  .dashboard-home .mvp-home-hero,
  .dashboard-home .mvp-home-stats,
  .dashboard-home .mvp-home-command,
  .dashboard-home .mvp-home-foot,
  .grid > *:not(:has(#reportOutput)),
  .mvp-home-grid > *:not(:has([data-dashboard-report-output])) {
    display: none !important;
  }

  /*
   * Mission Overwatch: the grid row that contains #reportOutput also wraps Event Log + Mission
   * footage (:has matches the whole wrapper). Hide those so print/PDF is only the generated AAR.
   */
  .mvp-ow-event-log,
  .mvp-ow-footage {
    display: none !important;
  }

  .grid,
  .mvp-home-grid {
    display: block;
  }

  /* Strip chrome around the embedded report HTML */
  section:has(#reportOutput) > h2,
  section:has(#reportOutput) > .button-row,
  section:has(#reportOutput) > p.muted,
  article:has([data-dashboard-report-output]) > h2,
  article:has([data-dashboard-report-output]) > p.muted,
  article:has([data-dashboard-report-output]) > ul.list,
  article:has([data-dashboard-report-output]) > [data-dashboard-mission-history],
  article:has([data-dashboard-report-output]) > .mvp-home-report-actions {
    display: none !important;
  }

  .card,
  .ar-dash-surface,
  .report {
    border: 0;
    background: #fff;
    color: #111;
    padding: 0;
    margin: 0;
  }

  .report {
    width: auto !important;
    max-width: none !important;
    font-size: 9.5pt;
    line-height: 1.42;
    overflow: visible;
  }

  .report > .aar-report-title {
    display: none !important;
  }

  .report .aar-print-masthead {
    margin: 0 0 0.22in;
    padding: 0 0 0.18in;
    border-bottom: 2px solid #173b5f;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report .aar-print-brand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    color: #173b5f;
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .report .aar-print-brand strong {
    font-size: 12pt;
    letter-spacing: 0.16em;
  }

  .report .aar-print-document-type {
    margin-top: 0.19in;
    color: #52616f;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .report .aar-print-masthead h1 {
    margin: 0.04in 0 0;
    color: #101820;
    font-size: 24pt;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
  }

  .report .aar-print-document-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.14in;
    margin-top: 0.18in;
    color: #263441;
    font-size: 8pt;
  }

  .report .aar-print-document-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .report .aar-print-document-meta b {
    display: block;
    margin-bottom: 2px;
    color: #66737f;
    font-size: 6.5pt;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .report .aar-print-footer {
    position: fixed;
    right: 0.58in;
    bottom: 0.18in;
    left: 0.58in;
    padding-top: 0.08in;
    border-top: 1px solid #c7d0d8;
    color: #66737f;
    font-size: 6.5pt;
    letter-spacing: 0.035em;
  }

  .report .aar-print-footer span:last-child {
    float: right;
    max-width: 52%;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .report ul {
    padding-left: 1.25em;
  }

  .report .aar-report-title h3,
  .report .aar-report-section-heading h4,
  .report .aar-report-overview dd,
  .report .aar-narrative-card h5,
  .report .aar-photo-card-header strong {
    color: #111;
  }

  .report .aar-report-eyebrow,
  .report .aar-report-overview dt,
  .report .aar-report-section-count,
  .report .aar-photo-notes-label,
  .report .aar-photo-meta {
    color: #57606a;
  }

  .report .aar-report-overview {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 0.18in;
    overflow: visible;
    border: 1px solid #bac5ce;
    border-radius: 0;
    background: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report .aar-report-overview-item {
    grid-column: span 2;
    padding: 0.09in 0.11in;
    border-right: 1px solid #d8dee4;
    border-bottom: 1px solid #d8dee4;
  }

  .report .aar-report-overview-item--mission {
    grid-column: span 4;
  }

  .report .aar-report-overview-item--status {
    grid-column: span 2;
    border-right: 0;
  }

  .report .aar-report-overview-item:nth-child(n + 3) {
    border-bottom: 0;
  }

  .report .aar-report-overview-item:last-child {
    border-right: 0;
  }

  .report .aar-report-overview-item,
  .report .aar-report-section,
  .report .aar-narrative-card,
  .report .aar-photo-card,
  .report .aar-photo-notes {
    border-color: #d0d7de;
    background: #fff;
    color: #111;
  }

  .report .aar-report-section {
    margin-top: 0.2in;
    padding: 0;
    border: 0;
    border-radius: 0;
    break-inside: auto;
  }

  .report .aar-report-section-heading {
    align-items: end;
    margin: 0 0 0.1in;
    padding: 0 0 0.055in;
    border-bottom: 1.5px solid #173b5f;
  }

  .report .aar-report-section-heading h4 {
    margin-top: 1px;
    color: #101820;
    font-size: 13pt;
    line-height: 1.15;
  }

  .report .aar-report-eyebrow {
    color: #52616f;
    font-size: 6.5pt;
  }

  .report .aar-report-section-heading,
  .report .aar-narrative-card,
  .report .aar-photo-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report .aar-narrative-grid,
  .report .aar-photo-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.08in;
  }

  .report .aar-narrative-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    break-inside: auto;
    page-break-inside: auto;
  }

  .report .aar-narrative-card + .aar-narrative-card {
    margin-top: 0.08in;
    padding-top: 0.08in;
    border-top: 1px solid #d8dee4;
  }

  .report .aar-narrative-card h5 {
    color: #173b5f;
    font-size: 8pt;
    letter-spacing: 0.045em;
    text-transform: uppercase;
  }

  .report .aar-narrative-block .aar-prose-para {
    margin: 0.045in 0 0;
    color: #18222b;
    font-size: 9.5pt;
    line-height: 1.48;
  }

  .report .aar-report-status,
  .report .aar-custody-status,
  .report .aar-photo-category,
  .report .aar-report-section-count {
    border-color: #8c959f;
    background: #f6f8fa;
    color: #24292f;
  }

  .report .aar-custody-table-wrap {
    overflow: visible;
    border-color: #d0d7de;
    border-radius: 0;
  }

  .report .aar-custody-table {
    table-layout: fixed;
    min-width: 0;
    font-size: 7pt;
  }

  .report .aar-custody-table thead {
    display: table-header-group;
  }

  .report .aar-custody-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report .aar-custody-table th:nth-child(1),
  .report .aar-custody-table td:nth-child(1) { width: 11%; }
  .report .aar-custody-table th:nth-child(2),
  .report .aar-custody-table td:nth-child(2) { width: 24%; }
  .report .aar-custody-table th:nth-child(3),
  .report .aar-custody-table td:nth-child(3) { width: 43%; }
  .report .aar-custody-table th:nth-child(4),
  .report .aar-custody-table td:nth-child(4) { width: 13%; }
  .report .aar-custody-table th:nth-child(5),
  .report .aar-custody-table td:nth-child(5) { width: 9%; }

  .report .aar-custody-table th,
  .report .aar-custody-table td {
    border-color: #d0d7de;
    color: #111;
  }

  .report .aar-custody-table th {
    background: #e9eef2;
  }

  .report .aar-custody-hash {
    color: #263441;
    font-size: 6.2pt;
    line-height: 1.28;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .report .aar-custody-status[data-tone="positive"] {
    border-color: #6f9f7b;
    background: #edf7ef;
    color: #245c31;
  }

  .report .aar-custody-status[data-tone="warning"] {
    border-color: #b28a39;
    background: #fff8e7;
    color: #6d4b05;
  }

  .report .aar-custody-status[data-tone="negative"] {
    border-color: #bd7772;
    background: #fff0ef;
    color: #7a201b;
  }

  .report .aar-event-timeline {
    display: block;
    padding: 0;
    counter-reset: aar-event;
  }

  .report .aar-event-card {
    counter-increment: aar-event;
    margin: 0;
    padding: 0.11in 0 0.12in 0.32in;
    border: 0;
    border-bottom: 1px solid #d8dee4;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    break-inside: auto;
    page-break-inside: auto;
  }

  .report .aar-event-card::before {
    top: 0.11in;
    left: 0;
    width: 0.23in;
    height: 0.23in;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #173b5f;
    color: #fff;
    content: counter(aar-event);
    font-size: 7pt;
    font-weight: 800;
  }

  .report .aar-event-header,
  .report .aar-event-note {
    break-after: avoid;
    page-break-after: avoid;
  }

  .report .aar-event-time,
  .report .aar-event-note,
  .report .event-openai-analysis-detail p {
    color: #111;
  }

  .report .aar-event-offset {
    border-color: #8c959f;
    background: #f6f8fa;
    color: #24292f;
  }

  .report .aar-event-content {
    display: block;
    margin-top: 0.08in;
  }

  .report .aar-event-media,
  .report .aar-event-content > .event-openai-analysis {
    width: 100%;
    max-width: 100%;
    margin-top: 0.7em;
    border-color: #d0d7de;
    background: #fff;
    color: #111;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report .event-openai-analysis-label {
    color: #57606a;
  }

  .report img.event-screenshot {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 3.35in;
    margin: 0 auto;
    object-fit: contain;
    page-break-inside: avoid;
  }

  .report .aar-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.12in;
  }

  .report .aar-photo-card {
    border: 1px solid #c7d0d8;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report .aar-photo-media .event-screenshot {
    max-height: 2.25in;
  }

  /* Supervisor workflow context stays in-app; exported PDFs should be the report only. */
  .report .aar-review-history,
  .report .no-print {
    display: none !important;
  }

  /* After-action footage QR block */
  .report .footage-qr-block {
    grid-template-columns: 1.15in minmax(0, 1fr);
    gap: 0.18in;
    padding: 0.12in;
    border-radius: 0;
    border-color: #d0d7de;
    background: #f6f8fa;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .report .footage-qr-svg {
    background: #fff;
    border: 1px solid #ccc;
  }

  .report .footage-qr-svg svg {
    width: 0.95in;
    height: 0.95in;
  }

  .report video,
  .report button {
    display: none !important;
  }

  .report .footage-qr-caption,
  .report .footage-qr-url {
    color: #333;
  }

  /*
   * After-action modal: Print / Save PDF toggles body.aar-modal-print-session so only the dialog
   * content prints (not the mission console grid).
   */
  body.aar-modal-print-session > *:not(#afterActionReportModalOverlay) {
    display: none !important;
  }

  body.aar-modal-print-session #afterActionReportModalOverlay {
    position: static !important;
    inset: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
    z-index: auto !important;
  }

  body.aar-modal-print-session #afterActionReportModalOverlay .aar-modal-panel {
    max-height: none !important;
    width: 100% !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.aar-modal-print-session #afterActionReportModalOverlay .aar-modal-scroll {
    overflow: visible !important;
    padding: 0 !important;
  }

  body.aar-modal-print-session #afterActionReportModalOverlay .aar-modal-no-print {
    display: none !important;
  }
}

/* After-action report: footage QR (replaces inline footage clips) */
.report .footage-qr-block {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(138, 164, 190, 0.22);
  border-radius: 10px;
  background: rgba(18, 31, 44, 0.62);
}

.report .footage-qr-svg {
  display: inline-block;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d4dee9;
  line-height: 0;
}

.report .footage-qr-svg svg {
  display: block;
  width: 158px;
  height: 158px;
}

.report .footage-qr-copy {
  min-width: 0;
}

.report .footage-qr-kicker {
  margin-bottom: 6px;
}

.report .footage-qr-caption {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 60ch;
}

.report .footage-qr-link-label {
  margin-top: 12px;
  color: #8da5bb;
}

.report .footage-qr-url {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.report .footage-qr-fallback {
  display: inline-block;
  padding: 6px 10px;
  border: 1px dashed #5a708a;
  border-radius: 12px;
}

.report .aar-footage-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report .aar-footage-list > li {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(138, 164, 190, 0.2);
  border-radius: 9px;
  background: rgba(18, 31, 44, 0.54);
}

@media (max-width: 640px) {
  .report .footage-qr-block {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    padding: 12px;
  }

  .report .footage-qr-svg svg {
    width: min(158px, 100%);
    height: auto;
  }
}

@media (max-width: 860px) {
  .mission-ai-analysis-modes {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .right-column {
    grid-column: auto;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ar-overwatch-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .ar-overwatch-header-status {
    justify-items: start;
    min-width: 0;
    width: 100%;
  }

  .ar-overwatch-header-status .mvp-cloud-sync {
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .mvp-overwatch-top-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-lifecycle-section {
    padding: 18px;
  }

  .mission-lifecycle-head {
    display: grid;
  }

  .mission-lifecycle-next {
    justify-self: start;
  }

  .mission-lifecycle-steps {
    grid-template-columns: 1fr;
  }

  .mission-lifecycle-step:not(:last-child)::after {
    display: none;
  }

  .sticky-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    top: 6px;
  }

  .sticky-summary.sticky-summary--past {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 12px;
  }

  .sticky-summary.sticky-summary--past > .sticky-past-play,
  .sticky-summary.sticky-summary--past > .sticky-summary-operator,
  .sticky-summary.sticky-summary--past > .sticky-summary-mission,
  .sticky-summary.sticky-summary--past > .sticky-past-meta,
  .sticky-summary.sticky-summary--past > .sticky-past-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    width: auto;
    min-width: 0;
    max-width: 100%;
  }

  .sticky-summary.sticky-summary--past > .sticky-past-play {
    justify-self: stretch;
    width: 100%;
  }

  .sticky-summary.sticky-summary--past > .sticky-past-actions {
    justify-self: start;
  }

  .sticky-summary.sticky-summary--past > .sticky-summary-operator,
  .sticky-summary.sticky-summary--past > .sticky-summary-mission,
  .sticky-summary.sticky-summary--past > .sticky-past-meta {
    overflow-wrap: anywhere;
  }

  .sticky-summary.sticky-summary--past > .sticky-past-meta {
    white-space: normal;
  }

  .sticky-past-play .ghost {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #appSection.past-mission-review[data-closed-mission-tab="media"] .mvp-ow-footage {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-lifecycle-steps {
    grid-template-columns: 1fr;
  }

  .mission-lifecycle-step {
    min-height: 0;
  }

  .mission-lifecycle-step::after {
    top: auto;
    right: auto;
    bottom: -9px;
    left: 21px;
    width: 0;
    height: 9px;
    border-top: 0;
    border-left: 1px solid rgba(150, 170, 190, 0.36);
  }

  .pilot-grid {
    grid-template-columns: 1fr;
  }

  .joystick-grid {
    grid-template-columns: 1fr;
  }

  .sg-layout {
    grid-template-columns: 1fr;
  }

  .closed-mission-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #closedMissionReportPanel {
    overflow: hidden;
  }

  #closedMissionReportPanel > .button-row,
  #afterActionMissionCustodyWrap .button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  #closedMissionReportPanel > .button-row > button,
  #afterActionMissionCustodyWrap .button-row > button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #afterActionMissionCustodyWrap .button-row > span {
    min-width: 0;
  }

  #reportOutput {
    width: 100%;
    overflow-x: hidden;
  }

  #reportOutput .event-meta button,
  #reportOutput .footage-qr-fallback {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .report .aar-custody-table {
    min-width: 620px;
  }
}

@media (max-width: 1180px) {
  .mvp-overwatch-grid.mvp-relay-live {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "ow-session"
      "ow-scenario"
      "ow-feed"
      "ow-right"
      "ow-below";
  }

  /* Keep single-column stack; do not apply wide 3-col template from .mvp-scenario-collapsed */
  .mvp-overwatch-grid.mvp-relay-live.mvp-scenario-collapsed,
  .mvp-overwatch-grid.mvp-relay-live.mvp-tools-collapsed,
  .mvp-overwatch-grid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  #mvpOverwatchMain.mvp-overwatch-layout-live {
    width: min(1050px, calc(100% - 32px));
    max-width: 1050px;
  }
}

/* Public HTTPS: LAN relay banner (ws:// blocked from https:// origins) */
.mvp-lan-https-banner {
  border-color: #b8922a;
  background: linear-gradient(180deg, #2a2415, #151c12);
  margin-bottom: 4px;
}

.mvp-lan-banner-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #f0e6c8;
}

.mvp-lan-banner-lead {
  margin: 0 0 10px;
  line-height: 1.5;
}

.mvp-lan-banner-lead code,
.mvp-lan-banner-steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  color: #c5d8ee;
}

.mvp-lan-banner-steps {
  margin: 0;
  padding-left: 1.35em;
  line-height: 1.55;
  color: var(--text);
}

.mvp-lan-banner-steps li + li {
  margin-top: 10px;
}

.mvp-lan-banner-steps a {
  color: var(--accent);
  font-weight: 600;
}

.mvp-lan-banner-more {
  margin: 12px 0 0;
}

/* ===========================================================================
 * AAR supervisor approval flow:
 * - Pre-submit checklist modal
 * - Approve / return-to-draft decision modals
 * - Approval banner variants (pending / approved / returned)
 * - Review-history timeline inside the report
 * - Dashboard supervisor inbox + operator-returned panels
 * ========================================================================= */

.aar-modal-overlay.aar-review-modal-overlay {
  z-index: 10025;
  /* Tall checklist + footer: centering alone clips the bottom on short viewports — allow scrolling the overlay. */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.aar-review-modal-panel {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  margin-block: max(12px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-bottom, 0px));
}
.aar-review-modal-panel .aar-modal-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Flex items default to flex-shrink:1; that can clip the scrollable overflow height so the bottom never scrolls into view. */
  padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 16px));
}
.aar-review-modal-panel .aar-modal-scroll > * {
  flex-shrink: 0;
}
/* Footer is a sibling of `.aar-modal-scroll` so it stays pinned to the bottom of
   the panel and the scroll area can scroll its content freely. */
.aar-review-modal-panel > .aar-modal-footer {
  flex-shrink: 0;
}
.aar-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(88, 166, 255, 0.22);
  background: inherit;
}
.aar-modal-footer .danger {
  background: rgba(218, 54, 51, 0.18);
  border-color: rgba(218, 54, 51, 0.45);
  color: #ff8a87;
}
.aar-modal-footer .danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.aar-presubmit-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aar-presubmit-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border-default, #30363d);
  background: var(--color-canvas-subtle, #161b22);
}
.aar-presubmit-item.aar-presubmit-pass {
  border-color: rgba(63, 185, 80, 0.45);
}
.aar-presubmit-item.aar-presubmit-fail {
  border-color: rgba(218, 54, 51, 0.5);
  background: rgba(218, 54, 51, 0.08);
}
.aar-presubmit-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
}
.aar-presubmit-pass .aar-presubmit-icon {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.16);
}
.aar-presubmit-fail .aar-presubmit-icon {
  color: #ff8a87;
  background: rgba(218, 54, 51, 0.18);
}
.aar-presubmit-attest {
  align-items: center;
}
.aar-presubmit-attest input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent, #58a6ff);
}
.aar-presubmit-text {
  flex: 1;
  min-width: 0;
}
.aar-presubmit-label {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.aar-presubmit-detail {
  font-size: 0.85rem;
}
.aar-presubmit-officer-review {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(88, 166, 255, 0.08);
  border: 1px dashed rgba(88, 166, 255, 0.35);
  font-size: 0.85rem;
}
.aar-presubmit-blocked {
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(218, 54, 51, 0.45);
  background: rgba(218, 54, 51, 0.08);
  color: #ffb1ad;
}
.aar-presubmit-comment-label {
  font-weight: 600;
  margin: 6px 0 0;
  display: block;
}
.aar-presubmit-comment,
.aar-review-reason {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border-default, #30363d);
  background: var(--color-canvas-subtle, #161b22);
  color: var(--text, #f0f6fc);
  font: inherit;
  resize: vertical;
}
.aar-review-reason-label {
  font-weight: 600;
  margin: 6px 0 0;
  display: block;
}

.aar-review-submitted-line {
  margin: 0;
}
.aar-review-submitter-block {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border-default, #30363d);
  background: rgba(88, 166, 255, 0.06);
}
.aar-review-submitter-note {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-left: 3px solid var(--accent, #58a6ff);
  background: rgba(15, 23, 34, 0.45);
  border-radius: 4px;
}

/* Approval banner variants */
.report .aar-approval-banner-pending {
  border-color: rgba(187, 128, 9, 0.55);
  background: rgba(187, 128, 9, 0.1);
  color: #e8c878;
}
.report .aar-approval-banner-approved {
  border-color: rgba(63, 185, 80, 0.5);
  background: rgba(63, 185, 80, 0.1);
  color: #a7e7b2;
}
.report .aar-approval-banner-returned {
  border-color: rgba(218, 54, 51, 0.5);
  background: rgba(218, 54, 51, 0.1);
  color: #ffb0aa;
}
.report .aar-approval-banner p {
  margin: 0;
  color: var(--text);
}
.report .aar-approval-note {
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 3px solid rgba(88, 166, 255, 0.55);
  background: rgba(15, 23, 34, 0.55);
  border-radius: 4px;
  font-size: 0.88em;
}

.report .aar-analysis-review-callout {
  margin: 0 0 0.75rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(187, 128, 9, 0.58);
  background: rgba(187, 128, 9, 0.1);
}

.report .aar-analysis-review-callout h4 {
  margin: 0 0 4px;
}

.report .aar-analysis-review-callout p {
  margin: 0;
}

.report .aar-review-history {
  background: rgba(15, 23, 34, 0.5);
}
.aar-review-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aar-review-history-item {
  position: relative;
  padding: 9px 10px 9px 13px;
  border-left: 3px solid rgba(88, 166, 255, 0.55);
  background: rgba(88, 166, 255, 0.05);
  border-radius: 7px;
}
.aar-review-history-item.aar-review-history-approved {
  border-left-color: rgba(63, 185, 80, 0.7);
  background: rgba(63, 185, 80, 0.06);
}
.aar-review-history-item.aar-review-history-returned {
  border-left-color: rgba(218, 54, 51, 0.7);
  background: rgba(218, 54, 51, 0.06);
}
.aar-review-history-line {
  color: var(--text);
  font-size: 0.88em;
  line-height: 1.45;
}
.aar-review-history-comment {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(138, 164, 190, 0.16);
  color: var(--muted);
  font-size: 0.88em;
  line-height: 1.45;
}

@media print {
  .report .aar-approval-banner,
  .report .aar-approval-note,
  .report .aar-analysis-review-callout,
  .report .footage-qr-block,
  .report .aar-footage-list > li {
    border-color: #d0d7de;
    background: #fff;
    color: #111;
  }

  .report .aar-approval-banner p,
  .report .aar-analysis-review-callout p,
  .report .footage-qr-caption,
  .report .footage-qr-url {
    color: #24292f;
  }

  .report .footage-qr-svg svg {
    width: 0.95in;
    height: 0.95in;
  }
}

/* Dashboard supervisor inbox + operator-returned panels */
.ar-dash-supervisor-inbox .ar-dash-panel-head,
.ar-dash-operator-returned .ar-dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ar-dash-inbox-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(218, 54, 51, 0.18);
  color: #ff8a87;
  margin-left: 8px;
  vertical-align: middle;
}
.ar-dash-inbox-count[data-empty="1"] {
  background: rgba(110, 118, 129, 0.25);
  color: var(--muted, #8b949e);
}
.ar-dash-supervisor-inbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ar-dash-inbox-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border-default, #30363d);
  background: var(--color-canvas-subtle, #161b22);
}
.ar-dash-inbox-row-main {
  flex: 1;
  min-width: 0;
}
.ar-dash-inbox-row-title {
  font-weight: 600;
}
.ar-dash-inbox-row-meta {
  font-size: 0.85rem;
  margin-top: 2px;
}
.ar-dash-inbox-note {
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 3px solid rgba(88, 166, 255, 0.55);
  background: rgba(15, 23, 34, 0.55);
  border-radius: 4px;
  font-size: 0.88rem;
}
.ar-dash-inbox-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  align-items: center;
}
.ar-dash-inbox-row-actions .danger {
  background: rgba(218, 54, 51, 0.18);
  border-color: rgba(218, 54, 51, 0.45);
  color: #ff8a87;
}
.ar-dash-inbox-returned {
  border-color: rgba(218, 54, 51, 0.45);
  background: rgba(218, 54, 51, 0.06);
}
@media (max-width: 720px) {
  .ar-dash-inbox-item {
    flex-direction: column;
    align-items: stretch;
  }
  .ar-dash-inbox-row-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 560px) {
  .container,
  .mvp-breadcrumb {
    width: min(1050px, calc(100% - 24px));
  }

  .card {
    padding: 12px;
    min-width: 0;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .button-row > button,
  .button-row > a,
  .button-row > .ghost,
  .button-row > label {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .button-row > span,
  .button-row > p {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .sticky-summary {
    grid-template-columns: minmax(0, 1fr);
    position: static;
  }

  .mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-head,
  .mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-steps,
  .mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-step {
    width: 100%;
    min-width: 0;
  }

  .mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-head h2 {
    white-space: normal;
  }

  .mission-lifecycle-section:has(.mission-lifecycle-steps[data-lifecycle-terminal="approved"]) .mission-lifecycle-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .sticky-summary.sticky-summary--past > .sticky-past-play {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .sticky-summary.sticky-summary--past > .sticky-past-play .ghost {
    width: 100%;
  }

  .closed-mission-tabs,
  .mission-ai-review-actions,
  .mission-ai-demo-actions,
  .mission-ai-question-row,
  .mission-ai-cross-mission-row,
  .mission-ai-chip-row,
  .aar-modal-header-actions,
  .event-openai-analysis-actions,
  .mvp-automatic-alert-review,
  .mission-photo-guest-qr-actions,
  .bridge-connect-actions,
  .bridge-cert-hint-actions,
  .bridge-trust-actions,
  .footage-photo-card-actions,
  .mission-footage-play-row,
  .footage-viewer-capture-row,
  .footage-sync-align-actions,
  .pilot-waypoint-actions,
  .aar-modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .closed-mission-tabs .closed-mission-tab,
  .mission-ai-review-actions button,
  .mission-ai-demo-actions button,
  .mission-ai-question-row button,
  .mission-ai-cross-mission-row button,
  .aar-modal-header-actions button,
  .event-openai-analysis-actions button,
  .mvp-automatic-alert-review button,
  .mission-photo-guest-qr-actions button,
  .bridge-connect-actions button,
  .bridge-connect-actions a,
  .bridge-cert-hint-actions button,
  .bridge-trust-actions button,
  .footage-photo-card-actions button,
  .mission-footage-play-row button,
  .footage-viewer-capture-row button,
  .footage-sync-align-actions button,
  .pilot-waypoint-actions button,
  .aar-modal-footer button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .report .footage-qr-svg svg {
    width: min(180px, calc(100vw - 96px));
    height: auto;
  }
}

/* Mission Overwatch command center — full-workspace live operations and review shell. */
body.ar-overwatch-command-shell {
  --ow-command-bg: #0d1117;
  --ow-command-panel: #161b22;
  --ow-command-panel-strong: #21262d;
  --ow-command-line: #30363d;
  --ow-command-line-strong: #484f58;
  --ow-command-text: #f0f6fc;
  --ow-command-muted: #8b949e;
  --ow-command-blue: #58a6ff;
  --ow-command-green: #3fb950;
  --ow-command-amber: #d29922;
  --ow-command-red: #f85149;
  background: var(--ow-command-bg);
}

body.ar-overwatch-command-shell::before {
  background-image:
    linear-gradient(rgba(240, 246, 252, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 246, 252, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(black, rgba(0, 0, 0, 0.44));
}

body.ar-overwatch-command-shell .ar-app-header {
  min-height: 50px;
  padding-block: 6px;
  border-bottom-color: var(--ow-command-line);
  background: rgba(13, 17, 23, 0.96);
  backdrop-filter: blur(12px);
}

body.ar-overwatch-command-shell .ar-app-header-title h1 {
  color: #c9d9eb;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.ar-overwatch-command-shell .ar-app-header-title p {
  display: none;
}

body.ar-overwatch-command-shell .ar-sidebar-trigger {
  width: 34px;
  height: 34px;
}

.ar-overwatch-command-center-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--ow-command-line);
  border-radius: 8px;
  background: var(--ow-command-panel);
  color: var(--ow-command-text);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.ar-overwatch-command-center-link:hover {
  border-color: var(--ow-command-line-strong);
  background: var(--ow-command-panel-strong);
  color: #fff;
}

body.ar-overwatch-command-shell .ar-app-header .ar-overwatch-command-center-link {
  position: absolute;
  top: 50%;
  right: clamp(12px, 2vw, 24px);
  transform: translateY(-50%);
}

body.ar-overwatch-command-shell #mvpOverwatchMain,
body.ar-overwatch-command-shell #mvpOverwatchMain.mvp-overwatch-layout-live,
body.ar-overwatch-command-shell #mvpOverwatchMain:has(#appSection.past-mission-review) {
  width: calc(100% - 24px);
  max-width: none;
  margin: 12px;
  gap: 10px;
}

body.ar-overwatch-command-shell #appSection {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

body.ar-overwatch-live-ops {
  overflow: hidden;
}

body.ar-overwatch-live-ops .ar-sidebar,
body.ar-overwatch-live-ops .ar-sidebar-scrim,
body.ar-overwatch-live-ops .ar-sidebar-trigger {
  display: none !important;
}

body.ar-overwatch-live-ops .ar-sidebar-provider {
  padding-left: 0;
}

body.ar-overwatch-command-shell .ar-sidebar-provider[data-sidebar-state] .ar-app-header-title {
  flex: 1 1 auto;
  width: 100%;
  margin-inline: 0;
  padding-left: calc(
    var(--ar-sidebar-trigger-left) + var(--ar-sidebar-trigger-size) + var(--ar-sidebar-trigger-title-gap)
  );
  padding-right: clamp(150px, 16vw, 180px);
}

body.ar-overwatch-live-ops .ar-sidebar-provider,
body.ar-overwatch-live-ops .ar-sidebar-inset {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.ar-overwatch-live-ops #mvpOverwatchMain,
body.ar-overwatch-live-ops #mvpOverwatchMain.mvp-overwatch-layout-live {
  height: calc(100dvh - 62px);
  min-height: 0;
  margin: 0 12px 12px;
  overflow: hidden;
}

body.ar-overwatch-live-ops #appSection {
  height: 100%;
  min-height: 0;
}

body.ar-overwatch-live-ops #mvpOverwatchGrid {
  flex: 1 1 auto;
}

body.ar-overwatch-command-shell #appSection[hidden] {
  display: none !important;
}

body.ar-overwatch-command-shell #persistentHeader {
  order: 0;
}

body.ar-overwatch-command-shell #missionLifecycleSection {
  order: 1;
}

body.ar-overwatch-command-shell #closedMissionTabs {
  order: 2;
}

body.ar-overwatch-command-shell #mvpOverwatchGrid {
  order: 3;
}

body.ar-github-ui.ar-overwatch-command-shell .card {
  border-color: var(--ow-command-line);
  border-radius: 9px;
  background:
    linear-gradient(165deg, rgba(28, 33, 40, 0.98), rgba(18, 22, 28, 0.98)),
    var(--ow-command-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
}

body.ar-github-ui.ar-overwatch-command-shell .card:hover {
  border-color: var(--ow-command-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 12px 30px rgba(0, 0, 0, 0.18);
  transform: none;
}

body.ar-github-ui.ar-overwatch-command-shell .mvp-command-bar,
body.ar-github-ui.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar {
  position: sticky;
  top: 50px;
  z-index: 19;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 10px 16px;
  align-items: center;
  margin: 0 0 10px;
  padding: 11px 13px;
  border-color: var(--ow-command-line);
  background: rgba(13, 17, 23, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

body.ar-github-ui.ar-overwatch-command-shell.ar-overwatch-live-ops .mvp-command-bar {
  position: static;
  top: auto;
}

body.ar-overwatch-command-shell .mvp-command-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.ar-overwatch-command-shell .mvp-command-kicker {
  margin: 0;
  color: var(--ow-command-blue);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.ar-overwatch-command-shell .mvp-command-mission-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body.ar-overwatch-command-shell .mvp-command-mission-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ow-command-text);
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ar-overwatch-command-shell .mvp-command-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(143, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(143, 163, 184, 0.09);
  color: #bcc9d6;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

body.ar-overwatch-command-shell .mvp-command-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

body.ar-overwatch-command-shell .mvp-command-state[data-tone="live"] {
  border-color: rgba(102, 226, 160, 0.42);
  background: rgba(102, 226, 160, 0.11);
  color: var(--ow-command-green);
}

body.ar-overwatch-command-shell .mvp-command-state[data-tone="live"]::before {
  box-shadow: 0 0 10px currentColor;
}

body.ar-overwatch-command-shell .mvp-command-state[data-tone="review"] {
  border-color: rgba(99, 173, 255, 0.44);
  background: rgba(99, 173, 255, 0.12);
  color: #a8d3ff;
}

body.ar-overwatch-command-shell .mvp-command-status-strip {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

body.ar-overwatch-command-shell .mvp-command-status-chip {
  display: grid;
  min-width: 86px;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--ow-command-line);
  border-radius: 7px;
  background: rgba(22, 27, 34, 0.9);
}

body.ar-overwatch-command-shell .mvp-command-status-label {
  color: var(--ow-command-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

body.ar-overwatch-command-shell .mvp-command-status-chip strong {
  max-width: 150px;
  overflow: hidden;
  color: #dce9f7;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ar-overwatch-command-shell .mvp-command-status-strip .mvp-cloud-sync {
  align-self: stretch;
  width: auto;
  max-width: 220px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.66rem;
  text-align: left;
}

body.ar-overwatch-command-shell .mvp-command-status-strip .live-ai-watch-panel--command {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 5px 6px 5px 9px;
  border-color: var(--ow-command-line);
  border-radius: 7px;
  background: rgba(22, 27, 34, 0.9);
}

body.ar-overwatch-command-shell .mvp-command-end-mission {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  white-space: nowrap;
}

body.ar-overwatch-command-shell .live-ai-watch-panel--command .live-ai-watch-panel-head {
  gap: 8px;
}

body.ar-overwatch-command-shell .live-ai-watch-panel--command #liveAiWatchPanelTitle {
  color: var(--ow-command-muted);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.1;
  text-transform: uppercase;
}

body.ar-overwatch-command-shell .live-ai-watch-panel--command .live-ai-watch-toggle {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.7rem;
}

body.ar-overwatch-command-shell .live-ai-watch-panel--command .live-ai-watch-collapse-button {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.68rem;
}

body.ar-overwatch-command-shell .mvp-command-actions,
body.ar-overwatch-command-shell .mvp-command-actions > p {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

body.ar-overwatch-command-shell .mvp-command-actions:empty,
body.ar-overwatch-command-shell .mvp-command-actions > p[hidden] {
  display: none !important;
}

body.ar-overwatch-command-shell .mvp-command-actions button,
body.ar-overwatch-command-shell .mission-rename-button,
body.ar-overwatch-command-shell .mission-livestream-button,
body.ar-overwatch-command-shell .mission-share-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.7rem;
  white-space: nowrap;
}

body.ar-overwatch-command-shell .mission-rename-button,
body.ar-overwatch-command-shell .mission-livestream-button,
body.ar-overwatch-command-shell .mission-share-button {
  margin-left: 0;
}

body.ar-overwatch-command-shell .mission-rename-status,
body.ar-overwatch-command-shell .sticky-past-meta {
  min-width: 0;
  max-width: 100%;
  margin: 2px 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

body.ar-overwatch-command-shell .mvp-command-bar > .mvp-pilot-pull-panel {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

body.ar-overwatch-live-ops #missionLifecycleSection {
  display: none !important;
}

body.ar-overwatch-command-shell .mvp-overwatch-grid {
  gap: 10px;
  margin-top: 0;
}

body.ar-overwatch-live-ops #mvpOverwatchGrid,
body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live,
body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "ow-session"
    "ow-bridge"
    "ow-feed";
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-scenario-collapsed,
body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid,
body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live,
body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(320px, min(var(--mvp-ow-operations-width, 390px), calc(100% - 330px)));
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "ow-feed ow-operations";
}

body.ar-overwatch-live-ops .mvp-ow-session {
  grid-area: ow-session;
  display: none !important;
  padding: 9px 11px;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create {
  overflow: auto;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create .ar-sidebar-provider,
body.ar-overwatch-live-ops.ar-overwatch-mission-create .ar-sidebar-inset {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchMain,
body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchMain.mvp-overwatch-layout-live,
body.ar-overwatch-live-ops.ar-overwatch-mission-create #appSection {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchGrid,
body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchGrid.mvp-relay-live,
body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchGrid.mvp-scenario-collapsed,
body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchGrid.mvp-tools-collapsed {
  display: block;
  width: min(100%, 760px);
  min-height: 0;
  margin: 22px auto 40px;
  overflow: visible;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create #mvpOverwatchGrid > :not(.mvp-ow-session) {
  display: none !important;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create .mvp-ow-session {
  display: block !important;
  padding: clamp(18px, 3vw, 30px);
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create .mvp-ow-session > h2,
body.ar-overwatch-live-ops.ar-overwatch-mission-create .web-hdmi-mission-create-form {
  display: grid;
}

body.ar-overwatch-live-ops.ar-overwatch-mission-create .mvp-ow-operations-toggle {
  display: none !important;
}

.web-hdmi-mission-create-form {
  gap: 15px;
}

.web-hdmi-mission-create-intro {
  display: grid;
  gap: 6px;
  padding-bottom: 5px;
}

.web-hdmi-mission-create-intro h3,
.web-hdmi-mission-create-intro p {
  margin: 0;
}

.web-hdmi-mission-create-kicker {
  color: #78c4ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.controller-livestream-setup-panel {
  display: grid;
  gap: 14px;
  width: 100%;
}

.controller-audio-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ow-command-line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.55);
}

.controller-audio-toggle[hidden] {
  display: none;
}

.controller-audio-toggle input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.controller-audio-toggle span {
  display: grid;
  gap: 3px;
}

.controller-audio-toggle small {
  color: var(--muted);
  line-height: 1.35;
}

.controller-audio-toggle--live {
  background: rgba(44, 122, 78, 0.1);
}

.controller-livestream-setup-panel[hidden] {
  display: none;
}

body.ar-overwatch-live-ops .mvp-ow-feed > .controller-livestream-setup-panel {
  position: absolute;
  z-index: 13;
  inset: 34px 7px 7px;
  align-content: start;
  width: auto;
  min-width: 0;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--ow-command-line-strong);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.985);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
  overflow: auto;
}

.controller-livestream-setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.controller-livestream-setup-head h3,
.controller-livestream-setup-head p,
.controller-livestream-credentials h4 {
  margin: 0;
}

.controller-livestream-setup-head p {
  margin-top: 5px;
}

.controller-livestream-setup-head .ghost {
  flex: 0 0 auto;
  white-space: nowrap;
}

.controller-livestream-credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.controller-livestream-credentials section {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--ow-command-line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.72);
}

.controller-livestream-credentials label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.controller-livestream-credentials input[readonly] {
  width: 100%;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .controller-livestream-setup-head {
    display: grid;
  }

  .controller-livestream-credentials {
    grid-template-columns: minmax(0, 1fr);
  }
}

.web-hdmi-mission-create-status {
  min-height: 1.25em;
  margin: 0;
}

.web-hdmi-mission-create-status[data-tone="error"] {
  color: #ffb0b0;
}

.web-hdmi-mission-create-status[data-tone="success"] {
  color: #8de0b4;
}

body.ar-overwatch-live-ops .mvp-ow-session > h2 {
  display: none;
}

body.ar-overwatch-live-ops .mvp-ow-session #missionSessionActivePanel:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.ar-overwatch-live-ops .mission-session-active-summary {
  margin: 0;
  color: #b9cadd;
  font-size: 0.74rem;
}

body.ar-overwatch-live-ops .mission-session-active-actions {
  flex: 0 0 auto;
}

body.ar-overwatch-live-ops .mission-session-active-actions button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 0.72rem;
}

body.ar-overwatch-live-ops .mvp-ow-bridge-panel {
  grid-area: ow-bridge;
}

body.ar-overwatch-live-ops .mvp-ow-scenario {
  display: none !important;
}

body.ar-overwatch-live-ops .mvp-ow-feed {
  grid-area: ow-feed;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 7px;
  border-color: var(--ow-command-line);
  background: #010409;
}

body.ar-overwatch-live-ops #appSection.pilot-only-mission-review.cloud-live-mission-review .mvp-ow-feed.mvp-pilot-only-hidden {
  display: flex !important;
}

body.ar-overwatch-live-ops .mvp-ow-feed > h2 {
  margin: 1px 3px 6px;
  color: #c9d9e9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.ar-overwatch-live-ops .mvp-ow-feed > p.muted {
  display: none;
}

body.ar-overwatch-live-ops .relay-feed-toolbar,
body.ar-overwatch-live-ops .feed-source-toggle--standalone,
body.ar-overwatch-live-ops .live-ai-watch-panel {
  border-radius: 7px;
  background: rgba(22, 27, 34, 0.9);
}

body.ar-overwatch-live-ops .relay-feed-toolbar {
  display: none !important;
}

body.ar-overwatch-live-ops .relay-feed-toolbar,
body.ar-overwatch-live-ops .feed-source-toggle--standalone {
  margin-bottom: 7px;
  padding: 6px 8px;
}

body.ar-overwatch-live-ops #pilotInlineFeedRow {
  order: 10;
  flex: 1 1 auto;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  container-type: size;
}

body.ar-overwatch-live-ops .mvp-ow-feed > #liveAiWatchConfigGrid {
  position: absolute;
  z-index: 12;
  inset: 7px;
  gap: 9px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--ow-command-line-strong);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.985);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-config-tabs {
  display: none;
  grid-column: 1 / -1;
}

body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-watch-column {
  padding: 10px;
  border-color: var(--ow-command-line);
  background: rgba(22, 27, 34, 0.62);
}

body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-standard-detection-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-standard-detection-list li {
  padding: 5px 7px;
  border: 1px solid var(--ow-command-line);
  border-radius: 7px;
  background: rgba(1, 4, 9, 0.72);
}

body.ar-overwatch-live-ops #liveAiMissionFocusPanel > p.muted:last-child {
  display: none;
}

body.ar-overwatch-live-ops #pilotInlineFeedRow .pilot-drone-feed-wrap {
  width: min(100%, calc(100cqh * (var(--pilot-feed-aspect-ratio, 16 / 9))));
  max-width: 100%;
  height: auto;
  max-height: 100%;
}

body.ar-overwatch-live-ops .pilot-feed-wrap {
  border-color: var(--ow-command-line-strong);
  border-radius: 7px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

body.ar-overwatch-live-ops #mvpOverwatchGrid > .mvp-ow-right-stack,
body.ar-overwatch-live-ops #mvpOverwatchGrid > .mvp-ow-center-below {
  display: contents;
}

body.ar-overwatch-live-ops .mvp-ow-operations-toggle {
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--ow-command-line-strong);
  border-radius: 8px;
  background: rgba(22, 27, 34, 0.96);
  color: var(--ow-command-text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.ar-overwatch-live-ops.ar-overwatch-operations-open .mvp-ow-operations-toggle {
  display: none;
}

body.ar-overwatch-live-ops .mvp-ow-operations-toggle-count {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  padding: 2px 6px;
  border: 1px solid var(--ow-command-line);
  border-radius: 999px;
  background: rgba(139, 148, 158, 0.1);
  color: #b1bac4;
  font-size: 0.64rem;
}

body.ar-overwatch-live-ops .mvp-ow-operations-toggle-count[data-tone="attention"] {
  border-color: rgba(242, 195, 93, 0.5);
  background: rgba(242, 195, 93, 0.14);
  color: var(--ow-command-amber);
}

body.ar-overwatch-live-ops .mvp-ow-operations-scrim {
  display: none !important;
}

body.ar-overwatch-live-ops .mvp-ow-operations-scrim[hidden] {
  display: none !important;
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer {
  position: relative;
  z-index: auto;
  grid-area: ow-operations;
  display: none;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--ow-command-line);
  border-radius: 9px;
  background: rgba(13, 17, 23, 0.985);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.24);
  transform: none;
  transition: none;
  pointer-events: auto;
  overflow: hidden;
}

body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle {
  position: absolute;
  z-index: 4;
  inset: 0 auto 0 0;
  width: 12px;
  cursor: col-resize;
  touch-action: none;
}

body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 1px;
  width: 3px;
  height: 52px;
  border-radius: 999px;
  background: var(--ow-command-line-strong);
  opacity: 0.72;
  transform: translateY(-50%);
  transition: background 120ms ease, opacity 120ms ease;
}

body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle:hover::after,
body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle:focus-visible::after,
body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle.is-resizing::after {
  background: var(--ow-command-blue);
  opacity: 1;
}

body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle:focus-visible {
  outline: 2px solid var(--ow-command-blue);
  outline-offset: -2px;
}

body.ar-overwatch-sidebar-resizing,
body.ar-overwatch-sidebar-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open > .mvp-ow-operations-drawer-head,
body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open > .mvp-ow-operations-tabs,
body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open > .mvp-ow-tools-panel,
body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open > .mvp-ow-event-log,
body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open > .mvp-ow-live-ask-ai,
body.ar-overwatch-live-ops .mvp-ow-operations-drawer.is-open > .ar-overwatch-operational-map {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 0;
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer-head h2 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer-actions {
  display: flex;
  gap: 7px;
}

body.ar-overwatch-live-ops .mvp-ow-operations-drawer-actions button {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 0.68rem;
}

body.ar-overwatch-live-ops .mvp-ow-operations-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
  padding: 3px;
  border: 1px solid var(--ow-command-line);
  border-radius: 8px;
  background: rgba(1, 4, 9, 0.38);
}

body.ar-overwatch-live-ops
  .mvp-ow-operations-drawer:has(#overwatchOperationsTabInput:not([hidden]))
  .mvp-ow-operations-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.ar-overwatch-live-ops .mvp-ow-operations-tab {
  min-height: 34px;
  padding: 6px 7px;
  border-color: transparent;
  background: transparent;
  color: #8fa3b8;
  font-size: 0.69rem;
}

body.ar-overwatch-live-ops .mvp-ow-operations-tab.is-active {
  border-color: rgba(99, 173, 255, 0.48);
  background: rgba(99, 173, 255, 0.14);
  color: #e4f1ff;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-panel,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-log,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .ar-overwatch-operational-map {
  grid-area: auto;
  grid-row: 3;
  min-height: 0;
  margin-top: 10px;
  overflow: hidden;
}

body.ar-overwatch-live-ops:not(.ar-overwatch-operations-open) .mvp-ow-event-log {
  display: none !important;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer:not([data-operations-tab="timeline"]) .mvp-ow-event-log,
body.ar-overwatch-live-ops #overwatchOperationsDrawer:not([data-operations-tab="events"]) .mvp-ow-event-tools,
body.ar-overwatch-live-ops #overwatchOperationsDrawer:not([data-operations-tab="ask-ai"]) .mvp-ow-live-ask-ai,
body.ar-overwatch-live-ops #overwatchOperationsDrawer:not([data-operations-tab="map"]) .ar-overwatch-operational-map,
body.ar-overwatch-live-ops #overwatchOperationsDrawer:not([data-operations-tab="input"]) #overwatchToolsPanel {
  display: none !important;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-panel,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-log,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai {
  height: calc(100% - 10px);
  max-height: none;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai {
  display: block;
  padding: 14px 2px 2px;
  border-top: 1px solid var(--ow-command-line);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--ow-command-line-strong) transparent;
}

.mvp-ow-live-ask-ai[aria-hidden="true"],
.mvp-ow-event-tools[aria-hidden="true"],
#overwatchToolsPanel[aria-hidden="true"] {
  display: none !important;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai .mvp-ow-tool-title {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 6px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: var(--ow-command-text);
  font-size: 0.9rem;
  white-space: normal;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .live-ask-ai-intro {
  margin: 0 0 12px;
  color: #8fa3b8;
  line-height: 1.45;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-panel {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--ow-command-line-strong) transparent;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-panel > .ow-card-collapse-header {
  position: sticky;
  z-index: 2;
  top: 0;
  padding-bottom: 8px;
  background: var(--ow-command-panel);
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
  overflow: visible;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tool-block + .mvp-ow-tool-block {
  padding-top: 10px;
  padding-left: 0;
  border-top: 1px solid var(--ow-command-line);
  border-left: 0;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tool-block {
  width: 100%;
  min-width: 0;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-panel .ow-card-collapse-toggle {
  display: none;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapsible-body {
  display: flex;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-quick-events .button-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ar-overwatch-command-shell .mvp-event-logging-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 8px 0 10px;
  padding: 7px 9px;
  border: 1px solid rgba(102, 226, 160, 0.44);
  border-radius: 7px;
  background: rgba(102, 226, 160, 0.1);
  color: var(--ow-command-green);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

body.ar-overwatch-command-shell .mvp-event-logging-status::before {
  content: "✓";
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 50%;
  background: rgba(102, 226, 160, 0.18);
}

body.ar-overwatch-command-shell .mvp-event-logging-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.ar-overwatch-command-shell .mvp-event-logging-status[hidden] {
  display: none !important;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-quick-events button {
  min-width: 0;
  min-height: 38px;
  overflow-wrap: normal;
  white-space: normal;
  word-break: normal;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-timeline-list {
  max-height: calc(100% - 42px);
  overflow: auto;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-timeline-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-timeline-filters button {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 0.67rem;
  line-height: 1.2;
  white-space: normal;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-timeline-filter-status {
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.68rem;
  line-height: 1.35;
}

body.ar-overwatch-review-ops .mvp-ow-operations-toggle,
body.ar-overwatch-review-ops .mvp-ow-operations-scrim,
body.ar-overwatch-review-ops .mvp-ow-operations-drawer-head,
body.ar-overwatch-review-ops .mvp-ow-operations-tabs {
  display: none !important;
}

body.ar-overwatch-review-ops .mvp-ow-operations-drawer {
  display: contents;
}

body.ar-overwatch-review-ops #overwatchOperationsDrawer > .mvp-ow-event-log {
  grid-area: ow-below;
  width: 100%;
  min-width: 0;
}

body.ar-overwatch-review-ops #overwatchOperationsDrawer > .mvp-ow-event-tools,
body.ar-overwatch-review-ops #overwatchOperationsDrawer > .mvp-ow-live-ask-ai,
body.ar-overwatch-review-ops #overwatchOperationsDrawer > .ar-overwatch-operational-map {
  display: none !important;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel {
  grid-area: ow-tools;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  overflow: visible;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel .mvp-event-logging-status {
  position: absolute;
  z-index: 8;
  bottom: calc(100% + 7px);
  left: 10px;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel > .ow-card-collapse-header {
  gap: 7px;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel > .ow-card-collapse-header h2 {
  font-size: 0.78rem;
  white-space: nowrap;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel .ow-card-collapse-toggle {
  min-width: 30px;
  min-height: 30px;
  padding: 5px;
}

body.ar-overwatch-live-ops .mvp-ow-tools-body {
  display: grid;
  grid-template-columns: minmax(540px, 1.7fr) minmax(330px, 0.9fr);
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

body.ar-overwatch-live-ops .mvp-ow-tool-block + .mvp-ow-tool-block {
  padding-top: 0;
  padding-left: 8px;
  border-top: 0;
  border-left: 1px solid var(--ow-command-line);
}

body.ar-overwatch-live-ops .mvp-ow-tool-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body.ar-overwatch-live-ops .mvp-ow-quick-events .button-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

body.ar-overwatch-live-ops .mvp-ow-quick-events button,
body.ar-overwatch-live-ops .mvp-ow-manual-event button {
  min-height: 32px;
  padding: 6px 7px;
  border-radius: 7px;
  font-size: 0.68rem;
}

body.ar-overwatch-live-ops .mvp-ow-manual-event button {
  min-width: 64px;
  white-space: nowrap;
}

body.ar-overwatch-live-ops .mvp-ow-manual-event textarea {
  min-height: 32px;
  height: 32px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 0.74rem;
  resize: none;
}

body.ar-overwatch-live-ops .mvp-ow-manual-event .form-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: center;
  gap: 6px;
}

body.ar-overwatch-live-ops .mvp-ow-manual-event label,
body.ar-overwatch-live-ops .mvp-ow-manual-event .event-dictation-status,
body.ar-overwatch-live-ops #latestScreenshotMeta {
  display: none;
}

body.ar-overwatch-live-ops .mvp-ow-manual-event .manual-event-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.live-ask-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.live-ask-ai-actions {
  flex-wrap: nowrap;
}

.live-ask-ai-actions > button {
  flex: 1 1 0;
}

.live-ask-ai-form input,
.live-ask-ai-form button {
  min-height: 36px;
}

.live-ask-ai-answer {
  margin: 7px 0 0;
  line-height: 1.35;
}

.live-ask-ai-answer[data-tone="checking"] {
  color: #a8c7e8;
}

.live-ask-ai-answer[data-tone="success"] {
  color: #8de0b4;
}

.live-ask-ai-answer[data-tone="review"] {
  color: #f2c35d;
}

.live-ask-ai-answer[data-tone="error"] {
  color: #ffb0b0;
}

body.ar-overwatch-live-ops .mvp-ow-live-ask-ai .live-ask-ai-form input,
body.ar-overwatch-live-ops .mvp-ow-live-ask-ai .live-ask-ai-form button {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.72rem;
}

body.ar-overwatch-live-ops .mvp-ow-live-ask-ai .live-ask-ai-answer {
  display: -webkit-box;
  min-height: 1.85em;
  margin: 4px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #9fb2c7;
  font-size: 0.66rem;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai .live-ask-ai-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai .live-ask-ai-form input,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai .live-ask-ai-form button {
  min-height: 40px;
  font-size: 0.76rem;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-live-ask-ai .live-ask-ai-answer {
  display: block;
  min-height: 0;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--ow-command-line);
  border-radius: 8px;
  background: rgba(1, 4, 9, 0.38);
  overflow: visible;
  -webkit-line-clamp: unset;
  color: #9fb2c7;
  font-size: 0.74rem;
  line-height: 1.5;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-tools .mvp-ow-tool-title {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 8px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: var(--ow-command-text);
  font-size: 0.78rem;
  white-space: normal;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-tools .mvp-ow-manual-event .form-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-tools .mvp-ow-manual-event textarea {
  min-height: 76px;
  height: auto;
  resize: vertical;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-tools .event-dictation-status,
body.ar-overwatch-live-ops #overwatchOperationsDrawer .mvp-ow-event-tools #latestScreenshotMeta {
  display: block;
}

.live-ask-ai-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.live-ask-ai-history-head h4 {
  margin: 0;
  font-size: 0.78rem;
}

.live-ask-ai-history {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.live-ask-ai-history-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--ow-command-line);
  border-radius: 8px;
  background: rgba(1, 4, 9, 0.3);
}

.live-ask-ai-history-card:not(:has(.live-ask-ai-history-frame)) {
  grid-template-columns: minmax(0, 1fr);
}

.live-ask-ai-history-frame {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(143, 179, 214, 0.24);
  border-radius: 6px;
  background: #02060b;
}

.live-ask-ai-history-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.live-ask-ai-history-frame:hover,
.live-ask-ai-history-frame:focus-visible {
  border-color: #65b7ff;
  box-shadow: 0 0 0 2px rgba(40, 151, 255, 0.2);
}

.live-ask-ai-history-copy {
  min-width: 0;
}

.live-ask-ai-history-card p {
  margin: 0;
}

.live-ask-ai-history-question {
  color: var(--ow-command-text);
  font-size: 0.72rem;
  font-weight: 750;
}

.live-ask-ai-history-answer,
.live-ask-ai-history-meta {
  margin-top: 5px !important;
  color: #9fb2c7;
  font-size: 0.68rem;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .live-ask-ai-history-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

body.ar-overwatch-live-ops #overwatchToolsPanel[hidden] {
  display: none !important;
}

body.ar-overwatch-live-ops #overwatchToolsPanel .mvp-ow-tools-body,
body.ar-overwatch-live-ops #overwatchToolsBody:has(#laptopHdmiCapturePanel:not([hidden])) {
  grid-template-columns: minmax(0, 1fr);
}

body.ar-overwatch-live-ops .mvp-ow-live-ask-ai .live-ask-ai-answer[data-tone="success"] {
  color: var(--ow-command-green);
}

body.ar-overwatch-live-ops .mvp-ow-live-ask-ai .live-ask-ai-answer[data-tone="review"] {
  color: var(--ow-command-amber);
}

body.ar-overwatch-live-ops .mvp-ow-live-ask-ai .live-ask-ai-answer[data-tone="error"] {
  color: #ffb0b0;
}

body.ar-overwatch-live-ops #overwatchToolsBody:has(#laptopHdmiCapturePanel:not([hidden])) {
  grid-template-columns: minmax(0, 1fr);
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer #laptopHdmiCapturePanel:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 0;
  border-top: 0;
  border-left: 0;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer #laptopHdmiCapturePanel .laptop-hdmi-preview-wrap {
  height: auto;
  margin-top: 0;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer #laptopHdmiCapturePanel .laptop-hdmi-capture-controls {
  gap: 8px;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer #laptopHdmiCapturePanel .bridge-status {
  display: block;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed {
  grid-template-columns: minmax(0, 1fr);
  padding: 6px 10px;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapse-header {
  justify-content: space-between;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapse-header h2 {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

body.ar-overwatch-live-ops .mvp-ow-tools-panel.mvp-ow-tools-panel-collapsed .ow-card-collapse-toggle {
  width: auto;
  min-height: 30px;
  padding: 5px;
}

body.ar-overwatch-live-ops .mvp-ow-event-log {
  grid-area: ow-timeline;
  align-self: stretch;
  max-height: calc(100dvh - 330px);
  min-height: 300px;
  padding: 11px;
  overflow: auto;
  scrollbar-color: var(--ow-command-line-strong) transparent;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer > .mvp-ow-event-log {
  padding: 0;
  border: 0;
  border-top: 1px solid var(--ow-command-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.ar-overwatch-live-ops #overwatchOperationsDrawer > .mvp-ow-event-log > .mvp-event-log-head {
  display: none;
}

body.ar-overwatch-live-ops .mvp-ow-event-log .mvp-event-log-head {
  position: sticky;
  top: -11px;
  z-index: 3;
  margin: -11px -11px 2px;
  padding: 11px;
  border-bottom: 1px solid var(--ow-command-line);
  background: rgba(13, 17, 23, 0.96);
  backdrop-filter: blur(10px);
}

body.ar-overwatch-live-ops .mvp-ow-event-log .mvp-event-log-head h2 {
  font-size: 0.92rem;
}

body.ar-overwatch-live-ops .mvp-ow-event-log #timelineReviewDoneButton,
body.ar-overwatch-live-ops .mvp-ow-event-log #timelineReviewDoneStatus {
  display: none !important;
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list {
  padding-top: 10px;
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list li.mvp-timeline-item {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list li.mvp-timeline-item + li.mvp-timeline-item {
  margin-top: 10px;
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list .mvp-timeline-content {
  padding: 8px;
  border-radius: 7px;
  box-shadow: none;
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list .mvp-timeline-icon {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  box-shadow: 0 0 0 4px var(--ow-command-panel), 0 0 0 6px var(--timeline-accent-soft);
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list li strong {
  font-size: 0.64rem;
}

body.ar-overwatch-live-ops #eventList.mvp-timeline-list li .mvp-event-log-item-text > span {
  font-size: 0.76rem;
  line-height: 1.35;
}

body.ar-overwatch-live-ops #eventList .event-meta,
body.ar-overwatch-live-ops #eventList .event-openai-analysis {
  font-size: 0.68rem;
}

body.ar-overwatch-live-ops #eventList .mvp-event-actions button,
body.ar-overwatch-live-ops #eventList .mvp-automatic-alert-review button {
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 0.64rem;
}

body.ar-overwatch-live-ops #eventList .event-screenshot {
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  object-fit: contain;
}

body.ar-overwatch-live-ops .mvp-ow-footage-report-stack {
  display: none !important;
}

body.ar-overwatch-review-ops #appSection.past-mission-review {
  gap: 0;
}

body.ar-overwatch-review-ops .mission-lifecycle-section {
  margin: 0 0 10px;
  padding: 12px;
}

body.ar-overwatch-review-ops .mission-lifecycle-head {
  margin-bottom: 10px;
}

body.ar-overwatch-review-ops .mission-lifecycle-steps {
  gap: 6px;
}

body.ar-overwatch-review-ops .mission-lifecycle-step {
  min-height: 48px;
  padding: 7px 8px;
}

body.ar-overwatch-review-ops .closed-mission-tabs {
  margin: 0 0 10px;
  border-color: var(--ow-command-line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
}

body.ar-overwatch-review-ops .closed-mission-tab {
  min-height: 38px;
  font-size: 0.76rem;
}

body.ar-overwatch-review-ops .closed-mission-tab.is-active,
body.ar-overwatch-review-ops .closed-mission-tab[aria-selected="true"] {
  border-color: rgba(99, 173, 255, 0.56);
  background: rgba(99, 173, 255, 0.14);
  box-shadow: inset 0 -2px 0 var(--ow-command-blue);
}

body.ar-overwatch-review-ops #appSection.past-mission-review #mvpOverwatchGrid,
body.ar-overwatch-review-ops #appSection.past-mission-review #mvpOverwatchGrid.mvp-relay-live {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "ow-below";
  margin-top: 0;
}

body.ar-overwatch-review-ops #appSection.past-mission-review .mvp-ow-center-below {
  grid-area: ow-below;
  width: 100%;
}

body.ar-overwatch-review-ops #appSection.past-mission-review .mvp-ow-event-log,
body.ar-overwatch-review-ops #appSection.past-mission-review .mvp-ow-footage,
body.ar-overwatch-review-ops #appSection.past-mission-review .mvp-ow-ai-review,
body.ar-overwatch-review-ops #appSection.past-mission-review .mvp-ow-report {
  border-color: var(--ow-command-line);
}

/* Match the Command Center report treatment: neutral records with semantic color only. */
body.ar-overwatch-command-shell .report {
  border-color: var(--ow-command-line);
  background:
    radial-gradient(circle at 8% 0%, rgba(240, 246, 252, 0.035), transparent 30%),
    #0d1117;
}

body.ar-overwatch-command-shell .report .aar-report-eyebrow,
body.ar-overwatch-command-shell .report .footage-qr-kicker,
body.ar-overwatch-command-shell .report .footage-qr-link-label {
  color: var(--ow-command-blue);
}

body.ar-overwatch-command-shell .report .aar-report-overview {
  border-color: var(--ow-command-line);
  background: var(--ow-command-line);
}

body.ar-overwatch-command-shell .report .aar-report-overview-item,
body.ar-overwatch-command-shell .report .aar-narrative-card,
body.ar-overwatch-command-shell .report .aar-photo-card {
  background: var(--ow-command-panel);
}

body.ar-overwatch-command-shell .report .aar-report-overview dt,
body.ar-overwatch-command-shell .report .aar-report-section-count,
body.ar-overwatch-command-shell .report .aar-custody-table th,
body.ar-overwatch-command-shell .report .aar-photo-notes-label {
  color: var(--ow-command-muted);
}

body.ar-overwatch-command-shell .report .aar-report-status {
  border-color: var(--ow-command-line-strong);
  background: rgba(139, 148, 158, 0.1);
  color: #b1bac4;
}

body.ar-overwatch-command-shell .report .aar-report-status[data-status="closed"],
body.ar-overwatch-command-shell .report .aar-report-status[data-status="approved"] {
  border-color: rgba(63, 185, 80, 0.42);
  background: rgba(63, 185, 80, 0.12);
  color: #7ee787;
}

body.ar-overwatch-command-shell .report .aar-report-section,
body.ar-overwatch-command-shell .report .aar-review-history {
  border-color: var(--ow-command-line);
  background: #010409;
}

body.ar-overwatch-command-shell .report .aar-narrative-card,
body.ar-overwatch-command-shell .report .aar-custody-table-wrap,
body.ar-overwatch-command-shell .report .aar-event-card,
body.ar-overwatch-command-shell .report .aar-event-media,
body.ar-overwatch-command-shell .report .aar-photo-card,
body.ar-overwatch-command-shell .report .aar-photo-media {
  border-color: var(--ow-command-line);
}

body.ar-overwatch-command-shell .report .aar-narrative-card--attention {
  border-color: rgba(210, 153, 34, 0.42);
  background: rgba(210, 153, 34, 0.08);
}

body.ar-overwatch-command-shell .report .aar-narrative-card h5,
body.ar-overwatch-command-shell .report .aar-custody-hash,
body.ar-overwatch-command-shell .report .aar-event-time {
  color: #c9d1d9;
}

body.ar-overwatch-command-shell .report .aar-custody-table th {
  background: var(--ow-command-panel-strong);
}

body.ar-overwatch-command-shell .report .aar-event-card {
  background: linear-gradient(145deg, #161b22, #0d1117);
}

body.ar-overwatch-command-shell .report .aar-event-card::before {
  background: #8b949e;
}

body.ar-overwatch-command-shell .report .aar-event-offset,
body.ar-overwatch-command-shell .report .aar-photo-category {
  border-color: var(--ow-command-line-strong);
  background: rgba(139, 148, 158, 0.1);
  color: #b1bac4;
}

body.ar-overwatch-command-shell .report .aar-event-media,
body.ar-overwatch-command-shell .report .aar-event-media .event-screenshot,
body.ar-overwatch-command-shell .report .aar-photo-media,
body.ar-overwatch-command-shell .report .aar-photo-media .event-screenshot {
  background: #010409;
}

body.ar-overwatch-command-shell .report .aar-photo-notes,
body.ar-overwatch-command-shell .report .aar-approval-note,
body.ar-overwatch-command-shell .aar-presubmit-officer-review,
body.ar-overwatch-command-shell .aar-review-submitter-block,
body.ar-overwatch-command-shell .aar-review-submitter-note,
body.ar-overwatch-command-shell .aar-review-history-item {
  border-color: var(--ow-command-line);
  background: rgba(22, 27, 34, 0.72);
}

body.ar-overwatch-command-shell .aar-modal-header,
body.ar-overwatch-command-shell .aar-modal-footer {
  border-color: var(--ow-command-line);
}

body.ar-overwatch-command-shell .aar-edit-textarea,
body.ar-overwatch-command-shell .aar-edit-select {
  border-color: var(--ow-command-line-strong);
  background: #0d1117;
}

@media (min-width: 1281px) and (max-width: 1600px) {
  body.ar-github-ui.ar-overwatch-command-shell
    .ar-sidebar-provider[data-sidebar-state="expanded"]
    .mvp-command-bar,
  body.ar-github-ui.ar-overwatch-review-ops
    .ar-sidebar-provider[data-sidebar-state="expanded"]
    #appSection.past-mission-review
    #persistentHeader.mvp-command-bar {
    grid-template-columns: minmax(280px, 1fr) minmax(340px, auto);
  }

  body.ar-overwatch-command-shell
    .ar-sidebar-provider[data-sidebar-state="expanded"]
    .mvp-command-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 1280px) {
  body.ar-overwatch-live-ops #mvpOverwatchGrid,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "ow-session"
      "ow-bridge"
      "ow-feed";
  }

  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(320px, min(var(--mvp-ow-operations-width, 370px), calc(100% - 330px)));
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "ow-feed ow-operations";
  }

  body.ar-overwatch-live-ops .mvp-ow-event-log {
    max-height: 560px;
  }

  body.ar-overwatch-live-ops .mvp-ow-tools-body {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  }

  body.ar-overwatch-live-ops .mvp-ow-quick-events .button-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.ar-overwatch-live-ops #overwatchToolsBody:has(#laptopHdmiCapturePanel:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.ar-overwatch-live-ops #laptopHdmiCapturePanel:not([hidden]) {
    grid-column: 1 / -1;
    padding: 8px 0 0;
    border-top: 1px solid var(--ow-command-line);
    border-left: 0;
  }

  body.ar-github-ui.ar-overwatch-command-shell .mvp-command-bar,
  body.ar-github-ui.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar {
    grid-template-columns: minmax(260px, 1fr) minmax(340px, auto);
  }

  body.ar-overwatch-command-shell .mvp-command-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (min-width: 861px) and (max-width: 1280px) {
  body.ar-github-ui.ar-overwatch-command-shell.ar-overwatch-live-ops .mvp-command-bar {
    grid-template-columns: minmax(260px, 1fr) auto;
  }

  body.ar-overwatch-live-ops .mvp-command-actions {
    grid-column: auto;
    justify-content: flex-end;
  }
}

/*
 * Short laptop viewports need a page-level escape hatch. The default live shell is
 * intentionally viewport-locked, but below this height the command bar can consume
 * enough room to make the feed and mission-sidebar controls unreachable. Keep a
 * useful operations canvas and let the document scroll to it instead of clipping it.
 */
@media (min-width: 861px) and (max-height: 720px) {
  body.ar-overwatch-live-ops {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.ar-overwatch-live-ops .ar-sidebar-provider,
  body.ar-overwatch-live-ops .ar-sidebar-inset {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body.ar-overwatch-live-ops #mvpOverwatchMain,
  body.ar-overwatch-live-ops #mvpOverwatchMain.mvp-overwatch-layout-live,
  body.ar-overwatch-live-ops #appSection {
    height: auto;
    overflow: visible;
  }

  body.ar-overwatch-live-ops #mvpOverwatchGrid {
    flex: 0 0 auto;
    height: max(540px, calc(100dvh - 160px));
  }
}

@media (max-width: 860px) {
  body.ar-overwatch-live-ops .mvp-ow-operations-resize-handle {
    display: none;
  }

  body.ar-overwatch-live-ops {
    overflow-y: auto;
  }

  body.ar-overwatch-live-ops .ar-sidebar-provider,
  body.ar-overwatch-live-ops .ar-sidebar-inset {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body.ar-overwatch-command-shell .ar-sidebar-inset {
    padding-top: 54px;
  }

  body.ar-overwatch-command-shell .ar-app-header {
    min-height: 54px;
  }

  body.ar-overwatch-command-shell #mvpOverwatchMain,
  body.ar-overwatch-command-shell #mvpOverwatchMain.mvp-overwatch-layout-live,
  body.ar-overwatch-command-shell #mvpOverwatchMain:has(#appSection.past-mission-review) {
    width: calc(100% - 16px);
    margin: 8px;
  }

  body.ar-overwatch-live-ops #mvpOverwatchMain,
  body.ar-overwatch-live-ops #mvpOverwatchMain.mvp-overwatch-layout-live {
    height: auto;
    min-height: calc(100dvh - 62px);
    margin: 0 8px 8px;
    overflow: visible;
  }

  body.ar-overwatch-live-ops #appSection {
    height: auto;
  }

  body.ar-overwatch-live-ops #mvpOverwatchGrid {
    flex: none;
    min-height: 0;
  }

  body.ar-github-ui.ar-overwatch-command-shell .mvp-command-bar,
  body.ar-github-ui.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar {
    top: 54px;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body.ar-overwatch-command-shell .mvp-command-status-strip {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  body.ar-overwatch-command-shell .mvp-command-status-chip {
    flex: 0 0 auto;
  }

  body.ar-overwatch-live-ops #mvpOverwatchGrid,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
  body.ar-overwatch-live-ops #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "ow-session"
      "ow-bridge"
      "ow-feed";
  }

  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(260px, auto) minmax(180px, auto);
    grid-template-areas:
      "ow-feed"
      "ow-operations";
  }

  body.ar-overwatch-live-ops .mvp-ow-scenario,
  body.ar-overwatch-live-ops .mvp-ow-event-log {
    max-height: none;
  }

  body.ar-overwatch-live-ops .mvp-ow-tools-body {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr);
  }

  body.ar-overwatch-live-ops .mvp-ow-feed > #liveAiWatchConfigGrid {
    inset: 7px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-config-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 5px;
  }

  body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-config-tab {
    min-height: 32px;
    padding: 5px 7px;
    border-color: transparent;
    background: var(--ow-command-panel);
    color: var(--ow-command-muted);
    font-size: 0.68rem;
  }

  body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-config-tab.is-active {
    border-color: rgba(99, 173, 255, 0.46);
    background: rgba(99, 173, 255, 0.14);
    color: #e4f1ff;
  }

  body.ar-overwatch-live-ops #liveAiWatchConfigGrid .live-ai-config-close {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.68rem;
  }

  body.ar-overwatch-live-ops #liveAiWatchConfigGrid[data-ai-config-tab="standard"] #liveAiMissionFocusPanel,
  body.ar-overwatch-live-ops #liveAiWatchConfigGrid[data-ai-config-tab="targets"] > .live-ai-watch-column:not(#liveAiMissionFocusPanel) {
    display: none !important;
  }

  body.ar-overwatch-live-ops .mvp-ow-tool-block + .mvp-ow-tool-block {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--ow-command-line);
    border-left: 0;
  }

  body.ar-overwatch-review-ops .mission-lifecycle-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 561px) and (max-width: 860px) {
  body.ar-github-ui.ar-overwatch-command-shell.ar-overwatch-live-ops .mvp-command-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  body.ar-overwatch-live-ops .mvp-command-identity {
    grid-column: 1 / -1;
  }

  body.ar-overwatch-live-ops .mvp-command-status-strip {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  body.ar-overwatch-live-ops .mvp-command-actions {
    grid-column: 2;
    width: auto;
    justify-content: flex-end;
  }
}

/*
 * Print must be the final cascade layer. Mission Overwatch's command-shell theme is
 * intentionally declared late in this file and otherwise wins over the earlier print
 * rules, which can put dark screen surfaces behind print-dark text.
 */
@media print {
  @page {
    background: #fff;
    margin: 0;
  }

  html,
  body {
    background: #fff !important;
    color: #17212b !important;
  }

  body {
    min-height: 100vh;
  }

  body.ar-overwatch-command-shell #afterActionReportModalOverlay,
  body.ar-overwatch-command-shell #afterActionReportModalOverlay .aar-modal-panel {
    background: #fff !important;
  }

  body.ar-overwatch-command-shell::before {
    display: none !important;
  }

  body .report {
    --text: #17212b;
    --muted: #5c6873;
    --edge: #c7d0d8;
    --accent: #1f6fb2;
    background: #fff !important;
    color: #17212b !important;
  }

  body .report .aar-report-overview,
  body .report .aar-report-overview-item,
  body .report .aar-report-section,
  body .report .aar-narrative-card,
  body .report .aar-custody-table-wrap,
  body .report .aar-event-card,
  body .report .aar-event-media,
  body .report .event-openai-analysis,
  body .report .aar-photo-card,
  body .report .aar-photo-media,
  body .report .aar-photo-notes,
  body .report .footage-qr-block,
  body .report .aar-footage-list > li {
    border-color: #c7d0d8 !important;
    background: #fff !important;
    color: #17212b !important;
    box-shadow: none !important;
  }

  body .report .aar-report-section-heading {
    border-bottom-color: #173b5f !important;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  body .report .aar-report-section-heading h4,
  body .report .aar-report-overview dd,
  body .report .aar-narrative-card h5,
  body .report .aar-event-time,
  body .report .aar-event-note,
  body .report .event-openai-analysis-heading strong,
  body .report .event-openai-analysis-detail p,
  body .report .aar-photo-card-header strong {
    color: #17212b !important;
  }

  body .report .aar-report-eyebrow,
  body .report .aar-report-overview dt,
  body .report .aar-report-section-count,
  body .report .event-openai-analysis-label,
  body .report .aar-photo-notes-label,
  body .report .aar-photo-meta {
    color: #52616f !important;
  }

  body .report .aar-custody-table th {
    background: #e9eef2 !important;
    color: #334453 !important;
    white-space: nowrap;
  }

  body .report .aar-custody-table {
    min-width: 0 !important;
  }

  body .report .aar-custody-table th:nth-child(1),
  body .report .aar-custody-table td:nth-child(1) { width: 11%; }
  body .report .aar-custody-table th:nth-child(2),
  body .report .aar-custody-table td:nth-child(2) { width: 22%; }
  body .report .aar-custody-table th:nth-child(3),
  body .report .aar-custody-table td:nth-child(3) { width: 40%; }
  body .report .aar-custody-table th:nth-child(4),
  body .report .aar-custody-table td:nth-child(4) { width: 15%; }
  body .report .aar-custody-table th:nth-child(5),
  body .report .aar-custody-table td:nth-child(5) { width: 12%; }

  body .report .aar-custody-table td,
  body .report .aar-custody-hash {
    color: #263441 !important;
  }

  body .report .aar-report-status,
  body .report .aar-event-offset,
  body .report .aar-photo-category,
  body .report .aar-report-section-count {
    border-color: #8c99a5 !important;
    background: #f3f6f8 !important;
    color: #263441 !important;
  }

  body .report .aar-report-status[data-status="closed"],
  body .report .aar-report-status[data-status="approved"],
  body .report .aar-custody-status[data-tone="positive"] {
    border-color: #6f9f7b !important;
    background: #edf7ef !important;
    color: #245c31 !important;
  }

  body .report .aar-custody-status[data-tone="warning"] {
    border-color: #b28a39 !important;
    background: #fff8e7 !important;
    color: #6d4b05 !important;
  }

  body .report .aar-custody-status[data-tone="negative"] {
    border-color: #bd7772 !important;
    background: #fff0ef !important;
    color: #7a201b !important;
  }

  body .report .aar-event-card {
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
  }

  body .report .aar-event-card::before {
    background: #173b5f !important;
    color: #fff !important;
  }

  body .report .aar-event-content {
    display: grid !important;
    grid-template-columns: minmax(2.15in, 37%) minmax(0, 1fr) !important;
    align-items: start;
    gap: 0.12in;
  }

  body .report .aar-event-media,
  body .report .aar-event-content > .event-openai-analysis {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
  }

  body .report .aar-event-content > .aar-event-media:only-child {
    grid-column: 1 / -1;
    width: min(4.8in, 100%) !important;
  }

  body .report .aar-event-media .event-screenshot {
    width: 100% !important;
    height: auto !important;
    max-height: 2.55in !important;
    object-fit: contain;
  }

  body .report .aar-report-photos:has(.aar-report-empty) {
    display: none !important;
  }
}

@media (max-width: 560px) {
  body.ar-overwatch-command-shell .ar-app-header .ar-overwatch-command-center-link {
    min-height: 32px;
    padding-inline: 8px;
    font-size: 0.65rem;
  }

  body.ar-github-ui.ar-overwatch-command-shell .mvp-command-bar,
  body.ar-github-ui.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar {
    position: static;
    top: auto;
    padding: 10px;
  }

  body.ar-overwatch-command-shell .mvp-command-mission-row {
    flex-wrap: wrap;
  }

  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-tools-collapsed,
  body.ar-overwatch-live-ops.ar-overwatch-operations-open #mvpOverwatchGrid.mvp-relay-live.mvp-scenario-collapsed.mvp-tools-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(260px, 1.2fr) minmax(220px, 0.8fr);
    grid-template-areas:
      "ow-feed"
      "ow-operations";
  }

  body.ar-overwatch-live-ops .mvp-ow-tools-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body.ar-overwatch-live-ops .mvp-ow-tools-panel > .ow-card-collapse-header {
    justify-content: space-between;
  }

  body.ar-overwatch-live-ops .mvp-ow-tools-body,
  body.ar-overwatch-live-ops #overwatchToolsBody:has(#laptopHdmiCapturePanel:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.ar-overwatch-live-ops .mvp-ow-tool-block + .mvp-ow-tool-block,
  body.ar-overwatch-live-ops #laptopHdmiCapturePanel:not([hidden]) {
    grid-column: auto;
    padding: 8px 0 0;
    border-top: 1px solid var(--ow-command-line);
    border-left: 0;
  }

  body.ar-overwatch-command-shell .mvp-command-mission-name {
    width: 100%;
    white-space: normal;
  }

  body.ar-overwatch-command-shell .mvp-command-status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  body.ar-overwatch-command-shell .mvp-command-status-chip,
  body.ar-overwatch-command-shell .mvp-command-status-strip .mvp-cloud-sync {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  body.ar-overwatch-command-shell .mvp-command-status-strip .live-ai-watch-panel--command {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.ar-overwatch-command-shell .live-ai-watch-panel--command .live-ai-watch-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.ar-overwatch-command-shell .live-ai-watch-panel--command .live-ai-watch-panel-actions {
    width: 100%;
  }

  body.ar-overwatch-command-shell .live-ai-watch-panel--command .live-ai-watch-toggle {
    flex: 1 1 auto;
  }

  body.ar-overwatch-command-shell .mvp-command-actions,
  body.ar-overwatch-command-shell .mvp-command-actions > p {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  body.ar-overwatch-command-shell .mvp-command-actions button {
    width: 100%;
  }

  body.ar-overwatch-live-ops .mvp-ow-session #missionSessionActivePanel:not([hidden]) {
    align-items: stretch;
    flex-direction: column;
  }

  body.ar-overwatch-live-ops .mvp-ow-quick-events .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ar-overwatch-review-ops .mission-lifecycle-steps,
  body.ar-overwatch-review-ops .closed-mission-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep closed-mission playback/export actions directly beneath the status metadata. */
@media (min-width: 861px) {
  body.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar .mvp-command-identity {
    grid-row: 1 / span 2;
    align-self: start;
  }

  body.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar .mvp-command-status-strip {
    grid-column: 2 / -1;
    grid-row: 1;
    justify-self: end;
  }

  body.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar .mvp-command-actions {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: end;
    justify-content: flex-end;
  }
}

@media (min-width: 561px) and (max-width: 860px) {
  body.ar-overwatch-review-ops #appSection.past-mission-review #persistentHeader.mvp-command-bar .mvp-command-actions {
    grid-column: 1;
    justify-self: end;
    justify-content: flex-end;
  }
}
.mvp-merged-source {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted, #8b949e);
  font-size: 0.78rem;
  font-weight: 600;
}

.mvp-merged-source::before {
  content: "Source: ";
  font-weight: 500;
}

.aar-event-source {
  margin: 0.25rem 0 0;
  color: var(--muted, #8b949e);
  font-size: 0.82rem;
}

.aar-source-mission-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.25rem;
}

.aar-source-mission-list li span {
  display: block;
  color: var(--muted, #8b949e);
  font-size: 0.86rem;
}

/* Keep DFR connection recovery visible without covering the video stage. */
.dfr-video-link-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--ow-command-line-strong);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.96);
}
.dfr-video-link-panel[hidden] { display: none; }
.dfr-video-link-panel p { margin: 0; flex: 1; }
body.ar-overwatch-live-ops .mvp-ow-feed > .dfr-video-link-panel {
  position: absolute;
  z-index: 13;
  top: 40px;
  left: 12px;
  right: 12px;
}
@media (max-width: 600px) {
  .dfr-video-link-panel { flex-wrap: wrap; }
}

/* Author label layouts must not override hidden fields in mission creation. */
.web-hdmi-mission-create-form [hidden] {
  display: none !important;
}
