@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --shell-base-width: 1120px;
  --shell-base-height: 860px;
  --shell-scale: 1;
  --shell-scaled-width: 1120px;
  --shell-scaled-height: 860px;
  --bg: #060c14;
  --bg-soft: #09111c;
  --bg-panel: #0b1420;
  --bg-panel-2: #0f1826;
  --bg-panel-3: #121c2a;
  --bg-band: #576178;
  --bg-blue: #357fb9;
  --bg-blue-soft: #17334c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #ebf0f7;
  --text-dim: rgba(221, 227, 234, 0.82);
  --text-faint: rgba(221, 227, 234, 0.58);
  --mint: #65f2d0;
  --gold: #f3b65b;
  --danger: #ff8e8e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(72rem 42rem at 12% 14%, rgba(53, 110, 180, 0.16) 0%, transparent 56%),
    radial-gradient(58rem 38rem at 88% 84%, rgba(81, 212, 188, 0.08) 0%, transparent 52%),
    linear-gradient(180deg, #050b12, #08111c 48%, #060d16);
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

textarea {
  resize: vertical;
}

::selection {
  background: rgba(61, 136, 197, 0.35);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0);
  background: rgba(255, 255, 255, 0.18);
  background-clip: padding-box;
}

.shell-stage {
  height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding:
    calc(8px + env(safe-area-inset-top))
    8px
    calc(8px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.shell-scale-wrap {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.shell-frame {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  gap: 1px;
  background: rgba(87, 97, 120, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shell-header,
.left-rail,
.center-stage,
.right-rail,
.footer-toolbar {
  min-width: 0;
}

.shell-header {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 278px;
  gap: 1px;
  background: rgba(87, 97, 120, 0.72);
}

.header-brand-panel,
.header-main-panel,
.header-wind-panel,
.left-rail,
.center-stage,
.right-rail,
.footer-toolbar {
  background: linear-gradient(180deg, rgba(10, 17, 28, 0.99), rgba(9, 16, 26, 0.99));
}

.header-brand-panel,
.header-main-panel,
.header-wind-panel {
  min-height: 112px;
}

.header-brand-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}

.brand-mark-shell {
  display: flex;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  align-items: center;
  justify-content: center;
}

.brand-mark-shell img {
  width: 82px;
  opacity: 0.96;
  filter: saturate(0) brightness(1.85);
}

.brand-aircraft-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.brand-aircraft-copy strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.brand-aircraft-copy small {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.header-main-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 16px 24px;
}

.header-main-top,
.header-main-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.header-main-top h1 {
  margin-top: 6px;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.route-copy {
  margin-top: 10px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.header-utility {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.header-stamp {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-main-bottom p {
  max-width: 72ch;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.55;
}

.header-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.header-wind-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(51, 63, 92, 0.96), rgba(49, 61, 88, 0.96));
}

.header-wind-panel strong {
  font-size: 1.6rem;
  line-height: 1.05;
}

.header-wind-panel small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tiny-label {
  color: var(--text-dim);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 29, 0.96);
  padding: 6px;
}

.mode-button,
.ghost-button,
.toolbar-button,
.panel-button,
.dialog-nav-button {
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.mode-button {
  min-height: 40px;
  border-radius: 999px;
  background: transparent;
  padding: 0 14px;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mode-button.active {
  border-color: rgba(94, 233, 210, 0.34);
  background: linear-gradient(180deg, rgba(19, 48, 66, 0.98), rgba(14, 35, 49, 0.98));
  color: #fff;
}

.mode-button:hover,
.ghost-button:hover,
.toolbar-button:hover,
.panel-button:hover,
.dialog-nav-button:hover {
  transform: translateY(-1px);
}

.status-chip,
.status-soft,
.mini-pill,
.picker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 20, 32, 0.85);
}

.status-chip.success {
  border-color: rgba(94, 233, 210, 0.32);
  background: rgba(17, 61, 64, 0.62);
  color: #d6fff5;
}

.status-chip.caution {
  border-color: rgba(243, 182, 91, 0.36);
  background: rgba(60, 39, 14, 0.74);
  color: #ffd9a6;
}

.status-chip.danger {
  border-color: rgba(255, 142, 142, 0.4);
  background: rgba(60, 18, 18, 0.82);
  color: #ffc9c9;
}

.status-chip.pending {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(14, 22, 35, 0.84);
}

.status-soft,
.mini-pill,
.picker-badge {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 20, 32, 0.78);
  color: var(--text-dim);
}

.action-pill {
  cursor: pointer;
}

.action-pill:hover,
.action-pill:focus-visible {
  border-color: rgba(94, 233, 210, 0.24);
  background: rgba(20, 36, 54, 0.92);
  color: #fff;
  outline: none;
}

.shell-grid {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 264px minmax(0, 1fr) 278px;
  gap: 1px;
  background: rgba(87, 97, 120, 0.72);
  overflow: hidden;
}

.left-rail,
.center-stage,
.right-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
}

.left-rail,
.right-rail {
  overflow-y: auto;
}

.center-stage {
  overflow-y: auto;
}

.snapshot-panel,
.input-panel,
.overview-panel,
.display-panel,
.instrument-panel,
.briefing-panel,
.notes-panel {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.snapshot-panel {
  padding: 0;
}

.snapshot-header {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(44, 95, 153, 0.98), rgba(41, 88, 142, 0.98));
}

.snapshot-header strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.snapshot-header small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.snapshot-item {
  width: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-top: 0;
  padding: 12px 14px 13px;
  background: transparent;
  color: var(--text);
  text-align: left;
  appearance: none;
}

.snapshot-item:nth-child(2n) {
  border-right: 0;
}

.snapshot-item:hover,
.snapshot-item:focus-visible {
  background: rgba(53, 127, 185, 0.14);
  outline: none;
}

.snapshot-item strong {
  display: block;
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.18;
}

.snapshot-item small {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.4;
}

.snapshot-footer {
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
  color: var(--text-dim);
  font-size: 0.77rem;
  line-height: 1.5;
}

.input-panel,
.briefing-panel,
.notes-panel,
.instrument-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header,
.section-band {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-header h2,
.section-band h2 {
  margin-top: 5px;
  font-size: 1rem;
  line-height: 1.12;
}

.panel-button,
.ghost-button,
.toolbar-button {
  min-height: 36px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.panel-button,
.ghost-button,
.toolbar-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.98), rgba(10, 16, 26, 0.98));
}

.toolbar-button-accent {
  border-color: rgba(94, 233, 210, 0.28);
  background: linear-gradient(180deg, rgba(53, 127, 185, 0.98), rgba(61, 136, 197, 0.98));
  color: #fff;
}

.compact-button {
  width: 100%;
}

.dual-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.editor-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.editor-field span {
  color: var(--text-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.editor-field input,
.editor-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 20, 32, 0.94);
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.editor-field input::placeholder,
.editor-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.editor-field input:focus,
.editor-field textarea:focus {
  border-color: rgba(94, 233, 210, 0.38);
  box-shadow: 0 0 0 2px rgba(94, 233, 210, 0.1);
  background: rgba(14, 24, 38, 0.98);
}

.editor-field-wide {
  grid-column: 1 / -1;
}

.helper-line,
.warning-line,
.info-line {
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.5;
}

.warning-line {
  color: #ffb3b3;
}

.selector-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selector-block p {
  color: var(--text-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.selector-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.selector-options label,
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 20, 32, 0.94);
  padding: 10px 12px;
}

.selector-options input,
.toggle-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--bg-blue);
}

.selector-options span,
.toggle-row span {
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
}

.toggle-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overview-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-board {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 24, 38, 0.96), rgba(10, 17, 28, 0.98));
  padding: 16px 18px;
}

