/* METAR cockpit-style board (paired with mw-* markup) */
.metar-query-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.mw-dash {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.mw-head {
  padding: 0.35rem 0 0;
}

.mw-brand {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mw-brand-en {
  opacity: 0.75;
  font-size: 0.82rem;
  margin-inline-start: 0.35rem;
}

.mw-h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mw-h1-tag {
  color: var(--accent);
}

.mw-obs {
  margin-top: 0.25rem;
  opacity: 0.78;
  font-size: 0.78rem;
}

.mw-sub {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.mw-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.75rem;
}

.mw-tile {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-2);
}

.mw-tile-top {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  color: #0a0e17;
}

.mw-tile-bot {
  padding: 0.65rem 0.85rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: #0f172a;
  background: #f1f5f9;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  line-height: 1.35;
}

.mw-tile-tip {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  color: var(--muted);
  margin: -0.2rem auto 0.75rem;
  text-align: center;
}

.mw-tile-vfr .mw-tile-top { background: linear-gradient(135deg, #2d9977, #1e6f55); color: #e8fff8; }
.mw-tile-mvfr .mw-tile-top { background: linear-gradient(135deg, #3d7fd9, #2a5699); color: #f0f6ff; }
.mw-tile-ifr .mw-tile-top { background: linear-gradient(135deg, #c9424a, #8a2730); color: #fff0f2; }
.mw-tile-lvfr .mw-tile-top { background: linear-gradient(135deg, #7b2cbf, #56179a); color: #f8efff; }
.mw-tile-ok .mw-tile-top {
  background: linear-gradient(135deg, #3dd598 0%, #24a874 100%);
  color: #f0fdf4;
}
.mw-tile-wind .mw-tile-top {
  background: linear-gradient(135deg, #7c6cf0 0%, #4f43c4 100%);
  color: #f4f4ff !important;
}
.mw-tile-warn .mw-tile-top { background: linear-gradient(135deg, #ff6b7a, #c73d4a); color: #fff !important; }

.mw-cockpit {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(37, 99, 235, 0.08), transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.5rem;
}

.mw-cock-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .mw-cock-inner {
    grid-template-columns: minmax(200px, 1.15fr) minmax(180px, 0.9fr) minmax(180px, 0.85fr);
    align-items: stretch;
  }
}

.mw-pane-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}

.mw-compass-pane,
.mw-gauge-pane,
.mw-cloud-pane {
  min-height: 220px;
}

.mw-compass {
  --wind: 0;
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

.mw-compass-disk {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 65%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.mw-cw {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
}
.mw-cw.N { top: 6%; left: 50%; transform: translateX(-50%); }
.mw-cw.E { right: 6%; top: 50%; transform: translateY(-50%); }
.mw-cw.S { bottom: 6%; left: 50%; transform: translateX(-50%); }
.mw-cw.W { left: 6%; top: 50%; transform: translateY(-50%); }

.mw-rwy-strip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 42%;
  margin-left: -5px;
  margin-top: -42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border-radius: 4px;
  transform-origin: bottom center;
  transform: rotate(calc(var(--rwy-ang, 0deg) - 90deg));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.mw-wind-flag {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 0;
  height: 46%;
  transform-origin: bottom center;
  transform: rotate(calc(var(--wind) * 1deg - 90deg));
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.mw-wind-flag span {
  position: absolute;
  left: -9px;
  bottom: 88%;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 36px solid #fff;
}

.mw-rwy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.mw-rwy-pill {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(7, 11, 20, 0.35);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.mw-rwy-pill.is-on {
  background: rgba(244, 185, 66, 0.25);
  border-color: rgba(244, 185, 66, 0.55);
  color: var(--accent);
}

.mw-gauge-svg-wrap {
  position: relative;
  max-width: 240px;
  margin: 0 auto;
}

.mw-gauge-svg {
  width: 100%;
  height: auto;
  display: block;
}

.mw-gauge-readout {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-top: -0.25rem;
}

.mw-gauge-readout small {
  font-size: 0.75rem;
  margin-left: 0.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.mw-gauge-na polygon {
  opacity: 0.25;
}

.mw-na {
  opacity: 0.55;
}

.mw-cloud-chart {
  position: relative;
  height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(12, 24, 48, 0.9), rgba(7, 11, 20, 0.65));
  overflow: hidden;
}

.mw-cloud-fill {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 6%;
  background: linear-gradient(180deg, rgba(120, 170, 255, 0.35), rgba(79, 140, 255, 0.15));
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mw-cloud-capline {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 40%;
  font-size: 0.75rem;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
}

.mw-cloud-quiet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.5;
}

.mw-cloud-quiet span {
  font-size: 0.78rem;
  opacity: 0.8;
}

.mw-ytick {
  position: absolute;
  left: 3%;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  transform: translateY(50%);
}

.mw-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 960px) {
  .mw-bottom {
    grid-template-columns: 1fr 1.1fr;
  }
}

.mw-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  color: var(--text);
}

.mw-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
}

.mw-card h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.mw-prose {
  color: var(--text);
}

.mw-prose p {
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.65;
}

.mw-muted-small {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.mw-facts {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.mw-facts li {
  margin-bottom: 0.35rem;
}

.mw-pre {
  margin: 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
  color: #334155;
}

.mw-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
}

.mw-grid-table th,
.mw-grid-table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  color: var(--text);
}

.mw-grid-table thead th {
  background: rgba(79, 140, 255, 0.12);
  color: var(--muted);
  font-weight: 600;
}

.mw-grid-table tbody tr:nth-child(even) {
  background: var(--bg-1);
}

tr[data-metar-row].is-hot {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
  background: rgba(37, 99, 235, 0.06);
}

.mw-pill-id {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.18);
  color: var(--blue);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.mw-mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem !important;
}

.mw-raw-details {
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  padding: 0.85rem 1rem;
  background: var(--bg-1);
}

.mw-raw-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.mw-map-wrap {
  margin: 0 0 1.1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mw-map-wrap .mw-map-shell {
  height: min(52vh, 520px);
  min-height: 300px;
}

.mw-map-wrap .mw-map-shell-fallback {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  background: var(--bg-1);
}

.mw-map-fallback-txt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  max-width: 44ch;
  line-height: 1.45;
}

.mw-tech-hint {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* 浅色主题下：罗盘 / 风表 / 云图细调（主色已在上方定义） */
.mw-pane-title {
  color: var(--muted);
}

.mw-compass-disk {
  border-color: rgba(15, 23, 42, 0.12);
  background: radial-gradient(circle at 50% 50%, #ffffff, #f1f5f9 72%);
  box-shadow: inset 0 0 28px rgba(148, 163, 184, 0.12);
}

.mw-cw {
  color: rgba(15, 23, 42, 0.42);
}

.mw-rwy-strip {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.04));
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.mw-gauge-readout {
  color: var(--text);
}

.mw-gauge-readout small {
  color: var(--muted);
}

.mw-gauge-svg .mw-gauge-arc {
  stroke: rgba(15, 23, 42, 0.15) !important;
}

.mw-cloud-chart {
  border-color: var(--border);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.mw-cloud-quiet {
  color: var(--muted);
}

.mw-ytick {
  color: rgba(15, 23, 42, 0.35);
}

.mw-rwy-pill.is-on {
  background: var(--accent-dim);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent);
}
