/*
 * Ondalu – Gestaltung der Bedienoberfläche, Fassung 2 „Glas und Licht“
 *
 * Zwei Themen über Variablen: hell (Standard) und dunkel (html[data-theme="dark"],
 * gesetzt von main.js nach Einstellung oder Systemvorgabe). Der Teich selbst
 * wird im Canvas gezeichnet (render.js) und nutzt passende Farbtöne.
 *
 * Gestaltung:
 *   - Flächen aus mattem Glas (halbtransparent, Hintergrund unscharf), feine
 *     Lichtkante oben, weiche Schatten. Der Teich scheint durch.
 *   - Hauptknopf golden wie ein erwachter Lumi, mit wanderndem Glanzstreif.
 *   - Viele kleine Bewegungen: Einblenden der Startseite, federnde Fenster,
 *     gestaffelte Inhalte, aufploppende Monde, umlaufender Lichtrand im Shop.
 *     Bei „Bewegung reduzieren“ im System ist alles davon aus (ganz unten).
 * Abstände berücksichtigen die sicheren Ränder von Handys (Notch, Home-Leiste).
 */

/* Winkel für den umlaufenden Lichtrand (animierbar dank Registrierung). */
@property --ang {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #eef3f8;
  --text: #14233a;
  --muted: #56647a;
  --line: rgba(20, 50, 90, 0.12);
  --accent: #2f6fb0;
  --accent-text: #ffffff;
  --gold: #e09a12;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-soft: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --shadow: 0 14px 34px rgba(20, 45, 80, 0.16), 0 2px 6px rgba(20, 45, 80, 0.08);
  --cta: linear-gradient(135deg, #ffe7a6 0%, #ffc45e 46%, #f29a36 100%);
  --cta-text: #3b2306;
  --cta-glow: 0 10px 30px rgba(236, 150, 40, 0.38);
  --title-a: #1c3a5e;
  --title-b: #2f6fb0;
  --title-c: #d08c18;
  --scrim: rgba(18, 34, 58, 0.32);
  --veil-top: rgba(238, 243, 248, 0.88);
  --veil-bottom: rgba(238, 243, 248, 0.7);
  --radius: 20px;
  --spring: cubic-bezier(0.2, 1.25, 0.35, 1);
  /*
   * Sichere Ränder (Statusleiste, Notch, Home-Leiste). In der Android-App setzt
   * Capacitor 8 (SystemBars) die Variablen --safe-area-inset-*, weil ältere
   * WebViews env() nicht richtig melden; sonst gilt env(). render.js liest
   * dieselben Werte, um den Teich unter Kopf- und Fußleiste einzupassen.
   */
  --sa-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sa-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a1322;
  --text: #eaf2ff;
  --muted: #9cabc4;
  --line: rgba(170, 205, 255, 0.14);
  --accent: #7cc4ff;
  --accent-text: #07111e;
  --gold: #ffcf5a;
  --glass: rgba(16, 28, 50, 0.56);
  --glass-strong: rgba(17, 29, 52, 0.86);
  --glass-soft: rgba(30, 48, 80, 0.4);
  --glass-border: rgba(170, 205, 255, 0.16);
  --glass-edge: rgba(200, 225, 255, 0.18);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --cta-glow: 0 10px 34px rgba(255, 176, 64, 0.42);
  --title-a: #bcdcff;
  --title-b: #ffffff;
  --title-c: #ffd27a;
  --scrim: rgba(2, 6, 14, 0.55);
  --veil-top: rgba(10, 19, 34, 0.86);
  --veil-bottom: rgba(10, 19, 34, 0.62);
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Ausgeblendete Elemente bleiben ausgeblendet, auch wenn unten display gesetzt ist. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Hiragino Sans", "PingFang SC", "Malgun Gothic", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

svg { width: 20px; height: 20px; flex: none; }

/* Teich über die ganze Fläche; Gesten gehören dem Spiel, nicht dem Browser. */
#pond {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
}

/* Glasfläche: gemeinsame Grundlage für Knöpfe, Leisten, Karten. */
.glass, .icon, .pill, .secondary, .chip, .card, #toast {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-edge);
}

