/* Adventskalender: Dorf im Linolschnitt. Fünf Druckfarben, keine Verläufe, keine Schatten. */
@font-face { font-family: "Bricolage"; src: url("../admin_panel/fonts/bricolage-grotesque-schmal.5c4d03269087.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root { --tinte: #14211d; --rot: #b92b1f; --schnee: #f2eee2; --licht: #f6c244; --gruen: #2f5b4b; }
* { box-sizing: border-box; }
html { background: var(--schnee); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Bricolage", "Arial Narrow", Arial, sans-serif; color: var(--tinte); background: var(--schnee); }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Dorf */
.blatt { position: relative; max-width: 580px; margin: 0 auto; overflow: hidden; background: var(--rot); }
.szene { display: block; width: 100%; height: auto; aspect-ratio: 400 / 1500; }
.unterzeile, .hinweis { position: absolute; left: 0; right: 0; margin: 0; text-align: center; color: var(--schnee); }
.unterzeile { top: 10.3%; padding: 0 12px; font-size: clamp(15px, 4.7vw, 27px); }
.hinweis { top: 12.2%; width: max-content; margin: 0 auto; padding: 6px 4px; font-size: clamp(14px, 4.1vw, 23px); font-weight: 700; color: var(--licht); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.tuer { position: absolute; scroll-margin-top: 30vh; display: block; perspective: 420px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tuer::before { content: ""; position: absolute; inset: -4px; } /* etwas größere Trefferfläche */
.tuer svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tuer:focus { outline: none; }
.tuer:focus-visible { outline: 3px solid var(--licht); outline-offset: 5px; }
.fl { transform-box: fill-box; transition: transform .7s cubic-bezier(.3, 1.35, .5, 1); }
.fl.li, .fl.t { transform-origin: left center; }
.fl.re { transform-origin: right center; }
.fl.r { transform-origin: center top; }
.auf .li { transform: scaleX(.2) skewY(14deg); }
.auf .re { transform: scaleX(.2) skewY(-14deg); }
.auf .t { transform: scaleX(.24) skewY(10deg); }
.auf .r { transform: scaleY(.16); }
.heute .fl { animation: spalt 2.8s infinite; }
.heute .fl.r { animation-name: spalt-r; }
@keyframes spalt { 0%, 58%, 100% { transform: none; } 70% { transform: scaleX(.86) skewY(2deg); } 79% { transform: none; } 87% { transform: scaleX(.93) skewY(1deg); } }
@keyframes spalt-r { 0%, 58%, 100% { transform: none; } 70% { transform: scaleY(.86); } 79% { transform: none; } 87% { transform: scaleY(.93); } }
.auf .innen { animation: licht 6s infinite; }
.auf:nth-of-type(3n) .innen { animation-delay: -2.3s; }
.auf:nth-of-type(4n) .innen { animation-delay: -4.1s; animation-duration: 7.5s; }
@keyframes licht { 0%, 91%, 97%, 100% { opacity: 1; } 94% { opacity: .82; } }
.ruettelt svg { animation: ruetteln .36s; }
@keyframes ruetteln { 25% { transform: translateX(-3px) rotate(-1.4deg); } 50% { transform: translateX(3px) rotate(1.4deg); } 75% { transform: translateX(-2px); } }
.zettel { position: fixed; z-index: 5; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); margin: 0; width: max-content; max-width: calc(100vw - 28px); padding: 10px 18px; border: 3px solid var(--tinte); background: var(--schnee); font-size: 18px; text-align: center; visibility: hidden; transform: translate(-50%, 300%) rotate(-1.2deg); transition: transform .3s cubic-bezier(.2, 1.2, .4, 1), visibility .3s; }
.zettel.da { visibility: visible; transform: translate(-50%, 0) rotate(-1.2deg); }
.fuss { padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); text-align: center; font-size: 15px; }
.fuss a { display: inline-block; padding: 6px 4px; margin-left: 8px; color: inherit; }

/* ---- Hinter dem Türchen */
dialog.dahinter { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: auto; overscroll-behavior: contain; color: inherit; }
dialog.dahinter::backdrop { background: none; }
dialog[open] { animation: aufgehen .5s cubic-bezier(.2, .9, .3, 1); }
@keyframes aufgehen { from { clip-path: inset(var(--o, 50%) var(--r, 50%) var(--u, 50%) var(--l, 50%)); } to { clip-path: inset(0); } }
html.zugedeckt { overflow: hidden; }
.dahinter { background: var(--licht); }
.inhalt { max-width: 560px; margin: 0 auto; padding: 22px 20px calc(96px + env(safe-area-inset-bottom)); overflow-wrap: anywhere; }
.oben { display: flex; justify-content: space-between; align-items: flex-start; margin: 0 0 20px; }
.ziffer { height: 92px; width: auto; }
.weg { position: fixed; z-index: 2; bottom: calc(16px + env(safe-area-inset-bottom)); right: max(16px, calc(50% - 270px)); padding: 10px 16px; background: var(--tinte); color: var(--schnee); font-size: 18px; text-decoration: none; transform: rotate(1.4deg); }
.weg:active, .knopf:active, .antworten button:active { transform: translateY(2px); }
.inhalt h1 { margin: 0 0 16px; font-size: clamp(32px, 9.4vw, 46px); line-height: 1.04; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.inhalt h2 { margin: 0 0 10px; font-size: 25px; line-height: 1.15; font-weight: 800; }
.baustein { margin: 0 0 30px; }
.text, .bildtext { font-size: 19px; line-height: 1.45; }
.text p { margin: 0 0 .8em; }
.text a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bildtext { margin: 10px 0 0; font-size: 17px; }
.b-zitat blockquote { margin: 0; padding: 2px 0 2px 18px; border-left: 9px solid var(--rot); font-size: 25px; line-height: 1.28; font-weight: 700; }
.b-zitat blockquote p { margin: 0 0 .5em; }
.b-zitat footer { font-size: 17px; font-weight: 400; }
.bilder img { display: block; width: 100%; height: auto; border: 4px solid var(--tinte); background: var(--tinte); clip-path: polygon(0 .8%, 31% 0, 63% 1%, 100% .2%, 99.3% 42%, 100% 99.2%, 54% 100%, 19% 99%, .5% 100%, 0 60%); }
.bilder.viele { display: flex; gap: 10px; margin: 0 -20px; padding: 0 20px 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.bilder.viele img { flex: none; width: auto; max-width: 86%; height: min(88vw, 430px); object-fit: cover; scroll-snap-align: center; }
video { display: block; width: 100%; max-height: 78vh; border: 4px solid var(--tinte); background: var(--tinte); }
audio { display: block; width: 100%; }
.knopf { display: inline-block; max-width: 100%; padding: 13px 22px; border: 0; background: var(--rot); color: var(--schnee); font: inherit; font-size: 20px; font-weight: 700; text-decoration: none; cursor: pointer; clip-path: polygon(0 6%, 40% 0, 100% 4%, 99% 96%, 62% 100%, 1% 95%); }
.medien { display: block; padding: 16px 18px; border: 4px solid var(--tinte); background: var(--schnee); color: inherit; text-decoration: none; }
.medien b { display: block; font-size: 22px; line-height: 1.2; }
.medien span { font-size: 18px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.antworten { display: grid; gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.antworten button, .antworten li { position: relative; display: flex; justify-content: space-between; gap: 14px; width: 100%; padding: 14px 16px; border: 4px solid var(--tinte); border-radius: 0; background: var(--schnee); color: var(--tinte); font: inherit; font-size: 20px; text-align: left; }
.antworten button { cursor: pointer; }
.antworten button:hover, .antworten button:focus-visible { background: #fff; }
.antworten button[disabled] { opacity: .6; }
.antworten span { flex: none; font-weight: 800; }
.antworten .richtig { background: var(--gruen); color: var(--schnee); }
.antworten .daneben { background: none; }
.antworten .meine { border-color: var(--rot); }
.antworten li:has(meter) { flex-wrap: wrap; }
.antworten meter { flex: 0 0 100%; width: 100%; height: 12px; border: 0; background: #dcd6c4; appearance: none; -webkit-appearance: none; }
.antworten meter::-webkit-meter-inner-element { display: block; height: 12px; }
.antworten meter::-webkit-meter-bar { height: 12px; border: 0; border-radius: 0; background: #dcd6c4; }
.antworten meter::-webkit-meter-optimum-value { background: var(--rot); transition: inline-size .5s; }
.antworten meter::-moz-meter-bar { background: var(--rot); }
.wort { display: grid; gap: 10px; justify-items: start; }
.wort label { font-weight: 700; font-size: 18px; }
.wort input { width: 100%; padding: 12px 14px; border: 4px solid var(--tinte); border-radius: 0; background: var(--schnee); font: inherit; font-size: 22px; color: var(--tinte); }
.wort input:focus { outline: 3px solid var(--rot); outline-offset: 2px; }
.wort .daneben { margin: 0; min-height: 1.4em; font-size: 18px; font-weight: 700; }
.neu { animation: kommen .45s cubic-bezier(.2, .9, .3, 1); }
@keyframes kommen { from { opacity: 0; transform: translateY(14px); } }

/* ---- Gesperrt / zu früh */
body.gesperrt { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: var(--rot); color: var(--schnee); }
.plakat { flex: 1; display: grid; align-content: center; justify-items: start; gap: 26px; width: 100%; max-width: 640px; margin: 0 auto; padding: 40px 24px; }
.plakat p { margin: 0; font-size: clamp(34px, 10.5vw, 66px); line-height: 1.04; font-weight: 800; text-wrap: balance; overflow-wrap: anywhere; }
.plakat .knopf { background: var(--schnee); color: var(--tinte); }

/* ---- Vorschau im ACP */
.vorschau-leiste { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 10px 14px; background: var(--tinte); color: var(--schnee); font-size: 16px; }
.vorschau-leiste a { color: inherit; }
.vorschau-leiste select, .vorschau-leiste button { font: inherit; padding: 5px 10px; }

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