/* ==========================================================================
   Witch Town RP — zentrales Stylesheet
   Farbschema, Typografie und alle Komponenten der Infoseite.
   ========================================================================== */

:root {
  /* Farben */
  --bg: #0b0812;
  --bg-soft: #120d1d;
  --bg-card: #171126;
  --bg-card-hover: #1d1531;
  --border: #2a2140;
  --border-glow: #4c3a75;

  --violet: #a855f7;
  --violet-deep: #7c3aed;
  --violet-soft: #c4a5f5;
  --green: #6ee7a0;
  --gold: #e8c56b;
  --red: #f87171;

  --text: #e9e4f5;
  --text-dim: #a79fc0;
  --text-faint: #6f668a;

  /* Typografie */
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --max-width: 1140px;
  --radius: 14px;
  --nav-height: 72px;
}

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

/* Das hidden-Attribut muss immer gewinnen — sonst hebelt eine
   Regel wie "display: flex" das Verstecken aus. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Sternenhimmel-Hintergrund (rein dekorativ, fix hinter allem) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 41% 32%, rgba(196,165,245,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 57% 76%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 12%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 48%, rgba(110,231,160,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 84%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 26%, rgba(232,197,107,.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 88%, rgba(255,255,255,.3) 50%, transparent 51%),
    var(--bg);
}

/* Violetter Nebelschleier oben */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,58,237,.18), transparent 65%),
    radial-gradient(ellipse 50% 40% at 90% 110%, rgba(110,231,160,.06), transparent 60%);
}

::selection { background: rgba(168,85,247,.4); }

a { color: var(--violet-soft); text-decoration: none; }
a:hover { color: var(--violet); }

img { max-width: 100%; display: block; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(11,8,18,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: var(--text);
  white-space: nowrap;
}
.nav-brand:hover { color: var(--text); }
.nav-brand .logo { width: 34px; height: 34px; flex-shrink: 0; }
.nav-brand em {
  font-style: normal;
  color: var(--violet);
  text-shadow: 0 0 18px rgba(168,85,247,.6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(168,85,247,.1); }
.nav-links a.active {
  color: var(--violet-soft);
  background: rgba(168,85,247,.14);
}

.nav-cta {
  padding: 9px 18px !important;
  background: linear-gradient(135deg, var(--violet-deep), var(--violet));
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600 !important;
  box-shadow: 0 0 20px rgba(168,85,247,.35);
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--violet-deep), var(--violet)) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(168,85,247,.55);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px; height: 42px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
}

/* Ab hier ins Klapp-Menü: mit acht Kapiteln wird die Leiste
   sonst schon knapp über 1000 px zu eng. */
@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: rgba(11,8,18,.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 8px; }
}

/* ==========================================================================
   Seitengerüst
   ========================================================================== */

main { padding-top: var(--nav-height); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* Seitenkopf für Unterseiten */
.page-head {
  padding: 84px 0 48px;
  text-align: center;
  position: relative;
}
.page-head .kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-shadow: 0 0 40px rgba(168,85,247,.35);
}
.page-head p.lead {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 1.06rem;
}

h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
p.section-sub {
  color: var(--text-dim);
  margin-bottom: 36px;
  max-width: 640px;
}

/* ==========================================================================
   Hero (Startseite)
   ========================================================================== */

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 72px 24px;
  position: relative;
}

.hero .moon {
  width: 120px;
  height: 120px;
  margin-bottom: 28px;
  filter: drop-shadow(0 0 40px rgba(232,197,107,.35));
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.15;
}
.hero h1 em {
  font-style: normal;
  color: var(--violet);
  text-shadow: 0 0 50px rgba(168,85,247,.7);
}

.hero .tagline {
  margin-top: 18px;
  max-width: 620px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet-deep), var(--violet));
  color: #fff;
  box-shadow: 0 0 24px rgba(168,85,247,.4);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(168,85,247,.6);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-glow);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--violet);
  background: rgba(168,85,247,.08);
  transform: translateY(-2px);
}

