:root {
  --bg-1: #0c1a2b;
  --bg-2: #1b2f4a;
  --door: #8e1b2c;
  --door-alt: #1f5c45;
  --door-wood: #6b4a2b;
  --door-locked: #2a3a52;
  --gold: #e8c170;
  --text: #fdf7ee;
  --muted: #b9c4d4;
  --card: #fffaf2;
  --card-text: #2b2420;
  --radius: 14px;
  --spring: cubic-bezier(.2, 1.4, .4, 1);
  --smooth: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top, var(--bg-2), var(--bg-1) 70%) fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Winterlandschaft ---------- */
.scene-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.aurora {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
  filter: blur(3px);
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
  animation: fade-in 3s ease both;
}
/* Kalender auf dem hellen Hintergrund gut lesbar halten */
.hero { text-shadow: 0 2px 12px rgba(20, 15, 50, .6); }
.eyebrow, .subtitle, .countdown { color: #fff; }

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero, main, .footer { position: relative; z-index: 1; }

/* ---------- Mond ---------- */
/* Der Mond ist in die Landschaft gemalt – der Knopf liegt unsichtbar darüber. */
.moon {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
}
.moon-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  opacity: 0;
  transform: scale(.4);
}
.moon.wink { animation: wobble-moon .6s var(--spring); }
.moon.wink .moon-face { animation: face 1.6s var(--smooth); }
@keyframes wobble-moon { 30% { transform: rotate(-14deg) scale(1.1); } 60% { transform: rotate(8deg); } }
@keyframes face { 15%, 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.4); } }

/* ---------- Kopfbereich ---------- */
.hero { text-align: center; padding: 3.2rem 1rem 1.5rem; }
@media (max-width: 520px) { .hero { padding-top: 4.4rem; } }

.eyebrow {
  margin: 0;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--muted);
  animation: rise .8s var(--smooth) .1s both;
}

h1 {
  font-family: "Dancing Script", cursive;
  font-size: clamp(3rem, 12vw, 5.5rem);
  margin: .2rem 0;
  color: var(--gold);
  text-shadow: 0 2px 18px rgba(232, 193, 112, .35);
  cursor: pointer;
  user-select: none;
}
h1 .letter {
  display: inline-block;
  animation: letter-in .9s var(--spring) both;
  animation-delay: calc(.3s + var(--i) * .09s);
  transition: transform .25s var(--spring), color .25s;
}
h1 .letter:hover { transform: translateY(-8px) rotate(-5deg); color: #fff3d1; }
@keyframes letter-in {
  from { opacity: 0; transform: translateY(40px) rotate(12deg) scale(.4); filter: blur(6px); }
}

.subtitle { margin: 0; color: var(--muted); animation: rise .8s var(--smooth) .7s both; }
.countdown { margin: .75rem 0 0; font-weight: 600; animation: rise .8s var(--smooth) .85s both; font-variant-numeric: tabular-nums; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Türchen ---------- */
main { max-width: 960px; margin: 0 auto; padding: 1rem 16px 3rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}

.door-wrap {
  position: relative;
  animation: door-in .7s var(--spring) both;
  animation-delay: calc(.9s + var(--i) * .045s);
}
@keyframes door-in {
  from { opacity: 0; transform: translateY(40px) scale(.6) rotate(calc((var(--i) - 12) * 1deg)); }
}

.door {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: none;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  perspective: 700px;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease-out;
}
.door:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: var(--radius); }

.door-inside {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 40%, #fff2d6, #f0d9ae 70%);
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, .35);
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--door);
}
.inside-emoji { font-size: 2.3rem; transform: scale(.3); opacity: 0; transition: transform .6s var(--spring) .25s, opacity .3s .25s; }
.inside-num { font-family: "Dancing Script", cursive; font-weight: 700; font-size: 1.1rem; opacity: 0; transition: opacity .3s .4s; }

