/* Daily Fact — links die letzten Tage (scrollbar), rechts die große Karte zum Umdrehen. */
.df { --df: var(--sky); flex: 1; width: 100%; max-width: 1340px; margin: 0 auto; padding: 28px 24px 44px; }
:root[data-theme="light"] .df { --df: #2a9fd6; }

.df-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.daily-marke {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--df) 14%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--df) 45%, var(--line));
  font-size: 0.85rem; font-weight: 700;
}
.daily-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--df); box-shadow: 0 0 0 3px color-mix(in srgb, var(--df) 25%, transparent); }
.df-naechste { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }
.df-naechste strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Raster: links Liste, rechts Karte ---------- */
.df-raster {
  /* links die vergangenen Fakten (breit, damit ein Fakt meist in 2–3 Zeilen passt), rechts die Karte wie bisher */
  display: grid; grid-template-columns: minmax(260px, 45fr) minmax(0, 55fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 22px; row-gap: 16px; align-items: stretch;
}
/* links oben Datum + Countdown, darunter die Liste; die Karte rechts beginnt oben bündig mit dem Datum */
.df-raster > .df-kopf { grid-column: 1; grid-row: 1; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
.df-raster > .archiv { grid-column: 1; grid-row: 2; }
.df-raster > .karte-buehne { grid-column: 2; grid-row: 1 / span 2; }

/* Links: die Liste nimmt genau die Höhe der Karte ein und scrollt */
.archiv { position: relative; min-height: 0; }
.archiv-innen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.archiv-titel { margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink-muted); }
.archiv-liste {
  list-style: none; margin: 0; padding: 0 6px 0 0; flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--df) 40%, var(--line)) transparent;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
}
.archiv-liste li {
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-panel); border: 1px solid var(--line);
  transition: border-color .15s;
}
.archiv-liste li:hover { border-color: color-mix(in srgb, var(--df) 45%, var(--line)); }
.archiv-liste li:last-child { margin-bottom: 24px; }
.archiv-liste li.leer { color: var(--ink-muted); font-size: 0.9rem; text-align: center; padding: 22px 14px; border-style: dashed; }
.a-kopf { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 4px; }
.a-nr { font-weight: 700; font-size: 0.82rem; color: var(--amber); font-variant-numeric: tabular-nums; }   /* wie Sterne & Nav-Unterstrich */
.a-datum { margin-left: auto; font-size: 0.75rem; font-weight: 700; color: var(--ink-muted); opacity: .7; }
.a-text { margin: 0; font-size: 0.93rem; line-height: 1.45; letter-spacing: 0.01em; }

/* ---------- Rechts: die Karte zum Umdrehen ---------- */
.karte-buehne { perspective: 1400px; }
.karte { position: relative; outline: none; }
.karte.verdeckt { cursor: pointer; animation: wackeln 4s ease-in-out .35s infinite; transform-origin: 50% 85%; }
.karte.verdeckt:hover, .karte.verdeckt:focus-visible { animation-play-state: paused; }
.karte.verdeckt:focus-visible .hinten { box-shadow: 0 0 0 4px color-mix(in srgb, var(--df) 55%, transparent), 0 18px 50px rgba(0,0,0,.25); }
@keyframes wackeln {          /* wackelt gleich beim Öffnen, dann alle 4 s */
  0% { transform: rotate(0); }
  6% { transform: rotate(-0.8deg); }
  12% { transform: rotate(0.7deg); }
  18% { transform: rotate(-0.35deg); }
  24%, 100% { transform: rotate(0); }
}
.karte-innen {
  display: grid; transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.3, 1.35, .45, 1);
  transform: rotateY(180deg);
}
.karte.offen .karte-innen { transform: rotateY(0); }
.karte.sofort .karte-innen { transition: none; }
.seite { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-height: 470px; }
.hinten { transform: rotateY(180deg); }

/* Rückseite */
.hinten {
  position: relative; overflow: hidden; display: grid; place-items: center;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--df) 32%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--df) 22%, var(--bg-panel)), var(--bg-panel-2));
  border: 1px solid color-mix(in srgb, var(--df) 50%, var(--line));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}
.hinten-muster {
  position: absolute; inset: 0; opacity: .35;
  background:
    repeating-radial-gradient(circle at 50% 45%, transparent 0 38px, color-mix(in srgb, var(--df) 35%, transparent) 38px 39px),
    repeating-linear-gradient(90deg, transparent 0 46px, color-mix(in srgb, var(--df) 18%, transparent) 46px 47px);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 72%);
          mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 72%);
}
.hinten-mitte { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hinten-frage {
  display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; margin-bottom: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 3.6rem; color: var(--df);
  background: color-mix(in srgb, var(--df) 14%, var(--bg-panel));
  border: 2px solid color-mix(in srgb, var(--df) 60%, transparent);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--df) 10%, transparent), 0 10px 30px rgba(0,0,0,.25);
}
.hinten-label { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--df); }
.hinten-titel { margin: 2px 0 8px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: 0.02em; }
.hinten-tipp { margin: 0; font-size: 0.9rem; color: var(--ink-muted); }

