/* =====================================================================
   Perfect Match – Design-System
   Look: „Hochzeits-Labor“ – seriöse Pseudo-Wissenschaft mit Herz.
   ===================================================================== */

:root {
  /* Farben – abgestimmt auf den KI-Roboter-Avatar
     (Hinweis: historische Token-Namen – --rose = Blau, --gold/--mint = Pink) */
  --ink:        #2b3648;   /* Roboter-Schiefer – Text */
  --ink-soft:   #5b6a7e;
  --paper:      #f2f7fa;   /* Kühles Hellblau-Weiss */
  --card:       #ffffff;
  --line:       #d9e4ec;

  --rose:       #3e9bd5;   /* Hauptakzent – Roboter-Hellblau */
  --rose-soft:  #e1f2fc;
  --gold:       #d6588a;   /* Lovebird-Pink (dunkler, lesbar) */
  --gold-soft:  #fce8f1;
  --science:    #2e7cb1;   /* Roboter-Tiefblau */
  --science-soft:#e1eef8;
  --mint:       #f7b1cc;   /* Lovebird-Rosa (Verläufe, Roboter-Gesicht) */
  --ok:         #23b585;
  --warn:       #b3261e;

  --radius:     14px;
  --shadow:     0 2px 12px rgba(28, 26, 46, .08);
  --shadow-lg:  0 8px 32px rgba(28, 26, 46, .14);

  --font-body:  "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-disp:  Georgia, "Times New Roman", serif;
  --font-mono:  "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--rose-soft) 0%, transparent 60%),
    radial-gradient(900px 420px at -10% 110%, var(--gold-soft) 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------------------------------------------------------------
   Sprachen
   Handy-Seiten sind einsprachig (body.lang-de / body.lang-fr).
   Der Screen (Beamer) zeigt beide: DE prominent, FR sekundär.
--------------------------------------------------------------------- */

.bi          { display: block; }
.bi-one      { display: block; }
.bi-de       { display: block; }
.bi-fr       { display: block; font-style: italic; opacity: .68; font-size: .88em; margin-top: .1em; }
.bi-fr-inline{ font-style: italic; opacity: .68; }

/* Einsprachig: die jeweils andere Sprache in handgeschriebenen Blöcken verstecken */
body.lang-de .bi-fr,
body.lang-de .bi-fr-inline,
body.lang-fr .bi-de { display: none; }
body.lang-fr .bi-fr {
  font-style: normal; opacity: 1; font-size: 1em; margin-top: 0;
}

/* Sprachwahl */
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lang-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 22px 10px 18px;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .08s, border-color .12s;
}
.lang-btn:hover, .lang-btn:active { border-color: var(--rose); transform: translateY(-2px); }
.lang-flag { font-size: 44px; line-height: 1; }
.lang-name { font-weight: 700; font-size: 18px; margin-top: 8px; }
.lang-sub  { font-size: 12.5px; color: var(--ink-soft); }

.lang-switch {
  margin-left: 14px; font-size: 12px;
  font-family: var(--font-mono);
}
.lang-switch a { margin-left: 0; color: var(--ink-soft); }
.lang-switch a.active { color: var(--rose); font-weight: 700; }
.lang-switch i { opacity: .4; margin: 0 3px; font-style: normal; }

/* ---------------------------------------------------------------------
   Layout-Grundlagen
--------------------------------------------------------------------- */

/* Handy: volle Breite. Laptop/PC: Formular-Seiten bleiben als schmale
   Spalte zentriert, Inhalts-/Admin-Seiten nutzen die Bildschirmbreite. */
.wrap        { max-width: 560px;  margin: 0 auto; padding: 16px clamp(16px, 4vw, 28px) 48px; }
.wrap-wide   { max-width: 1100px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 32px) 48px; }

/* Karten-Raster für Inhaltsseiten: 1 Spalte auf dem Handy, 2 auf Desktop */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 0 18px; align-items: stretch; }
@media (min-width: 760px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid > .card { height: calc(100% - 28px); }
}

/* Kopfzeile ist über ALLE Seiten gleich breit – so springt das Logo beim
   Wechsel zwischen schmalen (Login/Quiz) und breiten (Über uns/Admin) Seiten
   nicht mehr nach innen. */