.hero-stats {
  margin-top: 64px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(232,197,107,.4);
}
.hero-stats .stat span {
  font-size: .85rem;
  color: var(--text-faint);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 1.4rem;
  animation: float 2.5s ease-in-out infinite;
}

/* ==========================================================================
   Karten & Grids
   ========================================================================== */

.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 14px 40px rgba(0,0,0,.4), 0 0 30px rgba(124,58,237,.12);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.25);
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .03em;
  margin-bottom: 10px;
}
.card p { color: var(--text-dim); font-size: .95rem; }

a.card { display: block; color: var(--text); }
a.card:hover { color: var(--text); }
a.card .card-link {
  margin-top: 16px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--violet-soft);
  display: inline-block;
}

/* ==========================================================================
   Regeln
   ========================================================================== */

.rules-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 920px) { .rules-layout { grid-template-columns: 1fr; } }

.rules-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
@media (max-width: 920px) { .rules-toc { position: static; } }
.rules-toc h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.rules-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: .9rem;
  color: var(--text-dim);
}
.rules-toc a:hover { color: var(--text); background: rgba(168,85,247,.08); }
.rules-toc a.active { color: var(--violet-soft); background: rgba(168,85,247,.14); }

.rule-section { margin-bottom: 56px; }
.rule-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .03em;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.rule-section h2 .num {
  font-size: .85rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--violet);
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.3);
  border-radius: 8px;
  padding: 4px 10px;
  flex-shrink: 0;
}

.rule {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(42,33,64,.6);
}
.rule:last-child { border-bottom: none; }
.rule .rule-num {
  flex-shrink: 0;
  font-weight: 700;
  font-size: .85rem;
  color: var(--text-faint);
  padding-top: 3px;
  min-width: 42px;
}
.rule .rule-body b { color: var(--text); display: block; margin-bottom: 4px; }
.rule .rule-body p { color: var(--text-dim); font-size: .95rem; }

.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  font-size: .95rem;
}
.notice .n-icon { flex-shrink: 0; font-size: 1.2rem; }
.notice-warn {
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.3);
  color: #fca5a5;
}
.notice-info {
  background: rgba(168,85,247,.08);
  border: 1px solid rgba(168,85,247,.3);
  color: var(--violet-soft);
}
.notice-tip {
  background: rgba(110,231,160,.07);
  border: 1px solid rgba(110,231,160,.28);
  color: var(--green);
}

/* ==========================================================================
   Schritt-für-Schritt (Einstieg)
   ========================================================================== */

.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--violet);
  background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.35);
  box-shadow: 0 0 18px rgba(168,85,247,.15);
}
.step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.step p { color: var(--text-dim); }
.step code, .inline-code {
  background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: .88em;
  color: var(--violet-soft);
  font-family: "Consolas", monospace;
}
@media (max-width: 620px) {
  .step { grid-template-columns: 1fr; gap: 10px; }
}

/* ==========================================================================
   Lexikon
   ========================================================================== */

.search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto 40px;
}
.search-wrap input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 24px rgba(168,85,247,.25);
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-wrap .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.lexikon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 780px) { .lexikon-grid { grid-template-columns: 1fr; } }

.term {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color .2s;
}
.term:hover { border-color: var(--border-glow); }
.term h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--violet-soft);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.term h3 .tag {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(110,231,160,.1);
  border: 1px solid rgba(110,231,160,.3);
  color: var(--green);
}
.term h3 .tag.verboten {
  background: rgba(248,113,113,.1);
  border-color: rgba(248,113,113,.35);
  color: var(--red);
}
.term p { color: var(--text-dim); font-size: .93rem; }

.no-results {
  text-align: center;
  color: var(--text-faint);
  padding: 48px 0;
  display: none;
}

/* ==========================================================================
   FAQ / Akkordeon
   ========================================================================== */

.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border-glow); }
.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  list-style: none;
  transition: color .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--violet-soft); }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--violet);
  transition: transform .25s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 24px 20px;
  color: var(--text-dim);
  font-size: .96rem;
}

/* ==========================================================================
   Jobs & Fraktionen
   ========================================================================== */

