/* Platzhirsch-Adventkalender – alles unter .phak gekapselt, damit Theme-Stile (Avada) nicht durchschlagen. */
.phak, .phak-modal {
	--phak-bg: #100f0e;
	--phak-panel: #171411;
	--phak-gold: #d8b36a;
	--phak-gold-l: #ffdda0;
	--phak-gold-m: #e2bc79;
	--phak-text: #fff4df;
	--phak-muted: #cdb99a;
	--phak-ok: #1a5a40;
	--phak-ok-l: #b1d0a6;
	--phak-bad: #9e6355;
	--phak-serif: Georgia, "Times New Roman", serif;
	--phak-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
	color: var(--phak-text);
	font: 400 16px/1.45 var(--phak-sans);
	letter-spacing: normal;
	text-transform: none;
}
.phak *, .phak *::before, .phak *::after,
.phak-modal *, .phak-modal *::before, .phak-modal *::after { box-sizing: border-box; }
.phak p, .phak-modal p { margin: 0 0 .7em; color: inherit; font: inherit; }
.phak a, .phak-modal a { color: var(--phak-gold-l); text-decoration: underline; text-underline-offset: .16em; }
.phak button, .phak-modal button, .phak-modal input, .phak-modal label {
	font: inherit; letter-spacing: normal; text-transform: none; text-shadow: none;
}
.phak button, .phak-modal button {
	-webkit-appearance: none; appearance: none; cursor: pointer; margin: 0;
	-webkit-tap-highlight-color: transparent; box-shadow: none; min-height: 0; width: auto; line-height: 1.3;
}
.phak button:focus-visible, .phak-modal button:focus-visible, .phak-modal a:focus-visible, .phak-modal input:focus-visible {
	outline: 2px solid #f5d69e; outline-offset: 3px;
}