.site-head-bar { width: 100%; }
.site-head {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 32px) 10px;
}
.logo { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #fdeef5 0%, var(--rose-soft) 55%, var(--gold-soft) 100%);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.logo-mark img, .logo-mark svg { width: 32px; height: 32px; display: block; }
.logo-name   { font-family: var(--font-disp); font-size: 20px; letter-spacing: .2px; }
.logo-name b { color: var(--rose); font-weight: 600; }
.logo-sub    { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
               letter-spacing: 1.6px; color: var(--ink-soft); display: block; margin-top: 1px; }

.site-nav a  { color: var(--ink-soft); text-decoration: none; font-size: 13px; margin-left: 14px; }
.site-nav a:hover { color: var(--rose); }
.site-nav { white-space: nowrap; }

/* Handy: Header sauber zweizeilig – Logo oben, Links + Sprache darunter.
   Im Spiel (nav-minimal, nur DE·FR) bleibt alles in einer Zeile. */
@media (max-width: 639px) {
  .site-head { flex-wrap: wrap; row-gap: 2px; }
  .logo { min-width: 0; }
  .logo-sub { font-size: 8px; letter-spacing: 1.1px; white-space: nowrap; }
  .site-nav:not(.nav-minimal) {
    display: flex; align-items: center;
    width: 100%; order: 3;
    margin-top: 6px; padding-top: 8px;
    border-top: 1px solid var(--line);
    gap: 16px;
  }
  .site-nav:not(.nav-minimal) a { margin-left: 0; font-size: 12.5px; }
  .site-nav:not(.nav-minimal) .lang-switch { margin-left: auto; }
}

/* ---------------------------------------------------------------------
   Karten & Panels
--------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 14px 0;
}

.card-title {
  font-family: var(--font-disp);
  font-size: 22px;
  margin: 0 0 6px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--science);
  background: var(--science-soft);
  padding: 4px 10px; border-radius: 999px;
}
.badge.rose { color: var(--rose); background: var(--rose-soft); }
.badge.gold { color: var(--gold); background: var(--gold-soft); }

/* ---------------------------------------------------------------------
   Formulare & Buttons
--------------------------------------------------------------------- */

.field { margin: 16px 0; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }

input[type=text], input[type=password], textarea, select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus { border-color: var(--science); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600;
  border: none; border-radius: 12px;
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s, box-shadow .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--rose) 0%, #2e7cb1 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(62, 155, 213, .4);
  width: 100%;
}
.btn-science {
  background: linear-gradient(135deg, var(--science) 0%, #22608f 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(46, 124, 177, .3);
}
.btn-ghost {
  background: transparent; color: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }

.error-box {
  background: #fdecea; border: 1px solid #f5c6c0; color: var(--warn);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 12px 0;
}

/* ---------------------------------------------------------------------
   Barometer („KI-Gewissheit“)
--------------------------------------------------------------------- */

.baro { margin: 14px 0; }
.baro-row { margin: 12px 0; }
.baro-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; margin-bottom: 5px;
}
.baro-label .who { font-weight: 600; }
.baro-label .pct { font-family: var(--font-mono); font-size: 15px; color: var(--science); font-weight: 700; }
.baro-track {
  height: 14px; border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.baro-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--science) 0%, var(--mint) 100%);
  width: 0%;
  transition: width 1.2s cubic-bezier(.22, 1, .36, 1);
  position: relative;
}
.baro-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
  animation: baro-shine 2.2s linear infinite;
}
@keyframes baro-shine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.baro-note {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 1px; margin-top: 3px;
}

/* ---------------------------------------------------------------------
   Roboter-Galerie (Avatar-Alternative bei der Registrierung)
--------------------------------------------------------------------- */

.robot-picker {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 4px 12px 12px;
  background: #fff;
}
.robot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 2px;
}
.robot-opt {
  border: 2.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 7px;
  cursor: pointer;
  aspect-ratio: 1;
  transition: border-color .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}
.robot-opt img { width: 100%; height: 100%; object-fit: contain; display: block; }
.robot-opt:active { transform: scale(.94); }
.robot-opt.selected { border-color: var(--rose); background: var(--rose-soft); }

/* ---------------------------------------------------------------------
   Der KI-Roboter (AMOR-9000)
--------------------------------------------------------------------- */

.robot { display: inline-block; width: 110px; flex: 0 0 auto; }
/* overflow:visible – die schwingenden Arme ragen über die viewBox hinaus
   und würden sonst abgeschnitten */
