/* HAC Winterzauber – Head and Code GmbH */
.hac-wz, .hac-wz * { box-sizing: border-box; }
.hac-wz {
	--wz-primary: #c8102e;
	--wz-accent: #0b3d5c;
	--wz-ink: #1d2733;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
}

/* ---------- Bedienleiste unten links ---------- */
.hac-wz-dock {
	position: fixed; left: 16px; bottom: 16px; z-index: 99990;
	display: flex; gap: 8px; padding: 6px;
	background: rgba(255,255,255,.92); border-radius: 999px;
	box-shadow: 0 4px 18px rgba(0,0,0,.18);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	transform: translateY(120px); transition: transform .5s cubic-bezier(.2,1.4,.4,1);
}
.hac-wz-dock.is-in { transform: none; }
.hac-wz-btn {
	width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; margin: 0;
	display: grid; place-items: center; cursor: pointer;
	background: #eef3f7; color: var(--wz-accent);
	transition: background .2s, color .2s, transform .15s;
	position: relative;
}
.hac-wz-btn:hover { transform: scale(1.08); }
.hac-wz-btn:focus-visible { outline: 3px solid var(--wz-primary); outline-offset: 2px; }
.hac-wz-btn[aria-pressed="true"] { background: var(--wz-accent); color: #fff; }
.hac-wz-btn svg { width: 24px; height: 24px; display: block; }
.hac-wz-btn .hac-wz-tip {
	position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
	white-space: nowrap; font-size: 12px; background: var(--wz-ink); color: #fff;
	padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.hac-wz-btn:hover .hac-wz-tip, .hac-wz-btn:focus-visible .hac-wz-tip { opacity: 1; }
@media (hover: none) { .hac-wz-btn .hac-wz-tip { display: none; } }

/* ---------- Schnee ---------- */
.hac-wz-snow {
	position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 99980;
	pointer-events: none; transition: opacity .8s;
}

/* ---------- Elfen ---------- */
.hac-wz-elf {
	position: fixed; width: 90px; height: 110px; z-index: 99985;
	overflow: hidden; transform-origin: 50% 100%; pointer-events: none;
}
.hac-wz-elf-inner {
	width: 100%; height: 100%; transform: translateY(105%);
	transition: transform .7s cubic-bezier(.3,1.3,.5,1); pointer-events: auto; cursor: pointer;
}
.hac-wz-elf.is-peek .hac-wz-elf-inner { transform: translateY(30%); }
.hac-wz-elf.is-shy .hac-wz-elf-inner { transition-duration: .25s; transition-timing-function: ease-in; }
.hac-wz-elf svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hac-wz-elf .wz-eyes { animation: wzLook 3s ease-in-out infinite; }
.hac-wz-elf .wz-lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: wzBlink 3.4s infinite; }
.hac-wz-elf .wz-hat { transform-box: fill-box; transform-origin: 20% 100%; animation: wzWobble 2.2s ease-in-out infinite; }
@keyframes wzLook { 0%,15% { transform: translateX(0) } 30%,45% { transform: translateX(-3px) } 60%,80% { transform: translateX(3px) } 100% { transform: translateX(0) } }
@keyframes wzBlink { 0%,92%,100% { transform: scaleY(0) } 95% { transform: scaleY(1) } }
@keyframes wzWobble { 0%,100% { transform: rotate(0) } 50% { transform: rotate(6deg) } }

.hac-wz-bubble {
	position: fixed; z-index: 99986; max-width: 210px;
	background: #fff; color: var(--wz-ink); font-size: 14px; font-weight: 600;
	padding: 8px 12px; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.2);
	opacity: 0; transform: scale(.6); transition: opacity .25s, transform .3s cubic-bezier(.2,1.6,.4,1);
	pointer-events: none;
}
.hac-wz-bubble.is-in { opacity: 1; transform: scale(1); }

/* ---------- Popup ---------- */
.hac-wz-overlay {
	position: fixed; inset: 0; z-index: 99995;
	display: grid; place-items: center; padding: 16px;
	background: rgba(8,20,34,.6); opacity: 0; transition: opacity .35s;
}
.hac-wz-overlay.is-open { opacity: 1; }
.hac-wz-modal {
	position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px);
	overflow: auto; background: #fff; color: var(--wz-ink);
	border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
	transform: translateY(30px) scale(.96); transition: transform .45s cubic-bezier(.2,1.3,.4,1);
}
.hac-wz-overlay.is-open .hac-wz-modal { transform: none; }
.hac-wz-close {
	position: absolute; top: 10px; right: 10px; z-index: 3;
	width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.9); color: var(--wz-ink); font-size: 22px; line-height: 1;
	display: grid; place-items: center; padding: 0;
}
.hac-wz-close:focus-visible { outline: 3px solid var(--wz-primary); outline-offset: 2px; }