/* ---------- Kalenderseite ---------- */
.phak {
	background: var(--phak-bg);
	border-radius: 16px;
	padding: clamp(16px, 4vw, 40px);
	max-width: 1180px;
	margin: 0 auto;
}
.phak-head { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: clamp(16px, 4vw, 40px); align-items: center; margin-bottom: clamp(20px, 4vw, 36px); }
.phak-cover { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #3a2f22; }
.phak .phak-kicker { color: var(--phak-gold-m); font-size: .8rem; font-weight: 700; letter-spacing: .2em; margin-bottom: 8px; }
.phak .phak-h { margin: 0 0 12px; color: var(--phak-gold-l); font: 400 clamp(1.8rem, 4.5vw, 2.8rem)/1.1 var(--phak-serif); letter-spacing: 0; text-transform: none; }
.phak .phak-lead { color: var(--phak-text); font-size: 1.05rem; max-width: 40em; }
.phak .phak-prize { color: var(--phak-gold-l); }
.phak .phak-muted, .phak-modal .phak-muted { color: var(--phak-muted); font-size: .9rem; }
@media (max-width: 640px) {
	.phak-head { grid-template-columns: 1fr; text-align: center; }
	.phak-cover { max-width: 220px; margin: 0 auto; }
	.phak .phak-lead { margin-inline: auto; }
}

.phak-player { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 640px) { .phak-player { justify-content: center; } }
.phak .phak-btn, .phak-modal .phak-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 46px; padding: 9px 20px; border-radius: 12px;
	border: 1px solid var(--phak-gold); background: var(--phak-panel); color: #ffdfa4;
	font-weight: 650; font-size: 1rem; text-decoration: none; white-space: nowrap;
}
.phak .phak-btn:hover, .phak-modal .phak-btn:hover { background: #312518; color: #ffdfa4; }
.phak .phak-btn.is-primary, .phak-modal .phak-btn.is-primary { background: linear-gradient(180deg, #e6c47f, #b98d45); color: #1b140b; border-color: #f0d29a; }
.phak .phak-btn.is-primary:hover, .phak-modal .phak-btn.is-primary:hover { background: linear-gradient(180deg, #f0d08f, #c69a52); color: #1b140b; }
.phak .phak-btn.is-small, .phak-modal .phak-btn.is-small { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.phak .phak-btn.is-link, .phak-modal .phak-btn.is-link { border-color: transparent; background: transparent; text-decoration: underline; padding-inline: 6px; }
.phak .phak-btn[disabled], .phak-modal .phak-btn[disabled] { opacity: .45; cursor: default; }
.phak-me { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.phak-me strong { color: var(--phak-gold-l); font-weight: 650; }
.phak-banner.is-test { border-color: #8a6d2c; background: #2a2210; color: #f5dc9e; }
.phak-banner { width: 100%; padding: 10px 14px; border: 1px solid #6b5333; border-radius: 10px; background: #211a13; font-size: .92rem; }

/* Raster 6 x 4 */
.phak-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 18px); }
@media (max-width: 900px) { .phak-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 380px) { .phak-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.phak-cell { perspective: 700px; }
.phak .phak-tile {
	position: relative; display: block; width: 100%; aspect-ratio: 300 / 336; padding: 0;
	border: 0; border-radius: 8px; background: #0a0908; overflow: visible;
}
.phak-tile-door {
	position: absolute; inset: 0; display: block; border-radius: 8px; overflow: hidden;
	transform-origin: 0% 50%; transition: transform 700ms cubic-bezier(.35,.1,.25,1), filter .3s;
	box-shadow: 0 6px 18px #0008; backface-visibility: hidden; z-index: 1;
}
.phak-tile-door img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Rueckseite = Blick ins geoeffnete Tuerchen: warmes Licht, goldener Hirsch, Punkte */
.phak-tile-back {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em;
	border-radius: 8px; overflow: hidden; color: var(--phak-gold-l); text-align: center;
	background:
		radial-gradient(ellipse 70% 55% at 56% 46%, rgba(255, 214, 140, .42), rgba(255, 190, 90, .10) 55%, transparent 75%),
		linear-gradient(160deg, #2a1d0f 0%, #140e08 55%, #0b0806 100%);
	box-shadow: inset 0 0 0 1px rgba(216, 179, 106, .55), inset 0 0 0 5px #0f0b07, inset 0 0 0 6px rgba(216, 179, 106, .28), inset 0 -18px 30px rgba(0, 0, 0, .5);
}
.phak-tile-back::before { /* offener Tuerfluegel am linken Rand */
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 13%;
	background: linear-gradient(90deg, #070504 0%, #1d150d 60%, #3a2a17 100%);
	box-shadow: 1px 0 0 rgba(232, 197, 128, .55), 6px 0 14px rgba(0, 0, 0, .45);
	clip-path: polygon(0 0, 100% 6%, 100% 94%, 0 100%);
}
.phak-tile-back::after { /* Lichtkegel auf dem Boden */
	content: ""; position: absolute; left: 13%; right: 0; bottom: 0; height: 26%;
	background: radial-gradient(ellipse 60% 90% at 50% 100%, rgba(255, 210, 130, .22), transparent 70%);
}
.phak .phak-tile { container-type: inline-size; }
.phak-tile-back { gap: 3cqw; }
.phak-tile-stag {
	position: relative; display: block; width: 32cqw; aspect-ratio: 178 / 173; margin-left: 9cqw; flex: none;
	background: linear-gradient(150deg, #fff0c2, #e3b864 45%, #a8772c);
	-webkit-mask: url("../img/stag.png") center / contain no-repeat; mask: url("../img/stag.png") center / contain no-repeat;
	filter: drop-shadow(0 0 6px rgba(255, 205, 120, .55));
}
.phak-tile-num {
	position: relative; margin-left: 9cqw; color: var(--phak-gold-m); white-space: nowrap;
	font: 700 7cqw/1 var(--phak-sans); letter-spacing: .12em; text-transform: uppercase;
}
.phak-tile-info { position: relative; margin-left: 9cqw; color: var(--phak-muted); font: 500 7.5cqw/1.1 var(--phak-sans); white-space: nowrap; }
.phak-tile-info b { display: block; color: #fff1cf; font: 400 19cqw/1 var(--phak-serif); }
.phak .phak-tile.is-locked .phak-tile-door { filter: brightness(.55) saturate(.7); }
.phak .phak-tile.is-locked { cursor: not-allowed; }
.phak .phak-tile.is-locked::after {
	content: ""; position: absolute; z-index: 2; right: 8%; top: 7%; width: 16%; aspect-ratio: 1; opacity: .8;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8b36a' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}
.phak .phak-tile.is-today .phak-tile-door { box-shadow: 0 0 0 2px var(--phak-gold), 0 0 22px #d8b36a88; animation: phak-glow 2.4s ease-in-out infinite; }
@keyframes phak-glow { 50% { box-shadow: 0 0 0 2px #ffe3a8, 0 0 34px #d8b36acc; } }
.phak .phak-tile:not(.is-locked):hover .phak-tile-door { transform: rotateY(-14deg); }
.phak .phak-tile.is-done .phak-tile-door { transform: rotateY(-108deg); }
.phak .phak-tile.is-done { box-shadow: 0 6px 18px #0008; border-radius: 8px; }
.phak .phak-tile.is-done:hover .phak-tile-back { box-shadow: inset 0 0 0 1px rgba(245, 214, 150, .9), inset 0 0 0 5px #0f0b07, inset 0 0 0 6px rgba(216, 179, 106, .45), inset 0 -18px 30px rgba(0, 0, 0, .5), 0 0 22px rgba(216, 179, 106, .35); }
.phak .phak-tile.is-opening .phak-tile-door { transform: rotateY(-105deg); }
.phak .phak-tile.is-shake { animation: phak-shake 420ms; }
@keyframes phak-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* Ranking */
.phak-ranking { margin-top: clamp(28px, 5vw, 48px); }
.phak .phak-h3 { margin: 0 0 12px; color: var(--phak-gold-l); font: 400 clamp(1.4rem, 3vw, 1.9rem)/1.2 var(--phak-serif); text-transform: none; letter-spacing: 0; }
.phak-table { width: 100%; border-collapse: collapse; font-size: .95rem; max-width: 640px; margin: 0; }
@media (max-width: 480px) {
	.phak-table { font-size: .88rem; }
	.phak-table th, .phak-table td { padding: 7px 6px; }
	.phak-table th { letter-spacing: .04em; font-size: .7rem; }
	.phak-table .col-doors { display: none; }
}
.phak-table th, .phak-table td { padding: 8px 10px; border: 0; border-bottom: 1px solid #3a2f22; text-align: left; color: var(--phak-text); background: transparent; }
.phak-table th { color: var(--phak-gold-m); font-weight: 600; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.phak-table td.num, .phak-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.phak-table tr.is-win td { color: var(--phak-gold-l); }
.phak-table tr.is-me td { background: #2a2116; color: var(--phak-gold-l); font-weight: 650; }
.phak-table tr.gap td { text-align: center; color: var(--phak-muted); border-bottom: 0; padding: 2px; }
.phak-rules { margin-top: 28px; border-top: 1px solid #3a2f22; padding-top: 14px; }
.phak-rules summary { cursor: pointer; color: var(--phak-gold-l); font-weight: 600; }
.phak-rules ul { margin: 10px 0 0 1.2em; padding: 0; color: var(--phak-text); }
.phak-rules li { margin: 0 0 6px; }

/* Toast */
.phak-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 1000001; transform: translate(-50%, 30px); opacity: 0;
	max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 12px; border: 1px solid var(--phak-gold);
	background: #1d1812; color: #fff4df; font: 500 .95rem/1.4 system-ui, sans-serif; box-shadow: 0 10px 30px #000a;
	transition: opacity .25s, transform .25s; pointer-events: none; text-align: center;
}
.phak-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
html.phak-lock .phak-toast { bottom: auto; top: 62px; }

/* ---------- Modal mit Klapp-Karte ---------- */
.phak-modal {
	position: fixed; inset: 0; z-index: 1000000; display: grid; place-items: center; padding: 12px;
	background: #070605e8; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	opacity: 0; transition: opacity .25s;
}
.phak-modal.is-on { opacity: 1; }
.phak-modal[hidden] { display: none; }
html.phak-lock, html.phak-lock body { overflow: hidden; }
.phak-modal .phak-close {
	position: fixed; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--phak-gold); background: #171411; color: var(--phak-gold-l); font-size: 1.5rem; line-height: 1; padding: 0;
	display: grid; place-items: center;
}
.phak-stage { position: relative; width: min(480px, calc((100svh - 24px) * 9 / 16), 100%); perspective: 1500px; transition: width .45s cubic-bezier(.3,.1,.2,1); }
.phak-card { position: relative; transform-style: preserve-3d; aspect-ratio: 9 / 16; height: auto; transition: height .45s cubic-bezier(.3,.1,.2,1); }
.phak-stage.is-expanded { width: min(700px, calc(100vw - 24px)); }
.phak-stage.is-expanded .phak-card { aspect-ratio: auto; height: min(calc(100svh - 32px), 960px); }
@media (max-width: 600px) {
	.phak-modal { padding: 60px 8px 8px; align-items: start; }
	.phak-stage { width: min(100%, calc((100svh - 70px) * 9 / 16)); margin: 0 auto; }
	.phak-stage.is-expanded { width: calc(100vw - 16px); }
	.phak-stage.is-expanded .phak-card { height: calc(100svh - 70px); }
}
.phak-card.is-open { transform: rotateY(180deg); animation: phak-flip 780ms cubic-bezier(.35,.1,.25,1) both; }
.phak-card.is-open.no-anim { animation: none; }
@keyframes phak-flip {
	0% { transform: rotateZ(0) rotateY(0); }
	50% { transform: rotateZ(9deg) rotateY(90deg); }
	100% { transform: rotateZ(0) rotateY(180deg); }
}
.phak-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.phak-front img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.phak-modal .phak-open-door { position: absolute; top: 77%; left: 50%; transform: translate(-50%, -50%); box-shadow: 0 6px 22px #0009; }
.phak-back {
	transform: rotateY(180deg); display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain;
	padding: clamp(14px, 5vw, 28px); background-color: var(--phak-bg); background-position: center, center bottom; background-size: 100% 100%, cover;
	border: 1px solid #977341;
}
.phak-content { position: relative; width: 100%; max-width: 600px; margin: auto; padding: clamp(6px, 2.5vw, 14px); }
.phak-stage.is-expanded .phak-board { max-width: min(100%, 470px, calc((100svh - 300px) * 941 / 1672)); min-width: min(100%, 300px); margin: 0 auto; }
.phak-video video { max-height: min(62svh, 640px); width: auto; max-width: 100%; margin: 0 auto; }
.phak-steps img { max-height: 52svh; width: auto; max-width: 100%; margin: 0 auto; }
.phak-reveal img { max-height: 50svh; object-fit: contain; }
.phak-modal .phak-logo { display: block; width: min(42%, 150px); height: auto; margin: 0 auto 10px; opacity: .45; }
.phak-modal .phak-kicker { margin: 0 0 10px; color: var(--phak-gold-m); text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .2em; }
.phak-modal .phak-title { margin: 0 0 18px; color: var(--phak-gold-l); text-align: center; font: 400 clamp(1.35rem, 5.4vw, 2.1rem)/1.12 var(--phak-serif); letter-spacing: 0; text-transform: none; outline: 0; }
.phak-modal .phak-intro-text { text-align: center; margin-bottom: 14px; }
.phak-modal .phak-center { text-align: center; }
.phak-modal .phak-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }

/* Antworten (Quiz, Bild erraten) */
.phak-answers { display: grid; gap: 8px; }
.phak-modal .phak-answer {
	width: 100%; min-height: 46px; padding: 8px 12px; border: 2px solid #675239; border-radius: 8px;
	color: var(--phak-text); text-align: left; background: #251e17; font-size: 1rem;
}
.phak-modal .phak-answer:hover:not([aria-disabled]) { background: #3a2d21; }
.phak-modal .phak-answer[aria-disabled] { cursor: default; }
.phak-letter { display: inline-block; min-width: 2.1em; color: #e5bf80; }
.phak-modal .phak-answer.is-correct { border: 3px solid #1d6a4a; background: #16362677; }
.phak-modal .phak-answer.is-correct::after { content: "✓"; float: right; color: var(--phak-ok-l); }
.phak-modal .phak-answer.is-wrong { border-color: var(--phak-bad); }

/* Ergebnis */
.phak-result { margin-top: 16px; padding: 14px; border: 1px solid #6b5333; border-radius: 10px; background: #1b1611f2; }
.phak-result-head { margin: 0 0 6px; color: var(--phak-gold-l); font: 400 1.35rem/1.2 var(--phak-serif); }
.phak-points { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 10px 0; font-size: .92rem; }
.phak-points span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.phak-points .sum { border-top: 1px solid #6b5333; padding-top: 4px; color: var(--phak-gold-l); font-weight: 700; }
.phak-modal .phak-about { margin: 12px 0 0; font-size: .9rem; text-align: center; }
.phak-modal .phak-credit { margin: 8px 0 0; color: #d8bb90; text-align: center; font-size: .75rem; }

/* Memory */
.phak-memory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(5px, 1.6vw, 9px); }
.phak-modal .phak-mem {
	position: relative; padding: 0; min-width: 0; aspect-ratio: 1; border: 2px solid #ae8750; border-radius: 8px; color: #e7bf79;
	background: linear-gradient(145deg, #35291b, #15120f 75%); overflow: hidden; box-shadow: inset 0 0 0 2px #130f0b;
}
.phak-mem span { font: 1.55rem var(--phak-serif); }
.phak-mem img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.phak-mem img[hidden], .phak-mem span[hidden] { display: none; }
.phak-modal .phak-mem.is-matched { border-color: #1d6a4a; box-shadow: inset 0 0 0 2px #1d6a4a; cursor: default; }
.phak-mem.is-matched::after { content: "✓"; position: absolute; right: 2px; bottom: 2px; background: #163f30; color: #fff; border-radius: 50%; width: 1.25em; text-align: center; font-size: .85rem; }
.phak-status { text-align: center; margin: 12px 0; color: #f5d9a8; font-weight: 600; min-height: 1.4em; }

/* Suchbild */
.phak-board { position: relative; container-type: inline-size; border-radius: 8px; overflow: hidden; cursor: crosshair; touch-action: manipulation; }
.phak-board img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.phak-board-title { position: absolute; inset: 9.5% 3% auto; margin: 0; text-align: center; font: 400 7.5cqw/1.14 var(--phak-serif); color: #fff5e1; pointer-events: none; text-shadow: 0 2px 10px #000; }
.phak-ring { position: absolute; width: 11cqw; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid #2fa06f; border-radius: 50%; box-shadow: 0 0 0 2px #c0f0d0aa, 0 0 18px #2fa06f; pointer-events: none; animation: phak-pop 400ms both; }
.phak-tap { position: absolute; width: 8cqw; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid #fff3d0; border-radius: 50%; pointer-events: none; animation: phak-fade 650ms both; }
.phak-miss { position: absolute; width: 6cqw; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid #e08a76; border-radius: 50%; pointer-events: none; animation: phak-fade 700ms both; }
@keyframes phak-pop { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 70% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes phak-fade { 0% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

/* Feier-Overlay (aus Tuerchen 6 uebernommen) */
.phak-celebrate { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; overflow: hidden; border-radius: inherit; pointer-events: none; }
.phak-celebrate .phak-finish { position: relative; z-index: 1; width: 100%; padding: 24px 0; text-align: center; background: radial-gradient(ellipse, #171005ed 0%, #171005c4 43%, transparent 73%); animation: phak-zoom 650ms both; }
.phak-celebrate strong { display: block; color: #ffdb78; font: 400 clamp(2rem, 12vw, 3.6rem)/1.1 var(--phak-serif); text-shadow: 0 2px 0 #785014, 0 0 20px #d8a634a0; }
.phak-spark { position: absolute; width: 3px; height: 19px; border-radius: 1px; background: linear-gradient(90deg, #fff4bf52, transparent 42%, #0006), currentColor; box-shadow: 0 0 0 1px #f0ce7670; will-change: transform, opacity; }
@keyframes phak-zoom { 0% { transform: scale(.15); opacity: 0; } 65% { transform: scale(1.13); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* Zuordnen */
.phak-terms { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.phak-modal .phak-term {
	padding: 8px 12px; border: 2px solid #8a6a3e; border-radius: 999px; background: #251e17; color: var(--phak-gold-l); font-weight: 600; font-size: .95rem;
}
.phak-modal .phak-term.is-sel { background: var(--phak-gold); color: #1b140b; border-color: #ffe0a5; }
.phak-modal .phak-term.is-used { opacity: .55; }
.phak-def b { display: inline-block; margin: 0 6px 4px 0; padding: 1px 9px; border-radius: 999px; background: var(--phak-gold); color: #1b140b; font-size: .78rem; font-weight: 700; line-height: 1.5; }
.phak-def.is-wrong b { background: #c98a78; }
.phak-def.is-correct b { background: #8fc9a4; }
.phak-defs { display: grid; gap: 8px; }
.phak-modal .phak-def {
	width: 100%; padding: 10px 12px; border: 2px solid #675239; border-radius: 8px; background: #1e1813; color: var(--phak-text); text-align: left; font-size: .93rem; line-height: 1.35;
}
.phak-modal .phak-def.is-set { border-color: var(--phak-gold); }
.phak-modal .phak-def.is-correct { border-color: #1d6a4a; background: #16362677; }
.phak-modal .phak-def.is-wrong { border-color: var(--phak-bad); }
.phak-def small { display: block; margin-top: 4px; color: var(--phak-muted); }

/* Bingo */
.phak-hint { margin: 0 0 12px; padding: 12px 14px; border-left: 3px solid var(--phak-gold); background: #1e1813; border-radius: 0 8px 8px 0; font-size: .98rem; }
.phak-hint small { display: block; color: var(--phak-gold-m); font-size: .75rem; letter-spacing: .12em; margin-bottom: 4px; }
.phak-bingo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.phak-modal .phak-field {
	min-height: 64px; padding: 6px 4px; border: 2px solid #675239; border-radius: 8px; background: #251e17; color: var(--phak-text);
	font-size: clamp(.7rem, 3.1vw, .9rem); font-weight: 600; line-height: 1.2; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.phak-modal .phak-field.is-pending { background: #3a2d21; border-color: var(--phak-gold); transform: scale(.97); }
.phak-modal .phak-field.is-marked { background: linear-gradient(180deg, #e6c47f, #b98d45); color: #1b140b; border-color: #ffe0a5; cursor: default; }
.phak-modal .phak-field.is-flash-bad { animation: phak-bad 600ms; }
.phak-modal .phak-field.is-flash-target { animation: phak-target 900ms; }
@keyframes phak-bad { 30% { background: #6e2f24; } }
@keyframes phak-target { 30%, 70% { box-shadow: 0 0 0 3px #e7c27c; } }

/* Bild erraten */
.phak-reveal { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #5d4527; background: #000; margin-bottom: 10px; }
.phak-reveal img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.phak-hints { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: h; }
.phak-hints li { counter-increment: h; margin: 0 0 8px; padding: 10px 12px 10px 40px; position: relative; background: #1e1813; border-radius: 8px; animation: phak-in 350ms both; }
.phak-hints li::before { content: counter(h); position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--phak-gold); color: #1b140b; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
@keyframes phak-in { from { opacity: 0; transform: translateY(6px); } }

/* Puzzle */
.phak-puzzle { display: grid; gap: 2px; border-radius: 8px; overflow: hidden; border: 1px solid #5d4527; background: #5d4527; }
.phak-modal .phak-piece { padding: 0; border: 0; aspect-ratio: 1; background-repeat: no-repeat; border-radius: 0; transition: filter .15s; }
.phak-modal .phak-piece.is-sel { filter: brightness(1.35); outline: 3px solid var(--phak-gold-l); outline-offset: -3px; }
.phak-puzzle.is-solved { gap: 0; }
.phak-preview { margin: 6px auto 0; width: min(46%, 220px); text-align: center; }
.phak-preview img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid #5d4527; opacity: .9; }
.phak-preview figcaption { margin-top: 4px; color: var(--phak-muted); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.phak-modal .phak-mem.is-open { border-color: var(--phak-gold-l); }

/* Intro */
.phak-steps img, .phak-video video { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid #5d4527; background: #000; }
.phak-steps figcaption { text-align: center; margin-top: 8px; color: var(--phak-gold-l); }
.phak-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.phak-dots i { width: 8px; height: 8px; border-radius: 50%; background: #5d4527; }
.phak-dots i.on { background: var(--phak-gold); }
.phak-placeholder { padding: 30px 16px; border: 1px dashed #6b5333; border-radius: 8px; text-align: center; color: var(--phak-muted); }

/* Anmeldung */
.phak-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.phak-modal .phak-tab { padding: 7px 14px; border: 1px solid #6b5333; border-radius: 999px; background: transparent; color: var(--phak-muted); }
.phak-modal .phak-tab[aria-selected="true"] { background: #2a2116; color: var(--phak-gold-l); border-color: var(--phak-gold); }
.phak-form { display: grid; gap: 10px; }
.phak-form label.field { display: grid; gap: 4px; font-size: .88rem; color: var(--phak-gold-m); }
.phak-modal .phak-form input[type=text], .phak-modal .phak-form input[type=email] {
	width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #6b5333; border-radius: 8px; background: #0d0c0b; color: var(--phak-text); font-size: 1rem; box-shadow: none; margin: 0;
}
.phak-form .check { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: .85rem; color: var(--phak-text); line-height: 1.35; }
.phak-modal .phak-form .check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--phak-gold); }
.phak-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.phak-msg { font-size: .9rem; min-height: 1.2em; }
.phak-msg.is-error { color: #f0a08e; }
.phak-msg.is-ok { color: var(--phak-ok-l); }

.phak-spin { display: block; width: 34px; height: 34px; margin: 30px auto; border: 3px solid #5d4527; border-top-color: var(--phak-gold); border-radius: 50%; animation: phak-rot 800ms linear infinite; }
@keyframes phak-rot { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.phak-card.is-open, .phak .phak-tile.is-today .phak-tile-door, .phak-ring, .phak-hints li, .phak-celebrate .phak-finish { animation: none; }
	.phak-tile-door { transition: none; }
}

/* ---------- Einzel-Tuerchen in Beitraegen ---------- */
.phak.phak-single { background: transparent; padding: 0; max-width: 420px; margin: 1.5em auto; text-align: center; }
.phak-single-card { position: relative; display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px #0005; text-decoration: none; }
.phak-single-card img { display: block; width: 100%; height: auto; }
.phak .phak-single-btn {
	position: absolute; top: 77%; left: 50%; transform: translate(-50%, -50%); padding: 10px 22px; border-radius: 14px;
	border: 1px solid #d8b36a; background: #171411; color: #ffdfa4; font: 650 1rem/1.3 system-ui, sans-serif; white-space: nowrap; box-shadow: 0 6px 22px #0009;
}
.phak-single .phak-muted { color: #6b5a44; margin-top: 10px; }
