:root {
  --sand: #f7f1e4;
  --sand-dunkel: #ede2cb;
  --tinte: #3b3429;
  --akzent: #8a6b3f;
  --akzent-hell: #b8915a;
  --karte: #fffdf7;
  --fehler: #9c2f2f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--tinte);
  background: linear-gradient(180deg, #f3ead6 0%, var(--sand) 40%, #efe3c8 100%);
  min-height: 100vh;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 3rem;
}

/* Kopf */
.hero { text-align: center; margin-bottom: 1.8rem; }
.kicker {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--akzent);
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin-bottom: .5rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  margin: 0 0 .6rem;
  color: #4d3f28;
}
.intro { font-size: 1.02rem; line-height: 1.55; max-width: 60ch; margin: 0 auto; }

/* Karten & Formular */
.card {
  background: var(--karte);
  border: 1px solid var(--sand-dunkel);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 10px 30px rgba(90, 70, 40, .08);
  margin-bottom: 1.6rem;
}
fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
legend {
  font-size: 1.18rem;
  font-weight: bold;
  padding: 0;
  margin-bottom: .2rem;
  color: #4d3f28;
}
.untertitel { margin: 0 0 .8rem; font-size: .95rem; color: #6f6350; font-family: "Helvetica Neue", Arial, sans-serif; }
.modus-erklaerung { margin: .55rem 0 0; font-size: .82rem; color: #8b7f6a; font-family: "Helvetica Neue", Arial, sans-serif; }

/* Honeypot: für Menschen unsichtbar, für naive Bots sichtbar */
.hp-falle {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.textfeld {
  width: 100%;
  max-width: 360px;
  border: 1px solid #d8c9a8;
  border-radius: 10px;
  padding: .6rem .85rem;
  font: 1rem Georgia, serif;
  background: #fefcf5;
  color: var(--tinte);
}
.textfeld:focus { outline: 2px solid var(--akzent-hell); }
.feld-hinweis { margin: .45rem 0 0; font-size: .8rem; color: #8b7f6a; font-family: "Helvetica Neue", Arial, sans-serif; }

.optionen { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: .45rem .85rem;
  border: 1px solid #d8c9a8;
  border-radius: 999px;
  background: #fbf6ea;
  font-size: .95rem;
  transition: background .12s, border-color .12s;
}
.chip:hover span { border-color: var(--akzent-hell); }
.chip input:checked + span {
  background: var(--akzent);
  color: #fff;
  border-color: var(--akzent);
}
.chip input:focus-visible + span { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.zaehler-hinweis { margin: .55rem 0 0; font-size: .8rem; color: var(--akzent); font-family: "Helvetica Neue", Arial, sans-serif; }

textarea {
  width: 100%;
  border: 1px solid #d8c9a8;
  border-radius: 10px;
  padding: .7rem .85rem;
  font: 1rem Georgia, serif;
  background: #fefcf5;
  color: var(--tinte);
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--akzent-hell); }
.textarea-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: .45rem; }
.hinweis, #zeichenzaehler { font-size: .8rem; color: #8b7f6a; font-family: "Helvetica Neue", Arial, sans-serif; }
#zeichenzaehler { white-space: nowrap; }

.datenschutz-kurz { font-size: .8rem; color: #8b7f6a; margin: .4rem 0 1rem; font-family: "Helvetica Neue", Arial, sans-serif; }

.aktionen { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
button {
  font: 600 .95rem "Helvetica Neue", Arial, sans-serif;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button[type="submit"] {
  background: var(--akzent);
  color: #fff;
  padding: .8rem 1.6rem;
}
button[type="submit"]:hover { background: #7a5e34; }
button[type="submit"]:disabled { opacity: .55; cursor: wait; }
.sekundaer {
  background: transparent;
  border: 1px solid #d8c9a8;
  color: var(--akzent);
  padding: .55rem 1.1rem;
}
.sekundaer:hover { background: #f6edda; }
.linkartig {
  background: none;
  border: 0;
  color: #8b7f6a;
  text-decoration: underline;
  font-weight: normal;
  padding: .4rem;
}
.fehler { color: var(--fehler); font-family: "Helvetica Neue", Arial, sans-serif; margin: 0; }

/* Ergebnis */
.ergebnis-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ergebnis-kopf h2 { margin: 0; color: #4d3f28; }
.demo {
  background: #fbf3e0;
  border: 1px dashed var(--akzent-hell);
  border-radius: 10px;
  padding: .7rem .9rem;
  font-size: .9rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.geschichte { line-height: 1.75; font-size: 1.06rem; }
.geschichte p { margin: 0 0 1.05rem; }
.geschichte blockquote {
  margin: 0 0 1.05rem;
  padding: .7rem 1rem;
  border-left: 3px solid var(--akzent-hell);
  background: #faf4e5;
  font-size: .95rem;
}

.quellen { margin: .4rem 0 1.2rem; border-top: 1px solid var(--sand-dunkel); padding-top: .8rem; }
.quellen summary { cursor: pointer; color: var(--akzent); font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 600; }
.quellen ul { margin: .6rem 0 0; padding-left: 1.2rem; font-size: .9rem; color: #5f5440; }
.szenen-zeile { margin: .6rem 0 0; font-size: .9rem; }
.token-zeile { margin: .5rem 0 0; font-size: .78rem; color: #9a8f7a; font-family: "Helvetica Neue", Arial, sans-serif; }

.sekundaer-zeile { justify-content: space-between; }
.fussnotiz { font-size: .8rem; color: #9a8f7a; font-family: "Helvetica Neue", Arial, sans-serif; margin-top: .6rem; }

.fuss { text-align: center; font-size: .78rem; color: #9a8f7a; font-family: "Helvetica Neue", Arial, sans-serif; }
.fuss a { color: var(--akzent); }
.fuss p { margin: .3rem 0; max-width: 66ch; margin-left: auto; margin-right: auto; }

@media (max-width: 560px) {
  .card { padding: 1.1rem 1rem; }
}

/* Warte-/Ladeanzeige */
.warte { text-align: center; padding: 2.2rem 1.4rem; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 4px solid var(--sand-dunkel);
  border-top-color: var(--akzent);
  animation: drehen 1s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }
.status-titel { font-size: 1.25rem; font-weight: bold; margin: 0 0 .3rem; color: #4d3f28; }
.status-detail { margin: 0 0 .6rem; color: #6f6350; }
.timer { font-family: "Helvetica Neue", Arial, sans-serif; color: var(--akzent); margin: 0 0 .6rem; }
.warte-tipp { font-size: .85rem; color: #8b7f6a; font-family: "Helvetica Neue", Arial, sans-serif; max-width: 48ch; margin: 0 auto; }

/* "Geschichte wird geschrieben" + Tipp-Effekt */
.schreib-status { font-family: "Helvetica Neue", Arial, sans-serif; font-style: italic; color: #8b7f6a; margin: .3rem 0 .8rem; }
.punkte::after { content: ""; animation: punkte 1.2s steps(4) infinite; display: inline-block; width: 1.4em; text-align: left; }
@keyframes punkte { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
#geschichte.tipp-aktiv { cursor: pointer; }
.geschichte .tippt::after, .geschichte blockquote.tippt::after { content: "▍"; margin-left: 2px; color: var(--akzent); animation: blinken 1s step-start infinite; }
@keyframes blinken { 50% { opacity: 0; } }
.hinweis-skip { font-size: .8rem; color: #9a8f7a; font-family: "Helvetica Neue", Arial, sans-serif; margin: .2rem 0 .6rem; }
