:root {
  /* Ägäis: Kalkstein, Tiefblau, Abendrot über Patras */
  --bg: #f6f3ec;
  --text: #10243e;
  --leise: #5d6b7c;
  --linie: #d5dbe1;
  --akzent: #1f5fa8;
  --sonne: #e0823f;
  --salbei: #7d8c6e;
  --wahl: #e4ecf6;
  --griechisch: "GFS Didot", Didot, Georgia, serif;
  --display: "Instrument Serif", Georgia, serif;
  --sans: Manrope, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1828;
    --text: #f1ece2;
    --leise: #93a1b2;
    --linie: #24364d;
    --akzent: #79aee8;
    --sonne: #f09a5a;
    --salbei: #a3b392;
    --wahl: #15304f;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--sans);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* feines Papierkorn */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.linie { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3; }
#balken { height: 100%; width: 0; background: linear-gradient(90deg, var(--akzent), var(--sonne)); transition: width .5s cubic-bezier(.2, .7, .2, 1); }

.kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px clamp(16px, 5vw, 56px) 0;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--leise);
}
.marke { font-family: var(--display); font-style: italic; font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--text); }
.zaehler { font-variant-numeric: tabular-nums; }

main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 96px) clamp(16px, 5vw, 32px) 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.szene { animation: rein .6s cubic-bezier(.2, .7, .2, 1); }
.szene.raus { animation: raus .22s ease forwards; }
@keyframes rein { from { opacity: 0; transform: translateY(18px); } }
@keyframes raus { to { opacity: 0; transform: translateY(-10px); } }

.kicker {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 0 0 20px;
}
h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(56px, 13vw, 112px); line-height: .95; margin-bottom: 28px; }
h2 { font-size: clamp(34px, 6.4vw, 54px); line-height: 1.05; margin-bottom: 14px; text-wrap: balance; }
em { font-style: italic; color: var(--akzent); }
.lead { font-size: clamp(18px, 2.4vw, 21px); max-width: 30em; margin: 0 0 40px; color: var(--text); }
.fussnote { font-size: 14px; color: var(--leise); margin: 28px 0 0; }

.nummer {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--sonne);
  margin: 0 0 10px;
}
.hinweis { color: var(--leise); font-size: 15px; margin: 0 0 8px; }
.hinweis:empty { display: none; }
#eingabe { margin-top: 28px; }

/* Antwortoptionen */
.optionen { display: grid; border-top: 1px solid var(--linie); }
.option {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 18px;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--linie);
  padding: 16px 8px;
  cursor: pointer;
  position: relative;
  transition: padding-left .25s ease, background .2s ease, color .2s ease;
}
.option .taste {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--linie);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--leise);
  transition: all .2s ease;
}
.option:hover { padding-left: 16px; }
.option:hover .taste { border-color: var(--akzent); color: var(--akzent); }
.option[aria-pressed="true"] { background: var(--wahl); padding-left: 16px; }
.option[aria-pressed="true"] .taste { background: var(--akzent); border-color: var(--akzent); color: var(--bg); }
.option:disabled { opacity: .35; cursor: not-allowed; padding-left: 8px; }

/* Mehrfachauswahl als Kacheln */
.optionen.kacheln { display: flex; flex-wrap: wrap; gap: 10px; border: 0; }
.kacheln .option { width: auto; border: 1px solid var(--linie); border-radius: 999px; padding: 12px 20px; font-size: 16px; }
.kacheln .option:hover { padding-left: 20px; border-color: var(--akzent); }
.kacheln .option[aria-pressed="true"] { padding-left: 20px; background: var(--text); color: var(--bg); border-color: var(--text); }
.kacheln .option:disabled { padding-left: 20px; }
.kacheln .taste { display: none; }

/* eigene Antwort */
.option.eigen > span:last-child { font-style: italic; color: var(--leise); }
.option.eigen[aria-pressed="true"] > span:last-child { color: inherit; }
.kacheln .option.eigen { border-style: dashed; }
input.eigen-feld { margin-top: 18px; font-size: clamp(22px, 3.6vw, 28px); }
.kacheln .option.eigen { border-style: solid; background: var(--akzent); border-color: var(--akzent); color: var(--bg); }
.kacheln .option.eigen > span:last-child { color: inherit; font-style: normal; }
.eigen-zeile { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.eigen-zeile input.eigen-feld { margin-top: 0; flex: 1; min-width: 0; }
.eigen-plus {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--akzent); background: transparent; color: var(--akzent);
  font: 400 26px/1 var(--sans); cursor: pointer; transition: background .2s, color .2s;
}
.eigen-plus:hover { background: var(--akzent); color: var(--bg); }

