:root {
  --bg-dark: #050811;
  --bg-panel: #0b101d;
  --bg-surface: rgba(15, 22, 36, 0.88);
  --bg-glass: rgba(10, 15, 27, 0.80);
  --bg-glass-heavy: rgba(10, 15, 27, 0.94);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-solid: #111828;
  --bg-card-hover: rgba(255, 255, 255, 0.075);
  --bg-elevated: #0d1322;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.15);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --text-main: #f1f5fb;
  --text-secondary: #b4c2d9;
  --text-muted: #8294b0;
  --accent: #f5b700;
  --accent-bright: #fbbf24;
  --accent-glow: rgba(245, 183, 0, 0.24);
  --cyan: #38bdf8;
  --green: #22c55e;
  --emerald: #34d399;
  --amber: #f59e0b;
  --red: #f87171;
  --purple: #a78bfa;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-sheet: 28px;
  --mob-dock-h: 66px;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, #app {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  position: relative;
}

button, a, select, input, label {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

/* ===========================
   SHARED SVG ICONS
   =========================== */
.ui-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.ui-icon-sm {
  width: 16px;
  height: 16px;
}

.ui-icon-xs {
  width: 14px;
  height: 14px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--border-strong);
}

.icon-btn:active {
  transform: scale(0.93);
}

.sheet-close-pill {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===========================
   TOPBAR & TOOLBAR (DESKTOP COCKPIT)
   Kein backdrop-filter / z-index auf .topbar, damit mobile fixed Sheets
   niemals in einem Stacking- oder Containing-Context gefangen werden!
   =========================== */
.topbar {
  background: linear-gradient(180deg, #0c1324 0%, #080d19 100%);
  border-bottom: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.topbar-hud-shell {
  display: contents;
}

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

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

.brand h1 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fde047, #f5b700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  flex-shrink: 0;
}

.brand .subtitle {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
  font-variant-numeric: tabular-nums;
}

.radar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18), 0 0 10px var(--red);
  flex-shrink: 0;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.radar-dot.connected {
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2), 0 0 12px rgba(52, 211, 153, 0.85);
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.sheet-section-label,
.mobile-field-label,
.mobile-only-handle,
.mobile-menu-btn,
.mobile-sheet-header,
.sidebar-mobile-header,
.mobile-bottom-nav,
.map-fab-mobile {
  display: none;
}

/* Semantische Akzentfarben für Feature-Icons (Desktop & Mobil) */
.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tile-icon .ui-icon {
  width: 14.5px;
  height: 14.5px;
}

.tile-icon--amber { color: #fbbf24; }
.tile-icon--emerald { color: #34d399; }
.tile-icon--sky { color: #38bdf8; }
.tile-icon--gold { color: #fde047; }
.tile-icon--green { color: #4ade80; }
.tile-icon--indigo { color: #818cf8; }
.tile-icon--slate { color: #cbd5e1; }

/* ===================================================
   DESKTOP COCKPIT HEADER (2-ZEILIG, KLAR GRUPPIERT, 0% ÜBERLAUF)
   Exakt komplementär zum Mobile/Tablet-Breakpoint (<= 1180px / coarse)
   =================================================== */
@media (min-width: 1181px) and (hover: hover), (min-width: 1181px) and (pointer: fine) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
    grid-template-rows: 48px 38px;
    align-items: center;
    padding: 0;
    gap: 0;
  }

  .topbar-controls {
    display: contents;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    padding-left: 16px;
    max-width: 100%;
  }

  .brand .subtitle {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
  }

  .sheet-controls-row {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
  }

  .sheet-controls-row .search-group input {
    width: 235px;
    min-height: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
  }

  .sheet-controls-row select {
    min-height: 32px;
    height: 32px;
    padding: 4px 10px;
    border-radius: 8px;
    max-width: 225px;
  }

  .topbar-stats {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    padding-right: 16px;
  }

  /* Zeile 2: Übersichtlich gruppierte Funktions- & Kartenleiste */
  .sheet-actions-grid {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: rgba(4, 7, 15, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.065);
  }

  /* Ruhige, einheitliche Cockpit-Buttons statt buntem Farb-Mix */
  .sheet-actions-grid .bento-tile {
    height: 28px;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 7px;
    font-size: 11.8px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.038);
    border: 1px solid rgba(255, 255, 255, 0.085);
    color: var(--text-secondary);
    box-shadow: none;
    gap: 6px;
  }

  .sheet-actions-grid .bento-tile:hover {
    background: rgba(255, 255, 255, 0.085);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    filter: none;
  }

  /* Primäre Karten-Aktion dezent hervorheben (lesbarer Kontrast für Icon + Text) */
  .sheet-actions-grid #btnFitArrivals {
    background: rgba(245, 183, 0, 0.11);
    border-color: rgba(245, 183, 0, 0.34);
    color: #fde68a;
  }

  .sheet-actions-grid #btnFitArrivals:hover {
    background: rgba(245, 183, 0, 0.19);
    border-color: rgba(245, 183, 0, 0.52);
    color: #fef3c7;
  }

  /* Aktive Karten-Layer & Modi klar erkennbar mit Statuspunkt */
  .sheet-actions-grid .bento-tile.active {
    background: rgba(56, 189, 248, 0.13);
    border-color: rgba(56, 189, 248, 0.44);
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(56, 189, 248, 0.16);
  }

  .sheet-actions-grid #btnToggleRunways.active,
  .sheet-actions-grid #btnToggleLabels.active {
    background: rgba(52, 211, 153, 0.13);
    border-color: rgba(52, 211, 153, 0.44);
    color: #ecfdf5;
  }

  .sheet-actions-grid #btnToggleRunways.active::after,
  .sheet-actions-grid #btnToggleLabels.active::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
    margin-left: 2px;
  }

  /* Optische Gruppentrennung: [Kartenansicht] | [Spotter & Extras] ... [KI & Konto] */
  .sheet-actions-grid #btnOpenFavorites {
    margin-left: 12px;
    position: relative;
  }

  .sheet-actions-grid #btnOpenFavorites::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 5px;
    bottom: 5px;
    width: 1px;
    background: rgba(255, 255, 255, 0.11);
    pointer-events: none;
  }

  .sheet-actions-grid #btnOpenSettings {
    margin-left: auto;
  }
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.control-group label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.search-input-wrap input {
  padding-left: 31px;
}

/* Moderne einheitliche Eingabefelder */
select,
textarea,
input[type="search"],
input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="email"] {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  font-family: inherit;
  min-height: 34px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

select option {
  background: #0e1526;
  color: var(--text-main);
}

select:focus,
textarea:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.75);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.16);
}

input[type="color"] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 34px;
  width: 100%;
  padding: 2px 4px;
  cursor: pointer;
}

input::placeholder {
  color: rgba(130, 148, 176, 0.72);
}

.range-slider {
  width: 100%;
  accent-color: var(--accent);
  height: 24px;
  cursor: pointer;
}

.search-group input {
  width: 195px;
}

/* Stat Pills */
.stat-pill {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-pill-btn {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.stat-pill-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--border-strong);
}

.stat-pill-btn:active {
  transform: scale(0.95);
}

.stat-arrival {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.32);
  color: #6ee7b7;
}

.stat-alert {
  background: rgba(245, 183, 0, 0.12);
  border-color: rgba(245, 183, 0, 0.34);
  color: #fde047;
}

/* ===========================
   MODERN BUTTON SYSTEM
   =========================== */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.96);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

.btn-full {
  width: 100%;
}

.btn-accent {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(245, 183, 0, 0.26);
}

.btn-accent:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--border-strong);
}

.btn-ghost.active {
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde047;
  background: rgba(245, 183, 0, 0.13);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.24);
}

.btn-spotter {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.38);
  font-weight: 600;
}

.btn-spotter:hover {
  background: rgba(52, 211, 153, 0.24);
}

.btn-fav {
  background: rgba(251, 191, 36, 0.15);
  color: #fde047;
  border-color: rgba(251, 191, 36, 0.38);
  font-weight: 600;
}

.btn-fav:hover {
  background: rgba(251, 191, 36, 0.24);
}

.btn-quiz {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
  font-weight: 600;
}

.btn-quiz:hover {
  background: rgba(56, 189, 248, 0.26);
}

.btn-quiz.active {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

/* ===========================
   WORKSPACE & SIDEBAR (DESKTOP)
   =========================== */
.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 75;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.mobile-backdrop.visible {
  opacity: 1;
}

.sidebar {
  width: 384px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}

/* Segmented Pill Tabs */
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin: 10px 10px 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 9px;
  padding: 8px 3px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tab:hover {
  color: var(--text-main);
}

.tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tab.active .ui-icon {
  color: var(--accent-bright);
}

.tab-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 8px 10px 10px;
  gap: 9px;
  overscroll-behavior: contain;
}

.tab-panel.active {
  display: flex;
}

/* Zonen- & Simulator-Panel als durchgängig scrollbarer Bereich (damit Formulare auf Handy & Desktop immer voll erreichbar sind) */
#panel-zones,
#panel-sim {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

#panel-zones #zoneList {
  overflow-y: visible;
  flex: 0 0 auto;
}

.general-filter-panel {
  max-height: 46vh;
  max-height: 46dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

@media (min-width: 1181px) and (hover: hover), (min-width: 1181px) and (pointer: fine) {
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .filter-bar .chip-toggle,
  .filter-bar #btnToggleGeneralFilters {
    width: 100%;
    justify-content: center;
    border-radius: 9px;
    padding: 6px 8px;
    min-height: 31px;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Dezenter moderner Status-Punkt statt eckiger Browser-Checkboxen in der Filterleiste */
  .filter-bar .chip-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.42);
    border: none;
    margin: 0;
    flex-shrink: 0;
    transition: background 0.15s ease, box-shadow 0.15s ease;
  }

  .filter-bar .chip-toggle input[type="checkbox"]:checked {
    background: #fbbf24;
    box-shadow: 0 0 7px rgba(251, 191, 36, 0.85);
  }
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.chip-toggle:has(input:checked) {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(245, 183, 0, 0.14);
  color: #fde047;
}