.robot svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ruhiges Schweben (auf/ab) */
.robot.floating { animation: robot-float 3.4s ease-in-out infinite; }
@keyframes robot-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* sprechen: wippt auf/ab und pendelt seitlich */
.robot.talking { animation: robot-talk 1.9s ease-in-out infinite; }
@keyframes robot-talk {
  0%   { transform: translateY(0)     translateX(0)    rotate(-2deg); }
  20%  { transform: translateY(-9px)  translateX(3px)  rotate(2deg); }
  40%  { transform: translateY(-2px)  translateX(-3px) rotate(-2.5deg); }
  60%  { transform: translateY(-11px) translateX(2px)  rotate(1.5deg); }
  80%  { transform: translateY(-4px)  translateX(-2px) rotate(2deg); }
  100% { transform: translateY(0)     translateX(0)    rotate(-2deg); }
}

/* Mund: nur beim Sprechen sichtbar, „plappert“ */
.robot .robot-mouth { opacity: 0; transform-origin: 23px 21.6px; }
.robot.talking .robot-mouth { opacity: 1; animation: robot-mouth .32s linear infinite alternate; }
@keyframes robot-mouth {
  from { transform: scaleY(.25); }
  to   { transform: scaleY(1.6); }
}

/* Arme: schwingen an der Schulter (kräftig beim Sprechen, sanft beim Schweben) */
.robot .robot-arm-l,
.robot .robot-arm-r {
  transform-box: fill-box;
}
.robot .robot-arm-l { transform-origin: 92% 14%; }
.robot .robot-arm-r { transform-origin: 8% 14%; }
.robot.talking .robot-arm-l { animation: arm-swing-l 1.9s ease-in-out infinite; }
.robot.talking .robot-arm-r { animation: arm-swing-r 1.9s ease-in-out infinite; }
.robot.floating .robot-arm-l { animation: arm-swing-l 3.4s ease-in-out infinite; }
.robot.floating .robot-arm-r { animation: arm-swing-r 3.4s ease-in-out infinite; }
@keyframes arm-swing-l {
  0%, 100% { transform: rotate(0deg); }
  22%      { transform: rotate(-16deg); }
  55%      { transform: rotate(9deg); }
  80%      { transform: rotate(-6deg); }
}
@keyframes arm-swing-r {
  0%, 100% { transform: rotate(0deg); }
  22%      { transform: rotate(14deg); }
  55%      { transform: rotate(-10deg); }
  80%      { transform: rotate(5deg); }
}

/* Roboter + Sprechblase */
.robot-row { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 10px; }
.speech {
  position: relative; flex: 1; min-width: 0;
  background: var(--science-soft);
  border: 1.5px solid #bcd9ee;
  border-radius: 14px;
  padding: 12px 16px;
  overflow-wrap: break-word;  /* lange Komposita auf schmalen Handys umbrechen */
}
.speech::before {
  content: "";
  position: absolute; left: -16px; top: 30px;
  border: 8px solid transparent;
  border-right-color: #bcd9ee;
}
.speech::after {
  content: "";
  position: absolute; left: -13px; top: 31px;
  border: 7px solid transparent;
  border-right-color: var(--science-soft);
}
.speech .q-title { margin-top: 0; }

/* ---------------------------------------------------------------------
   Countdown
--------------------------------------------------------------------- */

.countdown-bar {
  display: flex; align-items: center; gap: 12px;
  flex: 1 1 auto; min-width: 0;
}
.countdown-track {
  flex: 1; height: 12px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.countdown-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--science), var(--mint));
  transition: width 1s linear, background .3s;
}
.countdown-bar .countdown-num {
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  min-width: 2.2ch; text-align: right;
  flex: 0 0 auto;
}
.countdown-bar.hurry .countdown-fill { background: var(--warn); }
.countdown-bar.hurry .countdown-num { color: var(--warn); animation: pulse .5s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.12); } }
body.screen .countdown-track { height: 16px; }
body.screen .countdown-bar .countdown-num { font-size: 30px; }

/* ---------------------------------------------------------------------
   Avatare & Spieler
--------------------------------------------------------------------- */

.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
  background: var(--science-soft);
}
.avatar-lg { width: 72px; height: 72px; }
.avatar-fallback {
  display: inline-grid; place-items: center;
  font-weight: 700; color: var(--science);
  font-size: 18px;
}