/* Hinweis „Testumgebung“ (nur im Browser) */
#testbar {
  position: fixed;
  left: 50%;
  top: calc(var(--sa-top) + 10px);
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 25;
}
/* Im Teich stört der Hinweis die Kopfleiste: dort ausblenden. */
body.ingame #testbar { display: none; }

/* Kopfleiste und untere Leiste im Teich */
#hud, #bar {
  position: fixed;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 10;
  animation: fade-in 0.5s ease both;
}
#hud {
  top: 0;
  height: calc(64px + var(--sa-top));
  padding-top: var(--sa-top);
}
#bar {
  bottom: 0;
  height: calc(76px + var(--sa-bottom));
  padding-bottom: var(--sa-bottom);
  justify-content: space-between;
  gap: 10px;
}
.hud-info { flex: 1; min-width: 0; line-height: 1.2; }
#hudTitle {
  font-weight: 650;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px var(--bg);
}
#hudBest { color: var(--muted); font-size: 12.5px; text-shadow: 0 1px 10px var(--bg); }

/* Leben: Herz mit Anzahl, bei fehlenden Leben mit Countdown bis zum nächsten. */
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lives { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; color: var(--text); }
.lives svg { width: 17px; height: 17px; color: #ff6b8a; filter: drop-shadow(0 0 5px rgba(255, 107, 138, 0.6)); }
.lives.empty svg { color: var(--muted); filter: none; animation: twinkle 1.6s ease-in-out infinite; }
.chip.lives svg { color: #ff6b8a; }
.offer-art.lives-art svg { color: #ff6b8a; filter: drop-shadow(0 0 12px rgba(255, 107, 138, 0.7)); }

/* Regen-Knopf: Plan abspielen. Leuchtet auf, sobald alle Tropfen verplant sind. */
.rain { flex: 1; min-width: 0; height: 50px; min-height: 0; padding: 0 14px; font-size: 17px; letter-spacing: 0.02em; }
.rain:disabled { opacity: 0.5; }
.rain:disabled::after { animation: none; }
.rain.ready { animation: breathe 2.4s ease-in-out infinite; }
/* Schmale Handys: beim Glühwürmchen nur Symbol und Zahl. */
@media (max-width: 400px) { .pill-label { display: none; } .pill { padding: 0 13px; } }

/* Tropfenzähler: volle Tropfen leuchten und wiegen sich leicht. */
.drops { display: flex; gap: 3px; color: var(--accent); }
.drops svg { width: 18px; height: 18px; }
.drops .on { filter: drop-shadow(0 0 6px var(--accent)); animation: bob 3.2s ease-in-out infinite; }
.drops .on:nth-child(2n) { animation-delay: -1.1s; }
.drops .on:nth-child(3n) { animation-delay: -2.2s; }
.drops .off { opacity: 0.2; transform: scale(0.82); transition: opacity 0.4s, transform 0.4s; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  transition: transform 0.18s var(--spring), box-shadow 0.25s, background 0.25s, opacity 0.25s;
}
button:active:not(:disabled) { transform: scale(0.96); }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
}
.pill #hintIcon { color: var(--gold); display: inline-flex; filter: drop-shadow(0 0 6px var(--gold)); animation: twinkle 2.6s ease-in-out infinite; }
.pill b {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12.5px;
  display: inline-grid;
  place-items: center;
}

/* Startseite */
.screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--sa-top) + 54px) 16px calc(var(--sa-bottom) + 36px);
  background: linear-gradient(to bottom, var(--veil-top), transparent 34%, transparent 52%, var(--veil-bottom) 78%);
}
.screen[hidden] { display: none; }
.brand { text-align: center; }
.brand h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  font-weight: 400;
  font-size: clamp(58px, 17vw, 96px);
  letter-spacing: 0.07em;
  line-height: 1.05;
  background: linear-gradient(100deg, var(--title-a) 15%, var(--title-b) 42%, var(--title-c) 50%, var(--title-b) 58%, var(--title-a) 85%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 22px rgba(124, 196, 255, 0.25));
  animation: rise-in 1s var(--spring) both, shimmer 9s linear 1s infinite;
}
.tagline {
  margin: 6px 0 0;
  font-style: italic;
  color: var(--muted);
  font-size: 17px;
  letter-spacing: 0.04em;
  animation: rise-in 1s 0.2s var(--spring) both;
}
.chips { display: flex; gap: 8px; justify-content: center; margin-top: 16px; animation: rise-in 0.9s 0.35s var(--spring) both; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14px;
}
.chip svg { color: var(--gold); width: 18px; height: 18px; filter: drop-shadow(0 0 5px var(--gold)); }
.chip.plus { color: var(--accent); font-weight: 600; }
.chip.inline { box-shadow: none; background: var(--glass-soft); display: inline-flex; }
.menu { width: min(370px, 100%); display: flex; flex-direction: column; gap: 12px; }
.menu > * { animation: rise-in 0.8s var(--spring) both; }
.menu > :nth-child(1) { animation-delay: 0.25s; }
.menu > :nth-child(2) { animation-delay: 0.36s; }
.menu > :nth-child(3) { animation-delay: 0.47s; }