.job-card .badges { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  color: var(--text-dim);
}
.badge.legal { border-color: rgba(110,231,160,.4); color: var(--green); }
.badge.illegal { border-color: rgba(248,113,113,.4); color: var(--red); }
.badge.staat { border-color: rgba(232,197,107,.4); color: var(--gold); }
.badge.whitelist { border-color: rgba(168,85,247,.45); color: var(--violet-soft); }

/* ==========================================================================
   CTA-Banner
   ========================================================================== */

.cta-banner {
  text-align: center;
  padding: 64px 32px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(124,58,237,.25), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border-glow);
  position: relative;
  overflow: hidden;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: .04em;
  margin-bottom: 14px;
}
.cta-banner p {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 28px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: rgba(11,8,18,.6);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; } }

.footer-inner h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: 8px; }
.footer-inner a { color: var(--text-dim); font-size: .92rem; }
.footer-inner a:hover { color: var(--violet-soft); }
.footer-brand p { color: var(--text-dim); font-size: .92rem; max-width: 340px; margin-top: 12px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: .82rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Scroll-Reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .moon, .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Grimoire: Bosse
   ========================================================================== */

.boss-card .boss-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.boss-card .boss-head h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.boss-card:hover { transform: none; }

.skulls {
  font-size: .95rem;
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 4px;
}
.skulls-dim { opacity: .18; filter: grayscale(1); }

.meta-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(42,33,64,.6);
  font-size: .94rem;
  color: var(--text-dim);
}
.meta-row b { color: var(--text); }
.meta-row .meta-icon { flex-shrink: 0; }

/* ==========================================================================
   Grimoire: Rituale
   ========================================================================== */

.ritual-card:hover { transform: none; }
.ritual-card h3 { font-size: 1.2rem; }
.ritual-card .ritual-zweck {
  color: var(--green);
  font-size: .95rem;
  margin-bottom: 14px;
}
.ritual-card h4,
.rezept-card h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-faint);
  margin: 18px 0 8px;
}
.ritual-card ul.zutaten,
.rezept-card ul.zutaten {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ritual-card ul.zutaten li,
.rezept-card ul.zutaten li {
  font-size: .86rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.28);
  color: var(--violet-soft);
}
.ritual-card ol.ablauf {
  padding-left: 20px;
  color: var(--text-dim);
  font-size: .94rem;
}
.ritual-card ol.ablauf li { margin-bottom: 6px; }
.ritual-card ol.ablauf li::marker { color: var(--violet); font-weight: 700; }
.ritual-warnung {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.3);
  color: #fca5a5;
  font-size: .9rem;
}

/* ==========================================================================
   Rezeptbuch (Guarma)
   ========================================================================== */

.rezept-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-chip {
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.filter-chip:hover { color: var(--text); border-color: var(--violet); }
.filter-chip.aktiv {
  background: linear-gradient(135deg, var(--violet-deep), var(--violet));
  border-color: var(--violet);
  color: #fff;
}
/* Hinweis-Banner auf der Guarma-Seite, das zum Rezeptbuch führt */
a.card.rezeptbuch-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-color: var(--border-glow);
}
.rezeptbuch-banner .icon { font-size: 2.4rem; margin: 0; }
.rezeptbuch-banner h3 { margin-bottom: 4px; }
.rezeptbuch-banner p { margin: 0; }
.rezeptbuch-banner .card-link { margin-left: auto; white-space: nowrap; }
@media (max-width: 620px) {
  .rezeptbuch-banner { flex-wrap: wrap; gap: 12px; }
  .rezeptbuch-banner .card-link { margin-left: 0; }
}

.rezept-kopf {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}
.rezept-icon {
  font-size: 2rem;
  line-height: 1.2;
  filter: drop-shadow(0 0 12px rgba(168,85,247,.35));
}
.rezept-kopf h3 { margin-bottom: 6px; }
.rezept-beschreibung { color: var(--text-dim); font-size: .93rem; }
.rezept-hinweis {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(232,197,107,.07);
  border: 1px solid rgba(232,197,107,.28);
  color: var(--gold);
  font-size: .9rem;
}

/* ==========================================================================
   Grimoire: Tagebuch
   ========================================================================== */

