/* ===== screens.css – Aufbau der einzelnen Bildschirme =====
   Abschnitte: 1 Startseite · 2 Frage · 3 Fischkarte · 4 Ergebnis · 5 feste Bedien-Leiste */

/* ---------- 1) Startseite ---------- */
#app:has(.tiles)::before {          /* Vereinswappen */
  content: ""; display: block; width: 104px; height: 104px; margin: 4px auto 16px; border-radius: 50%;
  background: #fff url("../img/logo.png") center / 100% no-repeat;
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -12px rgba(5, 136, 67, .55);
}
#app:has(.tiles) > h2 { text-align: center; font-size: 2.1rem; }
#app:has(.tiles) > h2 + p { text-align: center; max-width: 28ch; margin: 0 auto 26px; }
#app:has(.tiles) > .muted.small { margin-top: 32px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 156px; padding: 18px;
  border: 0; border-radius: var(--r-lg); text-align: left; color: var(--ink); cursor: pointer; background: var(--card); box-shadow: var(--shadow-1);
  transition: transform .12s;
}
.tile:active { transform: scale(.97); }
.tile::after { content: "›"; position: absolute; right: 16px; top: 12px; font-size: 1.7rem; line-height: 1; color: var(--muted); opacity: .55; }
.tile .ico { position: absolute; left: 16px; top: 16px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; font-size: 1.55rem; background: var(--tint-1); }
.tile:nth-child(2) .ico { background: var(--tint-2); }
.tile b { margin-top: 64px; font: 650 1.2rem/1.15 var(--font-head); letter-spacing: -.025em; }
.tile .s { font-size: .82rem; color: var(--muted); }

/* Prüfungssimulation: volle Breite, Symbol links */
.tile.pri, .tile.wide {
  grid-column: 1 / -1; min-height: 96px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i b" "i s"; align-content: center; column-gap: 16px;
}
.tile.pri .ico, .tile.wide .ico { position: static; grid-area: i; width: 56px; height: 56px; }
.tile.pri b, .tile.wide b { grid-area: b; margin: 0; align-self: end; font-size: 1.25rem; }
.tile.pri .s, .tile.wide .s { grid-area: s; align-self: start; }
.tile.wide .ico { background: var(--tint-3); }
.beta { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font: 600 .68rem/1.4 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: var(--brand-tint); vertical-align: middle; }
.rfotos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.rfotos img { width: 100%; height: auto; border-radius: var(--r-sm); background: #fff; }
.rtab td:first-child { width: 38%; color: var(--muted); font-size: .85rem; }
.rtab td.r { font-weight: 500; text-align: left; white-space: normal; }
/* Prüfungssimulation: schwarz, wie das "Hauptmodell" */
.tile.pri { color: var(--on-night); background: radial-gradient(130% 160% at 100% 0%, var(--night-2) 0%, var(--night) 62%); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .12), var(--shadow-2); }
.tile.pri .ico { background: var(--gold); }
.tile.pri .s { color: rgba(255, 255, 255, .7); }
.tile.pri::after { color: #fff; }

/* ---------- 2) Frage ---------- */
.qtext { margin: 14px 2px 18px; font: 700 1.35rem/1.28 var(--font-head); letter-spacing: -.025em; }

/* ---------- 3) Fischkarte ---------- */
.fish { margin: 10px 0 14px; padding: 8px; overflow: hidden; border-radius: var(--r); background: #fff; box-shadow: var(--shadow-2); }
.fish img { display: block; width: 100%; height: auto; border-radius: calc(var(--r) - 8px); }   /* Seitenverhältnis kommt aus width/height im Bild-Tag */
.reveal { text-align: center; padding: 22px 16px; }
.reveal b { display: block; font: 700 1.7rem/1.15 var(--font-head); letter-spacing: -.03em; }
.reveal i { display: block; margin-top: 4px; color: var(--muted); font-style: italic; }

/* ---------- 4) Ergebnis: schwarze Karte mit großer Zahl ---------- */
.result {
  margin: 14px 0 18px; padding: 28px 16px; text-align: center; color: var(--on-night); border-radius: var(--r-lg);
  background: radial-gradient(130% 170% at 100% 0%, var(--night-2) 0%, var(--night) 65%); box-shadow: var(--shadow-2);
}
.result .big { font: 700 3.4rem/1.05 var(--font-head); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.result div:last-child { margin-top: 6px; font-weight: 600; }
.result.pass div:last-child { color: var(--pass-text); } .result.fail div:last-child { color: var(--fail-text); }
.result.pass { box-shadow: 0 0 0 1px rgba(91, 224, 143, .28), var(--shadow-2); } .result.fail { box-shadow: 0 0 0 1px rgba(255, 143, 130, .28), var(--shadow-2); }
.wrongq { margin: 12px 0; padding: 14px 16px; font-size: .95rem; background: var(--card); border-radius: var(--r); border-left: 3px solid var(--bad); box-shadow: var(--shadow-1); }
.wrongq .fish { margin: 10px 0 0; box-shadow: none; }

/* ---------- 5) Feste Bedien-Leiste: der wichtigste Button bleibt unten sichtbar ----------
   (Frage- und Fisch-Bildschirme, nicht auf Ergebnis-Seiten) */
#app:has(:is(.qtext, .fish)):not(:has(.result)) { padding-bottom: 104px; }
#app:has(:is(.qtext, .fish)):not(:has(.result))::after {   /* weicher Übergang hinter dem Button */
  content: ""; position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; height: 112px; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 52%, transparent);
}
#app:has(:is(.qtext, .fish)):not(:has(.result)) > .btn:last-child {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 8; width: min(528px, calc(100vw - 32px));
  bottom: calc(14px + env(safe-area-inset-bottom)); margin: 0;
}
#app:has(:is(.qtext, .fish)):not(:has(.result)) > .btn:last-child:active { transform: translateX(-50%) scale(.98); }

@media (min-width: 640px) { .tile { min-height: 170px; } }