.player-grid {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-top: 14px;
}
.player-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 76px;
  animation: chip-in .35s ease-out;
}
.player-chip .pname {
  font-size: 12px; text-align: center; max-width: 76px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(8px) scale(.9); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   Fragetypen
--------------------------------------------------------------------- */

.q-title { font-family: var(--font-disp); font-size: 21px; margin: 4px 0 2px; }
.q-title .bi-fr { font-size: .8em; }
.q-sub   { color: var(--ink-soft); font-size: 14px; margin-bottom: 10px; }

/* Multiple Choice */
.choices { display: grid; gap: 10px; margin: 14px 0; }
.choice-btn {
  text-align: left;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  cursor: pointer;
  display: flex; gap: 12px; align-items: flex-start;
  transition: border-color .12s, background .12s;
  -webkit-tap-highlight-color: transparent;
}
.choice-btn .key {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--science-soft); color: var(--science);
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  margin-top: 1px;
}
.choice-btn.selected { border-color: var(--rose); background: var(--rose-soft); }
.choice-btn.selected .key { background: var(--rose); color: #fff; }

/* Bildauswahl */
.img-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
@media (min-width: 420px) { .img-grid { grid-template-columns: repeat(3, 1fr); } }
.img-opt {
  border: 3px solid var(--line); border-radius: 12px; overflow: hidden;
  cursor: pointer; position: relative; padding: 0; background: none;
  aspect-ratio: 1;
  -webkit-tap-highlight-color: transparent;
}
.img-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-opt.selected { border-color: var(--rose); }
.img-opt.selected::after {
  content: "✓";
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--rose); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.img-opt .img-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff; font-size: 11px; padding: 14px 6px 5px; text-align: center;
}