.chip-toggle input {
  accent-color: var(--accent);
}

.banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  line-height: 1.45;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.scroll-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 10px 0;
}

/* Wichtig: Kinder in flex-column Listen dürfen niemals zusammengedrückt werden! */
.scroll-list > * {
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 12.5px;
  line-height: 1.55;
}

/* ===========================
   MODERN BOARDING-PASS FLIGHT CARDS
   =========================== */
.flight-card {
  background: rgba(255, 255, 255, 0.042);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 12px 14px 12px 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.flight-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--fc-accent, var(--cyan));
}

.flight-card:hover {
  background: rgba(255, 255, 255, 0.068);
  border-color: var(--border-strong);
}

.flight-card:active {
  transform: scale(0.985);
}

.flight-card.selected {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(245, 183, 0, 0.09);
  box-shadow: 0 0 0 1px rgba(245, 183, 0, 0.18);
}

.fc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-bottom: 6px;
}

.fc-ident {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}

.fc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.fc-callsign {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.fc-airline {
  font-size: 11.5px;
  color: var(--text-muted);
}

.fc-route {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #7dd3fc;
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}

.fc-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-verified {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.32);
}

.badge-estimated {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.badge-taxi {
  background: rgba(251, 191, 36, 0.15);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.38);
}

.badge-mil {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.38);
}

/* ===========================
   FORMS, ZONES & ALERTS
   =========================== */
.panel-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.panel-actions-wrap {
  flex-wrap: wrap;
}

.card-form,
.card-info {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.card-form h3,
.card-form h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-bright);
}

.card-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

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

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

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

.checkbox-row label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"],
.inline-check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

.inline-check-label {
  flex-direction: row !important;
  align-items: center;
  gap: 9px !important;
  color: #ffffff !important;
  font-size: 13px !important;
  cursor: pointer;
}

.inline-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-actions,
.sim-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.form-actions-end {
  justify-content: flex-end;
  margin-top: 4px;
}

.form-actions-between {
  justify-content: space-between;
  margin-top: 6px;
}

.zone-card,
.alert-card {
  background: rgba(255, 255, 255, 0.038);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--cyan);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zone-card {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.zone-card:hover {
  background: rgba(255, 255, 255, 0.068);
}

.zone-card.active-filter {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(245, 183, 0, 0.09);
}

.zone-filter-banner {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
}

.zone-pick-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 999px;
  padding: 8px 12px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: calc(100% - 24px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

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

.zone-title {
  font-weight: 700;
  color: #ffffff;
}

.zone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alert-card {
  border-left-color: var(--accent);
}

.alert-briefing {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.28);
  padding: 7px 9px;
  border-radius: 8px;
  line-height: 1.45;
}

/* ===========================
   KI-CHAT
   =========================== */
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.16);
}

.chat-log {
  gap: 8px;
}

.chat-msg {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.user {
  background: rgba(245, 183, 0, 0.15);
  border: 1px solid rgba(245, 183, 0, 0.32);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  max-width: 88%;
}

.chat-msg.assistant {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 94%;
}

.chat-input-bar {
  display: flex;
  gap: 7px;
  padding-top: 4px;
}

.chat-input-bar input {
  flex: 1;
  min-width: 0;
}

/* ===========================
   MAP & FLOATING GLASS CAPSULE
   =========================== */
.map-container {
  flex: 1;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

/* Isoliert alle internen Leaflet-Z-Indices sauber auf Ebene 1 */
#map {
  width: 100%;
  height: 100%;
  background: #050811;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.map-fab-cluster {
  position: absolute;
  top: 86px;
  left: 10px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48), var(--specular);
  overflow: hidden;
}

.map-locate-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.map-locate-btn.map-fab-mobile {
  display: none;
}

.map-locate-btn:last-child,
.map-locate-btn#btnMyLocation {
  border-bottom: none;
}

.map-locate-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.map-locate-btn.active {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.14);
}

/* Drag-Handle Pill für Bottom Sheets (auf Desktop strikt ausgeblendet) */
.sheet-drag-handle {
  width: 100%;
  padding: 9px 0 7px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.sheet-drag-handle.mobile-only-handle {
  display: none;
}

.sheet-drag-handle span {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  transition: background 0.16s ease, width 0.16s ease;
}

.sheet-drag-handle:hover span,
.sheet-drag-handle:active span {
  background: rgba(251, 191, 36, 0.8);
  width: 48px;
}

/* ===========================
   FLIGHT DETAIL CARD (BOARDING-PASS LOOK)
   =========================== */
.detail-card {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 360px;
  max-height: calc(100% - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.7), var(--specular);
  z-index: 55;
  padding: 14px;
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(5, 8, 17, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s ease, transform 0.12s ease;
}

.detail-close:hover {
  background: rgba(248, 113, 113, 0.35);
}

.detail-close:active {
  transform: scale(0.92);
}

.detail-photo-wrap {
  width: 100%;
  height: 158px;
  background: radial-gradient(circle at 50% 30%, #162238, #080d18);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  position: relative;
}

.detail-photo-wrap::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 44px;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 17, 0.65));
  pointer-events: none;
}

.detail-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.detail-callsign {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.detail-route-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 12px 13px;
  margin-bottom: 11px;
}

.detail-airports {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.detail-route-line {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
  font-size: 13px;
}

.detail-route-line::before,
.detail-route-line::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.6), rgba(56, 189, 248, 0.12));
}

.detail-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.detail-times strong {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  margin: 10px 0 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--accent-bright));
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
  transition: width 0.35s ease;
}

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

.tele-box {
  background: rgba(255, 255, 255, 0.038);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  min-width: 0;
}

.tele-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tele-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

/* ===========================
   TOASTS
   =========================== */
.toast-container {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  max-width: 340px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-left: 3.5px solid var(--accent-bright);
  border-radius: 14px;
  padding: 11px 13px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.24s var(--ease-spring);
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===========================
   LEAFLET MODERN DARK CONTROLS
   =========================== */
.aircraft-marker {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.flight-tooltip {
  background: rgba(9, 14, 26, 0.92) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong) !important;
  color: var(--text-main) !important;
  font-family: var(--font-mono);
  font-size: 11px !important;
  padding: 3px 7px !important;
  border-radius: 7px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55) !important;
}

.airport-pin {
  background: rgba(251, 191, 36, 0.22);
  border: 2px solid var(--accent-bright);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}

.leaflet-bar {
  border: 1px solid var(--border-strong) !important;
  border-radius: 13px !important;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.leaflet-bar a,
.leaflet-bar a:hover {
  background-color: var(--bg-glass) !important;
  color: var(--text-main) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.leaflet-bar a:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--accent-bright) !important;
}

.leaflet-control-attribution {
  background: rgba(5, 8, 17, 0.65) !important;
  color: var(--text-muted) !important;
  font-size: 9.5px !important;
  border-radius: 8px 0 0 0;
}

.leaflet-control-attribution a {
  color: var(--cyan) !important;
}

.user-loc-wrap {
  background: transparent !important;
  border: none !important;
  position: relative;
}

.user-loc-dot {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.95);
}

.user-loc-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.35);
  animation: locPulse 2s ease-out infinite;
}

.zone-drag-wrap {
  background: transparent !important;
  border: none !important;
  position: relative;
  cursor: grab;
}

.zone-drag-wrap:active {
  cursor: grabbing;
}

.zone-drag-dot {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
}

.zone-drag-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  animation: locPulse 2s ease-out infinite;
}

@keyframes locPulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

.dark-radar-tiles {
  filter: invert(100%) hue-rotate(195deg) brightness(86%) contrast(94%) saturate(75%);
}

.leaflet-control-layers {
  background: var(--bg-glass) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 13px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-control-layers-toggle {
  filter: invert(88%);
}

/* ===========================
   FAVORITEN & GENERELLE FILTER
   =========================== */
.fav-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fav-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.fav-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fav-list > * {
  flex-shrink: 0;
}

.fav-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.038);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--accent-bright);
  border-radius: 14px;
  padding: 10px 12px;
  flex-shrink: 0;
}

.fav-item-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

.fav-key-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
}

.fav-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.fav-notes {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.fav-item-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.fav-add-note-row {
  align-items: flex-end;
}

.fav-save-btn {
  min-height: 36px;
}

.detail-fav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.detail-fav-bar .btn {
  border-radius: 999px;
}

.detail-fav-bar .btn.is-fav {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde047;
}

.fc-fav-star {
  color: var(--accent-bright);
  margin-right: 2px;
  font-size: 12px;
}

.fav-item-card.fav-tracked {
  background: rgba(245, 183, 0, 0.11);
  border-color: rgba(251, 191, 36, 0.5);
}

.fav-track-chk {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.fav-tracking-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(245, 183, 0, 0.11);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 13px;
  padding: 9px 11px;
}

.fav-track-banner {
  background: rgba(245, 183, 0, 0.11);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.general-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px;
  max-height: 46vh;
  overflow-y: auto;
}

.general-filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.gf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}

.gf-active-banner {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.38);
  color: #bae6fd;
}

/* ===========================
   SKYQUIZ HUD
   =========================== */
.quiz-hud {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 370px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 20px;
  padding: 14px;
  z-index: 56;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.7), var(--specular);
}

.quiz-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 9px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.quiz-sub-stats {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

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

.quiz-loc-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.quiz-lb-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-bright);
  margin-bottom: 4px;
}

.quiz-lb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quiz-target-info {
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.quiz-guess-form {
  padding: 10px;
  gap: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 13px;
  white-space: normal;
  justify-content: flex-start;
}

.quiz-lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  font-size: 12px;
}