.door-front {
  --c: var(--door);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 2px dashed rgba(232, 193, 112, .55);
  background:
    radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.18), transparent 55%),
    var(--c);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transform-origin: left center;
  transition: transform .8s var(--spring), box-shadow .3s;
  backface-visibility: hidden;
}
.door-wrap:nth-child(3n) .door-front { --c: var(--door-alt); }
.door-wrap:nth-child(4n+1) .door-front { --c: var(--door-wood); }

.door .num {
  font-family: "Dancing Script", cursive;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold);
  transition: transform .3s var(--spring);
}

/* Hover: Tür lugt einen Spalt auf */
@media (hover: hover) {
  .door:not(.locked):not(.opened):hover .door-front { transform: rotateY(-16deg); box-shadow: 8px 6px 18px rgba(0,0,0,.45); }
  .door:not(.locked):hover .num { transform: scale(1.12); }
}

/* Öffnen */
.door-wrap:has(.opened) { z-index: 2; }
.door-wrap:has(.opening) { z-index: 3; }
.door.opening .door-front { transform: rotateY(-115deg); transition-duration: .7s; transition-timing-function: var(--smooth); }
.door.opened .door-front { transform: rotateY(-72deg); }
.door.opening .inside-emoji, .door.opened .inside-emoji { transform: scale(1); opacity: 1; }
.door.opened .inside-num { opacity: .8; }
.door.opened:hover .door-front { transform: rotateY(-80deg); }

/* Gesperrt */
.door.locked { cursor: not-allowed; }
.door.locked .door-inside { visibility: hidden; }
.door.locked .door-front { --c: var(--door-locked); border-color: rgba(185, 196, 212, .3); }
.door.locked .num { color: var(--muted); }
.door.locked .door-front::after { content: "🔒"; position: absolute; right: 8px; bottom: 6px; font-size: .9rem; }

/* Heute */
.door.today .door-front { border-style: solid; animation: glow 2s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,193,112,0), 0 6px 18px rgba(0,0,0,.35); }
  50% { box-shadow: 0 0 24px 5px rgba(232,193,112,.6), 0 6px 18px rgba(0,0,0,.35); }
}
.today-badge {
  position: absolute;
  top: -10px;
  right: -6px;
  z-index: 3;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2a10;
  font-size: .75rem;
  font-weight: 800;
  pointer-events: none;
  animation: badge-bounce 1.4s var(--spring) infinite;
}
@keyframes badge-bounce { 0%, 60%, 100% { transform: translateY(0) rotate(6deg); } 30% { transform: translateY(-6px) rotate(-4deg); } }