/* Zeichnen */
.draw-wrap { position: relative; margin: 14px 0; }
.draw-canvas {
  width: 100%; aspect-ratio: 1;
  background: #fff;
  border: 2px solid var(--line); border-radius: 12px;
  touch-action: none;
  display: block;
  cursor: crosshair;
}
.draw-tools { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.draw-color {
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid transparent;
  cursor: pointer; padding: 0;
}
.draw-color.active { border-color: var(--ink); transform: scale(1.12); }
.draw-size { width: 90px; }

/* Karte */
.map-box {
  width: 100%; height: 320px;
  border-radius: 12px; overflow: hidden;
  border: 2px solid var(--line);
  margin: 14px 0;
}
.map-hint { font-size: 13px; color: var(--ink-soft); }

/* Eigener Karten-Pin (ersetzt Leaflets Standard-PNG-Marker) */
.pm-pin-dot {
  display: block;
  width: 22px; height: 22px;
  background: var(--rose);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* ---------------------------------------------------------------------
   Screen-Ansicht (Beamer)
--------------------------------------------------------------------- */

/* Beamer: dieselbe helle, ruhige Farbwelt wie die Handys – nur grösser. */
body.screen {
  background:
    radial-gradient(1200px 560px at 85% -10%, var(--rose-soft) 0%, transparent 60%),
    radial-gradient(1000px 520px at -5% 110%, var(--gold-soft) 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
}
body.screen .wrap-screen { max-width: 1500px; margin: 0 auto; padding: 22px 32px; }
body.screen .q-title { font-size: 40px; }

.screen-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px;
}
.screen-join {
  font-family: var(--font-mono); font-size: 18px;
  color: var(--ink-soft);
}
.screen-join b { color: var(--rose); }

.screen-answer-count {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 700;
  color: var(--gold);
}

/* Braut/Bräutigam-Icons neben Namen */
.role-icon {
  width: 1.2em; height: 1.2em;
  vertical-align: -0.22em;
  display: inline-block;
  margin: 0 2px;
}

/* Hero-Spotlights auf dem Beamer: grosse Avatare des Brautpaars */
.spot-hero-row {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(20px, 5vw, 70px);
  margin: 18px 0 8px;
  text-align: center;
}
.spot-hero { display: flex; flex-direction: column; align-items: center; max-width: 360px; min-width: 0; }
.spot-hero .spot-hero-av {
  width: 96px; height: 96px;
  border-width: 3.5px;
  font-size: 36px;
}
.spot-hero.bride .spot-hero-av { border-color: #e87ba6; box-shadow: 0 0 0 6px #fce8f1, var(--shadow-lg); }
.spot-hero.groom .spot-hero-av { border-color: var(--rose); box-shadow: 0 0 0 6px var(--rose-soft), var(--shadow-lg); }
.spot-hero-name { font-size: 22px; font-weight: 700; margin-top: 12px; }
.spot-hero-sub {
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 1.3px;
  color: var(--ink-soft); margin: 3px 0 8px;
}
.spot-hero-answer { font-size: 18px; overflow-wrap: break-word; min-width: 0; }
.spot-hero-answer .spot-choice { font-size: 19px; font-weight: 600; }
.spot-vs { display: flex; align-items: center; align-self: center; }
.spot-verdict { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 40px; animation: chip-in .6s ease-out both; }
.spot-verdict span { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.spot-verdict.hit span { color: var(--gold); }

/* Wer hat gleich geantwortet wie die Braut / der Bräutigam? */
.match-row {
  margin: 16px 0 6px;
  padding: 14px 18px;
  background: var(--science-soft);
  border-radius: 12px;
}
.match-row .match-label { font-weight: 700; font-size: 16px; }
.match-row .match-label .bi-fr { font-size: .85em; }
.match-row .player-chip { width: 64px; }

/* Zwischensequenz: Analyse zwischen zwei Fragen */
.interstitial { padding: 44px 40px 40px; }
.interstitial-comment {
  font-family: var(--font-disp);
  font-size: 26px;
  margin: 14px auto 22px;
  max-width: 760px;
}
.interstitial-comment .bi-fr { font-size: .8em; }
.interstitial-baro { max-width: 860px; margin: 0 auto; text-align: left; }
.interstitial-baro .baro-track { height: 20px; }
.interstitial-baro .baro-label .pct { font-size: 18px; }

/* Registrierung als Schritt-für-Schritt-Wizard */
.wiz-dots { display: flex; gap: 8px; justify-content: center; margin: 10px 0 2px; }
.wiz-dots .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line);
  transition: background .25s, transform .25s;
}
.wiz-dots .dot.active { background: var(--rose); transform: scale(1.25); }
.wiz-step { display: none; }
.wiz-step.active { display: block; animation: step-in .35s ease-out; }
@keyframes step-in {
  from { opacity: 0; transform: translateX(26px); }
  to   { opacity: 1; transform: none; }
}
.wiz-step h2 { font-family: var(--font-disp); font-size: 21px; margin: 14px 0 4px; }
/* Wizard-Navigation: Zurück schmal, Weiter/Registrieren breiter */
.wiz-nav { display: flex; gap: 10px; margin-top: 16px; }
.wiz-nav .wiz-back { flex: 1; }
.wiz-nav .btn-primary { flex: 1.8; width: auto; }
.confirm-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 14px 0; }
.confirm-preview img, .confirm-preview .avatar {
  width: 130px; height: 130px; border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--rose-soft);
  box-shadow: var(--shadow-lg);
  font-size: 44px;
}
.confirm-preview .cname { font-size: 20px; font-weight: 700; }

/* Spotlight: Antworten des Brautpaars bei Fragen über Braut/Bräutigam */
.spotlight-row {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin: 14px 0 6px;
}
@media (min-width: 760px) { .spotlight-row { grid-template-columns: 1fr 1fr; } }
.spotlight {
  border: 2px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 14px;
  padding: 14px 16px;
  animation: chip-in .45s ease-out both;
  min-width: 0;
  overflow-wrap: break-word;
}
.spotlight.self { border-color: var(--rose); background: var(--rose-soft); }
.spot-head { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 8px; }
.spot-head .avatar { width: 38px; height: 38px; }
.spot-sub { font-size: 12px; opacity: .65; font-weight: 400; font-style: italic; margin-left: 6px; }
.spot-choice { font-size: 19px; font-weight: 600; }
.spotlight img.reveal-drawing { background: #fff; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); }

/* VIP-Hinweis bei der Registrierung */
.vip-banner {
  background: var(--gold-soft);
  border: 1.5px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px; font-weight: 600;
  margin: 10px 0 4px;
}
.vip-banner .bi-one, .vip-banner .bi-de, .vip-banner .bi-fr { display: inline; }

/* Archiv: hervorgehobene Brautpaar-Antworten */
.reveal-item.spot-self { border: 2px solid var(--rose); background: var(--rose-soft); }
.reveal-item.spot-tip  { border: 2px solid var(--gold); background: var(--gold-soft); }

/* Reveal-Galerien auf dem Screen */
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.reveal-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 12px;
  box-shadow: var(--shadow);
  animation: chip-in .4s ease-out both;
}
.reveal-item .who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.reveal-item .who .avatar { width: 30px; height: 30px; }
.reveal-item img.reveal-drawing { width: 100%; border-radius: 8px; background: #fff; }
.reveal-item .txt { font-family: var(--font-disp); font-size: 17px; font-style: italic; }

/* Balkendiagramm für MC auf dem Screen */
.bars { display: grid; gap: 12px; margin-top: 18px; }
.bar-row .bar-label { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 4px; }
.bar-row .bar-track { height: 34px; background: var(--line); border-radius: 8px; overflow: hidden; }
.bar-row .bar-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #2e7cb1, #f2a0c0);
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
  min-width: 0;
  transition: width .9s cubic-bezier(.22, 1, .36, 1);
}
.bar-fill .avatar { width: 26px; height: 26px; border-width: 1.5px; flex: 0 0 auto; }

