/* #region zone:flights.map-style — แผนที่และเครื่องบินอ่านได้ทั้งโหมดสว่างและมืด */
[data-ui='v3'] #flight-map {
  position: absolute;
  inset: 0;
  background: var(--f3-card);
}
[data-ui='v3'] #flight-map[hidden],
[data-ui='v3'] #globe[hidden],
[data-ui='v3'] .globe-tools[hidden] {
  display: none;
}
.fm-switch {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  display: flex;
  gap: var(--u-space-1);
  padding: var(--u-space-1);
  border-radius: var(--u-radius-pill);
  background: var(--f3-card);
  width: max-content;
}
.fm-switch button {
  border: 0;
  border-radius: var(--u-radius-pill);
  min-height: 44px;
  padding: 0 22px;
  font: inherit;
  background: transparent;
  color: var(--f3-muted);
  cursor: pointer;
}
.fm-switch [aria-pressed='true'] {
  background: var(--f3-bg);
  color: var(--f3-ink);
  box-shadow: 0 0 0 1px var(--f3-line);
}
#hero[data-route-view='globe'] .fm-switch {
  top: auto;
  bottom: 14px;
}
.fm-switch button:focus-visible,
.fm-recenter:focus-visible {
  outline: 2px solid var(--f3-ink);
  outline-offset: -3px;
}
.fm-aircraft {
  width: var(--fm-size);
  height: var(--fm-size);
}
.fm-aircraft-body,
.fm-silhouette {
  display: block;
  width: 100%;
  height: 100%;
}
.fm-silhouette {
  overflow: visible;
  filter: drop-shadow(0 1px 2px #0009);
}
.fm-body {
  fill: #f2f2ef;
  stroke: #353535;
  stroke-width: 1;
  stroke-linejoin: round;
}
.fm-deck {
  fill: #d0d0ce;
  stroke: #737373;
  stroke-width: 0.8;
}
.fm-callsign {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--f3-pop);
  color: var(--f3-ink);
  box-shadow: 0 2px 10px #0003;
  font: 500 12px/1.3 var(--f3-mono);
}
.fm-callsign::after {
  content: '';
  position: absolute;
  left: calc(50% - 5px);
  top: 100%;
  border: 5px solid transparent;
  border-top-color: var(--f3-pop);
}
.fm-airport {
  display: block;
  color: var(--f3-ink);
  background: var(--f3-pop);
  border-radius: 8px;
  box-shadow: 0 1px 6px #0003;
  padding: var(--u-space-1) 7px;
  margin-bottom: 5px;
  font: 500 12px/1.4 var(--f3-mono);
}
.fm-airport::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--f3-ink);
  border: 2px solid var(--f3-pop);
  border-radius: 50%;
  bottom: -5px;
  left: calc(50% - 5px);
}
.fm-recenter {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 76px;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: var(--f3-pop);
  color: var(--f3-ink);
  box-shadow: 0 2px 8px #0003;
  cursor: pointer;
}
.fm-recenter svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  width: 22px;
  height: 22px;
}
.fm-recenter:disabled {
  opacity: 0.45;
  cursor: default;
}
.fm-message,
.fm-loading {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 68px);
  margin: 0;
  padding: var(--u-space-2) var(--u-space-3);
  background: var(--f3-pop);
  color: var(--f3-muted);
  border-radius: 12px;
  font: 13px/1.4 var(--f3-sans);
  pointer-events: none;
}
.fm-fallback {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 70px;
  z-index: 2;
  margin: 0;
  padding: var(--u-space-2);
  border-radius: 12px;
  background: var(--f3-pop);
  color: var(--f3-muted);
  font-size: var(--u-text-sm);
  text-align: center;
}
#flight-map .maplibregl-ctrl-attrib {
  font: 10px/1.5 var(--f3-sans);
}
#flight-map .maplibregl-ctrl-group {
  box-shadow: 0 1px 6px #0003;
}
#flight-map .maplibregl-ctrl-group button {
  width: 44px;
  height: 44px;
}
[data-ui='v3'] #flight-map canvas {
  position: absolute;
  inset: auto;
}
[data-route-view='map'] :is(.globe-vector-map, .globe-vector-labels) {
  display: none;
}
[data-ui='v3'] #flight-map .maplibregl-canvas {
  touch-action: none;
}
#flight-map[aria-busy='true']::after {
  content: 'Loading map…';
  position: absolute;
  top: 90px;
  left: 14px;
  color: var(--f3-muted);
  font: 13px/1.4 var(--f3-sans);
}
:lang(th) #flight-map[aria-busy='true']::after {
  content: 'กำลังโหลดแผนที่…';
}
@media (prefers-reduced-motion: reduce) {
  #flight-map *,
  .fm-switch * {
    animation: none;
    transition: none;
  }
}
#hero[data-route-view='map'] #d-age {
  top: auto;
  bottom: 24px;
  left: 12px;
  max-width: calc(100% - 84px);
  pointer-events: none;
  font-size: 10px;
}
#flight-map .fm-message {
  top: 84px;
}
#hero[data-route-view='map'] .globe-info {
  bottom: 132px;
}
@media (max-width: 760px) {
  html[data-ui='v3'] #hero[data-route-view] .stage {
    height: clamp(330px, 92vw, 420px);
  }
}
@media (max-height: 450px) and (orientation: landscape) {
  html[data-ui='v3'] #hero[data-route-view] .stage {
    height: 300px;
  }
}
/* #endregion */
