/* Tiny AUS — Flagship Austin-Bergstrom International Airport (KAUS) Experience
 * Editorial ligne claire parchment & sepia ink styling + Dusk/Night glassmorphism
 * Desktop slide-over Ops Panel + Mobile bottom drawer + Enriched #inspector flight card
 */

:root {
  --ta-bg: rgba(251, 246, 234, 0.95);
  --ta-bg-soft: rgba(244, 236, 218, 0.82);
  --ta-card: rgba(255, 252, 244, 0.88);
  --ta-ink: #2c221a;
  --ta-muted: #6e5b49;
  --ta-border: rgba(74, 59, 44, 0.28);
  --ta-border-strong: rgba(74, 59, 44, 0.72);
  --ta-accent: #c45735;
  --ta-accent-soft: rgba(196, 87, 53, 0.12);
  --ta-teal: #3f7e78;
  --ta-gold: #c68d28;
  --ta-shadow: 0 12px 32px rgba(20, 14, 10, 0.24);
  --ta-serif: Georgia, "Times New Roman", serif;
  --ta-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --ta-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.dusk,
body.solar-dusk,
body.solar-night {
  --ta-bg: rgba(18, 22, 34, 0.88);
  --ta-bg-soft: rgba(26, 32, 49, 0.84);
  --ta-card: rgba(30, 38, 58, 0.78);
  --ta-ink: #f3ece0;
  --ta-muted: #a9b5cc;
  --ta-border: rgba(184, 200, 232, 0.18);
  --ta-border-strong: rgba(184, 200, 232, 0.36);
  --ta-accent: #e06b46;
  --ta-accent-soft: rgba(224, 107, 70, 0.18);
  --ta-teal: #58b4ab;
  --ta-gold: #f0be52;
  --ta-shadow: 0 16px 40px rgba(4, 7, 16, 0.56);
}

/* ==========================================================================
 * 1. Floating Toggle Pill (Desktop collapsed & Mobile unobtrusive entry)
 * ========================================================================== */
#ta-ops-fab {
  position: fixed;
  top: 62px;
  right: 14px;
  z-index: 39;
  display: none;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1.5px solid var(--ta-border-strong);
  background: var(--ta-bg);
  color: var(--ta-ink);
  font-family: var(--ta-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--ta-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.18s ease;
}

#ta-ops-fab:hover {
  transform: translateY(-1px);
  border-color: var(--ta-accent);
}

#ta-ops-fab .ta-fab-grabber,
#ta-ops-fab .ta-fab-count,
#ta-ops-fab .ta-fab-chev,
#ta-mobile-rail {
  display: none;
}

#ta-ops-fab .ta-fab-row,
#ta-ops-fab .ta-fab-left,
#ta-ops-fab .ta-fab-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#ta-ops-fab .ta-fab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fa36b;
  box-shadow: 0 0 0 3px rgba(47, 163, 107, 0.22);
  flex-shrink: 0;
}

#ta-ops-fab .ta-fab-atis {
  font-family: var(--ta-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--ta-accent-soft);
  color: var(--ta-accent);
}

body.pa-tiny-aus-mode:not(.pa-tiny-aus-panel-open) #ta-ops-fab {
  display: inline-flex;
}

/* ==========================================================================
 * 2. Backdrop (Mobile Drawer only)
 * ========================================================================== */
