/* Fangreif – Oberfläche. Erscheinungsbild nach den Lernkarten: dunkle Tinte, gelbe Marke, blauer Kartenrahmen, helles Blatt.
 * Die Szene am Wasser behält die Farben des Bornsee-Fotos (See-Blaugrau, Schilf-Ocker, Waldgrün). */
:root {
  --see: #2e4250;
  --see-dunkel: #1b2a35;
  --see-hell: #6f8ea3;
  --himmel: #a9c1dc;
  --schilf: #b8964f;
  --schilf-dunkel: #8a6d33;
  --wald: #2f4a2c;
  --wald-hell: #5f7d45;
  --papier: #fffdf5;
  --papier-2: #edf1fa;
  --tinte: #27343b;
  --tinte-2: #4d5a62;
  --linie: #d3dcf0;
  --rahmen: #aebfe6;
  --marke: #f7cf4d;
  --rot: #a6402f;
  --gelb: #c99a2e;
  --gruen: #4f7a3a;
  --fokus: #e0a526;
  --schrift-titel: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --schatten: 0 10px 30px rgba(10, 20, 28, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--see-dunkel); color: var(--tinte); }
body {
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
#app { position: fixed; inset: 0; height: 100vh; height: 100dvh; overflow: hidden; }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: 800; line-height: 1.2; margin: 0 0 .4em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; margin-top: 1.1em; }
p { margin: 0 0 .7em; }
a { color: #2b5c78; }
[hidden] { display: none !important; }

button, .knopf {
  font: inherit;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid var(--tinte);
  background: #fff;
  color: var(--tinte);
  font-family: var(--schrift-titel);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:hover { background: #fff6dc; }
button:disabled { opacity: .45; cursor: default; }
button.haupt { background: var(--marke); color: var(--tinte); font-weight: 800; }
button.haupt:hover { background: #ffdd6b; }
button.gefahr { color: var(--rot); }
button[aria-pressed="true"] { background: #e3ead9; border-color: var(--gruen); }
.link-knopf { background: none; border: 0; padding: 0 2px; min-height: 0; color: inherit; text-decoration: underline; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--see); }
select, input[type="date"], input[type="number"] { font: inherit; min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 2px solid #9fb2dc; background: #fff; color: var(--tinte); }

/* ---------- Vollbilder ---------- */
.vollbild { position: absolute; inset: 0; }

/* Start */
.start:not([hidden]) { display: flex; }
.start { align-items: flex-end; justify-content: center; overflow-y: auto; }
.start-bild {
  position: absolute; inset: 0;
  background: #556 url("../img/see/bornsee-blick.jpg") center 60% / cover no-repeat;
}
.start-bild::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,32,40,0) 30%, rgba(20,32,40,.55) 70%, rgba(20,32,40,.8)); }
.start-inhalt {
  position: relative; z-index: 1; width: min(640px, 100%); padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  color: #fff;
}
.start h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); margin: 0 0 10px; }
.start h1 img { display: block; width: min(470px, 92%); height: auto; filter: drop-shadow(0 3px 14px rgba(0,0,0,.45)); }
.unterzeile { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.2rem; margin: 0 0 .7em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.start-text { max-width: 34em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.start-knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.start-knoepfe .haupt { grid-column: 1 / -1; font-size: 1.1rem; min-height: 54px; }
.start-knoepfe button:not(.haupt) { background: rgba(255,253,245,.94); }
.start-fuss { font-size: .88rem; opacity: .9; }
.start-fuss a, .start-fuss .link-knopf { color: #fff; }

/* ---------- Szene ---------- */
.szene { position: absolute; inset: 0; background: #1b2a35; }
#szene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud {
  position: absolute; left: 0; right: 0; top: 0;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: linear-gradient(180deg, rgba(16,26,34,.72), rgba(16,26,34,0));
  color: #f4f1e8; font-size: .92rem; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.hud-zeile { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hud-klein { font-size: .82rem; opacity: .9; }
.hud-zeit { font-weight: 600; }
.meldung {
  position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  background: rgba(255,253,245,.95); color: var(--tinte); border-radius: var(--radius); padding: 10px 14px;
  box-shadow: var(--schatten); font-size: .95rem;
}
.meldung .meldung-zu { float: right; margin: -4px -6px 4px 8px; min-height: 36px; padding: 4px 10px; }
.aktionen {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(16,26,34,.78), rgba(16,26,34,.5) 70%, rgba(16,26,34,0));
  display: flex; flex-direction: column; gap: 8px;
}
.aktionen-haupt { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.aktionen-haupt button { min-height: 56px; min-width: 150px; font-size: 1.08rem; font-weight: 600; }
.aktionen-haupt .anhieb { background: #a6402f; border-color: #a6402f; color: #fff; min-width: 220px; min-height: 64px; font-size: 1.2rem; }
.aktionen-haupt .kurbeln { min-width: 200px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.aktionen-haupt .kurbeln.aktiv { background: #dfe8d2; }
.aktionen-neben { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; padding-bottom: 2px; }
.aktionen-neben::-webkit-scrollbar { display: none; }
.aktionen-neben button { flex: 0 0 auto; background: rgba(255,253,247,.88); font-size: .9rem; padding: 6px 12px; }
@media (min-width: 900px) { .aktionen-neben { justify-content: center; } }

.drill-anzeige {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(62px + env(safe-area-inset-top));
  width: min(520px, calc(100% - 24px));
  background: rgba(16,26,34,.72); color: #f4f1e8; border-radius: var(--radius); padding: 10px 12px; font-size: .9rem;
}
.spannung-rahmen { position: relative; height: 18px; border-radius: 9px; background: rgba(255,255,255,.15); overflow: hidden; }
.spannung-balken { height: 100%; width: 0; background: var(--gruen); transition: background-color .15s; }
.spannung-marke { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.8); }
.drill-werte { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.mini-balken { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.mini-balken span { display: block; height: 100%; background: #d8c38a; }
.bremse { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.bremse input { flex: 1; }
.touch-seite {
  position: absolute; top: 30%; bottom: 190px; width: 22%; max-width: 160px;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-size: .85rem; border: 1px dashed rgba(255,255,255,.16); border-radius: 12px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.touch-seite:not([hidden]) { display: flex; }
.touch-seite.links { left: 8px; }
.szene.im-drill .meldung { top: calc(150px + env(safe-area-inset-top)); }
.touch-seite.rechts { right: 8px; }
.touch-seite.aktiv { background: rgba(255,255,255,.12); }

/* ---------- Panels ---------- */
.panel-huelle:not([hidden]) {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background: rgba(14,22,28,.45);
}
.panel {
  width: min(760px, 100%); max-height: 100%;
  display: flex; flex-direction: column;
  background: var(--papier); border: 7px solid var(--rahmen); border-radius: 24px; box-shadow: var(--schatten);
  overflow: hidden;
}
.panel.breit { width: min(1040px, 100%); }
.panel:focus { outline: none; }
.panel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 8px 18px; border-bottom: 2px solid var(--linie); }
.panel-kopf h2 { margin: 0; font-size: 1.4rem; }
.schliessen { flex: 0 0 auto; font-size: .9rem; }
.panel-inhalt { flex: 1 1 auto; padding: 14px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.panel-fuss:not(:empty) { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--linie); background: var(--papier-2); }
.panel-fuss .links { margin-right: auto; }

.lernkarte { border-left: 5px solid var(--marke); background: #fffaea; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 10px 0; }
.lernkarte h3 { margin-top: 0; }
.hinweis { font-size: .9rem; color: var(--tinte-2); }
.klein { font-size: .86rem; }
.warnung { border-left: 4px solid var(--rot); background: #f9ece6; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 10px 0; }
.gut { border-left: 4px solid var(--gruen); background: #eef3e6; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 10px 0; }
.lernhilfe-marke { display: inline-block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; background: #e8d9a8; color: #5a4614; border-radius: 4px; padding: 1px 6px; }

/* Formularzeilen */
.feld { display: grid; gap: 4px; margin: 10px 0; }
.feld > span { font-weight: 600; font-size: .92rem; }
.reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl button { flex: 1 1 140px; text-align: left; }
.wahl button small { display: block; color: var(--tinte-2); font-weight: 400; font-size: .82rem; }
.wahl button[aria-pressed="true"] small { color: var(--tinte); }
.karten-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.auswahlkarte { text-align: left; display: block; width: 100%; padding: 10px 12px; }
.auswahlkarte b { display: block; }
.auswahlkarte span { display: block; font-size: .86rem; color: var(--tinte-2); }
.vorschau { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 16px; background: #f5f8ff; border: 1px solid var(--linie); border-radius: 8px; padding: 10px 14px; }
.vorschau div b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tinte-2); font-weight: 600; }
.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.schalter input { width: 22px; height: 22px; accent-color: var(--see); }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { background: var(--papier-2); font-weight: 600; }

/* ---------- Seekarte ---------- */
.karte:not([hidden]) { display: flex; }
.karte { background: #e9e4d6; flex-direction: column; z-index: 10; }
.karte-kopf { padding: calc(10px + env(safe-area-inset-top)) 14px 4px; }
.karte-kopf h2 { margin: 0; font-size: 1.3rem; }
.karte-hinweis { margin: 0; font-size: .88rem; color: var(--tinte-2); }
.karte-flaeche { position: relative; flex: 1 1 auto; min-height: 0; }
#karte-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.karte-legende { position: absolute; right: 8px; top: 8px; background: rgba(255,253,245,.92); border-radius: 8px; padding: 6px 8px; font-size: .74rem; line-height: 1.3; pointer-events: none; max-width: 150px; }
.karte-legende i { display: inline-block; width: 12px; height: 10px; margin-right: 5px; vertical-align: -1px; border-radius: 2px; }
.roentgen-legende:not([hidden]) { position: absolute; left: 8px; bottom: 8px; max-width: min(420px, calc(100% - 16px)); max-height: 46%; overflow-y: auto; background: rgba(255,253,245,.95); border-radius: 8px; padding: 8px 10px; font-size: .82rem; box-shadow: var(--schatten); }
.roentgen-legende label { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; min-height: 32px; cursor: pointer; }
.roentgen-legende input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.roentgen-legende .punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 4px; }
.roentgen-legende small { display: block; color: var(--tinte-2); }
.karte-fuss { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--papier); border-top: 1px solid var(--linie); }
.karte-info { min-height: 1.4em; font-size: .94rem; margin-bottom: 6px; }
.karte-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.karte-knoepfe .haupt { margin-left: auto; }
.platz-liste { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; scrollbar-width: thin; }
.platz-liste button { flex: 0 0 auto; font-size: .9rem; }

/* ---------- Fang ---------- */
.fischfoto { width: 100%; max-height: 260px; object-fit: contain; background: #dfe3e0; border-radius: 8px; display: block; }
.foto-platzhalter { width: 100%; height: 180px; border-radius: 8px; background: repeating-linear-gradient(135deg, #e3e0d6 0 12px, #ebe8de 12px 24px); display: flex; align-items: center; justify-content: center; color: var(--tinte-2); font-size: .9rem; text-align: center; padding: 10px; }
.bildnachweis { font-size: .75rem; color: var(--tinte-2); margin: 4px 0 10px; }
.antworten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; margin: 10px 0; }
.antworten button { text-align: left; }
.antworten button:disabled { opacity: .7; }
.antworten button.richtig, .antworten button.falsch { opacity: 1; }
.frage-antworten button:disabled { opacity: .75; }
.frage-antworten button.richtig, .frage-antworten button.falsch { opacity: 1; }
.antworten button.richtig { background: #e3eed8; border-color: var(--gruen); }
.antworten button.falsch { background: #f6e1da; border-color: var(--rot); }
.massband { position: relative; height: 64px; margin: 18px 12px 8px; background: linear-gradient(#f2d66b, #e8c34a); border: 1px solid #b08f24; border-radius: 4px; }
.massband .strich { position: absolute; bottom: 0; width: 1px; background: #3a3220; }
.massband .zahl { position: absolute; top: 4px; font-size: .7rem; transform: translateX(-50%); color: #3a3220; }
.massband .fischlaenge { position: absolute; left: 0; top: 22px; height: 14px; background: rgba(46,66,80,.75); border-radius: 0 7px 7px 0; }
.massband .mindest { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--rot); }
.massband .mindest span { position: absolute; top: 40px; left: 5px; font-size: .7rem; white-space: nowrap; color: var(--rot); font-weight: 600; }
.messwerte { display: flex; gap: 24px; flex-wrap: wrap; font-size: 1.1rem; }
.messwerte b { font-family: var(--schrift-titel); font-size: 1.6rem; }
.regelblock { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 10px 0; }
.regelblock > div { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; }
.regelblock h4 { margin: 0 0 6px; font-size: .95rem; }
.regelblock dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .9rem; }
.regelblock dt { color: var(--tinte-2); }
.regelblock dd { margin: 0; font-weight: 600; }
.regelblock .quelle { font-size: .78rem; color: var(--tinte-2); margin-top: 6px; }
.regel-satz { font-weight: 600; }
.schritte { counter-reset: s; list-style: none; padding: 0; }
.schritte li { counter-increment: s; position: relative; padding: 6px 0 6px 38px; }
.schritte li::before { content: counter(s); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--marke); color: var(--tinte); border: 2px solid var(--tinte); box-sizing: border-box; font-family: var(--schrift-titel); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.steckbrief { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; }
@media (min-width: 720px) { .steckbrief.zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.wiss { font-style: italic; color: var(--tinte-2); }
.marke { display: inline-block; font-size: .78rem; border-radius: 4px; padding: 1px 7px; background: var(--papier-2); border: 1px solid var(--linie); margin-left: 6px; vertical-align: 2px; }
.marke.offen { background: #fff3c9; }

/* ---------- Fangbuch, Lexikon ---------- */
.reiter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.reiter button[aria-selected="true"] { background: var(--see); color: #fff; border-color: var(--see); }
.eintrag { border: 1px solid var(--linie); background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.eintrag-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.eintrag-kopf b { font-family: var(--schrift-titel); font-size: 1.1rem; }
.eintrag dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 2px 12px; margin: 6px 0; font-size: .86rem; }
.eintrag dl div { display: flex; gap: 6px; }
.eintrag dt { color: var(--tinte-2); }
.eintrag dd { margin: 0; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.album-karte { border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; background: #fff; text-align: left; padding: 0; display: block; width: 100%; }
.album-karte img, .album-karte .foto-platzhalter { width: 100%; height: 96px; object-fit: cover; display: block; border-radius: 0; }
.album-karte.offen img { filter: grayscale(1) contrast(.8) brightness(1.1); opacity: .55; }
.album-karte div { padding: 6px 8px; font-size: .86rem; }
.album-karte b { display: block; font-size: .95rem; }
.balken-liste { display: grid; gap: 4px; margin: 6px 0 14px; }
.balken-zeile { display: grid; grid-template-columns: 7.5em 1fr 2.5em; gap: 8px; align-items: center; font-size: .86rem; }
.balken-zeile .b { height: 14px; background: var(--see-hell); border-radius: 3px; min-width: 2px; }

/* ---------- Trainer ---------- */
.gebiet-liste { display: grid; gap: 8px; }
.gebiet-liste button { text-align: left; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.fortschritt { flex: 0 0 auto; font-size: .82rem; color: var(--tinte-2); }
.frage-text { font-size: 1.08rem; font-weight: 600; margin: 8px 0 10px; }
.frage-antworten { display: grid; gap: 8px; }
.frage-antworten button { text-align: left; display: flex; gap: 10px; }
.frage-antworten button .buchstabe { font-weight: 700; flex: 0 0 1.4em; }
.frage-antworten button.richtig { background: #e3eed8; border-color: var(--gruen); }
.frage-antworten button.falsch { background: #f6e1da; border-color: var(--rot); }
.frage-antworten button.gewaehlt { background: #e0e8ee; border-color: var(--see); }
.pruefung-kopf { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .92rem; }
.uhr { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; }
.fragen-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.fragen-nav button { min-width: 44px; padding: 4px; font-size: .8rem; }
.fragen-nav button.beantwortet { background: #e0e8ee; }
.fragen-nav button.aktuell { outline: 2px solid var(--see); }

/* Toast */
.toast:not([hidden]) {
  position: absolute; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40; background: rgba(27,42,53,.94); color: #fff; padding: 10px 16px; border-radius: 8px;
  width: max-content; max-width: calc(100% - 32px); font-size: .95rem; box-shadow: var(--schatten);
}

@media (max-width: 520px) {
  .panel-huelle:not([hidden]) { padding: 0; }
  .panel { border-radius: 0; border-width: 5px; height: 100%; max-height: 100%; }
  .panel-inhalt { padding: 12px 14px; }
  .aktionen-haupt button { min-width: 0; flex: 1 1 0; padding: 8px 8px; font-size: 1rem; }
  .aktionen-neben { flex-wrap: wrap; justify-content: center; overflow: visible; }
  .aktionen-neben button { font-size: .82rem; padding: 4px 9px; }
  .hud-zeile { display: block; }
  .hud-zeile > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aktionen-haupt .anhieb { min-width: 0; }
  .hud { font-size: .84rem; }
  .karte-knoepfe .haupt { margin-left: 0; flex: 1 1 100%; }
  .touch-seite { bottom: 220px; }
  .roentgen-legende:not([hidden]) { max-height: 36%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Drill: Beschriftung, und Meldungen rutschen unter die Drillanzeige */
.drill-titel { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; font-weight: 600; }
.drill-titel .klein { font-weight: 400; font-size: .78rem; opacity: .8; }
.drill-anzeige:not([hidden]) ~ .meldung { top: calc(62px + 138px + env(safe-area-inset-top)); }

/* Schmale Bildschirme: die Kopfzeile bricht mehrzeilig um, Meldung und Drillanzeige rücken darunter */
@media (max-width: 640px) {
  .meldung { top: calc(118px + env(safe-area-inset-top)); }
  .drill-anzeige { top: calc(116px + env(safe-area-inset-top)); }
  .drill-anzeige:not([hidden]) ~ .meldung { top: calc(116px + 142px + env(safe-area-inset-top)); }
  .drill-titel .klein { display: none; }
}

/* Seekarte: Weiter-Knopf ist nie stumm gesperrt; fehlt noch etwas, wird der Infotext hervorgehoben */
#karte-weiter.wartet { opacity: .6; }
.karte-info.blink { animation: info-blink 1s ease-out 1; border-radius: 6px; }
@keyframes info-blink { 0% { background: #f2d58a; box-shadow: 0 0 0 6px #f2d58a; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }

/* Hinweis zum Zielen und Ausholen, nur solange noch nicht geworfen ist */
.wurf-hinweis { margin: 0; text-align: center; color: #f4f1e8; font-size: .9rem; text-shadow: 0 1px 3px rgba(0,0,0,.75); }
@media (hover: none) { .wurf-hinweis .tasten { display: none; } }

/* ---------- Konto: Startzeile, „Wer angelt?", Mein Konto ---------- */
.start-knoepfe button:last-child { grid-column: 1 / -1; }
@media (min-width: 480px) {
  .start-knoepfe { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .start-knoepfe button { grid-column: span 2; }
  .start-knoepfe .haupt { grid-column: 1 / -1; }
  .start-knoepfe button:nth-child(2), .start-knoepfe button:nth-child(3) { grid-column: span 3; }
  .start-knoepfe button:last-child { grid-column: span 2; }
}
.start-angler { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.start-angler .start-name { color: #fff; font-weight: 600; min-height: 44px; padding: 0 4px; font-size: 1.05rem; }
.start-angler .start-wechsel { min-height: 44px; padding: 6px 14px; background: rgba(255,253,247,.18); color: #fff; border-color: rgba(255,255,255,.55); font-size: .92rem; }
.start-angler .start-wechsel:hover { background: rgba(255,253,247,.3); }
input[type="text"], input[type="password"] { font: inherit; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 2px solid #9fb2dc; background: #fff; color: var(--tinte); width: 100%; }
input[type="password"] { letter-spacing: .2em; }
.konto-form { max-width: 420px; }
.konto-form button[type="submit"] { margin-top: 4px; min-width: 200px; }
.konto-form .feld { margin: 8px 0; }
.konto-meldung .warnung, .konto-meldung .gut { margin: 8px 0; }
.konto-erklaerung { color: var(--tinte-2); margin-top: 12px; max-width: 34em; }
.wa-namen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 6px; }
.wa-namen button { font-size: .92rem; padding: 6px 12px; }
.wa-gast { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--linie); }
.wa-gast .link-knopf { min-height: 44px; padding: 0 2px; color: var(--see); font-weight: 600; }
.wa-gast .klein { color: var(--tinte-2); }
.tag-bilanz { display: flex; gap: 24px; flex-wrap: wrap; margin: 6px 0 10px; }
.tag-bilanz b { font-family: var(--schrift-titel); font-size: 1.5rem; }

/* ---------- Bestenlisten ---------- */
.bl-gast { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.bl-gast p { margin: 0; flex: 1 1 260px; }
.bl-arten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 10px; }
.bl-art { border: 1px solid var(--linie); background: #fff; border-radius: 8px; overflow: hidden; }
.bl-art-kopf { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 8px; border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; background: var(--papier-2); text-align: left; padding: 10px 12px; }
.bl-art-kopf b { font-family: var(--schrift-titel); font-size: 1.08rem; }
.bl-art-kopf span { font-size: .84rem; color: var(--see); text-decoration: underline; }
.bl-art .bl-liste { margin: 0; padding: 2px 10px 6px; }
.bl-art .bl-leer { margin: 0; padding: 12px; }
.bl-liste { list-style: none; margin: 6px 0 10px; padding: 0; }
.bl-zeile { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--linie); min-height: 44px; }
.bl-zeile:last-child { border-bottom: 0; }
.bl-rang { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.05rem; text-align: center; color: var(--tinte-2); }
.bl-wer { min-width: 0; }
.bl-wer b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bl-wer small, .bl-wert small { display: block; font-size: .8rem; color: var(--tinte-2); }
.bl-wert { text-align: right; white-space: nowrap; }
.bl-wert b { font-variant-numeric: tabular-nums; }
.bl-zeile.ich { background: #f2e7c4; border-radius: 6px; box-shadow: inset 4px 0 0 var(--schilf); }
.bl-zeile.ich .bl-rang { color: var(--tinte); }
.bl-du { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--schilf-dunkel); color: #fff; border-radius: 4px; padding: 0 5px; vertical-align: 2px; }
.bl-ich-titel { margin: 12px 0 0; font-weight: 600; font-size: .92rem; color: var(--tinte-2); }
.bl-ich-kurz { margin: 0; padding: 6px 12px 10px; font-size: .86rem; background: #f2e7c4; }
.bl-leer { color: var(--tinte-2); font-style: italic; }
.bl-umschalter { margin: 4px 0 6px; max-width: 460px; }
.bl-umschalter button { text-align: center; }
.bl-fehler { padding: 10px 0; }

/* ---------- Lernkarten ---------- */
.lk-karte {
  --lk-rahmen: #aebfe6; --lk-hell: #dfe8f8; --lk-tinte: #27343b; --lk-gelb: #f7cf4d;
  --lk-rund: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", var(--schrift);
  background: var(--lk-rahmen); border-radius: 22px; padding: 10px; color: var(--lk-tinte);
}
.lk-kopf h3, .lk-unter, .lk-box h4, .lk-nr, .lk-mass-zahl, .lk-merkmale b, .lk-frage, .lk-wort, .lk-jahr-titel b, .lk-monat, .lk-heute { font-family: var(--lk-rund); }
.lk-blatt { background: #fffdf5; border-radius: 15px; padding: 14px 14px 12px; }
.lk-kopf h3 { font-weight: 800; font-size: 1.75rem; text-align: center; margin: 0; letter-spacing: .01em; }
.lk-unter { width: fit-content; max-width: 100%; margin: 6px auto 12px; padding: 3px 14px; border-radius: 999px; background: var(--lk-hell); font-size: .88rem; font-weight: 700; text-align: center; }
.lk-unter i { font-family: var(--schrift); font-weight: 600; }
.lk-haupt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (min-width: 820px) { .lk-haupt { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.lk-bild { border: 2px dashed #9fb2dc; border-radius: 14px; background: #f5f8ff; padding: 2px; }
.lk-fisch { display: block; width: 100%; height: auto; }
.lk-fisch text { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; }
.lk-fisch .lk-marke { cursor: pointer; }
.lk-fisch .lk-marke.aktiv circle { fill: #ff9a3c; }
.lk-fisch .lk-marke.fertig circle { fill: #9fd684; }
.lk-fisch .offen { opacity: .35; }
.lk-uebung .lk-fisch .lk-marke { cursor: default; }
.lk-nr { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lk-gelb); border: 2px solid var(--lk-tinte); font-weight: 800; font-size: .95rem; line-height: 1; }
.lk-merkmale { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lk-merkmale li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; padding: 7px 9px; border-radius: 11px; background: #fff; border: 2px solid var(--lk-hell); font-size: .92rem; line-height: 1.35; cursor: pointer; }
.lk-merkmale li.aktiv { border-color: #ff9a3c; background: #fff6ea; }
.lk-merkmale li.aktiv .lk-nr { background: #ff9a3c; }
.lk-uebung .lk-merkmale { margin-top: 12px; }
.lk-uebung .lk-merkmale li { cursor: default; }
.lk-uebung .lk-merkmale .lk-nr { background: #9fd684; }
.lk-regeln { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 620px) { .lk-regeln { grid-template-columns: minmax(150px, .32fr) minmax(0, 1fr); } }
.lk-box { background: #fff; border: 2px solid var(--lk-hell); border-radius: 13px; padding: 10px 12px; }
.lk-box h4 { margin: 0 0 6px; font-size: .95rem; font-weight: 800; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; }
.lk-box p { margin: 0; }
.lk-mass { text-align: center; }
.lk-mass h4 { justify-content: center; }
.lk-mass-zahl { font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.lk-klein { font-size: .84rem; margin: 2px 0 0; }
.lk-streng { font-size: .86rem; margin-top: 6px !important; padding-top: 6px; border-top: 2px dotted var(--lk-hell); }
.lk-schluessel { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.lk-schluessel i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #f08a78; border: 1.5px solid var(--lk-tinte); vertical-align: -1px; }
.lk-jahr-zeile + .lk-jahr-zeile { margin-top: 9px; }
.lk-jahr-titel { font-size: .88rem; margin: 0 0 4px !important; }
.lk-jahr-bahn { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border: 2px solid var(--lk-tinte); border-radius: 9px; overflow: hidden; background: #edf5e3; }
.lk-monat { position: relative; z-index: 1; text-align: center; font-size: .7rem; font-weight: 700; padding: 6px 0; border-left: 1px solid rgba(39, 52, 59, .22); overflow: hidden; }
.lk-monat:first-of-type { border-left: 0; }
.lk-schon { position: absolute; top: 0; bottom: 0; background: #f08a78; }
.lk-heute { font-size: .88rem; font-weight: 700; margin-top: 8px !important; }
.lk-heute.zu { color: #9c2f1e; }
.lk-quelle { font-size: .76rem; color: var(--tinte-2); margin: 8px 0 0; }
.lk-verw { margin-top: 10px; font-size: .92rem; }
.lk-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.lk-kachel { display: block; width: 100%; padding: 6px 8px 8px; text-align: center; background: #fffdf5; border: 3px solid #aebfe6; border-radius: 16px; font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", var(--schrift); }
.lk-kachel:hover { background: #fff; border-color: #8ea4d8; }
.lk-kachel .lk-fisch { pointer-events: none; }
.lk-kachel-name { display: block; font-weight: 800; font-size: 1rem; }
.lk-kachel-stand { display: block; font-size: .78rem; color: var(--tinte-2); }
.lk-kachel-stand.ok { color: #3f7a2c; font-weight: 700; }
.lk-frage { font-size: 1.12rem; font-weight: 800; margin: 2px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lk-woerter { display: flex; flex-wrap: wrap; gap: 8px; }
.lk-wort { font-weight: 700; border: 2px solid #27343b; border-radius: 999px; background: #fff; padding: 8px 16px; }
.lk-wort:hover { background: #fff6dc; border-color: #27343b; }
.lk-wort.falsch { background: #f6c6bb; opacity: 1; text-decoration: line-through; }
.lk-wort.richtig { background: #bfe6a9; opacity: 1; }
.lk-wort.lk-weiter { background: #27343b; color: #fff; }
.lk-loesung { margin: 12px 0 10px; font-size: .95rem; }
.lk-aufgabe .gut { margin: 0 0 12px; }
@media (max-width: 520px) {
  .lk-karte { padding: 6px; border-radius: 16px; }
  .lk-blatt { padding: 10px 8px; border-radius: 11px; }
  .lk-kopf h3 { font-size: 1.45rem; }
  .lk-monat { font-size: .6rem; padding: 6px 0; }
}
