/* Adventkalender – Farben über --ak-haupt und --ak-akzent (im Admin einstellbar) */
.ak {
	--ak-haupt: #1f3a2e;
	--ak-akzent: #c8a45d;
	--ak-hell: #f7f2e8;
	--ak-text: #26302b;
	position: relative;
	box-sizing: border-box;
	max-width: 960px;
	margin: 0 auto;
	padding: clamp(20px, 4vw, 44px);
	border-radius: 20px;
	color: var(--ak-hell);
	background:
		radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .08) 0 1.5px, transparent 2px) 0 0 / 46px 46px,
		radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .06) 0 1px, transparent 1.5px) 0 0 / 31px 31px,
		var(--ak-haupt);
	font-size: 16px;
	line-height: 1.5;
}
.ak *, .ak *::before, .ak *::after { box-sizing: border-box; }

.ak-kopf { text-align: center; max-width: 620px; margin: 0 auto 8px; }
.ak .ak-titel {
	margin: 0 0 10px;
	color: var(--ak-hell);
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 400;
	font-size: clamp(28px, 4.5vw, 42px);
	line-height: 1.15;
	letter-spacing: .01em;
}
.ak-titel::after {
	content: "";
	display: block;
	width: 48px;
	height: 2px;
	margin: 14px auto 0;
	background: var(--ak-akzent);
}
.ak .ak-intro { margin: 0; opacity: .85; }
.ak .ak-hinweis { min-height: 1.5em; margin: 18px 0 22px; text-align: center; color: var(--ak-akzent); font-weight: 600; }

.ak-vorschau-hinweis {
	margin: 0 0 16px;
	padding: 8px 12px;
	border-radius: 8px;
	background: #fff4d6;
	color: #6b4e00;
	font-size: 14px;
	text-align: center;
}

/* Raster */
.ak-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: clamp(8px, 1.6vw, 16px);
}
@media (max-width: 720px) { .ak-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .ak-grid { grid-template-columns: repeat(3, 1fr); } }

/* Türchen */
.ak .ak-tuer {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
	perspective: 900px;
	-webkit-tap-highlight-color: transparent;
}
.ak-tuer:focus-visible { outline: 2px solid var(--ak-akzent); outline-offset: 3px; }

.ak-innen {
	position: absolute;
	inset: 0;
	border-radius: 12px;
	background: var(--ak-akzent);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 6px 16px rgba(0, 0, 0, .18);
}
.ak-innen::after {
	content: "";
	position: absolute;
	inset: 30%;
	background: var(--ak-haupt);
	opacity: .55;
	clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ak-front {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .18);
	background:
		linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03)),
		var(--ak-haupt);
	transform-origin: left center;
	transition: transform .7s cubic-bezier(.3, .7, .2, 1), border-color .2s, box-shadow .2s;
	backface-visibility: hidden;
}
.ak-nr {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(22px, 3.6vw, 34px);
	line-height: 1;
	color: var(--ak-hell);
}

/* Zustände */
.ak-tuer.ak-zu .ak-front {
	border-color: rgba(255, 255, 255, .08);
	background: linear-gradient(145deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .22)), var(--ak-haupt);
}
.ak-tuer.ak-zu .ak-nr { opacity: .4; }
.ak-tuer.ak-zu .ak-innen { visibility: hidden; }
.ak-tuer.ak-zu { cursor: default; }

.ak-tuer.ak-frei:hover .ak-front { transform: rotateY(-14deg); border-color: var(--ak-akzent); }

.ak-tuer.ak-heute .ak-front {
	border: 1.5px solid var(--ak-akzent);
	box-shadow: 0 0 0 4px rgba(200, 164, 93, .18), 0 0 26px rgba(200, 164, 93, .45);
	animation: ak-puls 2.4s ease-in-out infinite;
}
.ak-tuer.ak-heute .ak-front::after {
	content: "Heute";
	position: absolute;
	bottom: 8%;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ak-akzent);
}
@keyframes ak-puls {
	50% { box-shadow: 0 0 0 7px rgba(200, 164, 93, .1), 0 0 34px rgba(200, 164, 93, .6); }
}

.ak-tuer.ak-besucht .ak-front { transform: rotateY(-38deg); }
.ak-tuer.ak-besucht .ak-nr { color: var(--ak-akzent); }
.ak-tuer.ak-oeffnet .ak-front { transform: rotateY(-105deg); }

.ak-tuer-24 .ak-nr { color: var(--ak-akzent); }

.ak-tuer.ak-wackeln { animation: ak-wackeln .4s; }
@keyframes ak-wackeln {
	20%, 60% { transform: translateX(-4px); }
	40%, 80% { transform: translateX(4px); }
}

.ak .ak-fortschritt { margin: 22px 0 0; text-align: center; font-size: 14px; opacity: .75; }