#ta-ops-backdrop {
  position: fixed;
  inset: 0;
  z-index: 46;
  background: rgba(16, 12, 8, 0.34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

/* ==========================================================================
 * 3. Tiny AUS Ops Panel (Desktop Slide-Over Card)
 * ========================================================================== */
#ta-ops-panel {
  position: fixed;
  top: 62px;
  right: 14px;
  z-index: 40;
  width: 364px;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  background: var(--ta-bg);
  color: var(--ta-ink);
  border: 1.5px solid var(--ta-border-strong);
  border-radius: 14px;
  box-shadow: var(--ta-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--ta-sans);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(18px, 0, 0) scale(0.985);
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

#ta-ops-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Keep bottom-right minimap / carto controls clear when desktop Tiny AUS panel is open */
@media (min-width: 761px) {
  body.pa-tiny-aus-panel-open #pa-minimap,
  body.pa-tiny-aus-panel-open #carto-controls,
  body.pa-tiny-aus-panel-open #zoom-stack,
  body.pa-tiny-aus-panel-open #scale-card {
    right: 392px !important;
    transition: right 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.ta-grab-handle {
  display: none;
}

/* Header */
.ta-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--ta-border);
  background: linear-gradient(180deg, var(--ta-bg-soft), transparent);
  flex-shrink: 0;
}

.ta-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ta-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ta-brand-title {
  margin: 0;
  font-family: var(--ta-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ta-ink);
  white-space: nowrap;
}

.ta-atis-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--ta-ink);
  color: #fbf6ea;
  font-family: var(--ta-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

body.dusk .ta-atis-pill,
body.solar-dusk .ta-atis-pill,
body.solar-night .ta-atis-pill {
  background: var(--ta-accent);
  color: #fff9f2;
}

.ta-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ta-btn-exit {
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--ta-border-strong);
  background: transparent;
  color: var(--ta-ink);
  font-family: var(--ta-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.ta-btn-exit:hover {
  background: var(--ta-accent);
  border-color: var(--ta-accent);
  color: #fbf6ea;
}

.ta-btn-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  color: var(--ta-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.ta-btn-icon:hover {
  color: var(--ta-ink);
  border-color: var(--ta-border-strong);
}

.ta-header-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ta-flow-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ta-accent-soft);
  border: 1px solid rgba(196, 87, 53, 0.3);
  color: var(--ta-accent);
  font-family: var(--ta-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ta-notam-chip {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(214, 146, 26, 0.18);
  border: 1px solid rgba(214, 146, 26, 0.48);
  color: #a16506;
  font-family: var(--ta-mono);
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
}

body.dusk .ta-notam-chip,
body.solar-dusk .ta-notam-chip,
body.solar-night .ta-notam-chip {
  color: #f8c65d;
}

.ta-notam-chip.visible {
  display: inline-flex;
}

/* Search Bar */
.ta-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ta-search-icon {
  position: absolute;
  left: 10px;
  font-size: 12px;
  color: var(--ta-muted);
  pointer-events: none;
}

#ta-search-input {
  width: 100%;
  height: 31px;
  padding: 0 28px 0 28px;
  border-radius: 999px;
  border: 1.2px solid var(--ta-border);
  background: var(--ta-card);
  color: var(--ta-ink);
  font-family: var(--ta-sans);
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#ta-search-input::placeholder {
  color: var(--ta-muted);
  opacity: 0.85;
}

#ta-search-input:focus {
  border-color: var(--ta-accent);
  box-shadow: 0 0 0 2.5px var(--ta-accent-soft);
}

#ta-search-clear {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ta-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

#ta-search-clear.visible {
  display: inline-flex;
}

/* Tabs */
.ta-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--ta-border);
  background: var(--ta-bg-soft);
  flex-shrink: 0;
}

.ta-tab {
  position: relative;
  height: 30px;
  padding: 0 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ta-muted);
  font-family: var(--ta-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.ta-tab:hover {
  color: var(--ta-ink);
  background: rgba(128, 110, 90, 0.1);
}

.ta-tab.active {
  background: var(--ta-card);
  color: var(--ta-ink);
  border-color: var(--ta-border-strong);
  box-shadow: 0 1px 4px rgba(20, 14, 10, 0.1);
}

.ta-tab-count {
  font-family: var(--ta-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--ta-accent-soft);
  color: var(--ta-accent);
}

/* Scrollable Tab Body */
.ta-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 14px;
  overscroll-behavior: contain;
}