.quiz-result-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11.5px;
  padding: 6px 8px;
  border-radius: 8px;
}

.quiz-result-row.ok {
  background: rgba(52, 211, 153, 0.15);
  color: #a7f3d0;
}

.quiz-result-row.miss {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.quiz-actual-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #e2e8f0;
}

/* ===========================
   MODALS (OBSIDIAN GLASS)
   =========================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-window {
  background: #0c1220;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.78), var(--specular);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.24s var(--ease-spring);
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-xs { max-width: 450px; }
.modal-sm { max-width: 520px; }
.modal-md { max-width: 660px; }

.dex-window {
  max-width: 1320px;
  height: 91vh;
  height: 91dvh;
  background:
    radial-gradient(ellipse 85% 45% at 50% -10%, rgba(56, 189, 248, 0.13), transparent 60%),
    radial-gradient(ellipse 55% 35% at 88% 12%, rgba(245, 183, 0, 0.09), transparent 55%),
    #070c18;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header-wrap {
  flex-wrap: wrap;
}

.modal-title-group {
  min-width: 0;
  flex: 1;
}

.modal-header h2,
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}

.modal-form {
  border: none;
  border-radius: 0;
  background: transparent;
}

.modal-form-plain {
  border: none;
  padding: 0;
  background: transparent;
}

.modal-hint-text {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.48;
}

.tg-guide-box {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.loc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.loc-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}

.loc-footer-actions {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.auth-tabs {
  grid-template-columns: 1fr 1fr;
  margin: 0 0 14px;
}

.auth-user-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-user-name {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.photo-upload-zone {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 16px 12px;
  border: 1.5px dashed rgba(56, 189, 248, 0.42);
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.05);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.photo-upload-zone:hover {
  border-color: var(--accent-bright);
  background: rgba(251, 191, 36, 0.07);
}

.photo-upload-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.photo-upload-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.photo-upload-zone input[type="file"] {
  width: 100%;
  max-width: 260px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.photo-preview-wrap {
  text-align: center;
}

/* ===========================
   SPOTTER-DEX 3D COLLECTOR
   =========================== */
.dex-top-header {
  background: rgba(11, 16, 29, 0.88);
  backdrop-filter: blur(16px);
}

.dex-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dex-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(245, 183, 0, 0.14);
  border: 1px solid rgba(245, 183, 0, 0.38);
  color: var(--accent-bright);
}

.dex-scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 20px 28px;
}

/* Live-Radar "Fehlt dir noch!" Banner */
.dex-live-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(245, 183, 0, 0.15), rgba(56, 189, 248, 0.09) 55%, rgba(167, 139, 250, 0.12));
  border: 1px solid rgba(245, 183, 0, 0.34);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.dex-live-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.06) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: dexBannerSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes dexBannerSweep {
  0%, 60% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}

.dex-live-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 280px;
}

.dex-pulse-ring {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-bright);
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--accent);
}

.dex-pulse-ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent-bright);
  animation: dexRadarPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes dexRadarPing {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

.dex-live-text strong { color: var(--accent-bright); }
.dex-live-sub { font-size: 11.5px; color: var(--text-secondary); font-family: var(--font-mono); margin-top: 2px; }
.dex-live-actions { display: flex; gap: 7px; flex-wrap: wrap; position: relative; z-index: 2; }

/* Spotter Rank & Manufacturer Hero */
.dex-hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.dex-glass-box {
  background: rgba(13, 19, 34, 0.82);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 17px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dex-rank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dex-rank-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dex-rank-emblem {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(245, 183, 0, 0.26), rgba(56, 189, 248, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.44);
  box-shadow: 0 8px 20px rgba(245, 183, 0, 0.16);
  font-size: 22px;
  flex-shrink: 0;
}

.dex-rank-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dex-rank-sub {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.dex-lvl-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10.5px;
}

.dex-xp-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-bright);
}

.dex-xp-wrap { margin-bottom: 12px; }

.dex-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-family: var(--font-mono);
}

.dex-progress-track {
  height: 9px !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.07);
}

.dex-progress-fill {
  background: linear-gradient(90deg, #38bdf8, #34d399, #f5b700) !important;
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.dex-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.dex-mini-stat {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}

.dex-mini-val {
  font-family: var(--font-mono);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
}

.dex-mini-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dex-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dex-mfr-list { display: flex; flex-direction: column; gap: 9px; }
.dex-mfr-row { display: flex; flex-direction: column; gap: 4px; }
.dex-mfr-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.dex-mfr-top span:last-child { font-family: var(--font-mono); color: var(--text-secondary); }
.dex-mfr-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.dex-mfr-bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s var(--ease-spring); }

/* Album Tabs */
.dex-album-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 15px;
  background: rgba(11, 16, 29, 0.82);
  border: 1px solid var(--border);
}

.dex-album-tab {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.dex-album-tab:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.04); }

.dex-album-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(245, 183, 0, 0.14));
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--text-main);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
}

.dex-tab-pill {
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.dex-album-tab.active .dex-tab-pill {
  background: rgba(245, 183, 0, 0.22);
  color: var(--accent-bright);
}

.dex-tab-panel { display: none; }
.dex-tab-panel.active { display: block; animation: dexFadeIn 0.25s var(--ease-spring); }
@keyframes dexFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Filter Toolbar */
.dex-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(13, 19, 34, 0.72);
  margin-bottom: 16px;
}

.dex-toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 170px;
}

.dex-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dex-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dex-filter-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.dex-filter-pill:hover { color: var(--text-main); border-color: var(--border-strong); }
.dex-filter-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}

/* 3D PHYSICAL TRADING CARD ENGINE */
.dex-showcase-btn.active {
  background: linear-gradient(135deg, rgba(245, 183, 0, 0.26), rgba(244, 114, 182, 0.22));
  border-color: rgba(251, 191, 36, 0.65);
  color: #fde68a;
  box-shadow: 0 0 16px rgba(245, 183, 0, 0.25);
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
  justify-items: center;
  gap: 22px;
  align-content: start;
  perspective: 1400px;
}

.dex-card-scene {
  position: relative;
  width: 100%;
  max-width: 318px;
  aspect-ratio: 63 / 96;
  min-height: 426px;
  height: auto;
  perspective: 1200px;
}

.dex-tilt-wrap {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.14s ease-out;
  will-change: transform;
  --mx: 50%;
  --my: 50%;
  --glare-op: 0;
}

.dex-tilt-wrap.returning {
  transition: transform 0.52s var(--ease-spring);
}

.dex-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-spring);
}

.dex-card-scene.is-flipped .dex-flipper {
  transform: rotateY(180deg);
}

/* Geprägter Metall-Außenrahmen (Physical Card Bezel) */
.dex-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #475569 0%, #cbd5e1 22%, #64748b 48%, #e2e8f0 74%, #334155 100%);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.62),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(0, 0, 0, 0.65);
}

.dex-face-back {
  transform: rotateY(180deg);
}

/* Innenkern der Sammelkarte */
.tcg-inner {
  position: relative;
  flex: 1;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(168deg, #10192d 0%, #090f1d 58%, #060a14 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.65);
}

.dex-face-back .tcg-inner {
  padding: 12px 13px;
  background:
    radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.12), transparent 50%),
    linear-gradient(165deg, #0e172a 0%, #070b16 100%);
}

/* =========================================================
   METALL-LEGIERUNGEN JE SELTENHEIT (nur gespottete Karten!)
   ========================================================= */
/* Häufig: Gebürstetes Titan-Silber */
.dex-card-scene[data-rarity="common"]:not(.is-unspotted) .dex-face {
  background: linear-gradient(135deg, #475569 0%, #cbd5e1 24%, #64748b 50%, #cbd5e1 78%, #334155 100%);
}

/* Ungewöhnlich: Eloxiertes Smaragd-Chrom */
.dex-card-scene[data-rarity="uncommon"]:not(.is-unspotted) .dex-face {
  background: linear-gradient(135deg, #065f46 0%, #6ee7b7 22%, #059669 50%, #a7f3d0 76%, #064e3b 100%);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.62),
    0 0 26px rgba(16, 185, 129, 0.22),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.72),
    inset 0 -2px 3px rgba(0, 0, 0, 0.6);
}

/* Selten: Amethyst-Platin Refractor */
.dex-card-scene[data-rarity="rare"]:not(.is-unspotted) .dex-face {
  background: linear-gradient(135deg, #4c1d95 0%, #e9d5ff 22%, #7c3aed 48%, #ddd6fe 74%, #3b0764 100%);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.66),
    0 0 32px rgba(139, 92, 246, 0.28),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.78),
    inset 0 -2px 3px rgba(0, 0, 0, 0.62);
}

/* Legendär: 24k Gold Foil (animierter Edelmetall-Glanz) */
.dex-card-scene[data-rarity="legendary"]:not(.is-unspotted) .dex-face {
  background: linear-gradient(125deg, #78350f 0%, #fde047 18%, #d97706 36%, #fffbeb 52%, #b45309 72%, #fde047 88%, #78350f 100%);
  background-size: 240% 240%;
  animation: dexGoldShimmer 6s ease-in-out infinite;
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(245, 183, 0, 0.32),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.88),
    inset 0 -2px 4px rgba(120, 53, 15, 0.8);
}

/* ✨ Shiny: Prismen-Regenbogen-Chrom */
.dex-card-scene.is-shiny:not(.is-unspotted) .dex-face {
  background: linear-gradient(125deg, #38bdf8 0%, #f472b6 20%, #fde047 40%, #34d399 60%, #a78bfa 80%, #38bdf8 100%);
  background-size: 280% 280%;
  animation: dexGoldShimmer 3.6s linear infinite;
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(244, 114, 182, 0.3),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.92);
}

@keyframes dexGoldShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Dynamischer Holo- & Foil-Glanz über der gesamten Sammelkarte */
.dex-holo-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: var(--glare-op);
  transition: opacity 0.25s ease;
  mix-blend-mode: color-dodge;
  background:
    radial-gradient(circle 220px at var(--mx) var(--my), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06) 45%, transparent 72%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0px, transparent 3px, rgba(255, 255, 255, 0.04) 6px);
}

