/* ───────────────────────── Schriften (lokal, DSGVO-freundlich) ───────────────────────── */
@font-face { font-family: "Christmas"; src: url("fonts/mountains-of-christmas-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Christmas"; src: url("fonts/mountains-of-christmas-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --night-0: #070f26;
  --night-1: #0b1633;
  --night-2: #142a57;
  --night-3: #21407a;
  --gold: #f4c55f;
  --gold-2: #ffe29a;
  --gold-dark: #b9801c;
  --red: #d6303f;
  --red-dark: #9c1b29;
  --pine: #1f7a4e;
  --pine-dark: #135536;
  --snow: #f8fbff;
  --paper: #fff9ef;
  --paper-2: #f8eedc;
  --ink: #2c211b;
  --muted: #7c6a5c;
  --line: #ead9bf;
  --ok: #1f8a55;
  --warn: #c2410c;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .18);
  --font-script: "Christmas", "Segoe Print", cursive;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--snow);
  background: var(--night-1);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(80, 120, 220, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(130, 70, 170, .22), transparent 60%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 45%, var(--night-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.has-tabbar { --tabbar-h: 74px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────────────────── Himmel, Schnee, Hügel ───────────────────────── */
#snow, #confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#snow { z-index: 0; }
#confetti { z-index: 90; }
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 12%, #fff, transparent),
    radial-gradient(1px 1px at 25% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 8%, #fff, transparent),
    radial-gradient(1px 1px at 55% 22%, #fff, transparent),
    radial-gradient(2px 2px at 70% 14%, #fff8d0, transparent),
    radial-gradient(1px 1px at 85% 35%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92% 6%, #fff, transparent),
    radial-gradient(1px 1px at 5% 45%, #fff, transparent),
    radial-gradient(1px 1px at 63% 40%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 33% 50%, #fff, transparent);
  opacity: .7;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .85; } }
.hills { position: fixed; left: 0; right: 0; bottom: 0; height: 160px; z-index: 0; pointer-events: none; }
.hills svg { width: 100%; height: 100%; }

/* ───────────────────────── Kopfzeile mit Lichterkette ───────────────────────── */
.topbar { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); background: linear-gradient(180deg, rgba(7, 15, 38, .92), rgba(7, 15, 38, .6) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.topbar-inner { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 12px; }
.brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-script); font-weight: 700; font-size: clamp(20px, 5.4vw, 32px); color: var(--gold-2); text-shadow: 0 0 18px rgba(244, 197, 95, .45); letter-spacing: .5px; white-space: nowrap; }
.brand-star { display: inline-block; animation: spin-slow 8s linear infinite; color: var(--gold); }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.whoami { font-size: 13px; font-weight: 800; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); padding: 6px 12px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; flex: none; }
.icon-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); cursor: pointer; font-size: 18px; display: grid; place-items: center; transition: transform .15s, background .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn:active { transform: scale(.92); }

.lights { position: absolute; left: 0; right: 0; top: env(safe-area-inset-top); height: 22px; pointer-events: none; overflow: hidden; }
.lights::before { content: ""; position: absolute; left: -2%; right: -2%; top: -14px; height: 26px; border-bottom: 2px solid #1e3a2a; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.lights i { position: absolute; top: 6px; width: 9px; height: 13px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: var(--c); box-shadow: 0 0 10px 2px var(--c); animation: blink 2.4s infinite ease-in-out; animation-delay: var(--d); }
.lights i::before { content: ""; position: absolute; top: -4px; left: 2px; width: 5px; height: 5px; background: #2f4a3a; border-radius: 1px; }
@keyframes blink { 0%, 100% { opacity: 1; filter: brightness(1.15); } 50% { opacity: .35; filter: brightness(.7); box-shadow: none; } }

/* ───────────────────────── Layout ───────────────────────── */
main { position: relative; z-index: 2; max-width: 1040px; margin: 0 auto; padding: 8px 16px calc(40px + var(--tabbar-h) + env(safe-area-inset-bottom)); }
.screen { animation: screen-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.screen.center { min-height: calc(100dvh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

h1, h2, h3 { margin: 0; line-height: 1.15; }
.script { font-family: var(--font-script); font-weight: 700; letter-spacing: .3px; }
h1.script { font-size: clamp(34px, 9vw, 52px); color: var(--gold-2); text-shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 0 26px rgba(244, 197, 95, .35); }
h2.script { font-size: clamp(28px, 7vw, 38px); }
.lead { font-size: 17px; opacity: .9; max-width: 34ch; margin: 0 auto; line-height: 1.5; }
.muted { color: var(--muted); }
.on-dark .muted, .screen > .muted { color: rgba(255, 255, 255, .7); }
.small { font-size: 13px; }

/* Papierkarte */
.card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  background-image: radial-gradient(rgba(180, 140, 90, .07) 1px, transparent 1px);
  background-size: 6px 6px;
}
.card::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(190, 150, 100, .35); border-radius: calc(var(--radius) - 7px); pointer-events: none; }
.card.narrow { width: min(440px, 100%); }
.card h2, .card h3 { color: var(--red-dark); }
.card .script { color: var(--red-dark); }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title h2 { font-size: 30px; }
.card-title .emoji { font-size: 26px; }
.card.glass { background: rgba(255, 255, 255, .08); color: var(--snow); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background-image: none; }
.card.glass::after { display: none; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(255, 226, 154, .14); border: 1px solid rgba(255, 226, 154, .35); color: var(--gold-2); font-size: 14px; line-height: 1.45; }
.notice.red { background: rgba(214, 48, 63, .18); border-color: rgba(255, 120, 130, .45); color: #ffd6da; }
.notice.paper { background: #fff2d6; border-color: #f0cf8a; color: #6b4a12; }
.notice .ico { font-size: 22px; line-height: 1; }
.notice b { color: inherit; }

/* ───────────────────────── Buttons & Formulare ───────────────────────── */
.btn {
  --bg: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #e2a93c);
  --fg: #4a2c05;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--bg); color: var(--fg); font-weight: 800; font-size: 16px; text-decoration: none;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .22), 0 10px 22px -8px rgba(244, 197, 95, .55);
  transition: transform .12s, box-shadow .12s, filter .2s;
  overflow: hidden; white-space: nowrap;
}
.btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); }
.btn:hover::before { transform: translateX(120%); transition: transform .8s; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, .22); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.red { --bg: linear-gradient(180deg, #f05a63, var(--red) 55%, var(--red-dark)); --fg: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 10px 22px -8px rgba(214, 48, 63, .6); }
.btn.green { --bg: linear-gradient(180deg, #4cbf7d, var(--pine) 60%, var(--pine-dark)); --fg: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 10px 22px -8px rgba(31, 122, 78, .6); }
.btn.ghost { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 2px currentColor; }
.btn.ghost:active { box-shadow: inset 0 0 0 2px currentColor; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn.big { min-height: 60px; font-size: 20px; padding: 0 32px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; opacity: .85; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field label { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .3px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(244, 197, 95, .3); }
.input-wrap { position: relative; }
.input-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; }

.shake-x { animation: shake-x .5s; }
@keyframes shake-x { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }

/* ───────────────────────── Gesichter mit Verkleidung ───────────────────────── */
.face { --s: 96px; position: relative; width: var(--s); height: var(--s); flex: none; }
.face .photo { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #e8eef8; box-shadow: 0 0 0 3px #fff, 0 8px 18px -6px rgba(0, 0, 0, .5); }
.face .photo img { width: 100%; height: 100%; object-fit: cover; }
.face .photo.placeholder { display: grid; place-items: center; font-size: calc(var(--s) * .55); background: radial-gradient(circle at 35% 30%, #fff, #dbe6f5); }
.face .costume { position: absolute; left: -30%; top: -60%; width: 160%; height: 190%; overflow: visible; pointer-events: none; }
.face .halo { animation: halo 3s ease-in-out infinite; transform-origin: 50px -10px; }
@keyframes halo { 50% { transform: translateY(-4px); } }
.face .nose { animation: nose 1.6s ease-in-out infinite; }
@keyframes nose { 50% { opacity: .75; } }
.face .bell { animation: bell 2s ease-in-out infinite; transform-origin: 30px -52px; }
@keyframes bell { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(18deg); } 80% { transform: rotate(-14deg); } 90% { transform: rotate(8deg); } }
.face .pompom { animation: pompom 2.8s ease-in-out infinite; transform-origin: 96px 0; }
@keyframes pompom { 50% { transform: rotate(6deg); } }

/* ───────────────────────── Wer bist du? ───────────────────────── */
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 46px 14px; width: 100%; max-width: 760px; padding-top: 50px; }
.who-item { display: flex; flex-direction: column; align-items: center; gap: 12px; background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 20px; animation: drop-in .7s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 70ms); }
.who-item .face { --s: 92px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.who-item:hover .face, .who-item:focus-visible .face { transform: translateY(-6px) rotate(-4deg) scale(1.05); }
.who-item:active .face { transform: scale(.94); }
.who-item .name { font-weight: 800; font-size: 17px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); padding: 4px 14px; border-radius: 999px; }
.who-item .tag { font-size: 11px; opacity: .65; margin-top: -6px; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-40px) scale(.7); } to { opacity: 1; transform: none; } }
.admin-entry { margin-top: 18px; display: inline-flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .3); border-radius: 999px; padding: 8px 18px; cursor: pointer; font-weight: 800; font-size: 14px; color: var(--gold-2); }

/* ───────────────────────── PIN ───────────────────────── */
.pin-face { margin-top: 40px; }
.pin-face .face { --s: 120px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(2deg); } }
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 6px 0; }
.pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); transition: background .15s, transform .15s; }
.pin-dots span.on { background: var(--gold); border-color: var(--gold); transform: scale(1.15); box-shadow: 0 0 12px rgba(244, 197, 95, .7); }
.pin-dots.error span { border-color: #ff7b86; background: transparent; }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; }
.key { height: 76px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06)); font-size: 28px; font-weight: 800; cursor: pointer; transition: transform .1s, background .15s; touch-action: manipulation; user-select: none; }
.key:active { transform: scale(.9); background: rgba(244, 197, 95, .35); }
.key.fn { font-size: 20px; background: transparent; border-color: transparent; }

/* ───────────────────────── Tab-Leiste ───────────────────────── */
.tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 2px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(7, 15, 38, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, .1); }
.tab { position: relative; flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; border-radius: 14px; cursor: pointer; font-size: 11px; font-weight: 800; opacity: .65; transition: opacity .2s, background .2s; }
.tab .ti { font-size: 22px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tab[aria-selected="true"] { opacity: 1; background: rgba(255, 255, 255, .1); color: var(--gold-2); }
.tab[aria-selected="true"] .ti { transform: translateY(-3px) scale(1.15); }
.badge { position: absolute; top: 2px; right: calc(50% - 24px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--night-1); animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(0); } }
@media (min-width: 820px) {
  body.has-tabbar { --tabbar-h: 0px; }
  .tabbar { position: sticky; top: 74px; bottom: auto; z-index: 30; max-width: 1040px; margin: 0 auto 10px; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 4px 16px; gap: 8px; justify-content: flex-start; }
  .tab { flex: none; max-width: none; flex-direction: row; gap: 8px; font-size: 15px; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
  .tab .ti { font-size: 18px; }
  .tab[aria-selected="true"] .ti { transform: scale(1.15); }
  .badge { position: static; margin-left: 2px; }
}

/* ───────────────────────── Countdown ───────────────────────── */
.countdown { display: flex; gap: 10px; justify-content: center; }
.cd-tile { min-width: 64px; padding: 10px 8px 8px; border-radius: 16px; text-align: center; background: linear-gradient(180deg, #fff, #f1e6d2); color: var(--red-dark); box-shadow: 0 6px 0 rgba(0, 0, 0, .2); }
.cd-num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; display: inline-block; }
.cd-num.tick { animation: tick .45s ease-out; }
@keyframes tick { 0% { transform: translateY(-40%); opacity: .2; } 100% { transform: none; opacity: 1; } }
.cd-lbl { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.hero { text-align: center; padding: 8px 0 4px; }
.hero h1 { margin-bottom: 10px; }
.hero .sub { opacity: .85; margin-bottom: 16px; }

/* ───────────────────────── Schneekugel ───────────────────────── */
.globe-wrap { --g: min(78vw, 360px); position: relative; width: var(--g); margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.globe-mover { will-change: transform; }
.globe { position: relative; width: var(--g); height: var(--g); border-radius: 50%; overflow: hidden; cursor: grab; background: radial-gradient(circle at 50% 35%, #3a64b4 0%, #1b3772 55%, #0d1f48 100%); box-shadow: inset 0 -20px 50px rgba(0, 0, 0, .45), inset 0 10px 40px rgba(160, 200, 255, .25), 0 0 0 4px rgba(255, 255, 255, .15), 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 60px rgba(120, 170, 255, .25); }
.globe:active { cursor: grabbing; }
.globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.globe .scene { position: absolute; left: 0; right: 0; bottom: 0; height: 32%; }
.globe .faces { position: absolute; inset: 0; }
.globe .gface { position: absolute; left: 0; top: 0; will-change: transform; }
.globe .gface .face { --s: calc(var(--g) * .2); }
.globe .gface .face .photo { box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0, 0, 0, .4); }
.globe .glass { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, .12) 12%, transparent 26%), radial-gradient(circle at 72% 78%, rgba(255, 255, 255, .12), transparent 30%); }
.globe .glass::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; border-top: 3px solid rgba(255, 255, 255, .35); border-left: 2px solid rgba(255, 255, 255, .15); border-right: 2px solid transparent; border-bottom: 2px solid transparent; transform: rotate(-30deg); }
.globe-base { position: relative; width: 84%; margin: -9% auto 0; height: calc(var(--g) * .3); z-index: 1; }
.globe-base .top { position: absolute; left: 4%; right: 4%; top: 0; height: 26%; border-radius: 50%; background: linear-gradient(180deg, #ffe7a6, #c9902f); box-shadow: 0 4px 0 #8a5a14; }
.globe-base .body { position: absolute; left: 0; right: 0; top: 13%; bottom: 0; border-radius: 12px 12px 40% 40% / 12px 12px 30% 30%; background: linear-gradient(90deg, #5a2a0e, #8b4a1e 30%, #a95f2a 50%, #8b4a1e 70%, #5a2a0e); box-shadow: inset 0 -10px 20px rgba(0, 0, 0, .4), 0 20px 30px -10px rgba(0, 0, 0, .6); }
.plaque { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 70%; padding: 6px 8px; border-radius: 10px; background: linear-gradient(180deg, #ffeab0, #d9a443); box-shadow: inset 0 0 0 2px rgba(120, 70, 10, .4), 0 2px 4px rgba(0, 0, 0, .4); color: #5b3608; text-align: center; }
.plaque .pl-title { font-family: var(--font-script); font-weight: 700; font-size: calc(var(--g) * .052); line-height: 1.1; }
.meter { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
.meter i { font-style: normal; font-size: calc(var(--g) * .036); color: rgba(90, 50, 5, .35); transition: color .2s, transform .2s, text-shadow .2s; }
.meter i.on { color: #fff; text-shadow: 0 0 6px #fff, 0 0 12px var(--gold); transform: scale(1.25); }
.globe-hint { text-align: center; margin-top: 14px; font-weight: 800; font-size: 17px; min-height: 1.4em; }
.globe-wrap.preview { --g: min(62vw, 250px); pointer-events: none; }
.globe-wrap.shaking .globe-mover { animation: shake-globe .5s ease-in-out; }
@keyframes shake-globe { 0%, 100% { transform: none; } 20% { transform: translate(-14px, 4px) rotate(-6deg); } 40% { transform: translate(12px, -6px) rotate(5deg); } 60% { transform: translate(-10px, 2px) rotate(-4deg); } 80% { transform: translate(6px, -2px) rotate(2deg); } }
.globe.burst { animation: globe-burst .7s ease-in forwards; }
@keyframes globe-burst { 40% { transform: scale(1.06); filter: brightness(1.6); } 100% { transform: scale(1.25); opacity: 0; filter: brightness(2.5) blur(6px); } }

/* Vollbild-Bühne für das Losziehen */
.stage { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% 40%, rgb(36, 64, 130), rgb(5, 10, 28) 72%); animation: fade-in .4s ease both; overflow: hidden; }
@keyframes fade-in { from { opacity: 0; } }
.stage .close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.stage h2 { text-align: center; }
.stage-title { font-family: var(--font-script); font-weight: 700; font-size: clamp(30px, 8vw, 44px); color: var(--gold-2); text-shadow: 0 0 20px rgba(244, 197, 95, .5); text-align: center; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.reveal-face { position: fixed; left: 50%; top: 50%; z-index: 85; transform: translate(-50%, -50%); pointer-events: none; }
.reveal-face .face { --s: min(42vw, 190px, 26vh); }
.reveal-face.dizzy .face { animation: dizzy 1.5s ease-in-out; }
@keyframes dizzy { 0% { transform: rotate(0); } 15% { transform: rotate(-18deg) translateX(-6px); } 30% { transform: rotate(16deg) translateX(6px); } 45% { transform: rotate(-12deg); } 60% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } 100% { transform: rotate(0); } }
.dizzy-stars { position: absolute; left: 50%; top: -6%; width: 80%; height: 30%; transform: translateX(-50%); pointer-events: none; }
.dizzy-stars span { position: absolute; left: 50%; top: 50%; font-size: 26px; color: var(--gold-2); text-shadow: 0 0 10px var(--gold); animation: orbit 1s linear infinite; animation-delay: calc(var(--k) * -0.33s); }
@keyframes orbit { from { transform: rotate(0deg) translateX(min(22vw, 95px)) rotate(0deg) scaleY(.5); } to { transform: rotate(360deg) translateX(min(22vw, 95px)) rotate(-360deg) scaleY(.5); } }
.reveal-text { position: fixed; left: 0; right: 0; bottom: calc(6% + env(safe-area-inset-bottom)); z-index: 86; text-align: center; padding: 0 16px; }
.reveal-text .small-line { font-size: 18px; font-weight: 800; opacity: .9; }
.reveal-text .big-name { font-family: var(--font-script); font-weight: 700; font-size: clamp(48px, 14vw, 84px); color: var(--gold-2); text-shadow: 0 0 30px rgba(244, 197, 95, .6), 0 4px 0 rgba(0, 0, 0, .3); }
.reveal-text .big-name span { display: inline-block; animation: letter .6s cubic-bezier(.3, 1.8, .5, 1) both; animation-delay: calc(var(--i) * 60ms + .1s); }
@keyframes letter { from { opacity: 0; transform: translateY(40px) scale(.3) rotate(-20deg); } }

/* ───────────────────────── Wackelkopf ───────────────────────── */
.bobble { position: relative; width: 210px; height: 250px; margin: 118px auto 0; cursor: pointer; outline: none; }
.bobble .bbody { position: absolute; left: 0; bottom: 0; width: 210px; height: 200px; }
.bobble .bhead { position: absolute; left: 50%; top: -42px; width: 0; height: 0; }
.bobble .bhead-inner { position: absolute; left: -62px; top: 0; transform-origin: 62px 120px; will-change: transform; }
.bobble .bhead .face { --s: 124px; }
.bobble .arm-l { transform-origin: 68px 46px; animation: wave-l 2.2s ease-in-out infinite; }
.bobble .arm-r { transform-origin: 142px 46px; animation: wave-r 1.6s ease-in-out infinite; }
@keyframes wave-l { 50% { transform: rotate(10deg); } }
@keyframes wave-r { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-30deg); } 50% { transform: rotate(-10deg); } 75% { transform: rotate(-32deg); } }
.bobble-shadow { width: 150px; height: 18px; margin: -4px auto 0; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .35), transparent 70%); }

/* ───────────────────────── Wünsche ───────────────────────── */
.wish-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.wish { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; color: var(--ink); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); transition: transform .2s; animation: drop-in .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.wish:hover { transform: translateY(-3px) rotate(-.4deg); }
.wish .wimg { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #fdf3e1, #f3e3c6); display: grid; place-items: center; overflow: hidden; }
.wish .wimg img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wish .wimg .ph { font-size: 52px; opacity: .8; }
.wish .wbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wish .wtitle { font-weight: 800; font-size: 15px; line-height: 1.3; word-break: break-word; }
.wish .wmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.wish .num { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: radial-gradient(circle at 35% 30%, #ff8a92, var(--red) 60%, var(--red-dark)); box-shadow: 0 3px 6px rgba(0, 0, 0, .3); font-size: 14px; }
.wish .num::before { content: ""; position: absolute; top: -5px; left: 11px; width: 8px; height: 6px; border-radius: 2px; background: var(--gold); }
.price { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; background: #e6f5ec; color: var(--ok); }
.price.over { background: #fde8e8; color: #b42318; }
.wlink { font-size: 13px; font-weight: 800; color: var(--red-dark); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.wish.empty { opacity: .55; border: 2px dashed var(--line); box-shadow: none; background: transparent; }
.budget-hint { display: block; padding: 12px 14px; border-radius: 14px; background: #fff3d9; color: #6b4a12; font-size: 14px; font-weight: 600; }

/* Wunsch-Editor */
.editor { display: flex; flex-direction: column; gap: 14px; }
.editor-head { display: flex; align-items: center; gap: 12px; }
.ornament { width: 44px; height: 50px; flex: none; position: relative; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 20px; }
.ornament::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9aa1, var(--red) 55%, var(--red-dark)); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.ornament.green::before { background: radial-gradient(circle at 35% 30%, #8fe0b0, var(--pine) 55%, var(--pine-dark)); }
.ornament.gold::before { background: radial-gradient(circle at 35% 30%, #fff1c2, var(--gold) 55%, var(--gold-dark)); }
.ornament::after { content: ""; position: absolute; top: 0; left: 17px; width: 10px; height: 8px; border-radius: 2px; background: #d8b45a; }
.ornament span { position: relative; margin-top: 6px; }
.editor-img { position: relative; border-radius: 16px; overflow: hidden; background: #f8efdf; min-height: 120px; display: grid; place-items: center; border: 2px dashed var(--line); }
.editor-img img { max-height: 240px; width: 100%; object-fit: contain; background: #fff; }
.editor-img .loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 249, 239, .85); font-weight: 800; color: var(--muted); }
.shimmer { background: linear-gradient(90deg, #f3e6cf 25%, #fff7ea 50%, #f3e6cf 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.saved-flag { color: var(--ok); font-weight: 800; font-size: 14px; opacity: 0; transition: opacity .3s; }
.saved-flag.show { opacity: 1; }

/* Geschenk besorgt */
.gift-check { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; border: 2px dashed var(--line); background: #fffdf8; cursor: pointer; text-align: left; color: var(--ink); transition: background .3s, border-color .3s; }
.gift-check .box { position: relative; width: 46px; height: 46px; flex: none; }
.gift-check .box svg { width: 100%; height: 100%; overflow: visible; }
.gift-check .lid { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 23px 18px; }
.gift-check .bow { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; transform-origin: 23px 12px; transform: scale(0); opacity: 0; }
.gift-check.on { background: #eaf7ef; border-color: #8fd3ad; border-style: solid; }
.gift-check.on .bow { transform: scale(1); opacity: 1; }
.gift-check:not(.on) .lid { transform: translateY(-6px) rotate(-12deg); }
.gift-check .gc-title { font-weight: 800; font-size: 16px; }
.gift-check .gc-sub { font-size: 13px; color: var(--muted); }

/* ───────────────────────── Chat ───────────────────────── */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding: 4px 2px 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; line-height: 1.4; font-size: 15px; word-break: break-word; white-space: pre-wrap; position: relative; animation: bubble .35s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes bubble { from { transform: scale(.6); opacity: 0; } }
.bubble.them { align-self: flex-start; background: #f2e8d6; border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: linear-gradient(180deg, #2f8f5d, var(--pine)); color: #fff; border-bottom-right-radius: 6px; }
.bubble .time { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
.bubble.new::after { content: "neu"; position: absolute; top: -8px; right: -6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 999px; }
.chat-empty { text-align: center; color: var(--muted); padding: 18px 8px; font-size: 14px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.chat-form textarea { min-height: 48px; max-height: 140px; }
.anon-mask { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; font-size: 30px; background: radial-gradient(circle at 35% 30%, #4a5b86, #1c2748); box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(0, 0, 0, .35); flex: none; }

/* ───────────────────────── Personenliste (alle Wünsche, Archiv) ───────────────────────── */
.person-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding-top: 22px; }
.person-head .face { --s: 64px; }
.person-head h3 { font-size: 22px; color: var(--red-dark); }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pair { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 30px 14px 14px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--ink); }
.pair .p { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; min-width: 0; }
.pair .face { --s: 58px; }
.pair .arrow { font-size: 26px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }
.received-photo { border-radius: 14px; overflow: hidden; margin-top: 10px; }
.locked-box { text-align: center; padding: 26px 12px; }
.locked-box .lock { font-size: 56px; display: inline-block; animation: wobble-lock 3s ease-in-out infinite; }
@keyframes wobble-lock { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-12deg); } 85% { transform: rotate(10deg); } 92% { transform: rotate(-5deg); } }

/* ───────────────────────── Admin ───────────────────────── */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.admin-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 22px 14px 14px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.admin-row .face { --s: 54px; grid-row: span 2; }
.admin-row .an { font-weight: 800; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: #f1ece3; color: var(--muted); white-space: nowrap; }
.chip.yes { background: #e2f4e9; color: var(--ok); }
.chip.no { background: #fdeceb; color: #b42318; }
.chip.lock { background: #fff1d6; color: #9a6200; }
.admin-row .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.secret { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: #1c2748; color: #fff; font-weight: 800; font-size: 14px; min-height: 38px; }
.secret.hidden-val { letter-spacing: 3px; }
.secret .face { --s: 28px; grid-row: auto; }
.secret .face .costume { display: none; }
.costume-preview { display: flex; gap: 18px; align-items: center; padding: 34px 0 6px 20px; }
.costume-preview .face { --s: 80px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.person-edit { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 16px; }
.person-edit:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.log-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* ───────────────────────── Dialog & Toast ───────────────────────── */
.modal-back { position: fixed; inset: 0; z-index: 95; background: rgba(4, 8, 22, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade-in .2s ease both; }
.modal { width: min(420px, 100%); text-align: center; animation: modal-in .45s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes modal-in { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.modal .face { --s: 96px; margin: 40px auto 14px; }
.modal h2 { font-size: 34px; margin-bottom: 8px; }
.modal p { line-height: 1.5; margin: 0 0 18px; }
.modal .row { justify-content: center; }
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); z-index: 99; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 440px; padding: 12px 18px; border-radius: 16px; background: #fffaf0; color: var(--ink); font-weight: 700; box-shadow: var(--shadow); animation: toast-in .4s cubic-bezier(.3, 1.6, .5, 1) both; display: flex; gap: 10px; align-items: center; }
.toast.err { background: #ffe8ea; color: #8a1020; }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { transform: translateY(20px) scale(.9); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(10px); opacity: 0; } }

.loader { font-size: 52px; animation: spin-slow 2.4s linear infinite; color: #fff; text-shadow: 0 0 20px rgba(255, 255, 255, .6); }

.section-title { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; }
.section-title h2 { color: var(--gold-2); }
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.subtabs button { border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; }
.subtabs button[aria-selected="true"] { background: var(--gold); color: #4a2c05; border-color: var(--gold); }

@media (max-width: 420px) {
  .card { padding: 18px 16px; }
  .keypad { grid-template-columns: repeat(3, 70px); gap: 12px; }
  .key { height: 70px; }
  .cd-tile { min-width: 58px; }
  .cd-num { font-size: 26px; }
  .who-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
