/* Geldprofil, Edge-Look nach ECA_Branding.md: Schwarz, Gold #bf9743, Montserrat als Fliesstext.
   Keine Schriften von fremden Servern (Datenschutz); Montserrat wird genommen, wenn sie auf dem
   Gerät ist, sonst die Systemschrift. */

:root {
  --grund: #0b0b0b;
  --flaeche: #151412;
  --flaeche-2: #1d1b18;
  --text: #f4f1ea;
  --leise: #a8a39a;
  --linie: #3a3632;
  --gold: #bf9743;
  --gold-hell: #d9bc53;
  --gold-dunkel: #a47e3c;
  --fehler: #e8836b;
  --schrift: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
  --titel: "Open Sauce One", "Open Sauce", Montserrat, "Segoe UI", system-ui, sans-serif;
  --gp-hintergrund: var(--grund);
  --gp-text: var(--text);
  --gp-gold: var(--gold);
  --gp-schrift: var(--schrift);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.65;
}

.kopf, main, .fuss { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.kopf { display: flex; justify-content: flex-start; align-items: center; padding-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--linie); }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); }
.logo img { width: 40px; height: 40px; display: block; }
.logo span { letter-spacing: .22em; text-transform: uppercase; font-size: 14px; font-weight: 600; }
a { color: var(--gold); }
a:hover { color: var(--gold-hell); }
.einladung { margin-bottom: 8px; }
.ort-gewaehlt { background: var(--flaeche); border: 1px solid var(--gold-dunkel); border-radius: 10px; padding: 10px 14px; margin: 10px 0 0; }
.ort-gewaehlt strong { color: var(--gold); }
.recht { padding-bottom: 60px; }
.recht h2 { font-size: 20px; margin-top: 1.8em; }
.recht ul { padding-left: 1.2em; }
.luecke { background: #5a3b12; color: #ffd98a; border-radius: 4px; padding: 0 4px; }
main { padding-top: 28px; padding-bottom: 60px; }
.fuss { color: var(--leise); font-size: 13px; border-top: 1px solid var(--linie); padding-top: 16px; padding-bottom: 40px; }

h1, h2, h3 { font-family: var(--titel); line-height: 1.25; font-weight: 600; }
h1 { font-size: clamp(28px, 6vw, 40px); margin: .2em 0 .5em; }
h2 { font-size: clamp(22px, 4.6vw, 28px); margin: 1.6em 0 .6em; color: var(--gold); }
h3 { font-size: 19px; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.gross { font-size: 19px; }
.klein { font-size: 14px; color: var(--leise); }
.leise { color: var(--leise); }
.ueberzeile { color: var(--gold); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; font-weight: 600; margin: 0; }
strong { color: #fff; }

.ablauf { list-style: none; padding: 0; margin: 1.6em 0; display: grid; gap: 12px; }
.ablauf li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 14px 18px; }
.ablauf strong { display: block; color: var(--gold); }

.knopf {
  appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: #111; font: 600 16px var(--schrift);
  padding: 14px 26px; min-height: 48px;
}
.knopf:hover { background: var(--gold-hell); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf:focus-visible, input:focus-visible, .antwort button:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 2px; }
.leise-knopf { background: transparent; color: var(--text); border: 1px solid var(--linie); }
.leise-knopf:hover { background: var(--flaeche); }
.klein-knopf { padding: 10px 18px; min-height: 44px; font-size: 15px; }
.knoepfe { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.feld { display: block; margin: 0 0 20px; }
.feld > span, .feld > label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input:not([type]), input[type=date], input[type=time] {
  width: 100%; background: var(--flaeche); color: var(--text); border: 1px solid var(--linie);
  border-radius: 10px; padding: 12px 14px; font: 16px var(--schrift); min-height: 48px;
}
.haken { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-weight: 400; cursor: pointer; }
.haken input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.einwilligung { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 14px; font-size: 15px; }
.ort-suche { display: flex; gap: 8px; }
.ort-liste { display: grid; gap: 6px; margin-top: 8px; }
.ort-liste button { text-align: left; background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; font: 15px var(--schrift); cursor: pointer; min-height: 48px; display: flex; flex-direction: column; gap: 2px; }
.ort-liste button strong { color: var(--text); font-size: 16px; }
.ort-liste button span { color: var(--leise); font-size: 13.5px; }
.ort-titel { margin: 8px 0 2px; font-weight: 600; color: var(--gold); }
.ort-liste button:hover, .ort-liste button[aria-selected=true] { border-color: var(--gold); }
.ort-hand { margin-top: 8px; font-size: 14px; color: var(--leise); }
.ort-hand summary { cursor: pointer; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.fehler { color: var(--fehler); font-weight: 600; }

/* Test */
.balken { height: 6px; background: var(--flaeche-2); border-radius: 3px; margin: 10px 0 24px; overflow: hidden; }
#test-balken { height: 100%; width: 0; background: var(--gold); transition: width .3s; }
.einstieg { background: var(--flaeche); border-left: 3px solid var(--gold); padding: 14px 18px; border-radius: 0 12px 12px 0; margin-bottom: 24px; }
.aussage { border-bottom: 1px solid var(--linie); padding: 18px 0 20px; }
.aussage p { font-size: 18px; margin-bottom: 12px; }
.antwort { display: grid; grid-template-columns: repeat(5, 1fr) 1.15fr; gap: 6px; }
.antwort button {
  appearance: none; cursor: pointer; background: var(--flaeche); color: var(--text);
  border: 1px solid var(--linie); border-radius: 10px; padding: 8px 4px; min-height: 52px;
  font: 12.5px/1.25 var(--schrift);
}
.antwort button:hover { border-color: var(--gold-dunkel); }
.antwort button[aria-pressed=true] { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 600; }
.antwort .weissnicht { color: var(--leise); }
.aussage.offen p::after { content: ""; }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .antwort { grid-template-columns: repeat(5, 1fr); }
  .antwort .weissnicht { grid-column: 1 / -1; min-height: 40px; }
  .antwort button { font-size: 11.5px; padding: 6px 2px; }
  .zwei { grid-template-columns: 1fr; }
}

/* Laden */
.laden { text-align: center; padding: 60px 0; }
.kreis { width: 72px; height: 72px; margin: 0 auto 28px; border-radius: 50%; border: 2px solid var(--linie); border-top-color: var(--gold); animation: dreh 2.4s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kreis { animation: none; border-color: var(--gold); } }

/* Ergebnis */
.karte { background: linear-gradient(160deg, #1f1a12, var(--flaeche)); border: 1px solid var(--gold-dunkel); border-radius: 18px; padding: 26px 24px; margin-bottom: 28px; }
.karte .familie { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 600; margin: 0; }
.karte h1 { margin: .15em 0 .1em; }
.karte .untertitel { font-style: italic; color: var(--leise); margin: 0; }
.kern { font-size: 19px; }
.ergebnis blockquote { margin: 1.2em 0; padding: 14px 18px; background: var(--flaeche); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; }
.ergebnis ul { padding-left: 1.2em; }
.ergebnis li { margin-bottom: .4em; }
.ressource { background: #16140f; border: 1px solid var(--gold-dunkel); border-radius: 14px; padding: 16px 18px; }

/* Fortsetzung aus Matrix und Horoskop, direkt im Abschnitt ihres Tests */
.ergaenzung:not(:empty) { border-left: 2px solid var(--gold-dunkel); padding: 2px 0 2px 18px; margin: 1.2em 0 1.6em; }
.ergaenzung.leer, .ergaenzung:empty { border: 0; padding: 0; margin: 0; }
.ergaenzung p:last-child { margin-bottom: 0; }
.typ-marke { color: var(--gold); font-weight: 600; font-size: 14px; letter-spacing: .06em; margin: 1.2em 0 .2em; }
.bilder-titel { margin-top: .1em; }
.trenner { border: 0; border-top: 1px solid var(--linie); margin: 40px 0; }
.bilder { display: grid; gap: 20px; margin: 20px 0 10px; }
.bild-rahmen { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 12px; }
.bild-rahmen h3 { margin: .2em 0 .6em; font-size: 16px; color: var(--gold); }
.claude-text { min-height: 60px; }
.wartet { color: var(--leise); display: flex; gap: 10px; align-items: center; background: var(--flaeche); border-radius: 12px; padding: 14px 16px; }
.wartet::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--linie); border-top-color: var(--gold); animation: dreh 1.6s linear infinite; flex: none; }
.nochmal { margin-top: 10px; }
.ganz-kopf { text-align: center; padding: 20px 0 0; }
.hinweise { font-size: 14px; color: var(--leise); background: var(--flaeche); border-radius: 12px; padding: 12px 16px; }
.hinweise p { margin: 0 0 .4em; }

.feedback { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 22px; margin-top: 40px; }
.feedback textarea { width: 100%; min-height: 96px; background: var(--grund); color: var(--text); border: 1px solid var(--linie); border-radius: 10px; padding: 12px; font: 16px var(--schrift); }
.sterne { display: flex; gap: 8px; flex-wrap: wrap; }
.sterne button { appearance: none; cursor: pointer; min-width: 48px; min-height: 48px; border-radius: 10px; background: var(--grund); color: var(--text); border: 1px solid var(--linie); font: 600 16px var(--schrift); }
.sterne button[aria-pressed=true] { background: var(--gold); color: #111; border-color: var(--gold); }
.aktionen { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* Druck und «Als PDF speichern»: schwarz auf weiss, ruhig gesetzt, mit sauberen Umbrüchen */
@media print {
  @page { size: A4; margin: 16mm 15mm 18mm; }
  :root {
    --grund: #fff; --flaeche: #fff; --flaeche-2: #fff; --text: #1a1a1a; --leise: #555;
    --linie: #c9c2b5; --gold: #6b4f1d; --gold-hell: #6b4f1d; --gold-dunkel: #9b8a6a;
    color-scheme: light;
  }
  body { background: #fff; color: #1a1a1a; font-size: 10.5pt; line-height: 1.55; }
  main, .kopf, .fuss { max-width: none; padding: 0; }
  .fuss, .feedback, .aktionen, .nochmal, .wartet, #s-start, #s-test, #s-laden,
  .gp-m-liste, .radix-punkte, .radix-feld, .gp-m-feld, .gp-m-hinweis { display: none !important; }

  /* Kopfzeile mit Logo auf jeder Seite weglassen, dafür einmal oben */
  .kopf { display: flex; border-bottom: 1px solid var(--linie); padding-bottom: 8px; margin-bottom: 14px; }
  .logo { color: #6b4f1d; }
  .logo img { filter: grayscale(1) brightness(.5); }

  a { color: #1a1a1a; text-decoration: none; }
  strong { color: #000; }
  .ueberzeile { color: #6b4f1d; font-size: 8.5pt; }
  h1 { font-size: 20pt; margin: .1em 0 .3em; }
  h2 { font-size: 13pt; color: #6b4f1d; margin: 1.3em 0 .4em; break-after: avoid; page-break-after: avoid; }
  h3 { font-size: 11pt; break-after: avoid; page-break-after: avoid; }
  p, li { orphans: 3; widows: 3; }

  .karte { background: #fff; border: 1px solid #9b8a6a; border-radius: 10px; padding: 16px 18px; break-inside: avoid; }
  .karte h1 { margin-top: .1em; }
  .kern { font-size: 11.5pt; }
  .ressource, .hinweise, .einstieg { background: #f7f4ee; border: 1px solid var(--linie); border-radius: 8px; padding: 10px 14px; break-inside: avoid; }
  .ergaenzung:not(:empty) { border-left: 2px solid #9b8a6a; padding-left: 14px; }
  .ergaenzung, blockquote { break-inside: auto; }
  blockquote { background: #f7f4ee; border-left: 2px solid #6b4f1d; }
  .trenner { border-top: 1px solid var(--linie); margin: 22px 0; }

  /* Die zwei Bilder: je eine eigene Seite, ganz am Schluss */
  .bilder { display: block; }
  .bild-rahmen { border: 0; padding: 0; margin: 0 0 10mm; break-inside: avoid; page-break-inside: avoid; break-before: page; page-break-before: always; }
  .bild-rahmen h3 { margin-bottom: 6px; }
  .bild-rahmen svg { width: 100%; height: auto; max-height: 220mm; }
  .radix-legende, .gp-m-legende { font-size: 9pt; color: #444; }
}