.diary-list { max-width: 720px; margin: 0 auto; }

.diary-entry {
  position: relative;
  background:
    linear-gradient(160deg, rgba(232,197,107,.05), transparent 40%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 26px;
}
.diary-entry .diary-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.diary-entry .diary-num {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(232,197,107,.1);
  border: 1px solid rgba(232,197,107,.3);
  border-radius: 999px;
  padding: 4px 12px;
}
.diary-entry h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: .03em;
}
.diary-entry .diary-text {
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: 1.45rem;
  line-height: 1.55;
  color: var(--text);
  opacity: .92;
}
.diary-entry .diary-fundort {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(232,197,107,.25);
  font-size: .88rem;
  color: var(--text-dim);
}

/* Kapitel-Überschriften im Tagebuch */
.diary-kapitel {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .05em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(232,197,107,.3);
  margin: 44px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(232,197,107,.2);
}
.diary-list .diary-kapitel:first-child { margin-top: 0; }

/* Noch nicht abgeschriebene Einträge: kompakt und gedimmt */
.diary-entry.offen {
  padding: 18px 30px;
  margin-bottom: 14px;
  border-left-color: var(--border-glow);
}
.diary-entry.offen .diary-head { margin-bottom: 4px; }
.diary-entry.offen .diary-num {
  color: var(--text-faint);
  background: rgba(111,102,138,.1);
  border-color: rgba(111,102,138,.3);
}
.diary-entry.offen .diary-text.diary-offen {
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--text-faint);
  opacity: 1;
}
.diary-entry.offen .diary-fundort {
  margin-top: 10px;
  padding-top: 10px;
  border-top-color: rgba(111,102,138,.2);
}

/* ==========================================================================
   Grimoire: Serverfunktionen (Guides)
   ========================================================================== */

.guide-kurz {
  color: var(--green);
  font-size: 1rem;
  margin: -8px 0 20px;
}
.guide-abschnitt { margin-bottom: 26px; }
.guide-abschnitt h3 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--violet-soft);
  margin-bottom: 8px;
}
.guide-text { color: var(--text-dim); font-size: .96rem; }
.guide-liste {
  list-style: none;
  padding: 0;
}
.guide-liste li {
  position: relative;
  padding: 8px 0 8px 26px;
  color: var(--text-dim);
  font-size: .96rem;
  border-bottom: 1px solid rgba(42,33,64,.5);
}
.guide-liste li:last-child { border-bottom: none; }
.guide-liste li::before {
  content: "✦";
  position: absolute;
  left: 4px;
  color: var(--violet);
}

/* ==========================================================================
   Karte (Leaflet) — Marker, Legende, Dialog
   ========================================================================== */

.karte-kopf { padding-bottom: 24px; }

.karte-huelle {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto 64px;
  padding: 0 24px;
}
/* Breiter Rahmen im Querformat. Die Karte selbst ist hochkant,
   deshalb füllt sie den Rahmen und man schiebt hoch und runter —
   so bleibt kein leerer Rand sichtbar. Über „Ganze Karte“ sieht
   man sie trotzdem komplett. */
#karte {
  width: 100%;
  height: min(84vh, 940px);
  margin: 0 auto;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  background: #013d83;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  z-index: 0;
}
#karte.setz-modus { cursor: crosshair; }
#karte.setz-modus .leaflet-grab { cursor: crosshair; }
.karte-fehler { padding: 48px; text-align: center; color: var(--text-dim); }

/* Leaflet an das Grimoire-Design anpassen */
.leaflet-container { font-family: var(--font-body); background: #013d83; }
.leaflet-bar a,
.leaflet-control-zoom a {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-glow);
}
.leaflet-bar a:hover { background: var(--bg-card-hover); color: var(--violet-soft); }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-glow);
  box-shadow: 0 12px 36px rgba(0,0,0,.5);
}
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 14px 16px; }
.leaflet-popup-close-button { color: var(--text-faint) !important; }
.leaflet-popup-close-button:hover { color: var(--text) !important; }

