/* Mathe-Aquarium: Tauchgang (Claude, 30.09.2026). Tiefe, Tauchboot, Abzeichen, Okti, Vorbeizieher; Logik in tauchgang.js. */

/* ---------- Wasser je Zone: Farben als Variablen mit Übergang ---------- */

@property --w0 { syntax: "<color>"; inherits: false; initial-value: #a6e0f1; }
@property --w1 { syntax: "<color>"; inherits: false; initial-value: #69bfdb; }
@property --w2 { syntax: "<color>"; inherits: false; initial-value: #3f97c3; }
@property --w3 { syntax: "<color>"; inherits: false; initial-value: #2d7cab; }
@property --glanz { syntax: "<color>"; inherits: false; initial-value: rgba(255, 255, 255, .5); }

.becken {
  background:
    radial-gradient(120% 55% at 50% -12%, var(--glanz, rgba(255, 255, 255, .5)), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, var(--w0, #a6e0f1) 0%, var(--w1, #69bfdb) 30%, var(--w2, #3f97c3) 68%, var(--w3, #2d7cab) 100%);
  transition: --w0 2.6s ease, --w1 2.6s ease, --w2 2.6s ease, --w3 2.6s ease, --glanz 2.6s ease;
}
.licht { transition: opacity 2.6s ease; }
.becken[data-zone="daemmer"] .teilchen, .becken[data-zone="tiefsee"] .teilchen { opacity: .7; }
.becken[data-zone="daemmer"] .blase:nth-child(2n), .becken[data-zone="tiefsee"] .blase { visibility: hidden; }
/* Glasschimmer (.becken::after) wirkt im Dunkeln wie ein zweiter Lichtstrahl */
.becken::after { transition: opacity 2.6s ease; }
.becken[data-zone="daemmer"]::after { opacity: .5; }
.becken[data-zone="tiefsee"]::after { opacity: .18; }

.tg-lage { position: absolute; inset: 0; }
.tg-wand { position: absolute; top: 0; left: 0; width: 34%; height: 100%; }
.tg-kaustik-schwach { opacity: .09; }
.tg-berg { position: absolute; right: 0; bottom: 6%; left: 0; width: 100%; height: 30%; }
.tg-leucht {
  position: absolute;
  width: var(--g, 4px);
  height: var(--g, 4px);
  border-radius: 50%;
  background: var(--f, #67e8f9);
  box-shadow: 0 0 8px 2px var(--f, #67e8f9);
  opacity: .2;
  animation: tg-glimmen var(--d, 3s) ease-in-out infinite alternate, treiben 19s ease-in-out infinite alternate;
  animation-delay: var(--v, 0s), var(--v, 0s);
}
@keyframes tg-glimmen { from { opacity: .08; } to { opacity: .95; } }
.tg-raucher { position: absolute; bottom: 4%; aspect-ratio: 120 / 200; }
.tg-raucher > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tg-rauch { position: absolute; top: 0; right: 22%; left: 22%; height: 100%; }
.tg-rauch i {
  position: absolute;
  top: 10%;
  left: 5%;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 66, 58, .85) 0%, rgba(54, 48, 42, .5) 45%, rgba(40, 36, 32, 0) 70%);
  animation: tg-rauch 5.6s linear infinite;
}
@keyframes tg-rauch { 0% { transform: translate3d(0, 0, 0) scale(.4); opacity: 0; } 12% { opacity: .9; } 100% { transform: translate3d(-30%, -320%, 0) scale(2.6); opacity: 0; } }
.tg-schlot-nah { position: absolute; bottom: 30%; height: 190%; aspect-ratio: 120 / 200; }
.tg-schlot-nah .tg-raucher { bottom: 0; left: 0; }
.tg-kieme { animation: tg-kieme 2.4s ease-in-out infinite alternate; }
@keyframes tg-kieme { from { transform: scale(1); } to { transform: scale(.82) rotate(6deg); } }

/* ---------- Ebenen: Szene (unter den Tieren), Vorbeizieher (darüber), oben (Karte, Boot, Sprechblase) ---------- */

.tg-szene { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.tg-vorbei { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.tg-oben { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.tg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tg-strom { position: absolute; top: 0; left: 0; border-radius: 3px; background: rgba(255, 255, 255, .7); pointer-events: none; }

/* ---------- Okti ---------- */

.tg-okti { position: absolute; right: 1.2%; bottom: .6%; width: clamp(54px, 7vw, 116px); }
.tg-okti.im-boot { visibility: hidden; }
.tg-okti-flug { top: 0; right: auto; bottom: auto; left: 0; z-index: 3; }
.tg-okti-kunst { width: 100%; aspect-ratio: 170 / 180; transform-origin: 50% 100%; animation: tg-wippen 3.2s ease-in-out infinite; }
.tg-okti-kunst > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.okti-arm { animation: tg-arm 1.8s ease-in-out infinite alternate; }
.okti-augen { transform-origin: 85px 64px; animation: tg-blinzeln 5.5s infinite; }
.okti-svg .mund-freut, .okti-svg .mund-staunt, .okti-svg .okti-braue { display: none; }
[data-stimmung="freut"] .okti-svg .mund-ruhig, [data-stimmung="staunt"] .okti-svg .mund-ruhig { display: none; }
[data-stimmung="freut"] .okti-svg .mund-freut, [data-stimmung="staunt"] .okti-svg .mund-staunt, [data-stimmung="troestet"] .okti-svg .okti-braue { display: inline; }
.tg-okti[data-stimmung="freut"] .tg-okti-kunst { animation: tg-hops .55s cubic-bezier(.3, 1.6, .5, 1) 2; }
.tg-okti[data-stimmung="freut"] .okti-arm { animation-duration: .45s; }
.tg-okti[data-stimmung="staunt"] .tg-okti-kunst { animation: tg-staunen .8s ease-out; }
.tg-okti[data-stimmung="troestet"] .tg-okti-kunst { animation: tg-troesten 1.6s ease-in-out; }
@keyframes tg-wippen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes tg-arm { from { transform: rotate(-7deg); } to { transform: rotate(8deg); } }
@keyframes tg-blinzeln { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes tg-hops { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-22%) scale(1.04, .96); } }
@keyframes tg-staunen { 0% { transform: scale(1); } 30% { transform: translateY(-6%) scale(1.12); } 100% { transform: scale(1); } }
@keyframes tg-troesten { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(-8deg); } }

.tg-blase {
  position: absolute;
  max-width: min(320px, 62%);
  padding: 8px 14px 7px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .1), 0 10px 22px -12px rgba(10, 20, 40, .55);
  color: var(--ink);
  font: 600 clamp(14px, calc(var(--schrift) * .56), 20px)/1.3 var(--font);
  pointer-events: none;
  transform-origin: 90% 100%;
}
.tg-blase p { margin: 0; }
.tg-blase[hidden] { display: none; }
.tg-blase::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -11px;
  width: 16px;
  height: 16px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  border-bottom-right-radius: 4px;
  background: #fff;
  transform: rotate(45deg);
}
.tg-blase.is-links { transform-origin: 100% 80%; }
.tg-blase.is-links::after { right: -11px; bottom: 18px; transform: rotate(-45deg); }
.tg-blase.is-neu { animation: tg-blase-rein .35s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes tg-blase-rein { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }

/* Neugier: Umrisse unbekannter Tiere weit hinten (in .fern, hinter Boden und Tieren) */
.tg-umriss { position: absolute; top: 0; left: 0; opacity: .2; pointer-events: none; will-change: transform; }
.tg-umriss .tier-svg { filter: brightness(0); }
.tg-umriss.is-hell { opacity: .12; }
.tg-umriss.is-hell .tier-svg { filter: brightness(0) invert(1); }

/* ---------- Tiefenmesser im Kopfband ---------- */

.kopf-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; justify-self: end; min-width: 0; }
.anzeige-tiefe { gap: 8px; padding: 5px 10px 5px 8px; }
.tiefe-skala {
  position: relative;
  flex: none;
  width: 10px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: linear-gradient(180deg, #7fd4ea 0 20%, #3f97c3 20% 40%, #1f5f99 40% 60%, #173a5e 60% 80%, #0b1320 80% 100%);
}
.tiefe-skala i {
  position: absolute;
  top: 0;
  right: -6px;
  left: -6px;
  height: 5px;
  margin-top: -2.5px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: #f97316;
  transition: top .9s cubic-bezier(.3, .7, .3, 1);
}
.tiefe-werte { display: flex; flex-direction: column; gap: 2px; }
.tiefe-werte b { padding-top: 3px; font: 800 clamp(18px, 2vw, 26px)/1 var(--font-display); white-space: nowrap; }
.tiefe-werte span { color: var(--muted); font: 600 12px/1.1 var(--font); white-space: nowrap; }
.tiefe-orden { display: flex; align-items: center; gap: 1px; }
.orden { position: relative; display: grid; place-items: center; width: 24px; height: 30px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); }
.orden > svg { width: 100%; height: 100%; }
.orden:not(.is-da) > svg { opacity: .32; filter: grayscale(1); }
.orden.is-naechster > svg { opacity: .6; }
.orden b { position: absolute; top: 40%; right: 0; left: 0; transform: translateY(-50%); font: 800 13px/1 var(--font-display); text-align: center; }
.orden.is-da { cursor: pointer; }
.orden.is-da:hover > svg { transform: scale(1.12); }

/* ---------- Abzeichen-Karte ---------- */

.tg-karte {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: min(420px, calc(100% - 32px));
  padding: 16px 22px 18px;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background: #fff;
  box-shadow: inset -5px -6px 0 rgba(28, 34, 48, .13), 0 24px 50px -18px rgba(10, 20, 40, .6);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  animation: tg-karte-rein .6s cubic-bezier(.2, .9, .3, 1.25);
}
.tg-karte.is-weg { opacity: 0; transform: translate(-50%, -46%) scale(.94); transition: opacity .25s, transform .25s; }
@keyframes tg-karte-rein { from { opacity: 0; transform: translate(-50%, -40%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%); } }
.tg-karte-orden { width: clamp(100px, 22vh, 180px); aspect-ratio: 120 / 150; animation: tg-orden-dreh 1.1s cubic-bezier(.2, .9, .3, 1.15); }
.tg-karte-orden > svg { width: 100%; height: 100%; }
@keyframes tg-orden-dreh { from { transform: perspective(500px) rotateY(-180deg) scale(.5); } to { transform: none; } }
.tg-karte-klein { margin: 0; color: var(--tone); font: 700 13px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.tg-karte-titel { margin: 0; padding-top: .1em; font: 800 clamp(30px, 4vw, 44px)/1 var(--font-display); }
.tg-karte-text { margin: 0 0 8px; color: #3f4656; font: 500 16px/1.35 var(--font); }
.tg-karte-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tg-knopf {
  min-height: 44px;
  padding: 8px 18px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .1);
  color: var(--ink);
  font: 700 16px/1 var(--font);
  cursor: pointer;
}
.tg-knopf.is-haupt { border-color: var(--tone-deep); background: var(--tone); color: #fff; }

/* ---------- Tauchboot ---------- */

.tg-boot {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tg-boot:focus-visible { outline: 3px solid #2563eb; outline-offset: 6px; border-radius: 20px; }
.tg-boot-kunst { display: block; width: 100%; aspect-ratio: 280 / 180; }
.tg-boot-kunst > svg { display: block; width: 100%; height: 100%; }
.tg-boot.is-wartet .tg-boot-kunst, .tg-boot.is-geparkt .tg-boot-kunst { animation: tg-schaukeln 3.4s ease-in-out infinite; }
.tg-boot.is-wartet::before {
  content: "";
  position: absolute;
  inset: -8% -6%;
  border: 4px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  pointer-events: none;
  animation: tg-ring 1.6s ease-out infinite;
}
.tg-boot-knopf {
  position: absolute;
  top: 100%;
  left: 50%;
  padding: 6px 16px 3px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fde047;
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .12);
  color: var(--ink);
  font: 800 clamp(18px, 2.2vw, 26px)/1 var(--font-display);
  white-space: nowrap;
  transform: translate(-50%, 8px);
  animation: tg-puls 1.4s ease-in-out infinite;
}
.tg-boot:not(.is-wartet) .tg-boot-knopf, .tg-boot:not(.is-wartet)::before { display: none; }
.boot-schraube { animation: tg-schraube .32s linear infinite; }
.boot-okti { opacity: 0; transition: opacity .3s; }
.tg-boot.mit-okti .boot-okti { opacity: 1; }
.boot-schein { opacity: 0; transition: opacity .6s; }
.tg-boot.licht-an .boot-schein { opacity: 1; }
.tg-boot.is-geparkt { top: auto; right: 1%; bottom: 1.5%; left: auto; width: clamp(110px, 17%, 230px); cursor: default; pointer-events: none; }
@keyframes tg-schaukeln { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5%) rotate(1.5deg); } }
@keyframes tg-ring { from { opacity: .9; transform: scale(.85); } to { opacity: 0; transform: scale(1.15); } }
@keyframes tg-puls { 0%, 100% { transform: translate(-50%, 8px) scale(1); } 50% { transform: translate(-50%, 8px) scale(1.08); } }
@keyframes tg-schraube { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.15); } }

/* ---------- Tiefsee: dunkel, Scheinwerfer ---------- */

.tg-spot, .tg-kegel { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; transition: opacity .8s; will-change: transform; }
.becken.ist-dunkel .tg-spot, .becken.ist-dunkel .tg-kegel { opacity: 1; }
.tg-spot { border-radius: 50%; background: radial-gradient(circle, rgba(214, 240, 255, .36) 0%, rgba(190, 228, 255, .2) 42%, rgba(160, 210, 250, 0) 70%); }
.tg-kegel {
  width: 100px;
  background: linear-gradient(90deg, rgba(255, 250, 220, .32), rgba(210, 236, 255, .13) 70%, rgba(210, 236, 255, .05));
  transform-origin: 0 50%;
  clip-path: polygon(0 47%, 100% 6%, 100% 94%, 0 53%);
}
.tier-lage, .muschel-kunst { transition: filter .6s ease; }
.becken.ist-dunkel .tier:not(.im-licht):not(.leuchtet) .tier-lage { filter: brightness(.28) saturate(.5); }
.becken.ist-dunkel .muschel:not(.im-licht) .muschel-kunst { filter: brightness(.35) saturate(.6); }
.becken.ist-dunkel .tier-schild {
  box-shadow: inset -3px -4px 0 rgba(28, 34, 48, .1), 0 0 0 2px rgba(190, 235, 255, .45), 0 0 16px rgba(150, 215, 255, .5);
}

/* ---------- Vorbeizieher ---------- */

.vz { position: absolute; top: 0; left: 0; pointer-events: none; will-change: transform; }
.vz-dreh { width: 100%; height: 100%; }
.vz-dreh > svg { display: block; width: 100%; height: 100%; }
.vz-gruppe { position: absolute; inset: 0; animation: vz-drift 2s ease-in-out infinite alternate; }
.vz-gruppe:nth-child(2n) { animation-name: vz-drift-2; }
.vz-gruppe > svg { width: 100%; height: 100%; overflow: visible; }
@keyframes vz-drift { from { transform: translate3d(-7px, -5px, 0); } to { transform: translate3d(7px, 5px, 0); } }
@keyframes vz-drift-2 { from { transform: translate3d(6px, 4px, 0); } to { transform: translate3d(-8px, -4px, 0); } }
.vz-riese { opacity: .62; }
.vz-riese.vz-dunkel { opacity: .55; }
.vz-riese.vz-dunkel .tier-svg { filter: brightness(.35) saturate(.6); }
.vz .vz-tier { position: relative; width: 100%; height: 100%; cursor: default; pointer-events: none; will-change: auto; }
.vz .vz-tier > svg { display: block; width: 100%; height: 100%; }
.tg-bein { animation: tg-kick .9s ease-in-out infinite alternate; }
@keyframes tg-kick { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }

/* ---------- Sammelbuch: erreichte Tauchabzeichen ---------- */

.album-abzeichen { display: flex; align-items: center; gap: 4px; }
.aa-titel { margin-right: 4px; color: var(--muted); font: 600 13px/1 var(--font); }
.aa-orden { position: relative; display: grid; place-items: center; width: 30px; height: 38px; margin: 0; padding: 0; border: 0; background: none; }
.aa-orden > svg { width: 100%; height: 100%; }
.aa-orden:not(.is-da) > svg { opacity: .3; filter: grayscale(1); }
.aa-orden.is-da { cursor: pointer; }
.aa-orden b { position: absolute; right: -6px; bottom: 0; padding: 1px 4px 0; border-radius: 8px; background: var(--ink); color: #fff; font: 700 10px/1.2 var(--font); }

/* ---------- Urkunde ---------- */

.tg-urkunde-schleier {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: auto;
  background: rgba(28, 34, 48, .55);
}
.tg-urkunde-steuer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 8px 10px;
  width: min(1000px, 100%);
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
}
.tg-u-feld { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font: 600 13px/1 var(--font); }
.tg-u-feld input {
  width: min(22em, 70vw);
  min-height: 44px;
  padding: 6px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font: 700 18px/1 var(--font);
  user-select: text;
  -webkit-user-select: text;
}
.tg-u-hinweis { flex-basis: 100%; margin: 0; color: var(--muted); font: 500 13px/1.3 var(--font); text-align: center; }
.tg-urkunde-platz { width: min(1000px, 100%); container-type: inline-size; }
.tg-urkunde {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  aspect-ratio: 297 / 210;
  padding: 4.5% 6% 3.5%;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: radial-gradient(90% 60% at 50% 0%, #e6f8fb, rgba(230, 248, 251, 0) 70%), #fffdf6;
  box-shadow: inset 0 0 0 12px #e6f8fb, inset 0 0 0 15px #0e7490;
  color: var(--ink);
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.tg-u-oben { margin: 0; color: var(--tone); font: 700 2cqw/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.tg-u-titel { margin: .4cqw 0 0; color: var(--tone-deep); font: 800 8cqw/1 var(--font-display); }
.tg-u-mitte { display: flex; align-items: center; justify-content: center; gap: 4cqw; width: 100%; }
.tg-u-medaille { flex: none; width: 15cqw; aspect-ratio: 120 / 150; }
.tg-u-medaille > svg { width: 100%; height: 100%; }
.tg-u-text { max-width: 58cqw; text-align: left; }
.tg-u-text p { margin: 0; }
.tg-u-abz { color: var(--tone); font: 800 3.4cqw/1.1 var(--font-display); }
.tg-u-name { min-width: 40cqw; margin: 1.4cqw 0 .6cqw !important; padding: 0 .4cqw .2cqw; border-bottom: .3cqw dotted var(--ink); font: 800 4.6cqw/1.1 var(--font-display); }
.tg-u-satz { font: 500 2.2cqw/1.4 var(--font); }
.tg-u-klein { margin: 0; color: var(--muted); font: 600 1.5cqw/1 var(--font); }
.tg-u-tiere { display: flex; justify-content: center; gap: 1.4cqw; }
.tg-u-tiere figure { display: grid; justify-items: center; gap: .4cqw; width: 9cqw; margin: 0; }
.tg-u-tiere figure > div { display: grid; place-items: center; width: 100%; aspect-ratio: 1.4; }
.tg-u-tiere figure > div > svg { width: 100%; height: 100%; }
.tg-u-tiere figcaption { font: 600 1.2cqw/1.1 var(--font); }
.tg-u-fuss { display: flex; align-items: flex-end; justify-content: space-between; width: 100%; font: 600 1.8cqw/1 var(--font); }
.tg-u-okti { display: flex; align-items: flex-end; gap: .6cqw; }
.tg-u-okti > svg { width: 5cqw; height: auto; }
.tg-u-okti em { color: #dc2626; font: italic 800 2.6cqw/1 var(--font-display); }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body.tg-druck > *:not(.tg-urkunde-schleier) { display: none !important; }
  body.tg-druck .tg-urkunde-schleier { position: static; padding: 0; overflow: visible; background: none; }
  body.tg-druck .tg-urkunde-steuer { display: none !important; }
  body.tg-druck .tg-urkunde-platz { width: 100%; }
  body.tg-druck .tg-urkunde { height: 186mm; aspect-ratio: auto; break-inside: avoid; }
}

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

/* Am Handy: gesammelt | Ruhe in der zweiten Zeile, Spielart | Tiefe in der dritten (die Kästen hängen direkt im Raster) */
@media (max-width: 700px) {
  .kopfband { grid-template-columns: auto minmax(0, 1fr); }
  .kopf-links, .kopf-rechts { display: contents; }
  .kopf-links > *, .kopf-rechts > * { pointer-events: auto; }
  .anzeige-fang { grid-row: 2; grid-column: 1; justify-self: start; }
  .anzeige-fang span { display: none; }
  .modus-schalter { grid-row: 3; grid-column: 1; justify-self: start; }
  .anzeige-ruhe { grid-row: 2; grid-column: 2; justify-self: end; }
  .anzeige-tiefe { grid-row: 3; grid-column: 2; justify-self: end; gap: 4px; padding: 3px 6px 3px 8px; }
  .tiefe-skala, .tiefe-werte span { display: none; }
  .tiefe-orden { display: none; }
  .tg-blase { max-width: 70%; }
}

@media (prefers-reduced-motion: reduce) {
  .tg-okti-kunst, .okti-arm, .okti-augen, .tg-boot-kunst, .boot-schraube, .tg-leucht, .tg-rauch i, .tg-kieme, .tg-bein, .vz-gruppe,
  .tg-boot-knopf, .tg-boot.is-wartet::before, .tg-karte, .tg-karte-orden, .tg-blase.is-neu,
  .tg-okti[data-stimmung] .tg-okti-kunst { animation: none !important; }
  .tg-spot, .tg-kegel, .becken, .licht, .tiefe-skala i { transition: none; }
}
/* ---------- Luftvorrat und Logbuch (Alex, 30.09.2026) ---------- */

.anzeige-luft { gap: 7px; padding: 4px 10px 4px 8px; }
.anzeige-luft[hidden] { display: none; }
.luft-flasche { position: relative; flex: none; width: 13px; height: 30px; border: 2px solid var(--ink); border-radius: 6px 6px 5px 5px; background: #e5e7eb; overflow: hidden; }
.luft-flasche::before { content: ""; position: absolute; top: -1px; left: 3px; width: 3px; height: 3px; background: var(--ink); }
.luft-flasche i { position: absolute; right: 0; bottom: 0; left: 0; height: var(--luft, 100%); background: linear-gradient(180deg, #7dd3fc, #0284c7); transition: height 1s linear; }
.anzeige-luft b { font: 800 clamp(17px, 1.8vw, 22px)/1 var(--font-display); font-variant-numeric: tabular-nums; padding-top: 3px; }
.anzeige-luft.is-knapp .luft-flasche i { background: linear-gradient(180deg, #fdba74, #ea580c); }
.anzeige-luft.is-knapp { animation: tg-luft-knapp 1.2s ease-in-out infinite; }
@keyframes tg-luft-knapp { 50% { box-shadow: 0 0 0 4px rgba(234, 88, 12, .35); } }

.tg-logbuch { width: min(520px, calc(100% - 32px)); }
.tg-log-werte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 6px 0; }
.tg-log-werte div { display: grid; gap: 2px; padding: 8px 4px; border: 2px solid var(--ink); border-radius: 14px; background: var(--tint); }
.tg-log-werte b { font: 800 clamp(22px, 2.6vw, 30px)/1 var(--font-display); }
.tg-log-werte span { color: var(--muted); font: 600 12px/1.2 var(--font); }
.tg-log-orden { display: flex; justify-content: center; gap: 6px; }
.tg-log-orden .orden { width: 34px; height: 42px; }
.tg-log-tiere { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; max-width: 100%; margin-bottom: 6px; }
.tg-log-tiere span { display: grid; place-items: center; width: 42px; height: 32px; }
.tg-log-tiere svg { width: 100%; height: 100%; }
.tg-log-tiere small { color: var(--muted); font: 700 13px/1 var(--font); }

@media (max-width: 700px) {
  .anzeige-luft { grid-row: 4; grid-column: 2; justify-self: end; padding: 3px 8px 3px 6px; }
  .luft-flasche { height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .anzeige-luft.is-knapp { animation: none; }
}

/* ---------- Grafik 3D (räumlich) und 2D (flach), je nach Gerät (Alex, 30.09.2026) ---------- */

.tg-bokeh { position: absolute; inset: -40px; z-index: 4; display: none; overflow: hidden; pointer-events: none; }
.tg-bokeh i {
  position: absolute;
  width: var(--g, 50px);
  height: var(--g, 50px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(210, 240, 255, .25) 45%, rgba(210, 240, 255, 0) 70%);
  opacity: var(--o, .2);
  animation: treiben var(--d, 16s) ease-in-out infinite alternate;
  animation-delay: var(--v, 0s);
}
.tg-vignette { position: absolute; inset: 0; display: none; background: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(2, 16, 34, .3) 100%); }
.becken.is-3d .tg-bokeh, .becken.is-3d .tg-vignette { display: block; }
.becken.is-3d .fern { right: -24px; left: -24px; animation: tg-schweben-fern 17s ease-in-out infinite alternate; }
.becken.is-3d .tg-bokeh { animation: tg-schweben-vorn 13s ease-in-out infinite alternate; }
@keyframes tg-schweben-fern { from { transform: translate3d(-8px, 3px, 0); } to { transform: translate3d(8px, -3px, 0); } }
@keyframes tg-schweben-vorn { from { transform: translate3d(14px, -5px, 0); } to { transform: translate3d(-14px, 5px, 0); } }

/* 2D: nur die Schwanzflosse schwingt, keine Filter, dunkle Tiere per Deckkraft statt Filter */
.becken.is-2d .tier g[class^="b-"]:not(.b-schwanz):not(.b-schwanz-gross):not(.b-fluke) { animation: none !important; }
.becken.is-2d .tier.glitzer .tier-svg { filter: none; }
.becken.is-2d .riff { filter: none; }
.becken.is-2d .tg-umriss { display: none; }
.becken.is-2d .tier-lage, .becken.is-2d .muschel-kunst { transition: none; }
.becken.is-2d.ist-dunkel .tier:not(.im-licht):not(.leuchtet) .tier-lage { filter: none; opacity: .45; }
.becken.is-2d.ist-dunkel .muschel:not(.im-licht) .muschel-kunst { filter: none; opacity: .5; }
.becken.is-2d .vz-riese.vz-dunkel .tier-svg { filter: none; }
.becken.is-2d .vz-riese.vz-dunkel { opacity: .3; }

@media (prefers-reduced-motion: reduce) {
  .becken.is-3d .fern, .becken.is-3d .tg-bokeh, .tg-bokeh i { animation: none !important; }
}

/* Tiefe im Becken (3D): Bild schrumpft zur Unterkante hin (zum Schild), Schild vom oberen Rand her */
.becken.is-3d .tier:not(.schild-oben) .tier-kunst { transform-origin: 50% 100%; }
.becken.is-3d .tier:not(.schild-oben) .tier-schild { transform-origin: 50% 0; }

/* Vorlesen auf Knopfdruck: Lautsprecher an Oktis Sprechblase (die Blase selbst lässt Tippen durch) */
.tg-blase-knopf { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: 4px 0 0; padding: 0; border: 2px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; pointer-events: auto; vertical-align: middle; }
.tg-blase-knopf[hidden] { display: none; }
.tg-blase-knopf svg { width: 24px; height: 24px; }
@media (max-width: 1100px) { .vorlesen-btn .chip-label { display: none; } }