/* Knopfarten */
.primary, .secondary, .ghost, .danger {
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 650;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
/* Golden wie ein erwachter Lumi; ein Glanzstreif wandert in Abständen darüber. */
.primary {
  background: var(--cta);
  color: var(--cta-text);
  box-shadow: var(--cta-glow), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(160, 80, 0, 0.18);
  overflow: hidden;
  isolation: isolate;
}
.primary::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -40%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: skewX(-18deg) translateX(-120%);
  animation: sheen 5.5s ease-in-out 1.6s infinite;
  pointer-events: none;
  z-index: -1;
}
.primary:disabled::after { animation: none; }
.secondary { color: var(--text); }
.ghost { background: transparent; color: var(--muted); font-weight: 600; }
.big { flex-direction: column; min-height: 72px; font-size: 21px; gap: 2px; border-radius: 20px; letter-spacing: 0.01em; }
.primary.big { animation: rise-in 0.8s 0.25s var(--spring) both, breathe 3.6s ease-in-out 1.2s infinite; }
.primary small, .secondary small { display: block; font-weight: 500; font-size: 13px; opacity: 0.78; }
.secondary { flex-direction: column; gap: 3px; }
.secondary svg { margin-bottom: 2px; color: var(--accent); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.row.col { flex-direction: column; margin-top: 18px; }

/* Dialogfenster: Hintergrund verschwimmt, Karte federt auf, Inhalte folgen gestaffelt. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal.open { opacity: 1; }
.card {
  width: min(420px, 100%);
  max-height: calc(100% - var(--sa-top) - var(--sa-bottom) - 16px);
  overflow-y: auto;
  background: var(--glass-strong);
  border-radius: 28px;
  padding: 26px 20px 20px;
  transform: translateY(26px) scale(0.94);
  transition: transform 0.5s var(--spring);
  text-align: center;
  -webkit-user-select: text;
  user-select: text;
}
.modal.open .card { transform: none; }
.modal.open .card > * { animation: rise-in 0.55s var(--spring) both; }
.modal.open .card > :nth-child(2) { animation-delay: 0.06s; }
.modal.open .card > :nth-child(3) { animation-delay: 0.12s; }
.modal.open .card > :nth-child(4) { animation-delay: 0.18s; }
.modal.open .card > :nth-child(5) { animation-delay: 0.24s; }
.modal.open .card > :nth-child(n+6) { animation-delay: 0.3s; }
.card h2 {
  margin: 0 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
  font-weight: 500;
  font-size: 27px;
  letter-spacing: 0.02em;
}
.card h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.card h3.sub { margin: 22px 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; justify-content: center; font-weight: 650; }
.card p { margin: 6px 0; line-height: 1.5; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 12px !important; }
.center { text-align: center; }

/* Monde im Gewinnfenster: ploppen nacheinander auf und leuchten nach. */
.moons { display: flex; justify-content: center; gap: 12px; margin: 10px 0 8px; }
.moons svg { width: 46px; height: 46px; }
.moons span { display: inline-flex; animation: moon-pop 0.7s var(--spring) both; }
.moons span:nth-child(1) { animation-delay: 0.25s; }
.moons span:nth-child(2) { animation-delay: 0.45s; }
.moons span:nth-child(3) { animation-delay: 0.65s; }
.moons .on { color: var(--gold); filter: drop-shadow(0 0 10px var(--gold)) drop-shadow(0 0 22px rgba(255, 190, 70, 0.45)); }
.moons .off { color: var(--line); }
.reward { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 19px; }
.reward svg { color: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); animation: twinkle 2.2s ease-in-out infinite; }