.ta-pane {
  display: none;
  flex-direction: column;
  gap: 9px;
}

.ta-pane.active {
  display: flex;
}

/* ==========================================================================
 * 4. Flights Tab
 * ========================================================================== */
.ta-filter-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ta-chip {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  color: var(--ta-muted);
  font-family: var(--ta-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.14s ease;
}

.ta-chip:hover {
  border-color: var(--ta-border-strong);
  color: var(--ta-ink);
}

.ta-chip.active {
  background: var(--ta-ink);
  border-color: var(--ta-ink);
  color: #fbf6ea;
}

body.dusk .ta-chip.active,
body.solar-dusk .ta-chip.active,
body.solar-night .ta-chip.active {
  background: var(--ta-accent);
  border-color: var(--ta-accent);
  color: #fff9f2;
}

/* Selected Plane Detail Banner inside Panel */
.ta-selected-detail {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1.3px solid var(--ta-accent);
  background: var(--ta-card);
  box-shadow: 0 3px 12px rgba(196, 87, 53, 0.12);
}

.ta-selected-detail.visible {
  display: flex;
}

.ta-flight-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ta-flight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  color: var(--ta-ink);
  cursor: pointer;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.12s ease, border-color 0.14s ease, background 0.14s ease;
}

.ta-flight-row:hover {
  border-color: var(--ta-accent);
  transform: translateY(-1px);
}

.ta-flight-row.selected {
  border-color: var(--ta-accent);
  box-shadow: inset 3px 0 0 var(--ta-accent);
  background: var(--ta-accent-soft);
}

.ta-fl-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ta-swatch {
  width: 11px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid rgba(44, 34, 26, 0.4);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ta-swatch-tail {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48%;
}

.ta-fl-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.ta-fl-title-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ta-fl-callsign {
  font-family: var(--ta-mono);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ta-ink);
  letter-spacing: 0.02em;
}

