/* ndr.world – dunkel wie die Unterwelt */
:root {
  --bg: #120d0a; --bg2: #1a130f; --card: #1f1712; --card2: #271d17; --line: #3a2b21;
  --ink: #f4eade; --muted: #b49c88; --magma: #ff7a2f; --magma2: #ffb347; --gold: #ffd27a;
  --sea: #3fb6c8; --sea2: #1d5f73; --land: #6b8f4e;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: radial-gradient(ellipse at 50% -10%, #2a1d14 0, transparent 60%),
    linear-gradient(180deg, transparent 0, transparent 70%, #1a0d07 100%);
  background-attachment: fixed;
}
a { color: var(--magma2); }
a:hover { color: var(--gold); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 850; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
p { margin: 0 0 .9em; }
code { background: var(--card2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--magma); margin-bottom: .5em; }
.lead { font-size: 1.15rem; color: #e6d6c6; max-width: 46em; }

/* Kopf / Fuß */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1160px; margin: 0 auto; padding: 16px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.35rem; font-weight: 800; }
.logo b { color: var(--magma); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; }
.logo:hover .logo-mark { animation: spinlogo 1.2s ease-in-out; }
@keyframes spinlogo { to { transform: rotate(360deg); } }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); background: var(--card2); }
main { max-width: 1160px; margin: 0 auto; padding: 0 20px 40px; }
footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); padding: 26px 20px 40px; font-size: .9rem; }
footer p { margin: .3em 0; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); margin: 0 0 22px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; margin-bottom: 22px; }
.grid2 > .card { margin: 0; }
.teaser { display: block; text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; }
.teaser:hover { transform: translateY(-3px); border-color: var(--magma); color: var(--ink); }
.more { font-weight: 700; text-decoration: none; }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: end; margin-bottom: 16px; }
.pagehead { padding: 26px 0 18px; }
.huge { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 900; line-height: 1; color: var(--sea); margin: .1em 0 .2em; }
.prose { max-width: 50em; }
.prose h2 { margin-top: 1.2em; }
.prose li { margin-bottom: .3em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, var(--magma2), var(--magma)); color: #1a0d07; font-weight: 800; font-size: 1rem;
  padding: 11px 20px; border-radius: 999px; box-shadow: 0 4px 0 #9c3a10; transition: transform .1s, box-shadow .1s;
  font-family: inherit;
}
.btn:hover { color: #1a0d07; transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #9c3a10; }
.btn.alt { background: var(--card2); color: var(--ink); box-shadow: 0 4px 0 #0c0806; border: 1px solid var(--line); }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin: 1em 0 0; }
.btnrow.center { justify-content: center; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 26px 0 34px; }
.hero h1 span { color: var(--magma); text-decoration: underline wavy var(--sea) 3px; text-underline-offset: 8px; }
.hero-svg { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: var(--shadow); }
.hero-svg * { transform-box: fill-box; }
.h-train { animation: train 7s linear infinite; transform-box: view-box; }
@keyframes train { from { transform: translateX(0); } to { transform: translateX(520px); } }
.h-drill { animation: drill 5s ease-in-out infinite; transform-box: view-box; }
@keyframes drill { 0%, 100% { transform: translateY(-40px); } 55% { transform: translateY(18px); } }
.h-bit { animation: buzz .09s linear infinite alternate; }
@keyframes buzz { from { transform: translateX(-.9px); } to { transform: translateX(.9px); } }
.h-hole { transform-origin: top; animation: hole 5s ease-in-out infinite; }
@keyframes hole { 0%, 100% { transform: scaleY(.84); } 55% { transform: scaleY(1.06); } }
.h-magma { animation: magma 3s ease-in-out infinite; }
@keyframes magma { 50% { transform: translateY(-4px); filter: brightness(1.2); } }
.h-bubble { animation: bubble 2.4s ease-out infinite; opacity: 0; }
.h-bubble.b2 { animation-delay: .8s; } .h-bubble.b3 { animation-delay: 1.6s; }
@keyframes bubble { 0% { opacity: 0; transform: translateY(0) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px) scale(1.2); } }
.h-bat { animation: bat 4s ease-in-out infinite; transform-box: view-box; }
@keyframes bat { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-14px, -6px); } 50% { transform: translate(6px, 4px); } 75% { transform: translate(16px, -4px); } }
.h-drop { animation: drop 2.2s ease-in infinite; }
@keyframes drop { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 80% { opacity: 1; transform: translateY(30px); } 100% { opacity: 0; transform: translateY(32px); } }
.h-stars circle { animation: twinkle 3s ease-in-out infinite; }
.h-stars circle:nth-child(2n) { animation-delay: 1.4s; }
@keyframes twinkle { 50% { opacity: .3; } }