/* Shop */
.shop .card { text-align: left; }
.shop h2 { text-align: center; }
.shop .chip.inline { margin: 0 auto 8px; display: flex; width: max-content; }
.product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-soft);
}
.product p { font-size: 13.5px; color: var(--muted); }
.product h3 svg { color: var(--gold); }
/* Abo: umlaufender Lichtrand (Verlauf dreht sich langsam). */
.product.hero {
  flex-direction: column;
  align-items: stretch;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box,
    conic-gradient(from var(--ang), var(--accent), var(--title-c), #ff9fc6, var(--accent)) border-box;
  animation: spin-border 6s linear infinite;
  box-shadow: 0 0 30px rgba(124, 196, 255, 0.18);
}
.product.hero h3 svg { color: var(--accent); }
.product.small { padding: 10px 14px; }
.product.small .secondary { min-height: 40px; flex: none; box-shadow: none; }
.product > .primary { flex: none; }
.skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 4px 10px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  font-size: 13px;
}
.skin small { color: var(--muted); font-size: 11.5px; }
.skin.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(124, 196, 255, 0.25); }
.skin .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); animation: glow-pulse 2.8s ease-in-out infinite; }

/* Angebot */
.offer-art { display: grid; place-items: center; margin-bottom: 6px; }
.offer-art svg { width: 58px; height: 58px; color: var(--gold); filter: drop-shadow(0 0 12px var(--gold)); animation: float 3.4s ease-in-out infinite, twinkle 2.6s ease-in-out infinite; }

/* Einstellungen */
.segs { display: flex; background: var(--glass-soft); border: 1px solid var(--line); border-radius: 16px; padding: 4px; gap: 4px; }
.seg { flex: 1; min-height: 40px; border-radius: 12px; background: transparent; font-size: 14px; color: var(--muted); }
.seg.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); font-weight: 650; }
select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass-soft);
  color: var(--text);
  font: inherit;
}
.slider, .toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  text-align: left;
}
/* Schieberegler: leuchtende Spur, runder Glasknopf. */
.slider input[type="range"] {
  flex: 0 0 52%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--title-c));
  opacity: 0.9;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 4px rgba(124, 196, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.25);
}
.slider input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 4px rgba(124, 196, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.25);
}
.toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  transition: background 0.25s;
  flex: none;
}
.toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--spring);
}
.toggle input:checked { background: linear-gradient(90deg, var(--accent), var(--title-c)); }
.toggle input:checked::after { transform: translateX(20px); }

/* Erster Start: Spielart wählen */
.choices { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 6px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
.choice svg { color: var(--accent); }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(124, 196, 255, 0.25); }

