.b6-card {
  --b6-label: #b2cbd6;
  --b6-text: #e7f3f7;
  min-width: 0;
  padding: clamp(8px, 1.65cqw, 12px);
  text-align: start;
  border: 1px solid #526f7c;
  border-radius: 3px 10px 3px 3px;
  background: linear-gradient(130deg, #283c48, #16232e 80%);
  box-shadow: inset 0 1px #b7e8f522;
}
.b6-card-title {
  margin: 0 0 7px;
  color: #c6eff8;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: .025em;
}
.b6-field-label { color: #c7dde6; font-size: .77rem; font-weight: 700; }
.b6-readings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.b6-reading {
  flex: 1 1 29%;
  min-width: min(4.3rem, 100%);
  padding: 4px 6px;
  border-left: 2px solid #6f99a6;
  background: #111e2780;
}
.b6-reading dt {
  color: var(--b6-label, #b2cbd6);
  font-size: .68rem;
  line-height: 1.3;
}
.b6-reading dd {
  margin: 0;
  color: var(--b6-text, #e7f3f7);
  font: 700 .79rem/1.35 ui-monospace, "PingFang SC", monospace;
  overflow-wrap: anywhere;
}

#flow[data-flow-screen="menu"] [data-b6-menu] > .mf-title {
  display: flex;
  align-items: center;
  text-align: start;
  gap: 10px;
  margin: 0;
}
.b6-title-ornament {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 31px;
  align-self: center;
  background:
    linear-gradient(90deg, transparent 15%, #79aab6 15% 85%, transparent 85%) center / 100% 1px no-repeat,
    radial-gradient(circle, #dcfbff 0 2px, #6694a666 3px, transparent 8px),
    linear-gradient(140deg, #355766, #1a2732);
  border: 1px solid #718e9d;
  border-radius: 3px 9px;
}
.b6-title-ornament::before, .b6-title-ornament::after {
  content: "";
  position: absolute;
  inset: 5px 8px;
  border: 1px solid #96bccc;
  border-radius: 50%;
  transform: rotate(-40deg) scaleX(.55);
}
.b6-title-ornament::after { transform: rotate(40deg) scaleX(.55); }

#flow[data-flow-screen="menu"] .b6-deployment > .run-options {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 7px;
}
#flow[data-flow-screen="menu"] .b6-deployment :is(label:nth-child(3), .weapon-choice, .b6-weapon-detail) {
  grid-column: 1 / -1;
}
#flow[data-flow-screen="menu"] .b6-deployment :is(select, input) { min-height: 36px; }
[data-touch] #flow[data-flow-screen="menu"] .b6-deployment :is(select, input) { min-height: 44px; }
#flow .b6-deployment #b6-route-notes { color: #bfd0da; font-size: .74rem; }
#flow .b6-deployment label:has(select:disabled) #b6-route-notes { color: #ebccaa; }
#flow .b6-deployment .weapon-choice {
  padding-top: 7px;
  border-top: 1px solid #6b8f9e6b;
}
#flow .b6-deployment .weapon-choice .choice-icon { inset-block-end: 4px; }
.b6-weapon-detail {
  display: grid;
  gap: 4px;
  color: #c9e0e9;
  font-size: .75rem;
}
.b6-weapon-note { line-height: 1.35; }
#flow[data-flow-screen="menu"] .mf-choices .challenge-choice[data-b6-challenge] {
  position: relative;
  padding: 8px 9px;
  border: 1px solid #516b7a;
  border-radius: 3px 9px;
  background: #151f2a;
}
#flow[data-flow-screen="menu"] .mf-choices .challenge-choice[data-b6-challenge] > :is(.b6-rule-label, .mf-choice-detail) {
  grid-column: 1 / -1;
}
#flow[data-flow-screen="menu"] .mf-choices .challenge-choice[data-b6-challenge] > .b6-rule-label {
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid #789aa960;
  color: #a8d7e4;
}
#flow[data-flow-screen="menu"] .challenge-choice[data-b6-overridden] {
  border-color: #a08064;
}
#flow[data-flow-screen="menu"] .challenge-choice[data-b6-overridden] > :is(.b6-rule-label, .mf-choice-detail) {
  color: #f0cea9;
}

