/* © 2024–2026 Maximilian Krenn · maximiliankrenn.com
   Tauschring Unna - Adventskalender */

.ak-seite {
    --ak-gold: #f1d48b;
    --ak-gold-tief: #c89b3c;
    --ak-nacht-1: #061c24;
    --ak-nacht-2: #0b3438;
    --ak-nacht-3: #0f4a48;
    padding: 0;
}

/* ── Nachthimmel ─────────────────────────────────────────────── */
.ak-himmel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 1.6rem 1.25rem 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(241,212,139,0.10), transparent 70%),
        radial-gradient(ellipse 80% 60% at 85% 10%, rgba(13,148,136,0.28), transparent 70%),
        linear-gradient(180deg, var(--ak-nacht-1) 0%, var(--ak-nacht-2) 55%, var(--ak-nacht-3) 100%);
    color: #f5f1e8;
}
/* Vereinslogo als zartes Muster im Nachthimmel, wie auf allen Seiten (15.11.2026) */
.ak-himmel::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: url('../images/logo.png') repeat 0 0 / 130px auto;
    opacity: .07;
}
.ak-sterne, .ak-sterne::after {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent),
        radial-gradient(1px 1px at 28% 8%, #fff, transparent),
        radial-gradient(1.4px 1.4px at 44% 22%, #fff, transparent),
        radial-gradient(1px 1px at 63% 12%, #fff, transparent),
        radial-gradient(1.3px 1.3px at 78% 26%, #fff, transparent),
        radial-gradient(1px 1px at 91% 6%, #fff, transparent),
        radial-gradient(1px 1px at 7% 40%, #fff, transparent),
        radial-gradient(1.2px 1.2px at 55% 38%, #fff, transparent),
        radial-gradient(1px 1px at 86% 44%, #fff, transparent),
        radial-gradient(1px 1px at 35% 48%, #fff, transparent);
    opacity: .75;
}
.ak-sterne::after { content: ""; transform: translate(3%, 4%); opacity: .5; animation: akFunkeln 5s ease-in-out infinite alternate; }
@keyframes akFunkeln { from { opacity: .15; } to { opacity: .7; } }

/* Schnee nur mit CSS, mehrere Ebenen in unterschiedlichem Tempo */
.ak-himmel::after {
    content: ""; position: absolute; inset: -100% 0 0; z-index: 3; pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 10% 10%, rgba(255,255,255,.9), transparent),
        radial-gradient(3px 3px at 30% 40%, rgba(255,255,255,.75), transparent),
        radial-gradient(2px 2px at 50% 20%, rgba(255,255,255,.85), transparent),
        radial-gradient(2.5px 2.5px at 70% 60%, rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 90% 30%, rgba(255,255,255,.8), transparent),
        radial-gradient(1.5px 1.5px at 20% 70%, rgba(255,255,255,.8), transparent),
        radial-gradient(3px 3px at 80% 85%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.5px 1.5px at 60% 90%, rgba(255,255,255,.8), transparent);
    background-size: 340px 340px;
    animation: akSchnee 22s linear infinite;
}
@keyframes akSchnee { to { transform: translateY(50%); } }
/* Wer das Weihnachtsdesign mit der Schneeflocke abschaltet, bekommt auch hier keinen Schnee */
html.xm-aus .ak-himmel::after { display: none; }

.ak-mond {
    position: absolute; top: 34px; right: 9%; width: 74px; height: 74px; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle at 38% 38%, #fffaf0, #f3e3b8 60%, #e3cc8f);
    box-shadow: 0 0 40px 10px rgba(241,212,139,0.25), 0 0 120px 40px rgba(241,212,139,0.10);
}

/* ── Kopf ────────────────────────────────────────────────────── */
.ak-kopf { position: relative; z-index: 2; text-align: center; max-width: 640px; margin: 0 auto 1rem; }
.ak-dach { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ak-gold); margin: 0 0 .55rem; opacity: .9; }
.ak-kopf h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4.2vw, 2.6rem); font-weight: 400; line-height: 1.08;
    margin: 0; color: #fffaf0; letter-spacing: -.01em;
    text-shadow: 0 2px 24px rgba(241,212,139,0.25);
}
.ak-unter { margin: .4rem 0 0; font-size: .92rem; color: rgba(245,241,232,.78); }
.ak-countdown {
    display: inline-flex; align-items: center; gap: .35rem; margin: .75rem 0 0;
    padding: .45rem 1.05rem; border-radius: 999px; font-size: .86rem; color: #f5f1e8;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(241,212,139,0.35);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ak-countdown strong { color: var(--ak-gold); font-weight: 500; }

.ak-vorschau {
    position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .5rem; margin: -0.2rem auto 1rem; font-size: .78rem; color: rgba(245,241,232,.75);
}
.ak-vorschau select {
    font: inherit; padding: .3rem .6rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08); color: #fff;
}
.ak-vorschau select option { color: #1d1d1f; }
.ak-vorschau a { color: var(--ak-gold); text-decoration: none; border-bottom: 1px solid rgba(241,212,139,.4); }

/* ── Türchen-Raster ──────────────────────────────────────────── */
.ak-raster {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(74px, 8.5vw, 98px);
    grid-auto-flow: dense; gap: .6rem;
    max-width: 820px; margin: 0 auto; padding-bottom: max(11rem, 13.5vw);
}
.ak-tuer {
    position: relative; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit;
    border-radius: 14px; background: transparent; perspective: 900px;
    -webkit-tap-highlight-color: transparent;
}
.ak-tuer.is-gross { grid-column: span 2; grid-row: span 2; }
.ak-tuer.is-breit { grid-column: span 2; }
.ak-tuer.is-hoch  { grid-row: span 2; }
.ak-tuer:focus-visible { outline: 2px solid var(--ak-gold); outline-offset: 3px; }

/* Was hinter der Tür liegt: warmes Licht */
.ak-innen {
    position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 45%, #fff6dc 0%, #f4d58d 45%, #b9822f 100%);
    color: #7a4b12;
    box-shadow: inset 0 0 22px rgba(90,50,0,.35);
}
.ak-innen img { width: 100%; height: 100%; object-fit: cover; }

/* Der Türflügel */
.ak-fluegel {
    position: absolute; inset: 0; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    transform-origin: left center; transform-style: preserve-3d;
    transition: transform .95s cubic-bezier(.2,.75,.25,1.05), box-shadow .3s, filter .3s;
    box-shadow: inset 0 0 0 1px rgba(241,212,139,0.38), inset 0 1px 0 rgba(255,255,255,.18), 0 8px 22px rgba(0,0,0,.28);
    backface-visibility: hidden;
}
.ak-fluegel::before { /* Zierrahmen */
    content: ""; position: absolute; inset: 7px; border-radius: 9px;
    border: 1px dashed rgba(241,212,139,0.35); pointer-events: none;
}
.ak-zahl {
    position: relative; font-family: Georgia, "Times New Roman", serif; font-weight: 400;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem); line-height: 1; color: var(--ak-gold);
    text-shadow: 0 1px 0 rgba(0,0,0,.35), 0 0 18px rgba(241,212,139,.35);
}
.ak-tuer.is-gross .ak-zahl { font-size: clamp(2.4rem, 6vw, 3.8rem); }
/* Die goldene Zahl steht im Vereinslogo, die Figuren tragen Weihnachtsmuetzen */
.ak-zahl { isolation: isolate; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: lining-nums; }
.ak-zahl::before {
    content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
    /* Logo-Bild liegt 6 % ueber der Bildmitte, daher -44 % statt -50 % */
    width: 5.2em; height: 5.2em; transform: translate(-50%, -44%);
    background: url('../images/logo-advent.svg') center / contain no-repeat; /* Logo mit Weihnachtsmuetzen */
    opacity: .3; pointer-events: none;
}
.ak-tuer.is-gross .ak-zahl::before { width: 3.2em; height: 3.2em; }

/* Sechs Papiere, im Wechsel */
.f0 .ak-fluegel { background: #8e2b33 repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 8px, transparent 8px 16px); }
.f1 .ak-fluegel { background: #1e5a47 radial-gradient(rgba(255,255,255,.09) 1.5px, transparent 1.6px) 0 0/14px 14px; }
.f2 .ak-fluegel { background: #0f6b65 linear-gradient(135deg, rgba(255,255,255,.08), transparent 60%); }
.f3 .ak-fluegel { background: #7a1f2a radial-gradient(rgba(241,212,139,.16) 1.2px, transparent 1.3px) 0 0/11px 11px; }
.f4 .ak-fluegel { background: #1f3a5f repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
/* frueher beige, darauf war das Logo kaum zu sehen; jetzt Tannengruen dunkel mit Goldpunkten */
.f5 .ak-fluegel { background: #14403a radial-gradient(rgba(241,212,139,.14) 1.4px, transparent 1.5px) 0 0/13px 13px; }

.ak-tuer.is-gross .ak-fluegel {
    background: #8e2b33 radial-gradient(circle at 50% 40%, rgba(241,212,139,.22), transparent 65%);
}
.ak-stern {
    position: absolute; top: 14%; left: 50%; width: 30px; height: 30px; transform: translateX(-50%);
    background: var(--ak-gold);
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 8px rgba(241,212,139,.8));
    animation: akSternGlanz 2.6s ease-in-out infinite;
}
@keyframes akSternGlanz { 50% { transform: translateX(-50%) scale(1.15); opacity: .8; } }

/* Zustände */
@media (hover: hover) {
    .ak-tuer:hover .ak-fluegel { transform: rotateY(-14deg); box-shadow: inset 0 0 0 1px rgba(241,212,139,.6), 0 14px 30px rgba(0,0,0,.35); }
}
.ak-tuer.is-zu .ak-fluegel { filter: saturate(.75) brightness(.92); }
.ak-tuer.is-heute .ak-fluegel {
    animation: akHeute 2.2s ease-in-out infinite;
}
@keyframes akHeute {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(241,212,139,.6), 0 0 0 0 rgba(241,212,139,.55), 0 8px 22px rgba(0,0,0,.28); }
    50%      { box-shadow: inset 0 0 0 1px rgba(241,212,139,.9), 0 0 0 10px rgba(241,212,139,0), 0 8px 22px rgba(0,0,0,.28); }
}
.ak-tuer.is-geoeffnet .ak-fluegel,
.ak-tuer.is-geoeffnet:hover .ak-fluegel { transform: rotateY(-104deg); animation: none; filter: brightness(.8); }
.ak-tuer.is-wackeln .ak-fluegel { animation: akWackeln .5s ease; }
@keyframes akWackeln {
    20% { transform: rotateZ(-2.5deg); } 40% { transform: rotateZ(2.5deg); }
    60% { transform: rotateZ(-1.5deg); } 80% { transform: rotateZ(1deg); }
}

/* Funken beim Öffnen */
.ak-funke {
    position: fixed; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; z-index: 9998;
    background: var(--ak-gold, #f1d48b); box-shadow: 0 0 8px 2px rgba(241,212,139,.8);
    animation: akFunkeFlug .9s cubic-bezier(.15,.7,.3,1) forwards;
}
@keyframes akFunkeFlug {
    to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; }
}

/* Dächer und Schnee unten */
.ak-dorf { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; color: #04161c; line-height: 0; pointer-events: none; }
/* Höhe wächst mit der Breite (Grafik 6:1), sonst schneidet slice auf breiten Schirmen Dächer und Turm ab */
.ak-dorf svg { width: 100%; height: max(200px, 16.67vw); display: block; }
/* Die Szene baut sich Stück für Stück auf, wie ein Dorf, das aus dem Schnee wächst */
.akd { transform-box: fill-box; transform-origin: 50% 100%; animation: akdRein .8s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--i) * .16s); }
.akd-licht { fill: #f1d48b; filter: drop-shadow(0 0 3px rgba(241,212,139,.8)); animation: akdLicht .9s ease-out both; animation-delay: calc(var(--i) * .16s + .3s); }
@keyframes akdRein { from { opacity: 0; transform: translateY(40px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes akdLicht { from { opacity: 0; } 40% { opacity: .4; } 55% { opacity: .1; } to { opacity: 1; } }

/* ── Inhalt eines Türchens ───────────────────────────────────── */
.ak-modal {
    position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
    padding: 1rem; background: rgba(4,20,24,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: akEin .25s ease;
}
.ak-modal[hidden] { display: none; }
@keyframes akEin { from { opacity: 0; } }
.ak-modal-karte {
    position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 2rem); overflow: auto;
    background: #fffdf8; color: #1d1d1f; border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    animation: akKarte .45s cubic-bezier(.2,.8,.25,1.15);
}
[data-theme="dark"] .ak-modal-karte { background: #1c1c1e; color: #f5f5f7; }
@keyframes akKarte { from { transform: translateY(18px) scale(.94); opacity: 0; } }
.ak-modal-band {
    padding: 1.05rem 3rem 1rem 1.4rem; color: #fffaf0;
    font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; letter-spacing: .01em;
    background: linear-gradient(120deg, #7a1f2a, #8e2b33 45%, #b8892f);
    position: relative;
}
.ak-modal-band::after { /* Goldkante */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--ak-gold, #f1d48b), transparent);
}
.ak-modal-zu {
    position: absolute; top: .7rem; right: .7rem; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    border: 0;
}
/* Der Mitgliederbereich färbt Knöpfe grün, deshalb hier ausdrücklich */
.ak-modal button.ak-modal-zu { background: rgba(255,255,255,.18) !important; color: #fff !important; }
.ak-modal button.ak-modal-zu:hover { background: rgba(255,255,255,.3) !important; }
.ak-modal-inhalt { padding: 1.3rem 1.4rem 1.5rem; }
.ak-modal-bild { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 1rem; display: block; }
.ak-modal-inhalt h2 { font-size: 1.2rem; font-weight: 500; margin: 0 0 .55rem; line-height: 1.3; }
.ak-modal-text { font-size: .95rem; line-height: 1.65; color: inherit; opacity: .88; }
.ak-modal-text.ak-leer { font-style: italic; opacity: .6; }
.ak-modal-link {
    display: inline-flex; align-items: center; margin-top: 1.1rem; min-height: 34px; padding: .45rem 1.05rem;
    border-radius: 999px; font-size: .86rem; font-weight: 500; text-decoration: none;
    background: var(--color-primary, #0F766E); color: #fff !important;
}
.ak-modal-link:hover { filter: brightness(1.08); }

.ak-hinweis {
    position: fixed; left: 50%; bottom: 1.5rem; z-index: 100001; transform: translate(-50%, 20px);
    padding: .6rem 1.1rem; border-radius: 999px; font-size: .86rem; pointer-events: none;
    background: rgba(6,28,36,.92); color: #fffaf0; border: 1px solid rgba(241,212,139,.4);
    opacity: 0; transition: opacity .25s, transform .25s;
}
.ak-hinweis.is-sichtbar { opacity: 1; transform: translate(-50%, 0); }

/* ── Kleine Bildschirme ──────────────────────────────────────── */
@media (max-width: 860px) {
    .ak-raster { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(72px, 16vw, 100px); }
}
@media (max-width: 520px) {
    .ak-himmel { padding: 1.8rem .9rem 0; }
    .ak-mond { width: 48px; height: 48px; top: 20px; right: 6%; }
    .ak-raster { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 80px; gap: .5rem; padding-bottom: 7.5rem; }
    .ak-tuer.is-breit { grid-column: span 2; }
    .ak-dorf svg { height: 130px; }
}

@media (prefers-reduced-motion: reduce) {
    .ak-himmel::after, .ak-sterne::after, .ak-stern, .ak-tuer.is-heute .ak-fluegel, .akd, .akd-licht { animation: none; }
    .ak-fluegel { transition: none; }
}

/* Hansetaler im Türchen */
.ak-ht { display: flex; align-items: center; gap: .55rem; margin: 1rem 0 .25rem; padding: .6rem .8rem; border-radius: 12px;
    background: rgba(200,155,60,.1); border: 1px solid rgba(200,155,60,.35); color: #8a6420; font-size: .9rem; }
.ak-ht img { flex-shrink: 0; }
.ak-ht.is-gebucht { background: rgba(13,148,136,.08); border-color: rgba(13,148,136,.3); color: var(--color-primary, #0f766e); }

/* Rätsel (Hubertus Luhmann 15.11.2026): Aufgabe je Türchen, Lösungssatz in Türchen 24 */
.ak-quiz, .ak-loesung { margin: 1rem 0 .25rem; padding: .7rem .85rem; border-radius: 12px;
    background: rgba(142,43,51,.05); border: 1px solid rgba(142,43,51,.18); }
.ak-quiz p, .ak-loesung p { margin: .25rem 0 .35rem; font-size: .93rem; line-height: 1.55; }
.ak-quiz-titel { font-family: Georgia, "Times New Roman", serif; font-size: .95rem; color: #8e2b33; }
.ak-quiz-hinweis { display: block; font-size: .78rem; line-height: 1.45; opacity: .7; margin-top: .3rem; }
/* Alle Kästchen gleich gross: Breite so, dass 12 Buchstaben (längstes Wort) in eine Zeile passen.
   Lange Selektoren, weil die allgemeine Eingabefeld-Regel in style.css sonst Ecken und Rahmen überschreibt. */
.ak-kaestchen { --ak-luecke: 4px; --ak-wl: 14px; container-type: inline-size;
    display: flex; flex-direction: column; gap: 8px; margin: .6rem 0 .4rem; }
.ak-zeile { display: flex; flex-wrap: nowrap; gap: var(--ak-wl); }
/* Kästchen so breit, dass die breiteste Zeile (--ak-n Buchstaben, --ak-w Wörter) genau passt */
.ak-wort { --ak-k: 22px;
    --ak-k: clamp(14px, calc((100cqi - (var(--ak-n, 12) - var(--ak-w, 1)) * var(--ak-luecke) - (var(--ak-w, 1) - 1) * var(--ak-wl)) / var(--ak-n, 12) - .5px), 34px);
    display: flex; flex-wrap: nowrap; gap: var(--ak-luecke); }
@container (max-width: 340px) { .ak-zeile { --ak-wl: 8px; } .ak-wort { --ak-luecke: 3px; } }
.ak-loesung .ak-kaestchen .ak-wort input[type="text"] { flex: 0 0 auto; width: var(--ak-k); height: calc(var(--ak-k) * 1.3); min-width: 0; min-height: 0;
    margin: 0; padding: 0; text-align: center; line-height: 1; box-sizing: border-box;
    font-family: Georgia, serif; font-weight: 400; font-size: calc(var(--ak-k) * .58); text-transform: uppercase; color: #5a3a08;
    border: 1px solid rgba(176,132,42,.55); border-radius: calc(var(--ak-k) * .2); background: rgba(255,250,235,.9); }
.ak-loesung .ak-kaestchen .ak-wort input[type="text"]:focus { outline: none; border-color: #8e2b33; box-shadow: 0 0 0 3px rgba(142,43,51,.22); }
.ak-feld { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; cursor: text; }
.ak-nr { font-size: 10px; line-height: 1; color: #8a6420; opacity: .8; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .ak-nr { color: #f1d48b; }
@media (max-width: 420px) { .ak-loesung { padding: .7rem .6rem; margin-left: -.4rem; margin-right: -.4rem; } }
.ak-loesung-form button.ak-modal-link { border: 0; cursor: pointer; font-family: inherit; font-weight: 500 !important;
    background: var(--color-primary, #0F766E) !important; color: #fff !important; min-height: 34px !important; padding: .45rem 1.05rem !important; }
.ak-loesung-form button[disabled] { opacity: .6; cursor: default; }
.ak-ziel { margin: 1rem 0 .25rem; padding: .7rem .85rem; border-radius: 12px; background: rgba(159,220,240,.14); border: 1px solid rgba(95,156,171,.32); }
.ak-ziel p { margin: .25rem 0 .5rem; font-size: .93rem; line-height: 1.55; }
.ak-ziel-balken { height: 8px; border-radius: 999px; background: rgba(95,156,171,.2); overflow: hidden; }
.ak-ziel-balken span { display: block; height: 100%; border-radius: inherit; background: var(--color-primary, #0f766e); }
.ak-loesung-meldung { display: block; font-size: .86rem; margin-top: .5rem; }
.ak-loesung-meldung.is-ok { color: var(--color-primary, #0f766e); }
.ak-loesung-meldung.is-fehler { color: #b91c1c; }
[data-theme="dark"] .ak-loesung .ak-kaestchen .ak-wort input[type="text"] { background: rgba(255,255,255,.08); color: #f1d48b; }
.ak-quiz-link { display: inline-flex; align-items: center; margin-top: .55rem; min-height: 32px; padding: .35rem .95rem; border-radius: 999px;
    font-size: .84rem; font-weight: 500; text-decoration: none; color: #8e2b33 !important; background: #fffdf8; border: 1px solid rgba(142,43,51,.3); }
.ak-quiz-link:hover { background: rgba(142,43,51,.06); }
[data-theme="dark"] .ak-quiz-link { background: transparent; color: #eaa0a6 !important; border-color: rgba(234,160,166,.35); }


/* ── Frostiges Türchen-Fenster (Maximilian 15.11.2026: frostig, elegant, weihnachtlich) ── */
.ak-modal-karte {
    background:
        radial-gradient(circle at 12% 30%, rgba(159,220,240,.16) 0 2px, transparent 2.5px) 0 0/46px 46px,
        radial-gradient(circle at 70% 70%, rgba(159,220,240,.12) 0 1.5px, transparent 2px) 0 0/34px 34px,
        linear-gradient(180deg, rgba(238,247,250,.88) 0%, rgba(251,253,254,.9) 38%, rgba(246,250,252,.9) 100%);
    /* leicht durchscheinend wie Milchglas; der Grund dahinter ist abgedunkelt und
       stark weichgezeichnet, damit der Text voll lesbar bleibt */
    -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
    color: #1d2b30;
    box-shadow: 0 0 0 1px rgba(205,234,243,.9), 0 0 40px rgba(159,220,240,.25), 0 30px 80px rgba(0,0,0,.45);
}
[data-theme="dark"] .ak-modal-karte { background: linear-gradient(180deg, rgba(19,48,58,.9), rgba(15,35,41,.92)); color: #eef6f8; }
/* iPad und Handy: Höhe nach dem wirklich sichtbaren Bereich, nicht nach 100vh */
.ak-modal-karte { max-height: calc(100dvh - 2rem); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
/* Ab Tablet etwas breiter: mehr Platz zum Lesen und größere Buchstabenkästchen zum Antippen */
@media (min-width: 700px) { .ak-modal-karte { max-width: 520px; } }
.akm-kopf { position: relative; line-height: 0; }
.akm-szene { width: 100%; height: 150px; display: block; }
.akm-zapfen { position: absolute; left: 0; bottom: -20px; z-index: 1; width: 100%; height: 22px; filter: drop-shadow(0 2px 2px rgba(27,84,102,.25)); }
.ak-modal-band {
    position: absolute; top: 0; left: 0; right: 0; z-index: 1; background: none;
    padding: .9rem 3rem .9rem 1.2rem; text-shadow: 0 1px 6px rgba(4,30,40,.7);
}
.ak-modal-band::after { display: none; }
.ak-modal-inhalt { padding-top: 1.7rem; }
.ak-modal-inhalt h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400 !important; font-size: 1.35rem; color: #12404a; }
[data-theme="dark"] .ak-modal-inhalt h2 { color: #cfeaf2; }
.ak-quiz, .ak-loesung { background: rgba(159,220,240,.14); border-color: rgba(95,156,171,.32); }
.ak-quiz-titel { color: #1b5466; }
.ak-quiz-link { color: #1b5466 !important; border-color: rgba(95,156,171,.45); background: #fbfdfe; }
.ak-quiz-link:hover { background: rgba(159,220,240,.18); }
.ak-loesung .ak-kaestchen .ak-wort input[type="text"] { border-color: rgba(95,156,171,.55); background: #fbfdfe; color: #12404a; }
.ak-loesung .ak-kaestchen .ak-wort input[type="text"]:focus { border-color: #1b5466; box-shadow: 0 0 0 3px rgba(27,84,102,.25); }
[data-theme="dark"] .ak-quiz-titel, [data-theme="dark"] .ak-quiz-link { color: #9fdcf0 !important; }

/* Kleine Bewegungen in der Szene */
.akm-flocken circle { animation: akmFall linear infinite; }
@keyframes akmFall { to { transform: translate(8px, 160px); } }
.akm-licht { animation: akmFunkeln 2.4s ease-in-out infinite; animation-delay: calc(var(--n) * -.35s); }
@keyframes akmFunkeln { 50% { opacity: .35; } }
.akm-stern { transform-box: fill-box; transform-origin: center; animation: akmStern 3s ease-in-out infinite; filter: drop-shadow(0 0 4px rgba(241,212,139,.9)); }
@keyframes akmStern { 50% { transform: scale(1.18); } }
.akm-winken { animation: akmWinken 1.8s ease-in-out infinite; }
@keyframes akmWinken { 0%, 60%, 100% { transform: rotate(0); } 15%, 45% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } }

/* Frost auf den Türchen: Reif in den unteren Ecken (Schneekappe oben auf Wunsch entfernt, 15.11.2026) */
.ak-fluegel::after {
    content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
    background:
        radial-gradient(circle at 0 100%, rgba(225,243,249,.32), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(225,243,249,.26), transparent 30%);
}

@media (prefers-reduced-motion: reduce) {
    .akm-flocken circle, .akm-licht, .akm-stern, .akm-winken { animation: none; }
    .akm-flocken { display: none; }
}

/* Buchstabe unten im Türchen (Hubertus 24.11.2026). Lange Selektoren wegen der allgemeinen Eingabefeld-Regel in style.css. */
.ak-buchstabe { display: flex; align-items: center; gap: .65rem; margin: .8rem 0 0; cursor: text; font-size: .86rem; color: #12404a; }
.ak-quiz .ak-buchstabe input[type="text"] { flex: 0 0 auto; width: 44px; height: 52px; min-width: 0; min-height: 0; margin: 0; padding: 0; box-sizing: border-box;
    text-align: center; line-height: 1; font-family: Georgia, serif; font-weight: 400; font-size: 1.5rem; text-transform: uppercase;
    color: #12404a; background: #fbfdfe; border: 1px solid rgba(95,156,171,.55); border-radius: 10px; }
.ak-quiz .ak-buchstabe input[type="text"]:focus { outline: none; border-color: #1b5466; box-shadow: 0 0 0 3px rgba(27,84,102,.25); }
.ak-quiz .ak-buchstabe.is-richtig input[type="text"] { border-color: #0d9488; background: rgba(13,148,136,.16); color: #0f766e; }
.ak-buchstabe-meldung { display: block; min-height: 1.1em; margin-top: .3rem; font-size: .8rem; color: #0f766e; }
.ak-buchstabe-meldung.is-fehler { color: #b91c1c; }
[data-theme="dark"] .ak-buchstabe { color: #cfeaf2; }
[data-theme="dark"] .ak-quiz .ak-buchstabe input[type="text"] { background: rgba(255,255,255,.08); color: #f1d48b; border-color: rgba(159,220,240,.4); }
[data-theme="dark"] .ak-quiz .ak-buchstabe.is-richtig input[type="text"] { border-color: #5fc9b8; background: rgba(13,148,136,.38); color: #fff; }
[data-theme="dark"] .ak-buchstabe-meldung { color: #9fe3d6; }

/* Stadt oben ohne Schneeband, unten eigene Szene als Fortsetzung (Maximilian 23.11.2026) */
.ak-dorf-oben { position: relative; z-index: 1; line-height: 0; margin: -.4rem -1.25rem .4rem; pointer-events: none; }
.ak-dorf-oben svg:not(.ak-schneemann) { width: 100%; height: auto; aspect-ratio: 6 / 1; display: block; 
    /* Hügel laufen nach unten weich in den Nachthimmel aus, keine Kante */
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%); mask-image: linear-gradient(to bottom, #000 62%, transparent 96%); }
.ak-dorf-oben .akd[style="--i:2"] { display: none; }
/* Schneemänner links und rechts neben der Stadt oben */
.ak-schneemann { position: absolute; bottom: 14%; width: clamp(26px, 3.4%, 44px); height: auto; z-index: 1; }
.ak-sm-links { left: 9.5%; }
.ak-sm-rechts { right: 11%; transform: scaleX(-1); }

/* Schmale Handys: weniger Rand um Türchen 24, damit die zwei Zeilen Kästchen gut tippbar bleiben */
@media (max-width: 420px) {
    .ak-modal { padding-left: 8px; padding-right: 8px; }
    .ak-modal-inhalt { padding-left: 14px; padding-right: 14px; }
    .ak-loesung { padding-left: .45rem; padding-right: .45rem; }
}
