.flight-map {
  --fm-mint: #b8f0d9;
  --fm-ink: #ecf8f4;
  --fm-quiet: #b6d2ce;
  --fm-line: #48736f;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #385454;
  border-radius: 18px;
  color: var(--fm-ink);
  background: #0c2329;
  box-shadow: 0 16px 46px #07141926;
  font: 14px/1.4 "DM Sans", sans-serif;
  color-scheme: dark;
}
.flight-map [hidden] { display: none !important; }
.flight-map :is(h1, h2, h3, p) { margin: 0; }
.flight-map button { font: inherit; color: inherit; cursor: pointer; }
.flight-map :is(button, a):focus-visible { outline: 3px solid #ffe39e; outline-offset: 3px; }
.flight-map .fm-head, .flight-map .fm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 17px 22px;
  background: #112c31;
}
.flight-map .fm-brand {
  color: var(--fm-quiet);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .18em;
}
.flight-map .fm-brand span { margin: 0 5px; color: #76baaa; }
.flight-map h1 { color: var(--fm-ink); font: 550 clamp(25px,3vw,33px)/1.15 "DM Sans", sans-serif; letter-spacing: -.045em; margin-top: 4px; }
.flight-map .fm-sound, .flight-map .fm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--fm-line);
  border-radius: 8px;
  padding: 7px 12px;
  background: #193c40;
  font-size: 13px;
  font-weight: 550;
}
.flight-map .fm-sound { border-radius: 22px; font-size: 12px; }
.flight-map .fm-sound svg, .flight-map .fm-button svg { width: 16px; height: 16px; }
.flight-map .fm-stage {
  position: relative;
  padding: clamp(30px,5vw,66px) clamp(14px,3vw,32px) 38px;
  min-height: clamp(285px,43vh,410px);
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 49% 70%,#28534f 0%,#16383c 38%,#0b252f 84%);
  perspective: 700px;
}
.flight-map .fm-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -290px;
  left: -55%;
  right: -55%;
  height: 840px;
  background-image: linear-gradient(#78bfac25 1px, transparent 1px), linear-gradient(90deg,#78bfac25 1px,transparent 1px);
  background-size: 37px 37px;
  transform: rotateX(61deg) rotateZ(-12deg);
  transform-origin: 50% 69%;
  pointer-events: none;
  mask-image: linear-gradient(transparent 8%,black 76%,transparent 100%);
}
.flight-map .fm-stage::after {
  content: "";
  z-index: -1;
  position: absolute;
  width: 57%;
  height: 155px;
  left: 49%;
  top: 14px;
  border: 1px dashed #81cbb42b;
  border-radius: 50%;
  transform: translateX(-50%) rotateX(64deg) rotate(-9deg);
  box-shadow: 0 0 0 16px #82bba508,0 0 0 47px #82bba506;
  pointer-events: none;
}
.flight-map .fm-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.flight-map .fm-lines path { stroke: #9edcc59a; stroke-width: 1.2; fill: none; }
.flight-map .fm-modules {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(7px,1.7vw,18px);
  max-width: 860px;
  margin: 0 auto;
}
.flight-map .fm-station {
  --fm-glow: #a6e8d0;
  flex: 0 1 185px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 10px 4px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
}
.flight-map .fm-station[data-map-section="materials"] { --fm-glow: #b6ddf0; }
.flight-map .fm-station[data-map-section="people"] { --fm-glow: #d1e8c3; }
.flight-map .fm-station[data-map-section="influencers"] { --fm-glow: #ebdab7; }
.flight-map .fm-station:is(:hover,[aria-expanded="true"]) { background: #132f35df; border-color: #57817b; }
.flight-map .fm-station b { font-size: clamp(14px,1.7vw,18px); letter-spacing: -.025em; font-weight: 600; color: #edf7f2; }
.flight-map .fm-station small, .flight-map .fm-card small, .flight-map .fm-quiet { font-size: 12px; color: var(--fm-quiet); }
.flight-map .fm-glyph { position: relative; display: grid; place-items: center; width: 85px; height: 76px; isolation: isolate; color: var(--fm-glow); }
.flight-map .fm-glyph::before, .flight-map .fm-glyph::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 7px;
  width: 65px;
  height: 20px;
  border: 1px solid color-mix(in srgb,var(--fm-glow) 62%,transparent);
  border-radius: 50%;
  transform: rotate(-6deg);
}
.flight-map .fm-glyph::before {
  background: radial-gradient(ellipse,var(--fm-glow) -150%,#224a49 49%,#12343a 75%);
  box-shadow: 0 4px 0 #102c30,0 5px 0 #537375,0 12px 16px #0006;
}
.flight-map .fm-glyph::after { width: 48px; height: 13px; bottom: 10px; opacity: .65; }
.flight-map .fm-glyph svg { width: 43px; height: 43px; stroke-width: 1.5; margin-top: -13px; transform: rotate(-5deg); filter: drop-shadow(0 2px 1px #0b2429) drop-shadow(0 0 6px #bbf7dc38); }
.flight-map .fm-station[aria-expanded="true"] .fm-glyph svg { transform: translateY(-3px) rotate(0deg); }
.flight-map .fm-panel { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.flight-map .fm-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding-top: 36px; }
.flight-map .fm-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  min-height: 82px;
  padding: 12px 14px;
  text-align: left;
  overflow-wrap: anywhere;
  border: 1px solid #547b78;
  border-radius: 10px;
  background: #193b40;
  box-shadow: 0 3px 0 #10292e;
}
.flight-map .fm-card .fm-item-icon { width: 24px; height: 24px; stroke-width: 1.7; color: var(--fm-mint); }
.flight-map .fm-card:is(:hover,[aria-expanded="true"]) { background: #28534f; border-color: var(--fm-mint); }
.flight-map .fm-card[aria-expanded="true"] { transform: translateY(-2px); }
.flight-map .fm-card b { font-size: 14px; font-weight: 600; }
.flight-map .fm-detail, .flight-map .fm-empty {
  grid-column: 1 / -1;
  position: relative;
  max-width: 100%;
  width: min(490px,100%);
  margin: 9px auto;
  padding: 16px 18px;
  overflow-wrap: anywhere;
  background: #133138;
  border: 1px solid #577a73;
  border-radius: 12px;
  box-shadow: 0 10px 26px #07131855;
}
.flight-map .fm-detail h2 { color: var(--fm-ink); font-size: 18px; line-height: 1.22; }
.flight-map .fm-detail p { color: var(--fm-quiet); line-height: 1.5; margin-top: 6px; white-space: pre-line; }
.flight-map .fm-detail h3 { color: var(--fm-ink); font-size: 14px; margin-top: 14px; }
.flight-map .fm-participants { margin: 5px 0 0; padding: 0; list-style: none; }
.flight-map .fm-participants li { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 5px 15px; border-top: 1px solid #325356; padding: 7px 0; }
.flight-map .fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.flight-map .fm-actions:empty { display: none; }
.flight-map .fm-actions a { color: var(--fm-mint); text-decoration: underline; }
.flight-map .fm-empty { margin-top: 28px; text-align: center; color: var(--fm-quiet); }
.flight-map .fm-more { display: block; margin: 18px auto 0; }
.flight-map .fm-foot { padding: 11px 22px; border-top: 1px solid #355759; flex-wrap: wrap; }
.flight-map .fm-foot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flight-map .fm-create { border-color: var(--fm-mint); color: #15342e; background: var(--fm-mint); }
.flight-map .fm-message { color: #e6f6ec; font-size: 13px; }
.flight-map .fm-message::before { display: inline-block; vertical-align: 1px; content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #a3eace; }
.flight-map .fm-message[data-error="true"]::before { background: #ffad98; }
@media (max-width: 800px) {
  .flight-map .fm-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .flight-map .fm-modules { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .flight-map .fm-stage { padding: 16px 12px 24px; min-height: 285px; }
  .flight-map .fm-glyph { height: 65px; }
  .flight-map .fm-glyph svg { width: 37px; height: 37px; }
  .flight-map .fm-station { padding: 3px 0 8px; }
  .flight-map .fm-head, .flight-map .fm-foot { padding-inline: 14px; }
  .flight-map .fm-sound, .flight-map .fm-button { min-height: 44px; }
  .flight-map .fm-cards { gap: 9px; padding-top: 24px; }
  .flight-map .fm-card { padding: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .flight-map .fm-station, .flight-map .fm-glyph svg, .flight-map .fm-card { transition: transform .22s, background .20s, border-color .20s; }
  .flight-map .fm-card, .flight-map .fm-detail { animation: fm-arrive .24s ease-out; }
  @keyframes fm-arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
}

/* One continuous flight deck. The lower band contains account utilities only. */
.flight-workspace {
  --flight-edge: clamp(16px,4vw,68px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  color: #ecf8f4;
  background: #0b222b;
  color-scheme: dark;
}
.flight-workspace > main, .flight-workspace #main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.flight-workspace #flight-map, .flight-workspace .flight-map { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.flight-workspace .flight-map { border: none; border-radius: 0; box-shadow: none; }
.flight-workspace .fm-head {
  align-items: center;
  padding: clamp(20px,3vw,37px) var(--flight-edge);
  background: linear-gradient(110deg,#0c232a,#102c32);
  border-bottom: 1px solid #355556;
}
.flight-workspace .fm-head h1 { font-size: clamp(29px,3.7vw,50px); font-weight: 500; }
.flight-workspace .fm-stage {
  flex: 1;
  min-height: min(62vh,620px);
  padding: clamp(36px,10vh,112px) var(--flight-edge) 50px;
}
.flight-workspace .fm-stage:has(.fm-panel:not([hidden])) { padding-top: clamp(24px,4vh,53px); }
.flight-workspace .fm-modules { max-width: 1050px; gap: clamp(8px,3.5vw,55px); }
.flight-workspace .fm-panel { max-width: 1150px; }
.flight-workspace .fm-foot {
  padding: 12px var(--flight-edge);
  background: #102b31;
}
.flight-workspace .flight-utilities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 16px;
  padding: 10px var(--flight-edge) max(10px,env(safe-area-inset-bottom));
  border-top: 1px solid #315055;
  background: #0a2026;
  color: #b7d0cc;
  font-size: 13px;
}
.flight-utilities .flight-account-name { margin-right: auto; color: #dcefe7; font-weight: 600; overflow-wrap: anywhere; }
.flight-utilities .flight-utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #d6e9e1;
  font: inherit;
  text-decoration: none;
}
.flight-utilities .flight-utility:is(:hover,:focus-visible) { background: #1b3d42; border-color:#4a6d6c; }
.flight-utilities .flight-utility svg { height: 16px; width: 16px; }
.flight-utilities #sync-status { margin: 0; color: #b8d1c9; }
.flight-utilities #sync-status:not(.error)::before { background: #9ed7bc; }
.flight-utilities #sync-status.error { color: #ffc7b9; }
.flight-workspace .inline-error { color: #ffdbcd; background: #422b2a; border-color: #83544c; }
.flight-workspace .inline-error button { color: #ffe6dd; }

.flight-map .fm-panel-tools, .flight-map .fm-tools-actions, .flight-map .fm-filters, .flight-map .fm-paging {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.flight-map .fm-panel-tools {
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding: 13px 15px;
  border: 1px solid #456966;
  border-radius: 12px;
  background: #112e34;
}
.flight-map .fm-section-name { font: 550 18px/1.25 Archivo,sans-serif; }
.flight-map .fm-cards { padding-top: 20px; }
.flight-map .fm-filters {
  align-items: flex-end;
  padding: 14px;
  margin: 9px 0 0;
  border: 1px solid #476964;
  border-radius: 11px;
  background: #102d33;
}
.flight-map .fm-filters label { display: grid; gap: 4px; color: var(--fm-quiet); font-size: 12px; }
.flight-map .fm-filters :is(input[type=search],select) {
  min-height: 40px;
  max-width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #678982;
  border-radius: 7px;
  background: #0b232a;
  color: var(--fm-ink);
  font-size: 14px;
}
.flight-map .fm-filters input[type=search] { flex: 1 1 175px; }
.flight-map .fm-filters input::placeholder { color: #b0bfbf; }
.flight-map .fm-filters .fm-mine { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; font-size: 13px; }
.flight-map .fm-mine input { width: 17px; height: 17px; accent-color: var(--fm-mint); }
.flight-map .fm-paging { justify-content: center; margin: 20px 0 0; color: var(--fm-quiet); font-size: 13px; }
.flight-map .fm-paging button:disabled { opacity: .45; cursor: default; }
.flight-map input:focus-visible, .flight-map select:focus-visible,
.flight-utilities :focus-visible { outline: 3px solid #ffe39e; outline-offset: 2px; }

/* The existing task, upload, review and invitation dialogs sit over this same canvas. */
body:has(.flight-workspace) #editor {
  --ink: #edf7f3;
  --muted: #bbcfca;
  --line: #416260;
  --green: #b6ead4;
  --gold: #edd2a0;
  --wash: #18383d;
  --danger: #ffb7a6;
  --surface: #15343a;
  color-scheme: dark;
  color: var(--ink);
  background: linear-gradient(148deg,#173b40,#102c33 70%);
  border: 1px solid #6a9189;
  border-radius: 16px;
  box-shadow: 0 28px 90px #020c12aa,0 0 0 1px #76a2951f;
}
body:has(.flight-workspace) #editor::backdrop { background: #03151ccc; backdrop-filter: blur(4px); }
body:has(.flight-workspace) #editor .dialog-top,
body:has(.flight-workspace) #editor .dialog-footer { background: #112c32; border-color: var(--line); }
body:has(.flight-workspace) #editor :is(h2,h3,h4,.detail-heading,.comment-head strong) { color: var(--ink); }
body:has(.flight-workspace) #editor :is(.detail-description,.comment p,.field label,.field > span,.detail-section > label) { color: #c7dcd5; }
body:has(.flight-workspace) #editor :is(.field input,.field select,.field textarea,.control) {
  color: var(--ink);
  border-color: #63837f;
  background: #0b2329;
}
body:has(.flight-workspace) #editor input::placeholder,
body:has(.flight-workspace) #editor textarea::placeholder { color: #a6bab7; }
body:has(.flight-workspace) #editor .field input[readonly] { background: #1c373c; color: var(--muted); }
body:has(.flight-workspace) #editor :is(.attachment,.invite-url,.upload-zone,.version-list button) {
  background: #193b3f;
  color: var(--ink);
  border-color: #73958b;
}
body:has(.flight-workspace) #editor .upload-zone svg { color: #b6ead4; }
body:has(.flight-workspace) #editor .version-list button.active { background: #afdfc8; color: #102d28; }
body:has(.flight-workspace) #editor .preview { background: #091d24; border: 1px solid #375550; }
body:has(.flight-workspace) #editor .btn { color: #10322c; background: #b6ead4; border-color: #b6ead4; }
body:has(.flight-workspace) #editor .btn:hover { background: #d4f5e5; }
body:has(.flight-workspace) #editor :is(.btn.secondary,.btn.ghost,.icon-btn) {
  background: #203f44; color: #dcf1e7; border: 1px solid #526e69;
}
body:has(.flight-workspace) #editor :is(.btn.secondary,.btn.ghost,.icon-btn):hover { background: #305453; }
body:has(.flight-workspace) #editor .btn.danger { background: #593935; border-color: #9d6459; color: #ffddd0; }
body:has(.flight-workspace) #editor :is(.tag,.tag.draft) { background: #2f4448; color: #dce9e6; }
body:has(.flight-workspace) #editor :is(.tag.review,.tag.in_review,.feedback) { background: #403c2e; color: #ffe3aa; }
body:has(.flight-workspace) #editor :is(.tag.done,.tag.approved) { background: #244d42; color: #bef1d7; }
body:has(.flight-workspace) #editor :is(.tag.blocked,.tag.changes_requested,.inline-error) { background: #47312e; color: #ffc7ba; }
body:has(.flight-workspace) #editor .tag.in_progress { background: #273f4e; color: #c1e5fa; }
body:has(.flight-workspace) #editor .feedback h3 { color: #ffe7b8; }
body:has(.flight-workspace) #editor .overdue { color: #ffbfaa; }
body:has(.flight-workspace) #editor :focus-visible { outline: 3px solid #ffe39e; outline-offset: 2px; }
body:has(.flight-workspace) #editor a { color: #bef1dc; }
@media (prefers-reduced-motion: no-preference) {
  body:has(.flight-workspace) #editor[open] { animation: fm-rise .2s cubic-bezier(.2,.8,.3,1); }
  @keyframes fm-rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
}
@media (max-width:650px) {
  .flight-workspace { --flight-edge: 15px; }
  .flight-workspace .fm-stage { padding-block: 21px 27px; min-height: 335px; }
  .flight-workspace .fm-modules { gap: 6px; }
  .flight-workspace .flight-utilities { gap: 3px 6px; }
  .flight-utilities .flight-account-name { flex: 1 1 46%; }
  .flight-utilities .flight-utility { min-height: 44px; }
  .flight-map .fm-panel-tools { align-items:flex-start; flex-direction:column; margin-top: 18px; }
  .flight-map .fm-filters input[type=search] { flex-basis: 100%; font-size:16px; }
  .flight-map .fm-filters select { font-size:16px; }
  body:has(.flight-workspace) #editor { max-height: 93dvh; width: calc(100vw - 20px); }
  body:has(.flight-workspace) #editor .dialog-footer { flex-wrap: wrap; }
  body:has(.flight-workspace) #editor :is(.asset-details,.detail-status-form) { flex-wrap: wrap; }
}