/* Skala */
.skala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.skala .option {
  justify-content: center;
  border: 1px solid var(--linie);
  border-radius: 999px;
  aspect-ratio: 1;
  max-width: 88px;
  justify-self: center;
  padding: 0;
  font-family: var(--display);
  font-size: 30px;
}
.skala .option:hover { padding: 0; border-color: var(--akzent); }
.skala .option[aria-pressed="true"] { padding: 0; background: var(--akzent); border-color: var(--akzent); color: var(--bg); }
.skala-labels { display: flex; justify-content: space-between; gap: 24px; color: var(--leise); font-size: 14px; margin-top: 14px; font-style: italic; }
.skala-labels span:last-child { text-align: right; }

/* Freitext */
textarea, input[type=text] {
  width: 100%;
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.3;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--linie);
  padding: 8px 0 12px;
  resize: none;
  border-radius: 0;
}
textarea { min-height: 3.2em; }
textarea::placeholder, input::placeholder { color: var(--leise); opacity: .55; font-style: italic; }
textarea:focus, input:focus { outline: none; border-bottom-color: var(--akzent); }
.option:focus-visible, .btn:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

/* Buttons */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 44px; }
.btn {
  font: 500 15px/1 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  padding: 18px 30px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease, opacity .2s;
}
.btn:hover { background: var(--akzent); border-color: var(--akzent); }
.btn:active { transform: scale(.98); }
.btn.leise { background: transparent; color: var(--text); border-color: transparent; padding-left: 0; }
.btn.leise:hover { color: var(--akzent); background: transparent; }
.btn:disabled { opacity: .3; cursor: default; background: var(--text); border-color: var(--text); }
.btn.unsichtbar { visibility: hidden; }

.fehler { color: var(--akzent); margin-top: 24px; font-size: 15px; }

#konfetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