.ta-fl-type {
  font-family: var(--ta-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(74, 59, 44, 0.1);
  color: var(--ta-muted);
}

body.dusk .ta-fl-type,
body.solar-dusk .ta-fl-type,
body.solar-night .ta-fl-type {
  background: rgba(184, 200, 232, 0.14);
}

.ta-fl-star {
  color: var(--ta-gold);
  font-size: 11px;
}

.ta-fl-airline {
  font-size: 11px;
  color: var(--ta-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ta-fl-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.ta-phase-pill {
  font-family: var(--ta-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1.5px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.ta-phase-approach {
  background: rgba(47, 158, 108, 0.16);
  color: #1c7c50;
}
.ta-phase-departure {
  background: rgba(196, 87, 53, 0.16);
  color: #b54524;
}
.ta-phase-runway {
  background: rgba(214, 146, 26, 0.22);
  color: #9e6205;
}
.ta-phase-taxi {
  background: rgba(63, 126, 120, 0.16);
  color: #2b6761;
}
.ta-phase-gate {
  background: rgba(107, 94, 82, 0.16);
  color: #5c4f42;
}
.ta-phase-airborne {
  background: rgba(54, 102, 166, 0.15);
  color: #2a558c;
}

body.dusk .ta-phase-approach,
body.solar-dusk .ta-phase-approach,
body.solar-night .ta-phase-approach { color: #6be0a6; }
body.dusk .ta-phase-departure,
body.solar-dusk .ta-phase-departure,
body.solar-night .ta-phase-departure { color: #ff9a7b; }
body.dusk .ta-phase-runway,
body.solar-dusk .ta-phase-runway,
body.solar-night .ta-phase-runway { color: #ffd06b; }
body.dusk .ta-phase-taxi,
body.solar-dusk .ta-phase-taxi,
body.solar-night .ta-phase-taxi { color: #7cd8cf; }
body.dusk .ta-phase-gate,
body.solar-dusk .ta-phase-gate,
body.solar-night .ta-phase-gate { color: #c4ccd9; }
body.dusk .ta-phase-airborne,
body.solar-dusk .ta-phase-airborne,
body.solar-night .ta-phase-airborne { color: #8ec1ff; }

.ta-fl-telem {
  font-family: var(--ta-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ta-muted);
}

.ta-empty-state {
  padding: 20px 12px;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed var(--ta-border);
  color: var(--ta-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ==========================================================================
 * 5. Ops & ATIS Tab
 * ========================================================================== */
.ta-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ta-muted);
  margin: 2px 0 -2px;
}

.ta-runway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.ta-rwy-card {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ta-rwy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.ta-rwy-id {
  font-family: var(--ta-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--ta-ink);
}

.ta-rwy-len {
  font-family: var(--ta-mono);
  font-size: 10px;
  color: var(--ta-muted);
}

.ta-rwy-bar {
  height: 5px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--ta-ink) 0 6px,
    transparent 6px 10px
  );
  opacity: 0.28;
}

.ta-rwy-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ta-role-pill {
  font-family: var(--ta-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 4px;
}

.ta-role-arr {
  background: rgba(47, 158, 108, 0.16);
  color: #1c7c50;
}

.ta-role-dep {
  background: rgba(196, 87, 53, 0.16);
  color: #b54524;
}

body.dusk .ta-role-arr,
body.solar-dusk .ta-role-arr,
body.solar-night .ta-role-arr { color: #6be0a6; }
body.dusk .ta-role-dep,
body.solar-dusk .ta-role-dep,
body.solar-night .ta-role-dep { color: #ff9a7b; }

.ta-wx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ta-wx-cell {
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ta-wx-k {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ta-muted);
}

.ta-wx-v {
  font-family: var(--ta-mono);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ta-ink);
}

.ta-fltcat-VFR { color: #1d8a55 !important; }
.ta-fltcat-MVFR { color: #2468b2 !important; }
.ta-fltcat-IFR { color: #c43636 !important; }
.ta-fltcat-LIFR { color: #9c2b8f !important; }
body.dusk .ta-fltcat-VFR,
body.solar-dusk .ta-fltcat-VFR,
body.solar-night .ta-fltcat-VFR { color: #5ce09e !important; }
body.dusk .ta-fltcat-MVFR,
body.solar-dusk .ta-fltcat-MVFR,
body.solar-night .ta-fltcat-MVFR { color: #74b4ff !important; }
body.dusk .ta-fltcat-IFR,
body.solar-dusk .ta-fltcat-IFR,
body.solar-night .ta-fltcat-IFR { color: #ff7c7c !important; }

.ta-notam-box {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(214, 146, 26, 0.45);
  background: rgba(214, 146, 26, 0.11);
  font-size: 11px;
  line-height: 1.4;
}

.ta-notam-box strong {
  display: block;
  font-size: 10px;
  font-family: var(--ta-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a16506;
  margin-bottom: 3px;
}

body.dusk .ta-notam-box strong,
body.solar-dusk .ta-notam-box strong,
body.solar-night .ta-notam-box strong {
  color: #f8c65d;
}

.ta-datis-details {
  border-radius: 9px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  overflow: hidden;
}

.ta-datis-details summary {
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.ta-datis-details summary::-webkit-details-marker {
  display: none;
}

.ta-datis-raw {
  margin: 0;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--ta-border);
  font-family: var(--ta-mono);
  font-size: 10.2px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ta-muted);
}

.ta-freq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.ta-freq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  font-size: 11px;
}

.ta-freq-name {
  color: var(--ta-muted);
  font-weight: 600;
}

.ta-freq-mhz {
  font-family: var(--ta-mono);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ta-ink);
}

.ta-liveatc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 9px;
  border: 1.3px solid var(--ta-ink);
  background: var(--ta-accent);
  color: #fbf6ea;
  font-family: var(--ta-sans);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 10px rgba(196, 87, 53, 0.26);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.ta-liveatc-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* ==========================================================================
 * 6. Spotter Book Tab (Collection)
 * ========================================================================== */
.ta-progress-card {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ta-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
}

.ta-progress-sub {
  font-family: var(--ta-mono);
  font-size: 10.5px;
  color: var(--ta-muted);
}

.ta-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(74, 59, 44, 0.14);
  overflow: hidden;
}

body.dusk .ta-progress-track,
body.solar-dusk .ta-progress-track,
body.solar-night .ta-progress-track {
  background: rgba(184, 200, 232, 0.16);
}

.ta-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ta-teal), var(--ta-accent));
  transition: width 0.35s ease;
}

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

.ta-livery-card {
  position: relative;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.ta-livery-card.unspotted {
  opacity: 0.52;
  filter: grayscale(0.7);
}

.ta-livery-card.special {
  border-color: var(--ta-gold);
  box-shadow: 0 2px 10px rgba(198, 141, 40, 0.18);
}

.ta-livery-canvas {
  width: 100%;
  height: 44px;
  display: block;
  border-radius: 6px;
  background: rgba(74, 59, 44, 0.05);
}

body.dusk .ta-livery-canvas,
body.solar-dusk .ta-livery-canvas,
body.solar-night .ta-livery-canvas {
  background: rgba(14, 18, 30, 0.45);
}

.ta-livery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.ta-livery-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--ta-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ta-livery-count {
  font-family: var(--ta-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--ta-accent-soft);
  color: var(--ta-accent);
  flex-shrink: 0;
}

.ta-livery-meta {
  font-family: var(--ta-mono);
  font-size: 9.5px;
  color: var(--ta-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
 * 7. Badges Tab (Spotter Achievements)
 * ========================================================================== */
.ta-badge-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ta-badge-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
}

.ta-badge-card.locked {
  opacity: 0.56;
}

.ta-badge-card.unlocked {
  border-color: rgba(196, 87, 53, 0.42);
}

.ta-badge-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ta-accent-soft);
  border: 1px solid var(--ta-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ta-badge-card.locked .ta-badge-ico {
  filter: grayscale(1);
  background: rgba(120, 110, 100, 0.12);
}

.ta-badge-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.ta-badge-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ta-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ta-badge-desc {
  font-size: 10.8px;
  color: var(--ta-muted);
  line-height: 1.32;
}

.ta-badge-status {
  font-family: var(--ta-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(47, 158, 108, 0.16);
  color: #1c7c50;
}

body.dusk .ta-badge-status,
body.solar-dusk .ta-badge-status,
body.solar-night .ta-badge-status {
  color: #6be0a6;
}

/* ==========================================================================
 * 8. Enriched #inspector Flight Card (.ta-flight-card)
 * ========================================================================== */
.ta-flight-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--ta-border);
  background: var(--ta-card);
  color: var(--ta-ink);
  box-sizing: border-box;
  font-family: var(--ta-sans);
}

.ta-fc-preview-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ta-fc-canvas {
  width: 112px;
  height: 52px;
  border-radius: 7px;
  border: 1px solid var(--ta-border);
  background: rgba(74, 59, 44, 0.05);
  flex-shrink: 0;
}

body.dusk .ta-fc-canvas,
body.solar-dusk .ta-fc-canvas,
body.solar-night .ta-fc-canvas {
  background: rgba(14, 18, 30, 0.55);
}

.ta-fc-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.ta-fc-airline {
  font-size: 12px;
  font-weight: 800;
  color: var(--ta-ink);
  line-height: 1.2;
}

.ta-fc-special {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-family: var(--ta-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(198, 141, 40, 0.18);
  color: #9e6507;
}

body.dusk .ta-fc-special,
body.solar-dusk .ta-fc-special,
body.solar-night .ta-fc-special {
  color: #f8c65d;
}

.ta-fc-route {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--ta-bg-soft);
  border: 1px solid var(--ta-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ta-fc-route-codes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--ta-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ta-fc-route-arrow {
  color: var(--ta-accent);
  font-size: 12px;
}

.ta-fc-route-names {
  font-size: 10.5px;
  color: var(--ta-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ta-fc-shimmer {
  display: inline-block;
  font-size: 11px;
  font-style: italic;
  color: var(--ta-muted);
  animation: taPulse 1.2s ease-in-out infinite;
}

@keyframes taPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.ta-fc-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.ta-fc-kv {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(74, 59, 44, 0.05);
}

body.dusk .ta-fc-kv,
body.solar-dusk .ta-fc-kv,
body.solar-night .ta-fc-kv {
  background: rgba(184, 200, 232, 0.07);
}

.ta-fc-k {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ta-muted);
}

.ta-fc-v {
  font-size: 11px;
  font-weight: 700;
  color: var(--ta-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ta-fc-photo-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--ta-border);
  text-decoration: none;
  color: var(--ta-ink);
  font-size: 11px;
  font-weight: 700;
  background: var(--ta-bg-soft);
}

.ta-fc-photo-link img {
  width: 48px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.ta-fc-photo-link:hover {
  border-color: var(--ta-accent);
}

/* ==========================================================================
 * 9. Spotter Toast Pill (Non-intrusive, AUS-scoped)
 * ========================================================================== */
#ta-toast {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translate3d(-50%, -12px, 0);
  z-index: 62;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(34, 26, 20, 0.94);
  color: #fbf6ea;
  border: 1.4px solid var(--ta-gold);
  box-shadow: 0 8px 24px rgba(14, 10, 6, 0.38);
  font-family: var(--ta-sans);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: calc(100vw - 28px);
}

#ta-toast.visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

#ta-toast .ta-toast-kicker {
  font-family: var(--ta-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f8c65d;
}

/* ==========================================================================
 * 10. Mobile Drawer & Unobstructed Airfield FAB (<= 760px)
 * ========================================================================== */
@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  /* Dedicated Tiny AUS Aviation Quick-Jump Rail directly below mobile top bar */
  #ta-mobile-rail {
    display: none;
    align-items: center;
    gap: 6px;
    position: fixed;
    top: calc(max(10px, calc(env(safe-area-inset-top) + 4px)) + 50px);
    left: env(safe-area-inset-left, 0px);
    right: env(safe-area-inset-right, 0px);
    padding: 2px 24px 6px 14px;
    z-index: 38;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0px,
      #000 12px,
      #000 calc(100% - 28px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0px,
      #000 12px,
      #000 calc(100% - 28px),
      transparent 100%
    );
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }

  #ta-mobile-rail::-webkit-scrollbar {
    display: none;
  }

  body.pa-tiny-aus-mode #ta-mobile-rail {
    display: flex;
  }

  body.pa-tiny-aus-panel-open #ta-mobile-rail,
  body.pa-mobile-insp-open #ta-mobile-rail,
  body.pa-mobile-sheet-open #ta-mobile-rail,
  body.pa-mobile-search-open #ta-mobile-rail,
  body.pa-mobile-tour-open #ta-mobile-rail,
  body.pa-mobile-overlay-open #ta-mobile-rail {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(0, -8px, 0);
  }

  .ta-rail-chip {
    appearance: none;
    border: 1.1px solid var(--ta-border-strong);
    background: var(--ta-bg);
    color: var(--ta-ink);
    font-family: var(--ta-sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(20, 14, 10, 0.16);
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1),
      background 0.16s ease,
      color 0.16s ease,
      border-color 0.16s ease;
  }

  .ta-rail-chip:active {
    transform: scale(0.94);
  }

  .ta-rail-chip.active,
  .ta-rail-chip.ta-rail-primary {
    background: var(--ta-teal);
    border-color: rgba(24, 52, 50, 0.78);
    color: #fffaf0;
    box-shadow: 0 3px 10px rgba(63, 126, 120, 0.32);
  }

  .ta-rail-chip.ta-rail-atis {
    font-family: var(--ta-mono);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(44, 34, 26, 0.90);
    border-color: rgba(251, 246, 234, 0.44);
    color: #fbf6ea;
  }

  body.dusk .ta-rail-chip.ta-rail-atis,
  body.solar-dusk .ta-rail-chip.ta-rail-atis,
  body.solar-night .ta-rail-chip.ta-rail-atis {
    background: rgba(28, 36, 56, 0.92);
    border-color: rgba(184, 200, 232, 0.38);
    color: #f3ece0;
  }

  /* Centered Apple-Maps-style bottom sheet handle (replaces hidden Explore Austin pill in Tiny AUS mode) */
  #ta-ops-fab {
    top: auto;
    right: auto;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 43;
    min-width: min(316px, calc(100vw - 28px));
    max-width: calc(100vw - 24px);
    height: auto;
    min-height: 48px;
    padding: 6px 16px 8px;
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 8px 26px rgba(20, 14, 10, 0.26);
  }

  #ta-ops-fab:hover {
    transform: translate3d(-50%, 0, 0);
  }

  #ta-ops-fab:active {
    transform: translate3d(-50%, 1px, 0) scale(0.985);
  }

  #ta-ops-fab .ta-fab-grabber {
    display: block;
    width: 36px;
    height: 3.5px;
    border-radius: 999px;
    background: rgba(74, 59, 44, 0.32);
    margin: 0 auto 1px;
  }

  body.dusk #ta-ops-fab .ta-fab-grabber,
  body.solar-dusk #ta-ops-fab .ta-fab-grabber,
  body.solar-night #ta-ops-fab .ta-fab-grabber {
    background: rgba(184, 200, 232, 0.36);
  }

  #ta-ops-fab .ta-fab-row {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  #ta-ops-fab .ta-fab-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.015em;
    white-space: nowrap;
  }

  #ta-ops-fab .ta-fab-count {
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    color: var(--ta-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  #ta-ops-fab .ta-fab-chev {
    display: inline-flex;
    font-size: 11px;
    color: var(--ta-muted);
    line-height: 1;
  }

  body.pa-mobile-insp-open #ta-ops-fab,
  body.pa-mobile-sheet-open #ta-ops-fab,
  body.pa-mobile-search-open #ta-ops-fab,
  body.pa-mobile-tour-open #ta-ops-fab,
  body.pa-mobile-overlay-open #ta-ops-fab {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(-50%, 18px, 0);
  }

  body.pa-tiny-aus-panel-open #ta-ops-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  #ta-ops-panel {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 78dvh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 48;
    transform: translate3d(0, 102%, 0);
  }

  #ta-ops-panel.open {
    transform: translate3d(0, 0, 0);
  }

  #ta-ops-panel.dragging {
    transition: none !important;
  }

  .ta-grab-handle {
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--ta-border-strong);
    margin: 8px auto 2px;
    flex-shrink: 0;
    opacity: 0.45;
  }

  /* Coordinate mobile chrome cleanly when Tiny AUS drawer is open */
  body.pa-tiny-aus-panel-open #mobile-zoom-pill,
  body.pa-tiny-aus-panel-open #mobile-quick-rail,
  body.pa-tiny-aus-panel-open #pa-minimap {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #ta-toast {
    top: max(60px, calc(env(safe-area-inset-top) + 56px));
  }
}

@media (max-width: 900px) and (max-height: 500px) {
  #ta-mobile-rail {
    top: calc(max(8px, env(safe-area-inset-top)) + 44px);
  }
  #ta-ops-fab {
    min-height: 40px;
    padding: 4px 14px 5px;
    min-width: 260px;
  }
}
