:root {
  --grund: #16181c;
  --tafel: rgba(24, 26, 30, 0.94);
  --rand: rgba(214, 188, 138, 0.22);
  --schrift: #e8e3d8;
  --schrift-leise: #9d978a;
  --gold: #d6bc8a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--grund);
  color: var(--schrift);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  overflow: hidden;
}

#karte {
  position: absolute;
  inset: 0;
  background: var(--grund);
}

/* Beim Hineinzoomen ueber die native Aufloesung hinaus lieber harte Blockkanten
   als weichgerechnete Pixel - das Bild hat nun mal nur einen Pixel je Block. */
.leaflet-tile { image-rendering: pixelated; }

.leaflet-container { background: var(--grund); }

/* ---- Kopf ---------------------------------------------------------------- */
.kopf {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 14px 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(12,13,16,0.75), rgba(12,13,16,0));
}
.kopf-name {
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.kopf-zusatz {
  font-size: 13px;
  color: var(--schrift-leise);
  font-style: italic;
}

/* ---- Seitentafel --------------------------------------------------------- */
.tafel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  z-index: 900;
  width: min(390px, 88vw);
  padding: 56px 28px 32px;
  background: var(--tafel);
  border-right: 1px solid var(--rand);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  animation: herein 0.22s ease-out;
}
.tafel[hidden] { display: none; }
@keyframes herein { from { transform: translateX(-14px); opacity: 0; } }

.tafel-zu {
  position: absolute;
  top: 14px; right: 16px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--schrift-leise);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.tafel-zu:hover { color: var(--schrift); background: rgba(255,255,255,0.06); }

.tafel-marken { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.marke {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--rand);
  border-radius: 3px;
  color: var(--schrift-leise);
}
.marke-art { color: var(--gold); border-color: rgba(214,188,138,0.45); }

.tafel-name {
  margin: 0 0 4px;
  font-size: 30px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.tafel-ort {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--schrift-leise);
  margin-bottom: 18px;
}
.tafel-text { font-size: 15.5px; line-height: 1.62; color: #d9d4c8; }
.tafel-text p { margin: 0 0 14px; }
.tafel-hinweis {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--rand);
  font-size: 12.5px;
  font-style: italic;
  color: var(--schrift-leise);
}

/* ---- Marker -------------------------------------------------------------- */
.punkt {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid rgba(20,22,26,0.85);
  box-shadow: 0 0 0 1px rgba(214,188,138,0.5), 0 2px 6px rgba(0,0,0,0.6);
  transition: transform 0.12s ease-out;
}
.punkt-stadt { border-radius: 2px; transform: rotate(45deg); }
.punkt:hover { transform: scale(1.35); }
.punkt-stadt:hover { transform: rotate(45deg) scale(1.35); }

.punkt-schild {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--schrift);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px #000, 0 0 8px #000;
  white-space: nowrap;
}
.leaflet-tooltip-left.punkt-schild::before,
.leaflet-tooltip-right.punkt-schild::before { border: 0; }

/* ---- Spielerpunkte ------------------------------------------------------- */
.spieler {
  fill: #e8d9b0;
  filter: drop-shadow(0 0 5px rgba(232, 217, 176, 0.55));
}

/* ---- Fußzeile ------------------------------------------------------------ */
.fuss {
  position: absolute;
  right: 12px; bottom: 66px;
  z-index: 500;
  pointer-events: none;
  display: flex;
  gap: 8px;
  align-items: center;
}
.ort-spieler[hidden] { display: none; }
.ort-spieler {
  font-family: inherit;
  font-style: italic;
  letter-spacing: 0.02em;
}
.ort {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--schrift-leise);
  background: rgba(18,20,24,0.72);
  border: 1px solid var(--rand);
  border-radius: 3px;
  padding: 4px 9px;
}

.leaflet-control-zoom a {
  background: rgba(18,20,24,0.88);
  color: var(--schrift);
  border-color: var(--rand);
}
.leaflet-control-zoom a:hover { background: rgba(38,41,47,0.95); color: var(--gold); }
.leaflet-control-attribution {
  background: rgba(18,20,24,0.72) !important;
  color: var(--schrift-leise) !important;
  font-family: system-ui, sans-serif;
  font-size: 11px;
}

@media (max-width: 640px) {
  .tafel { top: auto; right: 0; width: 100%; max-height: 58%; border-right: 0; border-top: 1px solid var(--rand); }
  .kopf-zusatz { display: none; }
}