.overview-board strong {
  display: block;
  margin-top: 8px;
  font-size: 1.08rem;
}

.overview-board p {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.overview-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.result-section {
  display: flex;
  flex-direction: column;
}

.section-band {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(99, 109, 132, 0.98), rgba(87, 97, 120, 0.98));
  padding: 8px 14px;
}

.section-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.display-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, rgba(10, 17, 28, 0.98), rgba(8, 14, 23, 0.98));
}

.result-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.runway-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(53, 127, 185, 0.98), rgba(45, 109, 161, 0.98));
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advisory-panel,
.note-banner {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(21, 31, 45, 0.78);
  padding: 12px 14px;
}

.advisory-panel strong,
.note-banner strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.advisory-panel p,
.note-banner p {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.55;
}

.top-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-tile,
.metric-card,
.analysis-card,
.insight-card {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 25, 39, 0.95), rgba(12, 20, 32, 0.98));
}

.metric-tile {
  padding: 12px 14px;
}

.metric-tile span,
.metric-card span,
.analysis-row span,
.insight-row span {
  color: var(--text-dim);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.metric-tile strong,
.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.15;
}

.metric-tile small,
.metric-card small,
.insight-card p,
.note-stack p {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.45;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.analysis-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.analysis-card h3 {
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.analysis-card p {
  color: var(--text-dim);
  font-size: 0.79rem;
  line-height: 1.5;
}

.analysis-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.analysis-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
}

.analysis-row strong {
  font-size: 1.02rem;
  text-align: right;
}

.analysis-row small {
  grid-column: 1 / -1;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.4;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  padding: 12px 14px;
}

.warning-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instrument-panel {
  gap: 12px;
}

.instrument-card {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(51, 63, 92, 0.94), rgba(49, 61, 88, 0.96));
  overflow: hidden;
}

