/* Mathe-Aquarium (Claude, 29.09.2026). Grundgerüst aus assets/basis.css, hier nur das Aquarium. */

:root {
  --tone: #0e7490;
  --tone-deep: #155e75;
  --tint: #e6f8fb;
  --schrift: 30px;
}

.app { grid-template-rows: auto minmax(0, 1fr); }
.task-icon svg { overflow: visible; }

/* ---------- Kopfzeile: Haus statt „Übersicht“, Zahlenraum im Menü (Alex 30.09.2026) ---------- */

.haus-btn svg { width: 29px; height: 29px; }
.menu-haupt { display: grid; gap: 14px; min-width: 0; }
/* Ohne Zahlenraum-Schalter passt der Titel ab 810 px in dieselbe Zeile (basis.css bricht bis 900 px um) */
@media (min-width: 810px) and (max-width: 900px) {
  .topbar { grid-template-rows: auto; }
  .left { grid-column: 1; grid-row: 1; }
  .task { grid-column: 2; grid-row: 1; }
  .tools { grid-column: 3; grid-row: 1; }
}

/* ---------- Sammelbuch im Becken oben links (Alex 30.09.2026: „das sammelbuch mit ins aquarium“) ---------- */

.kopf-sammeln { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; min-width: 0; }
.buch-knopf {
  gap: 7px;
  padding: 5px 13px 5px 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s, background-color .15s;
}
.buch-knopf:hover { background: var(--tint); transform: translateY(-1px); }
.buch-knopf:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.buch-knopf svg { flex: none; width: 30px; height: 30px; }
.buch-name, .buch-zahl { padding-top: 3px; font: 800 clamp(16px, 1.6vw, 21px)/1 var(--font-display); white-space: nowrap; }
.buch-zahl { color: var(--tone-deep); }
.buch-knopf.is-bump svg { animation: bump .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
/* Das Buch steht jetzt direkt davor, „gesammelt“ braucht kein zweites */
.anzeige-fang > svg { display: none; }
/* Handy: Sammelbuch + gesammelt | Luft, dann Ruhe | Tiefe, dann Spielart (überschreibt die Zeilen aus tauchgang.css) */
@media (max-width: 700px) {
  .kopf-sammeln { grid-row: 2; grid-column: 1; justify-self: start; flex-wrap: nowrap; }
  .kopfband .anzeige-luft { grid-row: 2; grid-column: 2; }
  .kopfband .anzeige-ruhe { grid-row: 3; grid-column: 1; justify-self: start; }
  .kopfband .anzeige-tiefe { grid-row: 3; grid-column: 2; }
  .kopfband .modus-schalter { grid-row: 4; grid-column: 1 / -1; }
  .buch-knopf { gap: 5px; padding: 4px 10px 4px 6px; }
  .buch-knopf svg { width: 22px; height: 22px; }
  .buch-name { display: none; }
}

.menu-leeren {
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
}
.menu-leeren.is-scharf { border-color: var(--warn); background: var(--warn-soft); color: #9a3412; }

/* ---------- Becken ---------- */

.becken-platz { position: relative; display: grid; min-height: 0; }

.becken {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #a6e0f1 0%, #69bfdb 30%, #3f97c3 68%, #2d7cab 100%);
  box-shadow: inset -7px -9px 0 rgba(28, 34, 48, .1), var(--shadow);
  touch-action: manipulation;
}

/* Glasschimmer oben links */
.becken::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, .34) 0 5%, transparent 5% 7.5%, rgba(255, 255, 255, .18) 7.5% 9%, transparent 9%);
  pointer-events: none;
}