/* Dialog */
.ak-dialog {
	width: min(520px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 0;
	border-radius: 18px;
	background: #fff;
	color: var(--ak-text);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	overflow: auto;
}
.ak-dialog::backdrop { background: rgba(15, 25, 20, .6); backdrop-filter: blur(3px); }
.ak-dialog[open] { animation: ak-auf .35s ease-out; }
@keyframes ak-auf { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.ak-dialog-inhalt { padding: 34px clamp(22px, 5vw, 38px) 30px; border-top: 6px solid var(--ak-akzent); }
.ak .ak-schliessen {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f0eb;
	color: var(--ak-text);
	font-size: 22px;
	line-height: 36px;
	cursor: pointer;
}
.ak-schliessen:hover { background: #e7e3da; }

.ak-d-datum { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ak-akzent); }
.ak .ak-d-titel { margin: 0 0 14px; padding-right: 30px; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--ak-haupt); }
.ak-d-text p { margin: 0 0 12px; }
.ak-d-text a { color: var(--ak-haupt); }
.ak-d-text img { max-width: 100%; height: auto; }
.ak-d-text ul, .ak-d-text ol { margin: 0 0 12px; padding-left: 1.3em; }
.ak-d-text li { margin: 0 0 6px; }
.ak-d-text > p:first-child { margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 1.08em; line-height: 1.45; color: var(--ak-haupt); }

.ak-code {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 18px 0;
	padding: 10px 10px 10px 16px;
	border: 1.5px dashed var(--ak-akzent);
	border-radius: 10px;
	background: #fbf8f1;
}
.ak-code-label { font-size: 12px; opacity: .7; }
.ak-code-wert { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .06em; color: var(--ak-haupt); word-break: break-all; }

.ak .ak-btn {
	display: inline-block;
	padding: 11px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--ak-haupt);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s;
}
.ak .ak-btn:hover { filter: brightness(1.15); color: #fff; }
.ak .ak-btn-klein { padding: 8px 14px; font-size: 14px; }
.ak .ak-btn:disabled { opacity: .6; cursor: default; }

.ak-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid #ece8df; }
.ak-form h4 { margin: 0 0 12px; font-size: 16px; color: var(--ak-haupt); }
.ak-form label { display: block; margin: 0 0 12px; font-size: 14px; }
.ak .ak-form input[type="text"], .ak .ak-form input[type="email"] {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 10px 12px;
	border: 1px solid #d6d1c6;
	border-radius: 8px;
	background: #fff;
	color: var(--ak-text);
	font: inherit;
}
.ak-form input:focus { outline: 2px solid var(--ak-akzent); outline-offset: 1px; }
.ak-form .ak-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.ak-form .ak-check input { margin-top: 2px; flex: none; }
.ak-hp { position: absolute !important; left: -9999px !important; }
.ak-meldung { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.ak-meldung.ak-ok { color: #2e7d4f; }
.ak-meldung.ak-fehler { color: #b3261e; }
.ak-d-info { margin: 18px 0 0; font-size: 14px; opacity: .7; }

/* ------------------------------------------------------------------ *
 * Zusatz-Elemente: [adventkalender_heute], [adventkalender_banner], Pop-up
 * ------------------------------------------------------------------ */
.ak.akw {
	max-width: none;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	color: inherit;
}
.akw[hidden] { display: none !important; }
.ak.akw-heute { margin: 1.5em 0; }

.akw-tuer {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 68px;
	height: 68px;
	border-radius: 12px;
	background: var(--ak-akzent);
	color: var(--ak-haupt);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 6px 14px rgba(0, 0, 0, .18), 0 0 0 4px rgba(255, 255, 255, .1);
}
.akw-nr { font-family: Georgia, "Times New Roman", serif; font-size: 32px; line-height: 1; }
.akw-tuer.akw-zu {
	background: rgba(255, 255, 255, .08);
	color: var(--ak-hell);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.akw-tuer.akw-zu .akw-nr { opacity: .5; }

/* Box mit dem heutigen Türchen */
.akw-karte {
	display: flex;
	align-items: center;
	gap: 18px;
	box-sizing: border-box;
	padding: 18px 22px;
	border-radius: 16px;
	background:
		radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .08) 0 1.5px, transparent 2px) 0 0 / 46px 46px,
		var(--ak-haupt);
	color: var(--ak-hell);
	line-height: 1.35;
}
.akw-text { flex: 1; min-width: 0; }
.akw-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ak-akzent); }
.akw-titel { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(19px, 2.6vw, 24px); line-height: 1.25; color: var(--ak-hell); }
.akw-aktion { flex: none; }
.ak .akw-karte .akw-btn, .ak .akw-leiste .akw-btn { background: var(--ak-akzent); color: var(--ak-haupt); }
.ak .akw-karte .akw-btn:hover, .ak .akw-leiste .akw-btn:hover { color: var(--ak-haupt); }
@media (max-width: 560px) {
	.akw-karte { flex-wrap: wrap; padding: 16px; }
	.akw-text { flex-basis: calc(100% - 90px); }
	.akw-aktion { flex-basis: 100%; }
	.akw-aktion .akw-btn { display: block; width: 100%; text-align: center; }
}

/* Schmale Zeile */
.akw-leiste {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
	box-sizing: border-box;
	padding: 9px 16px;
	background: var(--ak-haupt);
	color: var(--ak-hell);
	font-size: 15px;
	line-height: 1.35;
	text-align: center;
}
.akw-leiste-text strong { color: var(--ak-akzent); }
.akw-stern {
	flex: none;
	width: 16px;
	height: 16px;
	background: var(--ak-akzent);
	clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Pop-up */
.akw-popup { width: min(440px, calc(100vw - 32px)); }
.akw-popup-inhalt { padding: 32px clamp(22px, 5vw, 34px) 28px; border-top: 6px solid var(--ak-akzent); }
.akw-popup-inhalt .akw-tuer { margin: 0 0 16px; background: var(--ak-haupt); color: var(--ak-akzent); box-shadow: none; }
.akw-popup-text { margin: 0 0 18px; }
.akw-popup-aktion { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; }
.ak .akw-sekundaer { color: var(--ak-haupt); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
	.ak-front, .ak-dialog[open], .ak-tuer.ak-heute .ak-front, .ak-tuer.ak-wackeln { transition: none; animation: none; }
}