/* Marker-Nadel */
.marker-pin-huelle { background: none; border: none; }
.marker-pin {
  width: 20px; height: 20px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin, #a855f7);
  border: 2px solid rgba(255,255,255,.55);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pin, #a855f7) 70%, transparent), 0 3px 8px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.marker-pin-huelle:hover .marker-pin { transform: rotate(-45deg) scale(1.15); }
.marker-pin-inhalt {
  transform: rotate(45deg);
  font-size: .7rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.6));
}

.marker-popup h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 6px;
}
.marker-popup p { color: var(--text-dim); font-size: .92rem; margin: 6px 0 0; }
.marker-intern {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(232,197,107,.4);
  border-radius: 999px;
  padding: 2px 9px;
}
.marker-aktionen {
  display: flex; gap: 14px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.link-knopf {
  background: none; border: none; padding: 0;
  font-family: var(--font-body); font-size: .86rem;
  color: var(--violet-soft); cursor: pointer; text-decoration: underline;
}
.link-knopf:hover { color: var(--violet); }
.link-knopf.gefahr { color: #fca5a5; }
.link-knopf.gefahr:hover { color: var(--red); }

/* Legende */
.karte-legende {
  position: absolute;
  top: 16px; right: 40px;
  /* Unter der Navigationsleiste (z-index 100) bleiben, damit sie
     beim Scrollen nicht darüber wandert. */
  z-index: 20;
  background: rgba(23,17,38,.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 150px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.legende-schalter {
  background: none; border: none; padding: 0;
  font-family: var(--font-body);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint); cursor: pointer;
}
.legende-schalter:hover { color: var(--text); }
.legende-inhalt { margin-top: 10px; display: grid; gap: 7px; }
.karte-legende.zu .legende-inhalt { display: none; }
.legende-zeile {
  display: flex; align-items: center; gap: 8px;
  font-size: .88rem; color: var(--text-dim); cursor: pointer;
}
.legende-zeile:hover { color: var(--text); }
.legende-punkt {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
}
.legende-anzahl { margin-left: auto; color: var(--text-faint); font-size: .8rem; }

/* Admin-Leiste */
.karte-adminleiste {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px;
}
.btn-klein { padding: 10px 20px; font-size: .9rem; }
.karte-hinweis { color: var(--gold); font-size: .92rem; }

/* Dialog */
.dialog-hintergrund {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(5,3,10,.75);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 28px;
  width: min(480px, 100%);
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.dialog h3 {
  font-family: var(--font-display);
  font-size: 1.24rem; color: var(--text);
  margin-bottom: 20px;
}
.feld { display: block; margin-bottom: 16px; }
.feld > span {
  display: block;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 7px;
}
.feld > span i { text-transform: none; letter-spacing: 0; font-style: normal; }
.feld input[type="text"], .feld textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-body); font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.feld input[type="text"]:focus, .feld textarea:focus { border-color: var(--violet); }
.feld textarea { resize: vertical; }
.feld-reihe {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .92rem; color: var(--text-dim); cursor: pointer;
}
.feld-reihe span {
  text-transform: none; letter-spacing: 0; font-size: .92rem;
  color: var(--text-dim); margin: 0;
}
.farbwahl { display: flex; flex-wrap: wrap; gap: 10px; }
.farb-knopf {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--pin);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.farb-knopf:hover { transform: scale(1.12); }
.farb-knopf.aktiv {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(168,85,247,.3);
}
.dialog-fehler {
  color: #fca5a5; font-size: .9rem;
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.3);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }

@media (max-width: 620px) {
  .karte-huelle { padding: 0 12px; }
  /* Näher am Hochformat der Karte, damit man kaum seitlich schieben muss */
  #karte { height: 62vh; }
  .karte-legende { top: 10px; right: 22px; padding: 10px 12px; }
  .dialog { padding: 22px; }
}

/* Knopf „Ganze Karte“ (neben den Zoom-Knöpfen) */
.karte-ganz-knopf {
  width: 30px; height: 30px;
  background: var(--bg-card);
  color: var(--text);
  border: 2px solid rgba(0,0,0,.2);
  border-radius: 4px;
  font-size: 1rem; line-height: 1;
  cursor: pointer;
  display: block;
}
.karte-ganz-knopf:hover { background: var(--bg-card-hover); color: var(--violet-soft); }

/* ==========================================================================
   GTA-Blip-Symbole (aus den FiveM-Docs)
   Die Bilder sind schwarze Symbole auf durchsichtigem Grund —
   invert(1) macht sie weiß, damit sie auf den farbigen Nadeln
   und im dunklen Design gut lesbar sind.
   ========================================================================== */

.blip-bild {
  width: 16px; height: 16px;
  display: inline-block;
  vertical-align: -3px;
  /* Ohne Filter: die Blips sind weiß gefüllt mit schwarzem
     Umriss und damit auf dunklem Grund gut zu erkennen. Kein
     drop-shadow — der bremst bei hunderten Bildern spürbar. */
}
.marker-pin-inhalt .blip-bild { width: 15px; height: 15px; vertical-align: middle; }

/* Auswahlknopf im Marker-Dialog */
.symbolwahl { display: flex; gap: 10px; align-items: stretch; }
.blip-knopf {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  font-family: var(--font-body); font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.blip-knopf:hover { border-color: var(--violet); color: var(--text); }
.symbolwahl input[type="text"] { width: 110px; flex: 0 0 auto; }

/* Gitter mit allen Symbolen */
.dialog-breit { width: min(760px, 100%); }
.blip-suche { max-width: none; margin: 0 0 18px; }
.blip-suche input { padding: 11px 16px 11px 46px; font-size: .95rem; }
.blip-suche .search-icon { left: 16px; }
.blip-gitter {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}
.blip-feld {
  aspect-ratio: 1;
  /* Der Browser überspringt Zellen außerhalb des Sichtbereichs —
     das macht die Auswahl mit ~900 Symbolen erst flüssig. */
  content-visibility: auto;
  contain-intrinsic-size: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(168,85,247,.06);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.blip-feld:hover { background: rgba(168,85,247,.2); border-color: var(--violet); transform: scale(1.08); }
.blip-feld.aktiv { border-color: var(--violet); background: rgba(168,85,247,.28); }
.blip-feld .blip-bild { width: 22px; height: 22px; }
.blip-leer { grid-column: 1 / -1; text-align: center; color: var(--text-faint); padding: 32px 0; }

/* Blip direkt auf der Karte — die Füllung bekommt die Farbe,
   der schwarze Umriss bleibt. Zwei Schichten: unten die Farbe in
   der Form des Blips (Maske), darüber das Original im Modus
   „multiplizieren“ — Weiß lässt die Farbe durch, Schwarz bleibt
   schwarz. */
.blip-marker-huelle { background: none; border: none; }
.blip-marker {
  position: relative;
  width: 22px; height: 22px;
  isolation: isolate;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.85));
  transition: transform .15s;
  cursor: pointer;
}
.blip-flaeche {
  position: absolute; inset: 0;
  background-color: var(--pin, #a855f7);
  -webkit-mask-image: var(--blip);
  mask-image: var(--blip);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.blip-linien {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.blip-marker-huelle:hover .blip-marker { transform: scale(1.2); }

/* Eigene Farbe frei wählen (neben den acht Vorgaben) */
.farb-eigen {
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px dashed var(--border-glow);
  background:
    conic-gradient(from 0deg, #f87171, #e8c56b, #6ee7a0, #5eead4, #60a5fa, #a855f7, #f472b6, #f87171);
  transition: transform .15s, border-color .15s;
}
.farb-eigen:hover { transform: scale(1.12); border-color: var(--violet); }
.farb-eigen input[type="color"] {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
}
.farb-hinweis {
  margin-top: 10px;
  font-size: .84rem;
  color: var(--text-faint);
  font-family: var(--font-body);
}

/* Sprungknopf von einem Boss/Ritual zum Marker auf der Karte */
.karten-knopf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: rgba(168,85,247,.1);
  color: var(--violet-soft);
  font-size: .88rem;
  font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}
.karten-knopf:hover {
  background: rgba(168,85,247,.22);
  border-color: var(--violet);
  color: var(--text);
}
