/* ARIA – Erdglobus & Lagebild im Command-Center-Stil. */

/* --- Vollbild-Knopf -------------------------------------------------------- */
#fullscreen .fs-exit { display: none; }
#fullscreen[aria-pressed="true"] .fs-enter { display: none; }
#fullscreen[aria-pressed="true"] .fs-exit { display: block; }

/* --- Ebenen: Globus ersetzt sanft die Partikelkugel ---------------------- */
.globe-layer { position: fixed; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.globe-layer.is-visible { opacity: 1; pointer-events: auto; }
#sphere { transition: opacity 1.2s ease; }
body.globe-mode #sphere { opacity: 0; }
body.globe-mode .vignette { background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .7) 100%); }
#globe-toggle[aria-pressed="true"] { color: var(--champagne); border-color: var(--border-warm); box-shadow: 0 0 18px rgba(183, 156, 255, .35); }

/* Hotspot-Markierung auf dem Globus */
.geo-marker { position: absolute; left: -7px; top: -7px; display: flex; align-items: center; gap: 8px; pointer-events: none; will-change: transform; }
.geo-marker[hidden] { display: none; }
.geo-marker-dot { width: 14px; height: 14px; border-radius: 50%; background: #ff7a6b; box-shadow: 0 0 0 3px rgba(255, 122, 107, .25), 0 0 18px #ff7a6b; animation: geo-pulse 1.4s ease-in-out infinite; }
.geo-marker-label {
  padding: 4px 9px; border-radius: 4px; font: 600 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; white-space: nowrap; background: rgba(120, 20, 20, .55); border: 1px solid rgba(255, 122, 107, .6);
  backdrop-filter: blur(6px);
}
@keyframes geo-pulse { 50% { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(255, 122, 107, .12), 0 0 26px #ff7a6b; } }

/* --- Lagebild-Overlay ------------------------------------------------------ */
/* Festes Raster statt frei schwebender Elemente: Überschrift, Panels, Karten, Medien und Zurück-Knopf haben je
   ihre eigene Zelle und können sich nie überlappen. Unten bleibt Platz für Beschriftung und Mikrofon. */
.geo-hud {
  --side: min(380px, 30vw);
  position: absolute; inset: 0; pointer-events: none; display: grid; gap: 14px 24px;
  grid-template-columns: var(--side) minmax(0, 1fr) var(--side);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "left head right" "left slot right" "left media right" "left close right";
  padding: 70px 28px 192px;
}
.geo-hud[hidden] { display: none; }
.geo-hud > * { pointer-events: auto; }
.geo-slot { grid-area: slot; pointer-events: none !important; min-height: 0; }
.geo-hud::after { /* feine Scanlines wie auf einem Lagebildschirm */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
.geo-hud.is-in .geo-head { animation: geo-drop .9s cubic-bezier(.2, .8, .2, 1) both; }
.geo-hud.is-in .geo-panel--left { animation: geo-slide-l .9s cubic-bezier(.2, .8, .2, 1) .25s both; }
.geo-hud.is-in .geo-panel--right { animation: geo-slide-r .9s cubic-bezier(.2, .8, .2, 1) .4s both; }
.geo-hud.is-out { animation: geo-fade .7s ease both; }
@keyframes geo-drop { from { opacity: 0; transform: translateY(-16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes geo-slide-l { from { opacity: 0; transform: translateX(-40px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes geo-slide-r { from { opacity: 0; transform: translateX(40px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes geo-fade { to { opacity: 0; filter: blur(6px); } }

/* Dunkler Verlauf oben, damit die Schlagzeile nie im Globus untergeht */
.geo-hud::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 46vh; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 4, 10, .92) 0%, rgba(5, 4, 10, .7) 45%, transparent 100%);
}
.geo-head {
  grid-area: head; justify-self: center; align-self: start; position: relative; text-align: center; max-width: min(900px, 100%);
  padding: 18px 30px 20px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 8, 12, .88), rgba(12, 8, 18, .8));
  border: 1px solid rgba(255, 122, 107, .55); border-top: 3px solid #ff5a47;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 20px 60px -10px rgba(0, 0, 0, .9), 0 0 50px -12px rgba(255, 90, 71, .55);
  backdrop-filter: blur(16px);
}
.geo-kicker { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 6px 14px; border-radius: 4px; border: 1px solid rgba(255, 122, 107, .6); background: rgba(120, 18, 18, .55); font: 700 11.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; color: #ffe1dc; }
.geo-live { display: inline-flex; align-items: center; gap: 7px; color: #ff7a6b; }
.geo-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff5a47; box-shadow: 0 0 12px #ff5a47; animation: blink 1.1s infinite; }
.geo-title {
  margin: 0; font: 750 clamp(28px, 3.4vw, 54px)/1.06 var(--font-ui); letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 28px rgba(255, 110, 90, .45), 0 8px 40px rgba(0, 0, 0, .9);
}
.geo-place { margin: 12px 0 0; font: 600 12.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .22em; text-transform: uppercase; color: #d9cfe2; }

/* „Recherche läuft“ während der Websuche */
.geo-search {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  padding: 12px 22px 12px 16px; border-radius: 999px; background: rgba(14, 10, 20, .82); border: 1px solid rgba(183, 156, 255, .45);
  box-shadow: 0 0 40px -8px rgba(183, 156, 255, .6); backdrop-filter: blur(14px); animation: card-in .6s cubic-bezier(.2, .8, .2, 1) both;
}
.geo-search p { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.geo-search-label { font: 700 10.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; color: #c9b6ff; }
.geo-search strong { font: 600 17px/1.1 var(--font-ui); color: #fff; }
.geo-search-radar { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(183, 156, 255, .6); overflow: hidden; flex: none; }
.geo-search-radar::after { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(183, 156, 255, .85), transparent 30%); animation: spin 1.4s linear infinite; }
.globe-credit { position: absolute; left: 16px; bottom: 10px; margin: 0; font-size: 10px; color: rgba(255, 255, 255, .45); pointer-events: none; }

.geo-panel {
  position: relative; align-self: center; max-height: calc(100% - 26px); margin-top: 26px; overflow-y: auto; scrollbar-width: thin;
  padding: 18px 20px 20px;
  background: linear-gradient(160deg, rgba(14, 12, 20, .82), rgba(14, 12, 20, .62)); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); backdrop-filter: blur(14px);
}
.geo-panel::before, .geo-panel::after { /* Eckwinkel */
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid rgba(255, 122, 107, .75);
}
.geo-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.geo-panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.geo-panel--left { grid-area: left; }
.geo-panel--right { grid-area: right; }
.geo-label { margin: 0 0 8px; font: 600 10px/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; color: #ff9b8e; }
.geo-summary { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--text); }
.geo-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.geo-bullets li { position: relative; padding: 9px 12px 9px 22px; font-size: 13px; line-height: 1.45; color: #ddd6e3; background: rgba(255, 255, 255, .04); border-left: 2px solid rgba(255, 122, 107, .55); }
.geo-bullets li::before { content: ""; position: absolute; left: 10px; top: 15px; width: 5px; height: 5px; background: #ff7a6b; }
.geo-stats { margin: 0 0 16px; display: grid; gap: 10px; }
.geo-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.geo-stats dt { font-size: 12.5px; color: var(--muted); }
.geo-stats dd { margin: 0; font: 650 26px/1 var(--font-ui); color: #fff; font-variant-numeric: tabular-nums; text-align: right; }
.geo-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.geo-meta > div { padding: 10px 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.geo-mood { margin: 0; font: 600 16px/1.2 var(--font-ui); text-transform: capitalize; }
.geo-mood[data-tone="hot"] { color: #ff7a6b; }
.geo-mood[data-tone="warm"] { color: var(--warn); }
.geo-mood[data-tone="calm"] { color: var(--ok); }
.geo-clock { margin: 0; font: 600 20px/1 ui-monospace, Menlo, monospace; color: var(--champagne); }
.geo-sources { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.geo-sources li { font: 500 11px/1 ui-monospace, Menlo, monospace; padding: 5px 8px; border-radius: 3px; color: var(--muted); background: rgba(255, 255, 255, .05); }
.geo-close {
  grid-area: close; justify-self: center; align-self: end; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  font: 600 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  background: rgba(14, 12, 20, .7); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(10px);
}
.geo-close:hover { color: var(--text); border-color: var(--border-warm); }
body.globe-mode .cards { right: auto; left: 50%; transform: translateX(-50%); top: 96px; bottom: 196px; width: min(360px, 90vw); justify-content: safe flex-end; }
/* Während eines Lagebilds liegen Pop-up-Karten genau im freien Feld des Rasters (Maße setzt app.js) */
body.geo-docked .cards {
  top: var(--slot-top); left: var(--slot-left); width: var(--slot-w); height: var(--slot-h); right: auto; bottom: auto;
  transform: none; max-height: none; justify-content: safe flex-end; align-items: center; gap: 10px;
}
body.geo-cards-first .geo-media { display: none; }
/* Höher als das Feld? Dann wird die Karte kompakter und scrollt in sich, statt über Überschrift oder Medien zu ragen */
body.geo-docked .cards > .card {
  width: min(360px, 100%); flex: 0 1 auto; min-height: min(150px, 100%); max-height: 100%;
  overflow-y: auto; scrollbar-width: thin; padding: 14px 16px 16px;
}

/* --- Schlagzeilen-Laufband unter der Überschrift --------------------------- */
.geo-ticker {
  width: 0; min-width: 100%; margin: 14px 0 -6px; overflow: hidden; border-top: 1px solid rgba(255, 122, 107, .3);
  padding-top: 9px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.geo-ticker[hidden] { display: none; }
.geo-ticker-track { display: flex; width: max-content; animation: geo-ticker var(--ticker-s, 30s) linear infinite; }
.geo-ticker-item { display: inline-flex; gap: 8px; padding-right: 34px; font-size: 12.5px; color: #e9e2ee; white-space: nowrap; }
.geo-ticker-item::after { content: "+++"; margin-left: 26px; color: #ff7a6b; font: 700 11px/1.6 ui-monospace, Menlo, monospace; }
.geo-ticker-item b { font: 700 10.5px/1.7 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: #ff9b8e; }
@keyframes geo-ticker { to { transform: translateX(-50%); } }

/* --- Medienwand: Webcams, Fotos, Videos wie auf einem Lagezentrum-Monitor ---- */
.geo-media { grid-area: media; justify-self: center; min-width: 0; max-width: min(680px, 100%); }
.geo-media[hidden] { display: none; }
.geo-media.is-in { animation: geo-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes geo-rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.geo-media .geo-label { display: flex; justify-content: space-between; text-shadow: 0 1px 6px #000; }
.geo-media .geo-label span:last-child { color: #ff7a6b; }
.geo-media-strip {
  display: flex; gap: 10px; justify-content: center; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}
.geo-tile {
  position: relative; flex: 0 0 auto; width: 156px; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 4px; border: 1px solid rgba(255, 255, 255, .16); background: #0b0910; scroll-snap-align: start;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .95); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.geo-tile:hover, .geo-tile:focus-visible { transform: translateY(-3px) scale(1.03); border-color: rgba(255, 122, 107, .7); box-shadow: 0 18px 44px -14px rgba(255, 90, 71, .45); outline: none; }
.geo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.geo-tile::after { /* Monitor-Scanlines und Vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55));
}
.geo-tile--webcam img { filter: grayscale(.25) contrast(1.15) brightness(.95); }
.geo-tile-badge {
  position: absolute; z-index: 1; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 2px;
  font: 700 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, .62);
}
.geo-tile--webcam .geo-tile-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; animation: blink 1.1s infinite; }
.geo-tile-meta {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 10px/1.2 ui-monospace, Menlo, monospace; color: #e6dfea; background: linear-gradient(transparent, rgba(0, 0, 0, .8));
}
.geo-tile-play {
  position: absolute; z-index: 1; left: 50%; top: 46%; width: 34px; height: 34px; translate: -50% -50%; border-radius: 50%;
  background: rgba(255, 90, 71, .85); box-shadow: 0 0 20px rgba(255, 90, 71, .6);
}
.geo-tile-play::after { content: ""; position: absolute; left: 13px; top: 10px; border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }

/* --- Großansicht ------------------------------------------------------------ */
.geo-viewer {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px;
  background: rgba(4, 3, 8, .78); backdrop-filter: blur(10px); animation: geo-fade-in .35s ease both;
}
.geo-viewer[hidden] { display: none; }
@keyframes geo-fade-in { from { opacity: 0; } }
.geo-viewer-frame {
  position: relative; margin: 0; width: min(1040px, 100%); padding: 10px 10px 14px; border-radius: 8px;
  background: rgba(14, 12, 20, .92); border: 1px solid rgba(255, 122, 107, .45); border-top: 3px solid #ff5a47;
  box-shadow: 0 40px 120px -20px #000, 0 0 60px -20px rgba(255, 90, 71, .5);
}
.geo-viewer-stage { display: grid; place-items: center; max-height: 72vh; overflow: hidden; border-radius: 4px; background: #000; }
.geo-viewer-stage img { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }
.geo-viewer-stage.is-embed { aspect-ratio: 16 / 9; }
.geo-viewer-stage iframe { width: 100%; height: 100%; border: 0; }
.geo-viewer figcaption { display: flex; align-items: baseline; gap: 14px; padding: 12px 6px 0; flex-wrap: wrap; }
.geo-viewer-kind { font: 700 10.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; color: #ff9b8e; }
.geo-viewer figcaption strong { flex: 1 1 260px; font: 600 15px/1.35 var(--font-ui); color: #fff; }
.geo-viewer figcaption a { font-size: 12.5px; color: var(--champagne); }
.geo-viewer figcaption a[hidden] { display: none; }
.geo-viewer-close {
  position: absolute; top: -16px; right: -16px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font: 400 22px/1 var(--font-ui); color: #fff; background: #1a1420; border: 1px solid rgba(255, 255, 255, .25);
}
.geo-viewer-close:hover { border-color: #ff7a6b; }

/* Mittelgroß: Überschrift über die volle Breite, Panels darunter */
@media (max-width: 1100px) {
  .geo-hud {
    --side: min(330px, 32vw);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "head head head" "left slot right" "left media right" "left close right";
    padding-top: 96px; /* unter Uhr und Statusanzeigen oben rechts */
  }
  .geo-panel { margin-top: 0; max-height: 100%; }
  .geo-media-strip { justify-content: flex-start; }
}
/* Handy: alles untereinander, das rechte Panel entfällt */
@media (max-width: 860px) {
  .geo-hud {
    grid-template-columns: minmax(0, 1fr); gap: 10px;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "head" "slot" "left" "media" "close";
    padding: 64px 12px 196px;
  }
  body.geo-cards-first .geo-panel--left { display: none; } /* kurz eingeblendete Karte hat Vorrang */
  .geo-head { width: 100%; padding: 14px 16px 16px; }
  .geo-search { top: 70px; }
  .geo-panel { align-self: stretch; padding: 14px 16px; }
  .geo-panel--left { max-height: 30vh; }
  .geo-panel--right { display: none; }
  .geo-bullets li:nth-child(n+4) { display: none; }
  .geo-media { justify-self: stretch; max-width: none; }
  .geo-media-strip { justify-content: flex-start; }
  .geo-tile { width: 132px; }
  .geo-viewer { padding: 14px; }
  .geo-viewer-close { top: -12px; right: -6px; }
}
