/* HBC Advent Calendar – Erscheinungsbild „Barocker Adventszauber" (Mobile First)
   Farben und Typografie folgen der Kundenvorlage assets/references/kalender-design.png. */

@font-face { font-family: "Lobster"; src: url("/fonts/lobster-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Kaushan Script"; src: url("/fonts/kaushan-script-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-display-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; font-weight: 700; src: url("/fonts/playfair-display-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; font-style: italic; src: url("/fonts/playfair-display-latin-400-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 700; src: url("/fonts/playfair-display-latin-700-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-weight: 600; src: url("/fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-style: italic; src: url("/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-display: swap; }

:root {
  --cream: #fbf6ea;
  --paper: #f8eed6;
  --paper-2: #efdfb8;
  --red: #a31524;
  --red-bright: #bb1f2e;
  --red-deep: #6c0a14;
  --gold: #c9a045;
  --gold-l: #f1dc9c;
  --gold-d: #8a661c;
  --navy: #1d2a4f;
  --ink: #2b2433;
  --green: #2f6b3f;
  --script: "Lobster", "Brush Script MT", cursive;
  --hand: "Kaushan Script", "Lobster", cursive;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --gold-grad: linear-gradient(160deg, #f6e6ab 0%, #d9b352 38%, #a67c22 62%, #ecd389 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(60rem 30rem at 50% -6rem, rgba(255, 255, 255, .95), transparent 70%),
    linear-gradient(180deg, #d9e6f3 0, #ecf2f8 22rem, #f7f5ef 46rem, #f3eee4 100%);
  background-attachment: scroll;
  min-height: 100vh;
}
img { max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.defs { position: absolute; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }

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

.preview-bar { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; padding: 8px 14px; font-size: .95rem; text-align: center; }
.preview-bar a { color: var(--gold-l); margin-left: 8px; }

/* ------------------------------------------------------------------ Seite & Dekoration */
.page { position: relative; overflow: hidden; padding-bottom: 28px; }
.poster { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 12px; }

.garland { position: absolute; top: 0; right: 0; width: min(52vw, 430px); height: auto; pointer-events: none; z-index: 1; }
.garland-l { right: auto; left: 0; transform: scaleX(-1); }
.branch { display: none; position: absolute; top: 640px; right: 0; width: 122px; height: auto; pointer-events: none; }
.branch-l { right: auto; left: 0; transform: scaleX(-1); }

/* ------------------------------------------------------------------ Kopfbereich */
.hero { position: relative; text-align: center; padding-top: 34px; }

.brand { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; min-height: 40px; line-height: 1; }
.brand-1 { font-family: var(--script); font-size: 1.45rem; color: var(--red); border-bottom: 1px solid var(--red); padding: 0 6px 1px; }
.brand-2 { font-family: var(--serif); font-size: .74rem; letter-spacing: .04em; color: var(--navy); margin-top: 3px; }
.brand-logo { max-height: 64px; width: auto; }

.title {
  position: relative; z-index: 2;
  margin: 6px 0 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3rem, 15.5vw, 7.2rem);
  line-height: .92;
  color: var(--red);
  text-shadow: 0 1px 0 #fff, 0 0 14px #fff, 0 0 30px rgba(255, 255, 255, .9), 0 3px 5px rgba(90, 10, 20, .18);
  text-wrap: balance;
}
.title span { display: block; }

.subtitle {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 10px 0 0;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1rem, 4.6vw, 1.7rem);
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--navy);
  text-shadow: 0 0 10px #fff, 0 0 4px #fff;
}
.subtitle span { margin-right: -.26em; }
.flourish { width: clamp(34px, 11vw, 96px); height: 28px; color: var(--gold); flex: none; overflow: visible; }
.flip { transform: scaleX(-1); }

.stage { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin: 14px -12px 0; padding: 0 12px 104px; }
.scene {
  position: absolute; left: 0; bottom: 0; z-index: 0;
  width: 100%; height: 210px;
  object-fit: cover; object-position: 9% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 34%);
  mask-image: linear-gradient(180deg, transparent 0, #000 34%);
}

.horsti { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.medallion {
  display: block; width: 132px; height: 132px; border-radius: 50%;
  padding: 5px; background: var(--gold-grad);
  box-shadow: 0 6px 16px rgba(60, 30, 10, .35), inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.medallion img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 2px solid #fff8e2; background: #f1ede4; }

.sign, .note {
  position: relative; margin: 0;
  background: linear-gradient(135deg, #fbf3dc 0%, #f3e3ba 60%, #ead29b 100%);
  box-shadow: 0 5px 12px rgba(60, 35, 10, .32), inset 0 0 18px rgba(170, 120, 50, .22);
  border-radius: 3px 5px 4px 6px;
}
.sign { transform: rotate(-5deg); margin: -22px 0 0 34px; padding: 9px 16px 8px; display: flex; flex-direction: column; align-items: center; line-height: 1.02; color: var(--red); }
.sign-s { font-family: var(--hand); font-size: .98rem; }
.sign strong { font-family: var(--script); font-weight: 400; font-size: 1.75rem; }
.sign-heart { font-size: .8rem; line-height: 1; margin-top: 1px; }
.sign-snow, .progress-snow {
  position: absolute; left: 4%; right: 6%; top: -6px; height: 11px; pointer-events: none;
  background: #fff; border-radius: 12px 14px 60% 70% / 9px 9px 100% 100%;
  box-shadow: inset 0 -2px 2px rgba(150, 175, 205, .45), 0 1px 1px rgba(60, 60, 90, .12);
}

.note {
  z-index: 2; transform: rotate(4deg);
  max-width: 172px; margin: 2px 4px 0 0; padding: 12px 12px 8px;
  font-family: var(--hand); font-size: .98rem; line-height: 1.28; color: var(--navy); text-align: center;
}
.note span { display: block; }
.note-star { color: var(--gold); font-size: 1.05rem; margin-top: 2px; text-shadow: 0 1px 0 rgba(120, 80, 10, .4); }

.hint {
  position: relative; z-index: 3; margin: 0 auto 12px; max-width: 34rem; padding: 10px 16px; text-align: center;
  background: rgba(255, 252, 242, .94); border: 1px solid var(--gold); border-radius: 999px; color: var(--navy);
  font-style: italic; box-shadow: 0 3px 10px rgba(60, 40, 10, .15);
}

/* ------------------------------------------------------------------ Türchen */
.doors { position: relative; z-index: 3; margin-top: -8px; }
.doors:focus { outline: none; }
.grid { list-style: none; margin: 0; padding: 0 2px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px 9px; }
.grid li { min-width: 0; }

.door {
  --notch: 7px;
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 2.15;
  border: 0; padding: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 4px 5px rgba(50, 20, 10, .38));
  transition: transform .18s ease, filter .25s ease;
}
.door-frame, .door-leaf, .door-inside {
  position: absolute;
  -webkit-mask:
    radial-gradient(circle at 0 0, transparent var(--notch), #000 calc(var(--notch) + .6px)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, transparent var(--notch), #000 calc(var(--notch) + .6px)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, transparent var(--notch), #000 calc(var(--notch) + .6px)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, transparent var(--notch), #000 calc(var(--notch) + .6px)) 100% 100% / 51% 51% no-repeat;
  mask:
    radial-gradient(circle at 0 0, transparent var(--notch), #000 calc(var(--notch) + .6px)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, transparent var(--notch), #000 calc(var(--notch) + .6px)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, transparent var(--notch), #000 calc(var(--notch) + .6px)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, transparent var(--notch), #000 calc(var(--notch) + .6px)) 100% 100% / 51% 51% no-repeat;
}
.door-frame { inset: 0; background: var(--gold-grad); }
.door-inside, .door-leaf { inset: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.door-inside {
  padding-left: 24%;
  background: radial-gradient(circle at 58% 42%, #fffbe6 0, #f8e3a4 42%, #dfab4d 100%);
  color: var(--red-deep);
  box-shadow: inset 0 0 10px rgba(120, 60, 0, .5);
}
.door-leaf {
  color: var(--gold-l);
  background:
    radial-gradient(120% 90% at 50% 38%, rgba(214, 48, 60, .55) 0, transparent 60%),
    linear-gradient(180deg, #9d1422 0%, #7d0d19 55%, #5e0811 100%);
  transform-origin: left center;
  transition: transform .9s cubic-bezier(.3, .1, .2, 1), filter .9s ease;
  backface-visibility: hidden;
}
.inlay { position: absolute; inset: 4px; border: 1px solid rgba(236, 207, 130, .75); border-radius: 5px; pointer-events: none; }
.pip { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); font-size: .56rem; line-height: 1; color: var(--gold-l); text-shadow: 0 0 4px rgba(255, 220, 130, .9); }

.door .num {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: clamp(1.5rem, 8.4vw, 3.3rem); line-height: 1; margin-top: 4px;
  font-variant-numeric: lining-nums;
}
.door-leaf .num {
  color: #ecd085;
  background: linear-gradient(180deg, #fff4c6 0%, #ecc968 48%, #b98a2c 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(40, 0, 0, .55));
  padding: 0 .12em;
}
.door .ico { width: clamp(17px, 5.4vw, 38px); height: clamp(17px, 5.4vw, 38px); flex: none; }
.door-leaf .ico { color: #f3e2ac; filter: drop-shadow(0 1px 1px rgba(40, 0, 0, .5)); }

.door-snow {
  position: absolute; left: 5%; right: 7%; top: -5px; height: 9px; pointer-events: none;
  background: #fff; border-radius: 10px 12px 60% 75% / 8px 8px 100% 100%;
  box-shadow: inset 0 -2px 2px rgba(150, 175, 205, .5), 0 1px 1px rgba(40, 20, 20, .25);
}
.door-snow::after { content: ""; position: absolute; right: 12%; bottom: -3px; width: 22%; height: 6px; background: #fff; border-radius: 0 0 50% 50%; }

.door-check {
  position: absolute; right: -5px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--green); border: 2px solid #fff8e2;
}
.door-check .ico { width: 13px; height: 13px; stroke-width: 3; }
.door-draft { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: .62rem; padding: 1px 7px; border-radius: 99px; letter-spacing: .04em; }

.door.is-locked { cursor: default; }
.door.is-locked .door-leaf { filter: saturate(.86) brightness(.9); }
.door.is-ready { animation: glow 2.6s ease-in-out infinite; }
.door.is-ready .pip { animation: twinkle 1.8s ease-in-out infinite; }
.door.is-open .door-leaf, .door.is-opening .door-leaf { transform: perspective(1100px) rotateY(-72deg); filter: brightness(.7); }
.door-leaf > * { transition: opacity .5s ease; }
.door.is-open .door-leaf > *:not(.inlay), .door.is-opening .door-leaf > *:not(.inlay) { opacity: 0; }
.door.is-opening { animation: none; filter: drop-shadow(0 0 16px rgba(255, 214, 110, 1)) drop-shadow(0 4px 5px rgba(50, 20, 10, .38)); z-index: 2; }
.door.is-opening .door-inside { animation: shine .95s ease-out; }
.door.is-shake { animation: shake .45s ease; }
@media (hover: hover) {
  .door:not(.is-locked):hover { transform: translateY(-3px) scale(1.03); }
}
.door:active:not(.is-locked) { transform: scale(.97); }
.door:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 7px var(--navy); border-radius: 10px; }

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 4px 5px rgba(50, 20, 10, .38)) drop-shadow(0 0 2px rgba(255, 210, 110, .5)); }
  50% { filter: drop-shadow(0 4px 5px rgba(50, 20, 10, .38)) drop-shadow(0 0 11px rgba(255, 205, 90, 1)); }
}
@keyframes twinkle { 0%, 100% { opacity: .65; } 50% { opacity: 1; transform: translateX(-50%) scale(1.35); } }
@keyframes shine { 0% { filter: brightness(2.2); } 100% { filter: brightness(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-1.5deg); } 40% { transform: translateX(5px) rotate(1.5deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

/* ------------------------------------------------------------------ Fortschritt */
.progress {
  position: relative; z-index: 3; margin: 30px 0 0; padding: 18px 16px 16px;
  display: grid; gap: 14px;
  background: linear-gradient(180deg, #fdf7e6 0%, #f6e9c8 100%);
  border: 2px solid var(--gold); border-radius: 12px;
  box-shadow: 0 8px 20px rgba(60, 35, 10, .22), inset 0 0 0 4px #fdf7e6, inset 0 0 0 5px rgba(201, 160, 69, .7);
}
.progress-snow { left: 2%; right: 3%; top: -8px; height: 13px; }
.progress h2 { margin: 0 0 8px; font-family: var(--script); font-weight: 400; font-size: clamp(1.55rem, 6.4vw, 2.1rem); line-height: 1.1; color: var(--red); display: flex; align-items: center; gap: 10px; }
.p-flake { width: 30px; height: 30px; color: var(--gold); flex: none; }
.bar { height: 16px; border-radius: 99px; background: #ead9b4; box-shadow: inset 0 2px 4px rgba(90, 60, 10, .38); overflow: hidden; }
.bar span {
  display: block; height: 100%; width: 0; min-width: 0; border-radius: 99px;
  background: linear-gradient(180deg, #fbe9a5 0%, #e0b548 45%, #b98722 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: width .8s cubic-bezier(.2, .7, .2, 1);
}
.p-opened { margin: 6px 0 0; text-align: center; font-size: 1rem; color: var(--navy); }
.p-points, .p-rank { border-top: 1px solid rgba(201, 160, 69, .6); padding-top: 12px; }
.p-points { display: flex; align-items: center; justify-content: center; gap: 14px; }
.p-trophy { width: 52px; height: 52px; filter: drop-shadow(0 2px 2px rgba(90, 60, 10, .35)); }
.lbl { display: block; font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--navy); }
.p-score { display: block; font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.1; color: var(--red); font-variant-numeric: lining-nums; white-space: nowrap; }
.p-points.is-pulse .p-score { animation: pulse .7s ease; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.22); color: var(--gold-d); } 100% { transform: scale(1); } }
.p-rank { text-align: center; }
.p-rank .lbl { color: var(--red); }
.rank-row { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; }
.laurel { width: 26px; height: 50px; color: var(--gold); flex: none; }
.ribbon {
  position: relative; display: inline-block; padding: 7px 22px 8px; min-width: 9.5rem;
  font-family: var(--script); font-size: 1.3rem; line-height: 1.15; color: #fff6dc; text-align: center;
  background: linear-gradient(180deg, #b51d2c 0%, #8e1220 100%);
  box-shadow: 0 3px 6px rgba(60, 10, 10, .35);
  text-shadow: 0 1px 1px rgba(60, 0, 0, .5);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 7px; width: 22px; height: 100%; z-index: -1;
  background: #7a0e1a;
}
.ribbon::before { left: -13px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%); }
.ribbon::after { right: -13px; clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%); }

/* ------------------------------------------------------------------ Fuß */
.footer { position: relative; z-index: 3; text-align: center; padding: 22px 8px 6px; font-size: .98rem; color: var(--navy); }
.footer p { margin: 0 0 8px; }
.footer-info { font-style: italic; max-width: 38rem; margin-inline: auto !important; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.footer a { color: var(--navy); text-underline-offset: 3px; }
.footer-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.linklike { background: none; border: 0; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--navy); min-height: 44px; }
.noscript { text-align: center; padding: 20px; }

.toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); width: max-content; max-width: calc(100vw - 28px);
  padding: 12px 18px; border-radius: 14px; text-align: center;
  background: var(--navy); color: #fff8e6; border: 1px solid var(--gold);
  box-shadow: 0 8px 22px rgba(10, 15, 40, .4);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ Türchen-Fenster */
.dlg { border: 0; padding: 0; background: transparent; color: inherit; width: min(640px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px); overflow: auto; overscroll-behavior: contain; }
.dlg::backdrop { background: rgba(14, 20, 46, .76); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] .dlg-card { animation: pop .38s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes pop { from { opacity: 0; transform: scale(.88) translateY(14px); } to { opacity: 1; transform: none; } }
.dlg-card {
  position: relative; padding: 20px 16px 16px;
  background: linear-gradient(180deg, #fefaec 0%, #f7ecd0 100%);
  border: 2px solid var(--gold); border-radius: 16px;
  box-shadow: inset 0 0 0 4px #fefaec, inset 0 0 0 5px rgba(201, 160, 69, .7), 0 0 40px rgba(255, 210, 120, .35);
}
.dlg-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: #fff8e4; border: 1px solid var(--gold); color: var(--red-deep);
}
.dlg-close .ico { width: 20px; height: 20px; stroke-width: 2; }
.dlg-head { display: flex; align-items: center; gap: 14px; padding-right: 44px; margin-bottom: 14px; }
.dlg-badge {
  flex: none; width: 66px; height: 58px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #a51624, #6c0a14); color: var(--gold-l);
  border: 2px solid var(--gold); box-shadow: inset 0 0 0 2px #7d0d19, inset 0 0 0 3px rgba(236, 207, 130, .6), 0 3px 6px rgba(50, 10, 10, .3);
}
.dlg-badge .num { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.55rem; line-height: 1; }
.dlg-badge .ico { width: 18px; height: 18px; }
.dlg-kicker { margin: 0; font-size: .82rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--navy); }
.dlg-title { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(1.7rem, 7.4vw, 2.3rem); line-height: 1.08; color: var(--red); }

.dlg-body { display: grid; gap: 16px; }
.dlg-body p { margin: 0 0 .7em; }
.dlg-body p:last-child { margin-bottom: 0; }
.speech { display: flex; align-items: flex-start; gap: 12px; }
.speech-fig { flex: none; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 3px solid var(--gold); box-shadow: 0 3px 8px rgba(60, 30, 10, .3); background: #f1ede4; }
.speech-text { position: relative; flex: 1; background: #fffdf4; border: 1px solid var(--gold); border-radius: 4px 16px 16px 16px; padding: 12px 14px; font-size: 1.16rem; line-height: 1.45; color: var(--navy); box-shadow: 0 2px 6px rgba(60, 40, 10, .1); }
.speech-text::before { content: ""; position: absolute; left: -8px; top: 18px; width: 14px; height: 14px; background: #fffdf4; border-left: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg); }
.prose { font-size: 1.16rem; color: var(--ink); }
.prose-outro { font-style: italic; }
.dlg-figure { margin: 0; }
.dlg-figure img, .dlg-video { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; border: 2px solid var(--gold); background: #2a2233; }

.task { background: rgba(255, 253, 244, .8); border: 1px solid rgba(201, 160, 69, .7); border-radius: 12px; padding: 14px 12px; display: grid; gap: 12px; }
.task-step, .task-hint { margin: 0 !important; font-size: 1rem; color: var(--navy); text-align: center; }
.task-hint { font-style: italic; }
.task-done { margin: 0 !important; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; color: var(--green); text-align: center; }
.task-done .ico { width: 22px; height: 22px; stroke-width: 2.4; flex: none; }
.quiz, .guess { display: grid; gap: 12px; }
.question { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.28rem; line-height: 1.25; color: var(--navy); text-align: center; }
.riddle-img { width: min(210px, 62%); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; padding: 5px; background: var(--gold-grad); box-shadow: 0 5px 12px rgba(60, 30, 10, .3); }
.riddle-img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #fff8e2; }
.options { display: grid; gap: 10px; }
.options-img { grid-template-columns: repeat(2, 1fr); }
.option {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; width: 100%; padding: 12px 14px; cursor: pointer;
  background: #fffdf4; border: 2px solid var(--gold); border-radius: 12px;
  font-size: 1.16rem; font-weight: 600; color: var(--navy); text-align: center;
  transition: background .15s, transform .12s;
}
.option img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; border-radius: 7px; }
.options-img .option { padding: 8px; font-size: 1.02rem; }
@media (hover: hover) { .option:not(:disabled):hover { background: #fbefc9; } }
.option:active:not(:disabled) { transform: scale(.98); }
.option.is-right { background: #e3f1dd; border-color: var(--green); color: #1f4b2a; }
.option.is-wrong { background: #f7e3e0; border-color: #b9505a; color: #7c2530; opacity: .75; animation: shake .4s ease; }
.option:disabled { cursor: default; }
.feedback { display: grid; gap: 10px; justify-items: center; }
.feedback:empty { display: none; }
.fb { margin: 0 !important; width: 100%; padding: 10px 14px; border-radius: 10px; text-align: center; font-size: 1.1rem; }
.fb-ok { background: #e3f1dd; color: #1f4b2a; border: 1px solid #9cc4a0; }
.fb-warn { background: #f9e7e3; color: #7c2530; border: 1px solid #dba9a9; }
.fb-info { background: #e8ecf6; color: var(--navy); border: 1px solid #b4bfdc; }
.fb-note { margin: 0 !important; text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-red { background: linear-gradient(180deg, #b81e2d, #8a111e); color: #fff6dc; border-color: #6c0a14; box-shadow: 0 3px 6px rgba(60, 10, 10, .3), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-gold { background: linear-gradient(180deg, #f6e3a0, #d6ab45); color: #3a2a08; border-color: var(--gold-d); box-shadow: 0 3px 6px rgba(60, 40, 10, .25), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(29, 42, 79, .45); font-family: var(--serif); font-weight: 400; min-height: 44px; justify-self: center; }
.btn-ghost.is-nudge { border-color: var(--red); color: var(--red); }

.guess-value { display: block; text-align: center; font-family: var(--display); font-weight: 700; font-size: 2.1rem; color: var(--red); line-height: 1.1; }
.guess input[type="range"] { width: 100%; height: 44px; accent-color: var(--red); margin: 0; }
.guess-scale { display: flex; justify-content: space-between; font-size: .95rem; color: var(--navy); margin-top: -10px; }
.guess .btn { justify-self: center; }

.memory { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; max-width: 430px; width: 100%; margin: 0 auto; }
.card { aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 500px; -webkit-tap-highlight-color: transparent; }
.card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s ease; }
.card.is-open .card-inner, .card.is-found .card-inner { transform: rotateY(180deg); }
.card-back, .card-front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.card-back { background: linear-gradient(180deg, #a51624, #6c0a14); border: 2px solid var(--gold); color: var(--gold-l); box-shadow: inset 0 0 0 3px #7d0d19, inset 0 0 0 4px rgba(236, 207, 130, .55); }
.card-back .ico { width: 44%; height: 44%; }
.card-front { transform: rotateY(180deg); background: #fffdf4; border: 2px solid var(--gold); color: var(--red); }
.card-front .ico { width: 62%; height: 62%; }
.card-front img { width: 100%; height: 100%; object-fit: cover; }
.card.is-found .card-front { border-color: var(--green); box-shadow: 0 0 0 2px rgba(47, 107, 63, .35); background: #f0f7ea; }

.puzzle { --n: 3; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(100%, 360px); margin: 0 auto; aspect-ratio: 3 / 4; padding: 4px; background: var(--gold-grad); border-radius: 10px; }
.tile { border: 0; padding: 0; cursor: pointer; background-color: #ddd; background-repeat: no-repeat; border-radius: 4px; min-width: 0; min-height: 0; }
.tile.is-selected { outline: 4px solid #fff; outline-offset: -4px; box-shadow: 0 0 0 3px var(--navy); position: relative; z-index: 1; transform: scale(1.04); }
.tile.is-solved { cursor: default; border-radius: 0; opacity: 1; }
.puzzle:has(.is-solved) { gap: 0; }

.search { position: relative; touch-action: manipulation; cursor: crosshair; border-radius: 10px; overflow: hidden; border: 2px solid var(--gold); }
.search img { display: block; width: 100%; user-select: none; -webkit-user-select: none; }
.found, .miss { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; }
.found { width: 38px; height: 38px; display: grid; place-items: center; background: rgba(255, 248, 220, .85); border: 2px solid var(--gold); color: var(--red); animation: pop .3s ease; }
.found .ico { width: 22px; height: 22px; }
.miss { width: 26px; height: 26px; border: 2px solid #fff; animation: ripple .7s ease-out forwards; }
@keyframes ripple { from { opacity: .9; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

.dlg-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(201, 160, 69, .7); display: grid; gap: 12px; justify-items: center; }
.dlg-points { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; font-size: 1.02rem; color: var(--navy); text-align: center; }
.dlg-points:empty { display: none; }
.dlg-points .more { font-style: italic; flex-basis: 100%; }
.gain { font-family: var(--display); font-weight: 700; color: #3a2a08; background: linear-gradient(180deg, #f6e3a0, #d6ab45); border: 1px solid var(--gold-d); border-radius: 99px; padding: 2px 12px; animation: pop .5s cubic-bezier(.2, .9, .3, 1.4); }

/* ------------------------------------------------------------------ Erzählende Türchen (Gedicht, Geschichte, Märchen, Porträt, Botschaft, Galerie) */
.dlg-card.is-reading {
  background:
    radial-gradient(120% 60% at 50% 0, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(90% 50% at 50% 100%, rgba(214, 171, 69, .16), transparent 70%),
    linear-gradient(180deg, #fefaec 0%, #f8eed4 55%, #f3e3bd 100%);
}
.dlg-card.is-reading .dlg-head { margin-bottom: 18px; }
.dlg-body.is-reading { gap: 22px; padding: 0 2px; }
.dlg-body.is-reading > * { animation: rise .7s ease both; }
.dlg-body.is-reading > *:nth-child(2) { animation-delay: .08s; }
.dlg-body.is-reading > *:nth-child(3) { animation-delay: .16s; }
.dlg-body.is-reading > *:nth-child(n + 4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); }
.orn-line { height: 1px; width: min(26%, 110px); background: linear-gradient(90deg, transparent, var(--gold)); }
.orn-line:last-child { background: linear-gradient(270deg, transparent, var(--gold)); }
.orn-star { font-size: 1.05rem; line-height: 1; text-shadow: 0 1px 0 rgba(120, 80, 10, .3); }

.series { text-align: center; padding: 14px 12px 12px; border-top: 1px solid rgba(201, 160, 69, .7); border-bottom: 1px solid rgba(201, 160, 69, .7); background: rgba(255, 253, 244, .55); }
.series p { margin: 0; }
.series-kicker { font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-d); }
.series-title { font-family: var(--script); font-size: clamp(1.35rem, 5.8vw, 1.75rem); line-height: 1.15; color: var(--red); margin: 4px 0 8px !important; text-wrap: balance; }
.series-part { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1rem; color: var(--navy); font-weight: 600; }
.series-dots { display: inline-flex; gap: 6px; }
.series-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--gold-d); background: transparent; }
.series-dots i.is-on { background: radial-gradient(circle at 35% 30%, #f8e6a6, #c9992f 70%); }
.series-links { margin-top: 10px !important; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: .98rem; color: var(--navy); }
.chip { min-height: 40px; padding: 4px 16px; border-radius: 99px; border: 1px solid var(--gold-d); background: #fffdf4; color: var(--navy); font-weight: 600; cursor: pointer; }
@media (hover: hover) { .chip:hover { background: #fbefc9; } }

.reading, .poem { color: #2a2230; max-width: 34em; margin-inline: auto; width: 100%; }
.reading { font-size: 1.22rem; line-height: 1.72; hyphens: auto; -webkit-hyphens: auto; }
.reading p { margin: 0 0 1.05em; }
.reading:not(.reading-plain) > p:first-child::first-letter {
  float: left; font-family: var(--script); font-size: 3.5em; line-height: .82; padding: .06em .09em 0 0; color: var(--red);
  text-shadow: 0 1px 0 #fff, 0 2px 3px rgba(120, 80, 10, .25);
}
.poem { text-align: center; font-style: italic; font-size: 1.26rem; line-height: 1.8; }
.poem p { margin: 0 0 1.5em; }
.credit { margin: -6px 0 0 !important; text-align: right; font-size: 1rem; font-variant: small-caps; letter-spacing: .06em; color: var(--gold-d); max-width: 34em; margin-inline: auto !important; width: 100%; }
.prose-center { text-align: center; }

.dlg-body.is-reading .dlg-figure img {
  border: 0; border-radius: 6px; background: #fff8e6; padding: 6px;
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 5px #fff8e6, 0 0 0 6px rgba(201, 160, 69, .75), 0 10px 22px rgba(70, 40, 10, .28);
  margin: 6px;
  width: calc(100% - 12px);
}
.dlg-figure.is-portrait { display: grid; justify-items: center; }
.dlg-body.is-reading .dlg-figure.is-portrait img {
  width: min(74%, 300px); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: 50%; padding: 0; max-height: none;
  box-shadow: 0 0 0 5px #fff8e6, 0 0 0 9px var(--gold), 0 0 0 11px #fff8e6, 0 0 0 12px rgba(201, 160, 69, .8), 0 14px 26px rgba(70, 40, 10, .3);
  margin: 14px;
}
.facts { margin: 0 auto; width: 100%; max-width: 30em; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 14px 16px; background: rgba(255, 253, 244, .7); border: 1px solid rgba(201, 160, 69, .7); border-radius: 12px; }
.facts dt { font-family: var(--display); font-weight: 700; color: var(--red-deep); font-size: 1rem; }
.facts dd { margin: 0; color: var(--navy); font-size: 1.1rem; }

.message { position: relative; margin: 6px 0 0; padding: 30px 20px 22px; text-align: center; font-family: var(--hand); font-size: clamp(1.3rem, 5.6vw, 1.6rem); line-height: 1.5; color: var(--navy); background: rgba(255, 253, 244, .75); border: 1px solid var(--gold); border-radius: 14px; box-shadow: inset 0 0 0 4px rgba(255, 253, 244, .9), inset 0 0 0 5px rgba(201, 160, 69, .5); }
.message p { margin: 0 0 .8em; }
.message-heart { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #b81e2d, #8a111e); color: #fff6dc; font-family: var(--serif); font-size: 1.05rem; border: 2px solid var(--gold-l); animation: heartbeat 3.2s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.12); } }

.activity { padding: 18px 18px 16px; border-radius: 14px; background: linear-gradient(180deg, #fff9ea, #fbeccc); border: 2px solid var(--red); box-shadow: inset 0 0 0 4px #fff9ea, inset 0 0 0 5px rgba(163, 21, 36, .35); font-size: 1.18rem; line-height: 1.6; color: var(--ink); }
.activity p { margin: 0 0 .8em; }
.activity-title { font-family: var(--script); font-size: 1.6rem; line-height: 1.2; color: var(--red); text-align: center; margin-bottom: 10px !important; }

.audio-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 253, 244, .8); border: 1px solid var(--gold); max-width: 34em; width: 100%; margin-inline: auto; }
.audio-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #3a2a08; background: linear-gradient(180deg, #f6e3a0, #d6ab45); border: 1px solid var(--gold-d); }
.audio-ico .ico { width: 24px; height: 24px; }
.audio-main { flex: 1; min-width: 0; }
.audio-main p { margin: 0 !important; }
.audio-label { font-family: var(--display); font-weight: 700; color: var(--navy); font-size: 1.08rem; }
.audio-hint { font-size: .92rem; font-style: italic; color: #4c4458; }
.audio-card audio { display: block; width: 100%; height: 44px; margin-top: 8px; }

.gallery { display: grid; gap: 10px; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; gap: 8px; align-content: center; padding: 8px; }
.slide img { display: block; width: 100%; max-height: 58vh; object-fit: contain; border-radius: 6px; background: #fff8e6; padding: 5px; box-shadow: 0 0 0 1px var(--gold), 0 6px 14px rgba(70, 40, 10, .22); }
.slide figcaption { text-align: center; font-style: italic; font-size: 1.08rem; color: var(--navy); padding: 0 6px; }
.gallery-nav { display: flex; align-items: center; justify-content: center; gap: 16px; }
.gallery-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: linear-gradient(180deg, #f6e3a0, #d6ab45); border: 1px solid var(--gold-d); color: #3a2a08; }
.gallery-btn .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.gallery-btn:disabled { opacity: .4; cursor: default; }
.gallery-count { min-width: 8.5em; text-align: center; color: var(--navy); font-size: 1rem; }

.finish { display: grid; gap: 8px; justify-items: center; padding-top: 4px; }
.finish-hint { margin: 0 !important; font-style: italic; font-size: 1rem; color: var(--navy); text-align: center; }
.btn-finish { gap: 10px; padding-inline: 30px; min-height: 52px; }
.finish-heart { color: var(--red); font-family: var(--serif); }

/* ------------------------------------------------------------------ Datenschutzseite */
.legal { max-width: 46rem; margin: 0 auto; padding: 22px 18px 48px; }
.legal-brand { margin: 0 0 18px; text-align: center; }
.legal-brand a { font-family: var(--script); font-size: 1.9rem; line-height: 1.1; color: var(--red); text-decoration: none; }
.legal-brand span { display: block; font-family: var(--serif); font-weight: 600; font-size: .95rem; letter-spacing: .22em; text-transform: uppercase; color: var(--navy); margin-top: 4px; }
.legal h1 { font-family: var(--display); font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.2; color: var(--navy); margin: 0 0 18px; }
.legal-text { background: #fffdf6; border: 1px solid var(--gold); border-radius: 12px; padding: 8px 18px 18px; box-shadow: 0 6px 16px rgba(60, 40, 10, .12); font-size: 1.14rem; line-height: 1.6; overflow-wrap: anywhere; }
.legal-text h2 { font-family: var(--display); font-size: 1.3rem; line-height: 1.25; color: var(--red-deep); margin: 1.3em 0 .4em; }
.legal-text h3 { font-family: var(--display); font-size: 1.12rem; color: var(--navy); margin: 1.1em 0 .3em; }
.legal-text p { margin: 0 0 .8em; }
.legal-text ul { margin: 0 0 .8em; padding-left: 1.3em; }
.legal-stand { margin: 12px 4px 0; font-size: .98rem; color: var(--navy); font-style: italic; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; }
.legal-nav a { color: var(--navy); text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.legal-draft { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 1rem; }

/* ------------------------------------------------------------------ Größere Displays */
@media (min-width: 380px) {
  .medallion { width: 146px; height: 146px; }
}
@media (min-width: 600px) {
  .poster { padding: 0 22px; }
  .grid { grid-template-columns: repeat(6, 1fr); gap: 20px 12px; }
  .door { --notch: 9px; }
  .door .num { font-size: clamp(1.7rem, 5.6vw, 3.5rem); }
  .door .ico { width: clamp(20px, 3.6vw, 38px); height: clamp(20px, 3.6vw, 38px); }
  .pip { font-size: .7rem; top: 4px; }
  .door-inside, .door-leaf { inset: 4px; }
  .inlay { inset: 5px; border-radius: 7px; }
  .door-snow { height: 11px; top: -6px; }
  .door-check { width: 26px; height: 26px; }
  .door-check .ico { width: 15px; height: 15px; }
  .stage { margin-inline: -22px; padding: 0 22px 150px; }
  .scene { height: 290px; object-position: 30% 100%; }
  .medallion { width: 190px; height: 190px; padding: 7px; }
  .sign { margin: -30px 0 0 70px; padding: 12px 24px 10px; }
  .sign-s { font-size: 1.25rem; }
  .sign strong { font-size: 2.4rem; }
  .note { max-width: 230px; font-size: 1.22rem; padding: 18px 18px 12px; margin-right: 10px; }
  .dlg-card { padding: 26px 26px 22px; }
  .speech-fig { width: 104px; height: 104px; }
  .brand-1 { font-size: 1.8rem; }
  .brand-2 { font-size: .86rem; }
}
@media (min-width: 760px) {
  .progress { grid-template-columns: 1.7fr auto 1.2fr; align-items: center; gap: 0; padding: 20px 26px; }
  .p-main { padding-right: 26px; }
  .p-points, .p-rank { border-top: 0; padding: 4px 26px; border-left: 1px solid rgba(201, 160, 69, .7); align-self: stretch; }
  .p-rank { padding-right: 6px; display: flex; flex-direction: column; justify-content: center; }
  .p-score { font-size: 2.3rem; }
}
@media (min-width: 900px) {
  .hero { padding-top: 22px; padding-bottom: 19%; }
  .title { font-size: clamp(4.6rem, 7.6vw, 5.7rem); margin-top: 4px; }
  .subtitle { margin-top: 12px; font-size: 1.7rem; }
  .stage { position: static; display: block; margin: 0; padding: 0; }
  .scene { left: 27%; width: 73%; height: auto; -webkit-mask-image: none; mask-image: none; }
  .horsti { position: absolute; left: 6px; top: 40px; }
  .medallion { width: clamp(210px, 22vw, 262px); height: clamp(210px, 22vw, 262px); padding: 9px; }
  .sign { margin: -34px 0 0 clamp(40px, 5vw, 64px); padding: 16px 30px 12px; }
  .sign-s { font-size: 1.5rem; }
  .sign strong { font-size: 3rem; }
  .sign-heart { font-size: 1rem; }
  .note { position: absolute; right: 4px; top: 86px; max-width: 250px; font-size: 1.36rem; padding: 22px 20px 14px; margin: 0; }
  .doors { margin-top: -14px; }
  .grid { gap: 24px 16px; padding: 0 10px; }
  .progress { margin-top: 38px; }
  .garland { width: 430px; }
}
@media (min-width: 1280px) {
  .branch { display: block; right: calc(50% - 700px); }
  .branch-l { right: auto; left: calc(50% - 700px); }
}

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