/* Weltkarte */
.mapwrap { position: relative; }
.worldmap { width: 100%; height: auto; display: block; border-radius: 14px; }
.worldmap .ocean { fill: #0f2a33; }
.worldmap .grat path { stroke: #1d4250; stroke-width: .6; fill: none; }
.worldmap .grat .eq { stroke: #2a5a6a; stroke-dasharray: 4 3; }
.worldmap .landpath { fill: #6d5440; stroke: #8a6c52; stroke-width: .4; }
.worldmap .mirror[hidden] { display: none; }
.worldmap .mirror use { fill: var(--magma); fill-opacity: .38; stroke: var(--magma2); stroke-width: .5; stroke-opacity: .8; }
#map { cursor: crosshair; }
#map:focus { outline: 2px solid var(--magma); outline-offset: 3px; }
.pin circle:last-child { stroke: #120d0a; stroke-width: 2; }
.pin.me circle { fill: var(--magma); }
.pin.anti circle { fill: var(--sea); }
.pin .pulse { opacity: .5; animation: pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* Werkzeug */
.tool-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tool-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 6px 0 16px; }
.place-search { position: relative; flex: 1 1 280px; }
input[type=search], .search input {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 18px;
}
input:focus { outline: 2px solid var(--magma); outline-offset: 1px; }
.suggest {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--card2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.suggest li { padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected] { background: #3a2b21; }
.toggle { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); cursor: pointer; font-size: .95rem; }
.toggle input { accent-color: var(--magma); width: 18px; height: 18px; }
.result { margin-top: 20px; min-height: 60px; }
.res-grid { display: grid; grid-template-columns: 1fr 90px 1.3fr; gap: 16px; align-items: stretch; }
.res-me, .res-anti { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.res-anti.sea { border-color: var(--sea2); background: linear-gradient(180deg, #10262d, var(--bg2)); }
.res-anti.land { border-color: #4b6436; background: linear-gradient(180deg, #1c2614, var(--bg2)); }
.res-name { font-size: 1.6rem; font-weight: 800; margin: 0 0 .2em; }
.res-arrow { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; font-weight: 700; }
.res-arrow i { display: block; width: 4px; flex: 1; margin-top: 6px; border-radius: 4px;
  background: repeating-linear-gradient(180deg, var(--magma) 0 8px, transparent 8px 14px); background-size: 4px 28px; animation: flow 1s linear infinite; }
@keyframes flow { to { background-position: 0 28px; } }
.anti-big { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 850; margin: .1em 0 .1em; line-height: 1.15; }
.anti-big.sea { color: var(--sea); }
.anti-sub { font-size: 1.15rem; color: #e6d6c6; }
.facts { padding-left: 1.1em; margin: .6em 0; }
.facts li { margin-bottom: .25em; }
.joke { font-style: italic; color: var(--gold); margin: .6em 0 0; }
.travel { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 10px; }
.travel div { background: var(--card2); border-radius: 14px; padding: 12px 14px; }
.travel b { display: block; font-size: 1.25rem; color: var(--magma2); }
.travel span { color: var(--muted); font-size: .88rem; }

/* Teaser */
.pairs { list-style: none; padding: 0; margin: 0 0 1em; }
.pairs li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.pairs .arrow { color: var(--magma); font-weight: 900; margin: 0 6px; }

/* Suche (Kreise) */
.search label { display: block; font-weight: 700; margin-bottom: 6px; }
.search-row { display: flex; gap: 10px; }

/* Tabellen */
.tablewrap { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; font-size: .96rem; }
.rank th, .rank td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rank th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.rank .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank .sub { display: block; color: var(--muted); font-size: .8rem; }
.rank tr.cur td { background: #3a2216; }
.rank td.t { color: var(--gold); font-size: .9rem; }
.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th.asc::after { content: " ▲"; } .sortable th.desc::after { content: " ▼"; }
.tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.tops .card { margin: 0; padding: 18px; }
.mini ol { margin: 0; padding-left: 1.3em; }
.mini li { margin-bottom: .2em; }

/* Kreisseite */
.anti .btn { margin-top: 10px; }
.earth { width: 100%; max-width: 520px; height: auto; display: block; margin: 10px auto 0; }
.earth.small { max-width: 420px; }
.earth-pod { animation: pod 6s ease-in-out infinite; transform-box: view-box; }
@keyframes pod { 0%, 8% { transform: translateY(0); } 50%, 58% { transform: translateY(280px); } 100% { transform: translateY(0); } }
.rankbadge { display: inline-block; background: var(--magma); color: #1a0d07; border-radius: 12px; padding: 0 10px; margin-right: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat .emo { font-size: 1.5rem; }
.stat .v { font-size: 1.6rem; font-weight: 850; }
.stat .n { color: var(--muted); font-size: .9rem; }
.stat .r { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.bar { display: block; height: 6px; background: #2c2019; border-radius: 6px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--magma), var(--gold)); border-radius: 6px; }

/* Tiefen-Skala */
.depths { list-style: none; margin: 0; padding: 0 0 0 8px; position: relative; }
.depths::before { content: ""; position: absolute; left: 118px; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--land), #7a5a3a 20%, #b4482a 60%, var(--magma) 85%, var(--gold)); border-radius: 3px; }
.depth { display: grid; grid-template-columns: 110px 1fr; gap: 30px; padding: 18px 0; position: relative; }
.depth::before { content: ""; position: absolute; left: 110px; top: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--magma); }
.depth.water::before { border-color: var(--sea); }
.depth.cave::before { border-color: #a08c7a; }
.depth.core::before { border-color: var(--gold); background: var(--magma); }
.depth .d { font-weight: 850; font-variant-numeric: tabular-nums; text-align: right; color: var(--magma2); padding-top: 2px; }
.depth.water .d { color: var(--sea); }
.depth h3 { font-size: 1.15rem; margin-bottom: .25em; }
.depth p { margin: 0; color: #e0cfbf; }
.depthmeter {
  position: fixed; right: 18px; bottom: 18px; z-index: 20; background: var(--card2); border: 1px solid var(--magma);
  border-radius: 999px; padding: 8px 16px; font-weight: 800; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px);
  transition: opacity .25s, transform .25s; pointer-events: none;
}
.depthmeter.on { opacity: 1; transform: none; }
.depthmeter span { color: var(--magma); }

/* 404 */
.fallback { text-align: center; padding: 70px 0; }
.fallback .btnrow { justify-content: center; }
.fallback .lead { margin: 0 auto 1em; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg);
  padding: 10px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); animation: toast .25s ease-out;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (max-width: 860px) {
  .hero, .split { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
  .res-arrow { flex-direction: row; gap: 10px; min-height: 40px; }
  .res-arrow i { width: auto; height: 4px; flex: 1; margin: 0;
    background: repeating-linear-gradient(90deg, var(--magma) 0 8px, transparent 8px 14px); background-size: 28px 4px; animation: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .card { padding: 18px; border-radius: 16px; }
  main, .top { padding-left: 16px; padding-right: 16px; }
  .depths::before { left: 84px; }
  .depth { grid-template-columns: 76px 1fr; gap: 28px; }
  .depth::before { left: 76px; }
  .depth .d { font-size: .9rem; }
  .search-row { flex-direction: column; }
}

/* Sprachen (Dropdown) */
.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card2);
  color: var(--ink); font-weight: 700; font-size: .9rem;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border: solid var(--muted);
  border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.langs[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.langs summary:hover, .langs[open] summary { border-color: var(--magma); }
.langs summary:focus-visible { outline: 2px solid var(--magma); outline-offset: 2px; }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 180px; margin: 0; padding: 6px;
  list-style: none; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.langs li a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--ink);
  text-decoration: none; font-size: .95rem; }
.langs li a b { display: inline-block; min-width: 26px; font-size: .75rem; color: var(--muted); letter-spacing: .05em; }
.langs li a:hover { background: #3a2b21; }
.langs li a[aria-current] { background: var(--magma); color: #1a0d07; }
.langs li a[aria-current] b { color: #1a0d07; }
@media (max-width: 860px) {
  .top { position: relative; padding-right: 96px; }
  .top .langs { position: absolute; top: 18px; right: 16px; }
}

/* Länder-/Stadtseiten */
.chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: .95rem; }
.chips a:hover { border-color: var(--magma); color: var(--gold); }
.pairs.cols { columns: 2 300px; column-gap: 28px; }
.pairs.cols li { break-inside: avoid; }
.pairs a { color: var(--ink); text-decoration: none; }
.pairs a:hover { color: var(--gold); }
.huge.small-huge { font-size: clamp(2.6rem, 7vw, 4.2rem); }
.sea-line { color: #cfe9ee; }
.anti-big a { color: inherit; text-decoration: none; }
.anti-big a:hover { text-decoration: underline; }