.licht { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.licht span {
  position: absolute;
  top: -8%;
  width: 11%;
  height: 80%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
  filter: blur(6px);
  transform: skewX(-14deg);
  transform-origin: top;
  opacity: .45;
  animation: strahl 8s ease-in-out infinite alternate;
}
.licht span:nth-child(1) { left: 10%; }
.licht span:nth-child(2) { left: 33%; width: 6%; animation-duration: 10s; animation-delay: -3s; }
.licht span:nth-child(3) { left: 57%; width: 13%; animation-duration: 9s; animation-delay: -5s; }
.licht span:nth-child(4) { left: 83%; width: 5%; animation-delay: -1s; }
@keyframes strahl { from { opacity: .2; } to { opacity: .6; } }

.fern { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.riff { position: absolute; right: 0; bottom: 8%; left: 0; width: 100%; height: 34%; filter: blur(1.5px); }
.kaustik { position: absolute; top: 0; left: 0; width: 200%; height: 38%; opacity: .16; animation: kaustik 60s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.kaustik svg { width: 100%; height: 100%; }
.kaustik-sand { top: 18%; height: 82%; opacity: .22; animation-duration: 75s; -webkit-mask-image: none; mask-image: none; }
@keyframes kaustik { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.schwarm {
  position: absolute;
  top: 46%;
  left: 0;
  width: clamp(120px, 14%, 220px);
  opacity: .22;
  animation: schwarm 46s linear infinite;
}
.schwarm svg { width: 100%; height: auto; }
@keyframes schwarm { from { transform: translate3d(-30vw, 0, 0); } to { transform: translate3d(110vw, -6vh, 0); } }

.grund {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: clamp(46px, 12%, 120px);
  pointer-events: none;
}
.grund .sand { position: absolute; inset: 0; width: 100%; height: 100%; }
.pflanze { position: absolute; bottom: 42%; transform-origin: 50% 100%; }
.pflanze svg { width: 100%; height: 100%; }
.pflanze.wiegen { animation: wiegen 5.5s ease-in-out infinite alternate; }
@keyframes wiegen { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

.blasen { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.blase {
  position: absolute;
  bottom: 6%;
  width: var(--g, 14px);
  height: var(--g, 14px);
  opacity: 0;
  animation: aufsteigen var(--d, 10s) linear infinite;
  animation-delay: var(--v, 0s);
}
.blase svg, .puff svg { width: 100%; height: 100%; }
@keyframes aufsteigen {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: .85; }
  50% { transform: translate3d(var(--w, 12px), -42vh, 0); }
  90% { opacity: .7; }
  100% { transform: translate3d(0, -88vh, 0); opacity: 0; }
}
.puff { position: absolute; left: 0; top: 0; pointer-events: none; }
.teilchen {
  position: absolute;
  width: var(--g, 2px);
  height: var(--g, 2px);
  border-radius: 50%;
  background: #fff;
  opacity: .45;
  animation: treiben var(--d, 20s) ease-in-out infinite alternate;
  animation-delay: var(--v, 0s);
}
@keyframes treiben { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--w, 30px), 40px, 0); } }

/* ---------- Muscheln ---------- */

.muschel {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.muschel:not(.offen) { cursor: default; }
.muschel:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; border-radius: 16px; }
.muschel-kunst { position: relative; display: block; }
.muschel-kunst svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-deckel { transform-origin: 5.7% 66.7%; transition: transform .7s cubic-bezier(.3, 1.35, .5, 1); }
.muschel.offen .m-deckel { transform: rotate(-36deg); }
.muschel .tier-schild { position: relative; z-index: 2; transition: opacity .3s, transform .35s; }
.muschel.offen .tier-schild { transform: translateY(-.8em); }
.muschel:not(.offen) .tier-schild { opacity: 0; transform: translateY(12px) scale(.7); }
.m-perle { transition: opacity .3s; }
.muschel.ohne-perle .m-perle { opacity: 0; }
.flug-perle { position: absolute; top: 0; left: 0; }
.flug-perle svg { width: 100%; height: 100%; }

/* ---------- Tiere ---------- */

.tiere { position: absolute; inset: 0; z-index: 3; }

.tier {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tier:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; border-radius: 16px; }

.tier-bob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: bob 3.4s ease-in-out infinite;
}
.schild-oben .tier-bob { flex-direction: column-reverse; animation-duration: 1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.bew-boden .tier-bob { animation-name: trippeln; }
@keyframes trippeln { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

/* Drei Ebenen (app.js, 30.09.2026): .tier fährt, .tier-kunst dreht sich beim Wenden um die Hochachse
   (perspective + rotateY, per Web Animation), .tier-lage neigt sich in Fahrtrichtung. Das Schild bleibt gerade. */
.tier-kunst {
  display: block;
  transition: width .4s ease, height .4s ease;
}
.tier-lage { display: block; position: relative; width: 100%; height: 100%; }
.tier-kunst svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 50%; }

/* Eigene Bewegung der Zeichnung (nur transform, damit der Browser sie ohne Neuzeichnen schafft) */
.bew-schwimmen .tier-kunst svg { animation: wedeln 1.8s ease-in-out infinite; }
/* Krake und Quallen: Stoß und Pulsschlag führt app.js im Takt der Bewegung (pulsForm), hier nur der Drehpunkt */
.bew-stossen .tier-kunst svg { transform-origin: 50% 30%; }
.bew-pulsieren .tier-kunst svg { transform-origin: 50% 25%; }
.bew-schweben .tier-kunst svg { animation: schweben 4.2s ease-in-out infinite; }
.bew-gleiten .tier-kunst svg { animation: schweben 3.6s ease-in-out infinite; }
.art-mantarochen .tier-kunst svg { animation: none; }
.art-sepia .tier-kunst svg, .art-rippenqualle .tier-kunst svg { animation: schweben 4.6s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes wedeln { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }
@keyframes schweben { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.tier-schild {
  display: inline-block;
  min-width: 1.7em;
  padding: .14em .45em 0;
  border: 2.5px solid var(--ink);
  border-radius: .45em;
  background: #fff;
  color: var(--ink);
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .1);
  font: 800 var(--schrift)/1.15 var(--font-display);
  white-space: nowrap;
  text-align: center;
  transition: opacity .25s, background-color .2s, border-color .2s;
}
.tier-schild:empty { visibility: hidden; }
.tier-schild.is-ok { border-color: var(--ok); background: var(--ok-soft); color: #11632f; }
.tier-schild.is-falsch { border-color: var(--warn); background: var(--warn-soft); color: #9a3412; animation: shake .42s; }
.tier-schild.is-loesung { border-color: var(--ok); background: var(--ok-soft); color: #11632f; box-shadow: 0 0 0 7px rgba(22, 163, 74, .25); }
.tier-schild.is-leer { opacity: 0; }
.tier.erschrocken .tier-kunst svg { animation: zucken .1s linear 2; }
@keyframes zucken { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-4px, -2px); } 66% { transform: translate(4px, 1px); } }
.tier.einblenden { animation: einblenden .45s ease-out; }
.tier.ausblenden { opacity: 0; transition: opacity .3s; }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }

.flug { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.flug .tier { position: absolute; }
/* Neues Tier groß in der Mitte (app.js insBuch): Becken abgedunkelt, Lichtkranz mit langsam drehenden Strahlen */
.flug .tier.is-gross .tier-schild { opacity: 0; transition: opacity .25s; }
.gross-dunkel { position: absolute; inset: 0; z-index: 6; border-radius: inherit; opacity: 0; pointer-events: none; background: radial-gradient(circle at 50% 45%, rgba(6, 28, 48, .2), rgba(6, 28, 48, .62)); }
/* Name des neuen Tiers groß unter dem Tier (Alex 30.09.2026: „die muss noch ein bisschen präsenter sein“) */
.flug-name {
  position: absolute;
  max-width: calc(100vw - 32px);
  padding: .14em .75em .08em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset -5px -6px 0 rgba(28, 34, 48, .13), 0 16px 34px -12px rgba(6, 28, 48, .6);
  color: var(--ink);
  font: 800 clamp(30px, 5vw, 72px)/1.1 var(--font-display);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%);
}
@media (max-width: 700px) { .flug-name { white-space: normal; font-size: clamp(26px, 8vw, 40px); } }
.flug-glanz {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 251, 226, .95) 0 20%, rgba(255, 238, 170, .6) 40%, rgba(255, 238, 170, 0) 70%);
}
.flug-glanz::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 244, 196, .55) 0 7deg, rgba(255, 244, 196, 0) 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 28%, transparent 68%);
  mask: radial-gradient(circle, #000 28%, transparent 68%);
  animation: glanz-dreh 10s linear infinite;
}
@keyframes glanz-dreh { to { transform: rotate(1turn); } }