.dex-card-scene[data-rarity="legendary"]:not(.is-unspotted) .dex-holo-layer {
  opacity: max(0.18, var(--glare-op));
  background:
    radial-gradient(circle 230px at var(--mx) var(--my), rgba(254, 240, 138, 0.44), transparent 62%),
    repeating-linear-gradient(125deg, rgba(251, 191, 36, 0.14) 0px, rgba(56, 189, 248, 0.1) 16px, rgba(254, 240, 138, 0.14) 32px);
}

.dex-card-scene.is-shiny:not(.is-unspotted) .dex-holo-layer {
  opacity: max(0.36, var(--glare-op));
  background:
    radial-gradient(circle 240px at var(--mx) var(--my), rgba(255, 255, 255, 0.5), transparent 58%),
    linear-gradient(115deg, transparent 12%, rgba(56, 189, 248, 0.28) 30%, rgba(244, 114, 182, 0.32) 48%, rgba(251, 191, 36, 0.3) 66%, rgba(52, 211, 153, 0.26) 82%, transparent 95%);
  background-position: var(--mx) var(--my);
  background-size: 200% 200%;
}

/* =========================================================
   LEERER SAMMELALBUM-STECKPLATZ (.is-unspotted)
   ========================================================= */
.dex-card-scene.is-unspotted .dex-face {
  padding: 5px;
  background: #060a14;
  border: 1.5px dashed rgba(100, 116, 139, 0.28);
  box-shadow:
    inset 0 5px 20px rgba(0, 0, 0, 0.85),
    0 6px 16px rgba(0, 0, 0, 0.32);
}

.dex-card-scene.is-unspotted .tcg-inner {
  background:
    radial-gradient(circle at 50% 35%, rgba(30, 58, 95, 0.22), rgba(5, 9, 18, 0.96) 72%);
  border: 1px solid rgba(100, 116, 139, 0.14);
}

.dex-card-scene.is-unspotted .dex-holo-layer {
  display: none;
}

/* =========================================================
   OBERES KARTEN-KOPFBAND (Seriennummer, ICAO & Seltenheit)
   ========================================================= */
.dex-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.28));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 4;
}

.dex-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dex-card-scene.is-unspotted .dex-num {
  color: #64748b;
}

.dex-icao-pill {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 800;
}

.dex-card-scene.is-unspotted .dex-icao-pill {
  border-color: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.rarity-badge {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2.5px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.rarity-common { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; border: 1px solid rgba(203, 213, 225, 0.38); }
.rarity-uncommon { background: rgba(16, 185, 129, 0.22); color: #a7f3d0; border: 1px solid rgba(52, 211, 153, 0.5); }
.rarity-rare { background: rgba(139, 92, 246, 0.26); color: #ede9fe; border: 1px solid rgba(196, 181, 253, 0.55); }
.rarity-legendary {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.38), rgba(251, 191, 36, 0.22));
  color: #fef08a;
  border: 1px solid rgba(253, 224, 71, 0.72);
  box-shadow: 0 0 12px rgba(245, 183, 0, 0.28);
}

.dex-card-scene.is-unspotted .rarity-badge {
  background: rgba(30, 41, 59, 0.55);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.24);
  box-shadow: none;
}

/* =========================================================
   BILD-BÜHNE (3:2 QUERFORMAT-FENSTER – FLUGZEUG IMMER KOMPLETT SICHTBAR!)
   ========================================================= */
.dex-photo {
  position: relative;
  aspect-ratio: 3 / 2;
  height: auto;
  flex-shrink: 0;
  margin: 7px 8px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45);
  background: #060b16;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.dex-card-scene.is-unspotted .dex-photo {
  border: 1px solid rgba(56, 189, 248, 0.14);
  box-shadow: inset 0 3px 14px rgba(0, 0, 0, 0.7);
}

/* Edler Gold-/Metall-Innenrahmen ums echte Flugzeugfoto – ohne Text über dem Flugzeug! */
.dex-card-scene.has-photo:not(.is-unspotted) .dex-photo {
  border-color: rgba(253, 224, 71, 0.52);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.62),
    0 0 14px rgba(245, 183, 0, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Weichgezeichneter Ambient-Hintergrund füllt evtl. Ränder farblich passend ohne schwarze Balken */
.dex-photo .dex-photo-ambient {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  object-fit: cover;
  filter: blur(14px) brightness(0.55) saturate(1.25);
  pointer-events: none;
  z-index: 1;
}

/* Das eigentliche Flugzeugfoto passt vollständig (Nase bis Leitwerk) ins 3:2-Fenster */
.dex-photo .dex-photo-main {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.45s var(--ease-spring);
}

.dex-photo svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dex-card-scene:not(.is-unspotted):hover .dex-photo .dex-photo-main {
  transform: scale(1.03);
}

.dex-stage-top {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  z-index: 4;
}

.dex-shiny-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(5, 8, 17, 0.74);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.dex-shiny-btn.active {
  background: linear-gradient(135deg, #38bdf8, #f472b6, #fde047);
  color: #050811;
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.55);
}

.dex-zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(5, 8, 17, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
}
.dex-zoom-btn:hover { background: rgba(56, 189, 248, 0.5); }

.dex-stage-bottom {
  position: absolute;
  bottom: 7px;
  left: 7px;
  right: 7px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 4;
}

.dex-stage-badge {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(5, 8, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #e2e8f0;
}

/* =========================================================
   UNTERES SAMMELKARTEN-SCHILD & QUARTETT-LEISTE
   ========================================================= */
.dex-card-body {
  padding: 8px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4.5px;
  flex: 1;
  position: relative;
  z-index: 3;
}

.tcg-title-plate {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.dex-name {
  font-weight: 900;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.dex-card-scene.is-unspotted .dex-name {
  color: #94a3b8;
}

.tcg-mfr-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  white-space: nowrap;
}

.dex-card-scene.is-unspotted .tcg-mfr-tag {
  color: #475569;
}

/* Geprägte 3er Quartett-Power-Leiste vorne auf der Sammelkarte */
.tcg-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.tcg-stat-cell {
  padding: 4px 6px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.11);
  text-align: center;
}

.dex-card-scene.is-unspotted .tcg-stat-cell {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(100, 116, 139, 0.14);
}

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

.tcg-stat-v {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #f1f5f9;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dex-card-scene.is-unspotted .tcg-stat-v {
  color: #64748b;
}

.tcg-stat-v.xp-val {
  color: var(--accent-bright);
}

.dex-regs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  margin-bottom: auto;
}

.dex-reg-pill {
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #bae6fd;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 700;
}

.dex-reg-pill.shiny-reg {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fef08a;
}

.dex-card-footer {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.dex-card-scene.is-unspotted .dex-card-footer {
  border-top-color: rgba(100, 116, 139, 0.14);
}

.dex-card-actions { display: flex; gap: 5px; }

.dex-status-yes { color: #6ee7b7; font-weight: 800; font-size: 11px; }
.dex-status-no { color: #64748b; font-weight: 700; font-size: 11px; }

/* Card Back (Spotter-Fakten Quartett im Metallrahmen) */
.dex-back-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 9px;
}
.dex-back-title { font-size: 13.5px; font-weight: 800; }
.dex-back-code { font-family: var(--font-mono); font-size: 10px; color: var(--cyan); }

.dex-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 9px;
}

.dex-spec-box {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.dex-spec-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.dex-spec-val { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-main); margin-top: 1px; }

.dex-tips-box {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  margin-bottom: auto;
  overflow-y: auto;
}
.dex-tips-title { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #7dd3fc; margin-bottom: 4px; }
.dex-tips-box ul { list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-secondary); }
.dex-tips-box li::before { content: "▸ "; color: var(--accent-bright); font-weight: 700; }

.dex-back-foot {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Tab 2: Special Liveries Album */
.dex-livery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 14px;
}

.dex-livery-card {
  border-radius: 16px;
  padding: 13px;
  background: rgba(15, 22, 38, 0.85);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease;
}
.dex-livery-card:hover { transform: translateY(-3px); border-color: rgba(244, 114, 182, 0.45); }
.dex-livery-card.caught {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32), 0 0 18px rgba(245, 183, 0, 0.12);
}
.dex-livery-stripe { height: 5px; border-radius: 999px; margin-bottom: 10px; }
.dex-livery-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.dex-livery-cat { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.dex-livery-name { font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.dex-livery-airline { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.dex-livery-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }

/* Tab 3: World Map & Stamps */
.dex-world-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.dex-world-map-stage {
  background: radial-gradient(circle at 50% 45%, rgba(56, 189, 248, 0.08), rgba(7, 11, 22, 0.92));
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 12px;
  overflow: hidden;
}
.dex-world-svg { width: 100%; height: auto; display: block; }
.dex-stamps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.dex-stamp-card {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dex-stamp-prefix { font-family: var(--font-mono); font-size: 13.5px; font-weight: 800; color: var(--cyan); }
.dex-stamp-country { font-size: 11.5px; font-weight: 600; color: var(--text-main); }
.dex-stamp-count { font-size: 10.5px; color: var(--text-muted); }

/* Tab 4: Missions, Trophies & Friends */
.dex-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dex-mission-card {
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  margin-bottom: 9px;
}
.dex-mission-card.done { border-color: rgba(52, 211, 153, 0.42); background: rgba(52, 211, 153, 0.07); }
.dex-mission-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.dex-mission-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }

.dex-trophies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}
.dex-trophy-card {
  padding: 10px 8px;
  border-radius: 13px;
  text-align: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}
.dex-trophy-card.unlocked {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(160deg, rgba(245, 183, 0, 0.12), rgba(15, 22, 38, 0.6));
}
.dex-trophy-card.locked { opacity: 0.45; filter: grayscale(0.88); }
.dex-trophy-ico { font-size: 22px; margin-bottom: 3px; }
.dex-trophy-name { font-size: 11.5px; font-weight: 700; }
.dex-trophy-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.dex-leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  margin-bottom: 7px;
}
.dex-leader-row.me { border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.09); }
.dex-leader-left { display: flex; align-items: center; gap: 9px; }
.dex-leader-pos { font-family: var(--font-mono); font-weight: 800; width: 24px; color: var(--accent-bright); }

