/* Schrift Fredoka (SIL Open Font License 1.1), lokal eingebunden statt von Google Fonts */
@font-face {
  font-family: 'Fredoka';
  src: url('../assets/fonts/Fredoka-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink: #ff5c9a;
  --pink-d: #d6306f;
  --yellow: #ffd23f;
  --yellow-d: #e0a800;
  --ink: #5a2140;
  --card: #fffaf4;
  --shadow: 0 6px 0 rgba(90, 33, 64, 0.18), 0 12px 30px rgba(90, 33, 64, 0.18);
  --font: 'Fredoka', 'Comic Sans MS', 'Chalkboard SE', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #ffd6e7;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
#app { position: fixed; inset: 0; overflow: hidden; background: linear-gradient(160deg, #ffd6e7, #ffeec2 60%, #d7f5ff); transition: background 0.6s; }
button { font-family: inherit; cursor: pointer; border: 0; }

/* ---------- Optionales Hintergrundbild (assets/img) ---------- */
#bgimg { position: absolute; inset: -12px; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.8s, filter 0.8s; pointer-events: none; }
#bgimg.on { opacity: 1; }
#bgimg.soft { filter: blur(6px) saturate(1.1) brightness(1.08); }
#bgimg.soft::after { content: ''; position: absolute; inset: 0; background: rgba(255, 250, 245, 0.22); }
#bgimg.title::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(255,250,245,0.42), rgba(255,250,245,0) 75%); }

/* ---------- Schwebende Deko ---------- */
#floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; transition: opacity 0.5s; }
#app.in-game #floaters { opacity: 0; }
#app.in-game #bgimg.on ~ #floaters { opacity: 0; }
#floaters img { position: absolute; opacity: 0.35; animation: floatUp linear infinite; }
@keyframes floatUp {
  from { transform: translateY(110vh) rotate(0deg); }
  to { transform: translateY(-20vh) rotate(360deg); }
}

/* ---------- Screens ---------- */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; }
.screen.active { display: flex; animation: screenIn 0.4s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  font-size: 22px; font-weight: 700; color: #fff; padding: 14px 34px; border-radius: 999px; min-width: 220px;
  letter-spacing: 0.5px; position: relative; transition: transform 0.1s;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.btn.big { font-size: 30px; padding: 16px 48px; }
.btn.pink { background: linear-gradient(#ff8ab8, var(--pink)); box-shadow: 0 6px 0 var(--pink-d), 0 10px 22px rgba(214, 48, 111, 0.35); }
.btn.yellow { background: linear-gradient(#ffe57a, var(--yellow)); color: #7a4a00; text-shadow: none; box-shadow: 0 6px 0 var(--yellow-d), 0 10px 22px rgba(224, 168, 0, 0.3); }
.btn.green { background: linear-gradient(#9be15d, #4fb53e); box-shadow: 0 6px 0 #2f8a24, 0 10px 22px rgba(47, 138, 36, 0.3); }
.btn.white { background: #fff; color: var(--ink); text-shadow: none; box-shadow: 0 6px 0 #e6cfd9; }
.btn:active { transform: translateY(4px); }
.btn.big:not(:active) { animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-1.5deg) scale(1); } 50% { transform: rotate(1.5deg) scale(1.04); } }
.btn-col { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 0 rgba(90, 33, 64, 0.18);
}
.icon-btn:active { transform: translateY(3px); }

/* ---------- Titel ---------- */
.title-wrap { margin: auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px; max-width: 520px; width: 100%; }
.mascots { display: flex; gap: 2px; justify-content: center; align-items: flex-end; padding-bottom: 6px; position: relative; z-index: 1; }
.mascots img { width: min(56px, 13vw); height: auto; animation: hop 1.2s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-16px) scale(0.95, 1.05); } 55% { transform: translateY(0) scale(1.08, 0.92); } }
.logo { margin: 18px 0 0; line-height: 0.9; display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.logo span { display: block; font-size: clamp(56px, 16vw, 92px); color: #fff; letter-spacing: 2px;
  text-shadow: 0 5px 0 var(--pink-d), 0 0 0 #000, 3px 3px 0 var(--pink-d), -3px 3px 0 var(--pink-d), 3px -3px 0 var(--pink-d), -3px -3px 0 var(--pink-d), 0 12px 20px rgba(90, 33, 64, 0.35); }
.logo .l1 { transform: rotate(-4deg); }
.logo .l2 { color: var(--yellow); transform: rotate(3deg); text-shadow: 0 5px 0 #c25b00, 3px 3px 0 #c25b00, -3px 3px 0 #c25b00, 3px -3px 0 #c25b00, -3px -3px 0 #c25b00, 0 12px 20px rgba(90, 33, 64, 0.35); }
.logo.small span { font-size: clamp(56px, 18vw, 96px); }
.tagline { font-size: clamp(18px, 5vw, 24px); font-weight: 600; margin: 12px 0 8px; color: var(--pink-d); text-shadow: 0 0 8px #fff, 0 0 14px #fff; }
.story { margin: 0 0 22px; font-size: 16px; max-width: 360px; background: rgba(255, 250, 245, 0.8); border-radius: 16px; padding: 6px 14px; }
.toggles { display: flex; gap: 12px; margin-top: 22px; }
.tgl { width: 54px; height: 54px; border-radius: 50%; background: #fff; font-size: 24px; box-shadow: 0 4px 0 rgba(90, 33, 64, 0.18); }
.tgl.off { opacity: 0.4; filter: grayscale(1); }

/* ---------- Karte ---------- */
.map-head { width: 100%; max-width: 640px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.map-title { flex: 1; font-size: 26px; font-weight: 700; }
.star-total { background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 20px; box-shadow: 0 4px 0 rgba(90, 33, 64, 0.15); }
.star-ico { color: #ffb800; text-shadow: 0 1px 0 #c27b00; }
.map-list { width: 100%; max-width: 640px; flex: 1; overflow-y: auto; padding: 6px 16px 40px; scroll-behavior: smooth; }
.world { border-radius: 28px; padding: 18px 16px 22px; margin-bottom: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.world h2 { margin: 0; font-size: 24px; }
.world .sub { margin: 2px 0 14px; opacity: 0.8; }
.world.locked { filter: grayscale(0.7); opacity: 0.75; }
.nodes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.node { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.node:nth-child(even) { margin-top: 26px; }
.node button {
  width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; font-size: 24px; font-weight: 700; color: #fff;
  background: linear-gradient(#ff8ab8, var(--pink)); box-shadow: 0 5px 0 var(--pink-d), 0 8px 16px rgba(0, 0, 0, 0.15);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}
.node button:active { transform: translateY(3px); }
.node.done button { background: linear-gradient(#9be15d, #4fb53e); box-shadow: 0 5px 0 #2f8a24, 0 8px 16px rgba(0, 0, 0, 0.15); }
.node.locked button { background: #d9cfd4; box-shadow: 0 5px 0 #b3a6ad; color: #fff; cursor: default; font-size: 18px; }
.node.current button { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.node .stars { font-size: 13px; color: #ffb800; letter-spacing: -1px; min-height: 16px; text-shadow: 0 1px 0 #c27b00; }
.node .stars .e { color: rgba(90, 33, 64, 0.2); text-shadow: none; }

/* ---------- HUD ---------- */
#scr-game { padding: env(safe-area-inset-top) 8px env(safe-area-inset-bottom); }
.hud { width: 100%; max-width: 640px; display: flex; gap: 8px; padding: 10px 4px 4px; align-items: stretch; }
.hud-card { background: var(--card); border-radius: 22px; box-shadow: 0 5px 0 rgba(90, 33, 64, 0.16); padding: 6px 10px 8px; display: flex; flex-direction: column; align-items: center; }
.hud-label { font-size: 13px; font-weight: 600; opacity: 0.6; text-transform: uppercase; letter-spacing: 1px; }
.moves-card { min-width: 82px; }
.hud-moves { font-size: 40px; font-weight: 700; line-height: 1; color: var(--pink-d); }
.hud-moves.low { color: #e8202f; animation: pulse 0.6s ease-in-out infinite; }
.hud-moves.bump { animation: bump 0.4s ease-out; }
@keyframes bump { 50% { transform: scale(1.4); color: #2f8a24; } }
.goals-card { flex: 1; }
.hud-goals { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; flex: 1; }
.goal { display: flex; align-items: center; gap: 2px; position: relative; }
.goal img { width: 40px; height: 40px; }
.goal .cnt { font-size: 22px; font-weight: 700; min-width: 24px; }
.goal.done .cnt { color: #2f8a24; }
.goal.pop img { animation: bump 0.25s ease-out; }
.hud-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hud-score { background: var(--card); border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 rgba(90, 33, 64, 0.16); min-width: 60px; text-align: center; }
.level-tag { font-weight: 700; font-size: 15px; opacity: 0.7; margin-top: 2px; }
#board-wrap { flex: 1; width: 100%; max-width: 760px; position: relative; min-height: 0; }
#board { position: absolute; inset: 0; touch-action: none; }

/* ---------- Dialoge ---------- */
.modal { position: absolute; inset: 0; background: rgba(70, 20, 50, 0.45); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; backdrop-filter: blur(3px); }
.modal.hidden { display: none; }
.card {
  background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: 26px 22px 24px; width: 100%; max-width: 400px;
  text-align: center; animation: cardIn 0.45s cubic-bezier(.2, 1.6, .4, 1); position: relative; max-height: 100%; overflow-y: auto;
}
@keyframes cardIn { from { transform: scale(0.6) translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.card h2 { margin: 0 0 4px; font-size: 30px; color: var(--pink-d); }
.card .lvl { font-weight: 600; opacity: 0.6; }
.card .row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.card .goal img { width: 52px; height: 52px; }
.card .goal .cnt { font-size: 26px; }
.card .movesinfo { font-size: 18px; margin-bottom: 18px; }
.tip { display: flex; gap: 12px; align-items: center; text-align: left; background: #fff1f7; border-radius: 20px; padding: 12px; margin: 0 0 18px; border: 2px dashed #ffb3d1; }
.tip img { width: 62px; height: 62px; flex-shrink: 0; animation: hop 1.4s ease-in-out infinite; }
.tip b { color: var(--pink-d); display: block; font-size: 18px; }
.tip span { font-size: 15px; line-height: 1.3; }
.card .btn-col { gap: 14px; }
.card .btn { min-width: 200px; font-size: 20px; padding: 12px 26px; }
.big-stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0 6px; }
.big-stars .s { font-size: 60px; color: #e9dde3; transform: scale(0.4); opacity: 0.6; transition: all 0.4s cubic-bezier(.2, 1.8, .4, 1); }
.big-stars .s:nth-child(2) { font-size: 76px; margin-top: -12px; }
.big-stars .s.on { color: #ffc400; transform: scale(1); opacity: 1; text-shadow: 0 4px 0 #c27b00, 0 0 20px rgba(255, 210, 63, 0.8); }
.score-line { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.score-line small { display: block; font-size: 14px; opacity: 0.6; font-weight: 500; }
.sad-img { width: 90px; animation: hop 1.6s ease-in-out infinite; }
.toggles-in { display: flex; gap: 12px; justify-content: center; margin: 4px 0 16px; }

/* ---------- Glückskeks ---------- */
.fortune {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); z-index: 15; max-width: min(92vw, 420px);
  background: #fffdf5; border-radius: 18px; box-shadow: var(--shadow); padding: 12px 16px 12px 70px; border: 3px solid #f3bc5f;
  font-size: 17px; animation: fortuneIn 0.5s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none;
}
.fortune.hidden { display: none; }
.fortune img { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 54px; }
.fortune b { color: #b0661a; display: block; font-size: 14px; }
.fortune i { display: block; color: #2f8a24; font-weight: 600; font-style: normal; margin-top: 2px; }
@keyframes fortuneIn { from { transform: translate(-50%, 60px) scale(0.6); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* ---------- Flieger zum Ziel ---------- */
#flyers { position: absolute; inset: 0; pointer-events: none; z-index: 12; }
#flyers img { position: absolute; width: 34px; height: 34px; left: 0; top: 0; transition: transform 0.55s cubic-bezier(.5, -0.3, .7, 1), opacity 0.55s; will-change: transform; }

/* ---------- Ende ---------- */
.end-wrap { margin: auto; text-align: center; padding: 16px; max-width: 520px; position: relative; display: flex; flex-direction: column; align-items: center; }
.end-burst { position: absolute; left: 50%; top: 80px; width: 600px; height: 600px; margin-left: -300px; margin-top: -300px; z-index: -1;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.55) 0 10deg, rgba(255, 255, 255, 0) 10deg 20deg); border-radius: 50%; animation: spin 20s linear infinite;
  mask-image: radial-gradient(circle, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.end-text { font-size: 18px; max-width: 400px; margin: 14px 0; background: rgba(255, 250, 245, 0.85); border-radius: 22px; padding: 12px 18px; box-shadow: 0 4px 0 rgba(90, 33, 64, 0.12); }
.mascots.dance img { animation: dance 0.8s ease-in-out infinite; width: min(54px, 13vw); }
@keyframes dance { 0%, 100% { transform: rotate(-12deg) translateY(0); } 50% { transform: rotate(12deg) translateY(-14px); } }
.end-stars { font-size: 24px; font-weight: 700; margin: 8px 0 14px; background: rgba(255, 250, 245, 0.85); border-radius: 999px; padding: 6px 20px; }
.credits { background: rgba(255, 250, 245, 0.88); border-radius: 20px; padding: 12px 18px; font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; z-index: 30; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-height: 640px) {
    .logo span { font-size: 54px; }
  .story { display: none; }
  .hud-moves { font-size: 32px; }
  .goal img { width: 32px; height: 32px; }
}

/* ---------- KI-Hinweis ---------- */
.ai-note { position: absolute; bottom: max(6px, env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center;
  font-size: 12px; color: rgba(90, 33, 64, 0.75); pointer-events: none; text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }

/* ---------- Glasregal im Titel (statt Eisfach) ---------- */
.shelf { position: relative; padding: 0 22px; margin-top: 8px; }
.shelf .mascots { padding: 0 6px 0; position: relative; z-index: 2; }
.shelf .mascots img { width: min(62px, 14vw); filter: drop-shadow(0 6px 4px rgba(60, 90, 80, 0.25)); }
.shelf-board {
  height: 14px; margin: -6px -10px 0; border-radius: 8px; position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(200, 238, 226, 0.85));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 -2px 0 rgba(150, 210, 195, 0.6) inset, 0 10px 18px rgba(60, 110, 95, 0.28);
  border: 1px solid rgba(140, 200, 185, 0.7);
}
.shelf-board::after { content: ''; position: absolute; left: 6%; right: 6%; top: 100%; height: 26px;
  background: radial-gradient(ellipse at top, rgba(255, 245, 200, 0.55), transparent 70%); pointer-events: none; }
.link-btn { background: none; color: var(--pink-d); font-size: 15px; font-weight: 600; margin-top: 14px; padding: 6px 12px; border-radius: 999px;
  text-decoration: underline; text-underline-offset: 3px; background: rgba(255, 250, 245, 0.7); }
.btn.white.small, #btn-scores { font-size: 18px; padding: 10px 26px; }

/* ---------- Stufen-Reiter ---------- */
.tier-tabs { display: flex; gap: 8px; width: 100%; max-width: 640px; padding: 0 16px 10px; }
.tier-tab { flex: 1; border-radius: 18px; padding: 8px 6px; background: rgba(255, 250, 245, 0.85); color: var(--ink); font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 0 rgba(90, 33, 64, 0.15); line-height: 1.15; }
.tier-tab small { display: block; font-weight: 500; font-size: 12px; opacity: 0.7; }
.tier-tab.on { background: linear-gradient(#ff8ab8, var(--pink)); color: #fff; box-shadow: 0 4px 0 var(--pink-d); }
.tier-tab.locked { opacity: 0.55; }

/* ---------- Bestenliste ---------- */
.score-card { background: rgba(255, 250, 245, 0.92); border-radius: 26px; padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.score-card h3 { margin: 0 0 10px; font-size: 20px; color: var(--pink-d); }
.big-total { font-size: 40px; font-weight: 700; line-height: 1; }
.big-total small { font-size: 15px; font-weight: 500; opacity: 0.7; display: block; margin-top: 4px; }
.tier-rows { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 14px; margin-top: 14px; font-size: 16px; }
.tier-rows b { text-align: right; }
.hof { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.hof li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 14px; }
.hof li:nth-child(odd) { background: rgba(255, 214, 231, 0.35); }
.hof li .rk { font-weight: 700; font-size: 18px; text-align: center; }
.hof li .nm { font-weight: 600; }
.hof li .nm small { display: block; font-weight: 400; font-size: 12px; opacity: 0.65; }
.hof li .sc { font-weight: 700; }
.hof li.me { background: linear-gradient(90deg, rgba(255, 210, 63, 0.45), rgba(255, 210, 63, 0.15)); }
.hof-empty { opacity: 0.7; font-size: 15px; }
.name-input { width: 100%; font: inherit; font-size: 20px; padding: 10px 14px; border-radius: 16px; border: 3px solid #ffb3d1; margin: 8px 0 16px; text-align: center; color: var(--ink); }
.name-input:focus { outline: none; border-color: var(--pink); }

/* ---------- Musik-Hinweis ---------- */
.music-toast { position: absolute; right: 14px; bottom: 14px; z-index: 14; background: rgba(255, 250, 245, 0.92); border-radius: 999px; padding: 8px 16px;
  font-weight: 600; font-size: 15px; box-shadow: 0 4px 0 rgba(90, 33, 64, 0.15); pointer-events: none; animation: fortuneIn2 0.5s cubic-bezier(.2, 1.6, .4, 1); }
.music-toast.hidden { display: none; }
@keyframes fortuneIn2 { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Glückskeks: wird per JS neben das Brett bzw. über die Kopfzeile gesetzt */
.fortune.side { animation: sideIn 0.5s cubic-bezier(.2, 1.6, .4, 1); }
.fortune.top { opacity: 0.96; }
@keyframes sideIn { from { transform: translateX(-40px) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* Titel: alles im Fluss, damit nichts überlappt */
#scr-title { overflow-y: auto; }
#scr-title .title-wrap { margin: auto auto 0; padding-bottom: 4px; }
#scr-title .btn-col { gap: 14px; }
#scr-title .toggles { margin-top: 16px; }
#scr-title .ai-note { position: static; margin: auto 0 0; padding: 10px 0 8px; }
.tgl.fs-btn { font-size: 26px; font-weight: 700; color: var(--ink); }
.tgl.fs-btn.on { background: var(--yellow); }
@media (max-height: 820px) {
  #scr-title .logo { margin-top: 8px; }
  #scr-title .logo span { font-size: clamp(48px, 13vw, 74px); }
  #scr-title .tagline { margin: 6px 0 6px; }
  #scr-title .story { margin-bottom: 14px; font-size: 15px; }
  #scr-title .btn.big { font-size: 26px; padding: 12px 40px; }
  #scr-title .btn { padding: 11px 30px; font-size: 20px; }
  #scr-title .btn-col { gap: 11px; }
  #scr-title .toggles { margin-top: 12px; }
  #scr-title .tgl { width: 48px; height: 48px; font-size: 21px; }
  #scr-title .link-btn { margin-top: 8px; }
}

/* ---------- Kühlschrank-Atmosphäre ---------- */
.spark { position: absolute; display: block; background: radial-gradient(circle, #fff 0 20%, rgba(255, 252, 220, 0.9) 35%, rgba(255, 255, 255, 0) 70%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle ease-in-out infinite; filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9)); }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 50% { opacity: 0.95; transform: scale(1) rotate(45deg); } }
.frost { position: absolute; top: -30px; display: block; opacity: 0.75;
  background: conic-gradient(from 0deg, transparent 0 40deg, rgba(255,255,255,0.95) 40deg 50deg, transparent 50deg 100deg, rgba(255,255,255,0.95) 100deg 110deg, transparent 110deg 160deg, rgba(255,255,255,0.95) 160deg 170deg, transparent 170deg 220deg, rgba(255,255,255,0.95) 220deg 230deg, transparent 230deg 280deg, rgba(255,255,255,0.95) 280deg 290deg, transparent 290deg 340deg, rgba(255,255,255,0.95) 340deg 350deg, transparent 350deg);
  border-radius: 50%; filter: drop-shadow(0 0 2px rgba(180, 225, 255, 0.9)); animation: frostFall linear infinite; }
@keyframes frostFall {
  from { transform: translate(0, -5vh) rotate(0deg); }
  to { transform: translate(var(--drift), 110vh) rotate(240deg); }
}
.fog { position: absolute; left: -20%; right: -20%; bottom: -40px; height: 34vh; pointer-events: none;
  background: radial-gradient(ellipse 40% 60% at 30% 100%, rgba(235, 248, 255, 0.75), transparent 70%),
              radial-gradient(ellipse 45% 55% at 75% 100%, rgba(240, 250, 255, 0.65), transparent 70%);
  animation: fogMove 14s ease-in-out infinite alternate; }
@keyframes fogMove { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

/* ---------- Rückweg zu echotec.de, Impressum, Datenschutz ---------- */
.rechtlich { display: flex; justify-content: center; gap: 18px; font-size: 13px; padding: 0 0 max(10px, env(safe-area-inset-bottom)); position: relative; z-index: 2; }
.rechtlich a { color: var(--ink); opacity: .75; text-decoration: underline; text-underline-offset: 3px; }
.rechtlich a:hover, .rechtlich a:focus-visible { opacity: 1; }
.end-wrap .rechtlich { margin-top: 4px; }

/* ---------- Spenden-Bildschirm ---------- */
.spende-wrap { width: 100%; max-width: 640px; flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 16px 40px; }
.spende-card { background: rgba(255, 250, 245, 0.92); border-radius: 24px; padding: 22px 20px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.spende-card p { margin: 0; line-height: 1.5; font-size: 17px; }
.spende-card .spende-hinweis { font-size: 13px; opacity: .7; }