/* Vorderseite (der Fakt) — Erde oben, Text darunter */
.fakt-tag {
  position: absolute; top: 14px; right: 18px; z-index: 1;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--ink-muted); opacity: 0.85; font-variant-numeric: tabular-nums;
}
.fakt {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--df) 16%, transparent), transparent 60%),
    var(--bg-panel);
  border: 1px solid color-mix(in srgb, var(--df) 35%, var(--line));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}
:root[data-theme="light"] .fakt, :root[data-theme="light"] .hinten { box-shadow: 0 14px 40px rgba(60, 45, 20, 0.12); }
.fakt-bild {
  position: relative; display: grid; place-items: center; min-height: 240px;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--df) 34%, transparent), transparent 58%),
              color-mix(in srgb, var(--df) 10%, var(--bg-panel-2));
  border-bottom: 1px solid color-mix(in srgb, var(--df) 25%, var(--line));
}
.globus-box { position: relative; width: 170px; height: 170px; }
.globus { display: block; width: 100%; height: 100%; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35)); }

.fakt-funke { position: absolute; color: var(--amber); font-size: 1rem; animation: funkeln 2.4s ease-in-out infinite; }
.f1 { top: 20%; left: 26%; } .f2 { top: 28%; right: 24%; animation-delay: .8s; font-size: .8rem; } .f3 { bottom: 20%; left: 32%; animation-delay: 1.6s; font-size: .7rem; }
@keyframes funkeln { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }

.fakt-inhalt { flex: 1; padding: 28px 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }   /* Überschrift + Text zusammen mittig */
.fakt-label { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 28px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--df); }
.fakt-label { margin: -16px 0 16px; }   /* etwas höher über dem Text (Text bleibt, wo er ist) */
.fakt-titel { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.15; text-wrap: balance; }

.skelett { display: flex; flex-direction: column; gap: 9px; }
.skelett i {
  display: block; height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ink-muted) 16%, transparent) 0%,
              color-mix(in srgb, var(--ink-muted) 30%, transparent) 50%, color-mix(in srgb, var(--ink-muted) 16%, transparent) 100%);
  background-size: 200% 100%; animation: schimmer 1.8s linear infinite;
}
.skelett i.kurz { width: 55%; }
@keyframes schimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }

.fakt:not(.platzhalter) .nur-platzhalter { display: none; }
.fakt:not(.platzhalter) .fakt-titel {
  font-family: var(--font-body); font-weight: 400;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem); line-height: 1.55; letter-spacing: 0.025em; text-wrap: pretty;
}
.fakt:not(.platzhalter) .fakt-titel.lang { font-size: clamp(1.05rem, 2.4vw, 1.25rem); }
.fakt-fuss { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { padding: 4px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; background: var(--bg-panel-2); border: 1px solid var(--line); color: var(--ink-muted); }
.chip.bald { background: var(--amber); border-color: transparent; color: #1e1b34; }

/* ---------- Großer Bildschirm: Raster füllt die Seite bis unten ---------- */
@media (min-width: 761px) {
  .df { display: flex; flex-direction: column; padding-top: clamp(28px, 6.5vh, 72px); padding-bottom: clamp(28px, 6.5vh, 72px); }
  .df-raster { flex: 1; min-height: 470px; max-height: 870px; }
  .df .seite { min-height: 420px; }
  .karte-buehne, .karte { display: flex; flex-direction: column; }
  .karte, .karte-innen { flex: 1; }
  .df .fakt-bild { flex: 0 0 auto; min-height: clamp(190px, 34vh, 340px); }
  .df .globus-box { width: clamp(140px, 24vh, 250px); height: clamp(140px, 24vh, 250px); }
  .df .fakt-inhalt { padding: 32px 40px; gap: 14px; }
  .df .fakt:not(.platzhalter) .fakt-titel { font-size: clamp(1.25rem, 0.55rem + 1.55vh, 1.75rem); }
  .df .fakt:not(.platzhalter) .fakt-titel.lang { font-size: clamp(1.15rem, 0.5rem + 1.3vh, 1.5rem); }
  .df .hinten-frage { width: clamp(112px, 15vh, 150px); height: clamp(112px, 15vh, 150px); font-size: clamp(3.6rem, 6vh, 4.6rem); }
}

/* Niedrige Laptop-Fenster: Erde etwas kleiner, damit alles ohne Scrollen passt */
@media (min-width: 761px) and (max-height: 760px) {
  .df .fakt-bild { min-height: 170px; }
  .df .globus-box { width: 130px; height: 130px; }
  .df .fakt-inhalt { padding: 22px 36px; }
}

/* ---------- Handy: Karte oben, Liste darunter ---------- */
@media (max-width: 760px) {
  .df { padding: 18px 14px 32px; }
  .df-raster { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 18px; }
  .df-raster > .df-kopf, .df-raster > .archiv, .df-raster > .karte-buehne { grid-column: 1; grid-row: auto; }
  .df-raster > .df-kopf { flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: -4px; }
  .karte-buehne { order: -1; }
  .df-raster > .df-kopf { order: -2; }
  .seite { min-height: 400px; }
  .archiv-innen { position: static; }
  .archiv-liste { max-height: 420px; }
  .fakt-bild { min-height: 190px; }
  .globus-box { width: 140px; height: 140px; }
  .fakt-inhalt { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .karte.verdeckt { animation: none; }
  .karte-innen { transition: none; }
  .fakt-funke, .skelett i { animation: none; }
}