.hac-wz-scene { position: relative; height: 210px; overflow: hidden; background: var(--wz-accent); }
.hac-wz-scene svg.wz-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hac-wz-scene .wz-flake {
	position: absolute; top: -10px; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .85;
	animation: wzFall linear infinite;
}
@keyframes wzFall { to { transform: translate(20px, 230px); } }
.hac-wz-scene h2 {
	position: absolute; left: 0; right: 0; bottom: 84px; margin: 0; padding: 0 20px;
	text-align: center; color: #fff; font-family: var(--wz-font-head, Georgia, "Times New Roman", serif);
	font-size: 34px; font-weight: 700; line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.hac-wz-logo { position: absolute; top: 14px; left: 16px; max-height: 34px; max-width: 140px;
	background: #fff; padding: 5px 8px; border-radius: 8px; }

.hac-wz-body { padding: 20px 24px 24px; text-align: center; }
.hac-wz-body p { margin: 0 0 10px; font-size: 16px; }
.hac-wz-sig { font-style: italic; color: #5b6774; }
.hac-wz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.hac-wz-cta {
	border: 0; cursor: pointer; border-radius: 999px; padding: 12px 22px; font-size: 16px; font-weight: 700;
	background: var(--wz-primary); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18);
	transition: transform .15s, filter .2s;
}
.hac-wz-cta:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hac-wz-cta.is-ghost { background: #eef3f7; color: var(--wz-ink); box-shadow: none; }
.hac-wz-cta:focus-visible { outline: 3px solid var(--wz-accent); outline-offset: 2px; }
.hac-wz-hint { font-size: 13px; color: #5b6774; margin-top: 12px !important; }

/* ---------- Spiel ---------- */
.hac-wz-modal.is-game { max-width: 480px; }
.hac-wz-game { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: calc(100vh - 32px); background: #f4f8fb; touch-action: none; user-select: none; -webkit-user-select: none; }
.hac-wz-game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hac-wz-hud { position: absolute; top: 10px; left: 12px; right: 56px; display: flex; justify-content: space-between;
	font-weight: 800; color: var(--wz-ink); font-size: 16px; pointer-events: none; }
.hac-wz-hud span { background: rgba(255,255,255,.88); padding: 3px 10px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.hac-wz-hud span:empty { display: none; }
.hac-wz-screen {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; padding: 24px; background: rgba(255,255,255,.86); gap: 6px;
}
.hac-wz-screen[hidden] { display: none; }
.hac-wz-screen h3 { margin: 0 0 4px; font-family: var(--wz-font-head, Georgia, serif); font-size: 28px; color: var(--wz-accent); }
.hac-wz-screen p { margin: 0; }
.hac-wz-big { font-size: 46px; font-weight: 800; color: var(--wz-primary); line-height: 1.1; }
.hac-wz-coupon { margin-top: 10px !important; padding: 10px 14px; border: 2px dashed var(--wz-primary); border-radius: 10px; background: #fff; }
.hac-wz-coupon code { font-size: 20px; font-weight: 800; letter-spacing: 1px; color: var(--wz-primary); background: none; }

@media (max-width: 520px) {
	.hac-wz-overlay { padding: 0; }
	.hac-wz-modal { border-radius: 0; max-height: 100vh; height: 100%; max-width: none; }
	.hac-wz-modal:not(.is-game) { height: auto; border-radius: 18px; width: calc(100% - 24px); }
	.hac-wz-modal.is-game .hac-wz-game { aspect-ratio: auto; height: 100vh; height: 100dvh; max-height: none; }
	.hac-wz-scene h2 { font-size: 28px; }
	.hac-wz-dock { left: 10px; bottom: 10px; }
	.hac-wz-btn { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
	.hac-wz-scene .wz-flake, .hac-wz-elf .wz-eyes, .hac-wz-elf .wz-hat { animation: none; }
	.hac-wz-modal, .hac-wz-dock { transition: none; }
}
@media print { .hac-wz { display: none !important; } }