.door.shake { animation: shake .45s; }
@keyframes shake {
  20% { transform: translateX(-6px) rotate(-3deg); }
  40% { transform: translateX(6px) rotate(3deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(3px); }
}

/* ---------- Dialog ---------- */
.dialog {
  border: none;
  padding: 0;
  border-radius: 20px;
  width: min(520px, calc(100% - 32px));
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.dialog::backdrop { background: rgba(5, 10, 20, .7); backdrop-filter: blur(4px); }
.dialog[open] { animation: dialog-in .6s var(--spring); }
.dialog[open]::backdrop { animation: fade-in .4s ease; }
.dialog.closing { animation: dialog-out .35s ease-in forwards; }
.dialog.closing::backdrop { animation: fade-in .35s ease reverse forwards; }
@keyframes dialog-in {
  from { opacity: 0; transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(.15) rotate(-8deg); }
}
@keyframes dialog-out {
  to { opacity: 0; transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(.15) rotate(8deg); }
}
@keyframes fade-in { from { opacity: 0; } }

.dialog-inner { position: relative; padding: 2rem 1.5rem 1.75rem; text-align: center; }
.dialog[open] .dialog-inner > * { animation: rise .6s var(--smooth) both; }
.dialog[open] .dialog-inner > :nth-child(2) { animation-delay: .2s; }
.dialog[open] .dialog-inner > :nth-child(3) { animation-delay: .3s; }
.dialog[open] .dialog-inner > :nth-child(4) { animation-delay: .4s; }
.dialog[open] .dialog-inner > :nth-child(5) { animation-delay: .5s; }
.dialog[open] .dialog-inner > :nth-child(6) { animation-delay: .6s; }

.dialog-day { margin: 0; text-transform: uppercase; letter-spacing: .15em; font-size: .75rem; color: #8a7a6a; }
.dialog h2 { font-family: "Dancing Script", cursive; font-size: 2.4rem; margin: .3rem 0 1rem; color: var(--door); }
.dialog img { max-width: 100%; border-radius: 12px; margin-bottom: 1rem; }
.dialog-text { white-space: pre-line; line-height: 1.6; margin: 0; }
.dialog-link {
  display: inline-block;
  margin-top: 1.25rem;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  background: var(--door);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s var(--spring), box-shadow .2s;
}
.dialog-link:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 6px 16px rgba(142, 27, 44, .35); }
.close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #8a7a6a;
  transition: transform .3s var(--spring);
}
.close:hover { transform: rotate(90deg) scale(1.15); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 160%) scale(.9);
  background: rgba(15, 25, 40, .95);
  border: 1px solid rgba(232, 193, 112, .4);
  padding: .7rem 1.2rem;
  border-radius: 20px;
  z-index: 30;
  pointer-events: none;
  transition: transform .45s var(--spring), visibility .45s;
  visibility: hidden;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0) scale(1); visibility: visible; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 0 1rem 2rem; color: var(--muted); font-size: .85rem; }
.footer-heart {
  --beat: 1;
  border: none;
  background: none;
  padding: 0 .1rem;
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
  transform: scale(var(--beat));
  transition: transform .2s var(--spring);
}
.footer-heart.beat { animation: heart-beat .35s var(--spring); }
@keyframes heart-beat { 50% { transform: scale(calc(var(--beat) * 1.4)); } }

/* ---------- Ecke oben rechts ---------- */
.corner-buttons {
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
  animation: rise .8s var(--smooth) 1.4s both;
}
.round-btn {
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(232, 193, 112, .5);
  background: rgba(15, 25, 40, .8);
  backdrop-filter: blur(4px);
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform .3s var(--spring);
}
.round-btn:hover { transform: scale(1.12) rotate(-8deg); }
.round-btn:active { transform: scale(.92); }
.round-btn.waiting { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.15); box-shadow: 0 0 16px rgba(232, 193, 112, .6); } }
.egg-badge { font-size: .9rem; font-weight: 800; padding: 0 .75rem; }
.egg-badge.pop { animation: egg-pop .7s var(--spring); }
@keyframes egg-pop { 0% { transform: scale(.3) rotate(-30deg); } 60% { transform: scale(1.3) rotate(8deg); } }

/* ---------- Effekte ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.fx-particle { position: absolute; transform: translate(-50%, -50%); line-height: 1; will-change: transform, opacity; }
.fx-particle.sparkle { color: var(--gold); text-shadow: 0 0 6px rgba(232, 193, 112, .8); }
.shooting-star {
  position: absolute;
  width: 160px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
  box-shadow: 0 0 8px #fff;
  transform-origin: left center;
}

/* ---------- Komplimente-Pop-up ---------- */
.hype {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 5, 30, .55);
  overflow: hidden;
  animation: fade-in .3s ease;
}
.hype-card {
  position: relative;
  max-width: 460px;
  width: 100%;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 28px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #c2185b, #e85d75, #f0a35e, #e85d75, #c2185b);
  background-size: 300% 300%;
  border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: shimmer 8s ease-in-out infinite, float 3s ease-in-out infinite;
}
.hype.in .hype-card {
  animation: pop-in .5s cubic-bezier(.2, 1.5, .4, 1), shimmer 8s ease-in-out infinite, float 3s ease-in-out .5s infinite;
}
@keyframes pop-in {
  0% { transform: scale(.4) rotate(-8deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes shimmer { 50% { background-position: 100% 0; } }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-.6deg); }
  50% { transform: translateY(-4px) rotate(.6deg); }
}
.hype-emojis { font-size: 2rem; animation: heartbeat 1.4s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 60%, 100% { transform: scale(1); }
  20% { transform: scale(1.2); }
  40% { transform: scale(1.08); }
}
.hype-eyebrow {
  margin: .5rem 0 .25rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .75rem;
  opacity: .85;
}
.hype-text {
  font-weight: 800;
  font-size: clamp(1.4rem, 6vw, 2rem);
  line-height: 1.3;
  margin: .5rem 0 1.25rem;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}
