/* Adventskalender: dunkle Bühne, Türchen aus „Pappe“, Kerzenlicht beim Öffnen. Wird nur auf /adventskalender geladen. */
.akal { --paper: #141110; --paper-2: #1E1916; --card: #221C19; --ink: #F1E9DE; --ink-soft: #B9AC9F; --line: #3A302B; --rust-text: #E07A4F; --rust-soft: #3E2316;
  position: relative; overflow: hidden; background: radial-gradient(120% 70% at 50% 0%, #2A1D17 0%, #141110 60%); color: var(--ink); padding-block: 8px 88px; min-height: 80vh; }
.akal-wrap { position: relative; z-index: 1; display: grid; gap: 28px; container-type: inline-size; }
.akal-note { margin-top: 16px; color: #1D1918; background: #EAD0C3; }
.akal-snow { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.akal-snow i { position: absolute; top: -12px; border-radius: 50%; background: #F1E9DE; animation: akal-fall linear infinite; }
@keyframes akal-fall { to { transform: translate3d(var(--drift, 0), 115vh, 0); } }
.akal-head { display: grid; gap: 12px; padding-top: 40px; justify-items: center; text-align: center; }
.akal-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 6.5vw, 76px); line-height: 1; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
.akal-kicker { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--rust-text); margin: 0; }
.akal-intro { color: var(--ink-soft); font-size: 18px; max-width: 52ch; margin: 0; }
.akal-soon { display: inline-block; margin: 4px 0 0; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: #f3d9b0; background: rgba(224,122,79,.14); border: 1px solid rgba(224,122,79,.35); }
.akal-tools { display: grid; gap: 8px; justify-items: center; min-height: 52px; }
.akal-sound { display: inline-flex; align-items: center; gap: 8px; appearance: none; cursor: pointer; font: 500 14px var(--f-body); color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 30px; padding: 7px 14px; }
.akal-sound svg { width: 18px; height: 18px; }
.akal-sound[aria-pressed="true"] .akal-sound-off { display: none; }
.akal-sound:hover { color: var(--ink); border-color: var(--rust-text); }
.akal-status { margin: 0; min-height: 1.4em; font-family: var(--f-mono); font-size: 13px; color: var(--rust-text); }

/* Reihen exakt so hoch wie eine Spalte breit ist: alle Felder quadratisch, breite und große Türchen passen genau ins Raster. */
.akal-grid { --cols: 3; --gap: 10px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols)); grid-auto-flow: dense; gap: var(--gap); }
@media (min-width: 600px) { .akal-grid { --cols: 4; --gap: 12px; } }
@media (min-width: 960px) { .akal-grid { --cols: 6; --gap: 14px; } }
.akal-cell { min-width: 0; }
.akal-cell.is-wide { grid-column: span 2; }
.akal-cell.is-big { grid-column: span 2; grid-row: span 2; }

/* Fester Innenabstand, damit Zahlen und Titel bei normalen, breiten und großen Karten auf einer Linie stehen. */
.akal-door { --card-pad: clamp(10px, 1.3vw, 16px); position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1600px; border-radius: 12px; color: inherit; font: inherit; }
.akal-door:focus-visible { outline: 2px solid var(--rust-text); outline-offset: 4px; }

/* Die Karte dreht sich um ihre Mitte: bleibt immer in ihrem Feld. */
.akal-card { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(.45, .05, .2, 1), filter .3s ease; }
.akal-front, .akal-back { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.akal-front { display: grid; padding: var(--card-pad); background: #F1E9DE; color: #1D1918; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 24px -14px rgba(0, 0, 0, .9); transition: box-shadow .3s ease, transform .3s ease; }
.akal-cell:nth-child(3n + 2) .akal-front { background: #AC4116; color: #FCF4EA; }
.akal-cell:nth-child(5n + 3) .akal-front { background: #2A211D; color: #F1E9DE; box-shadow: inset 0 0 0 1px #4A3B33, 0 10px 24px -14px rgba(0, 0, 0, .9); }
.akal-cell:nth-child(7n + 1) .akal-front { background: #E2D3BE; color: #1D1918; }
.akal-num { font-family: var(--f-display); font-size: clamp(26px, 5vw, 46px); line-height: 1; align-self: start; justify-self: start; }
.akal-cell:nth-child(even) .akal-num { align-self: end; justify-self: end; }
.akal-cell.is-big .akal-num { font-size: clamp(64px, 12vw, 128px); align-self: center; justify-self: center; }
.akal-cell.is-wide .akal-num { align-self: center; justify-self: center; }

/* Rückseite: dunkel, warmes Licht, goldenes Symbol, Titel. */
.akal-back { transform: rotateY(180deg); display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; gap: 6px; padding: var(--card-pad); text-align: center; color: #F1E9DE;
  background: radial-gradient(circle at 50% 46%, rgba(255, 196, 120, .30), rgba(224, 122, 79, .10) 45%, transparent 72%), #1C1613; box-shadow: inset 0 0 0 1px #3A2E28, 0 10px 24px -14px rgba(0, 0, 0, .9); }
/* Sanftes, unsynchrones Leuchten: jede Karte mit eigenem Takt und versetztem Start (--i = Position im Raster). */
.akal-back::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, rgba(255, 210, 145, .55), rgba(224, 122, 79, .16) 45%, transparent 72%);
  animation: akal-twinkle var(--tw-dur, 5.2s) ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.83s); }
.akal-back .akal-icon { animation: akal-star var(--tw-dur, 5.2s) ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.83s); }
.akal-cell:nth-child(3n) { --tw-dur: 4.1s; }
.akal-cell:nth-child(3n + 1) { --tw-dur: 6.3s; }
.akal-cell:nth-child(4n + 2) { --tw-dur: 7.4s; }
@keyframes akal-twinkle { 0%, 100% { opacity: .15; } 45% { opacity: 1; } 70% { opacity: .45; } }
@keyframes akal-star { 0%, 100% { transform: scale(.96); opacity: .7; } 45% { transform: scale(1.12); opacity: 1; } 70% { transform: scale(1.02); opacity: .85; } }
.akal-back > * { position: relative; }
.akal-back-num { justify-self: start; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: #E07A4F; }
.akal-icon { width: 30%; max-width: 46px; aspect-ratio: 1; background: #F3C98B; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; filter: drop-shadow(0 0 10px rgba(243, 201, 139, .5)); }
.akal-cell.is-big .akal-icon { max-width: 72px; }
.akal-icon-star { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 21l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E"); }
.akal-icon-note { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18.5a3 3 0 1 1-2-2.83V5l12-2v12.5a3 3 0 1 1-2-2.83V7.2l-8 1.4z'/%3E%3C/svg%3E"); }
.akal-icon-film { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm6 4v6l5-3z'/%3E%3C/svg%3E"); }
.akal-back-title { font-size: clamp(11px, 1.2vw, 14px); line-height: 1.3; color: #DCCFC2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.akal-cell.is-big .akal-back-title { font-family: var(--f-display); font-size: clamp(18px, 2.2vw, 26px); color: #F1E9DE; -webkit-line-clamp: 3; }

/* Zustände */
.akal-door.is-available:not(.is-open):hover .akal-card { transform: translateY(-4px); }
.akal-door.is-available:not(.is-open):hover .akal-front { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 30px -16px rgba(0, 0, 0, .95); }
.akal-door.is-open .akal-card { transform: rotateY(180deg); }
.akal-door.is-opening .akal-card { animation: akal-flip 1.3s cubic-bezier(.45, .05, .2, 1) forwards; }
/* Karte hebt sich kurz an und dreht sich dann ruhig um. */
@keyframes akal-flip { 0% { transform: none; } 18% { transform: translateY(-8px) scale(1.04); } 100% { transform: rotateY(180deg); } }
.akal-door.is-today:not(.is-open) .akal-front { animation: akal-today 2.8s ease-in-out infinite; }
@keyframes akal-today { 0%, 100% { box-shadow: inset 0 0 0 3px #E07A4F, 0 0 0 0 rgba(224, 122, 79, 0), 0 10px 24px -14px rgba(0, 0, 0, .9); } 50% { box-shadow: inset 0 0 0 3px #F3C98B, 0 0 26px 2px rgba(243, 201, 139, .35), 0 10px 24px -14px rgba(0, 0, 0, .9); } }
.akal-door.is-locked { cursor: default; }
.akal-door.is-locked .akal-front { filter: saturate(.85) brightness(.9); }
.akal-door.is-stuck .akal-card { animation: akal-stuck .55s cubic-bezier(.3, .2, .2, 1); }
/* Noch nicht dran: die Karte hebt kurz an und sinkt zurück. */
@keyframes akal-stuck { 35% { transform: translateY(-3px) rotateZ(-1.2deg); } 70% { transform: translateY(0) rotateZ(.6deg); } 100% { transform: none; } }
.akal-sparks { position: absolute; left: 50%; bottom: 30%; pointer-events: none; }
.akal-sparks i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #F3C98B; box-shadow: 0 0 8px #F3C98B; opacity: 0; }
.akal-door.is-fresh .akal-sparks i { animation: akal-spark 1.4s ease-out forwards; }
.akal-sparks i:nth-child(1) { --x: -38px; --y: -70px; animation-delay: .05s; }
.akal-sparks i:nth-child(2) { --x: 30px; --y: -90px; animation-delay: .15s; }
.akal-sparks i:nth-child(3) { --x: -12px; --y: -110px; animation-delay: .25s; }
.akal-sparks i:nth-child(4) { --x: 46px; --y: -55px; animation-delay: .1s; }
.akal-sparks i:nth-child(5) { --x: -50px; --y: -40px; animation-delay: .3s; }
.akal-sparks i:nth-child(6) { --x: 12px; --y: -130px; animation-delay: .2s; }
@keyframes akal-spark { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.1); } }

.akal-dialog { border: 0; padding: 0; background: transparent; color: #F1E9DE; width: min(660px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); overflow: visible; }
.akal-dialog::backdrop { background: rgba(10, 8, 7, .78); animation: akal-fade .6s ease; }
.akal-dialog[open] .akal-modal { animation: akal-pop .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes akal-pop { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes akal-fade { from { opacity: 0; } }
.akal-modal { --ink: #F1E9DE; --ink-soft: #B9AC9F; --line: #3A302B; --card: #2A221E; --paper: #1B1614; --rust-text: #E07A4F; position: relative; display: grid; gap: 18px; background: #1B1614; border: 1px solid #3A302B; border-radius: 18px; padding: clamp(22px, 4vw, 34px); max-height: calc(100dvh - 48px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 60px -10px rgba(224, 122, 79, .25); }
.akal-modal h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.08; margin: -6px 0 0; padding-right: 40px; text-wrap: balance; }
.akal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #3A302B; background: transparent; color: #F1E9DE; cursor: pointer; }
.akal-close svg { width: 18px; height: 18px; }
.akal-close:hover { border-color: #E07A4F; color: #E07A4F; }
.akal-block { margin: 0; }
.akal-text { font-size: 18px; line-height: 1.6; color: #F1E9DE; }
.akal-text blockquote { margin: 1.1em 0; border-left: 3px solid #E07A4F; padding: 2px 0 2px 20px; color: #F1E9DE; font-family: var(--f-display); font-size: clamp(21px, 3vw, 25px); line-height: 1.32; }
.akal-text blockquote p { margin: 0; }
.akal-text > :first-child { margin-top: 0; }
.akal-text > :last-child { margin-bottom: 0; }
.akal-button { text-align: center; margin-top: 14px; }
.akal-label { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #E07A4F; margin-bottom: 8px; }
.akal-inspiration { background: #241D1A; border: 1px solid #3A302B; border-radius: 12px; padding: 18px 20px; display: grid; gap: 8px; }
.akal-inspiration h3 { margin: 0; font-size: 20px; }
.akal-inspiration p { margin: 0; color: #DCCFC2; }
.akal-entry { display: grid; gap: 4px; background: #1B1614; border-radius: 8px; padding: 12px 14px; font-size: 15px; }
.akal-entry b { font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: #E07A4F; }
.akal-episode .player { max-width: none; }
.akal-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0C0A09; border: 1px solid #3A302B; }
.akal-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.akal-video-start { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; border: 0; background: none; color: #F1E9DE; font: 600 16px var(--f-body); cursor: pointer; text-align: center; }
.akal-video-start small { font-weight: 400; font-size: 13px; color: #B9AC9F; max-width: 42ch; }
.akal-play { width: 64px; height: 64px; border-radius: 50%; background: #AC4116; position: relative; }
.akal-play::after { content: ""; position: absolute; left: 26px; top: 20px; border-left: 18px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.akal-video-start:hover .akal-play { background: #C4522A; }
.akal-video figcaption { font-size: 14px; color: #B9AC9F; margin-top: 8px; }
.akal-image { width: 100%; border-radius: 12px; }
.akal-empty { color: #B9AC9F; font-style: italic; }
/* Solange ein Türchen-Fenster offen ist, steht der Hintergrund still: das Fenster blendet flüssig ein. */
.akal.is-dialog-open .akal-snow i, .akal.is-dialog-open .akal-front, .akal.is-dialog-open .akal-back::before, .akal.is-dialog-open .akal-back .akal-icon { animation-play-state: paused; }
.akal-modal { will-change: opacity, transform; }
@media (prefers-reduced-motion: reduce) {
  .akal-card, .akal-front { transition: none; }
  .akal-back::before, .akal-back .akal-icon, .akal-door.is-opening .akal-card, .akal-door.is-today:not(.is-open) .akal-front, .akal-door.is-stuck .akal-card, .akal-dialog[open] .akal-modal, .akal-dialog::backdrop, .akal-door.is-fresh .akal-sparks i { animation: none; }
}
.akal-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: 13px; color: var(--ink-soft); }
