/* SOLVION Adventkalender — Farben aus solvion-design (tokens/colors.css), Weihnachtsfarben nur als Akzent */
:root {
  --cyan: #00AFCD;
  --blue: #0B577D;
  --blue-deep: #083f5b;
  --orange: #F19F27;
  --orange-hover: #D98B1F;
  --text: #4D4D4D;
  --muted: #6b6b6b;
  --line: #e6e0d4;
  --bg: #f8f5ef;          /* warmes Papierweiß */
  --card: #ffffff;
  --danger: #c23a5a;
  --red: #c8323c;
  --green: #1f6b4f;
  --gold: #e3b448;
  --ink: rgba(5, 42, 62, .78); /* Silhouette */
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  /* ganz leichte Schneekristalle */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg stroke='%230B577D' stroke-opacity='.07' stroke-width='1.4' stroke-linecap='round' fill='none'%3E%3Cpath d='M50 36v28M37.9 43l24.2 14M37.9 57l24.2-14M50 40l-4-4M50 40l4-4M50 60l-4 4M50 60l4 4'/%3E%3Cpath d='M160 150v18M152.2 154.5l15.6 9M152.2 163.5l15.6-9'/%3E%3C/g%3E%3C/svg%3E");
  line-height: 1.5;
}
a { color: var(--blue); }
a:hover { color: var(--cyan); }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Kopf: Winternacht ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(235deg, #00AFCD 0%, #0B577D 55%, #083f5b 100%);
  color: #fff;
}
.hero-inner { position: relative; z-index: 2; padding: 46px 16px 104px; }
.topline { display: flex; align-items: center; gap: 12px; }
.logo-box { position: relative; display: inline-block; }
.logo img { height: 30px; width: auto; display: block; }
.hat {
  all: unset; cursor: pointer;
  position: absolute; left: 14px; top: -12.5px; width: 25px; height: 15.2px;
}
.hat svg { width: 100%; height: 100%; display: block; overflow: visible; transition: transform .2s; }
.hat:hover svg { transform: rotate(-8deg) translateY(-1px); }
.hat:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
.hero h1 { position: relative; display: inline-block;  font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 600; margin: 26px 0 6px; letter-spacing: -.01em; }
.lead { margin: 0; max-width: 600px; font-size: 1.05rem; opacity: .94; }
.hello { margin: 14px 0 0; font-weight: 600; }