.dex-feed-item {
  padding: 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  margin-bottom: 9px;
}
.dex-feed-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-secondary); margin-bottom: 5px; }
.dex-react-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.dex-react-btn {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 11.5px;
  cursor: pointer;
}
.dex-react-btn.reacted {
  background: rgba(245, 183, 0, 0.2);
  border-color: rgba(245, 183, 0, 0.5);
  color: var(--accent-bright);
}

/* Unlock Reveal & Lightbox Modals */
.dex-unlock-box {
  position: relative;
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 26px 22px 22px;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 25%, rgba(245, 183, 0, 0.22), rgba(11, 16, 29, 0.97) 65%);
  border: 1.5px solid rgba(251, 191, 36, 0.62);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75), 0 0 70px rgba(245, 183, 0, 0.22);
  overflow: hidden;
}
.dex-unlock-rays {
  position: absolute;
  width: 480px;
  height: 480px;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: conic-gradient(from 0deg, transparent 0deg, rgba(251, 191, 36, 0.14) 20deg, transparent 40deg, rgba(56, 189, 248, 0.12) 70deg, transparent 100deg, rgba(251, 191, 36, 0.14) 150deg, transparent 200deg);
  animation: dexSpinSlow 12s linear infinite;
  pointer-events: none;
}
@keyframes dexSpinSlow { to { transform: translateX(-50%) rotate(360deg); } }
.dex-unlock-inner { position: relative; z-index: 2; }
.dex-unlock-title { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.dex-unlock-sub { font-size: 12.5px; color: #fde68a; margin-top: 3px; }
.dex-unlock-art {
  margin: 14px auto;
  height: 176px;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  animation: dexUnlockPop 0.7s var(--ease-spring);
}
.dex-unlock-art img, .dex-unlock-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes dexUnlockPop {
  0% { transform: scale(0.48) rotateY(180deg); opacity: 0; }
  65% { transform: scale(1.04) rotateY(-8deg); opacity: 1; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}
.dex-unlock-xp-pills { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-family: var(--font-mono); font-size: 12px; }

.dex-lightbox-box {
  max-width: 880px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #090f1d;
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8);
}
.dex-lightbox-media {
  background: #04070f;
  min-height: 280px;
  max-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dex-lightbox-media img { max-width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.dex-lightbox-media svg { width: 100%; max-height: 55vh; }
.dex-lightbox-meta {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.dex-lightbox-title { font-size: 15px; font-weight: 800; }
.dex-lightbox-sub { font-size: 12px; color: var(--text-secondary); }
.dex-exif-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dex-exif-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* =========================================================
   EDEL-SAMMELKARTEN DETAILS: GRAVUR, WAPPEN, MASTERY,
   ORIGINAL-SIEGEL, SCHWEBE-FUNKEN & 3D-KARTEN-INSPEKTOR
   ========================================================= */

/* Platin-Meister Rahmen-Aufwertung (ab 15 Kennungen desselben Typs) */
.dex-card-scene.mastery-platinum:not(.is-unspotted):not(.is-shiny) .dex-face {
  background: linear-gradient(130deg, #334155 0%, #f8fafc 20%, #93c5fd 40%, #ffffff 55%, #c4b5fd 75%, #475569 100%);
  background-size: 250% 250%;
  animation: dexGoldShimmer 4.5s ease-in-out infinite;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.68),
    0 0 34px rgba(147, 197, 253, 0.28),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.92);
}

/* Feine Laser-Gravur-Ecken im Innenrahmen */
.tcg-corners {
  position: absolute;
  inset: 4px;
  pointer-events: none;
  z-index: 6;
}
.tcg-corners::before,
.tcg-corners::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(255, 255, 255, 0.28);
  border-style: solid;
}
.tcg-corners::before {
  top: 0;
  left: 0;
  border-width: 1.5px 0 0 1.5px;
  border-top-left-radius: 8px;
}
.tcg-corners::after {
  bottom: 0;
  right: 0;
  border-width: 0 1.5px 1.5px 0;
  border-bottom-right-radius: 8px;
}
.dex-card-scene[data-rarity="legendary"]:not(.is-unspotted) .tcg-corners::before,
.dex-card-scene[data-rarity="legendary"]:not(.is-unspotted) .tcg-corners::after {
  border-color: rgba(253, 224, 71, 0.6);
}
.dex-card-scene.is-unspotted .tcg-corners { display: none; }

/* Sunburst / Prismen-Strahlen in der Holo-Schicht */
.dex-card-scene:not(.is-unspotted) .dex-holo-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg at var(--mx) var(--my),
    transparent 0deg,
    rgba(255, 255, 255, 0.12) 25deg,
    transparent 55deg,
    rgba(56, 189, 248, 0.12) 115deg,
    transparent 155deg,
    rgba(251, 191, 36, 0.14) 215deg,
    transparent 260deg,
    rgba(244, 114, 182, 0.12) 315deg,
    transparent 360deg
  );
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Kategorie-Medaillon (Wappen am Übergang unter dem Bild) */
.tcg-crest {
  position: absolute;
  right: 14px;
  top: -15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #1e293b, #090f1d);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  color: #fde68a;
  z-index: 5;
  pointer-events: none;
}
.dex-card-scene[data-rarity="legendary"]:not(.is-unspotted) .tcg-crest {
  border-color: #fde047;
  background: radial-gradient(circle at 30% 30%, #78350f, #1c1917);
}
.dex-card-scene.is-unspotted .tcg-crest {
  border-color: rgba(100, 116, 139, 0.25);
  color: #475569;
  background: #070d19;
}
.tcg-crest svg { width: 14px; height: 14px; }

/* Goldenes "ORIGINAL PHOTO" Siegel vs. "Referenzbild" Badge */
.tcg-photo-seal {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f59e0b, #fde047);
  color: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}

.tcg-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(5, 8, 17, 0.74);
  backdrop-filter: blur(6px);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Mastery-Sterne für gesammelte Kennungen */
.tcg-mastery-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.tcg-stars {
  letter-spacing: 1px;
  font-size: 11px;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
}
.dex-card-scene.is-unspotted .tcg-stars {
  color: #334155;
  text-shadow: none;
}
.tcg-mastery-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Mikro-Serienprägung ganz unten auf der Karte */
.tcg-edition-stamp {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.42);
  margin-top: 2px;
  user-select: none;
}

/* Dezente Schwebe-Funken bei Legendär & Shiny */
.tcg-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  overflow: hidden;
}
.tcg-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 8px 2px rgba(251, 191, 36, 0.8);
  opacity: 0;
  animation: tcgSparkFloat 4.4s ease-in-out infinite;
}
.dex-card-scene.is-shiny .tcg-spark:nth-child(even) {
  background: #7dd3fc;
  box-shadow: 0 0 8px 2px rgba(56, 189, 248, 0.85);
}
.dex-card-scene.is-shiny .tcg-spark:nth-child(3n) {
  background: #f9a8d4;
  box-shadow: 0 0 8px 2px rgba(244, 114, 182, 0.85);
}
.tcg-spark:nth-child(1) { left: 14%; bottom: 18%; animation-delay: 0s; }
.tcg-spark:nth-child(2) { left: 82%; bottom: 28%; animation-delay: 1.1s; }
.tcg-spark:nth-child(3) { left: 64%; bottom: 12%; animation-delay: 2.2s; }
.tcg-spark:nth-child(4) { left: 28%; bottom: 42%; animation-delay: 3.1s; }

@keyframes tcgSparkFloat {
  0% { transform: translateY(8px) scale(0.4); opacity: 0; }
  35% { opacity: 0.9; }
  100% { transform: translateY(-48px) scale(1.15); opacity: 0; }
}

/* =========================================================
   3D-KARTEN-INSPEKTOR (POKÉMON TCG POCKET STYLE)
   ========================================================= */
.dex-inspector-shell {
  position: relative;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.dex-inspector-spotlight {
  position: absolute;
  width: 460px;
  height: 460px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  background: radial-gradient(circle, rgba(245, 183, 0, 0.18) 0%, rgba(56, 189, 248, 0.1) 42%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.dex-inspector-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.dex-inspector-hint {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(11, 16, 29, 0.78);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.dex-inspector-stage-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.dex-insp-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(11, 16, 29, 0.82);
  color: var(--text-main);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease;
}
.dex-insp-nav-btn:hover {
  background: rgba(56, 189, 248, 0.24);
  transform: scale(1.08);
}

.dex-inspector-stage {
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hochskalierte Großkarte im Inspektor (identisches 63/96 Sammelkarten-Format!) */
.dex-inspector-stage .dex-card-scene {
  width: 352px;
  max-width: 80vw;
  aspect-ratio: 63 / 96;
  min-height: 450px;
  height: auto;
  animation: dexUnlockPop 0.5s var(--ease-spring);
}
.dex-inspector-stage .dex-name {
  font-size: 17px;
}
.dex-inspector-stage .tcg-stat-v {
  font-size: 11.5px;
}

.dex-inspector-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* Auf Touchscreens (Handy/Tablet) dezenter Grund-Foil-Glanz auch ohne Mauszeiger */
@media (hover: none) {
  .dex-card-scene:not(.is-unspotted) .dex-tilt-wrap {
    --glare-op: 0.24;
    --mx: 32%;
    --my: 26%;
  }
}

@media (max-width: 600px) {
  .dex-inspector-stage-row { gap: 8px; }
  .dex-insp-nav-btn { width: 34px; height: 34px; font-size: 13px; }
  .dex-inspector-stage .dex-card-scene { width: 306px; max-width: 78vw; height: auto; }
}

.sightings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sighting-row {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}

.sighting-thumb {
  width: 160px;
  height: 105px;
  object-fit: cover;
  border-radius: 9px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  cursor: pointer;
}

.empty-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080d18;
  color: var(--text-muted);
  font-size: 11px;
  cursor: default;
}

.sighting-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.sighting-notes {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.28);
  padding: 7px 9px;
  border-radius: 8px;
}

.spotter-live-bar {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Landebahn-Badges & Karten-Labels */
.badge-rwy-confirmed {
  background: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.65);
}

.badge-rwy-est {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.38);
}

.runway-label-wrap {
  background: transparent !important;
  border: none !important;
}

.runway-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(5, 8, 17, 0.88);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.65);
  letter-spacing: 0.03em;
}

