/* =====================================================================
 * K2 „Papier & Zweig" — Design des Adventkalenders (Entscheid 2026-11-25)
 * Creme/Packpapier und sparsames Rot sind per Nachtrag im DESIGN-RAHMEN
 * (2026-11-25) NUR fuer den Adventkalender zugelassen (saisonal, bis 6.1.).
 * Kontraste (gemessen): #3a2f1f auf #efe2c8 = 10,2:1 (auf #e2cfa8 8,5:1) ·
 * #557000 auf #fbf6ea = 5,3:1 · Weiss auf #b3312a = 6,2:1.
 * ===================================================================== */
.tpw-ak--design-k2 {
	--k2-grund: #fbf6ea;
	--k2-papier: #efe2c8;
	--k2-papier-dunkel: #e2cfa8;
	--k2-tinte: #3a2f1f;
	--k2-rot: #b3312a;
	--k2-pad: clamp(28px, 4vw, 52px);
	position: relative;
	padding: var(--k2-pad) clamp(14px, 3vw, 40px);
	border-radius: var(--r-card);
	background:
		radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .7), transparent 40%),
		var(--k2-grund);
	box-shadow: inset 0 0 0 1px rgba(58, 47, 31, .08);
}
.tpw-ak-k2-schmuck {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.tpw-ak-k2-zweig {
	position: absolute;
	top: 8px;
	left: 10px;
	width: 180px;
	height: 56px;
	stroke: var(--tpw-gruen-dunkel);
	fill: none;
	stroke-linecap: round;
}
.tpw-ak-k2-beere { fill: var(--k2-rot); stroke: none; }
.tpw-ak-k2-sterne {
	position: absolute;
	top: 6px;
	right: 12px;
	width: 110px;
	height: 56px;
	fill: var(--tpw-gruen-hell);
}
.tpw-ak--design-k2 .tpw-ak-kopf { position: relative; margin-top: 30px; }
/* Vorfreude (Runde 8): Desktop — der Teaser-Anhänger hängt am Zweig oben
   links; die Schnur beginnt am Zweig (Stiel 40 px unter der Oberkante des
   Kalenders) und endet im Loch. Handy — Anhänger mittig, die Schnur kommt
   von der Oberkante des Kalenders (zwischen Zweig und Sternen). */
.tpw-ak--design-k2 .tpw-ak-kopf--vorfreude { margin-top: 0; --vf-schnur: 34px; }
/* Zweig in der Vorfreude länger, damit der Anhänger mitten am Zweig hängt
   (nicht an der Spitze bei den Beeren). */
@media (min-width: 761px) {
	.tpw-ak--design-k2.tpw-ak--vorfreude .tpw-ak-k2-zweig { width: 270px; height: 84px; top: -6px; }
}
.tpw-ak--design-k2 .tpw-ak-vf-schnur {
	top: calc(40px - var(--k2-pad));
	height: calc(var(--k2-pad) + 6px);
}
@media (max-width: 760px) {
	.tpw-ak--design-k2 .tpw-ak-kopf--vorfreude { --vf-schnur: 30px; }
	.tpw-ak--design-k2 .tpw-ak-vf-schnur {
		top: calc(-1 * var(--k2-pad));
		height: calc(var(--k2-pad) + var(--vf-schnur) + 10px);
	}
}

/* Unregelmaessiges Raster (ab 1001 px, Runde 8): jede Kachel FEST auf
   ihrem Platz (--ak-z Reihe, --ak-s Spalte aus dem Inline-Stil, Plan in
   TPW_AK_Ansicht_Papier::PLAETZE): 6 × 5 = 30 Felder, 18 klein, 3 hoch
   (.ist-hoch), 3 breit (.ist-breit) — lückenlos, ohne `dense`. Die
   Nummern sind fest gemischt (MISCHUNG); die Tab-Reihenfolge bleibt 1–24.
   Tablet (761–1000 px, 4 Spalten) und Handy (3 Spalten): alle gleich,
   Reihenfolge nach Platz (order) — ebenfalls lückenlos. */
@media (min-width: 761px) {
	.tpw-ak--design-k2 .tpw-ak-raster { gap: clamp(12px, 1.8vw, 22px); }
}
@media (min-width: 1001px) {
	.tpw-ak--design-k2 .tpw-ak-raster { grid-auto-rows: 1fr; }
	.tpw-ak--design-k2 .tpw-ak-feld {
		grid-row: var(--ak-z) / span 1;
		grid-column: var(--ak-s) / span 1;
	}
	.tpw-ak--design-k2 .tpw-ak-feld.ist-hoch { grid-row: var(--ak-z) / span 2; }
	.tpw-ak--design-k2 .tpw-ak-feld.ist-breit { grid-column: var(--ak-s) / span 2; }
	.tpw-ak--design-k2 .tpw-ak-feld.ist-hoch .tpw-ak-kachel,
	.tpw-ak--design-k2 .tpw-ak-feld.ist-breit .tpw-ak-kachel { aspect-ratio: auto; height: 100%; }
	.tpw-ak--design-k2 .tpw-ak-feld.ist-hoch .tpw-ak-kachel.is-zu .tpw-ak-zahl,
	.tpw-ak--design-k2 .tpw-ak-feld.ist-breit .tpw-ak-kachel.is-zu .tpw-ak-zahl { font-size: clamp(2.2rem, 4vw, 3.4rem); }
	/* Bildausschnitt: Feld „fokus" je Eintrag, sonst Vorgabe je Nummer
	   (TPW_AK_Ansicht_Papier::FOKUS). */
}

/* Anhaenger: Papier, leicht gedreht, mit Loch und Kordel. */
.tpw-ak--design-k2 .tpw-ak-kachel {
	overflow: visible;
	border-radius: 4px;
	box-shadow: 0 2px 0 rgba(58, 47, 31, .08), 0 8px 18px -10px rgba(58, 47, 31, .5);
	transform: rotate(var(--k2-dreh, 0deg));
	transition: transform .3s ease;
}
/* Neigung und Papierton nach dem SICHTBAREN Platz (Runde 8), nicht nach
   der Nummer: --d1…--d0 = Platz mod 4, --dunkel = jeder dritte Platz. */
.tpw-ak--design-k2 .tpw-ak-feld--d1 { --k2-dreh: -1.6deg; }
.tpw-ak--design-k2 .tpw-ak-feld--d2 { --k2-dreh: 1.2deg; }
.tpw-ak--design-k2 .tpw-ak-feld--d3 { --k2-dreh: -.6deg; }
.tpw-ak--design-k2 .tpw-ak-feld--d0 { --k2-dreh: 2deg; }
.tpw-ak--design-k2 .tpw-ak-kachel:hover { transform: rotate(0deg) translateY(-2px); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-zu {
	background: var(--k2-papier);
	color: var(--k2-tinte);
}
.tpw-ak--design-k2 .tpw-ak-feld--dunkel .tpw-ak-kachel.is-zu { background: var(--k2-papier-dunkel); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-zu::before {
	inset: 8px;
	border: 1px dashed rgba(58, 47, 31, .28);
	border-radius: 3px;
}
.tpw-ak--design-k2 .tpw-ak-kachel.is-zu:hover { background: #f5ead3; }
.tpw-ak--design-k2 .tpw-ak-kachel.is-zu .tpw-ak-zahl {
	color: var(--k2-tinte);
	font-weight: 800;
}
.tpw-ak--design-k2 .tpw-ak-kachel-bild { border-radius: 4px; }
.tpw-ak--design-k2 .tpw-ak-k2-kordel {
	position: absolute;
	top: -14px;
	left: 50%;
	width: 12px;
	height: 26px;
	margin-left: -6px;
	pointer-events: none;
	background:
		radial-gradient(circle at 50% 20px, var(--k2-grund) 0 3.5px, rgba(58, 47, 31, .5) 3.5px 4.5px, transparent 5px),
		linear-gradient(var(--k2-tinte), var(--k2-tinte)) center top / 1.5px 16px no-repeat;
	z-index: 2;
}
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen { background: var(--k2-papier); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.ohne-bild { background: #fffaf0; box-shadow: 0 8px 18px -10px rgba(58, 47, 31, .5); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-heute {
	box-shadow: 0 0 0 3px var(--k2-grund), 0 0 0 5px var(--k2-rot), 0 8px 18px -10px rgba(58, 47, 31, .5);
}

/* Tuer oeffnen: der Anhaenger „klappt" auf. */
.tpw-ak--design-k2 .tpw-ak-dialog[open] { animation: tpw-ak-k2-auf .4s ease-out; transform-origin: 50% 0; }
@keyframes tpw-ak-k2-auf {
	from { opacity: 0; transform: perspective(900px) rotateX(-12deg); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
	/* Ruhiges Raster: 3 Spalten, alle gleich, kaum gedreht. */
	.tpw-ak--design-k2 .tpw-ak-raster { gap: 16px 12px; }
	.tpw-ak--design-k2 .tpw-ak-feld--d1 { --k2-dreh: -.6deg; }
	.tpw-ak--design-k2 .tpw-ak-feld--d2 { --k2-dreh: .5deg; }
	.tpw-ak--design-k2 .tpw-ak-feld--d3 { --k2-dreh: -.3deg; }
	.tpw-ak--design-k2 .tpw-ak-feld--d0 { --k2-dreh: .7deg; }
	.tpw-ak-k2-sterne { width: 80px; }
	.tpw-ak-k2-zweig { width: 130px; }
}
@media (prefers-reduced-motion: reduce) {
	.tpw-ak--design-k2 .tpw-ak-dialog[open] { animation: none !important; }
	.tpw-ak--design-k2 .tpw-ak-kachel:hover { transform: rotate(var(--k2-dreh, 0deg)); }
}

/* Tastaturfokus auf Creme: dunkler Ring statt des hellen Halos. */
.tpw-ak--design-k2 .tpw-ak-kachel:focus-visible {
	outline: 3px solid var(--tpw-gruen-dunkel);
	outline-offset: 4px;
	box-shadow: none;
}
.tpw-ak--design-k2 .tpw-ak-folgen-link:focus-visible {
	outline: 2px solid var(--tpw-gruen-dunkel);
	outline-offset: 3px;
	box-shadow: none;
}
/* Offen ohne Standbild: Papier mit gruener Zahl (5,3:1 auf #efe2c8 nicht
   erreicht → Tinte statt Gruen, 10,2:1). */
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.ohne-bild .tpw-ak-zahl { color: var(--k2-tinte); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.ohne-bild::after {
	content: '';
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 14px;
	height: 14px;
	background: var(--tpw-gruen-dunkel);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12.5 4.5 4.5L19 7.5'/></svg>") center / contain no-repeat;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12.5 4.5 4.5L19 7.5'/></svg>") center / contain no-repeat;
}
/* Dialog-Kopfzeile im Papierton. */
.tpw-ak--design-k2 .tpw-ak-dialog { background: #fffdf7; }
.tpw-ak--design-k2 .tpw-ak-dialog .tpw-ak-dialog-nav { background-color: #fffdf7; }

/* =====================================================================
 * OFFENE TÜRCHEN: PAPIERRAHMEN + NUMMERNKÄRTCHEN (Obmann 2026-11-25)
 * „Schlicht und wertig statt verziert" — Kranz und Zweigrahmen verworfen.
 * Das Bild sitzt rechteckig wie ein aufgeklebtes Foto im Papier des
 * Anhängers: gleichmässiger Rand oben und seitlich, unten etwas mehr Platz
 * für das Nummernkärtchen an der roten Masche (Erkennungszeichen). Der
 * Rahmen entsteht nur aus Papier, Kante und Schatten — nichts gezeichnet.
 *   S1  Papierrahmen + Kärtchen (Vorgabe)
 *   S2  dazu ein kleiner Eckzweig (Dev-Leiste „Rahmen offen")
 * Kontrast: Zahl #3a2f1f auf Kärtchen #fffaf0 = 12,9:1.
 * ===================================================================== */
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen {
	--k2-rand: 11px;       /* Papierrand seitlich */
	--k2-kopf: 17px;       /* oben: Platz für das Loch, das Bild bleibt frei */
	--k2-fuss: 40px;       /* unten: Masche + Kärtchen, ohne das Bild zu berühren */
	background: linear-gradient(180deg, #f7eedb, var(--k2-papier));
	box-shadow: 0 1px 0 rgba(58, 47, 31, .1), 0 8px 18px -10px rgba(58, 47, 31, .5);
}
.tpw-ak--design-k2 .tpw-ak-oeffnung {
	inset: var(--k2-kopf) var(--k2-rand) var(--k2-fuss);
	border-radius: 3px;
	background: #5a4a32;
	/* feine Innenkante wie ein eingelegtes Foto */
	box-shadow: 0 0 0 1px rgba(58, 47, 31, .28), 0 1px 2px rgba(58, 47, 31, .25);
}
.tpw-ak--design-k2 .tpw-ak-oeffnung::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 5px rgba(0, 0, 0, .22);
	pointer-events: none;
}
.tpw-ak--design-k2 .tpw-ak-oeffnung img.tpw-ak-kachel-bild { transition: transform .35s ease; }

/* Nummernkärtchen an der Masche — hängt im unteren Papierrand. */
.tpw-ak--design-k2 .tpw-ak-kaertchen {
	position: absolute;
	left: 50%;
	bottom: 2px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: translateX(-50%) rotate(-2.5deg);
	transform-origin: 50% 0;
	pointer-events: none;
}
.tpw-ak--design-k2 .tpw-ak-kaertchen--v1 { transform: translateX(-50%) rotate(2deg); }
.tpw-ak--design-k2 .tpw-ak-kaertchen--v2 { transform: translateX(-50%) rotate(-1deg); }
.tpw-ak--design-k2 .tpw-ak-masche {
	display: block;
	width: 36px;
	height: 20px;
	margin-bottom: -6px;
	position: relative;
	z-index: 1;
	overflow: visible;
}
.tpw-ak--design-k2 .tpw-ak-masche-schlaufe { fill: var(--k2-rot); stroke: #8e2620; stroke-width: .8; stroke-linejoin: round; }
.tpw-ak--design-k2 .tpw-ak-masche-band { fill: none; stroke: var(--k2-rot); stroke-width: 2.6; stroke-linecap: round; }
.tpw-ak--design-k2 .tpw-ak-masche-knoten { fill: #8e2620; }
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen .tpw-ak-kaertchen .tpw-ak-zahl {
	position: static;
	min-width: 30px;
	padding: 3px 7px 2px;
	border-radius: 2px;
	background: #fffaf0;
	color: var(--k2-tinte);
	box-shadow: 0 0 0 1px rgba(58, 47, 31, .28), 0 2px 4px -1px rgba(58, 47, 31, .4);
	font-size: .95rem;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* S2: kleiner Eckzweig — überlappt die obere Bildecke nur knapp. */
.tpw-ak--design-k2 .tpw-ak-eckzweig {
	position: absolute;
	top: 7px;
	z-index: 2;
	width: 58px;
	height: 36px;
	overflow: visible;
	pointer-events: none;
}
.tpw-ak--design-k2 .tpw-ak-eckzweig--links { left: 1px; transform: rotate(-32deg); }
.tpw-ak--design-k2 .tpw-ak-eckzweig--rechts { right: 1px; transform: scaleX(-1) rotate(-32deg); }
.tpw-ak--design-k2 .tpw-ak-eckzweig-stiel { stroke: #6b5a3a; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.tpw-ak--design-k2 .tpw-ak-eckzweig-nadeln path { stroke: var(--tpw-gruen-tief); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.tpw-ak--design-k2 .tpw-ak-eckzweig-beere { fill: var(--k2-rot); }

/* Darüber/Fokus: Bild hebt sich leicht, Papier bekommt mehr Schatten. */
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen:hover,
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen:focus-visible { box-shadow: 0 1px 0 rgba(58, 47, 31, .1), 0 14px 24px -12px rgba(58, 47, 31, .6); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen:hover .tpw-ak-kachel-bild,
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen:focus-visible .tpw-ak-kachel-bild { transform: scale(1.04); }
/* Offen ohne Bild (Rückfall): helles Papierfeld statt Foto. */
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.ohne-bild .tpw-ak-oeffnung { background: #fbf3e0; box-shadow: inset 0 0 0 1px rgba(58, 47, 31, .2); }
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.ohne-bild .tpw-ak-oeffnung::after { content: none; }
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.ohne-bild::after { content: none; }

/* Heute: Ring + Haube */
/* „heute"-Etikett (Runde 8): links oben im Papierrand, leicht schräg —
   die Haube sitzt rechts oben an der Ecke, beide berühren sich nie.
   Solange das Türchen zu ist: mittig unter der grossen Zahl. */
.tpw-ak--design-k2 .tpw-ak-kachel.is-heute .tpw-ak-heute-marke { left: 7px; top: 5px; transform: rotate(-3deg); }
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-heute-marke {
	top: calc(50% + clamp(18px, 2.1vw, 28px));
	left: 50%;
	transform: translateX(-50%) rotate(-2deg);
}

/* ---------------------------------------------------------------------
 * KORDEL IMMER SENKRECHT (Obmann: „kann der Hänger immer senkrecht sein")
 * Der Anhänger dreht sich um das Loch (transform-origin am Loch), die
 * Kordel wird um denselben Punkt zurückgedreht — sie hängt also lotrecht
 * und endet genau im Loch, auch bei hohen und breiten Anhängern.
 * Loch: 6 px unter der Oberkante, mittig — im oberen Papierrand.
 * --------------------------------------------------------------------- */
.tpw-ak--design-k2 .tpw-ak-kachel { transform-origin: 50% 6px; }
.tpw-ak--design-k2 .tpw-ak-kachel:hover { transform: rotate(var(--k2-dreh, 0deg)) translateY(-2px); }
.tpw-ak--design-k2 .tpw-ak-k2-kordel {
	transform-origin: 50% 20px;
	transform: rotate(calc(-1 * var(--k2-dreh, 0deg)));
	z-index: 4;
}

/* ---------------------------------------------------------------------
 * HANDY (3 Spalten, ~105 px): schmaler Rand, kleines Kärtchen mit
 * reduzierter Masche.
 * Aufhängung: zwei Fassungen (Dev-Leiste „Kordel mobil"):
 *   oese   nur Loch/Öse, kein Strich (Vorgabe — ruhiger, siehe Bericht)
 *   leine  eine durchgehende Leine je Reihe, gleich lange kurze Kordeln
 * --------------------------------------------------------------------- */
@media (max-width: 760px) {
	.tpw-ak--design-k2 .tpw-ak-kachel.is-offen { --k2-rand: 6px; --k2-kopf: 12px; --k2-fuss: 25px; }
	.tpw-ak--design-k2 .tpw-ak-oeffnung { border-radius: 2px; }
	.tpw-ak--design-k2 .tpw-ak-kaertchen { bottom: 2px; }
	.tpw-ak--design-k2 .tpw-ak-masche { width: 20px; height: 11px; margin-bottom: -4px; }
	.tpw-ak--design-k2 .tpw-ak-masche-band { display: none; }
	.tpw-ak--design-k2 .tpw-ak-kachel.is-offen .tpw-ak-kaertchen .tpw-ak-zahl { min-width: 22px; padding: 1px 4px 1px; font-size: .78rem; }
	.tpw-ak--design-k2 .tpw-ak-eckzweig { width: 30px; height: 19px; top: 1px; }
	/* schmal: unter dem Loch auf die Fotoecke, damit es die Öse nicht berührt */
	.tpw-ak--design-k2 .tpw-ak-kachel.is-heute .tpw-ak-heute-marke { left: 2px; top: 13px; padding: 1px 5px 2px; font-size: .68rem; }
	.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-heute-marke { top: calc(50% + 15px); }
	.tpw-ak--design-k2[data-ak-kordel="oese"] .tpw-ak-raster { gap: 14px 12px; }
	.tpw-ak--design-k2[data-ak-kordel="oese"] .tpw-ak-k2-kordel {
		top: 1px;
		height: 12px;
		background: radial-gradient(circle at 50% 6px, var(--k2-grund) 0 3px, rgba(58, 47, 31, .5) 3px 4px, transparent 4.5px);
		transform: none;
	}
	.tpw-ak--design-k2[data-ak-kordel="leine"] .tpw-ak-raster { gap: 22px 12px; padding-top: 6px; }
	.tpw-ak--design-k2[data-ak-kordel="leine"] .tpw-ak-feld { position: relative; }
	.tpw-ak--design-k2[data-ak-kordel="leine"] .tpw-ak-feld::before {
		/* Abschnitt der Leine über der Zelle, inkl. halber Spalte links/rechts
		   — nebeneinander ergeben sie eine durchgehende Leine je Reihe */
		content: '';
		position: absolute;
		top: -12px;
		left: -6px;
		right: -6px;
		height: 1.5px;
		background: rgba(58, 47, 31, .55);
	}
	.tpw-ak--design-k2[data-ak-kordel="leine"] .tpw-ak-k2-kordel {
		top: -12px;
		height: 22px;
		background:
			radial-gradient(circle at 50% 18px, var(--k2-grund) 0 3px, rgba(58, 47, 31, .5) 3px 4px, transparent 4.5px),
			linear-gradient(var(--k2-tinte), var(--k2-tinte)) center top / 1.5px 14px no-repeat;
		transform-origin: 50% 18px;
	}
}

/* ---------------------------------------------------------------------
 * HEUTE „ZU BIS KLICK" (Entscheid des Obmanns 2026-11-25, Vorgabe)
 * Bis zum ersten Öffnen sieht das heutige Türchen geschlossen und
 * einladend aus: Papier mit grosser Zahl, warmer Lichtschein — ohne Bild.
 * adventkalender.js setzt nach dem Öffnen .ist-gesehen (je Tag gemerkt);
 * dann erscheint das Foto mit kurzem Einblenden.
 * Reine Darstellung: serverseitig ist das Türchen offen.
 * --------------------------------------------------------------------- */
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) {
	background: radial-gradient(circle at 50% 55%, #fff6d8 0, #f7e6b8 45%, var(--k2-papier) 80%);
}
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen)::before {
	content: '';
	position: absolute;
	inset: 8px;
	border: 1px dashed rgba(58, 47, 31, .32);
	border-radius: 3px;
	box-shadow: 0 0 22px 4px rgba(255, 204, 102, .45) inset;
}
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-oeffnung,
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-eckzweig,
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-masche { display: none; }
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-kaertchen {
	inset: 0;
	justify-content: center;
	transform: none;
}
.tpw-ak--design-k2[data-ak-heute-modus="zu"] .tpw-ak-kachel.is-heute:not(.ist-gesehen) .tpw-ak-kaertchen .tpw-ak-zahl {
	padding: 0;
	background: none;
	box-shadow: none;
	font-size: clamp(1.5rem, 3.2vw, 2.5rem);
}
.tpw-ak--design-k2 .tpw-ak-kachel.is-heute.ist-aufklappend .tpw-ak-oeffnung { animation: tpw-ak-aufziehen .6s ease-out; }
.tpw-ak--design-k2 .tpw-ak-kachel.is-heute.ist-aufklappend .tpw-ak-kaertchen { animation: tpw-ak-einblenden .6s ease-out; }
@keyframes tpw-ak-aufziehen {
	from { opacity: 0; transform: scale(.94); }
	to { opacity: 1; transform: none; }
}
@keyframes tpw-ak-einblenden { from { opacity: 0; } to { opacity: 1; } }

/*
 * PENDELN des ungeöffneten heutigen Türchens (Obmann: „cool, aber endet
 * dann plötzlich"). Gedämpftes Pendel: ein Stups, dann klingt der Ausschlag
 * sanft ab (±4° → 2,5° → 1,2° → 0,5° → 0), jeder Schwung ease-in-out; dann
 * Ruhe bis zum nächsten Stups (Zyklus 8 s). Es pendelt das ganze Feld —
 * Schnur UND Anhänger gemeinsam um den Aufhängepunkt oben (Nagel 14 px
 * über der Oberkante); das wirkte natürlicher als ein Anhänger, der unter
 * einer starren Schnur kippt. Animiert wird nur transform des Felds; 0° =
 * exakt die Ruhelage (der Anhänger behält darin seine eigene Drehung),
 * also kein Sprung am Ende und beim Neustart.
 * Läuft nur, solange das Türchen ungeöffnet UND im Blick ist und kein
 * Dialog offen ist (Klassen aus adventkalender.js); verborgene Tabs
 * pausiert der Browser selbst. Reduzierte Bewegung: nur der Lichtschein.
 */
.tpw-ak--design-k2 .tpw-ak-feld.ist-pendel {
	transform-origin: 50% -14px;
	animation: tpw-ak-pendel 8s infinite;
	animation-play-state: paused;
}
.tpw-ak--design-k2 .tpw-ak-feld.ist-pendel.ist-im-blick { animation-play-state: running; }
.tpw-ak--design-k2.is-dialog-offen .tpw-ak-feld.ist-pendel { animation-play-state: paused; }
@keyframes tpw-ak-pendel {
	0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
	6% { transform: rotate(4deg); animation-timing-function: ease-in-out; }
	14% { transform: rotate(-2.5deg); animation-timing-function: ease-in-out; }
	22% { transform: rotate(1.2deg); animation-timing-function: ease-in-out; }
	30% { transform: rotate(-.5deg); animation-timing-function: ease-in-out; }
	38%, 100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
	.tpw-ak--design-k2 .tpw-ak-feld.ist-pendel { animation: none !important; }
	.tpw-ak--design-k2 .tpw-ak-oeffnung,
	.tpw-ak--design-k2 .tpw-ak-kaertchen { animation: none !important; }
	.tpw-ak--design-k2 .tpw-ak-kachel.is-offen:hover .tpw-ak-kachel-bild,
	.tpw-ak--design-k2 .tpw-ak-kachel.is-offen:focus-visible .tpw-ak-kachel-bild { transform: none; }
}

/* Heute-Ring nach den Regeln für offene Türchen (sonst überschrieben). */
.tpw-ak--design-k2 .tpw-ak-kachel.is-offen.is-heute {
	box-shadow: 0 0 0 3px var(--k2-grund), 0 0 0 5px var(--k2-rot), 0 8px 18px -10px rgba(58, 47, 31, .5);
}
