/* Gemeinsames Aussehen beider Kalender. Die Farben setzt jeder Kalender über die Variablen in seiner index.html. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 18px/1.55 ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  color: var(--text); background: var(--hintergrund); background-attachment: fixed;
}
a { color: var(--link); }
img { max-width: 100%; }

canvas.schnee { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, .fuss, .vorschau-banner { position: relative; z-index: 1; }

.vorschau-banner { background: #e0457b; color: #fff; text-align: center; font-size: 14px; font-weight: 700; padding: 6px 16px; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 14px 56px; }

/* Kopf */
.kopf { text-align: center; padding: 40px 0 26px; }
.kicker { margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--akzent); }
.kopf h1 { margin: 0; font-size: clamp(40px, 9vw, 76px); line-height: 1.05; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.35); outline: none; }
.hinweis { margin: 14px auto 0; display: inline-block; padding: 8px 18px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }

/* Türchen-Raster */
.raster {
  display: grid; gap: 12px; grid-auto-flow: dense;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: 118px;
}
@media (max-width: 520px) { .raster { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 104px; gap: 9px; } }
.tuer.breit { grid-column: span 2; }
.tuer.hoch { grid-row: span 2; }
.tuer.gross { grid-column: span 2; grid-row: span 2; }

.tuer {
  position: relative; padding: 0; border: 0; border-radius: 16px; cursor: pointer; font: inherit; color: #fff;
  background: rgba(0,0,0,.35); perspective: 900px; touch-action: manipulation;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
}
.tuer .innen { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; background: rgba(0,0,0,.4); }
.tuer .innen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tuer .name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 14px; font-weight: 700; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); line-height: 1.2;
}
.tuer .klappe {
  position: absolute; inset: 0; border-radius: 16px; background: var(--farbe);
  display: flex; align-items: center; justify-content: center;
  transform-origin: left center; transition: transform .85s cubic-bezier(.3,.7,.3,1.15), box-shadow .2s;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.28), inset 0 -10px 0 rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.25);
  backface-visibility: hidden;
}
/* Schnee auf dem Türchen */
.tuer .klappe::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: #fff; border-radius: 16px 16px 0 0;
  -webkit-mask: radial-gradient(10px 7px at 10px 100%, transparent 96%, #000) 0 0 / 20px 100% repeat-x;
          mask: radial-gradient(10px 7px at 10px 100%, transparent 96%, #000) 0 0 / 20px 100% repeat-x;
}
.tuer .zahl { font-size: clamp(34px, 6vw, 46px); font-weight: 800; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.tuer.gross .zahl { font-size: clamp(56px, 10vw, 86px); }
.tuer .deko { position: absolute; right: 8px; bottom: 6px; font-size: 20px; opacity: .9; }
.tuer.gross .deko { font-size: 34px; }
@media (hover: hover) { .tuer.kann:hover .klappe { transform: rotateY(-14deg); } }
.tuer.auf .klappe { transform: rotateY(-108deg); box-shadow: none; }
.tuer.auf { background: transparent; }
.tuer.zu .klappe { filter: saturate(.75) brightness(.92); }
.tuer:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tuer.wackeln .klappe { animation: wackeln .5s; }
@keyframes wackeln { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
.tuer.oeffnet .innen img { animation: einblenden .9s; }
@keyframes einblenden { from { filter: brightness(2.5); } to { filter: none; } }

/* Türchen-Seite */
.seite { padding-top: 22px; }
.leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.datum { color: #fff; font-weight: 700; opacity: .9; }
.knopf {
  display: inline-block; padding: 10px 18px; touch-action: manipulation; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 16px;
}
.knopf:hover { background: rgba(255,255,255,.28); }
.inhalt {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; align-items: start;
  background: var(--karte); color: var(--karte-text); border-radius: 22px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
@media (max-width: 820px) { .inhalt { grid-template-columns: 1fr; } }
.bild { margin: 0; background: #0d0d14; position: sticky; top: 0; }
@media (max-width: 820px) { .bild { position: static; } }
.bild img { display: block; width: 100%; max-height: 78vh; object-fit: contain; margin: 0 auto; }
.bild figcaption { padding: 8px 14px 10px; font-size: 12px; line-height: 1.4; color: #c9cbd6; }
.bild figcaption a { color: #e6e8f2; }
.text { padding: 26px 28px 30px; }
.text h1 { margin: 8px 0 10px; font-size: clamp(32px, 5vw, 46px); line-height: 1.1; outline: none; color: var(--ueberschrift); }
.lead { margin: 0 0 18px; font-size: 19px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.badge.echt { background: #dff3e4; color: #1d6b37; }
.badge.fabel { background: #efe3ff; color: #6a2fb5; }
.badge.ort { background: #dcefff; color: #19598f; }
.box { border-radius: 16px; padding: 12px 16px 4px; margin: 14px 0; }
.box h2 { margin: 0 0 4px; font-size: 18px; }
.box p { margin: 0 0 10px; }
.rekord { background: #fff4cc; border: 2px solid #f2c94c; }
.sage { background: #f3ebff; border: 2px solid #c9a8f5; }
.mitmach { background: #e3f6ee; border: 2px solid #8fd6b4; }
.quiz { background: #e5f1ff; border: 2px solid #9cc6f3; }
.quiz summary { cursor: pointer; font-weight: 800; color: #1f63b5; margin-bottom: 10px; }
.blaettern { display: flex; justify-content: space-between; margin-top: 18px; }

/* Geschlossenes Türchen */
.geschlossen { text-align: center; color: #fff; padding: 60px 16px; }
.schloss { font-size: 70px; }
.geschlossen h1 { outline: none; }

/* Bildnachweise */
.nachweise { color: #fff; }
.nachweise h1 { outline: none; }
.nachweise a { color: #fff; }
.tabelle { overflow-x: auto; background: var(--karte); color: var(--karte-text); border-radius: 16px; }
.tabelle a { color: var(--link-karte); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.08); vertical-align: top; }
td img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.klein { font-size: 13px; opacity: .75; word-break: break-word; }

/* Fuß */
.fuss {
  width: 100%; margin-top: 60px; padding: 6px 16px 26px; background: #fff; color: #555c70; font-size: 15px;
  display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap;
}
.fuss::before {
  content: ""; position: absolute; left: 0; right: 0; top: -50px; height: 51px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34 C 140 10, 260 48, 420 28 S 700 6, 860 30 S 1140 50, 1300 24 S 1520 16, 1600 32 L1600 60 L0 60 Z' fill='%23fff'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.fuss a { color: #555c70; display: inline-block; padding: 10px 2px; }
.fuss { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
.schnee-knopf { font: inherit; font-size: 15px; min-height: 40px; touch-action: manipulation; border: 1px solid #c3cad5; background: transparent; border-radius: 999px; padding: 5px 14px; cursor: pointer; color: #555c70; }
.schnee-knopf:hover { border-color: #555c70; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; z-index: 5;
  background: #fff; color: #222; padding: 12px 20px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity .25s, transform .25s; pointer-events: none; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.fuss a.impressum { font-size: 10px; opacity: .5; }
.idee { margin: 8px 0 0; color: var(--akzent); font-weight: 700; font-size: 17px; }