.runway-label.inactive {
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.55);
  font-weight: 600;
}

/* ===================================================
   TIER 2: COMPACT DESKTOP (1181–1420px, Maus/Desktop)
   =================================================== */
@media (max-width: 1420px) and (min-width: 1181px) and (hover: hover),
       (max-width: 1420px) and (min-width: 1181px) and (pointer: fine) {
  .topbar {
    grid-template-columns: minmax(175px, 1fr) auto minmax(185px, 1fr);
  }

  .brand {
    padding-left: 12px;
    gap: 7px;
  }

  .brand h1 {
    font-size: 15px;
  }

  .brand .subtitle {
    max-width: 185px;
    font-size: 10.5px;
    padding: 2px 8px;
  }

  .sheet-controls-row {
    gap: 7px;
    padding: 0 8px;
  }

  .sheet-controls-row .control-group label {
    display: none;
  }

  .sheet-controls-row .search-group input {
    width: 185px;
  }

  .sheet-controls-row select {
    max-width: 185px;
  }

  .topbar-stats {
    padding-right: 12px;
    gap: 5px;
  }

  .sheet-actions-grid {
    padding: 0 12px;
    gap: 5px;
  }

  .sheet-actions-grid .bento-tile {
    padding: 0 9px;
    font-size: 11.5px;
  }

  .sidebar {
    width: 344px;
  }

  .detail-card {
    width: 336px;
  }
}

/* ===================================================
   TIER 3: MODERNES APP-DESIGN FÜR ALLE SMARTPHONES & TABLETS
   (Hoch- & Querformat inkl. iPad, iPad Pro & Galaxy Tab!)
   Edge-to-Edge Vollbildkarte + Floating Glass HUD + Floating Dock + Bottom Sheets
   =================================================== */
@media (max-width: 1180px), (hover: none) and (pointer: coarse) {
  /* .topbar nimmt keinen Layout-Platz ein – die Karte geht Edge-to-Edge über 100dvh! */
  .topbar {
    display: block;
    height: 0;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
    flex-shrink: 0;
  }

  /* Schwebende Glass-HUD-Kapsel oben über der Vollbildkarte */
  .topbar-hud-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    max-width: 820px;
    margin: 0 auto;
    z-index: 40;
    padding: 7px 10px;
    background: var(--bg-glass);
    backdrop-filter: blur(26px) saturate(190%);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.52), var(--specular);
  }

  .mobile-menu-btn {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.09);
  }

  .mobile-only-handle,
  .sheet-drag-handle.mobile-only-handle {
    display: flex;
  }

  .mobile-field-label,
  .sheet-section-label {
    display: block;
  }

  .map-fab-mobile,
  .map-locate-btn.map-fab-mobile {
    display: flex;
  }

  .map-locate-btn#btnMyLocation {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand {
    order: 0;
    min-width: 0;
    flex: 1;
    gap: 8px;
  }

  .brand-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
  }

  .brand h1 {
    font-size: 14.5px;
    font-weight: 800;
  }

  .brand .subtitle {
    display: block;
    max-width: 100%;
    font-size: 10.5px;
    line-height: 1.2;
    color: var(--text-secondary);
  }

  .topbar-stats {
    order: 0;
    gap: 5px;
  }

  .stat-pill {
    padding: 5px 9px;
    font-size: 11.5px;
    min-height: 34px;
    border-radius: 12px;
  }

  #statAlerts {
    display: none;
  }

  /* iOS-Auto-Zoom verhindern (min. 16px) & Touch-freundliche Controls */
  select,
  textarea,
  input[type="search"],
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="date"],
  input[type="email"] {
    font-size: 16px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
  }

  .search-input-wrap input {
    padding-left: 38px;
  }

  .search-input-icon {
    left: 13px;
    width: 16px;
    height: 16px;
  }

  input[type="color"] {
    height: 46px;
    border-radius: 13px;
  }

  .btn {
    min-height: 42px;
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 12px;
  }

  .btn-sm {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .chip-toggle {
    min-height: 38px;
    padding: 7px 13px;
    font-size: 12.5px;
  }

  .chip-btn {
    min-height: 36px;
    padding: 6px 13px;
    font-size: 12.5px;
  }

  /* Leaflet Controls sauber zwischen Top-HUD und Bottom-Dock positionieren */
  .leaflet-top {
    top: calc(74px + env(safe-area-inset-top, 0px)) !important;
  }

  .leaflet-left {
    left: max(6px, env(safe-area-inset-left, 6px)) !important;
  }

  .leaflet-bottom {
    bottom: calc(var(--mob-dock-h) + 18px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .leaflet-touch .leaflet-bar a {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 19px !important;
  }

  /* Apple-Maps-Stil Frosted-Glass Karten-Kapsel rechts oben */
  .map-fab-cluster {
    top: calc(76px + env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 12px));
    left: auto;
    border-radius: 16px;
  }

  .map-locate-btn {
    width: 44px;
    height: 44px;
  }

  .zone-pick-banner {
    top: calc(76px + env(safe-area-inset-top, 0px));
  }

  .toast-container {
    bottom: auto;
    top: calc(76px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 68px;
    max-width: 420px;
  }

  /* ============================================
     MODERNES CONTROL-CENTER BOTTOM SHEET (#topbarControlsSheet)
     Einheitlich auf Tablet & Smartphone!
     ============================================ */
  .topbar-controls {
    order: 0;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 0;
    top: auto;
    max-width: 580px;
    margin: 0 auto;
    background: rgba(11, 16, 29, 0.96);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: none;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    box-shadow: 0 -16px 54px rgba(0, 0, 0, 0.78), var(--specular);
    padding: 2px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 13px;
    z-index: 90;
    max-height: calc(100vh - 64px - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateY(110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s var(--ease-spring), opacity 0.2s ease, visibility 0.26s ease;
  }

  .topbar-controls.mobile-sheet-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .sheet-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .sheet-header-badge {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.32);
    color: var(--accent-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .sheet-header-badge--sky {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.32);
    color: var(--cyan);
  }

  .sheet-title-main {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .sheet-title-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 1px;
  }

  .sheet-controls-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 18px;
  }

  .sheet-controls-row .search-group {
    grid-column: 1 / -1;
  }

  .topbar-controls .control-group {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    min-width: 0;
  }

  .topbar-controls .control-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }

  .topbar-controls select,
  .topbar-controls input[type="search"] {
    width: 100%;
  }

  .sheet-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: -4px;
  }

  /* Moderne Bento Feature-Kacheln statt greller Vollflächen-Buttons */
  .sheet-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .sheet-actions-grid .bento-tile {
    width: 100%;
    min-height: 76px;
    padding: 11px 10px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
    text-align: left;
    white-space: normal;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: 12.5px;
    font-weight: 600;
  }

  .sheet-actions-grid .bento-tile:hover {
    background: rgba(255, 255, 255, 0.085);
    border-color: rgba(255, 255, 255, 0.16);
  }

  .sheet-actions-grid .bento-tile.active {
    background: rgba(56, 189, 248, 0.13);
    border-color: rgba(56, 189, 248, 0.45);
    color: #ffffff;
  }

  .sheet-actions-grid .tile-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .sheet-actions-grid .tile-icon .ui-icon {
    width: 17px;
    height: 17px;
  }

  .tile-icon--amber {
    background: rgba(245, 183, 0, 0.16);
    color: #fbbf24;
  }

  .tile-icon--emerald {
    background: rgba(52, 211, 153, 0.16);
    color: #34d399;
  }

  .tile-icon--sky {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
  }

  .tile-icon--gold {
    background: rgba(250, 204, 21, 0.18);
    color: #fde047;
  }

  .tile-icon--green {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
  }

  .tile-icon--indigo {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
  }

  .tile-icon--slate {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
  }

  /* ============================================
     RADAR-ZENTRALE ALS MODERNES BOTTOM-SHEET (#sidebarDrawer)
     Identischer moderner Look auf Tablet & Smartphone!
     ============================================ */
  .sidebar {
    position: fixed;
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 0;
    width: auto;
    max-width: 620px;
    margin: 0 auto;
    height: 76vh;
    height: 76dvh;
    max-height: calc(100vh - 44px - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - 44px - env(safe-area-inset-top, 0px));
    background: rgba(11, 16, 29, 0.96);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: none;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 85;
    transform: translateY(108%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.34s var(--ease-spring), height 0.28s var(--ease-spring), opacity 0.2s ease;
    box-shadow: 0 -18px 56px rgba(0, 0, 0, 0.76), var(--specular);
    overflow: hidden;
  }

  .sidebar.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar.sheet-expanded {
    height: 92vh;
    height: 92dvh;
  }

  .sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 16px 8px;
    flex-shrink: 0;
  }

  .sidebar-mobile-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
  }

  .tab {
    padding: 9px 3px;
    font-size: 11.5px;
    min-height: 40px;
  }

  /* ============================================
     DETAIL CARD & QUIZ HUD ALS BOARDING-PASS BOTTOM-SHEET
     (Tablet: elegant zentriert max. 520px; Handy: volle Breite)
     ============================================ */
  .detail-card {
    position: fixed;
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 0;
    width: auto;
    max-width: 520px;
    margin: 0 auto;
    z-index: 70;
    max-height: 52vh;
    max-height: 52dvh;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    border-bottom: none;
    padding: 2px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.78), var(--specular);
    transition: max-height 0.28s var(--ease-spring);
  }

  .detail-card.sheet-expanded {
    max-height: 86vh;
    max-height: 86dvh;
  }

  .detail-close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  .quiz-hud {
    position: fixed;
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 0;
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    z-index: 70;
    max-height: 56vh;
    max-height: 56dvh;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    border-bottom: none;
    padding: 2px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    transition: max-height 0.28s var(--ease-spring);
  }

  .quiz-hud.sheet-expanded {
    max-height: 86vh;
    max-height: 86dvh;
  }

  /* ============================================
     FLOATING GLASS ISLAND BOTTOM DOCK
     ============================================ */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-glass);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    padding: 5px;
    min-height: var(--mob-dock-h);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), var(--specular);
    z-index: 65;
  }

  .mob-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    border-radius: 20px;
    min-height: 54px;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  }

  .mob-nav-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.08);
  }

  .mob-nav-btn.is-active {
    background: rgba(251, 191, 36, 0.16);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--accent-bright);
    box-shadow: inset 0 1px 0 rgba(251, 191, 36, 0.22);
  }

  .mob-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mob-nav-svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }

  .mob-nav-label {
    line-height: 1;
    white-space: nowrap;
  }

  .mob-nav-dex {
    color: #93c5ab;
  }

  .mob-nav-fav {
    color: #d6c58f;
  }

  .mob-nav-badge {
    position: absolute;
    top: -6px;
    right: -11px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent-bright);
    color: #0b0f19;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  }

  .mob-nav-badge-alert {
    background: #ef4444;
    color: #ffffff;
  }

  /* Modals Tablet */
  .modal-backdrop {
    padding: 14px;
  }

  .dex-window {
    height: 92vh;
    height: 92dvh;
  }

  .dex-hero-grid,
  .dex-world-layout,
  .dex-social-grid {
    grid-template-columns: 1fr;
  }

  .dex-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
  }

  .sighting-row {
    flex-direction: column;
  }

  .sighting-thumb {
    width: 100%;
    height: 175px;
  }
}