/* Ranking */
.rank-list { display: grid; gap: 10px; margin-top: 16px; }
.rank-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 16px;
  box-shadow: var(--shadow);
  animation: chip-in .5s ease-out both;
}
.rank-item .pos { font-family: var(--font-mono); font-size: 20px; width: 34px; color: var(--science); }
.rank-item .rname { flex: 1; font-size: 19px; font-weight: 600; }
.rank-item .rscore { font-family: var(--font-mono); font-size: 20px; color: var(--gold); }
.rank-item.winner {
  background: linear-gradient(135deg, var(--rose-soft), var(--gold-soft));
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(242, 160, 192, .4);
}
.rank-item.winner .rscore { color: var(--gold); font-size: 24px; }

/* ---------------------------------------------------------------------
   Host-Panel (für Desktop/Macbook ausgelegt)
--------------------------------------------------------------------- */

.host-layout { display: grid; gap: 0 20px; grid-template-columns: 1fr; align-items: start; }
/* Grid-Spalten dürfen schmaler als ihr Inhalt werden – sonst sprengen die
   breiten Steuer-Buttons (inline-flex, langer Text) die iPhone-Breite. */
.host-layout > * { min-width: 0; }
@media (min-width: 980px) {
  .host-layout { grid-template-columns: 360px minmax(0, 1fr) 320px; }
  .host-layout .card { margin-top: 0; }
}

.host-controls { display: grid; gap: 10px; }
/* Button-Text darf umbrechen statt zu überlaufen */
.host-controls .btn { white-space: normal; line-height: 1.25; }
.host-controls .btn { width: 100%; }
.host-status {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--ink); color: #b6f0c8;
  border-radius: 10px; padding: 12px 14px;
  white-space: pre-wrap;
}
.host-qlist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.host-qitem {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 14px;
  background: #fff;
}
.host-qitem.current { border-color: var(--rose); background: var(--rose-soft); }
.host-qitem.played  { opacity: .55; }
.host-qitem .qtype-tag {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  background: var(--science-soft); color: var(--science);
  padding: 2px 7px; border-radius: 6px; flex: 0 0 auto;
}

/* ---------------------------------------------------------------------
   Foto-Aufnahme
--------------------------------------------------------------------- */

.cam-stage {
  width: 200px; height: 200px; margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--rose-soft);
  box-shadow: var(--shadow-lg);
  position: relative;
  background: var(--science-soft);
}
.cam-stage video, .cam-stage canvas, .cam-stage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Live-Vorschau spiegeln – die Aufnahme (snap) wird ebenfalls gespiegelt,
   so springt das Bild beim Auslösen nicht um */
.cam-stage video { transform: scaleX(-1); }
.cam-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 54px; opacity: .4;
}

/* ---------------------------------------------------------------------
   Über-uns-Seite
--------------------------------------------------------------------- */

.prof-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .prof-grid { grid-template-columns: repeat(2, 1fr); } }
.prof-card { text-align: center; }
.prof-photo {
  width: 130px; height: 130px; border-radius: 50%;
  margin: 6px auto 10px;
  border: 4px solid var(--gold-soft);
  overflow: hidden;
  background: var(--science-soft);
}
.prof-photo svg, .prof-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.prof-name { font-family: var(--font-disp); font-size: 19px; margin: 4px 0 0; }
.prof-title { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
              letter-spacing: 1px; color: var(--gold); margin: 2px 0 8px; }