/* ---------- Kopfband: gesammelt, Schild, Ruhe ---------- */

.kopfband {
  position: absolute;
  top: 10px;
  right: 12px;
  left: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  pointer-events: none;
}
.kopfband > * { pointer-events: auto; }

.schild {
  min-width: min(320px, 100%);
  max-width: min(720px, 56vw);
  padding: 6px 24px 8px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset -5px -6px 0 rgba(28, 34, 48, .13), 0 10px 24px -12px rgba(20, 27, 45, .4);
  text-align: center;
}
.schild.is-pop { animation: schild-pop .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes schild-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.schild p { margin: 0; }
.schild-frage { color: var(--muted); font: 600 clamp(14px, calc(var(--schrift) * .55), 22px)/1.25 var(--font); }
.schild-ziel {
  padding-top: .12em;
  font: 800 clamp(34px, calc(var(--schrift) * 1.55), 74px)/1.02 var(--font-display);
  white-space: nowrap;
}
.schild-ziel .zeichen { margin: 0 .16em; color: var(--tone); }
.schild-ziel .luecke {
  display: inline-block;
  min-width: 1.2em;
  border-bottom: 4px dashed var(--tone);
  color: var(--tone);
}
.schild-ziel .gefunden { color: var(--ok); }
.schild-hinweis {
  min-height: 1.3em;
  color: var(--muted);
  font: 500 clamp(13px, calc(var(--schrift) * .5), 19px)/1.3 var(--font);
}
.schild-hinweis.is-ok { color: #11632f; }
.schild-hinweis.is-warn { color: #9a3412; }
.schild-hinweis.is-hint { color: #8a5a00; }

.anzeige {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .1);
}
.kopf-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; justify-self: start; min-width: 0; }
.modus-schalter { border: 2.5px solid var(--ink); background: rgba(255, 255, 255, .92); }
.modus-schalter button { white-space: nowrap; }
.anzeige-fang svg { width: 30px; height: 30px; }
.anzeige-fang b { padding-top: 3px; font: 800 clamp(22px, 2.4vw, 30px)/1 var(--font-display); }
.anzeige-fang span { color: var(--muted); font: 600 13px/1 var(--font); }

.anzeige-ruhe { justify-self: end; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 5px; }
.anzeige-ruhe.is-wackeln { animation: shake .5s; }
.ruhe-titel { color: var(--muted); font: 700 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.ruhe-blasen { display: flex; gap: 3px; padding-top: 9px; }
.ruhe-blasen i {
  position: relative;
  width: clamp(12px, 1.4vw, 19px);
  height: clamp(12px, 1.4vw, 19px);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: background-color .35s, transform .35s;
}
.ruhe-blasen i.voll.s1 { background: #5eead4; }
.ruhe-blasen i.voll.s2 { background: #c4b5fd; }
.ruhe-blasen i.voll.s3 { background: #fcd34d; }
.ruhe-blasen i.voll { transform: scale(1.06); }
.ruhe-blasen .marke { position: absolute; top: -12px; left: 50%; width: 11px; height: 11px; transform: translateX(-50%); --art-color: #f59e0b; }
.ruhe-blasen .marke svg { width: 100%; height: 100%; }

/* ---------- Neu im Sammelbuch ---------- */

.neu-karte {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100% - 24px));
  padding: 12px 18px 12px 12px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: inset -5px -6px 0 rgba(28, 34, 48, .13), 0 16px 30px -14px rgba(20, 27, 45, .45);
  pointer-events: none;
  animation: neu-rein .5s cubic-bezier(.2, .9, .3, 1.25);
}
@keyframes neu-rein { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
.neu-bild { flex: none; width: clamp(64px, 8vw, 110px); aspect-ratio: 1.3; }
.neu-bild svg { width: 100%; height: 100%; }
.neu-text p { margin: 0; }
.neu-titel { color: var(--tone); font: 700 12px/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase; }
.neu-name { margin: 4px 0 4px !important; padding-top: .1em; color: var(--tone-deep); font: 800 clamp(26px, 3vw, 40px)/1.05 var(--font-display); }
.neu-fakt { color: #3f4656; font: 400 clamp(13px, 1.15vw, 16px)/1.35 var(--font); }

/* ---------- Sammelbuch ---------- */

.album-schleier {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px;
  background: rgba(28, 34, 48, .38);
}
.album {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(1200px, 100%);
  height: min(860px, calc(100vh - 24px));
  height: min(860px, calc(100dvh - 24px));
  padding: 14px 16px 16px;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background: #effafd;
  box-shadow: inset -6px -8px 0 rgba(28, 34, 48, .1), 0 30px 60px -20px rgba(20, 27, 45, .5);
}
.album-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.album-icon { width: 40px; height: 40px; }
.album-titel { padding-top: .15em; font: 800 clamp(24px, 3vw, 34px)/1 var(--font-display); }
.album-zahl { color: var(--muted); font: 600 16px/1 var(--font); }
.album-zu { margin-left: auto; }
.album-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; order: 5; flex-basis: 100%; }
.code-titel { color: var(--muted); font: 600 13px/1 var(--font); }
.code-wert { padding: 5px 10px 3px; border: 2px dashed var(--tone); border-radius: 10px; background: #fff; color: var(--tone-deep); font: 800 clamp(16px, 1.8vw, 22px)/1.1 var(--font-display); letter-spacing: .08em; user-select: all; -webkit-user-select: all; }
.code-knopf { min-height: 36px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-weight: 600; }
.code-laden { background: var(--tone); border-color: var(--tone-deep); color: #fff; }
.code-form { display: flex; gap: 6px; }
.code-form input { width: min(22em, 60vw); min-height: 36px; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: 700 16px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; user-select: text; -webkit-user-select: text; }
.code-meldung { font: 500 14px/1.3 var(--font); color: var(--muted); }
.code-meldung.is-ok { color: #11632f; }
.code-meldung.is-warn { color: #9a3412; }
.album-inhalt { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 26vw, 330px); gap: 14px; min-height: 0; }
.album-raster {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 4px;
}
.album-gruppe { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 6px 2px 0; font-size: 1rem; }
.album-gruppe:first-child { margin-top: 0; }
.album-gruppe svg { width: 16px; height: 16px; }
.album-gruppe small { margin-left: auto; font-weight: 600; opacity: .7; }
.album-gruppe.s1 { --art-color: #14b8a6; }
.karte {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 16px 4px 6px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .08);
  color: var(--ink);
  text-align: center;
}
.karte:not(.is-da) { border-style: dashed; background: #e3edf2; }
.karte:not(.is-da) .karte-bild svg { filter: brightness(0); opacity: .16; }
.karte.is-aktiv { outline: 3px solid var(--tone); outline-offset: 1px; }
.karte-bild { display: grid; place-items: center; width: 100%; aspect-ratio: 1.6; }
.karte-bild svg { width: 88%; height: 88%; }
.karte-name { font: 700 clamp(11px, 1vw, 14px)/1.15 var(--font); }
.karte-nr { position: absolute; top: 5px; left: 8px; color: var(--muted); font: 700 11px/1 var(--font); }
.karte-anzahl { position: absolute; top: 5px; right: 8px; color: var(--tone-deep); font: 800 13px/1 var(--font-display); }
.karte-sterne, .detail-seltenheit { display: flex; justify-content: center; gap: 1px; --art-color: #f59e0b; }
.karte-sterne svg { width: 12px; height: 12px; }
.s2 { --art-color: #8b5cf6; }
.s3 { --art-color: #f59e0b; }
.karte-sterne.s1 { --art-color: #14b8a6; }

.album-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: inset -4px -5px 0 rgba(28, 34, 48, .08);
}
.album-detail p, .album-detail h3 { margin: 0; }
.detail-bild { display: grid; place-items: center; min-height: 140px; aspect-ratio: 1.35; padding: 6px; border-radius: 14px; background: linear-gradient(180deg, #e2f7fc, #9fd9ea); }
.detail-bild svg { width: 88%; height: 88%; }
.detail-bild.is-schatten { background: #e3edf2; }
.detail-bild.is-schatten svg { filter: brightness(0); opacity: .16; }
.detail-seltenheit { justify-content: flex-start; align-items: center; gap: 3px; color: var(--muted); font: 600 13px/1 var(--font); }
.detail-seltenheit svg { width: 14px; height: 14px; }
.detail-seltenheit.s1 { --art-color: #14b8a6; }
.detail-name { padding-top: .1em; font: 800 clamp(22px, 2.4vw, 30px)/1.05 var(--font-display); }
.detail-ort { color: var(--tone-deep); font: 600 14px/1.3 var(--font); }
.detail-fakt { font: 400 15px/1.45 var(--font); }
.detail-anzahl { color: var(--muted); font: 600 13px/1 var(--font); }

/* ---------- Schmal und hochkant ---------- */

@media (max-width: 900px) {
  .album-inhalt { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .album-detail { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: start; gap: 4px 12px; }
  .album-detail .detail-bild { grid-row: span 5; min-height: 0; }
  .album-raster { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .kopfband { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .schild { grid-column: 1 / -1; grid-row: 1; max-width: none; min-width: 0; padding: 4px 12px 6px; }
  .kopf-links, .anzeige-ruhe { grid-row: 2; }
  .anzeige-fang, .anzeige-ruhe { padding: 4px 10px; }
  .kopf-links { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .anzeige-ruhe { flex-direction: row; align-items: center; }
  .anzeige-fang svg { width: 22px; height: 22px; }
  .album-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .album-detail { grid-template-columns: 90px minmax(0, 1fr); }
  .neu-karte { right: 8px; bottom: 8px; left: 8px; }
}

/* ---------- Glitzernde Tiere (selten) ---------- */

.tier-kunst, .karte-bild, .neu-bild { position: relative; }
.funkeln { position: absolute; inset: -12%; pointer-events: none; }
.funkeln i { position: absolute; width: 17%; aspect-ratio: 1; opacity: 0; animation: funkeln 1.6s ease-in-out infinite; }
.funkeln i:nth-child(1) { top: 6%; left: 12%; }
.funkeln i:nth-child(2) { top: 0; left: 62%; width: 12%; animation-delay: -.5s; }
.funkeln i:nth-child(3) { top: 58%; left: 80%; animation-delay: -1s; }
.funkeln i:nth-child(4) { top: 72%; left: 30%; width: 10%; animation-delay: -1.3s; }
.funkeln svg { width: 100%; height: 100%; }
@keyframes funkeln { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
.tier.glitzer .tier-svg, .neu-bild.glitzer .tier-svg, .karte.is-glitzer .tier-svg {
  filter: saturate(1.3) brightness(1.08) drop-shadow(0 0 3px rgba(255, 236, 150, .95)) drop-shadow(0 0 9px rgba(250, 204, 21, .6));
}
.tier.glitzer .tier-schild { border-color: #b8860b; background: linear-gradient(180deg, #fffdf0, #fff1b8); }
.karte.is-glitzer { border-color: #d4a017; box-shadow: 0 0 0 3px rgba(250, 204, 21, .35), inset -3px -4px 0 rgba(28, 34, 48, .08); }
.karte .funkeln i { animation: none; opacity: .9; transform: scale(.8); }

/* ---------- Bewegliche Teile (Alex, 30.09.2026: „Beine und Flossen realistisch bewegen“) ----------
   Drehpunkt steht je Teil als transform-origin in tiere.js. Nur im Aquarium (.tier), nicht im Sammelbuch.
   Beine laufen nur, solange das Tier unterwegs ist (.laeuft setzt app.js). */
.tier g[class^="b-"] { animation-duration: 1.2s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; }
.tier .b-schwanz { animation-name: schwanz; animation-duration: .7s; }
.tier .b-schwanz-gross { animation-name: schwanz-gross; animation-duration: 1.15s; }
.tier .b-fluke { animation-name: fluke; animation-duration: .9s; }
.tier .b-brust { animation-name: brust; animation-duration: 1.05s; }
.tier .b-ruecken { animation-name: ruecken; animation-duration: 1.7s; }
.tier .b-ruder { animation-name: ruder; animation-duration: 1.6s; }
.tier .b-flattern { animation-name: flattern-f; animation-duration: .16s; animation-timing-function: linear; }
.tier .b-ringel { animation-name: ringel; animation-duration: 3s; }
.tier .b-faecher { animation-name: faecher; animation-duration: 2.2s; }
.tier .b-paddel { animation-name: paddel; animation-duration: 2s; }
.tier .b-paddel-klein { animation-name: paddel-klein; animation-duration: 2s; }
.tier .b-faden { animation-name: faden; animation-duration: 2.6s; }
.tier .b-arm { animation-name: arm; animation-duration: 1.7s; }
.tier .b-saum { animation-name: saum; animation-duration: .45s; }
.tier .b-kiemen, .tier .b-stacheln { animation-name: ruecken; animation-duration: 2.6s; }
.tier .b-fuehler { animation-name: fuehler; animation-duration: 1.9s; }
.tier .b-schere { animation-name: schere; animation-duration: 2.4s; }
.tier .b-schere-r { animation-name: schere-r; animation-duration: 2.4s; }
.tier .b-angel { animation-name: angel; animation-duration: 1.8s; }
.tier .b-leuchten { animation-name: leuchten; animation-duration: 1.3s; }
.tier .b-bein { animation-name: bein; animation-duration: .42s; animation-play-state: paused; }
/* Mantarochen: Welle läuft zur Flossenspitze (Spitzen bleiben beim Abschlag zurück, holen beim Aufschlag auf) */
.tier .b-welle, .tier .b-welle-u { animation-duration: 2.6s; animation-direction: normal; }
.tier .b-welle { animation-name: welle; }
.tier .b-welle-u { animation-name: welle-u; }
@keyframes welle { 0%, 100% { transform: scaleY(1) skewX(0deg); } 25% { transform: scaleY(.9) skewX(7deg); } 50% { transform: scaleY(.8) skewX(0deg); } 75% { transform: scaleY(.9) skewX(-5deg); } }
@keyframes welle-u { 0%, 100% { transform: scaleY(1) skewX(0deg); } 25% { transform: scaleY(.9) skewX(-7deg); } 50% { transform: scaleY(.8) skewX(0deg); } 75% { transform: scaleY(.9) skewX(5deg); } }
.tier.laeuft .b-bein { animation-play-state: running; }
@keyframes schwanz { from { transform: rotate(-10deg) skewY(-4deg); } to { transform: rotate(10deg) skewY(4deg); } }
@keyframes schwanz-gross { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes fluke { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
@keyframes brust { from { transform: rotate(-20deg); } to { transform: rotate(12deg); } }
@keyframes ruecken { from { transform: skewX(-5deg); } to { transform: skewX(5deg); } }
@keyframes ruder { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes flattern-f { from { transform: scaleX(.7); } to { transform: scaleX(1.1); } }
@keyframes ringel { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
@keyframes faecher { from { transform: rotate(-7deg); } to { transform: rotate(8deg); } }
@keyframes paddel { from { transform: rotate(-24deg); } to { transform: rotate(14deg); } }
@keyframes paddel-klein { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
@keyframes faden { from { transform: skewX(-8deg); } to { transform: skewX(8deg); } }
@keyframes arm { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes saum { from { transform: scaleY(.95); } to { transform: scaleY(1.05); } }
@keyframes fuehler { from { transform: rotate(-6deg); } to { transform: rotate(7deg); } }
@keyframes schere { from { transform: rotate(-7deg); } to { transform: rotate(5deg); } }
@keyframes schere-r { from { transform: rotate(7deg); } to { transform: rotate(-5deg); } }
@keyframes angel { from { transform: rotate(-8deg); } to { transform: rotate(6deg); } }
@keyframes leuchten { from { opacity: .2; } to { opacity: .75; } }
@keyframes bein { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }

@media (prefers-reduced-motion: reduce) {
  .tier g[class^="b-"] { animation: none !important; }
  .funkeln i { animation: none !important; opacity: .85; }
  .tier-bob, .tier-kunst svg, .licht span, .schwarm, .pflanze.wiegen, .blase, .kaustik, .teilchen { animation: none !important; }
  .m-deckel { transition: none; }
  .blase { display: none; }
  .tier-kunst { transition: none; }
}

/* Kopfzeile: Mit Sammelbuch und Musik stehen rechts sieben Knöpfe. Der kurze Titel „Aquarium“ erscheint nur, wenn er
   ganz in die Lücke passt (app.js setzt .zu-eng); vorher lief er über den Zahlenraum (Alex, 30.09.2026: „einkürzen bitte“). */
.task { overflow: hidden; }
.task.zu-eng { visibility: hidden; }