/* unten rechts: Wichtel-Challenge neben dem Schnee-Knopf */
.dock { position: fixed; right: 22px; bottom: 22px; z-index: 9; display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 300px; }
.dock .snow-btn { justify-content: center; }
body.has-testbar .dock { bottom: 84px; }
.elf-challenge {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; gap: 9px; max-width: 300px;
  font-family: inherit; color: #fff;
  background: linear-gradient(135deg, #0d6a97 0%, #083f5b 100%);
  border: 3px solid var(--gold); border-radius: 18px; padding: 7px 10px 7px 8px;
  box-shadow: 0 8px 24px rgba(8,40,58,.35);
  transition: transform .15s;
}
.elf-challenge:hover { transform: translateY(-2px); }
.elf-challenge:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.elf-challenge[hidden] { display: none; }
.elf-challenge .mini-elf { width: 34px; height: 41px; flex: none; }
.elf-challenge .ch-text { display: block; min-width: 0; }
.elf-challenge strong { display: block; font-size: .95rem; color: #ffe3a3; letter-spacing: .02em; line-height: 1.2; }
#elf-challenge-text { display: block; font-size: .84rem; line-height: 1.3; }
.elf-challenge .elf-count {
  flex: none; padding: 5px 11px; border-radius: 999px;
  background: var(--gold); color: #5b3a06; font-weight: 800; font-size: 1rem; white-space: nowrap;
}
.elf-challenge.done { border-color: #8fe0a8; }
.elf-challenge.done .elf-count { background: #8fe0a8; color: #10432d; }
.elf-challenge.cheer { animation: cheer .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes cheer { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.08); } }
@media (max-width: 600px) {
  .dock { right: 14px; bottom: 14px; gap: 8px; }
  .elf-challenge { justify-content: center; }
  body.has-testbar .dock { bottom: 70px; }
  .elf-challenge { padding: 5px 8px 5px 6px; border-radius: 999px; gap: 6px; }
  .elf-challenge .ch-text { display: none; }
  .elf-challenge .mini-elf { width: 28px; height: 34px; }
}

/* Schneefall (Canvas über der ganzen Seite, nur auf Knopfdruck) */
.snowfall { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 8; pointer-events: none; transition: opacity .6s; }
.snowfall.fade { opacity: 0; }

/* Schnee-Knopf: groß, unten rechts, immer da */
.snow-btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  font: inherit; font-size: 1.1rem; font-weight: 700; color: #fff; cursor: pointer;
  padding: 12px 22px 12px 16px; border-radius: 999px;
  background: linear-gradient(135deg, #00AFCD 0%, #0B577D 70%);
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(8,40,58,.35), 0 0 0 6px rgba(227,180,72,.25);
  animation: ring 2.6s ease-in-out infinite;
  transition: transform .15s;
}
.snow-btn .ico { font-size: 1.7rem; line-height: 1; display: inline-block; animation: spin 8s linear infinite; }
.snow-btn:hover { transform: translateY(-2px); }
.snow-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.snow-btn.on { background: #fff; color: var(--blue); animation: none; }
.snow-btn.on .ico { animation-duration: 2s; }
@keyframes ring {
  0%, 100% { box-shadow: 0 8px 24px rgba(8,40,58,.35), 0 0 0 6px rgba(227,180,72,.3); }
  50%      { box-shadow: 0 8px 24px rgba(8,40,58,.35), 0 0 0 13px rgba(227,180,72,.1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .snow-btn { font-size: 1rem; padding: 10px 18px 10px 13px; }
  .snow-btn .ico { font-size: 1.45rem; }
  .toast { bottom: 84px; }
  body.has-testbar .toast { bottom: 136px; }
}

/* ganz leichter Dauerschnee im Kopf */
.hero .snow { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hero .snow.s1 {
  opacity: .3;
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 140px 90px, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 230px 20px, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 80px 160px, #fff 50%, transparent 51%);
  background-size: 260px 200px;
  animation: hsnow1 30s linear infinite;
}
.hero .snow.s2 {
  opacity: .4;
  background-image:
    radial-gradient(2.2px 2.2px at 40px 60px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 190px 140px, #fff 50%, transparent 51%),
    radial-gradient(2.4px 2.4px at 300px 30px, #fff 50%, transparent 51%);
  background-size: 360px 280px;
  animation: hsnow2 22s linear infinite;
}
@keyframes hsnow1 { from { background-position: 0 0; } to { background-position: 40px 200px; } }
@keyframes hsnow2 { from { background-position: 0 0; } to { background-position: -60px 280px; } }

/* Lichterkette am oberen Rand */
.lights { position: absolute; left: 0; right: 0; top: 0; height: 34px; z-index: 3; pointer-events: none; }
.lights svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lights .wire { fill: none; stroke: rgba(4,30,44,.55); stroke-width: 1.4; }
.lights .bulb { animation: twinkle 3.2s ease-in-out infinite alternate; }
@keyframes twinkle { 0%, 40% { opacity: 1; } 100% { opacity: .35; } }

/* Silhouette: Schloßberg mit Uhrturm */
.skyline { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; z-index: 2; pointer-events: none; }
.skyline .hills { position: absolute; inset: 0; width: 100%; height: 100%; }
.skyline .hills path { fill: var(--bg); }
.skyline .hills.back path { fill: rgba(255,255,255,.28); }
.skyline .tower { position: absolute; left: 78.3%; bottom: 58px; width: 120px; height: 90px; transform: translateX(-50%); overflow: visible; }
.skyline .tower .ink { fill: var(--ink); }
.skyline .tower .face { fill: #fbf3dc; }
.skyline .tower .hands { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; fill: none; }
.skyline .tower .cap { fill: #fff; }

/* Rentierschlitten (Osterei) */
.sleigh { position: absolute; left: -240px; top: 40%; width: 200px; z-index: 2; pointer-events: none; opacity: 0; }
.sleigh svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 6px rgba(255,255,255,.6)); }
.sleigh.fly { animation: fly 4.2s cubic-bezier(.4,.1,.6,.9) forwards; }
@keyframes fly {
  0%   { opacity: 1; transform: translate(0, 40px) rotate(-4deg); }
  50%  { transform: translate(calc(50vw + 120px), -30px) rotate(-8deg); }
  100% { opacity: 1; transform: translate(calc(100vw + 260px), -90px) rotate(-6deg); }
}

/* ---------- Hauptbereich ---------- */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  margin-top: -34px;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) { .main { grid-template-columns: 1fr; } }

.banner {
  background: var(--card);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
/* Countdown als Anhänger (Spitze links), Zahlen als Kalenderblätter wie bei den Webinaren */
.count-wrap { position: relative; filter: drop-shadow(0 1px 2px rgba(0,0,0,.08)) drop-shadow(0 8px 18px rgba(11,87,125,.1)); margin-bottom: 22px; }
.count {
  position: relative;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--card);
  clip-path: polygon(26px 0, 100% 0, 100% 100%, 26px 100%, 0 calc(100% - 26px), 0 26px);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px 16px 46px;
}
.count::before { /* Lochung */
  content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 1px 2px rgba(0,0,0,.3), 0 0 0 3px #eadfc6;
}
.count-boxes { display: flex; gap: 8px; }
.cbox {
  display: flex; flex-direction: column; text-align: center; line-height: 1.1; min-width: 58px;
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 0 0 1px #eee;
}
.cbox span { display: block; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 0; }
.cbox b { display: block; font-size: 1.8rem; color: var(--blue); padding: 5px 8px 7px; font-variant-numeric: tabular-nums; }
.cbox.gold span { background: var(--gold); color: #5b3a06; }
.count-text { flex: 1; min-width: 200px; }
.count-label { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--blue); }
.count-sub { margin: 0; font-size: .9rem; color: var(--muted); }
.count-progress { margin-top: 8px; font-size: .85rem; color: var(--text); }
.count-progress .bar { display: block; height: 6px; border-radius: 3px; background: #efe8d8; overflow: hidden; margin-bottom: 4px; max-width: 360px; }
.count-progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--orange)); border-radius: 3px; transition: width .6s; }
@media (max-width: 600px) {
  .count { gap: 12px; padding: 14px 14px 14px 40px; }
  .count::before { left: 11px; }
  .cbox { min-width: 50px; }
  .cbox b { font-size: 1.45rem; padding: 4px 6px 6px; }
  .count-text { min-width: 0; flex-basis: 100%; }
}
.loading { margin: 24px 0; text-align: center; color: var(--muted); }

.grid-holder { position: relative; }
/* Schnee liegt auf der Oberkante des Rasters */
.grid-holder::before {
  content: ""; position: absolute; left: -3px; right: -3px; top: -7px; height: 15px; z-index: 3; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='15'%3E%3Cpath d='M0 7 C 8 0, 18 0, 26 6 C 34 1, 46 1, 54 7 C 62 2, 70 0, 80 5 C 90 0, 104 1, 112 6 C 116 4, 118 4, 120 7 L120 9 C 112 13, 104 11, 96 13 C 86 15, 76 11, 66 13 C 54 15, 44 11, 34 13 C 22 15, 12 11, 0 13 Z' fill='white'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 15px;
  filter: drop-shadow(0 1px 1px rgba(11,87,125,.18));
}
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
}
@media (max-width: 700px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 380px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Türchen ---------- */
.door {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  transform-style: preserve-3d;
  perspective: 700px; /* je Tür, sonst ragen offene Türen am Rand ins Bild */
}
/* unregelmäßiges Raster wie bei einem echten Kalender */
.door.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; perspective: 1200px; }
@media (min-width: 381px) { .door.w2 { grid-column: span 2; aspect-ratio: auto; } }
@media (min-width: 701px) { .door.w2-lg { grid-column: span 2; aspect-ratio: auto; } }

.door > button:where(:not(.wichtel)) {
  all: unset;
  box-sizing: border-box;
  position: absolute; inset: 0;
  border-radius: 10px;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px;
}
.door > button:where(:not(.wichtel)):focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Rückseite = Inhalt (sichtbar, wenn offen) */
.door .inside {
  z-index: 0;
  isolation: isolate;
  background: var(--card) center / cover no-repeat;
  border: 1px solid var(--line);
  color: var(--text);
  overflow: hidden;
  container-type: size;
}
.door .inside::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.96) 78%);
}
.door .inside.has-poster { background-image: var(--poster); color: #fff; border-color: transparent; }
/* Mit Thumbnail: Nummer und Titel stecken im Bild, nur ein kleiner Play-Knopf */
.door .inside.has-poster::after { background: none; }
.door .inside.has-poster .num, .door .inside.has-poster .t { display: none; }
.door .inside.has-poster > span { position: static; }
.door .inside.has-poster .play { position: absolute; left: 40%; top: 46%; transform: translate(-50%, -50%); width: 26%; height: auto; aspect-ratio: 1; max-width: 32px; margin: 0; box-shadow: 0 2px 8px rgba(0,0,0,.35); } /* sitzt im Quadrat des Solvion-Zeichens */
.door.big .inside.has-poster .play { max-width: 52px; }
.door.big .inside .play::before { border-left-width: 16px; border-top-width: 10px; border-bottom-width: 10px; margin-left: 5px; }
/* breite Türchen: Bild ganz zeigen, daneben unscharf aufgefüllt */
.door.w2 .inside.has-poster, .door.w2-lg .inside.has-poster { background-image: none; }
.door.w2 .inside.has-poster::before, .door.w2-lg .inside.has-poster::before {
  content: ""; position: absolute; inset: -20px; z-index: -1;
  background: var(--poster) center / cover; filter: blur(14px) brightness(.8);
}
.door.w2 .inside.has-poster::after, .door.w2-lg .inside.has-poster::after { background: var(--poster) center / contain no-repeat; }
.door.w2 .inside.has-poster .play, .door.w2-lg .inside.has-poster .play { left: calc(50% - 7.5cqh); width: 19.5cqh; z-index: 2; }
@media (max-width: 380px) { .door.w2 .inside.has-poster { background-image: var(--poster); } .door.w2 .inside.has-poster::before { display: none; } .door.w2 .inside.has-poster::after { background: none; } .door.w2 .inside.has-poster .play { left: 40%; width: 26%; } }
@media (max-width: 700px) { .door.w2-lg .inside.has-poster { background-image: var(--poster); } .door.w2-lg .inside.has-poster::before { display: none; } .door.w2-lg .inside.has-poster::after { background: none; } .door.w2-lg .inside.has-poster .play { left: 40%; width: 26%; } }

.door .inside > * { position: relative; z-index: 1; }
.door .inside .num { font-size: .85rem; font-weight: 700; color: var(--cyan); }
.door .inside .t { font-size: .82rem; font-weight: 600; line-height: 1.25; }
.door .inside .play {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--orange); display: grid; place-items: center; margin-bottom: 6px;
}
.door .inside .play::before {
  content: ""; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px;
}

/* Vorderseite = geschlossene Tür, mit Geschenkpapier-Mustern */
.door .front {
  --pat: linear-gradient(transparent, transparent);
  --base: linear-gradient(160deg, #0d6a97 0%, var(--blue) 60%, var(--blue-deep) 100%);
  --rib: #d63a3a; --rib-d: #a8242b;
  z-index: 2;
  background: var(--pat), var(--base);
  color: #fff;
  align-items: center; justify-content: center;
  transform-origin: left center;
  transition: transform .7s cubic-bezier(.3,.7,.2,1), box-shadow .2s;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.door .front.c-petrol { --base: linear-gradient(160deg, #13a3c0 0%, #0a8aa8 55%, #0b6d8a 100%); }
.door .front.c-green  { --base: linear-gradient(160deg, #2f7d5e 0%, #1f6b4f 55%, #154a37 100%); --rib: var(--gold); --rib-d: #b98a22; }
.door .front.c-red    { --base: linear-gradient(160deg, #d8504f 0%, #bb3540 55%, #8e2431 100%); --rib: var(--gold); --rib-d: #b98a22; }
.door .front.c-gold   { --base: linear-gradient(150deg, #f8e19a 0%, #e8bd56 45%, #c4912d 100%); color: #5b3a06; }

.door .front.p-stripes { --pat: repeating-linear-gradient(135deg, rgba(255,255,255,.1) 0 8px, transparent 8px 20px); }
.door .front.p-dots    { --pat: radial-gradient(circle, rgba(255,255,255,.2) 2px, transparent 2.6px) 0 0 / 16px 16px, radial-gradient(circle, rgba(255,255,255,.1) 1.2px, transparent 1.6px) 8px 8px / 16px 16px; }
.door .front.p-stars   { --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34'%3E%3Cpath d='M9 3l1.6 3.6 3.9.4-2.9 2.6.9 3.8L9 11.4l-3.5 2 .9-3.8L3.5 7l3.9-.4z' fill='white' fill-opacity='.2'/%3E%3Cpath d='M25 19l.8 1.8 1.9.2-1.4 1.3.4 1.9-1.7-1-1.7 1 .4-1.9-1.4-1.3 1.9-.2z' fill='white' fill-opacity='.16'/%3E%3Ccircle cx='27' cy='6' r='1.1' fill='white' fill-opacity='.25'/%3E%3Ccircle cx='8' cy='27' r='1.1' fill='white' fill-opacity='.2'/%3E%3C/svg%3E") 0 0 / 34px 34px; }
.door .front.p-nordic  { --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 3.5h24M0 20.5h24' stroke='white' stroke-opacity='.4' stroke-width='1.4'/%3E%3Cpath d='M12 7l5 5-5 5-5-5z' fill='white' fill-opacity='.38'/%3E%3Cpath d='M-3 12l3-3 3 3-3 3zM21 12l3-3 3 3-3 3z' fill='white' fill-opacity='.22'/%3E%3C/svg%3E") repeat-x 0 12% / 24px 24px, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 3.5h24M0 20.5h24' stroke='white' stroke-opacity='.4' stroke-width='1.4'/%3E%3Cpath d='M12 7l5 5-5 5-5-5z' fill='white' fill-opacity='.38'/%3E%3Cpath d='M-3 12l3-3 3 3-3 3zM21 12l3-3 3 3-3 3z' fill='white' fill-opacity='.22'/%3E%3C/svg%3E") repeat-x 0 88% / 24px 24px; }
.door .front.p-gift    { --pat:
  linear-gradient(90deg, transparent 25%, var(--rib-d) 25% 26.2%, var(--rib) 26.2% 32.8%, var(--rib-d) 32.8% 34%, transparent 34%),
  linear-gradient(180deg, transparent 20%, var(--rib-d) 20% 20.9%, var(--rib) 20.9% 27.1%, var(--rib-d) 27.1% 28%, transparent 28%); }
.door .front.c-gold.p-gift { --pat:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34'%3E%3Cpath d='M9 3l1.6 3.6 3.9.4-2.9 2.6.9 3.8L9 11.4l-3.5 2 .9-3.8L3.5 7l3.9-.4z' fill='white' fill-opacity='.35'/%3E%3Ccircle cx='27' cy='22' r='1.4' fill='white' fill-opacity='.5'/%3E%3C/svg%3E") 0 0 / 34px 34px,
  linear-gradient(90deg, transparent 25%, var(--rib-d) 25% 26%, var(--rib) 26% 31%, var(--rib-d) 31% 32%, transparent 32%),
  linear-gradient(180deg, transparent 20%, var(--rib-d) 20% 20.8%, var(--rib) 20.8% 25.2%, var(--rib-d) 25.2% 26%, transparent 26%); }

.door .front .bow {
  position: absolute; left: 29.5%; top: 24%; width: 44%; max-width: 54px; transform: translate(-50%, -50%);
  color: var(--rib); filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.door .front.c-gold .bow { left: 28.5%; top: 23%; max-width: 96px; width: 30%; }
.door .front .bow .shade { fill: var(--rib-d); }

.door .front .num { font-size: clamp(1.4rem, 3.4vw, 2.2rem); font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.3); position: relative; }
.door.big .front .num { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.door.big .front .finale { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }

/* Türknauf als Christbaumkugel */
.door .front .knob {
  --k: #d63a3a;
  position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255,255,255,.9) 0 12%, var(--k) 38%, color-mix(in srgb, var(--k), #000 35%) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.door .front .knob::before { content: ""; position: absolute; left: 3px; top: -3px; width: 4px; height: 3px; border-radius: 1px; background: #d8c17a; }
.door .front .knob.k-gold { --k: #e3b448; }
.door .front .knob.k-silver { --k: #cfd8de; }
.door.big .front .knob { width: 16px; height: 16px; right: 12px; }
.door.big .front .knob::before { left: 5px; top: -4px; width: 6px; height: 4px; }

.door .front:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 4px 14px rgba(11,87,125,.25); }
.door.today .front { box-shadow: 0 0 0 3px var(--gold), 0 6px 18px rgba(227,180,72,.4); }
.door.today .front .label {
  position: absolute; bottom: 8px; left: 0; right: 0; text-align: center;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ffe3a3;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.door.big.today .front .label { color: #7a1d1d; text-shadow: none; }
.door.locked .front { cursor: default; }
.door.locked .front .num { opacity: .9; }

.door .front > * { backface-visibility: hidden; }

/* heute: pulsiert golden und zappelt ab und zu */
.door.today:not(.opened) { animation: jiggle 6s ease-in-out infinite; }
.door.today:not(.opened) .front { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 8px rgba(227,180,72,.35); }
  50%      { box-shadow: 0 0 0 3px #f6d57e, 0 0 26px rgba(240,196,90,.85); }
}
@keyframes jiggle {
  0%, 84%, 100% { transform: rotate(0); }
  86% { transform: rotate(-2.2deg); }
  88% { transform: rotate(2deg); }
  90% { transform: rotate(-1.4deg); }
  92% { transform: rotate(.8deg); }
  94% { transform: rotate(0); }
}
/* gesperrt: wackelt beim Klick */
.door.wobble { animation: wobble .5s ease-in-out; }
@keyframes wobble {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-4px) rotate(-2deg); }
  40% { transform: translateX(4px) rotate(2deg); }
  60% { transform: translateX(-3px) rotate(-1deg); }
  80% { transform: translateX(2px) rotate(.5deg); }
}

/* offen: Tür schwingt auf */
.door.opened .front { transform: rotateY(-100deg); pointer-events: none; }
.door.opened .inside { box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Schneeflocken-Konfetti beim Öffnen */
.flake {
  position: absolute; left: 50%; top: 45%; z-index: 4; pointer-events: none;
  font-size: var(--s, 14px); line-height: 1; color: var(--c, #fff);
  text-shadow: 0 0 2px rgba(11,87,125,.6);
  transform: translate(-50%, -50%);
  animation: burst .95s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); }
}

/* ---------- Wichtel ---------- */
.wichtel {
  all: unset; cursor: pointer;
  position: absolute; z-index: 6; width: 34px; height: 41px; pointer-events: auto;
  animation: bob 3.6s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.wichtel svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.wichtel:hover { animation: none; transform: rotate(-6deg) scale(1.08); }
.wichtel:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.wichtel.talk { animation: hop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-12px) rotate(-8deg); } 65% { transform: translateY(-4px) rotate(5deg); } }
@keyframes bob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(4deg); } }
/* Sitzplätze: Füße baumeln über die Kante */
.wichtel.at-tag    { right: 22px; top: -35px; }
.wichtel.at-door   { right: 4px; top: -35px; }
.wichtel.at-grid   { left: 18px; top: -40px; }
.wichtel.at-foot   { right: 12%; top: -24px; }
.wichtel.at-hill   { left: 66%; bottom: 37px; }
@media (max-width: 600px) { .wichtel.at-hill { left: 58%; bottom: 33px; } }
.wichtel.at-count  { right: 22px; top: -35px; }
.wichtel.at-door-left { left: 4px; top: -35px; }
.wichtel.at-title  { right: -46px; bottom: 2px; }
@media (max-width: 600px) { .wichtel.at-title { right: 0; bottom: auto; top: -36px; } }

/* ---------- Bewegung aus: Systemeinstellung oder Schalter ---------- */
@media (prefers-reduced-motion: reduce) {
  .door .front { transition: none; }
  .hero .snow, .lights .bulb, .door, .door .front, .wichtel, .snow-btn, .snow-btn .ico, .elf-challenge { animation: none !important; }
  .flake, .sleigh { display: none; }
}

/* ---------- Anmeldung über dem Kalender ---------- */
.gate {
  position: absolute; inset: -6px; z-index: 7;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px;
  background: rgba(248,245,239,.6);
  backdrop-filter: blur(3px);
  border-radius: var(--radius);
}
.gate-card {
  width: 100%; max-width: 440px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(11,87,125,.18);
}
.gate-card h2 { margin: 0 0 4px; font-size: 1.35rem; color: var(--blue); font-weight: 600; }
.gate-card .muted { margin: 0 0 16px; font-size: .95rem; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--text); }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input:not([type]), input[type=email] {
  font: inherit; font-weight: 400;
  padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 8px; background: #fff; color: var(--text);
}
input:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--cyan); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
.check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400; font-size: .83rem; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--danger); margin: 0; font-size: .88rem; }

.btn {
  font: inherit; font-weight: 600;
  background: var(--orange); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 18px; cursor: pointer;
}
.btn:hover { background: var(--orange-hover); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--cyan); padding: 8px 14px; }
.btn.ghost:hover { background: #e8f7fa; }
.btn.ghost:disabled { opacity: .35; cursor: default; background: transparent; }
.link { font: inherit; background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer; padding: 0; margin-top: 14px; font-size: .9rem; }

/* ---------- Webinare als Geschenkanhänger ---------- */
.side {
  position: relative;
  align-self: start;
  margin-top: 30px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.08)) drop-shadow(0 8px 18px rgba(11,87,125,.1));
}
.side .string { position: absolute; left: 50%; top: -30px; width: 60px; height: 50px; transform: translateX(-50%); z-index: 2; overflow: visible; }
.side .string path { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.tag {
  position: relative;
  background: var(--card);
  clip-path: polygon(26px 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%, 0 26px);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 40px 20px 20px;
}
.tag::before { /* Lochung */
  content: ""; position: absolute; left: 50%; top: 10px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 1px 2px rgba(0,0,0,.3), 0 0 0 3px #eadfc6;
}
.side h2 { margin: 0; font-size: 1.1rem; color: var(--blue); font-weight: 600; text-align: center; }
.side .small { margin: 2px 0 12px; text-align: center; }
.webinars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.webinars a {
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start;
  text-decoration: none; color: var(--text); padding: 10px 8px; border-radius: 8px;
}
.webinars a:hover { background: #f3efe6; color: var(--text); }
/* Datum als Kalenderblatt */
.webinars .date {
  display: flex; flex-direction: column-reverse; text-align: center; line-height: 1.1;
  background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 0 0 1px #eee;
}
.webinars .date span { display: block; background: var(--red); color: #fff; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 0; }
.webinars .date b { display: block; font-size: 1.2rem; color: var(--blue); padding: 4px 0 5px; }
.webinars .w-title { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.webinars .w-time { font-size: .8rem; color: var(--muted); }
.webinars .badge {
  display: inline-block; margin: 0 0 3px; padding: 1px 8px; border-radius: 999px;
  background: #fbefd2; color: #8a5a00; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}
.webinars li.special a { background: #fffaf0; box-shadow: inset 3px 0 0 var(--gold); }
.webinars li.past { opacity: .5; }

/* ---------- Fuß mit Schneewehe ---------- */
.foot { position: relative; margin-top: 56px; background: #fff; }
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -30px; height: 31px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 V22 C 120 8, 260 4, 400 16 C 520 26, 640 6, 780 10 C 900 14, 1000 26, 1100 18 C 1150 14, 1180 12, 1200 14 V30 Z' fill='white'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.foot-inner { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 36px; font-size: .82rem; color: var(--muted); }
.foot a { color: var(--muted); }

/* ---------- Video-Fenster ---------- */
.player {
  border: 0; padding: 0; border-radius: 16px; max-width: min(760px, calc(100vw - 24px));
  width: 100%; background: var(--card); color: var(--text);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.player::backdrop { background: rgba(8,40,58,.7); }
.player-inner { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 20px; position: relative; }
@media (max-width: 640px) { .player-inner { grid-template-columns: 1fr; gap: 14px; padding: 14px; } }
.media {
  background: #000; border-radius: 10px; overflow: hidden;
  aspect-ratio: 9 / 16; height: min(72vh, 600px); max-width: 100%;
  display: grid; place-items: center;
}
@media (max-width: 640px) { .media { height: min(64vh, calc((100vw - 52px) * 16 / 9)); width: auto; max-width: 100%; justify-self: center; } } /* Höhe bestimmt die Größe, sonst schneidet das Feld die Steuerleiste ab */
.media video, .media iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.media .soon { color: #fff; text-align: center; padding: 24px; font-size: .95rem; opacity: .85; }
.player-text { align-self: center; padding-right: 20px; }
.eyebrow { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); }
.player-text h3 { margin: 4px 0 10px; font-size: 1.4rem; color: var(--blue); font-weight: 600; line-height: 1.25; }
.player-nav { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  font: inherit; font-size: 1.5rem; line-height: 1; background: #fff; border: 0; color: var(--blue); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.close:hover { color: var(--blue); }

/* ---------- Hinweis ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--blue-deep); color: #fff; padding: 10px 18px; border-radius: 18px;
  font-size: .92rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 10; max-width: min(460px, calc(100vw - 32px)); text-align: center;
}
.toast b { display: block; font-weight: 600; }
.toast small { display: block; opacity: .8; font-size: .82rem; margin-top: 2px; }

/* ---------- Sprechblase am gesperrten Türchen ---------- */
.bubble {
  --tail: 50%;
  position: fixed; z-index: 11; max-width: min(320px, calc(100vw - 24px));
  background: #fff; color: var(--blue-deep);
  border: 3px solid var(--gold); border-radius: 18px;
  padding: 14px 20px 13px; text-align: center;
  box-shadow: 0 14px 40px rgba(8,40,58,.35);
  pointer-events: none;
  transform-origin: var(--tail) 100%;
}
.bubble b { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.bubble small { display: block; margin-top: 6px; font-size: .88rem; color: var(--muted); }
.bubble::after { /* Zipfel zum Türchen */
  content: ""; position: absolute; left: var(--tail); bottom: -12px; width: 18px; height: 18px; margin-left: -9px;
  background: #fff; border-right: 3px solid var(--gold); border-bottom: 3px solid var(--gold);
  transform: rotate(45deg); border-radius: 0 0 4px 0;
}
.bubble small:empty { display: none; }
.bubble.elf { border-color: var(--green); }
.bubble.elf::after { border-color: var(--green); }
.bubble.below { transform-origin: var(--tail) 0; }
.bubble.below::after { bottom: auto; top: -12px; transform: rotate(225deg); }
.bubble.pop { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { opacity: 0; transform: scale(.5) translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bubble.pop { animation: none; } }

/* ---------- Testmodus (?preview=…) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.testbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; background: #1b1b1b; color: #fff; font-size: .9rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.25);
}
.testbar[hidden] { display: none; }
.testbar strong { color: var(--orange); margin-right: 4px; }
.testbar select, .testbar button {
  font: inherit; color: #fff; background: #333; border: 1px solid #555; border-radius: 6px;
  padding: 6px 10px; cursor: pointer;
}
.testbar button:hover, .testbar select:hover { background: #444; }
.testbar #test-prev, .testbar #test-next { width: 36px; padding: 6px 0; font-size: 1.1rem; line-height: 1; }
body.has-testbar { padding-bottom: 72px; }
body.has-testbar .toast { bottom: 84px; }
@media (max-width: 500px) {
  .testbar { flex-wrap: nowrap; gap: 6px; padding: 8px 12px; }
  .testbar strong { display: none; }
  .testbar select { min-width: 0; flex: 1; }
  body.has-testbar { padding-bottom: 60px; }
  body.has-testbar .toast { bottom: 70px; }
}

/* ---------- Handy ---------- */
@media (max-width: 600px) {
  .hero-inner { padding-top: 40px; padding-bottom: 84px; }
  .skyline { height: 70px; }
  .skyline .tower { bottom: 44px; width: 96px; height: 72px; }
  .lead { font-size: .98rem; }
}

/* ---------- Krampustag (5. Dezember) ---------- */
/* rotes Glühen im Kopf */
.krampus .hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(130% 75% at 50% 125%, rgba(255,70,20,.5), rgba(255,70,20,0) 62%);
  animation: heat 2.8s ease-in-out infinite alternate;
}
@keyframes heat { from { opacity: .7; } to { opacity: 1; } }

/* das brennende Türchen: verkohlt, leises Glühen, kleines Feuer als Canvas (wie das Höllenfeuer) */
.door.burn .front,
.door.burn.today:not(.opened) .front {
  --pat: radial-gradient(ellipse at 50% 115%, rgba(255,120,20,.45), transparent 60%);
  --base: linear-gradient(160deg, #4a1510 0%, #2a0b07 60%, #120403 100%);
  animation: emberglow 2.4s ease-in-out infinite;
}
.door.burn .front .num { color: #ffd27a; text-shadow: 0 0 6px rgba(255,140,30,.8); }
.door.burn .front .label { color: #ffd27a; }
@keyframes emberglow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,122,26,.75), 0 0 6px rgba(255,90,20,.3); }
  50%      { box-shadow: 0 0 0 2px rgba(255,160,60,.9), 0 0 14px rgba(255,110,30,.5); }
}
.door-fire { position: absolute; left: -6%; bottom: -3px; width: 112%; height: 62%; z-index: 3; pointer-events: none; }

/* Höllenfeuer-Knopf */
.krampus .snow-btn {
  background: linear-gradient(135deg, #ffa13c 0%, #d7261e 60%, #7a0f0c 100%);
  border-color: #ffd34d;
  animation: ringfire 1.8s ease-in-out infinite;
}
.krampus .snow-btn .ico { animation: flameico .7s ease-in-out infinite alternate; }
.krampus .snow-btn.on { background: #fff; color: #b3201a; animation: none; }
@keyframes ringfire {
  0%, 100% { box-shadow: 0 8px 24px rgba(90,10,0,.4), 0 0 0 6px rgba(255,90,20,.35); }
  50%      { box-shadow: 0 8px 24px rgba(90,10,0,.4), 0 0 0 14px rgba(255,90,20,.12); }
}
@keyframes flameico { from { transform: scale(1) rotate(-6deg); } to { transform: scale(1.15) rotate(6deg); } }
.krampus .elf-challenge { border-color: #ff7a1a; }
@media (prefers-reduced-motion: reduce) {
  .door.burn .front, .krampus .hero::after { animation: none !important; }
  .door-fire { display: none; }
}
.krampus .bubble.elf, .krampus .bubble.elf::after { border-color: #c8323c; }