.instrument-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.instrument-head strong {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
}

.instrument-body {
  display: flex;
  gap: 14px;
  padding: 14px;
}

.wind-dial {
  position: relative;
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0 54%, transparent 54%),
    linear-gradient(180deg, rgba(12, 20, 32, 0.86), rgba(9, 17, 27, 0.92));
}

.wind-dial::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wind-dial::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 2px;
  height: 72px;
  transform: translateX(-50%);
  background:
    linear-gradient(
      to bottom,
      rgba(101, 242, 208, 0.14) 0 34%,
      rgba(101, 242, 208, 0.02) 34% 66%,
      rgba(101, 242, 208, 0.14) 66% 100%
    );
}

.wind-needle {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 4px;
  height: 74px;
  transform: translateX(-50%) rotate(var(--needle-rotation, 0deg));
  transform-origin: 50% 50%;
}

.wind-needle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 22px solid rgba(255, 255, 255, 0.92);
}

.wind-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 4px;
  height: 48px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(112, 181, 243, 0.48));
}

.wind-readout {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.wind-readout-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wind-readout-row strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.runway-figure {
  display: grid;
  grid-template-columns: 1fr 108px 1fr;
  gap: 12px;
  padding: 14px;
}

.runway-side-data {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.runway-side-data strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.1;
}

.runway-side-data small {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.42;
}

.runway-track-shell {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(94, 233, 210, 0.34);
  background: rgba(5, 10, 17, 0.95);
}

.runway-track {
  position: absolute;
  inset: 10px 28px;
  background: linear-gradient(180deg, rgba(6, 9, 15, 0.98), rgba(8, 13, 20, 0.98));
}

.runway-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 12px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.72) 0 18px, transparent 18px 36px);
  background-size: 2px 36px;
}

.runway-progress,
.runway-progress-50 {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
}

.runway-progress {
  background: rgba(101, 242, 208, 0.18);
}

.runway-progress-50 {
  background: rgba(101, 242, 208, 0.3);
}

.runway-end-top,
.runway-end-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.runway-end-top {
  top: 8px;
}