/* ===================================================
   TIER 4: SMARTPHONE PORTRAIT (<= 600px) – TRUE NATIVE BOTTOM SHEETS
   =================================================== */
@media (max-width: 600px) {
  .topbar-hud-shell {
    left: 10px;
    right: 10px;
    padding: 6px 8px;
    border-radius: 18px;
  }

  /* Auf schmalen Smartphones werden die Sheets randbündig (volle Breite) */
  .sidebar {
    left: 0;
    right: 0;
    max-width: none;
    height: 78vh;
    height: 78dvh;
    border-left: none;
    border-right: none;
  }

  .topbar-controls {
    left: 0;
    right: 0;
    max-width: none;
    border-left: none;
    border-right: none;
    padding: 2px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

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

  .detail-card {
    left: 0;
    right: 0;
    max-width: none;
    max-height: 49vh;
    max-height: 49dvh;
    border-left: none;
    border-right: none;
  }

  .detail-photo-wrap {
    height: 132px;
  }

  .quiz-hud {
    left: 0;
    right: 0;
    max-width: none;
    border-left: none;
    border-right: none;
  }

  /* Alle Modals als moderne Bottom-Sheets */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-window {
    max-width: none !important;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .dex-window {
    height: 94vh;
    height: 94dvh;
    max-height: 94vh;
    max-height: 94dvh;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-header h2,
  .modal-header h3 {
    font-size: 15.5px;
  }

  .modal-body {
    padding: 14px 16px;
  }

  .dex-toolbar {
    padding: 10px 14px;
    gap: 8px;
  }

  .dex-toolbar input[type="search"] {
    flex: 1 1 100%;
    min-width: 0;
  }

  .dex-toolbar-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .dex-toolbar-filters select {
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
    font-size: 13px;
    min-height: 40px;
  }

  .dex-toolbar-filters .dex-showcase-btn {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  .dex-scroll-body {
    padding: 12px 12px 24px;
  }

  .dex-mini-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Identisches 63/96 Sammelkarten-Format auf dem Handy wie auf dem Desktop */
  .dex-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
  }

  .dex-card-scene {
    max-width: 318px;
    width: 100%;
    aspect-ratio: 63 / 96;
    min-height: 426px;
    height: auto;
  }

  .dex-photo {
    aspect-ratio: 3 / 2;
    height: auto;
  }

  .dex-card-body {
    padding: 10px 11px;
  }

  .dex-name {
    font-size: 14.5px;
  }

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

  .form-grid-3 > label:last-child {
    grid-column: 1 / -1;
  }

  .fav-item-card {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .fav-item-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .fav-add-note-row {
    flex-direction: column;
    align-items: stretch;
  }

  .fav-save-btn {
    width: 100%;
  }

  .inline-action-row {
    flex-wrap: wrap;
  }

  .stat-pill {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* Extra-schmale Smartphones (<= 400px) */
@media (max-width: 400px) {
  .sheet-controls-row {
    grid-template-columns: 1fr;
  }

  .dex-toolbar-filters {
    grid-template-columns: 1fr 1fr;
  }

  .dex-toolbar-filters select:last-child {
    grid-column: 1 / -1;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-grid-3 > label:last-child {
    grid-column: auto;
  }

  .tab {
    font-size: 10.5px;
    gap: 2px;
  }

  .tab .ui-icon {
    display: none;
  }

  .mob-nav-btn {
    font-size: 9.5px;
  }
}

/* ===================================================
   SMARTPHONE LANDSCAPE (FLACHE DISPLAYS <= 520px HÖHE)
   =================================================== */
@media (max-height: 520px) and (max-width: 960px) {
  :root {
    --mob-dock-h: 48px;
  }

  .topbar-hud-shell {
    top: 6px;
    padding: 4px 8px;
    border-radius: 15px;
  }

  .brand-text {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .leaflet-top {
    top: 56px !important;
  }

  .map-fab-cluster {
    top: 56px;
  }

  .mobile-bottom-nav {
    bottom: 6px;
    padding: 3px;
    border-radius: 20px;
  }

  .mob-nav-btn {
    flex-direction: row;
    gap: 5px;
    min-height: 40px;
    font-size: 11px;
    border-radius: 16px;
  }

  .mob-nav-svg {
    width: 17px;
    height: 17px;
  }

  .detail-card,
  .detail-card.sheet-expanded,
  .quiz-hud,
  .quiz-hud.sheet-expanded {
    position: fixed;
    top: 56px;
    bottom: 8px;
    right: max(8px, env(safe-area-inset-right, 8px));
    left: auto;
    width: min(370px, 50vw);
    max-height: none;
    border-radius: 18px;
    border: 1px solid var(--border-strong);
    padding: 10px 12px 12px;
  }

  .detail-card .sheet-drag-handle,
  .detail-card .sheet-drag-handle.mobile-only-handle,
  .quiz-hud .sheet-drag-handle,
  .quiz-hud .sheet-drag-handle.mobile-only-handle {
    display: none;
  }

  .detail-photo-wrap {
    height: 92px;
  }
}

/* Touch-Geräte: Komfortablere Trefferfläche für sich bewegende Flugzeuge */
@media (pointer: coarse) {
  .aircraft-marker {
    padding: 8px;
  }
}

/* Statusleiste für eingebettetes lokales LLM im KI-Tab */
.llm-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.llm-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.llm-status-dot.ready {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
}

.llm-status-dot.starting {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(245, 183, 0, 0.85);
}

.llm-status-dot.error {
  background: var(--red);
}

.chip-btn-accent {
  border-color: rgba(245, 183, 0, 0.45) !important;
  background: rgba(245, 183, 0, 0.14) !important;
  color: #fde68a !important;
  font-weight: 600;
}

.chat-msg.chat-pending {
  opacity: 0.72;
  font-style: italic;
}

.chat-meta-tag {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.llm-style-pill-btn {
  padding: 2px 8px !important;
  font-size: 10.5px !important;
  height: auto !important;
  min-height: 24px !important;
  flex-shrink: 0;
}

/* Live-Manöver-Kommentar in der Flugzeug-Detailkarte */
.detail-maneuver-section {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-maneuver-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-maneuver-style {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-maneuver-box {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-main);
  white-space: pre-wrap;
}

.detail-maneuver-box.is-loading {
  opacity: 0.72;
  font-style: italic;
}

/* Bericht-Stil Auswahlkarten im Einstellungs-Modal */
.style-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.style-choice-card {
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.style-choice-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.style-choice-card.active {
  background: rgba(245, 183, 0, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(245, 183, 0, 0.25);
}

.style-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}

.style-choice-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.style-preview-quote {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(5, 8, 17, 0.55);
  border-left: 2.5px solid var(--accent);
  font-style: italic;
}

/* Sonderlackierungen / Special Liveries */
.fc-livery-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: #f5d0fe;
  background: rgba(192, 38, 211, 0.2);
  border: 1px solid rgba(232, 121, 249, 0.42);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-livery-box {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(192, 38, 211, 0.14), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(232, 121, 249, 0.4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-livery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-livery-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fae8ff;
}

.detail-livery-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 9px;
  border-radius: var(--radius-sm);
  background: rgba(5, 8, 17, 0.6);
  border: 1px solid var(--border);
}

/* Umschalter Dashboard <-> Live-Radar */
.view-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  margin-left: 6px;
  flex-shrink: 0;
}

.view-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: var(--text-main);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(56, 189, 248, 0.18));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* Im Dashboard-Modus werden reine Karten-Steuerelemente dezent ausgeblendet */
#app.is-dashboard-mode .search-group,
#app.is-dashboard-mode #statTotal,
#app.is-dashboard-mode #statArrivals,
#app.is-dashboard-mode #btnFitArrivals,
#app.is-dashboard-mode #btnToggleRunways,
#app.is-dashboard-mode #btnToggleLabels,
#app.is-dashboard-mode #btnMobileMenu {
  display: none !important;
}

#app.is-dashboard-mode .sheet-actions-grid #btnOpenFavorites {
  margin-left: 0;
}

#app.is-dashboard-mode .sheet-actions-grid #btnOpenFavorites::before {
  display: none;
}

/* ===========================
   SPOTTER-DASHBOARD (STARTANSICHT)
   =========================== */
.dashboard-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse 75% 40% at 20% 0%, rgba(56, 189, 248, 0.09), transparent 60%),
    radial-gradient(ellipse 60% 35% at 85% 5%, rgba(245, 183, 0, 0.08), transparent 55%),
    var(--bg-dark);
}

.dash-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 20px 22px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-hero {
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 26, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), var(--specular);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dash-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(52, 211, 153, 0.13);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: #6ee7b7;
}

.dash-streak-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-bright);
}

.dash-hero h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
}