.prof-bio { font-size: 14px; color: var(--ink-soft); }

/* ---------------------------------------------------------------------
   Utility
--------------------------------------------------------------------- */

.center   { text-align: center; }
.muted    { color: var(--ink-soft); }
.mt-0     { margin-top: 0; }
.mt-1     { margin-top: 8px; }
.mt-2     { margin-top: 16px; }
.mt-3     { margin-top: 28px; }
.hidden   { display: none !important; }
.spin {
  display: inline-block; width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
  text-align: center; font-size: 12px; color: var(--ink-soft);
  margin-top: 36px; padding: 0 12px;
}
.footer-note .bi-fr { font-size: 1em; }

/* ---------------------------------------------------------------------
   Finale-Dramaturgie: Kandidaten-Suche, grosses Paar, Alternativ-Matches
--------------------------------------------------------------------- */

.search-title { font-family: var(--font-disp); font-size: 30px; margin: 10px 0 4px; }
.search-title .bi-fr { font-size: .72em; }
.search-row {
  display: flex; justify-content: center;
  gap: clamp(40px, 9vw, 120px);
  margin-top: 16px;
}
.search-col { width: 250px; }
.search-for { font-weight: 700; font-size: 19px; margin-bottom: 14px; }
.search-for .bi-fr { font-size: .8em; }
.cand-slot { min-height: 195px; display: flex; justify-content: center; }
.cand { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: cand-in .45s ease-out; }
.cand .cand-av { width: 104px; height: 104px; font-size: 40px; }
.cand-name { font-weight: 700; font-size: 19px; }
.cand .cscore { font-family: var(--font-mono); font-size: 17px; font-weight: 700; color: var(--science); }
.cand.rejected { animation: cand-reject .8s ease-in forwards; }
.cand.rejected .cscore { color: var(--warn); }
@keyframes cand-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; } }
@keyframes cand-reject {
  0%   { transform: none; }
  20%  { transform: translateX(-8px) rotate(-3deg); }
  40%  { transform: translateX(7px) rotate(3deg); }
  60%  { transform: translateX(-5px); }
  100% { opacity: .16; filter: grayscale(1); transform: scale(.92); }
}
.cand.matched { animation: match-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.cand.matched .cand-av {
  border-color: var(--gold);
  box-shadow: 0 0 0 6px var(--gold-soft), 0 0 34px rgba(242, 160, 192, .65);
}
.cand.matched .cscore { color: var(--gold); font-size: 21px; }
@keyframes match-pop { from { transform: scale(.5); } 70% { transform: scale(1.12); } to { transform: scale(1); } }

.final-couple {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 5vw, 64px);
  margin: 20px 0 8px;
}
.final-person { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.final-av { width: 140px; height: 140px; font-size: 52px; border-width: 4px; }
.final-person.bride .final-av { border-color: #e87ba6; box-shadow: 0 0 0 7px #fce8f1, var(--shadow-lg); }
.final-person.groom .final-av { border-color: var(--rose); box-shadow: 0 0 0 7px var(--rose-soft), var(--shadow-lg); }
.final-name { font-size: 24px; font-weight: 700; }
.final-heart { font-size: 68px; line-height: 1; color: #e8557f; animation: heartbeat 1.1s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.28); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.16); }
}
.final-score { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--gold); }

.alt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px; margin-top: 12px;
}
.alt-pair {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; text-align: center;
  box-shadow: var(--shadow);
  animation: chip-in .5s ease-out both;
}
.alt-avs { display: flex; align-items: center; justify-content: center; gap: 10px; }
.alt-pair .avatar { width: 56px; height: 56px; }
.alt-heart { font-size: 24px; color: #e8557f; }
.alt-names { font-weight: 700; margin-top: 8px; }
.alt-score { font-family: var(--font-mono); color: var(--gold); font-weight: 700; margin-top: 2px; font-size: 14px; }

/* Intro: Vorstellungs-Sätze der KI */
.intro-line {
  font-family: var(--font-disp);
  font-size: 21px;
  margin-top: 14px;
}
.intro-anim { animation: chip-in .5s ease-out; }

/* Konfetti (Ergebnis) */
.confetti {
  position: fixed; top: -12px; pointer-events: none; z-index: 999;
  width: 10px; height: 16px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .8; }
}
