/* ==========================================================================
   Farben & Schriften – hier anpassen
   (Keine externen Schriften = keine Google-Fonts-DSGVO-Probleme)
   ========================================================================== */
:root {
  --bg: #faf8f2;           /* Elfenbein */
  --bg-alt: #edf0e6;       /* helles Salbeigrün */
  --card: #ffffff;
  --text: #2f3a31;
  --muted: #6d766b;
  --accent: #4f6b52;       /* Waldgrün */
  --accent-dark: #3a5140;
  --gold: #b8975a;         /* Gold */
  --line: #dde2d2;
  --ok: #5f8f6b;
  --bad: #b5534b;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(40, 60, 45, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }
h2 { font-size: clamp(2rem, 5vw, 2.8rem); text-align: center; margin: 0 0 1.5rem; }
h2::after {
  content: "❦"; display: block; font-size: 1.1rem; color: var(--gold); margin-top: .4rem;
}
h3 { font-size: 1.5rem; }
.center { text-align: center; }
.lead { color: var(--muted); font-size: 1.1rem; }
.small { font-size: .85rem; color: var(--muted); }
.hidden { display: none !important; }

section { padding: 5rem 1rem; max-width: 1100px; margin: 0 auto; }
section.alt { max-width: none; background: var(--bg-alt); }
section.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: .8rem 1.6rem; border-radius: 999px; border: 0; font: inherit; cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--accent-dark); border: 1px solid var(--accent); }
.btn.ghost:hover { background: var(--accent); color: #fff; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.2rem; background: rgba(250, 248, 242, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 1.5rem; color: var(--text); text-decoration: none; }
nav a { color: var(--text); text-decoration: none; margin-left: 1.3rem; font-size: .95rem; }
nav a:hover { color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--text); }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column;
    padding: .5rem 0;
  }
  nav.open { display: flex; }
  nav a { margin: 0; padding: .7rem 1.2rem; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 60px); max-width: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(184,151,90,.20), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(79,107,82,.16), transparent 60%);
}
.eyebrow { letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-size: .85rem; margin: 0; }
.hero h1 { font-size: clamp(3rem, 11vw, 6.5rem); margin: .2rem 0; }
.hero-date { font-family: var(--serif); font-size: 1.6rem; margin: 0; }
.hero-place { color: var(--muted); margin: .2rem 0 2rem; }
.hero-text { max-width: 560px; margin: 2rem auto; }