/* Zustimmungen (Kontrollkästchen) */
.checks { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; text-align: left; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 2px solid var(--muted);
  background: transparent;
  display: grid;
  place-items: center;
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-text); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }

/* Links zu Rechtstexten */
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 6px 0; }
.link { background: none; padding: 6px 2px; color: var(--accent); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ai { display: flex; align-items: center; justify-content: center; gap: 6px; }
.ai svg { width: 15px; height: 15px; color: var(--gold); }

/* Eingabefelder (E-Mail, Code, Uhrzeit) */
.field {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass-soft);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  -webkit-user-select: text;
  user-select: text;
}
.field.code { text-align: center; font-size: 26px; letter-spacing: 0.35em; font-weight: 700; }
.field.time { width: auto; min-height: 40px; margin: 0; }
.error { color: #ff6b6b; font-size: 13.5px; margin: 8px 0 0 !important; }

/* Gefährliche Aktion (Konto löschen) */
.danger { background: #d9485f; color: #fff; box-shadow: 0 8px 24px rgba(217, 72, 95, 0.35); }
.danger-text { color: #e05570; }

/* Rechtstexte und „Meine Daten“ */
.legal-modal .card { text-align: left; }
.legal h1 { font-size: 22px; margin: 6px 0 4px; }
.legal h2 { font-size: 15px; margin: 18px 0 4px; }
.legal p, .legal li { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.legal ul { padding-left: 18px; margin: 6px 0; }
.draft { background: rgba(255, 190, 70, 0.18); border: 1px solid rgba(255, 190, 70, 0.5); border-radius: 10px; padding: 8px 10px; font-weight: 600; font-size: 12.5px !important; }
.data { max-height: 46vh; overflow: auto; font-size: 11.5px; line-height: 1.4; background: var(--glass-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px; white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }

/* Werbe-Attrappe (Testumgebung) */
.ad .card { background: #0d0f14; color: #f1f3f7; border-color: rgba(255, 255, 255, 0.08); }
.adbox {
  border-radius: 18px;
  padding: 28px 16px;
  background: linear-gradient(135deg, #3b2a7a, #155e75);
}
.adtag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.adart svg { width: 64px; height: 64px; color: #ffd76a; margin: 16px 0 8px; animation: float 3s ease-in-out infinite; }
.ad .ghost { color: #aab3c2; }

/* Kurzmeldung */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sa-bottom) + 96px);
  transform: translate(-50%, 14px) scale(0.96);
  max-width: calc(100% - 32px);
  width: max-content;
  padding: 11px 18px;
  border-radius: 16px;
  background: var(--glass-strong);
  font-size: 14.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--spring);
  z-index: 60;
}
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* Nur für Bildschirmleser */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Bewegungen                                                           */
/* ------------------------------------------------------------------ */

/** Von unten einblenden. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  /* Ohne transform im Ziel: danach gilt wieder der eigene Wert (z. B. Eindrücken bei :active). */
  to { opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
/** Schimmer im Titel: Verlauf wandert langsam durch die Buchstaben. */
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -160% 0; }
}
/** Glanzstreif über dem Hauptknopf (läuft kurz, dann Pause). */
@keyframes sheen {
  0% { transform: skewX(-18deg) translateX(-120%); }
  28%, 100% { transform: skewX(-18deg) translateX(520%); }
}
/** Sanftes Atmen des großen Spielen-Knopfs. */
@keyframes breathe {
  0%, 100% { box-shadow: var(--cta-glow), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
  50% { box-shadow: 0 12px 44px rgba(255, 176, 64, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.88) rotate(12deg); } }
@keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 10px var(--c); } 50% { box-shadow: 0 0 22px var(--c); } }
@keyframes moon-pop {
  from { opacity: 0; transform: scale(0.3) rotate(-40deg); }
  to { opacity: 1; transform: none; }
}
@keyframes spin-border { to { --ang: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