.runway-end-bottom {
  bottom: 8px;
}

.briefing-panel textarea {
  min-height: 260px;
  line-height: 1.55;
}

.note-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-line {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(12, 20, 32, 0.74);
  padding: 12px 13px;
}

.insight-card {
  padding: 14px;
}

.insight-card h3 {
  font-size: 1rem;
}

.insight-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 12px;
  padding-top: 12px;
}

.insight-row strong {
  text-align: right;
  font-size: 0.95rem;
}

.picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.footer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-stamp {
  color: var(--text-dim);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dialog-shell {
  width: min(92vw, 980px);
  max-height: min(88vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 18, 29, 0.98), rgba(8, 14, 23, 0.99));
  color: var(--text);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.dialog-shell::backdrop {
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(2px);
}

.dialog-head {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
}

.dialog-head h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dialog-nav-button {
  min-height: 42px;
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 18, 29, 0.96);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dialog-nav-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 16px 0;
}

.picker-results {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 17, 28, 0.96);
}

.picker-card {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
}

.picker-card:hover {
  background: rgba(53, 127, 185, 0.28);
}

.picker-card strong {
  display: block;
  font-size: 1.22rem;
  line-height: 1.2;
}

.picker-card span {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px 16px;
}

.install-dialog p,
.dialog-body p {
  color: var(--text-dim);
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: 80;
  max-width: min(90vw, 480px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 18, 29, 0.96);
  padding: 12px 18px;
  color: var(--text);
  font-size: 0.84rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body[data-mode="takeoff"] [data-editor="landing"],
body[data-mode="takeoff"] #landing-display-section {
  display: none;
}

body[data-mode="landing"] [data-editor="takeoff"],
body[data-mode="landing"] #takeoff-display-section {
  display: none;
}

@media (max-width: 1340px) {
  .shell-header {
    grid-template-columns: 224px minmax(0, 1fr) 244px;
  }

  .shell-grid {
    grid-template-columns: 248px minmax(0, 1fr) 250px;
  }

  .top-metric-grid,
  .analysis-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runway-figure {
    grid-template-columns: 1fr;
  }

  .runway-track-shell {
    min-height: 280px;
  }
}

@media (max-width: 680px) {
  .shell-header,
  .shell-grid {
    grid-template-columns: 1fr;
  }

  .header-brand-panel,
  .header-wind-panel {
    min-height: unset;
  }

  .header-main-top,
  .header-main-bottom {
    flex-direction: column;
  }

  .header-utility,
  .header-statuses {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .shell-frame {
    height: 100%;
  }
}

@media (max-width: 560px) {
  .shell-stage {
    padding: 0;
  }

  .shell-frame {
    height: 100%;
  }

  .top-metric-grid,
  .analysis-grid,
  .metric-grid,
  .editor-grid,
  .dual-actions,
  .selector-options,
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-item:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .header-main-panel,
  .header-brand-panel,
  .header-wind-panel,
  .display-panel,
  .instrument-panel,
  .briefing-panel,
  .notes-panel,
  .input-panel,
  .overview-panel,
  .footer-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .dialog-shell {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .dialog-head {
    grid-template-columns: 90px minmax(0, 1fr) 90px;
  }

  .footer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.small-shell .shell-scale-wrap {
  width: var(--shell-scaled-width);
  height: var(--shell-scaled-height);
  flex: 0 0 auto;
}

body.small-shell .shell-frame {
  width: var(--shell-base-width);
  height: var(--shell-base-height);
  transform: scale(var(--shell-scale));
  transform-origin: top left;
}

body.small-shell .shell-header {
  grid-template-columns: 208px minmax(0, 1fr) 220px;
}

body.small-shell .shell-grid {
  grid-template-columns: 218px minmax(0, 1fr) 228px;
}

body.small-shell .top-metric-grid,
body.small-shell .analysis-grid,
body.small-shell .metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