@media (max-width: 520px) {
  .option { font-size: 17px; padding: 14px 4px; }
  .btn { padding: 16px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .szene, .szene.raus { animation: none; }
  #balken, .option { transition: none; }
}

/* griechische Worte */
.gr { font-family: var(--griechisch); letter-spacing: .04em; }
.kicker .gr { font-size: 1.25em; text-transform: none; letter-spacing: .02em; }

/* Mäanderband unter dem Kopf */
.maeander {
  height: 12px;
  margin: 18px clamp(16px, 5vw, 56px) 0;
  background: var(--akzent);
  opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12'%3E%3Cpath d='M0 11H16M13 11V1H3V8H9V4H6' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left center / 16px 12px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12'%3E%3Cpath d='M0 11H16M13 11V1H3V8H9V4H6' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left center / 16px 12px;
}

/* Vollbild-Fotos auf Start- und Dankseite */
.foto {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto::after { content: ""; position: absolute; inset: 0; }
#foto-start img { object-position: 50% 80%; }
#foto-start::after { background: linear-gradient(180deg, rgba(8, 22, 42, .66) 0%, rgba(8, 22, 42, .5) 50%, rgba(8, 22, 42, .12) 78%, rgba(8, 22, 42, .5) 100%); }
#foto-fertig img { object-position: 30% 70%; }
#foto-fertig::after { background: linear-gradient(180deg, rgba(20, 16, 40, .45) 0%, rgba(20, 16, 40, .1) 50%, rgba(10, 14, 30, .55) 100%); }
body[data-szene="start"] #foto-start,
body[data-szene="fertig"] #foto-fertig { opacity: 1; }

body[data-szene="start"], body[data-szene="fertig"] { color: #fbf6ee; }
body[data-szene="start"] .kopf, body[data-szene="fertig"] .kopf,
body[data-szene="start"] .marke, body[data-szene="fertig"] .marke { color: #fbf6ee; }
body[data-szene="start"] .maeander, body[data-szene="fertig"] .maeander { background: #fbf6ee; opacity: .5; }
body[data-szene="start"] .kicker, body[data-szene="fertig"] .kicker { color: #ffd2a8; }
body[data-szene="start"] em, body[data-szene="fertig"] em { color: #ffb57d; }
body[data-szene="start"] .lead, body[data-szene="fertig"] .lead { color: #fbf6ee; text-shadow: 0 1px 12px rgba(8, 22, 42, .6); }
body[data-szene="start"] h1, body[data-szene="fertig"] h1 { text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
body[data-szene="start"] .btn { background: #fbf6ee; border-color: #fbf6ee; color: #10243e; }
body[data-szene="start"] .btn:hover { background: var(--sonne); border-color: var(--sonne); color: #fff; }
body[data-szene="start"]::before, body[data-szene="fertig"]::before { opacity: 0; }
body[data-szene="start"] main, body[data-szene="fertig"] main { justify-content: flex-start; }
.kopf, main { position: relative; z-index: 1; }
.linie { z-index: 3; }

.bildnachweis {
  position: fixed;
  right: 12px;
  bottom: 8px;
  z-index: 1;
  font-size: 11px;
  color: rgba(251, 246, 238, .7);
  display: none;
}
.bildnachweis a { color: inherit; }
body[data-szene="start"] #nachweis-start,
body[data-szene="fertig"] #nachweis-fertig { display: block; }

/* Fragen vor wechselnden Patras-Fotos, Frage auf Milchglas */
.foto-frage::after { background: linear-gradient(180deg, rgba(8, 22, 42, .35), rgba(8, 22, 42, .15) 40%, rgba(8, 22, 42, .4)); }
.foto-frage.aktiv { opacity: 0; }
body[data-szene="frage"] .foto-frage.aktiv { opacity: 1; }
body[data-szene="frage"]::before { opacity: 0; }
body[data-szene="frage"] .kopf, body[data-szene="frage"] .marke { color: #fbf6ee; text-shadow: 0 1px 10px rgba(8, 22, 42, .5); }
body[data-szene="frage"] .maeander { background: #fbf6ee; opacity: .6; }
body[data-szene="frage"] #nachweis-frage { display: block; }
#frage {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
          backdrop-filter: blur(18px) saturate(1.2);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 30px 80px rgba(8, 22, 42, .28);
  border: 1px solid color-mix(in srgb, #fff 40%, transparent);
}
@media (max-width: 520px) {
  #frage { border-radius: 22px; padding: 24px 18px; }
  main { padding-left: 10px; padding-right: 10px; }
}

/* μάτι: gewählte Antwort bekommt ein blaues Auge statt des Buchstabens */
.option[aria-pressed="true"] .taste {
  color: transparent;
  border-color: #0d3f7a;
  background: radial-gradient(circle, #111 0 18%, #6fb7ea 19% 36%, #fff 37% 56%, #0d5eaf 57%);
}

/* Griechische Zwischenrufe */
.zuruf {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #0d5eaf;
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(8, 22, 42, .3);
  transition: opacity .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.zuruf.zeigen { opacity: 1; transform: translate(-50%, 0); }
.zuruf .gr { font-size: 22px; }
.zuruf .de { font-size: 13px; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .zuruf { transition: none; } }

/* Fragenwechsel: Inhalt überblenden, Panel bleibt */
#frage { animation: none; }
#frage > * { animation: rein .45s cubic-bezier(.2, .7, .2, 1); transition: opacity .15s ease; }
#frage.wechsel > * { opacity: 0; }
#frage.raus { animation: raus .22s ease forwards; }

/* Katzenkopf, der um die Ecke lugt (Klicks gehen durch) */
.guckkatze {
  position: fixed;
  z-index: 3;
  width: clamp(110px, 15vh, 170px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(8, 22, 42, .3));
}
.guckkatze.links { left: 0; transform: translateX(-100%) rotate(80deg); }
.guckkatze.rechts { right: 0; transform: translateX(100%) rotate(-80deg); }
.guckkatze.unten { bottom: 0; transform: translateY(100%); }
.guckkatze.oben { top: 0; transform: translateY(-100%) rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .guckkatze { display: none; } }

/* Musik-Knopf */
.kopf-rechts { display: flex; align-items: center; gap: 14px; }
.musik {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s, background .2s;
}
.musik:hover { opacity: 1; }
.musik .note { font-size: 16px; line-height: 1; }
.musik .wellen { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.musik .wellen i { display: block; width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.musik[aria-pressed="true"] { opacity: 1; }
.musik[aria-pressed="true"] .wellen i { animation: welle .9s ease-in-out infinite alternate; }
.musik[aria-pressed="true"] .wellen i:nth-child(2) { animation-delay: .2s; }
.musik[aria-pressed="true"] .wellen i:nth-child(3) { animation-delay: .45s; }
.musik[aria-pressed="false"] .note { text-decoration: line-through; }
@keyframes welle { from { height: 3px; } to { height: 12px; } }
@media (prefers-reduced-motion: reduce) { .musik .wellen i { animation: none !important; height: 8px; } }

.bildnachweis { max-width: calc(100% - 24px); text-align: right; line-height: 1.4; }