.dash-hero-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.dash-cta-radar {
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 12px;
}

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

.dash-kpi-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-kpi-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.dash-kpi-val {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.dash-kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.dash-xp-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 2px 0;
}

.dash-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #34d399, #fbbf24);
  transition: width 0.4s ease;
}

.dash-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}

.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}

.dash-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-card {
  background: rgba(11, 17, 31, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dash-card-head {
  margin-bottom: 14px;
}

.dash-card-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-card-head h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.dash-card-head p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 3px 0 0;
}

.dash-upload-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.dash-upload-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-dropzone {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 20px 16px;
  border-radius: 15px;
  border: 1.5px dashed rgba(56, 189, 248, 0.45);
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.09), rgba(255, 255, 255, 0.02));
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}

.dash-dropzone:hover,
.dash-dropzone.is-dragover {
  border-color: var(--accent-bright);
  background: rgba(251, 191, 36, 0.09);
}

.dash-dropzone input[type="file"] {
  display: none;
}

.dash-drop-icon {
  font-size: 26px;
  line-height: 1;
}

.dash-drop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.dash-drop-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.dash-photo-preview {
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #050811;
}

.dash-photo-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.dash-photo-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.dash-reg-autofill-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.dash-lookup-btn {
  height: 34px;
  min-height: 34px;
}

.dash-lookup-banner {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.dash-lookup-banner.tone-success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.42);
  color: #a7f3d0;
}

.dash-lookup-banner.tone-shiny {
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.16), rgba(251, 191, 36, 0.14));
  border-color: rgba(244, 114, 182, 0.48);
  color: #fde68a;
}

.dash-lookup-banner.tone-info {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

/* Spotter-Wetter & Golden-Hour */
.dash-wx-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-wx-airport {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
}

.dash-wx-cat {
  font-size: 11.5px;
  color: var(--cyan);
  font-weight: 600;
}

.dash-wx-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.dash-wx-pill {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.dash-wx-pill span {
  color: var(--text-muted);
}

.dash-wx-pill strong {
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.dash-solar-box {
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(245, 183, 0, 0.09);
  border: 1px solid rgba(245, 183, 0, 0.32);
}

.dash-solar-box.phase-golden_hour {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(244, 63, 94, 0.12));
  border-color: rgba(251, 191, 36, 0.5);
}

.dash-solar-box.phase-night,
.dash-solar-box.phase-twilight {
  background: rgba(99, 102, 241, 0.11);
  border-color: rgba(129, 140, 248, 0.35);
}

.dash-solar-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 3px;
}

.dash-solar-box.phase-night .dash-solar-title,
.dash-solar-box.phase-twilight .dash-solar-title {
  color: #c7d2fe;
}

.dash-solar-box p {
  font-size: 12px;
  line-height: 1.48;
  color: var(--text-secondary);
  margin: 0;
}

/* Schnellstart-Kacheln */
.dash-quick-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dash-quick-tile {
  padding: 13px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: inherit;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}

.dash-quick-tile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--border-strong);
}

.dash-quick-tile.tile-radar {
  background: linear-gradient(135deg, rgba(245, 183, 0, 0.14), rgba(56, 189, 248, 0.1));
  border-color: rgba(251, 191, 36, 0.4);
}

.dash-qt-ico {
  font-size: 22px;
  flex-shrink: 0;
}

.dash-quick-tile strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
}

.dash-quick-tile span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Foto-Galerie auf dem Dashboard */
.dash-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.dash-photo-card {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.dash-photo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
}

.dash-photo-media {
  position: relative;
  height: 136px;
  background: #060a14;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dash-photo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-photo-placeholder {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
}

.dash-reg-tag {
  position: absolute;
  bottom: 7px;
  right: 7px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(5, 8, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.dash-shiny-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.85);
  color: #050811;
  font-size: 10px;
  font-weight: 800;
  max-width: calc(100% - 14px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-photo-meta {
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-photo-meta strong {
  font-size: 12.5px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-photo-meta span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-exif-line {
  font-family: var(--font-mono);
  color: var(--cyan) !important;
  font-size: 10.5px !important;
}

.dash-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-flag-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
}

.dash-flag-chip small {
  color: var(--text-muted);
  margin-left: 3px;
}

.dash-top-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.dash-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-alert-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(245, 183, 0, 0.08);
  border: 1px solid rgba(245, 183, 0, 0.25);
  font-size: 11.5px;
}

.dash-alert-mini span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) {
  .dashboard-view {
    padding-top: calc(74px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .dash-container {
    padding: 12px 14px 28px;
  }

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

  .dash-kpi-rank-card {
    grid-column: 1 / -1;
  }

  .dash-main-grid,
  .dash-bottom-grid {
    grid-template-columns: 1fr;
  }

  .view-mode-btn span {
    display: none;
  }

  .view-mode-btn {
    padding: 6px 8px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .dash-quick-tiles,
  .dash-wx-metrics {
    grid-template-columns: 1fr;
  }

  .dash-hero h2 {
    font-size: 18.5px;
  }
}

/* Zentrales Einstellungen-Menü */
.settings-window {
  max-width: 720px;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 14px;
  background: rgba(5, 8, 17, 0.55);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.settings-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.045);
}

.settings-tab.active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.4);
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.settings-panel.active {
  display: flex;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.settings-section h4,
.settings-switches-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 0;
}

.settings-section-head,
.settings-cred-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

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

.quota-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quota-card.is-current {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(52, 211, 153, 0.08);
}

.quota-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}

.quota-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.map-style-btn {
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.map-style-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.map-style-btn.active {
  border-color: var(--accent);
  background: rgba(245, 183, 0, 0.12);
  color: #fde68a;
}

.settings-switch-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 12.5px !important;
  color: var(--text-main) !important;
  cursor: pointer;
}

.settings-switch-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-switch-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.settings-volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-secondary);
  padding-top: 4px;
}

@media (max-width: 600px) {
  .settings-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quota-grid,
  .map-style-grid {
    grid-template-columns: 1fr;
  }
}

/* Barrierefreiheit: Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   VOLLBILD-LOGIN-SCHRANKE (TAILSCALE FUNNEL & QUOTA-SCHUTZ)
   ========================================================= */
#app.is-auth-checking,
#app.is-auth-locked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top, 18px)) 16px max(18px, env(safe-area-inset-bottom, 18px));
  background:
    radial-gradient(circle at 50% 36%, rgba(56, 189, 248, 0.12) 0%, rgba(245, 183, 0, 0.06) 32%, rgba(5, 8, 17, 0.98) 72%),
    #050811;
  overflow-y: auto;
}

.auth-gate-overlay.hidden {
  display: none !important;
}

.auth-gate-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.auth-gate-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.13);
}

.auth-gate-ring.ring-1 {
  width: 320px;
  height: 320px;
}

.auth-gate-ring.ring-2 {
  width: 560px;
  height: 560px;
  border-style: dashed;
  border-color: rgba(245, 183, 0, 0.12);
}

.auth-gate-ring.ring-3 {
  width: 820px;
  height: 820px;
  border-color: rgba(56, 189, 248, 0.07);
}

.auth-gate-sweep {
  position: absolute;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(56, 189, 248, 0.16) 0deg,
    rgba(56, 189, 248, 0.03) 38deg,
    transparent 75deg,
    transparent 360deg
  );
  animation: authRadarSweep 9s linear infinite;
}

@keyframes authRadarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-gate-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  background: rgba(11, 16, 29, 0.9);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 26px 24px 20px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(56, 189, 248, 0.08),
    var(--specular);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-gate-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-gate-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 25px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(245, 183, 0, 0.22));
  border: 1px solid rgba(245, 183, 0, 0.42);
  box-shadow: 0 8px 24px rgba(245, 183, 0, 0.18);
  flex-shrink: 0;
}

.auth-gate-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: var(--cyan);
}

.auth-gate-brand h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 1px 0 2px;
}

.auth-gate-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.auth-gate-tabs {
  border-radius: 12px;
  padding: 3px;
  background: rgba(5, 8, 17, 0.65);
  border: 1px solid var(--border);
}

.auth-gate-form,
.auth-gate-fields-wrap {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.auth-gate-submit {
  margin-top: 4px;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 700;
}

.auth-gate-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}