.b6-checkpoint {
  grid-column: 1 / -1;
  border-color: #6f9389;
  background: linear-gradient(120deg, #2c413f, #1b2b2e 72%);
}
.b6-checkpoint .b6-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
  color: #d1eadd;
}
.b6-checkpoint-deck { color: #d0e7dd; font-size: .73rem; }

#flow .b6-telemetry { border-color: #597981; }
#flow .b6-wave-plan { border-color: #8f7962; }
#flow .b6-wave-plan .b6-card-title { color: #f2d7b4; }
.b6-wave-status { color: #d1e1e7; }
.b6-wave-empty { margin-top: 5px !important; }
.b6-wave-steps {
  list-style: none;
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding: 0;
}
.b6-wave-step {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 4px 6px;
  padding: 4px 5px;
  border-left: 2px solid #738795;
  background: #101a23bf;
  color: #d3e1e8;
}
.b6-wave-step[data-state="live"] {
  border-color: #f4bd83;
  background: #4d3a30;
  color: #ffead6;
}
.b6-wave-step[data-state="done"] { border-color: #9acbbb; }
.b6-wave-number, .b6-wave-marker { font-size: .68rem; line-height: 1.3; }
.b6-wave-marker { color: #c5dadf; }

#debug-panel .b6-debug {
  text-align: start;
  max-width: 34rem;
}
#debug-panel .b6-debug #debug-title {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #bd97747d;
  color: #f1ddca;
}
#debug-panel .b6-debug :is(.b6-debug-note, .b6-debug-matches, #debug-detail) {
  margin: 0;
  font-size: .78rem;
  color: #c1d4de;
  overflow-wrap: anywhere;
}
#debug-panel .b6-debug-search { display: grid; gap: 4px; }
#debug-panel .b6-debug :is(input, select) {
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  color: #eaf5f8;
  background: #14212c;
  border: 1px solid #78939e;
  border-radius: 4px;
  font: inherit;
}
#debug-panel .b6-debug :is(input, select):focus-visible {
  outline: 2px solid #adebf5;
  outline-offset: 2px;
}
#debug-panel .b6-debug-input::placeholder { color: #b2c2cd; }
#debug-panel .b6-debug #debug-detail { padding: 5px 8px; background: #0f1a24; border-left: 2px solid #7d9faf; }
#debug-panel .b6-debug #debug-detail:empty { display: none; }
#debug-panel .b6-debug button:disabled { opacity: .55; }
#debug-panel .b6-debug .actions { justify-content: start; }
[data-touch] #debug-panel .b6-debug .actions button { min-height: 44px; }

@media (orientation: landscape) and (max-height: 430px) {
  #flow[data-flow-screen="menu"] [data-b6-menu] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
    gap: 7px 12px;
    align-items: start;
  }
  #flow[data-flow-screen="menu"] [data-b6-menu] > :is(.mf-title, .mf-actions, .mf-settings) {
    grid-column: 1 / -1;
  }
  #flow[data-flow-screen="menu"] [data-b6-menu] > .mf-title { font-size: clamp(1.12rem, 5vmin, 1.55rem); }
  #debug-panel .b6-debug { gap: 5px; }
}
@media (max-width: 400px) {
  #flow .b6-checkpoint .b6-reading { flex-basis: 42%; }
  #flow .b6-wave-step { grid-template-columns: max-content minmax(0, 1fr); }
  #flow .b6-wave-marker { grid-column: 2; }
}

#flow[data-flow-screen="pause"] .mf-panel:has(.mf-pause-details[open] .b6-telemetry) {
  width: min(94%, clamp(270px, 48cqw, 480px));
  padding-inline: clamp(16px, 4cqw, 32px);
}