.countdown { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.countdown div {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 78px; padding: .8rem .6rem;
}
.countdown b { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1; }
.countdown span { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ---------- Steckbrief ---------- */
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.profile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; text-align: center; }
.profile .avatar {
  width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 1rem; object-fit: cover;
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 4rem; color: var(--accent); border: 4px solid var(--bg-alt);
}
.profile h3 { margin: .2rem 0 .2rem; font-size: 2rem; }
.profile .age { margin: 0; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.profile .motto { margin: .6rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--muted); }

/* Fragenkatalog */
.qa { max-width: 860px; margin: 0 auto 3.5rem; display: grid; gap: .8rem; }
.qa-cat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.qa-cat summary {
  cursor: pointer; list-style: none; padding: 1rem 1.3rem; font-family: var(--serif); font-size: 1.4rem;
  display: flex; align-items: center; gap: .6rem;
}
.qa-cat summary::-webkit-details-marker { display: none; }
.qa-cat summary small { margin-left: auto; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.qa-cat summary::after { content: "+"; color: var(--gold); font-size: 1.6rem; line-height: 1; margin-left: .6rem; }
.qa-cat[open] summary::after { content: "–"; }
.qa-cat[open] summary { border-bottom: 1px solid var(--line); }
.qa-head, .qa-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: .4rem 1rem; padding: .6rem 1.3rem; }
.qa-head b { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); font-weight: 600; }
.qa-row { border-top: 1px solid var(--line); align-items: baseline; }
.qa-row:nth-child(odd) { background: #fcfbf7; }
.qa-q { color: var(--muted); font-size: .92rem; }
.qa-row.same .qa-a::after { content: " 💚"; font-size: .8rem; }

@media (max-width: 600px) {
  .qa-head { display: none; }
  .qa-cat summary { font-size: 1.2rem; padding: .9rem 1rem; }
  .qa-cat summary small { white-space: nowrap; }
  .qa-row { grid-template-columns: 1fr 1fr; }
  .qa-q { grid-column: 1 / -1; font-weight: 600; color: var(--text); }
  .qa-a::before { content: attr(data-who) ": "; display: block; color: var(--accent); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
}

.story { list-style: none; padding: 0; max-width: 640px; margin: 0 auto; }
.story li { display: flex; gap: 1.2rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.story b { font-family: var(--serif); font-size: 1.4rem; color: var(--accent); min-width: 60px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; max-width: 680px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 92px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 70px 44px 1fr; align-items: start; gap: 0 .8rem; padding: 1rem 0; }
.timeline time { font-family: var(--serif); font-size: 1.4rem; text-align: right; padding-top: .3rem; }
.timeline .dot {
  width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; position: relative; z-index: 1;
}
.timeline h3 { margin: .2rem 0 0; font-size: 1.35rem; }
.timeline p { margin: .1rem 0 0; color: var(--muted); }
.timeline li.now .dot { outline: 3px solid var(--accent); }

/* ---------- Anfahrt ---------- */
.nav-links { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 380px; background: var(--bg-alt); }
.map-wrap iframe, #map { width: 100%; height: 100%; border: 0; }
.map-pin { font-size: 30px; line-height: 36px; text-align: center; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.map-toggle { display: flex; border-radius: 999px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.map-toggle button { font: inherit; font-size: .85rem; border: 0; padding: .45rem .9rem; background: #fff; color: var(--text); cursor: pointer; }
.map-toggle button.on { background: var(--accent); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.card h3 { margin: 0 0 .4rem; font-size: 1.3rem; color: var(--accent-dark); }
.card p { margin: 0; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab {
  font: inherit; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent); background: transparent; color: var(--accent-dark);
}
.tab.active, .tab:hover { background: var(--accent); color: #fff; }

/* ---------- Umfragen ---------- */
.form-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; max-width: 820px; margin: 0 auto; }
.form-box p { text-align: center; margin-top: 0; }
.form-box iframe { width: 100%; height: 720px; border: 0; border-radius: 8px; }
.placeholder { border: 2px dashed var(--line); border-radius: 10px; padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* ---------- Stammbaum (CSS-Baum) ---------- */
#trees { display: grid; gap: 3rem; }
.tree-side { min-width: 0; }
.tree-side h3 { text-align: center; margin: 0 0 1rem; color: var(--accent-dark); }
.tree { overflow-x: auto; padding-bottom: 1rem; }
.tree ul { padding-top: 20px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.tree li { list-style: none; text-align: center; position: relative; padding: 20px 6px 0; }
.tree li::before, .tree li::after {
  content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 20px; border-top: 2px solid var(--line);
}
.tree li::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 8px 0 0; }
.tree li:first-child::after { border-radius: 8px 0 0 0; }
.tree ul ul::before { content: ""; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--line); height: 20px; }
.tree > ul { padding-top: 0; }
.person {
  display: inline-block; background: var(--card); box-shadow: var(--shadow); border-radius: 10px;
  padding: .5rem .9rem; white-space: nowrap; font-size: .95rem;
}
.person .amp { color: var(--gold); margin: 0 .3rem; }
.person.highlight { background: var(--accent); color: #fff; font-weight: 600; outline: 2px solid var(--gold); outline-offset: 2px; }
.person.highlight .amp { color: #fff; }

/* ---------- Spiele ---------- */
.game { max-width: 640px; margin: 0 auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.quiz-q { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 1rem; }
.quiz-progress { color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.quiz-answers { display: grid; gap: .6rem; }
.quiz-answers button {
  font: inherit; text-align: left; padding: .8rem 1rem; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg);
}
.quiz-answers button:hover:not(:disabled) { border-color: var(--accent); }
.quiz-answers button.right { background: var(--ok); color: #fff; border-color: var(--ok); }
.quiz-answers button.wrong { background: var(--bad); color: #fff; border-color: var(--bad); }
.result { text-align: center; }
.result .big { font-family: var(--serif); font-size: 3rem; margin: 0; }

.memory-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; color: var(--muted); }
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; max-width: 420px; margin: 0 auto; }
.mem-card {
  aspect-ratio: 1; border-radius: 10px; border: 0; cursor: pointer; font-size: clamp(1.6rem, 7vw, 2.4rem);
  background: var(--accent); color: transparent; transition: transform .25s, background .25s;
}
.mem-card::before { content: "♥"; color: rgba(255,255,255,.5); font-size: 1.2rem; }
.mem-card.open, .mem-card.done { background: var(--bg-alt); color: inherit; transform: rotateY(180deg); }
.mem-card.open::before, .mem-card.done::before { content: none; }
.mem-card.done { opacity: .6; cursor: default; }
.mem-card span { display: inline-block; transform: rotateY(180deg); }

/* ---------- Flatter-Spiel ---------- */
.game.game-wide { max-width: 860px; }
.fl-intro { margin-top: 0; }
.fl-layout { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 1.5rem; justify-content: center; align-items: start; }
.fl-wrap { position: relative; width: 100%; max-width: 380px; aspect-ratio: 2 / 3; margin: 0 auto; border-radius: 10px; overflow: hidden; border: 4px solid #2f3a31; }
.fl-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.fl-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .55rem; padding: 1.2rem; text-align: center; background: rgba(20, 30, 22, .72); color: #fff;
}
.fl-overlay h3 { margin: 0 0 .4rem; font-family: "Courier New", monospace; font-weight: 900; font-size: 1.7rem; color: #ffd447; text-shadow: 3px 3px 0 #1b1b1b; }
.fl-overlay label, .fl-label { font-size: .85rem; margin: .3rem 0 0; opacity: .9; }
.fl-overlay input { font: inherit; width: 100%; max-width: 260px; padding: .6rem .8rem; border-radius: 8px; border: 2px solid var(--gold); text-align: center; }
.fl-overlay .btn.ghost { color: #fff; border-color: #fff; }
.fl-chars { display: flex; gap: .8rem; }
.fl-char {
  font: inherit; color: #fff; background: rgba(255,255,255,.08); border: 2px solid transparent; border-radius: 12px;
  padding: .5rem .8rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.fl-char.on { border-color: #ffd447; background: rgba(255, 212, 71, .15); }
.fl-face { position: relative; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; }
.fl-face b { font-size: 1.6rem; }
.fl-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fl-err { color: #ffb3a8; font-size: .85rem; min-height: 1.2em; margin: 0; }
.fl-big { font-family: "Courier New", monospace; font-weight: 900; font-size: 4rem; line-height: 1; margin: 0; color: #ffd447; text-shadow: 4px 4px 0 #1b1b1b; }
.fl-board h3 { margin-top: 0; }
.fl-board ol { list-style: none; padding: 0; margin: 0 0 .8rem; }
.fl-board li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .5rem; padding: .45rem .3rem; border-bottom: 1px solid var(--line); }
.fl-board li.small { display: block; }
.fl-board li.me { background: var(--bg-alt); font-weight: 600; }
.fl-board .sc { font-family: "Courier New", monospace; font-weight: 900; color: var(--accent-dark); }
.fl-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .fl-layout { grid-template-columns: 1fr; }
  .game.game-wide { padding: 1rem; }
}

/* ---------- Footer ---------- */
footer { text-align: center; padding: 4rem 1rem 3rem; border-top: 1px solid var(--line); }
footer h3 { margin-top: 0; }
.contacts { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.contacts div span { display: block; color: var(--muted); font-size: .85rem; }