.hype-text .word { white-space: nowrap; }
.hype-text .word span { display: inline-block; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 40%, 100% { transform: translateY(0); } 20% { transform: translateY(-5px); } }
.hype-close {
  border: none;
  border-radius: 999px;
  padding: .75rem 1.6rem;
  font: 800 1.05rem "Nunito", sans-serif;
  color: #c2185b;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .2);
  transition: transform .15s;
}
.hype-close:hover { transform: scale(1.06); }
.hype-close:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.hype-confetti { position: absolute; inset: 0; pointer-events: none; }
.hype-confetti .piece {
  position: absolute;
  top: -40px;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.hype-confetti .piece.emoji { width: auto; height: auto; font-size: 1.6rem; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); } }

/* ---------- Schneeballschlacht ---------- */
body { touch-action: manipulation; }
.game-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.animal { position: absolute; will-change: transform; filter: drop-shadow(0 3px 2px rgba(40, 30, 80, .35)); }
.sprite {
  background-repeat: no-repeat;
  background-position: 0 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.sprite.flip { transform: scaleX(-1); }
.sprite.spin { animation: spin-slow 2s linear infinite !important; }
@keyframes sprite-steps { to { background-position: calc(-1 * var(--sheet-w)) 0; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.dizzy {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  font: 10px "Press Start 2P", monospace;
  color: #ffd34d;
  white-space: nowrap;
  animation: dizzy 0.5s linear infinite;
}
@keyframes dizzy { 50% { transform: translateX(-50%) rotate(12deg) scale(1.2); } }

.snowball {
  position: fixed;
  left: -10px;
  top: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #dfe9f5 60%, #b8c8dc);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  z-index: 45;
  pointer-events: none;
}
.splat {
  position: fixed;
  width: 54px;
  height: 54px;
  z-index: 44;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 14px, transparent 15px),
    radial-gradient(circle at 20% 30%, #fff 0 6px, transparent 7px),
    radial-gradient(circle at 80% 25%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 75% 80%, #fff 0 7px, transparent 8px),
    radial-gradient(circle at 25% 78%, #fff 0 4px, transparent 5px);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}
.float-text {
  position: fixed;
  z-index: 46;
  pointer-events: none;
  font: 12px "Press Start 2P", monospace;
  color: #fff;
  text-shadow: 2px 2px 0 #2a1d40, 0 0 10px rgba(255, 200, 230, .8);
  white-space: nowrap;
}
.float-text.big { font-size: clamp(14px, 3.6vw, 22px); }
.countdown-big {
  position: fixed;
  left: 50%;
  top: 45%;
  z-index: 46;
  pointer-events: none;
  font: clamp(2.5rem, 12vw, 5rem) "Press Start 2P", monospace;
  color: #fff;
  text-shadow: 4px 4px 0 #6b3f8a, 0 0 30px rgba(255, 180, 220, .7);
  white-space: nowrap;
}

/* Spielmodus und Sonderszenen: Kalender ausblenden, Landschaft frei */
.hero, main, .footer, .corner-buttons { transition: opacity .45s ease, visibility .45s; }
body.game-on { cursor: crosshair; }
body.game-on .hero, body.game-on main, body.game-on .footer, body.game-on .corner-buttons,
body.scene-focus .hero, body.scene-focus main, body.scene-focus .footer, body.scene-focus .corner-buttons {
  opacity: 0;
  visibility: hidden;
}
body.game-on .moon, body.scene-focus .moon { pointer-events: none; }

.game-hud {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: .5rem .6rem .5rem 1.1rem;
  border-radius: 999px;
  background: rgba(30, 22, 60, .8);
  border: 1px solid rgba(255, 220, 240, .5);
  backdrop-filter: blur(6px);
  font: 12px "Press Start 2P", monospace;
  white-space: nowrap;
  transform: translate(-50%, -120px);
  transition: transform .5s var(--spring);
}
body.game-on .game-hud { transform: translate(-50%, 0); }
.game-hud.hurry .hud-time { color: #ff7a8a; animation: heartbeat 1s ease-in-out infinite; }
.hud-time, .hud-score { display: inline-block; }
.hud-combo { color: var(--gold); }
.hud-combo:empty { display: none; }
.hud-quit {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .15);
  color: var(--text);
  cursor: pointer;
}

.mitten {
  position: fixed;
  left: 50%;
  bottom: -10px;
  z-index: 16;
  font-size: 54px;
  pointer-events: none;
  transform: translateX(-50%) translateY(120px);
  transform-origin: 50% 80%;
  transition: transform .5s var(--spring);
}
body.game-on .mitten { transform: translateX(-50%) translateY(0); }

/* Jagdszene */
.hunt-dim {
  position: fixed;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(20, 10, 30, .55) 100%);
  animation: fade-in .5s ease;
}
.hunt-stage { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.rifle { position: fixed; z-index: 17; transform-origin: 0 50%; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); }
.crosshair { position: fixed; z-index: 18; pointer-events: none; transform: translate(-50%, -50%); }
.blood { position: absolute; image-rendering: pixelated; pointer-events: none; }
.blood-drop { position: absolute; background: #b0142a; pointer-events: none; }

/* Rocko-Frage */
.rocko-modal {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 10, 40, .55);
  backdrop-filter: blur(3px);
  animation: fade-in .3s ease;
}
.rocko-card {
  width: min(420px, 100%);
  padding: 1.5rem;
  border-radius: 20px;
  text-align: center;
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: pop-in .5s var(--spring);
}
.rocko-portrait { display: flex; justify-content: center; margin: .5rem 0 1rem; animation: wobble-moon 1.2s ease-in-out infinite; }
.rocko-q { font: 14px/1.6 "Press Start 2P", monospace; margin: 0 0 1.25rem; }

.game-end {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 10, 40, .5);
  backdrop-filter: blur(3px);
  animation: fade-in .3s ease;
}
.game-end-card {
  width: min(420px, 100%);
  padding: 1.75rem 1.5rem;
  border-radius: 24px;
  text-align: center;
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: pop-in .55s var(--spring);
}
.game-end-label { margin: 0; text-transform: uppercase; letter-spacing: .15em; font-size: .75rem; color: #8a7a6a; }
.game-end-score {
  margin: .4rem 0 0;
  font: 3.2rem "Press Start 2P", monospace;
  line-height: 1.2;
  color: var(--door);
  animation: letter-in .8s var(--spring) .2s both;
}
.game-end-best { margin: .3rem 0 0; font-weight: 800; color: #b08a3a; }
.game-end-msg { margin: .8rem 0 1.4rem; }
.game-end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn-primary, .btn-ghost {
  border-radius: 999px;
  padding: .7rem 1.3rem;
  font: 800 1rem "Nunito", sans-serif;
  cursor: pointer;
  transition: transform .2s var(--spring);
}
.btn-primary { border: none; background: var(--door); color: #fff; }
.btn-ghost { border: 2px solid #d9cbb5; background: transparent; color: var(--card-text); }
.btn-primary:hover, .btn-ghost:hover { transform: scale(1.05); }

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

/* Hund mit Fuchs */
.carrier-inner { position: relative; }
.carrier-inner .sprite.carried { position: absolute; }
.spotlight {
  position: absolute;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 170, .55), rgba(255, 236, 170, 0) 65%);
  pointer-events: none;
  animation: fade-in .4s ease, spot-pulse 1.4s ease-in-out infinite;
}
@keyframes spot-pulse { 50% { transform: translate(-50%, -50%) scale(1.12); } }
.float-text.huge { font-size: clamp(18px, 5vw, 30px); color: #ffe27a; }

/* ---------- Türchen-Inhalte ---------- */
.dialog-body { display: grid; gap: 1rem; justify-items: center; }
.dialog[open] .dialog-body > * { animation: rise .6s var(--smooth) both; }
.dialog[open] .dialog-body > :nth-child(1) { animation-delay: .3s; }
.dialog[open] .dialog-body > :nth-child(2) { animation-delay: .4s; }
.dialog[open] .dialog-body > :nth-child(3) { animation-delay: .5s; }
.dialog[open] .dialog-body > :nth-child(4) { animation-delay: .6s; }
.d-icon { font-size: 3.2rem; line-height: 1; }
.dialog[open] .d-icon { animation: icon-pop .8s var(--spring) .25s both !important; }
@keyframes icon-pop { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
.d-image { max-width: 100%; border-radius: 12px; }
.d-text { white-space: pre-line; line-height: 1.6; margin: 0; }

.d-quote { margin: 0; padding: .4rem 1rem; font-family: "Dancing Script", cursive; font-size: 1.8rem; line-height: 1.3; color: var(--door); }
.d-quote cite { display: block; margin-top: .5rem; font: italic .9rem "Nunito", sans-serif; color: #8a7a6a; }

.d-list { list-style: none; margin: 0; padding: 0; text-align: left; display: grid; gap: .45rem; width: 100%; max-width: 360px; }
.d-list li {
  position: relative;
  padding: .5rem .75rem .5rem 2rem;
  border-radius: 10px;
  background: #f6ecdd;
  animation: rise .5s var(--smooth) both;
}
.d-list li::before { content: "❄"; position: absolute; left: .7rem; color: var(--door); }

.d-quiz { width: 100%; }
.d-quiz-q { font-weight: 800; margin: 0 0 .8rem; }
.d-quiz-options { display: grid; gap: .5rem; }
.d-quiz-options button {
  padding: .7rem 1rem;
  border-radius: 12px;
  border: 2px solid #e2d3bc;
  background: #fff;
  font: 600 1rem "Nunito", sans-serif;
  color: var(--card-text);
  cursor: pointer;
  transition: transform .2s var(--spring), background .2s, border-color .2s;
}
.d-quiz-options button:hover:not(:disabled) { transform: scale(1.03); border-color: var(--gold); }
.d-quiz-options button.right { background: #1f5c45; border-color: #1f5c45; color: #fff; animation: icon-pop .5s var(--spring); }
.d-quiz-options button.wrong { background: #f3dcdc; border-color: #e8b4b4; color: #9b5a5a; animation: shake .4s; }
.d-quiz.solved button:not(.right) { opacity: .45; }
.d-quiz-feedback { min-height: 1.4em; margin: .7rem 0 0; font-weight: 700; }

.d-coupon {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 1.2rem 1rem 1rem;
  border: 3px dashed var(--door);
  border-radius: 16px;
  background: repeating-linear-gradient(45deg, #fff8ec 0 12px, #fdf1de 12px 24px);
  display: grid;
  gap: .35rem;
  overflow: hidden;
}
.d-coupon-label { font: 10px "Press Start 2P", monospace; letter-spacing: .1em; color: var(--door); }
.d-coupon strong { font-family: "Dancing Script", cursive; font-size: 1.9rem; line-height: 1.1; color: var(--card-text); }
.d-coupon p { margin: 0; }
.d-coupon small { color: #8a7a6a; }
.d-coupon-btn {
  justify-self: center;
  margin-top: .5rem;
  padding: .55rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: var(--door);
  color: #fff;
  font: 800 .95rem "Nunito", sans-serif;
  cursor: pointer;
  transition: transform .2s var(--spring);
}
.d-coupon-btn:hover:not(:disabled) { transform: scale(1.06); }
.d-coupon-btn:disabled { background: #b9ad9c; cursor: default; }
.d-coupon-stamp {
  position: absolute;
  left: 50%;
  top: 46%;
  padding: .3rem .9rem;
  border: 4px solid #1f5c45;
  border-radius: 10px;
  color: #1f5c45;
  background: rgba(255, 252, 245, .55);
  font: 800 1.5rem "Nunito", sans-serif;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-14deg) scale(2.2);
  opacity: 0;
  transition: transform .45s var(--spring), opacity .2s;
}
.d-coupon.redeemed .d-coupon-stamp { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: .8; }
.dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }

/* ---------- Song-Player ---------- */
.d-audio {
  width: 100%;
  max-width: 340px;
  display: grid;
  justify-items: center;
  gap: .7rem;
  padding: 1.2rem 1rem 1rem;
  border-radius: 20px;
  background: linear-gradient(160deg, #2a2350, #5b3f86 60%, #b0609a);
  color: #fff;
  box-shadow: 0 10px 30px rgba(60, 30, 90, .35);
}
.d-vinyl {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.07) 31% 32%, transparent 33% 44%, rgba(255,255,255,.07) 45% 46%, transparent 47% 58%, rgba(255,255,255,.07) 59% 60%, transparent 61%),
    radial-gradient(circle, #222 0 70%, #111 71%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 0 3px #333;
  animation: spin-slow 3s linear infinite;
  animation-play-state: paused;
}
.d-audio.playing .d-vinyl { animation-play-state: running; }
.d-vinyl-label {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: radial-gradient(circle, #fff 0 8%, #ff9fc0 9%);
}
.d-audio-meta { display: grid; text-align: center; }
.d-audio-meta strong { font-family: "Dancing Script", cursive; font-size: 1.8rem; line-height: 1.1; }
.d-audio-meta small { opacity: .8; }
.d-play {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #5b3f86;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .2s var(--spring);
}
.d-play:hover { transform: scale(1.08); }
.d-audio.playing .d-play { animation: heartbeat 1.6s ease-in-out infinite; }
.d-progress { width: 100%; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .25); cursor: pointer; overflow: hidden; }
.d-progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, #ffd27a, #ff9fc0); border-radius: 4px; }
.d-times { width: 100%; display: flex; justify-content: space-between; font-size: .8rem; opacity: .85; font-variant-numeric: tabular-nums; }
.d-lyrics { width: 100%; max-width: 340px; text-align: left; }
.d-lyrics summary { cursor: pointer; font-weight: 800; color: var(--door); text-align: center; }
.d-lyrics p { white-space: pre-line; line-height: 1.6; margin: .6rem 0 0; }

/* ---------- Hochkant-Video ---------- */
.d-video {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 9 / 16;
  max-height: 62dvh;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.d-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .9);
  color: #c2185b;
  font-size: 1.6rem;
  cursor: pointer;
  transition: opacity .25s, transform .2s var(--spring);
}
.d-video.playing .d-video-play { opacity: 0; pointer-events: none; }

/* Platzhalter (Song/Video noch nicht da) */
.d-audio.is-placeholder, .d-video.is-placeholder {
  aspect-ratio: auto;
  max-height: none;
  display: grid;
  justify-items: center;
  gap: .4rem;
  padding: 1.4rem 1rem;
  border-radius: 18px;
  background: repeating-linear-gradient(45deg, #f6ecdd 0 12px, #f1e3cf 12px 24px);
  color: var(--card-text);
  box-shadow: none;
}
.d-ph-icon { font-size: 2.4rem; animation: heartbeat 1.6s ease-in-out infinite; }
.d-ph-text { margin: 0; font-weight: 700; text-align: center; }
