.schnee-spiel { max-width: 1180px; margin: auto; }
.schnee-kicker { margin: 0 0 4px; color: #f3d59a; font-size: .75rem; font-weight: 700; letter-spacing: .14em; }
.schnee-spiel h1 { font-size: clamp(1.8rem, 3vw, 3rem); }
.schnee-einfuehrung { margin: 3px 0 12px; }
.schnee-layout { display: grid; grid-template-columns: minmax(220px,1fr) minmax(310px,1.1fr); gap: 20px; align-items: center; }
.schnee-bild { width: 100%; max-width: 510px; margin: auto; border: 1px solid #dac38f; border-radius: 20px; overflow: hidden; }
.schnee-bild svg { display: block; width: 100%; max-height: 48vh; }
.schnee-panel { min-width: 0; background: #182c43; border: 1px solid #e1c89588; border-radius: 20px; padding: 18px; }
.schnee-zaehler { color: #f4d9a0; font-weight: 700; margin: 0 0 5px; }
.schnee-schritttitel { margin: 0; font-size: 1.4rem; }
.schnee-status { min-height: 1.5em; margin: 6px 0 12px; }
.schnee-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.schnee-aktionen .schnee-knopf { flex: 1 1 140px; min-height: 96px; min-width: 120px; padding: 10px; overflow-wrap: anywhere; }
.schnee-fuss { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.schnee-fuss .schnee-knopf[data-schnee="zurueck"] { min-width: 220px; min-height: 112px; }
body.bf-cvi .schnee-panel { background: #000; border-color: var(--bf-cvi-farbe, #ffd400); }
body.bf-cvi .schnee-bild { border-color: var(--bf-cvi-farbe, #ffd400); }
body.bf-cvi .schnee-bild svg { background: #000; }
body.bf-cvi .schnee-kulisse { display: none; }
@media (max-width: 700px) { .schnee-layout { grid-template-columns: 1fr; gap: 8px; } .schnee-bild { width: min(100%, 280px); } .schnee-bild svg { max-height: 27vh; } .schnee-panel { padding: 10px; } }
@media (max-height: 650px) and (min-width: 701px) { .schnee-kicker { display:none; } .schnee-einfuehrung { margin: 2px 0 4px; } .schnee-bild svg { max-height: 39vh; } .schnee-panel { padding: 10px; } .schnee-status { margin: 3px 0 6px; } .schnee-fuss { margin-top: 4px; } }
@media (max-height: 419px) and (min-width: 701px) { .schnee-aktionen .schnee-knopf, .schnee-fuss .schnee-knopf { min-height: 72px; } .schnee-aktionen .schnee-knopf { flex-basis: 110px; } .schnee-bild svg { max-height: 27vh; } }

.schnee-vorschau { display: block; width: 76px; height: 58px; margin: 0 auto 4px; }
.schnee-aktionen .schnee-knopf:has(.schnee-vorschau) { flex: 1 1 100px; }
@media (max-height: 419px) { .schnee-vorschau { width: 56px; height: 38px; } }

/* Neues Winterbild (13.11.): Schnee fällt sanft, Funkeln am Ende – nur ohne Bewegungswunsch */
.schnee-bild { border-color: #f1d48f99; box-shadow: 0 14px 34px #0008, inset 0 0 0 1px #ffffff14; }
@media (prefers-reduced-motion: no-preference) {
  body:not(.bf-cvi):not(.bf-bewegung-wenig):not(.bf-ruhig):not(.christmas-ruhig) .sm-flocke { animation: sm-fallen 9s linear infinite; }
  body:not(.bf-cvi):not(.bf-bewegung-wenig):not(.bf-ruhig):not(.christmas-ruhig) .sm-f1 { animation-duration: 12s; animation-delay: -4s; }
  body:not(.bf-cvi):not(.bf-bewegung-wenig):not(.bf-ruhig):not(.christmas-ruhig) .sm-f2 { animation-duration: 15s; animation-delay: -9s; }
  body:not(.bf-cvi):not(.bf-bewegung-wenig):not(.bf-ruhig):not(.christmas-ruhig) .sm-funkeln { animation: sm-funkeln 2.4s ease-in-out infinite alternate; }
}
@keyframes sm-fallen { from { transform: translate(0, -40px); } to { transform: translate(14px, 120px); } }
@keyframes sm-funkeln { from { opacity: .35; } to { opacity: 1; } }

/* ------------------------------------------------------------------ 3D (wie Festspiele): Vollbild-Szene */
.schnee-spiel.schnee-spiel-3d, .schnee-spiel.schnee-spiel-laedt {
  position: fixed; inset: 0; max-width: none; margin: 0; overflow: hidden;
  --schnee-leiste: var(--zurueck-h, 112px);
  background: #152848; color: var(--text, #fbf7ee);
}
.schnee-spiel-3d .schnee-kopf, .schnee-spiel-laedt .schnee-kopf {
  position: absolute; z-index: 2; top: var(--oben, 10px); left: var(--links, 10px); right: auto;
  max-width: min(42rem, 70vw); pointer-events: none; text-shadow: 0 2px 8px #000c;
}
.schnee-spiel-3d .schnee-kicker { display: none; }
.schnee-spiel-3d .schnee-einfuehrung { margin: 4px 0 0; font-size: var(--s-text, 16px); max-width: 28em; }
@media (max-height: 700px) { .schnee-spiel-3d .schnee-einfuehrung { display: none; } }
.schnee-spiel-3d .schnee-layout {
  position: absolute; inset: 0 0 calc(var(--schnee-leiste) + var(--unten, 10px) + var(--luecke, 8px));
  display: block; pointer-events: none;
}
.schnee-spiel-3d .schnee-bild { display: none; }
.schnee-spiel-3d .schnee-panel {
  position: absolute; top: calc(var(--s-titel, 32px) + var(--s-text, 16px) * 2.2 + var(--oben, 10px));
  left: var(--links, 10px); right: auto; width: max-content; max-width: min(92vw, 28rem);
  pointer-events: auto; background: var(--flaeche-glas, #0b1622d8); border-radius: 12px;
}
.schnee-spiel-3d .schnee-aktionen .schnee-knopf,
.schnee-spiel-3d .schnee-fuss .schnee-knopf {
  min-width: var(--knopf-b, 120px); min-height: var(--knopf-min-h, 96px);
  pointer-events: auto;
}
.schnee-spiel-3d .schnee-fuss {
  position: absolute; left: var(--links, 10px); right: var(--rechts, 10px); bottom: var(--unten, 10px);
  z-index: 4; margin: 0; pointer-events: auto;
}
.schnee-spiel-3d .schnee-fuss .schnee-knopf[data-schnee="zurueck"] {
  min-width: var(--zurueck-b, 220px); min-height: var(--zurueck-h, 112px);
}
.schnee-spiel-3d .schnee-3d-scene, .schnee-spiel-laedt .schnee-3d-scene {
  position: absolute; inset: 0 0 calc(var(--schnee-leiste) + var(--unten, 10px) + var(--luecke, 8px)) !important;
  overflow: hidden;
}
.schnee-3d-scene > canvas { width: 100%; height: 100%; display: block; }
.schnee-spiel-laedt .schnee-layout { display: grid; place-items: center; }
.schnee-spiel-laedt .schnee-panel { position: static; }
.schnee-spiel-laedt .schnee-bild, .schnee-spiel-laedt .schnee-aktionen { display: none; }
/* Verweilziele aus szene3d / festspiele */
.schnee-spiel-3d .fest-3d-targets { position: absolute; inset: 0; pointer-events: none; }
.schnee-spiel-3d .fest-3d-target {
  position: absolute; transform: translate(-50%, -50%);
  width: var(--ziel, 120px); height: var(--ziel, 120px);
  padding: 0; border: 0; background: transparent; border-radius: 50%;
  cursor: pointer; pointer-events: auto;
}

/* Die maskierte Schneemann-Kontur erhält dieselbe Bildproportion wie das Standbild. */
#app .schnee-bild .schnee-kontur { aspect-ratio: 4 / 3; }
@media (min-width: 701px) and (min-height: 501px) {
  #app .schnee-bild .schnee-kontur { max-height: 45dvh; }
}
body.bf-cvi #app:has(> .schnee-spiel) { padding: 0 !important; }
